From f8d0b0d13cc0943e51f0de77f5cd02f2191933ee Mon Sep 17 00:00:00 2001 From: Circle CI Date: Mon, 9 Oct 2023 22:40:06 +0000 Subject: [PATCH] Update GitHub Pages: b292dcfd8f8615cf976ffd530d908b3c4948612f --- iframe.html | 2 +- ...b41acab.iframe.bundle.js => main.e3a8e566.iframe.bundle.js | 4 ++-- ....LICENSE.txt => main.e3a8e566.iframe.bundle.js.LICENSE.txt | 0 project.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename main.6b41acab.iframe.bundle.js => main.e3a8e566.iframe.bundle.js (84%) rename main.6b41acab.iframe.bundle.js.LICENSE.txt => main.e3a8e566.iframe.bundle.js.LICENSE.txt (100%) diff --git a/iframe.html b/iframe.html index 36171d3f..44cc70c8 100644 --- a/iframe.html +++ b/iframe.html @@ -361,4 +361,4 @@ - window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.story.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.story\\.(js|jsx|ts|tsx))$"}]; \ No newline at end of file + window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.story.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.story\\.(js|jsx|ts|tsx))$"}]; \ No newline at end of file diff --git a/main.6b41acab.iframe.bundle.js b/main.e3a8e566.iframe.bundle.js similarity index 84% rename from main.6b41acab.iframe.bundle.js rename to main.e3a8e566.iframe.bundle.js index 80ca5130..af5df545 100644 --- a/main.6b41acab.iframe.bundle.js +++ b/main.e3a8e566.iframe.bundle.js @@ -1,2 +1,2 @@ -/*! For license information please see main.6b41acab.iframe.bundle.js.LICENSE.txt */ -(self.webpackChunkblockly_mooc=self.webpackChunkblockly_mooc||[]).push([[179],{"./.storybook/decorators.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{reduxStore:()=>reduxStore});var redux__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/redux/es/redux.js"),_cdo_apps_code_studio_isRtlRedux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/code-studio/isRtlRedux.js"),_cdo_apps_code_studio_responsiveRedux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/code-studio/responsiveRedux.js"),redux_thunk__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/redux-thunk/lib/index.js");const reduxStore=(reducers={},state={})=>(0,redux__WEBPACK_IMPORTED_MODULE_3__.createStore)((0,redux__WEBPACK_IMPORTED_MODULE_3__.combineReducers)({isRtl:_cdo_apps_code_studio_isRtlRedux__WEBPACK_IMPORTED_MODULE_0__.default,responsive:_cdo_apps_code_studio_responsiveRedux__WEBPACK_IMPORTED_MODULE_1__.default,...reducers}),state,(0,redux__WEBPACK_IMPORTED_MODULE_3__.applyMiddleware)(redux_thunk__WEBPACK_IMPORTED_MODULE_2__.default))},"./.storybook/preview.js-generated-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject);var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),jquery=__webpack_require__("./node_modules/jquery/dist/jquery.js"),jquery_default=__webpack_require__.n(jquery);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(0,__webpack_require__("./node_modules/storybook-addon-rtl/dist/index.js").VB)(),jquery_default().fn.fileupload=()=>{},Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":return(0,ClientApi.uc)(value);case"argTypes":return(0,ClientApi.v9)(value);case"decorators":return value.forEach((function(decorator){return(0,ClientApi.$9)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,ClientApi.HZ)(loader,!1)}));case"parameters":return(0,ClientApi.h1)(function _objectSpread(target){for(var i=1;i{var ObservableEventDEPRECATED=module.exports=function(){this.observerList_=[]};ObservableEventDEPRECATED.prototype.register=function(onNotify){var key={toCall:onNotify};return Object.freeze(key),this.observerList_.push(key),key},ObservableEventDEPRECATED.prototype.unregister=function(keyObj){for(var i=0;i{var Observer=module.exports=function(){this.observed_=[]};Observer.prototype.observe=function(event,callback){var key=event.register(callback);this.observed_.push({event,key})},Observer.prototype.unobserveAll=function(){this.observed_.forEach((function(observable){observable.event.unregister(observable.key)})),this.observed_.length=0}},"./src/Sound.js":(module,exports)=>{"use strict";function Sound(config,audioContext){this.config=config,this.audioContext=audioContext,this.audioElement=null,this.reusableBuffer=null,this.playableBuffers=[],this.isPlayingCount=0,this.isPlaying_=!1,this.isLoaded_=!1,this.didLoadFail_=!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Sound,Sound.prototype.play=function(options){if(options=options||{},this.audioElement||this.reusableBuffer){if(this.reusableBuffer){var index=this.playableBuffers.push(this.newPlayableBufferSource(this.reusableBuffer,options))-1;return this.playableBuffers[index].onended=function(){this.isPlayingCount=Math.max(this.isPlayingCount-1,0),0===this.isPlayingCount&&(this.isPlaying_=!1,options.onEnded&&options.onEnded())}.bind(this),this.playableBuffers[index].start?this.playableBuffers[index].start(0):this.playableBuffers[index].noteOn(0),void this.handlePlayStarted(options)}if(this.config.allowHTML5Mobile||!function isMobile(){return"ontouchstart"in document.documentElement}()){var volume=void 0===options.volume?1:Math.max(0,Math.min(1,options.volume));this.audioElement.volume=volume,this.audioElement.loop=!!options.loop;var unregisterAndCallback=function(){this.audioElement.removeEventListener("abort",unregisterAndCallback),this.audioElement.removeEventListener("ended",unregisterAndCallback),this.audioElement.removeEventListener("pause",unregisterAndCallback),this.isPlaying_=!1,options.onEnded&&options.onEnded()}.bind(this);this.audioElement.addEventListener("abort",unregisterAndCallback),this.audioElement.addEventListener("ended",unregisterAndCallback),this.audioElement.addEventListener("pause",unregisterAndCallback),this.audioElement.play(),this.handlePlayStarted(options)}else this.handlePlayFailed(options)}else this.handlePlayFailed(options)},Sound.prototype.playAfterLoad=function(options){this.isLoaded()||this.config.playAfterLoad?this.handlePlayFailed(options):(this.config.playAfterLoad=!0,this.config.playAfterLoadOptions=options)},Sound.prototype.handlePlayFailed=function(options){options.callback&&options.callback(!1)},Sound.prototype.handleLoadFailed=function(status){this.didLoadFail_=!0;var _this$config=this.config,onPreloadError=_this$config.onPreloadError,playAfterLoadOptions=_this$config.playAfterLoadOptions;onPreloadError&&onPreloadError(status);var callback=playAfterLoadOptions&&playAfterLoadOptions.callback;callback&&callback(!1)},Sound.prototype.handlePlayStarted=function(options){this.isPlayingCount++,this.isPlaying_=!0,options.callback&&options.callback(!0)},Sound.prototype.stop=function(){try{if(this.playableBuffers.length)for(var index in this.playableBuffers)this.playableBuffers[index].stop?this.playableBuffers[index].stop(0):this.playableBuffers[index].noteOff&&this.playableBuffers[index].noteOff(0),this.isPlayingCount=Math.max(this.isPlayingCount-1,0);else this.audioElement&&(this.audioElement.pause(),this.audioElement.currentTime=0)}catch(e){if("InvalidStateError"!==e.name)throw e}this.isPlaying_=!1},Sound.prototype.isPlaying=function(){return this.isPlaying_},Sound.prototype.isLoaded=function(){return this.isLoaded_},Sound.prototype.didLoadFail=function(){return this.didLoadFail_},Sound.prototype.newPlayableBufferSource=function(buffer,options){var newSound=this.audioContext.createBufferSource();if(this.audioContext.createGain)this.gainNode=this.audioContext.createGain();else{if(!this.audioContext.createGainNode)return null;this.gainNode=this.audioContext.createGainNode()}newSound.buffer=buffer,newSound.loop=!!options.loop,newSound.connect(this.gainNode),this.gainNode.connect(this.audioContext.destination);var startingVolume=void 0===options.volume?1:options.volume;return this.gainNode.gain.value=startingVolume,newSound},Sound.prototype.fadeToGain=function(gain,durationSeconds){this.gainNode?this.fadeToGainWebAudio_(gain,durationSeconds):this.audioElement&&this.fadeToGainHtml5Audio_(gain,durationSeconds)},Sound.prototype.fadeToGainWebAudio_=function(gain,durationSeconds){if(this.gainNode){0===gain&&(gain=.01);var currTime=this.audioContext.currentTime;this.gainNode.gain.setValueAtTime(this.gainNode.gain.value,currTime),this.gainNode.gain.exponentialRampToValueAtTime(gain,currTime+durationSeconds)}},Sound.prototype.fadeToGainHtml5Audio_=function(gain,durationSeconds){if(this.audioElement)var startVolume=this.audioElement.volume||1,finalVolume=Math.max(0,Math.min(1,gain)),deltaVolume=finalVolume-startVolume,durationMillis=1e3*durationSeconds,t0=(new Date).getTime(),fadeInterval=setInterval(function(){var t=(new Date).getTime()-t0;if(t>=durationMillis)return this.audioElement.volume=finalVolume,void clearInterval(fadeInterval);var newVolume=deltaVolume*Math.pow(t/durationMillis,2)+startVolume;this.audioElement.volume=Math.max(0,Math.min(1,newVolume))}.bind(this),100)},Sound.prototype.getPlayableFile=function(){try{if(!window.Audio)return!1;var audioTest=new window.Audio;if(Object.prototype.hasOwnProperty.call(this.config,"mp3")&&audioTest.canPlayType("audio/mp3"))return this.config.mp3;if(Object.prototype.hasOwnProperty.call(this.config,"ogg")&&audioTest.canPlayType("audio/ogg"))return this.config.ogg;if(Object.prototype.hasOwnProperty.call(this.config,"wav")&&audioTest.canPlayType("audio/wav"))return this.config.wav}catch(e){}return!1},Sound.prototype.getPlayableBytes=function(){try{if(!window.Audio)return!1;var audioTest=new window.Audio;if(Object.prototype.hasOwnProperty.call(this.config,"bytes")&&audioTest.canPlayType("audio/mp3"))return this.config.bytes}catch(e){console.warn("No bytes provided or mp3 is not supported")}return!1},Sound.prototype.preloadFile=function(){var file=this.getPlayableFile();if(file)if(!this.config.forceHTML5&&window.AudioContext&&this.audioContext){var self=this;this.preloadViaWebAudio(file,(function(buffer){self.reusableBuffer=buffer}))}else if(window.Audio){var audioElement=new window.Audio(file);this.preloadAudioElement(audioElement)}},Sound.prototype.preloadBytes=function(){var bytes=this.getPlayableBytes();if(bytes)if(!this.config.forceHTML5&&window.AudioContext&&this.audioContext){var self=this;self.audioContext.decodeAudioData(bytes,(function(buffer){self.reusableBuffer=buffer,self.onSoundLoaded()}))}else if(window.Audio){var blob=new Blob([bytes],{type:"audio/mpeg3"}),url=window.URL.createObjectURL(blob),audioElement=new window.Audio(url);this.preloadAudioElement(audioElement)}},Sound.prototype.preloadAudioElement=function(audioElement){var _this=this;if(audioElement&&audioElement.play){(function isIE9(){var version=-1;return/MSIE\s([\d.]+)/.test(navigator.userAgent)&&(version=parseInt(RegExp.$1)),9===version})()||(audioElement.play(),audioElement.pause()),this.audioElement=audioElement;var eventListener=function(){this.onSoundLoaded(),audioElement.removeEventListener("canplaythrough",eventListener)}.bind(this);audioElement.addEventListener("canplaythrough",eventListener),audioElement.addEventListener("error",(function(){_this.handleLoadFailed()}))}},Sound.prototype.onSoundLoaded=function(){this.isLoaded_=!0,this.config.playAfterLoad&&this.play(this.config.playAfterLoadOptions),this.onLoad&&this.onLoad()},Sound.prototype.preloadViaWebAudio=function(filename,onPreloadedCallback){var request=new XMLHttpRequest;request.open("GET",filename,!0),request.responseType="arraybuffer";var self=this;request.onload=function(){200===request.status?self.audioContext.decodeAudioData(request.response,(function(buffer){onPreloadedCallback(buffer),self.onSoundLoaded()})):self.handleLoadFailed(request.status)},request.onerror=function(){self.handleLoadFailed(request.status)},request.send()},module.exports=exports.default},"./src/Sounds.js":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Sounds;var singleton,_Sound=_interopRequireDefault(__webpack_require__("./src/Sound.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Sounds(){if(window.AudioContext=window.AudioContext||window.webkitAudioContext,this.audioContext=null,this.isMuted=!1,this.audioUnlocked_=!1,window.AudioContext)try{this.audioContext=new AudioContext,this.initializeAudioUnlockState_()}catch(e){}this.soundsById={},this.whenAudioUnlockedCallbacks_=[],this.onStopAllAudioCallbacks_=[]}Sounds.getSingleton=function(){return singleton||(singleton=new Sounds),singleton},Sounds.prototype.initializeAudioUnlockState_=function(){this.unlockAudio(function(){if(!this.isAudioUnlocked()){var unlockHandler=function(){this.unlockAudio(function(){this.isAudioUnlocked()&&(document.removeEventListener("mousedown",unlockHandler,!0),document.removeEventListener("touchend",unlockHandler,!0),document.removeEventListener("keydown",unlockHandler,!0))}.bind(this))}.bind(this);document.addEventListener("mousedown",unlockHandler,!0),document.addEventListener("touchend",unlockHandler,!0),document.addEventListener("keydown",unlockHandler,!0)}}.bind(this))},Sounds.prototype.isAudioUnlocked=function(){return this.audioUnlocked_||!this.audioContext},Sounds.prototype.whenAudioUnlocked=function(callback){this.isAudioUnlocked()?callback():this.whenAudioUnlockedCallbacks_.push(callback)},Sounds.prototype.unlockAudio=function(onComplete){if(!this.isAudioUnlocked()){var buffer=this.audioContext.createBuffer(1,1,22050),source=this.audioContext.createBufferSource();source.buffer=buffer,source.connect(this.audioContext.destination),source.start?source.start(0):source.noteOn(0),this.checkDidSourcePlay_(source,this.audioContext,function(didPlay){didPlay&&(this.audioUnlocked_=!0,this.whenAudioUnlockedCallbacks_.forEach((function(cb){cb()})),this.whenAudioUnlockedCallbacks_.length=0),onComplete&&onComplete()}.bind(this))}},Sounds.prototype.checkDidSourcePlay_=function(source,context,onComplete){void 0===source.PLAYING_STATE||void 0===source.FINISHED_STATE?setTimeout(function(){onComplete("number"==typeof context.currentTime&&context.currentTime>0)}.bind(this),50):setTimeout(function(){onComplete(source.playbackState===source.PLAYING_STATE||source.playbackState===source.FINISHED_STATE)}.bind(this),0)},Sounds.prototype.registerByFilenamesAndID=function(soundPaths,soundID){for(var soundRegistrationConfig={id:soundID},i=0;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MIN_VISUALIZATION_WIDTH=exports.MAX_VISUALIZATION_WIDTH=void 0,exports.makeFooterMenuItems=makeFooterMenuItems,exports.singleton=function singleton(){instance||(instance=new StudioApp);return instance};var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_events=__webpack_require__("./node_modules/events/events.js"),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_trackEvent=_interopRequireDefault(__webpack_require__("./src/util/trackEvent.js"));__webpack_require__("./src/polyfills.js");var aceMode=_interopRequireWildcard(__webpack_require__("./src/acemode/mode-javascript_codeorg.js")),assetPrefix=_interopRequireWildcard(__webpack_require__("./src/assetManagement/assetPrefix.js")),assets=_interopRequireWildcard(__webpack_require__("./src/code-studio/assets.js")),blockUtils=_interopRequireWildcard(__webpack_require__("./src/block_utils.js")),dom=_interopRequireWildcard(__webpack_require__("./src/dom.js")),dropletUtils=_interopRequireWildcard(__webpack_require__("./src/dropletUtils.js")),shareWarnings=_interopRequireWildcard(__webpack_require__("./src/shareWarnings.js")),utils=_interopRequireWildcard(__webpack_require__("./src/utils.js")),_AbuseError=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AbuseError.jsx")),_alert=_interopRequireDefault(__webpack_require__("./src/templates/alert.jsx")),_authoredHints=_interopRequireDefault(__webpack_require__("./src/authoredHints.js")),_ChallengeDialog=_interopRequireDefault(__webpack_require__("./src/templates/ChallengeDialog.jsx")),_DropletTooltipManager=_interopRequireDefault(__webpack_require__("./src/blockTooltips/DropletTooltipManager.js")),_feedback=_interopRequireDefault(__webpack_require__("./src/feedback.js")),_InstructionsDialog=_interopRequireDefault(__webpack_require__("./src/templates/instructions/InstructionsDialog.jsx")),_SmallFooter=_interopRequireDefault(__webpack_require__("./src/code-studio/components/SmallFooter.jsx")),_Sounds=_interopRequireDefault(__webpack_require__("./src/Sounds.js")),_VersionHistory=_interopRequireDefault(__webpack_require__("./src/templates/VersionHistory.jsx")),_WireframeButtons=_interopRequireDefault(__webpack_require__("./src/lib/ui/WireframeButtons.jsx")),_annotationList=_interopRequireDefault(__webpack_require__("./src/acemode/annotationList.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_achievements=_interopRequireDefault(__webpack_require__("./src/achievements.js")),_logToCloud=_interopRequireDefault(__webpack_require__("./src/logToCloud.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_project=_interopRequireDefault(__webpack_require__("./src/code-studio/initApp/project.js")),_puzzleRatingUtils=_interopRequireDefault(__webpack_require__("./src/puzzleRatingUtils.js")),_userAgentParser=_interopRequireDefault(__webpack_require__("./src/code-studio/initApp/userAgentParser.js")),_constants=__webpack_require__("./src/constants.js"),_constants2=__webpack_require__("./src/blockly/constants.js"),_clientApi=__webpack_require__("./src/clientApi.js"),_dropletConfig=__webpack_require__("./src/lib/kits/maker/dropletConfig.js"),_redux=__webpack_require__("./src/redux.js"),_containedLevels=__webpack_require__("./src/containedLevels.js"),_codeStudioLevels=__webpack_require__("./src/code-studio/levels/codeStudioLevels.js"),_xml=__webpack_require__("./src/xml.js"),_runState=__webpack_require__("./src/redux/runState.js"),_studioAppActivity=__webpack_require__("./src/redux/studioAppActivity.js"),_redux2=__webpack_require__("./src/lib/tools/jsdebugger/redux.js"),_pageConstants=__webpack_require__("./src/redux/pageConstants.js"),_layout=__webpack_require__("./src/redux/layout.ts"),_libraryParser=__webpack_require__("./src/code-studio/components/libraries/libraryParser.js"),_feedback2=__webpack_require__("./src/redux/feedback.js"),_experiments=_interopRequireDefault(__webpack_require__("./src/util/experiments.js")),_instructions=__webpack_require__("./src/redux/instructions.js"),_currentUserRedux=__webpack_require__("./src/templates/currentUserRedux.js"),_callouts=__webpack_require__("./src/code-studio/callouts.js"),_utils2=__webpack_require__("./src/code-studio/utils.js"),_VisualizationResizeBar=__webpack_require__("./src/lib/ui/VisualizationResizeBar.jsx"),_reportAbuse=__webpack_require__("./src/reportAbuse.js"),_arrowDisplayRedux=__webpack_require__("./src/templates/arrowDisplayRedux.js"),_color2=__webpack_require__("./src/util/color.js"),_WorkspaceAlert=_interopRequireDefault(__webpack_require__("./src/code-studio/components/WorkspaceAlert.jsx")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var copyrightStrings,codegen=__webpack_require__("./src/lib/tools/jsinterpreter/codegen.js");exports.MAX_VISUALIZATION_WIDTH=400;exports.MIN_VISUALIZATION_WIDTH=200;var StudioApp=function(_EventEmitter){function StudioApp(){var _this;return(_this=_EventEmitter.call(this)||this).feedback_=new _feedback.default(_assertThisInitialized(_this)),_this.authoredHintsController_=new _authoredHints.default(_assertThisInitialized(_this)),_this.BASE_URL=void 0,_this.enableShowCode=!0,_this.editCode=!1,_this.usingBlockly_=!0,_this.editor=null,_this.dropletTooltipManager=null,_this.icon=void 0,_this.winIcon=void 0,_this.failureIcon=void 0,_this.checkForEmptyBlocks_=!1,_this.IDEAL_BLOCK_NUM=void 0,_this.requiredBlocks_=[],_this.maxRequiredBlocksToFlag_=1,_this.recommendedBlocks_=[],_this.maxRecommendedBlocksToFlag_=1,_this.attempts=0,_this.initTime=void 0,_this.milestoneStartTime=void 0,_this.hasReported=!1,_this.hideSource=!1,_this.share=!1,_this.onAttempt=void 0,_this.onContinue=void 0,_this.onResetPressed=void 0,_this.backToPreviousLevel=void 0,_this.isUS=void 0,_this.enableShowBlockCount=!0,_this.disableSocialShare=!1,_this.noPadding=!1,_this.MIN_WORKSPACE_HEIGHT=void 0,_this.libraries={},_this.editDuringRunAlert=void 0,_this.showEditDuringRunAlert=!0,_this.executingCode=void 0,_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(StudioApp,_EventEmitter),StudioApp}(_events.EventEmitter);function showWarnings(config){shareWarnings.checkSharedAppWarnings({channelId:config.channel,isSignedIn:config.isSignedIn,isTooYoung:config.isTooYoung,isOwner:_project.default.isOwner(),hasDataAPIs:config.shareWarningInfo.hasDataAPIs,onWarningsComplete:config.shareWarningInfo.onWarningsComplete,onTooYoung:config.shareWarningInfo.onTooYoung})}function makeFooterMenuItems(){var footerMenuItems=[{key:"try-hoc",text:_locale.default.tryHourOfCode(),link:"https://code.org/learn",newWindow:!0},{key:"how-it-works",text:_locale.default.howItWorks(),link:_project.default.getProjectUrl("/edit"),newWindow:!1},{key:"report-abuse",text:_locale.default.reportAbuse(),link:"/report_abuse",newWindow:!0},{text:_locale.default.copyright(),link:"javascript:void(0)",copyright:!0},{text:_locale.default.tos(),link:"https://code.org/tos",newWindow:!0},{text:_locale.default.privacyPolicy(),link:"https://code.org/privacy",newWindow:!0},{text:_locale.default.cookieNotice(),link:"https://code.org/cookies",newWindow:!0}];"gamelab"===_project.default.getStandaloneApp()&&footerMenuItems.shift();var channelId=_project.default.getCurrentId();return(0,_reportAbuse.userAlreadyReportedAbuse)(channelId)&&_lodash.default.remove(footerMenuItems,(function(menuItem){return"report-abuse"===menuItem.key})),footerMenuItems}function resizePinnedBelowVisualizationArea(){var pinnedBelowVisualization=document.querySelector("#visualizationColumn.pin_bottom #belowVisualization");if(pinnedBelowVisualization){var top=0;["playSpaceHeader","spelling-table-wrapper","gameButtons","gameButtonExtras","song-selector-wrapper","poemSelector"].forEach((function(id){var element=document.getElementById(id);element&&(top+=(0,_jquery.default)(element).outerHeight(!0))}));var visualization=document.getElementById("visualization");if(visualization){var parent=(0,_jquery.default)(visualization).parent();"phoneFrameWrapper"===parent.attr("id")?parent.children().each((function(){top+=(0,_jquery.default)(this).outerHeight(!0)})):top+=(0,_jquery.default)(visualization).outerHeight(!0)}var bottom=0,smallFooter=document.querySelector("#page-small-footer .small-footer-base");if(smallFooter){var codeApp=(0,_jquery.default)("#codeApp");bottom+=(0,_jquery.default)(smallFooter).outerHeight(!0),bottom-=parseInt(codeApp.css("bottom"),10)}pinnedBelowVisualization.style.top=top+"px",pinnedBelowVisualization.style.bottom=bottom+"px"}}StudioApp.prototype.configure=function(options){this.BASE_URL=options.baseUrl,this.editCode=options.level&&options.level.editCode,this.usingBlockly_=!this.editCode,options.isEditorless&&(this.editCode=!1,this.usingBlockly_=!1),this.assetUrl=_lodash.default.bind(this.assetUrl_,this),this.maxVisualizationWidth=options.maxVisualizationWidth||400,this.minVisualizationWidth=options.minVisualizationWidth||200,options.level&&(0,_redux.getStore)().dispatch((0,_runState.setStepSpeed)(options.level.sliderSpeed))},StudioApp.prototype.hasInstructionsToShow=function(config){return!!(config.level.shortInstructions||config.level.longInstructions||config.level.aniGifURL)},StudioApp.prototype.init=function(config){var _this2=this;if(config||(config={}),this.config=config,config.getCode=this.getCode.bind(this),copyrightStrings=config.copyrightStrings,config.legacyShareStyle&&config.hideSource&&((0,_jquery.default)("body").addClass("legacy-share-view"),dom.isMobile()&&((0,_jquery.default)("body").addClass("legacy-share-view-mobile"),(0,_jquery.default)("#main-logo").hide())),this.setConfigValues_(config),this.configureDom(config),config.level.iframeEmbedAppAndCode||_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store:(0,_redux.getStore)()},_react.default.createElement(_InstructionsDialog.default,{title:_locale.default.puzzleTitle({stage_total:config.level.lesson_total,puzzle_number:config.level.puzzle_number})})),document.body.appendChild(document.createElement("div"))),config.usesAssets&&config.channel&&(assetPrefix.init(config),_clientApi.assets.getFiles((function(result){assets.listStore.reset(result.files)}),(function(xhr){}))),config.hideSource&&this.handleHideSource_({containerId:config.containerId,embed:config.embed,level:config.level,noHowItWorks:config.noHowItWorks,isLegacyShare:config.isLegacyShare,legacyShareStyle:config.legacyShareStyle,wireframeShare:config.wireframeShare}),config.level.iframeEmbedAppAndCode&&StudioApp.prototype.handleIframeEmbedAppAndCode_({containerId:config.containerId,embed:config.embed,level:config.level,noHowItWorks:config.noHowItWorks,isLegacyShare:config.isLegacyShare,legacyShareStyle:config.legacyShareStyle,wireframeShare:config.wireframeShare}),config.share&&this.handleSharing_({makeUrl:config.makeUrl,makeString:config.makeString,makeImage:config.makeImage,makeYourOwn:config.makeYourOwn}),!config.level.iframeEmbedAppAndCode){var hintsUsedIds=utils.valueOr(config.authoredHintsUsedIds,[]);this.authoredHintsController_.init(config.level.authoredHints,hintsUsedIds,config.scriptId,config.serverLevelId)}config.authoredHintViewRequestsUrl&&config.isSignedIn&&this.authoredHintsController_.submitHints(config.authoredHintViewRequestsUrl),config.puzzleRatingsUrl&&_puzzleRatingUtils.default.submitCachedPuzzleRatings(config.puzzleRatingsUrl),this.initTime=(new Date).getTime(),this.initTimeSpent();var viewport=document.querySelector('meta[name="viewport"]');viewport&&this.fixViewportForSmallScreens_(viewport,config);var blockCount=document.getElementById("blockCounter");blockCount&&!this.enableShowBlockCount&&(blockCount.style.display="none"),this.setIconsFromSkin(config.skin),config.level.instructionsIcon&&(this.icon=config.skin[config.level.instructionsIcon],this.winIcon=config.skin[config.level.instructionsIcon]),config.showInstructionsWrapper&&config.showInstructionsWrapper((function(){}));var orientationHandler=function orientationHandler(){window.scrollTo(0,0)};window.addEventListener("orientationchange",orientationHandler),orientationHandler(),config.loadAudio&&config.loadAudio(),config.muteBackgroundMusic&&(this.muteBackgroundMusic=config.muteBackgroundMusic),config.unmuteBackgroundMusic&&(this.unmuteBackgroundMusic=config.unmuteBackgroundMusic),this.editCode&&this.handleEditCode_(config),this.isUsingBlockly()?this.handleUsingBlockly_(config):utils.fireResizeEvent(),this.alertIfAbusiveProject(),this.alertIfProfaneOrPrivacyViolatingProject(),this.startIFrameEmbeddedApp=this.startIFrameEmbeddedApp.bind(this,config),config.shareWarningInfo&&!config.level.iframeEmbed&&showWarnings(config),this.initProjectTemplateWorkspaceIconCallout(),this.alertIfCompletedWhilePairing(config),"en_us"!==config.locale&&"letters"===config.skinId&&this.displayWorkspaceAlert("error",_react.default.createElement("div",null,_locale.default.englishOnlyWarning({nextStage:config.lessonPosition+1}))),window.addEventListener("resize",this.onResize.bind(this)),window.addEventListener(_VisualizationResizeBar.RESIZE_VISUALIZATION_EVENT,(function(e){_this2.resizeVisualization(e.detail)})),this.reset(!0),this.setIdealBlockNumber_(),this.isUsingBlockly()&&(Blockly.mainBlockSpaceEditor.addUnusedBlocksHelpListener((function(e){utils.showUnusedBlockQtip(e.target)})),this.changeListener=Blockly.mainBlockSpaceEditor.addChangeListener(_lodash.default.bind((function(){this.updateBlockCount()}),this)),config.level.openFunctionDefinition&&this.openFunctionDefinition_(config));var hideIcon=utils.valueOr(config.skin.hideIconInClearPuzzle,!1),clearPuzzleHeader=document.getElementById("clear-puzzle-header");if(clearPuzzleHeader&&dom.addClickTouchEvent(clearPuzzleHeader,function(){this.feedback_.showClearPuzzleConfirmation(hideIcon,function(){this.handleClearPuzzle(config)}.bind(this))}.bind(this)),this.initVersionHistoryUI(config),this.isUsingBlockly()&&Blockly.contractEditor&&Blockly.contractEditor.registerTestsFailedOnCloseHandler(function(){return this.feedback_.showSimpleDialog({headerText:void 0,bodyText:_locale.default.examplesFailedOnClose(),cancelText:_locale.default.ignore(),confirmText:_locale.default.tryAgain(),onConfirm:null,onCancel:function onCancel(){Blockly.contractEditor.hideIfOpen()}}),!0}.bind(this)),config.legacyShareStyle&&config.hideSource&&this.setupLegacyShareView(),config.isChallengeLevel){var startDialogDiv=document.createElement("div");document.body.appendChild(startDialogDiv);var progress=(0,_redux.getStore)().getState().progress,isComplete=progress.levelResults[progress.currentLevelId]>=_constants.TestResults.MINIMUM_OPTIMAL_RESULT;_reactDom.default.render(_react.default.createElement(_ChallengeDialog.default,{isOpen:!0,avatar:this.icon||this.skin.staticAvatar,handleCancel:function handleCancel(){_this2.skipLevel()},cancelButtonLabel:_locale.default.challengeLevelSkip(),complete:isComplete,isIntro:!0,primaryButtonLabel:_locale.default.challengeLevelStart(),text:_locale.default.challengeLevelIntro(),title:_locale.default.challengeLevelTitle()}),startDialogDiv)}config.readonlyWorkspace||this.addChangeHandler(this.editDuringRunAlertHandler.bind(this));var url=new URL(document.URL),params=new URLSearchParams(url.search);params.get("reset")&&(params.delete("reset"),url.search=params.toString(),this.handleClearPuzzle.bind(this,config)().then(_project.default.save(!0)).then(window.location.replace(url.toString())));this.emit("afterInit")},StudioApp.prototype.editDuringRunAlertHandler=function(){var _this3=this;if(this.isRunning()&&this.getCode().trim()!==this.executingCode.trim()&&void 0===this.editDuringRunAlert&&((0,_redux.getStore)().dispatch((0,_runState.setIsEditWhileRun)(!0)),this.clearHighlighting(),this.showEditDuringRunAlert&&(this.showEditDuringRunAlert=null===utils.tryGetLocalStorage("hideEditDuringRunAlert",null)),this.showEditDuringRunAlert)){this.editDuringRunAlert=this.displayWorkspaceAlert("warning",_react.default.createElement("div",{},_locale.default.editDuringRunMessage()),!0,(function onClose(){utils.trySetLocalStorage("hideEditDuringRunAlert",!0),_this3.editDuringRunAlert=void 0,_this3.showEditDuringRunAlert=!1}))}},StudioApp.prototype.initProjectTemplateWorkspaceIconCallout=function(){(0,_redux.getStore)().getState().pageConstants.showProjectTemplateWorkspaceIcon&&setTimeout((function(){requestAnimationFrame((function(){(0,_callouts.addCallouts)([{id:"projectTemplateWorkspaceIconCallout",element_id:".projectTemplateWorkspaceIcon:visible",localized_text:_locale.default.workspaceProjectTemplateLevel(),qtip_config:{position:{my:"top center",at:"bottom center"}}}])}))}),0)},StudioApp.prototype.alertIfCompletedWhilePairing=function(config){config.level.isNavigator&&(config.level.pairingDriver?this.displayWorkspaceAlert("warning",_react.default.createElement("div",null,_locale.default.pairingNavigatorWarning({driver:config.level.pairingDriver})," ",config.level.pairingAttempt&&_react.default.createElement("a",{href:config.level.pairingAttempt},_locale.default.pairingNavigatorLink()),config.level.pairingChannelId&&_react.default.createElement("a",{href:_project.default.getPathName("view",config.level.pairingChannelId)},_locale.default.pairingNavigatorLink()))):this.displayWorkspaceAlert("warning",_react.default.createElement("div",null,_locale.default.pairingNavigatorUnknownDriver())))},StudioApp.prototype.getVersionHistoryHandler=function(config){var _this4=this;return function(){var contentDiv=document.createElement("div"),dialog=_this4.createModalDialog({contentDiv,defaultBtnSelector:"again-button",id:"showVersionsModal"});_reactDom.default.render(_react.default.createElement(_VersionHistory.default,{handleClearPuzzle:_this4.handleClearPuzzle.bind(_this4,config),isProjectTemplateLevel:!!config.level.projectTemplateLevelName,useFilesApi:!!config.useFilesApi,selectedVersion:(0,_utils2.queryParams)("version"),isReadOnly:!!config.readonlyWorkspace}),contentDiv),dialog.show()}},StudioApp.prototype.initTimeSpent=function(){this.milestoneStartTime=(new Date).getTime(),this.debouncedSilentlyReport=_lodash.default.debounce(this.silentlyReport.bind(this),1e3)},StudioApp.prototype.initVersionHistoryUI=function(config){var versionsHeader=document.getElementById("versions-header");versionsHeader&&dom.addClickTouchEvent(versionsHeader,this.getVersionHistoryHandler(config))},StudioApp.prototype.startIFrameEmbeddedApp=function(config,onTooYoung){this.share&&config.shareWarningInfo?(config.shareWarningInfo.onTooYoung=onTooYoung,showWarnings(config)):this.runButtonClick()},StudioApp.prototype.setupLegacyShareView=function(){var vizContainer=document.createElement("div");vizContainer.id="visualizationContainer";var vizColumn=document.getElementById("visualizationColumn");dom.isMobile()&&(0,_jquery.default)(vizContainer).width((0,_jquery.default)(vizColumn).width()),(0,_jquery.default)(vizContainer).append(vizColumn.children);var phoneFrameScreen=document.createElement("div");phoneFrameScreen.id="phoneFrameScreen",(0,_jquery.default)(phoneFrameScreen).append(vizContainer),(0,_jquery.default)(vizColumn).append(phoneFrameScreen),this.renderShareFooter_(phoneFrameScreen),dom.isMobile&&(0,_jquery.default)(window).resize(this.scaleLegacyShare),this.scaleLegacyShare()},StudioApp.prototype.scaleLegacyShare=function(){var vizContainer=document.getElementById("visualizationContainer"),vizColumn=document.getElementById("visualizationColumn"),phoneFrameScreen=document.getElementById("phoneFrameScreen"),vizWidth=(0,_jquery.default)(vizContainer).width();if(dom.isMobile()){var _document$documentEle=document.documentElement,clientHeight=_document$documentEle.clientHeight,clientWidth=_document$documentEle.clientWidth,screenWidth=Math.min(clientHeight,clientWidth),screenHeight=Math.max(clientWidth,clientHeight),newWidth=Math.max(screenWidth,(0,_jquery.default)(phoneFrameScreen).width()),newHeight=Math.max(screenHeight,(0,_jquery.default)(phoneFrameScreen).height());(0,_jquery.default)(phoneFrameScreen).width(newWidth),(0,_jquery.default)(phoneFrameScreen).height(newHeight),(0,_jquery.default)(vizColumn).width(newWidth)}var scale=(0,_jquery.default)(phoneFrameScreen).width()/vizWidth;1!==scale&&(!function applyTransformOrigin(element,origin){element.style.transformOrigin=origin,element.style.msTransformOrigin=origin,element.style.webkitTransformOrigin=origin}(vizContainer,"left top"),applyTransformScale(vizContainer,"scale("+scale+")"))},StudioApp.prototype.getCode=function(opt_showHidden){return this.editCode?this.hideSource?this.startBlocks_:this.editor.getValue():Blockly.getWorkspaceCode(opt_showHidden)},StudioApp.prototype.setIconsFromSkin=function(skin){this.icon=skin.staticAvatar,this.winIcon=skin.winAvatar,this.failureIcon=skin.failureAvatar},StudioApp.prototype.handleClearPuzzle=function(config){var promise;if(this.isUsingBlockly())Blockly.functionEditor&&Blockly.functionEditor.hideIfOpen(),Blockly.mainBlockSpace.clear(),this.setStartBlocks_(config,!1),config.level.openFunctionDefinition&&this.openFunctionDefinition_(config);else if(this.editCode){var resetValue="";config.level.startBlocks&&(resetValue=config.level.startBlocks.replace(/\r\n/g,"\n")),this.editor.getValue(),this.editor.setValue(resetValue),_annotationList.default.clearRuntimeAnnotations()}return config.afterClearPuzzle&&(promise=config.afterClearPuzzle(config)),promise||(promise=new Promise((function(resolve,reject){resolve()}))),promise},StudioApp.prototype.isUsingBlockly=function(){return this.usingBlockly_},StudioApp.prototype.handleSharing_=function(options){var belowVisualization=document.getElementById("belowVisualization");if(dom.isMobile()){var sliderCell=document.getElementById("slider-cell");if(sliderCell&&(sliderCell.style.display="none"),belowVisualization){var visualization=document.getElementById("visualization");belowVisualization.style.display="none",visualization.style.marginBottom="0px"}}var upSale=document.createElement("div");options.makeYourOwn?(upSale.innerHTML=__webpack_require__("./src/templates/makeYourOwn.html.ejs")({data:{makeUrl:options.makeUrl,makeString:options.makeString,makeImage:options.makeImage}}),this.noPadding&&(upSale.style.marginLeft="10px"),belowVisualization.appendChild(upSale)):void 0===options.makeYourOwn&&(upSale.innerHTML=__webpack_require__("./src/templates/learn.html.ejs")({assetUrl:this.assetUrl}),belowVisualization.appendChild(upSale))},StudioApp.prototype.renderShareFooter_=function(container){var footerDiv=document.createElement("div");footerDiv.setAttribute("id","footerDiv"),container.appendChild(footerDiv);var reactProps={i18nDropdown:"",privacyPolicyInBase:!1,copyrightInBase:!1,copyrightStrings,baseMoreMenuString:_locale.default.builtOnCodeStudio(),baseStyle:{paddingLeft:0,width:(0,_jquery.default)("#visualization").width()},className:"dark",menuItems:makeFooterMenuItems(),phoneFooter:!0,channel:_project.default.getCurrentId()};_reactDom.default.render(_react.default.createElement(_SmallFooter.default,reactProps),footerDiv)},StudioApp.prototype.assetUrl_=function(path){if(void 0===this.BASE_URL)throw new Error("StudioApp BASE_URL has not been set. Call configure() first");return this.BASE_URL+path},StudioApp.prototype.reset=function(shouldPlayOpeningAnimation){},StudioApp.prototype.runButtonClick=function(){},StudioApp.prototype.addChangeHandler=function(newHandler){this.changeHandlers||(this.changeHandlers=[]),this.changeHandlers.push(newHandler)},StudioApp.prototype.runChangeHandlers=function(e){this.changeHandlers&&this.changeHandlers.forEach((function(handler){return handler(e)}))},StudioApp.prototype.setupChangeHandlers=function(){var runAllHandlers=this.runChangeHandlers.bind(this);this.isUsingBlockly()?(Blockly.addChangeListener(Blockly.mainBlockSpace,runAllHandlers),Blockly.getHiddenDefinitionWorkspace()&&Blockly.addChangeListener(Blockly.getHiddenDefinitionWorkspace(),runAllHandlers)):(this.editor.on("change",runAllHandlers),this.editor.aceEditor.on("change",runAllHandlers))},StudioApp.prototype.toggleRunReset=function(button){var showRun="run"===button;if("run"!==button&&"reset"!==button)throw"Unexpected input";(0,_redux.getStore)().dispatch((0,_runState.setIsRunning)(!showRun)),showRun?(void 0!==this.editDuringRunAlert&&(this.closeAlert(this.editDuringRunAlert),this.editDuringRunAlert=void 0),(0,_redux.getStore)().dispatch((0,_runState.setIsEditWhileRun)(!1))):this.executingCode=this.getCode().trim(),this.hasContainedLevels&&(0,_codeStudioLevels.lockContainedLevelAnswers)();var run=document.getElementById("runButton");run&&(run.style.display=showRun&&!this.config.alwaysHideRunButton?"inline-block":"none",run.disabled=!showRun);var reset=document.getElementById("resetButton");reset&&(reset.style.display=showRun?"none":"inline-block",reset.disabled=showRun),this.isUsingBlockly()&&!this.config.readonlyWorkspace&&(showRun&&"craft"===this.config.app?(0,_jquery.default)("#codeWorkspace > .blocklySvg").css("background-color","#A1A1A1"):showRun?(0,_jquery.default)("#codeWorkspace > .blocklySvg").css("background-color",_color2.white):"craft"===this.config.app?(0,_jquery.default)("#codeWorkspace > .blocklySvg").css("background-color","#7D7D7D"):(0,_jquery.default)("#codeWorkspace > .blocklySvg").css("background-color",_color2.workspace_running_background)),(0,_redux.getStore)().dispatch((0,_arrowDisplayRedux.setArrowButtonDisabled)(showRun))},StudioApp.prototype.isRunning=function(){return(0,_redux.getStore)().getState().runState.isRunning},StudioApp.prototype.registerAudio=function(audioConfig){_Sounds.default.getSingleton().register(audioConfig)},StudioApp.prototype.loadAudio=function(filenames,name){_Sounds.default.getSingleton().registerByFilenamesAndID(filenames,name)},StudioApp.prototype.playAudio=function(name,options){if(!(options&&options.noOverlap&&_Sounds.default.getSingleton().isPlaying(name))){options=options||{};var newOptions=utils.extend({volume:.5},options);_Sounds.default.getSingleton().play(name,newOptions)}},StudioApp.prototype.playAudioOnWin=function(){this.hasContainedLevels?this.playAudio((0,_containedLevels.getValidatedResult)()?"win":"failure"):this.playAudio("win")},StudioApp.prototype.playAudioOnFailure=function(){this.hasContainedLevels?this.playAudio((0,_containedLevels.getValidatedResult)()?"win":"failure"):this.playAudio("failure")},StudioApp.prototype.stopLoopingAudio=function(name){_Sounds.default.getSingleton().stopLoopingAudio(name)},StudioApp.prototype.inject=function(div,options){var defaults={assetUrl:this.assetUrl,rtl:options.isBlocklyRtl,toolbox:document.getElementById("toolbox"),trashcan:!0,customSimpleDialog:this.feedback_.showSimpleDialog.bind(this.feedback_)};_experiments.default.isEnabled("zelos")?options.renderer=_constants2.Renderers.ZELOS:_experiments.default.isEnabled("geras")&&(options.renderer=_constants2.Renderers.GERAS),Blockly.inject(div,utils.extend(defaults,options),_Sounds.default.getSingleton())},StudioApp.prototype.showNextHint=function(){return this.authoredHintsController_.showNextHint()},StudioApp.prototype.initReadonly=function(options){Blockly.inject(document.getElementById("codeWorkspace"),{assetUrl:this.assetUrl,readOnly:!0,rtl:(0,_redux.getStore)().getState().isRtl,scrollbars:!1}),this.loadBlocks(options.blocks)},StudioApp.prototype.loadBlocks=function(source,hiddenDefinitions){Blockly.cdoUtils.loadBlocksToWorkspace(Blockly.mainBlockSpace,source,hiddenDefinitions)},StudioApp.prototype.arrangeBlockPosition=function(startBlocks,arrangement){var type,xmlChild,xml=(0,_xml.parseElement)(startBlocks),xmlChildNodes=xml.childNodes||[];arrangement=arrangement||{};for(var i=0;i=230?(0,_jquery.default)("#soft-buttons").removeClass("soft-buttons-compact"):oldVizWidth>230&&newVizWidth<=230&&(0,_jquery.default)("#soft-buttons").addClass("soft-buttons-compact");var smallFooter=document.querySelector("#page-small-footer .small-footer-base");smallFooter&&(smallFooter.style.maxWidth=newVizWidthString),utils.fireResizeEvent()}}},StudioApp.prototype.resizeToolboxHeader=function(){var toolboxWidth=0;if(this.editCode&&this.editor&&this.editor.session){var isRtl=(0,_redux.getStore)().getState().isRtl,categories=document.querySelector(".droplet-palette-wrapper");isRtl&&(categories.style.zIndex=this.editor.session.paletteEnabled?"inherit":"0"),this.editor.session.paletteEnabled&&(toolboxWidth=categories.getBoundingClientRect().width)}else this.isUsingBlockly()&&(toolboxWidth=Blockly.cdoUtils.getToolboxWidth());document.getElementById("toolbox-header").style.width=toolboxWidth+"px"},StudioApp.prototype.highlight=function(id,spotlight){if(this.isUsingBlockly()&&!(0,_redux2.isEditWhileRun)((0,_redux.getStore)().getState())){if(id){var m=id.match(/^block_id_(\d+)$/);m&&(id=m[1])}Blockly.mainBlockSpace.highlightBlock(id,spotlight)}},StudioApp.prototype.clearHighlighting=function(){this.isUsingBlockly()?this.highlight(null):this.editCode&&this.editor&&codegen.clearDropletAceHighlighting(this.editor,!0)},StudioApp.prototype.displayFeedback=function(options){if(options.level.edit_blocks&&(options.feedbackType=_constants.TestResults.EDIT_BLOCKS),_experiments.default.isEnabled(_experiments.default.BUBBLE_DIALOG)){(0,_trackEvent.default)("experiment","Feedback bubbleDialog","AppType ".concat(this.config.app,". Level ").concat(this.config.serverLevelId));var response=options.response,preventDialog=options.preventDialog,feedbackType=options.feedbackType,feedbackImage=options.feedbackImage;if({turtle:!0,karel:!0,maze:!0,studio:!0,flappy:!0,bounce:!0}[this.config.app]&&!this.hasContainedLevels){var store=(0,_redux.getStore)(),generatedCodeProperties=this.feedback_.getGeneratedCodeProperties(this.config.appStrings),studentCode={message:generatedCodeProperties.shortMessage,code:generatedCodeProperties.code},canShare=!this.disableSocialShare&&!options.disableSocialShare;if(store.dispatch((0,_feedback2.setFeedbackData)({isChallenge:this.config.isChallengeLevel,isPerfect:feedbackType>=_constants.TestResults.MINIMUM_OPTIMAL_RESULT,blocksUsed:this.feedback_.getNumCountableBlocks(),displayFunometer:response&&response.puzzle_ratings_enabled,studentCode,feedbackImage:canShare&&feedbackImage})),store.dispatch((0,_feedback2.setAchievements)((0,_achievements.default)(store.getState()))),this.shouldDisplayFeedbackDialog_(preventDialog,feedbackType))return store.dispatch((0,_feedback2.showFeedback)()),void this.onFeedback(options)}}options.onContinue=this.onContinue,options.backToPreviousLevel=this.backToPreviousLevel,options.isUS=this.isUS,options.channelId=_project.default.getCurrentId();try{options.shareLink=options.response&&options.response.level_source||_project.default.getShareUrl()}catch(e){}if(options.useDialog=this.shouldDisplayFeedbackDialog_(options.preventDialog,options.feedbackType),options.useDialog)this.feedback_.displayFeedback(options,this.requiredBlocks_,this.maxRequiredBlocksToFlag_,this.recommendedBlocks_,this.maxRecommendedBlocksToFlag_);else{var missingBlockHints=this.feedback_.getMissingBlockHints(this.requiredBlocks_.concat(this.recommendedBlocks_),options.level.isK1);this.displayMissingBlockHints(missingBlockHints);var message=this.feedback_.getFeedbackMessage(options),isFailure=options.feedbackType<_constants.TestResults.MINIMUM_PASS_RESULT;(0,_redux.getStore)().dispatch((0,_instructions.setFeedback)({message,isFailure}))}this.config&&this.config.level.hintPromptAttemptsThreshold&&this.authoredHintsController_.considerShowingOnetimeHintPrompt(),this.onFeedback(options)},StudioApp.prototype.shouldDisplayFeedbackDialog_=function(preventDialog,feedbackType){return!preventDialog&&(!!(0,_redux.getStore)().getState().pageConstants.noInstructionsWhenCollapsed||this.feedback_.canContinueToNextLevel(feedbackType))},StudioApp.prototype.getTestResults=function(levelComplete,options){return this.feedback_.getTestResults(levelComplete,this.requiredBlocks_,this.recommendedBlocks_,this.checkForEmptyBlocks_,options)},StudioApp.prototype.report=function(options){this.hasReported=!0;var currentTime=(new Date).getTime(),idleTimeSinceLastReport=(0,_studioAppActivity.getIdleTimeSinceLastReport)((0,_redux.getStore)().getState().studioAppActivity),report=Object.assign({},options,{pass:this.feedback_.canContinueToNextLevel(options.testResult),time:currentTime-this.initTime,timeSinceLastMilestone:currentTime-this.milestoneStartTime-idleTimeSinceLastReport,attempt:this.attempts,lines:this.feedback_.getNumBlocksUsed()});this.milestoneStartTime=currentTime,(0,_redux.getStore)().dispatch((0,_studioAppActivity.resetIdleTime)()),this.lastTestResult=options.testResult;var readOnly=(0,_redux.getStore)().getState().pageConstants.isReadOnlyWorkspace;this.hideSource&&this.share||readOnly||this.onAttempt(report)},StudioApp.prototype.clearAndAttachRuntimeAnnotations=function(){if(this.editCode&&!this.hideSource){var session=this.editor.aceEditor.getSession();_annotationList.default.attachToSession(session,this.editor),_annotationList.default.clearRuntimeAnnotations(),this.editor.aceEditor.session.on("change",(function(){_annotationList.default.clearRuntimeAnnotations()}))}},StudioApp.prototype.silentlyReport=function(){var level=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.level.id,options={app:(0,_redux.getStore)().getState().pageConstants.appType,level,skipSuccessCallback:!0};(0,_redux.getStore)().getState().pageConstants.channelId&&(options.testResult=_constants.TestResults.LEVEL_STARTED),this.report(options),this.hasReported=!1},StudioApp.prototype.resetButtonClick=function(){this.onResetPressed(),this.hasReported||this.debouncedSilentlyReport(),this.hasReported=!1,this.toggleRunReset("run"),this.clearHighlighting(),(0,_redux.getStore)().dispatch((0,_instructions.setFeedback)(null)),this.isUsingBlockly()&&(Blockly.mainBlockSpaceEditor.setEnableToolbox(!0),Blockly.mainBlockSpace.traceOn(!1)),this.reset(!1)},StudioApp.prototype.updateBlockCount=function(){var element=document.getElementById("blockUsed");element&&(this.IDEAL_BLOCK_NUM0},(0,_jquery.default)(window).on("prepareforcallout",function(e,options){if(options.dropletPaletteCategory){this.editor.changePaletteGroup(options.dropletPaletteCategory);var scrollContainer=(0,_jquery.default)(".droplet-palette-scroller"),scrollTo=(0,_jquery.default)(options.selector);scrollTo.length>0&&scrollContainer.scrollTop(scrollTo.offset().top-scrollContainer.offset().top+scrollContainer.scrollTop())}else if(options.codeString){var range=this.editor.aceEditor.find(options.codeString,{caseSensitive:!0,range:null,preventScroll:!0});if(range){var lineIndex=range.start.row,line=lineIndex+1;this.currentlyUsingBlocks()?(options.selector='.droplet-gutter-line:textEquals("'+line+'")',this.setDropletCursorToLine_(lineIndex),this.editor.scrollCursorIntoPosition(),this.editor.redrawGutter()):(options.selector='.ace_gutter-cell:textEquals("'+line+'")',this.editor.aceEditor.scrollToLine(lineIndex),this.editor.aceEditor.renderer.updateFull(!0))}}}.bind(this)),(0,_jquery.default)(document).on("keydown",(function(event){if(event.keyCode===_constants.KeyCodes.BACKSPACE){var d=event.srcElement||event.target;("INPUT"===d.tagName.toUpperCase()&&("TEXT"===d.type.toUpperCase()||"PASSWORD"===d.type.toUpperCase()||"FILE"===d.type.toUpperCase()||"EMAIL"===d.type.toUpperCase()||"SEARCH"===d.type.toUpperCase()||"NUMBER"===d.type.toUpperCase()||"DATE"===d.type.toUpperCase())||"TEXTAREA"===d.tagName.toUpperCase()?d.readOnly||d.disabled:!d.isContentEditable)&&event.preventDefault()}})),this.instructionsDialog&&this.instructionsDialog.focus(),config.afterEditorReady&&config.afterEditorReady(),config.afterInject&&config.afterInject()}},StudioApp.prototype.enableBreakpoints=function(){if(!this.editor)throw new Error("Droplet editor must be in use to enable breakpoints.");this.editor.on("guttermousedown",function(e){var activeBreakpoint=this.editor.getBreakpoints()[e.line];activeBreakpoint?this.editor.clearBreakpoint(e.line):this.editor.setBreakpoint(e.line);var currentUser=(0,_redux.getStore)().getState().currentUser,userType=currentUser&¤tUser.userType;_firehose.default.putRecord({study:"droplet-breakpoints",study_group:userType,event:"guttermousedown",data_json:JSON.stringify({levelId:this.config.serverLevelId,lineNumber:e.line,activeBreakpoint,projectLevelId:this.config.serverProjectLevelId,scriptId:this.config.scriptId,scriptName:this.config.scriptName,studentUserId:(0,_utils2.queryParams)("user_id"),url:window.location.toString()})},{includeUserId:!0})}.bind(this))},StudioApp.prototype.validateCodeChanged=function(){var level=this.config.level;return!level.validationEnabled||_project.default.isCurrentCodeDifferent(level.startBlocks)},StudioApp.prototype.setCheckForEmptyBlocks=function(checkBlocks){this.checkForEmptyBlocks_=checkBlocks},StudioApp.prototype.setStartBlocks_=function(config,loadLastAttempt){config.level.edit_blocks&&(loadLastAttempt=!1);var startBlocks=config.level.startBlocks||"",startHiddenDefinitions=void 0;loadLastAttempt&&"Jigsaw"!==config.levelGameName&&(startBlocks=config.level.lastAttempt||startBlocks,startHiddenDefinitions=config.level.hiddenDefinitions),(0,_constants2.stringIsXml)(startBlocks)&&(config.forceInsertTopBlock&&(startBlocks=blockUtils.forceInsertTopBlock(startBlocks,config.forceInsertTopBlock)),config.level.sharedFunctions&&(startBlocks=blockUtils.appendNewFunctions(startBlocks,config.level.sharedFunctions)),startBlocks=this.arrangeBlockPosition(startBlocks,config.blockArrangement));try{this.loadBlocks(startBlocks,startHiddenDefinitions)}catch(e){if(!loadLastAttempt)throw e;try{Blockly.mainBlockSpace.clear(),this.setStartBlocks_(config,!1)}catch(otherException){throw e}}},StudioApp.prototype.openFunctionDefinition_=function(config){Blockly.contractEditor?Blockly.contractEditor.autoOpenWithLevelConfiguration({autoOpenFunction:config.level.openFunctionDefinition,contractCollapse:config.level.contractCollapse,contractHighlight:config.level.contractHighlight,examplesCollapse:config.level.examplesCollapse,examplesHighlight:config.level.examplesHighlight,definitionCollapse:config.level.definitionCollapse,definitionHighlight:config.level.definitionHighlight}):Blockly.functionEditor.autoOpenFunction(config.level.openFunctionDefinition)},StudioApp.prototype.handleUsingBlockly_=function(config){if(config.level.edit_blocks&&(this.checkForEmptyBlocks_=!1,"required_blocks"!==config.level.edit_blocks&&config.level.edit_blocks!==_constants.TOOLBOX_EDIT_MODE&&"recommended_blocks"!==config.level.edit_blocks||(config.forceInsertTopBlock=null)),config.level.toolbox){var toolboxWithoutWhitespace=config.level.toolbox.replace(/\s/g,"");""!==toolboxWithoutWhitespace&&""!==toolboxWithoutWhitespace||(config.level.toolbox=void 0)}var div=document.getElementById("codeWorkspace"),options={toolbox:config.level.toolbox,disableIfElseEditing:utils.valueOr(config.level.disableIfElseEditing,!1),disableParamEditing:utils.valueOr(config.level.disableParamEditing,!0),disableVariableEditing:utils.valueOr(config.level.disableVariableEditing,!1),disableProcedureAutopopulate:utils.valueOr(config.level.disableProcedureAutopopulate,!1),topLevelProcedureAutopopulate:utils.valueOr(config.level.topLevelProcedureAutopopulate,!1),useModalFunctionEditor:config.level.edit_blocks!==_constants.TOOLBOX_EDIT_MODE&&!!config.level.useModalFunctionEditor,useContractEditor:utils.valueOr(config.level.useContractEditor,!1),disableExamples:utils.valueOr(config.level.disableExamples,!1),defaultNumExampleBlocks:utils.valueOr(config.level.defaultNumExampleBlocks,2),scrollbars:config.level.scrollbars,hasVerticalScrollbars:config.hasVerticalScrollbars,hasHorizontalScrollbars:config.hasHorizontalScrollbars||_experiments.default.isEnabled("horizontalScroll"),editBlocks:utils.valueOr(config.level.edit_blocks,!1),showUnusedBlocks:utils.valueOr(config.showUnusedBlocks,!0),readOnly:utils.valueOr(config.readonlyWorkspace,!1),showExampleTestButtons:utils.valueOr(config.showExampleTestButtons,!1),valueTypeTabShapeMap:utils.valueOr(config.valueTypeTabShapeMap,{}),typeHints:utils.valueOr(config.level.showTypeHints,!1),isBlocklyRtl:(0,_redux.getStore)().getState().isRtl&&"Jigsaw"!==config.levelGameName};options.editBlocks&&(options.showUnusedBlocks=!1,options.disableProcedureAutopopulate=options.editBlocks===_constants.TOOLBOX_EDIT_MODE),["trashcan","varsInGlobals","grayOutUndeletableBlocks","disableParamEditing"].forEach((function(prop){void 0!==config[prop]&&(options[prop]=config[prop])})),this.inject(div,options),this.onResize(),this.setupChangeHandlers(),config.afterInject&&config.afterInject(),this.setStartBlocks_(config,!0),_userAgentParser.default.isMobile()&&_userAgentParser.default.isSafari()&&window.setTimeout((function(){return Blockly.fireUiEvent(window,"resize")}),500)},StudioApp.prototype.onDropletToggle=function(autoFocus){autoFocus=utils.valueOr(autoFocus,!0),this.currentlyUsingBlocks()||(autoFocus&&this.editor.aceEditor.focus(),this.dropletTooltipManager.registerDropletTextModeHandlers(this.editor))},StudioApp.prototype.hasExtraTopBlocks=function(){return this.feedback_.hasExtraTopBlocks()},StudioApp.prototype.hasUnwantedExtraTopBlocks=function(){return this.hasExtraTopBlocks()&&!Blockly.showUnusedBlocks},StudioApp.prototype.hasQuestionMarksInNumberField=function(){return this.feedback_.hasQuestionMarksInNumberField()},StudioApp.prototype.hasUnfilledFunctionalBlock=function(){return!!this.getUnfilledFunctionalBlock()},StudioApp.prototype.getUnfilledFunctionalBlock=function(){return this.getFilteredUnfilledFunctionalBlock_((function(rootBlock){return"functional_example"!==rootBlock.type}))},StudioApp.prototype.getUnfilledFunctionalExample=function(){return this.getFilteredUnfilledFunctionalBlock_((function(rootBlock){if("functional_example"!==rootBlock.type)return!1;var actual=rootBlock.getInputTargetBlock("ACTUAL");return actual&&actual.getFieldValue("NAME")}))},StudioApp.prototype.getFilteredUnfilledFunctionalBlock_=function(filter){var unfilledBlock;return Blockly.mainBlockSpace.getAllUsedBlocks().some((function(block){var rootBlock=block.getRootBlock();return!!filter(rootBlock)&&(block.hasUnfilledFunctionalInput()?(unfilledBlock=block,!0):void 0)})),unfilledBlock},StudioApp.prototype.getFunctionWithoutTwoExamples=function(){var definitionWithLessThanTwoExamples,definitionNames=Blockly.mainBlockSpace.getTopBlocks().filter((function(block){return"functional_definition"===block.type&&!block.isVariable()})).map((function(definitionBlock){return definitionBlock.getProcedureInfo().name})),exampleNames=Blockly.mainBlockSpace.getTopBlocks().filter((function(block){if("functional_example"!==block.type)return!1;var actual=block.getInputTargetBlock("ACTUAL");return actual&&actual.getFieldValue("NAME")})).map((function(exampleBlock){return exampleBlock.getInputTargetBlock("ACTUAL").getFieldValue("NAME")}));return definitionNames.forEach((function(def){exampleNames.filter((function(example){return def===example})).length<2&&(definitionWithLessThanTwoExamples=def)})),definitionWithLessThanTwoExamples},StudioApp.prototype.getUnfilledFunctionalBlockError=function(topLevelType){var unfilled=this.getUnfilledFunctionalBlock();if(!unfilled)return null;for(var topParent=unfilled;topParent.getParent();)topParent=topParent.getParent();if(unfilled.type===topLevelType)return _locale.default.emptyTopLevelBlock({topLevelBlockName:unfilled.getFieldValue()});if("functional_definition"!==topParent.type)return _locale.default.emptyFunctionalBlock();var procedureInfo=topParent.getProcedureInfo();return topParent.isVariable()?_locale.default.emptyBlockInVariable({name:procedureInfo.name}):_locale.default.emptyBlockInFunction({name:procedureInfo.name})},StudioApp.prototype.checkForFailingExamples=function(failureChecker){var failingBlockName="";return Blockly.mainBlockSpace.findFunctionExamples().forEach((function(exampleBlock){var failure=failureChecker(exampleBlock,!1);Blockly.contractEditor.updateExampleResult(exampleBlock,failure),failure&&(failingBlockName=exampleBlock.getInputTargetBlock("ACTUAL").getFieldValue("NAME"))})),failingBlockName},StudioApp.prototype.hasEmptyFunctionOrVariableName=function(){return Blockly.mainBlockSpace.getTopBlocks().some((function(block){return"functional_definition"===block.type&&!block.getProcedureInfo().name}))},StudioApp.prototype.createCoordinateGridBackground=function(options){for(var bbox,text,rect,svgName=options.svg,origin=options.origin,firstLabel=options.firstLabel,lastLabel=options.lastLabel,increment=options.increment,svg=document.getElementById(svgName),label=firstLabel;label<=lastLabel;label+=increment)(text=document.createElementNS("http://www.w3.org/2000/svg","text")).appendChild(document.createTextNode(label)),svg.appendChild(text),bbox=text.getBBox(),text.setAttribute("x",label-origin-bbox.width/2),text.setAttribute("y",400),text.setAttribute("font-weight","bold"),(rect=rectFromElementBoundingBox(text)).setAttribute("fill",_color.default.white),svg.insertBefore(rect,text),(text=document.createElementNS("http://www.w3.org/2000/svg","text")).appendChild(document.createTextNode(label)),svg.appendChild(text),bbox=text.getBBox(),text.setAttribute("x",0),text.setAttribute("y",400-(label-origin)),text.setAttribute("dominant-baseline","central"),text.setAttribute("font-weight","bold"),(rect=rectFromElementBoundingBox(text)).setAttribute("fill",_color.default.white),svg.insertBefore(rect,text)},StudioApp.prototype.displayWorkspaceAlert=function(type,alertContents){var _this6=this,bottom=arguments.length>2&&void 0!==arguments[2]&&arguments[2],_onClose=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};(0,_redux.getStore)().dispatch((0,_projectRedux.closeWorkspaceAlert)());var parent=(0,_jquery.default)(bottom&&this.editCode?"#codeTextbox":"#codeWorkspace"),container=(0,_jquery.default)("
");parent.append(container);var workspaceAlert=_react.default.createElement(_WorkspaceAlert.default,{type,onClose:function onClose(){_onClose(),_this6.closeAlert(container[0])},isBlockly:this.usingBlockly_,displayBottom:bottom},alertContents);return _reactDom.default.render(workspaceAlert,container[0]),container[0]},StudioApp.prototype.displayPlayspaceAlert=function(type,alertContents){var _this7=this,parent=(0,_jquery.default)("#visualization"),container=parent.children(".react-alert");0===container.length&&(container=(0,_jquery.default)("
").css({position:"absolute",left:0,right:0,top:0,zIndex:1e3,transform:"scale(1.0)"}),parent.append(container));var renderElement=container[0],alertProps={onClose:function onClose(){return _this7.closeAlert(renderElement)},type};type===_constants.NOTIFICATION_ALERT_TYPE?(alertProps.closeDelayMillis=5e3,alertProps.childPadding="8px 14px"):alertProps.sideMargin=20;var playspaceAlert=_react.default.createElement(_alert.default,alertProps,alertContents);_reactDom.default.render(playspaceAlert,renderElement)},StudioApp.prototype.closeAlert=function(alert){_reactDom.default.unmountComponentAtNode(alert)},StudioApp.prototype.alertIfAbusiveProject=function(){_project.default.exceedsAbuseThreshold()&&this.displayWorkspaceAlert("error",_react.default.createElement(_AbuseError.default,{i18n:{tos:_locale.default.tosLong({url:"http://code.org/tos"}),contact_us:_locale.default.contactUs({url:"https://support.code.org/hc/en-us/requests/new?&description=".concat(encodeURIComponent("Abuse error for project at url: ".concat(window.location.toString())))})}}))},StudioApp.prototype.alertIfProfaneOrPrivacyViolatingProject=function(){_project.default.hasPrivacyProfanityViolation()&&this.displayWorkspaceAlert("error",_react.default.createElement(_AbuseError.default,{i18n:{tos:_locale.default.policyViolation(),contact_us:_locale.default.contactUs({url:"https://support.code.org/hc/en-us/requests/new?&description=".concat(encodeURIComponent("Abuse error for project at url: ".concat(window.location.toString())))})}}))},StudioApp.prototype.hasDuplicateVariablesInForLoops=function(){return!this.editCode&&Blockly.mainBlockSpace.getAllUsedBlocks().some(this.forLoopHasDuplicatedNestedVariables_)},StudioApp.prototype.forLoopHasDuplicatedNestedVariables_=function(block){if(block&&("controls_for"===block.type||"controls_for_counter"===block.type)){var innerBlock=block.getInput("DO").connection.targetBlock();return innerBlock&&Blockly.Variables.allVariablesFromBlock(block).some((function(varName){return innerBlock.getDescendants().some((function(descendant){return("controls_for"===descendant.type||"controls_for_counter"===descendant.type)&&-1!==Blockly.Variables.allVariablesFromBlock(descendant).indexOf(varName)}))}))}},StudioApp.prototype.polishGeneratedCodeString=function(code){return this.polishCodeHook?this.polishCodeHook(code):code},StudioApp.prototype.isResponsiveFromConfig=function(config){var isWorkspaceView=!config.hideSource;return config.embed||isWorkspaceView},StudioApp.prototype.displayNotStartedBanner=function(config){return!config.hasContainedLevels&&!config.level.isProjectLevel&&(config.readonlyWorkspace&&!config.level.isStarted)},StudioApp.prototype.setPageConstants=function(config,appSpecificConstants){var level=config.level,combined=_lodash.default.assign({exampleSolutions:config.exampleSolutions,isViewingAsInstructorInTraining:config.isViewingAsInstructorInTraining,hasBackgroundMusic:level.levelTracks&&0!==level.levelTracks.length,canHaveFeedbackReviewState:config.canHaveFeedbackReviewState,ttsShortInstructionsUrl:level.ttsShortInstructionsUrl,ttsLongInstructionsUrl:level.ttsLongInstructionsUrl,skinId:config.skinId,showNextHint:this.showNextHint.bind(this),locale:config.locale,assetUrl:this.assetUrl,inStartBlocksMode:level.edit_blocks===_constants.START_BLOCKS,isReadOnlyWorkspace:!!config.readonlyWorkspace,isDroplet:!!level.editCode,isBlockly:this.isUsingBlockly(),isBramble:config.app&&"weblab"===config.app,hideSource:!!config.hideSource,isChallengeLevel:!!config.isChallengeLevel,isEmbedView:!!config.embed,isResponsive:this.isResponsiveFromConfig(config),displayNotStartedBanner:this.displayNotStartedBanner(config),displayOldVersionBanner:!!(0,_utils2.queryParams)("version"),isShareView:!!config.share,pinWorkspaceToBottom:!!config.pinWorkspaceToBottom,noInstructionsWhenCollapsed:!!config.noInstructionsWhenCollapsed,hasContainedLevels:config.hasContainedLevels,puzzleNumber:level.puzzle_number,lessonTotal:level.lesson_total,noVisualization:!1,visualizationInWorkspace:!1,smallStaticAvatar:config.skin.smallStaticAvatar,failureAvatar:config.skin.failureAvatar,aniGifURL:config.level.aniGifURL,inputOutputTable:config.level.inputOutputTable,is13Plus:config.is13Plus,isSignedIn:config.isSignedIn,userId:config.userId,textToSpeechEnabled:config.textToSpeechEnabled,isK1:config.level.isK1,appType:config.app,nextLevelUrl:config.nextLevelUrl,isProjectTemplateLevel:!!config.level.projectTemplateLevelName&&!config.level.isK1,showProjectTemplateWorkspaceIcon:!!config.level.projectTemplateLevelName&&!config.level.isK1&&!config.readonlyWorkspace,serverScriptId:config.serverScriptId,serverLevelId:config.serverLevelId,serverProjectLevelId:config.serverProjectLevelId,codeOwnersName:config.codeOwnersName},appSpecificConstants);(0,_redux.getStore)().dispatch((0,_pageConstants.setPageConstants)(combined)),config.isInstructor&&(0,_redux.getStore)().dispatch((0,_currentUserRedux.setUserRoleInCourse)(_currentUserRedux.CourseRoles.Instructor));var instructionsConstants=(0,_instructions.determineInstructionsConstants)(config);(0,_redux.getStore)().dispatch((0,_instructions.setInstructionsConstants)(instructionsConstants))},StudioApp.prototype.showRateLimitAlert=function(){if(this.hasSeenRateLimitAlert_)return!1;this.hasSeenRateLimitAlert_=!0;var alert=_react.default.createElement("div",null,_locale.default.dataLimitAlert());this.share?this.displayPlayspaceAlert("error",alert):this.displayWorkspaceAlert("error",alert),_logToCloud.default.addPageAction(_logToCloud.default.PageAction.FirebaseRateLimitExceeded,{isEditing:_project.default.isEditing(),isOwner:_project.default.isOwner(),share:!!this.share})},StudioApp.prototype.loadLibraries=function(){var helperLibraryNames=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.libraryPreload_||(this.libraryPreload_=Promise.all(helperLibraryNames.map(this.loadLibrary_.bind(this)))),this.libraryPreload_},StudioApp.prototype.loadLibrary_=function(){var _ref=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(name){var response;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(!this.libraries[name]){_context.next=2;break}return _context.abrupt("return");case 2:return _context.next=4,fetch("/libraries/"+name);case 4:return response=_context.sent,_context.next=7,response.text();case 7:this.libraries[name]=_context.sent;case 8:case"end":return _context.stop()}}),_callee,this)})));return function(_x){return _ref.apply(this,arguments)}}()},"./src/acemode/annotationList.js":(module,__unused_webpack_exports,__webpack_require__)=>{var aceSession,dropletEditor,errorMapper=__webpack_require__("./src/acemode/errorMapper.js"),lintAnnotations=[],runtimeAnnotations=[];function updateGutter(){aceSession&&(dropletEditor?dropletEditor.setAnnotations(lintAnnotations.concat(runtimeAnnotations)):aceSession.setAnnotations(lintAnnotations.concat(runtimeAnnotations)))}module.exports={detachFromSession:function detachFromSession(){aceSession=null,dropletEditor=null},attachToSession:function attachToSession(session,editor){if(aceSession&&session!==aceSession)throw new Error("Already attached to ace session");aceSession=session,dropletEditor=editor},setJSLintAnnotations:function setJSLintAnnotations(jslintResults,appType){errorMapper.processResults(jslintResults,appType),lintAnnotations=jslintResults.data.slice(),updateGutter()},getJSLintAnnotations:function getJSLintAnnotations(){return lintAnnotations},addRuntimeAnnotation:function addRuntimeAnnotation(level,lineNumber,text){var annotation={row:lineNumber-1,col:0,raw:text,text,type:level.toLowerCase()};runtimeAnnotations.push(annotation),updateGutter()},clearRuntimeAnnotations:function clearRuntimeAnnotations(){0!==runtimeAnnotations.length&&(runtimeAnnotations=[],updateGutter())}}},"./src/acemode/errorMapper.js":module=>{var errorMap=[{original:/Assignment in conditional expression/,replacement:"For conditionals, use the comparison operator (===) to check if two things are equal."},{original:/(.*)\sis defined but never used./,replacement:"$1 is defined, but it's not called in your program."},{original:/(.*)\sis not defined./,replacement:"$1 hasn't been declared yet."},{original:/Expected an identifier and instead saw (.*)\s\(a reserved word\)./,applab_replacement:"$1 is a reserved word in App Lab. Use a different variable name.",gamelab_replacement:"$1 is a reserved word in Game Lab. Use a different variable name."},{original:/'setup' is defined, but it's not called in your program./,replacement:"'setup' is a function that already exists in Game Lab. Consider giving this function a different name."}];module.exports.processResults=function(results,appType){results.data.forEach((function(item){"info"===item.type&&(item.type="warning"),errorMap.forEach((function(errorMapping){var replacement;errorMapping.original.test(item.text)&&(replacement=errorMapping.replacement?errorMapping.replacement:"Applab"===appType?errorMapping.applab_replacement:errorMapping.gamelab_replacement,item.text=item.text.replace(errorMapping.original,replacement))}))}))}},"./src/acemode/mode-javascript_codeorg.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var _dropletUtils=__webpack_require__("./src/dropletUtils.js"),annotationList=__webpack_require__("./src/acemode/annotationList.js");exports.defineForAce=function(dropletConfig,unusedConfig,dropletEditor,appType){ace.define("ace/mode/javascript_codeorg",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/javascript_highlight_rules","ace/worker/worker_client","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/config","ace/lib/net","ace/ext/searchbox"],(function(acerequire,exports,module){var oop=acerequire("ace/lib/oop"),JavaScriptMode=acerequire("ace/mode/javascript").Mode,JavaScriptHighlightRules=acerequire("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,WorkerModule=acerequire("ace/worker/worker_client"),WorkerClient=WorkerModule.WorkerClient;window.Worker||(WorkerClient=WorkerModule.UIWorkerClient,window.Worker=WorkerClient);var MatchingBraceOutdent=acerequire("./matching_brace_outdent").MatchingBraceOutdent,CstyleBehaviour=acerequire("./behaviour/cstyle").CstyleBehaviour,CStyleFoldMode=acerequire("./folding/cstyle").FoldMode,Mode=function Mode(){this.HighlightRules=JavaScriptHighlightRules,this.$outdent=new MatchingBraceOutdent,this.$behaviour=new CstyleBehaviour,this.foldingRules=new CStyleFoldMode};oop.inherits(Mode,JavaScriptMode),function(){this.$highlightRules=new JavaScriptHighlightRules,this.$highlightRules.$keywordList=[],this.createWorker=function(session){var worker=new WorkerClient(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");worker.attachToDocument(session.getDocument());var newOptions={"-W041":!1,eqeqeq:!1,unused:!0,undef:!0,maxerr:1e3,predef:{},exported:{}};return(0,_dropletUtils.getAllAvailableDropletBlocks)(dropletConfig).forEach((function(block){block.block||block.modeOptionName&&"*"===block.modeOptionName[0]||-1!==block.func.indexOf(".")||(newOptions.predef[block.func]=!1)})),dropletConfig.additionalPredefValues&&dropletConfig.additionalPredefValues.forEach((function(val){newOptions.predef[val]=!1})),unusedConfig&&unusedConfig.forEach((function(unusedVar){newOptions.exported[unusedVar]=!1})),annotationList.attachToSession(session,dropletEditor),worker.send("changeOptions",[newOptions]),worker.on("jslint",(function(results){annotationList.setJSLintAnnotations(results,appType)})),worker.on("terminate",(function(){session.clearAnnotations()})),worker},this.cleanup=function(){annotationList.detachFromSession()}}.call(Mode.prototype),exports.Mode=Mode}))}},"./src/achievements.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function getAchievements(state){return POSSIBLE_ACHIEVEMENTS.map((function(possibleAchievement){return possibleAchievement(state)})).filter((function(achievement){return achievement.isAchieved})).sort((function(achievementA,achievementB){return achievementA.isAchieved&&!achievementB.isAchieved?-1:!achievementA.isAchieved&&achievementB.isAchieved?1:0}))},exports.puzzleComplete=puzzleComplete,exports.usingHints=usingHints;var _locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_authoredHintUtils=_interopRequireDefault(__webpack_require__("./src/authoredHintUtils.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var POSSIBLE_ACHIEVEMENTS=[puzzleComplete,usingHints];function puzzleComplete(state){return{isAchieved:!0,message:_locale.default.puzzleCompleted(),successIconUrl:""}}function usingHints(state){var message,isAchieved,hintsUsed=_authoredHintUtils.default.currentOpenedHintCount(state.pageConstants.serverLevelId);return 0===hintsUsed?(message=_locale.default.withoutHints(),isAchieved=!0):1===hintsUsed?(message=_locale.default.usingOneHint(),isAchieved=!0):(message=_locale.default.usingHints(),isAchieved=!1),{isAchieved,message,successIconUrl:"",failureIconUrl:""}}},"./src/aiUtils.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stripSpaceAndSpecial=function stripSpaceAndSpecial(string){return string.replace(/\W/g,"")}},"./src/aichat/locale-do-not-import.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _safeLoadLocale=_interopRequireDefault(__webpack_require__("./src/util/safeLoadLocale.js")),_i18nStringTracker=_interopRequireDefault(__webpack_require__("./src/util/i18nStringTracker.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var locale=(0,_safeLoadLocale.default)("aichat_locale");locale=(0,_i18nStringTracker.default)(locale,"aichat"),module.exports=locale},"./src/applab/DesignModeBox.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_DesignToolbox=_interopRequireDefault(__webpack_require__("./src/applab/DesignToolbox.jsx")),_designProperties=_interopRequireDefault(__webpack_require__("./src/applab/designProperties.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var DesignModeBox=function(_React$Component){function DesignModeBox(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DesignModeBox,_React$Component),DesignModeBox.prototype.render=function render(){var transparencyLayer,styles={container:{position:"absolute",width:"100%",top:30,bottom:0,backgroundColor:_color.default.white,boxSizing:"border-box",borderLeft:"1px solid gray",borderRight:"1px solid gray",borderBottom:"1px solid gray"},designProperties:{position:"absolute",top:0,bottom:0,left:this.props.isToolboxVisible?270:0,right:0,boxSizing:"border-box",padding:10},transparent:{width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.1)",position:"relative",zIndex:1}};return this.props.isDimmed&&(transparencyLayer=_react.default.createElement("div",{id:"design-mode-dimmed",style:styles.transparent})),_react.default.createElement("div",{id:"design-mode-container",style:styles.container},_react.default.createElement(_DesignToolbox.default,{handleDragStart:this.props.handleDragStart,isToolboxVisible:this.props.isToolboxVisible,handleScreenChange:this.props.handleScreenChange,themeValue:this.props.currentTheme}),_react.default.createElement("div",{id:"design-properties",style:styles.designProperties},_react.default.createElement(_designProperties.default,{element:this.props.element,elementIdList:this.props.elementIdList,handleChange:this.props.handleChange,onCopyElementToScreen:this.props.onCopyElementToScreen,onChangeElement:this.props.onChangeElement,onDepthChange:this.props.onDepthChange,onDuplicate:this.props.onDuplicate,onRestoreThemeDefaults:this.props.onRestoreThemeDefaults,onDelete:this.props.onDelete,onInsertEvent:this.props.onInsertEvent,screenIds:this.props.screenIds})),transparencyLayer)},DesignModeBox}(_react.default.Component);exports.default=DesignModeBox,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(DesignModeBox,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement),elementIdList:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,handleChange:_propTypes.default.func.isRequired,handleDragStart:_propTypes.default.func,isDimmed:_propTypes.default.bool.isRequired,isToolboxVisible:_propTypes.default.bool.isRequired,onCopyElementToScreen:_propTypes.default.func.isRequired,onChangeElement:_propTypes.default.func.isRequired,onDelete:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired,onDuplicate:_propTypes.default.func.isRequired,onRestoreThemeDefaults:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired,screenIds:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,currentTheme:_propTypes.default.string.isRequired,handleScreenChange:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/applab/DesignModeHeaders.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_locale2=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_styleConstants=_interopRequireDefault(__webpack_require__("./src/styleConstants.js")),_commonStyles=_interopRequireDefault(__webpack_require__("./src/commonStyles.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_PaneHeader=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/templates/PaneHeader.jsx")),_SettingsCog=_interopRequireDefault(__webpack_require__("./src/lib/ui/SettingsCog.jsx")),_ProjectTemplateWorkspaceIcon=_interopRequireDefault(__webpack_require__("./src/templates/ProjectTemplateWorkspaceIcon.jsx")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DesignModeHeaders=function(_React$Component){function DesignModeHeaders(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"onToggleToolbox",(function(){return _this.props.onToggleToolbox()})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DesignModeHeaders,_React$Component);var _proto=DesignModeHeaders.prototype;return _proto.chevronStyle=function chevronStyle(collapse){var style={display:"inline-block",position:"absolute",padding:0,margin:0,top:0,left:8,border:"none",boxShadow:"none",backgroundColor:"transparent",lineHeight:_styleConstants.default["workspace-headers-height"]+"px",fontSize:18,cursor:"pointer",color:_color.default.neutral_white,":hover":{color:_color.default.neutral_dark20}};return collapse&&(style.transform="scale(-1, 1)"),style},_proto.hideToolboxIcon=function hideToolboxIcon(){return _react.default.createElement("button",{className:"hide-toolbox-icon",type:"button",style:[_commonStyles.default.hidden,this.chevronStyle(!0)],onClick:this.onToggleToolbox},_react.default.createElement("i",{className:"fa fa-chevron-circle-right"}))},_proto.showToolboxIcon=function showToolboxIcon(){return _react.default.createElement("button",{type:"button",style:[_commonStyles.default.hidden,this.chevronStyle(!1)],className:"show-toolbox-icon"},_react.default.createElement("i",{className:"fa fa-chevron-circle-right"}))},_proto.render=function render(){var styles={toolboxHeader:{display:this.props.isToolboxVisible?"flex":"none",justifyContent:"space-between",width:270,borderRight:"1px solid gray",float:"left"},showToolboxHeader:{float:"left",display:this.props.isToolboxVisible?"none":"flex",justifyContent:"space-between",paddingLeft:10},showToolboxClickable:{marginLeft:18,":hover":{color:_color.default.white}},iconContainer:{float:"right",marginRight:10,marginLeft:10,height:"100%"},assetsIcon:{fontSize:18,verticalAlign:"middle"},runningVersionHistoryButton:{color:_color.default.dark_charcoal}},hasFocus=!this.props.isRunning,settingsCog=_react.default.createElement(_SettingsCog.default,{isRunning:this.props.isRunning,showMakerToggle:this.props.showMakerToggle,runModeIndicators:!0,autogenerateML:this.props.autogenerateML});return _react.default.createElement(_PaneHeader.default,{id:"design-headers",dir:this.props.isRtl?"rtl":"ltr",hasFocus,style:{color:"white"}},_react.default.createElement(_PaneHeader.PaneSection,{id:"design-toolbox-header",className:(0,_classnames.default)("workspace-header",this.props.isRunning&&"is-running"),style:styles.toolboxHeader},_react.default.createElement("span",null,this.hideToolboxIcon()),_react.default.createElement("span",null,_locale.default.designToolboxHeader()),_react.default.createElement("span",null,settingsCog)),_react.default.createElement(_PaneHeader.PaneSection,{className:(0,_classnames.default)("workspace-header",this.props.isRunning&&"is-running"),style:styles.showToolboxHeader},_react.default.createElement("span",{key:"show-toolbox-clickable",className:"workspace-header-clickable",style:styles.showToolboxClickable,onClick:this.onToggleToolbox},this.showToolboxIcon()),_react.default.createElement("span",null,_locale2.default.showToolbox()),_react.default.createElement("span",null,settingsCog)),_react.default.createElement(_PaneHeader.PaneButton,{id:"design-mode-versions-header",style:this.props.isRunning?styles.runningVersionHistoryButton:{},iconClass:"fa fa-clock-o",label:_locale2.default.showVersionsHeader(),headerHasFocus:hasFocus,isRtl:this.props.isRtl,onClick:this.props.handleVersionHistory}),_react.default.createElement(_PaneHeader.PaneSection,{id:"design-workspace-header",className:(0,_classnames.default)("workspace-header",this.props.isRunning&&"is-running")},this.props.showProjectTemplateWorkspaceIcon&&_react.default.createElement(_ProjectTemplateWorkspaceIcon.default,null),_react.default.createElement("span",null,_locale.default.designWorkspaceHeader())))},DesignModeHeaders}(_react.default.Component);exports.default=DesignModeHeaders,_defineProperty(DesignModeHeaders,"propTypes",{handleVersionHistory:_propTypes.default.func.isRequired,onToggleToolbox:_propTypes.default.func.isRequired,isToolboxVisible:_propTypes.default.bool.isRequired,showProjectTemplateWorkspaceIcon:_propTypes.default.bool.isRequired,isRtl:_propTypes.default.bool.isRequired,isRunning:_propTypes.default.bool.isRequired,showMakerToggle:_propTypes.default.bool.isRequired,autogenerateML:_propTypes.default.func}),module.exports=exports.default},"./src/applab/DesignToolbox.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_DesignToolboxElement=_interopRequireDefault(__webpack_require__("./src/applab/DesignToolboxElement.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_ThemeDropdown=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ThemeDropdown.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var IMAGE_BASE_URL="/blockly/media/applab/design_toolbox/",DesignToolbox=function(_React$Component){function DesignToolbox(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DesignToolbox,_React$Component),DesignToolbox.prototype.render=function render(){var toolboxStyle={display:this.props.isToolboxVisible?"block":"none",position:"absolute",top:0,bottom:0,width:270,boxSizing:"border-box",borderRight:"1px solid gray",overflowY:"auto",padding:10,paddingRight:0};return _react.default.createElement("div",{id:"design-toolbox",style:toolboxStyle},_react.default.createElement(_ThemeDropdown.default,{initialValue:this.props.themeValue,handleChange:this.props.handleScreenChange.bind(this,"theme"),description:_locale.default.designElementTheme(),key:this.props.themeValue}),_react.default.createElement("p",null,_locale.default.designToolboxDescription()),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"button.png",desc:_locale.default.designElement_button(),elementType:"BUTTON",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"input.png",desc:_locale.default.designElement_textInput(),elementType:"TEXT_INPUT",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"label.png",desc:_locale.default.designElement_label(),elementType:"LABEL",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"dropdown.png",desc:_locale.default.designElement_dropdown(),elementType:"DROPDOWN",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"radio.png",desc:_locale.default.designElement_radioButton(),elementType:"RADIO_BUTTON",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"checkbox.png",desc:_locale.default.designElement_checkbox(),elementType:"CHECKBOX",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"image.png",desc:_locale.default.designElement_image(),elementType:"IMAGE",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"canvas.png",desc:_locale.default.designElement_canvas(),elementType:"CANVAS",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"screen.png",desc:_locale.default.designElement_screen(),elementType:"SCREEN",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"textarea.png",desc:_locale.default.designElement_textArea(),elementType:"TEXT_AREA",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"chart.png",desc:_locale.default.designElement_chart(),elementType:"CHART",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"slider.png",desc:_locale.default.designElement_slider(),elementType:"SLIDER",handleDragStart:this.props.handleDragStart}),_react.default.createElement(_DesignToolboxElement.default,{imageUrl:IMAGE_BASE_URL+"camera.png",desc:_locale.default.designElement_photoSelect(),elementType:"PHOTO_SELECT",handleDragStart:this.props.handleDragStart}))},DesignToolbox}(_react.default.Component);exports.default=DesignToolbox,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(DesignToolbox,"propTypes",{handleDragStart:_propTypes.default.func.isRequired,isToolboxVisible:_propTypes.default.bool.isRequired,handleScreenChange:_propTypes.default.func.isRequired,themeValue:_propTypes.default.string.isRequired}),module.exports=exports.default},"./src/applab/DesignToolboxElement.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var DesignToolboxElement=function(_React$Component){function DesignToolboxElement(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DesignToolboxElement,_React$Component);var _proto=DesignToolboxElement.prototype;return _proto.render=function render(){var styles={outerContainer:{width:120,display:"inline-block",textAlign:"center",paddingBottom:15},innerContainer:{textAlign:"center",cursor:"grab"},image:{marginBottom:5}};return _react.default.createElement("div",{style:styles.outerContainer},_react.default.createElement("div",{style:styles.innerContainer,"data-element-type":this.props.elementType,className:"new-design-element"},_react.default.createElement("img",{src:this.props.imageUrl,className:"design-element-image",style:styles.image,alt:this.props.desc}),_react.default.createElement("div",null,this.props.desc)))},_proto.componentDidMount=function componentDidMount(){this.makeDraggable()},_proto.componentDidUpdate=function componentDidUpdate(){this.makeDraggable()},_proto.makeDraggable=function makeDraggable(){(0,_jquery.default)(_reactDom.default.findDOMNode(this)).find(".new-design-element").draggable({helper:function helper(event){var elementType=this.getAttribute("data-element-type");if(elementType===_library.default.ElementType.SCREEN)return(0,_jquery.default)(this).clone();var element=_library.default.createElement(elementType,0,0,!0);element.style.position="static";var div=document.getElementById("designModeViz"),xScale=div.getBoundingClientRect().width/div.offsetWidth,yScale=div.getBoundingClientRect().height/div.offsetHeight,parent=(0,_jquery.default)("
").addClass("draggingParent");parent[0].style.transform="scale("+xScale+", "+yScale+")",parent[0].style.webkitTransform="scale("+xScale+", "+yScale+")",parent[0].style.backgroundColor="transparent";var elementWidth=(0,_jquery.default)(element).width()||parseInt(element.getAttribute("width"),10),elementHeight=(0,_jquery.default)(element).height()||parseInt(element.getAttribute("height"),10),offsetY=event.offsetY||event.pageY-(0,_jquery.default)(event.target).offset().top;return(0,_jquery.default)(this).draggable("option","cursorAt",{left:elementWidth/2,top:Math.min(offsetY,elementHeight)}),parent.append(element)[0]},containment:"document",appendTo:"#codeApp",revert:"invalid",zIndex:2,start:this.props.handleDragStart})},DesignToolboxElement}(_react.default.Component);exports.default=DesignToolboxElement,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(DesignToolboxElement,"propTypes",{imageUrl:_propTypes.default.string.isRequired,desc:_propTypes.default.string.isRequired,elementType:_propTypes.default.string.isRequired,handleDragStart:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/applab/DesignWorkspace.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_DesignModeBox=_interopRequireDefault(__webpack_require__("./src/applab/DesignModeBox.jsx")),_DesignModeHeaders=_interopRequireDefault(__webpack_require__("./src/applab/DesignModeHeaders.jsx")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DesignWorkspace=function(_React$Component){function DesignWorkspace(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{isToolboxVisible:!0}),_defineProperty(_assertThisInitialized(_this),"onToggleToolbox",(function(){return _this.setState({isToolboxVisible:!_this.state.isToolboxVisible})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DesignWorkspace,_React$Component),DesignWorkspace.prototype.render=function render(){return _react.default.createElement("div",{id:"designWorkspaceWrapper"},_react.default.createElement(_DesignModeHeaders.default,{handleVersionHistory:this.props.handleVersionHistory,onToggleToolbox:this.onToggleToolbox,isToolboxVisible:this.state.isToolboxVisible,showProjectTemplateWorkspaceIcon:this.props.showProjectTemplateWorkspaceIcon,isRtl:this.props.isRtl,isRunning:this.props.isRunning,showMakerToggle:this.props.showMakerToggle,autogenerateML:this.props.autogenerateML}),_react.default.createElement(_DesignModeBox.default,{element:this.props.element,elementIdList:this.props.elementIdList,handleChange:this.props.handleChange,handleDragStart:this.props.handleDragStart,isDimmed:this.props.isDimmed,isToolboxVisible:this.state.isToolboxVisible,onCopyElementToScreen:this.props.onCopyElementToScreen,onChangeElement:this.props.onChangeElement,onDelete:this.props.onDelete,onDepthChange:this.props.onDepthChange,onDuplicate:this.props.onDuplicate,onRestoreThemeDefaults:this.props.onRestoreThemeDefaults,onInsertEvent:this.props.onInsertEvent,screenIds:this.props.screenIds,currentTheme:this.props.currentTheme,handleScreenChange:this.props.handleScreenChange}))},DesignWorkspace}(_react.default.Component);_defineProperty(DesignWorkspace,"propTypes",{handleVersionHistory:_propTypes.default.func.isRequired,handleDragStart:_propTypes.default.func,element:_propTypes.default.instanceOf(HTMLElement),elementIdList:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,handleChange:_propTypes.default.func.isRequired,onCopyElementToScreen:_propTypes.default.func.isRequired,onChangeElement:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired,onDuplicate:_propTypes.default.func.isRequired,onRestoreThemeDefaults:_propTypes.default.func.isRequired,onDelete:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired,isDimmed:_propTypes.default.bool.isRequired,screenIds:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,currentTheme:_propTypes.default.string.isRequired,handleScreenChange:_propTypes.default.func.isRequired,autogenerateML:_propTypes.default.func,showProjectTemplateWorkspaceIcon:_propTypes.default.bool.isRequired,isRunning:_propTypes.default.bool.isRequired,isRtl:_propTypes.default.bool.isRequired,showMakerToggle:_propTypes.default.bool});var _default=(0,_reactRedux.connect)((function(state){return{showProjectTemplateWorkspaceIcon:!!state.pageConstants.showProjectTemplateWorkspaceIcon,isRtl:state.isRtl,isRunning:!!state.runState.isRunning,showMakerToggle:!!state.pageConstants.showMakerToggle}}))(DesignWorkspace);exports.default=_default,module.exports=exports.default},"./src/applab/ElementSelect.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ElementSelect=function(_React$Component){function ElementSelect(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleChange",(function(e){var element=elementUtils.getPrefixedElementById(e.target.value);_this.props.onChangeElement(element,null)})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ElementSelect,_React$Component),ElementSelect.prototype.render=function render(){var selected=elementUtils.getId(this.props.selected);return _react.default.createElement("div",{style:{float:"right",marginRight:"-10px"}},_react.default.createElement("select",{value:selected,onChange:this.handleChange,style:{width:"150px"}},this.props.elementIdList.map((function(id){return _react.default.createElement("option",{key:id},id)}))))},ElementSelect}(_react.default.Component);exports.default=ElementSelect,_defineProperty(ElementSelect,"propTypes",{onChangeElement:_propTypes.default.func.isRequired,elementIdList:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,selected:_propTypes.default.instanceOf(HTMLElement)}),module.exports=exports.default},"./src/applab/ExternalRedirectDialog.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedExternalRedirectDialog=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_Dialog=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/templates/Dialog.jsx")),_DialogFooter=_interopRequireDefault(__webpack_require__("./src/templates/teacherDashboard/DialogFooter.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_applab=__webpack_require__("./src/applab/redux/applab.js"),_urlHelpers=__webpack_require__("./src/lib/util/urlHelpers.js"),_constants=__webpack_require__("./src/constants.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ExternalRedirectDialog=function(_React$Component){function ExternalRedirectDialog(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ExternalRedirectDialog,_React$Component);var _proto=ExternalRedirectDialog.prototype;return _proto.handleRedirect=function handleRedirect(url){window.open(url,"_blank","noopener,noreferrer"),this.props.handleClose()},_proto.render=function render(){var title,body,footer,_this=this;if(!(this.props.redirects&&this.props.redirects.length>0))return null;var response=this.props.redirects[0].response,url=this.props.redirects[0].url;return response===_applab.REDIRECT_RESPONSE.APPROVED?(title=_locale.default.redirectTitle(),body=_react.default.createElement("div",null,_react.default.createElement("h2",{style:styles.title},_locale.default.redirectConfirmation()),_react.default.createElement("p",{style:styles.url},url),_react.default.createElement("p",null,_locale.default.redirectExplanation(),_react.default.createElement("span",null,_react.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:(0,_urlHelpers.studio)("/report_abuse")},_locale.default.reportAbuse())))),footer=_react.default.createElement(_DialogFooter.default,null,_react.default.createElement(_Button.default,{onClick:this.props.handleClose,text:_locale.default.goBack(),color:_Button.default.ButtonColor.gray,style:{margin:0}}),_react.default.createElement(_Button.default,{onClick:function onClick(){return _this.handleRedirect(url)},text:_locale.default.continue(),color:_Button.default.ButtonColor.brandSecondaryDefault,style:{margin:0}}))):(response===_applab.REDIRECT_RESPONSE.UNSUPPORTED?(title=_locale.default.redirectUnsupportedTitle(),body=_react.default.createElement("p",null,_locale.default.redirectUnsupportedExplanation())):(title=_locale.default.redirectRejectTitle(),body=_react.default.createElement("p",null,_locale.default.redirectRejectExplanation())),footer=_react.default.createElement(_DialogFooter.default,{rightAlign:!0},_react.default.createElement(_Button.default,{__useDeprecatedTag:!0,onClick:this.props.handleClose,text:_locale.default.dialogOK(),color:_Button.default.ButtonColor.gray}))),_react.default.createElement(_Dialog.default,{title,fullWidth:window.innerWidth<_constants.BASE_DIALOG_WIDTH,isOpen:!0,handleClose:this.props.handleClose},_react.default.createElement(_Dialog.Body,null,body,footer))},ExternalRedirectDialog}(_react.default.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ExternalRedirectDialog,"propTypes",{handleClose:_propTypes.default.func,redirects:_propTypes.default.array});var styles={title:{display:"inline",wordWrap:"break-word"},url:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",maxWidth:"100%",wordWrap:"break-word",maxHeight:"140px"}},UnconnectedExternalRedirectDialog=ExternalRedirectDialog;exports.UnconnectedExternalRedirectDialog=UnconnectedExternalRedirectDialog;var _default=(0,_reactRedux.connect)((function(state){return{redirects:state.redirectDisplay}}),(function(dispatch){return{handleClose:function handleClose(){dispatch(_applab.actions.dismissRedirectNotice())}}}))(UnconnectedExternalRedirectDialog);exports.default=_default},"./src/applab/ExternalRedirectDialog.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnsupportedSite=exports.RejectedSite=exports.ApprovedSite=void 0;var _react=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js")),_ExternalRedirectDialog=__webpack_require__("./src/applab/ExternalRedirectDialog.jsx"),_applab=__webpack_require__("./src/applab/redux/applab.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ImportProjectDialog=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_Dialog=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/templates/Dialog.jsx")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_screens=__webpack_require__("./src/applab/redux/screens.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WhileFetching=exports.OnOpen=exports.ErrorFetching=void 0;var _react=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js")),_ImportProjectDialog=__webpack_require__("./src/applab/ImportProjectDialog.jsx"),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function autogenerateML(modelId){return new Promise((function(resolve,reject){_jquery.default.ajax({url:"/api/v1/ml_models/".concat(modelId),method:"GET"}).then((function(modelData){return function generateCodeDesignElements(modelId,modelData){var x=20,y=0,SPACER_PIXELS=18,modelClass="ml_model_"+modelId;(0,_jquery.default)("."+modelClass).each((function(index,element){(0,_jquery.default)(element.parentNode).is(".ui-resizable")&&(element=element.parentNode),element.remove()})),_designMode.default.onInsertEvent("var data = {};");var inputFields=[];modelData.features.forEach((function(feature){y+=SPACER_PIXELS;var fieldId,label=_designMode.default.createElement("LABEL",x,y),alphaNumFeature=(0,_aiUtils.stripSpaceAndSpecial)(feature.id);if(label.id="design_"+alphaNumFeature+"_label",label.className=modelClass,label.style.width="300px",y+=SPACER_PIXELS,feature.values){label.textContent=feature.id+":",fieldId=alphaNumFeature+"_dropdown";var select=_designMode.default.createElement("DROPDOWN",x,y);select.id="design_"+fieldId,select.className=modelClass,select.options.remove(0),select.options.remove(0),feature.values.forEach((function(option){var optionElement=document.createElement("option");optionElement.text=option,select.options.add(optionElement)})),y+=SPACER_PIXELS}else{label.textContent=feature.id;var input=_designMode.default.createElement("TEXT_INPUT",x,y),min=feature.min.toFixed(2),max=feature.max.toFixed(2),maxMinPlaceholder="min: ".concat(+min,", max: ").concat(+max);_designMode.default.updateProperty(input,"placeholder",maxMinPlaceholder),fieldId=alphaNumFeature+"_input",input.id="design_"+fieldId,input.className=modelClass,y+=SPACER_PIXELS}var addFeature='addPair(data, "'.concat(alphaNumFeature,'", getText("').concat(fieldId,'"));');inputFields.push(addFeature)})),y+=2*SPACER_PIXELS;var label=_designMode.default.createElement("LABEL",x,y);label.textContent=modelData.labelColumn;var alphaNumModelName=(0,_aiUtils.stripSpaceAndSpecial)(modelData.name);label.id="design_"+alphaNumModelName+"_label",label.className=modelClass,label.style.width="300px";var predictionId=alphaNumModelName+"_prediction",predictButton=_designMode.default.createElement("BUTTON",x,y);predictButton.textContent="Predict";var predictButtonId=alphaNumModelName+"_predict";_designMode.default.updateProperty(predictButton,"id",predictButtonId),predictButton.className=modelClass;var predictOnClick='onEvent("'.concat(predictButtonId,'", "click", function() {\n ').concat(inputFields.join("\n\t\t"),'\n setText("').concat(predictionId,"\", '');\n getPrediction(\"").concat(modelData.name,'", "').concat(modelId,'", data, function(value) {\n setText("').concat(predictionId,'", value);\n });\n });');y+=2.5*SPACER_PIXELS;var prediction=_designMode.default.createElement("TEXT_INPUT",x,y);prediction.id="design_"+predictionId,prediction.className=modelClass,prediction.readOnly=!0,_designMode.default.onInsertAICode(predictOnClick)}(modelId,modelData),resolve()})).fail((function(jqXhr,status){return alert({message:"An error occurred"})}))}))};var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_aiUtils=__webpack_require__("./src/aiUtils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports.default},"./src/applab/constants.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ABSOLUTE_REGEXP",{enumerable:!0,get:function get(){return _assetPrefix.ABSOLUTE_REGEXP}}),exports.CLASSIC_THEME_INDEX=exports.CAPTURE_TICK_COUNT=exports.ApplabInterfaceMode=exports.APP_WIDTH=exports.APP_HEIGHT=exports.ANIMATION_LENGTH_MS=void 0,Object.defineProperty(exports,"DATA_URL_PREFIX_REGEX",{enumerable:!0,get:function get(){return _assetPrefix.DATA_URL_PREFIX_REGEX}}),exports.FOOTER_HEIGHT=exports.DESIGN_ELEMENT_ID_PREFIX=exports.DEFAULT_THEME_INDEX=void 0,Object.defineProperty(exports,"ICON_PREFIX",{enumerable:!0,get:function get(){return _assetPrefix.ICON_PREFIX}}),Object.defineProperty(exports,"ICON_PREFIX_REGEX",{enumerable:!0,get:function get(){return _assetPrefix.ICON_PREFIX_REGEX}}),exports.themeOptionsForSelect=exports.themeOptions=exports.getAppWidth=exports.fontFamilyStyles=exports.fontFamilyOptions=exports.defaultFontSizeStyle=exports.WIDGET_WIDTH=exports.NEW_SCREEN=exports.IMPORT_SCREEN=void 0;var utils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/utils.js")),_assetPrefix=__webpack_require__("./src/assetManagement/assetPrefix.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}exports.FOOTER_HEIGHT=30;exports.APP_WIDTH=320;exports.WIDGET_WIDTH=600;exports.getAppWidth=function getAppWidth(config){return null!=config&&config.widgetMode?600:320};exports.APP_HEIGHT=480;exports.DESIGN_ELEMENT_ID_PREFIX="design_";exports.NEW_SCREEN="New screen...";var ApplabInterfaceMode=utils.makeEnum("CODE","DESIGN","DATA");exports.ApplabInterfaceMode=ApplabInterfaceMode;exports.ANIMATION_LENGTH_MS=200;exports.IMPORT_SCREEN="Import screen...";exports.CAPTURE_TICK_COUNT=300;exports.defaultFontSizeStyle="14px";exports.DEFAULT_THEME_INDEX=0;exports.CLASSIC_THEME_INDEX=1;exports.themeOptions=["default","classic","orange","citrus","ketchupAndMustard","lemonade","forest","watermelon","area51","polar","glowInTheDark","bubblegum","millennial","robot","coralReef","mintChip","lavender","cherryVanilla","berryPatch","cucumber","crushedVelvet","playtime","underTheSea","blueAndGold","blueSteel","darkscheme","twoTone","pastel","peachy"];var THEME_ICON_BASE_URL="/blockly/media/applab/theme_dropdown/",themeOptionsForSelect=[{option:"default",icon:THEME_ICON_BASE_URL+"default.png"},{option:"classic",icon:THEME_ICON_BASE_URL+"classic.png"},{option:"orange",icon:THEME_ICON_BASE_URL+"orange.png"},{option:"citrus",icon:THEME_ICON_BASE_URL+"citrus.png"},{option:"ketchupAndMustard",icon:THEME_ICON_BASE_URL+"ketchup_and_mustard.png"},{option:"lemonade",icon:THEME_ICON_BASE_URL+"lemonade.png"},{option:"forest",icon:THEME_ICON_BASE_URL+"forest.png"},{option:"watermelon",icon:THEME_ICON_BASE_URL+"watermelon.png"},{option:"area51",icon:THEME_ICON_BASE_URL+"area_51.png"},{option:"polar",icon:THEME_ICON_BASE_URL+"polar.png"},{option:"glowInTheDark",icon:THEME_ICON_BASE_URL+"glow_in_the_dark.png"},{option:"bubblegum",icon:THEME_ICON_BASE_URL+"bubblegum.png"},{option:"millennial",icon:THEME_ICON_BASE_URL+"millennial.png"},{option:"robot",icon:THEME_ICON_BASE_URL+"robot.png"},{option:"coralReef",icon:THEME_ICON_BASE_URL+"coral_reef.png"},{option:"mintChip",icon:THEME_ICON_BASE_URL+"mint_chip.png"},{option:"lavender",icon:THEME_ICON_BASE_URL+"lavender.png"},{option:"cherryVanilla",icon:THEME_ICON_BASE_URL+"cherry_vanilla.png"},{option:"berryPatch",icon:THEME_ICON_BASE_URL+"berry_patch.png"},{option:"cucumber",icon:THEME_ICON_BASE_URL+"cucumber.png"},{option:"crushedVelvet",icon:THEME_ICON_BASE_URL+"crushed_velvet.png"},{option:"playtime",icon:THEME_ICON_BASE_URL+"playtime.png"},{option:"underTheSea",icon:THEME_ICON_BASE_URL+"under_the_sea.png"},{option:"blueAndGold",icon:THEME_ICON_BASE_URL+"blue_and_gold.png"},{option:"blueSteel",icon:THEME_ICON_BASE_URL+"blue_steel.png"},{option:"darkscheme",icon:THEME_ICON_BASE_URL+"darkscheme.png"},{option:"twoTone",icon:THEME_ICON_BASE_URL+"two_tone.png"},{option:"pastel",icon:THEME_ICON_BASE_URL+"pastel.png"},{option:"peachy",icon:THEME_ICON_BASE_URL+"peachy.png"}];exports.themeOptionsForSelect=themeOptionsForSelect;var fontFamilyOptions=["Arial","Georgia","Palatino","Times","Courier","Lucida Console","Arial Black","Comic","Impact","Lucida Sans","Tahoma","Trebuchet","Verdana"];exports.fontFamilyOptions=fontFamilyOptions;var fontFamilyStyles=["Arial, Helvetica, sans-serif","Georgia, serif",'"Palatino Linotype", "Book Antiqua", Palatino, serif','"Times New Roman", Times, serif','"Courier New", Courier, monospace','"Lucida Console", Monaco, monospace','"Arial Black", Gadget, sans-serif','"Comic Sans MS", cursive, sans-serif',"Impact, Charcoal, sans-serif",'"Lucida Sans Unicode", "Lucida Grande", sans-serif',"Tahoma, Geneva, sans-serif",'"Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"];if(exports.fontFamilyStyles=fontFamilyStyles,fontFamilyOptions.length!==fontFamilyStyles.length)throw new Error("fontFamilyOptions length must equal fontFamilyStyles length")},"./src/applab/designElements/BooleanPropertyRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var BooleanPropertyRow=function(_React$Component){function BooleanPropertyRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{isChecked:_this.props.initialValue}),_defineProperty(_assertThisInitialized(_this),"handleClick",(function(){var checked=!_this.state.isChecked;_this.props.handleChange(checked),_this.setState({isChecked:checked})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(BooleanPropertyRow,_React$Component),BooleanPropertyRow.prototype.render=function render(){var classes="custom-checkbox fa";return this.state.isChecked?classes+=" fa-check-square-o":classes+=" fa-square-o",_react.default.createElement("div",{style:rowStyle.container},_react.default.createElement("div",{style:rowStyle.description},this.props.desc),_react.default.createElement("div",null,_react.default.createElement("div",{className:classes,style:rowStyle.checkbox,onClick:this.handleClick})))},BooleanPropertyRow}(_react.default.Component);exports.default=BooleanPropertyRow,_defineProperty(BooleanPropertyRow,"propTypes",{initialValue:_propTypes.default.bool.isRequired,handleChange:_propTypes.default.func,desc:_propTypes.default.node}),module.exports=exports.default},"./src/applab/designElements/BorderProperties.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var BorderProperties=function(_React$Component){function BorderProperties(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(BorderProperties,_React$Component),BorderProperties.prototype.render=function render(){var _this$props=this.props,element=_this$props.element,handleBorderWidthChange=_this$props.handleBorderWidthChange,handleBorderColorChange=_this$props.handleBorderColorChange,handleBorderRadiusChange=_this$props.handleBorderRadiusChange;return _react.default.createElement("div",null,_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_borderWidthPx(),isNumber:!0,initialValue:parseInt(element.style.borderWidth,10),handleChange:handleBorderWidthChange}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_borderColor(),initialValue:element.style.borderColor,handleChange:handleBorderColorChange}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_borderRadiusPx(),isNumber:!0,initialValue:parseInt(element.style.borderRadius,10),handleChange:handleBorderRadiusChange}))},BorderProperties}(_react.default.Component);exports.default=BorderProperties,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(BorderProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleBorderWidthChange:_propTypes.default.func.isRequired,handleBorderColorChange:_propTypes.default.func.isRequired,handleBorderRadiusChange:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/applab/designElements/ColorPickerPropertyRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js")),_reactColor=_interopRequireDefault(__webpack_require__("./node_modules/react-color/lib/index.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ColorPickerPropertyRow=function(_React$Component){function ColorPickerPropertyRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{colorPickerText:_this.props.initialValue,displayColorPicker:!1}),_defineProperty(_assertThisInitialized(_this),"handlePageClick",(function(e){if(e.target!==_reactDom.default.findDOMNode(_this.refs.button)){var ref=_this.refs.colorPicker;ref&&!_reactDom.default.findDOMNode(ref).contains(e.target)&&_this.setState({displayColorPicker:!1})}})),_defineProperty(_assertThisInitialized(_this),"handleColorChange",(function(color){1===color.rgb.a?_this.changeElementColor(color.hex):_this.changeElementColor("rgba(".concat(color.rgb.r,",").concat(color.rgb.g,",").concat(color.rgb.b,",").concat(color.rgb.a,")"))})),_defineProperty(_assertThisInitialized(_this),"toggleColorPicker",(function(){_this.setState({displayColorPicker:!_this.state.displayColorPicker})})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ColorPickerPropertyRow,_React$Component);var _proto=ColorPickerPropertyRow.prototype;return _proto.componentDidMount=function componentDidMount(){window.addEventListener("mousedown",this.handlePageClick)},_proto.componentWillUnmount=function componentWillUnmount(){window.removeEventListener("mousedown",this.handlePageClick)},_proto.UNSAFE_componentWillReceiveProps=function UNSAFE_componentWillReceiveProps(nextProps){var initialValue=nextProps.initialValue;this.props.initialValue!==initialValue&&this.setState({colorPickerText:initialValue})},_proto.changeElementColor=function changeElementColor(color){this.props.handleChange(color),this.setState({colorPickerText:color})},_proto.render=function render(){var _this2=this,buttonStyle={backgroundColor:this.state.colorPickerText,verticalAlign:"top"},colorPicker=this.state.displayColorPicker?_react.default.createElement(_reactColor.default,{ref:"colorPicker",color:this.state.colorPickerText,onChangeComplete:this.handleColorChange}):null;return _react.default.createElement("div",{style:rowStyle.container},_react.default.createElement("div",{style:rowStyle.description},this.props.desc),_react.default.createElement("div",null,_react.default.createElement("input",{value:this.state.colorPickerText,onChange:function onChange(e){return _this2.setState({colorPickerText:e.target.value})},onBlur:function onBlur(e){return _this2.changeElementColor(e.target.value)},style:rowStyle.input}),_react.default.createElement("button",{ref:"button",type:"button",className:""===this.state.colorPickerText?"rainbow-gradient":void 0,style:buttonStyle,onClick:this.toggleColorPicker}),colorPicker))},ColorPickerPropertyRow}(_react.default.Component);exports.default=ColorPickerPropertyRow,_defineProperty(ColorPickerPropertyRow,"propTypes",{initialValue:_propTypes.default.string.isRequired,handleChange:_propTypes.default.func,desc:_propTypes.default.node}),module.exports=exports.default},"./src/applab/designElements/CopyElementToScreenButton.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_commonStyles=_interopRequireDefault(__webpack_require__("./src/commonStyles.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_PopUpMenu=_interopRequireDefault(__webpack_require__("./src/lib/ui/PopUpMenu.jsx")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_debounce=_interopRequireDefault(__webpack_require__("./node_modules/lodash/debounce.js")),_copyElementToScreenButtonModule=_interopRequireDefault(__webpack_require__("./src/applab/designElements/copy-element-to-screen-button.module.scss"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DefaultScreenButtonPropertyRow=function(_React$Component){function DefaultScreenButtonPropertyRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleMakeDefault",(function(event){return _this.props.handleChange(!0)})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DefaultScreenButtonPropertyRow,_React$Component),DefaultScreenButtonPropertyRow.prototype.render=function render(){if(elementUtils.getId(elementUtils.getScreens()[0])===this.props.screenId)return!1;var defaultButtonStyle=Object.assign({},{paddingTop:"5px",paddingBottom:"5px",fontSize:"14px"},{backgroundColor:"#0aa",color:_color.default.white});return _react.default.createElement("div",{style:{marginLeft:15}},_react.default.createElement("button",{type:"button",style:defaultButtonStyle,onClick:this.handleMakeDefault},_locale.default.designWorkspace_makeDefaultButton()))},DefaultScreenButtonPropertyRow}(_react.default.Component);exports.default=DefaultScreenButtonPropertyRow,_defineProperty(DefaultScreenButtonPropertyRow,"propTypes",{handleChange:_propTypes.default.func.isRequired,screenId:_propTypes.default.string}),module.exports=exports.default},"./src/applab/designElements/DeleteElementButton.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_commonStyles=_interopRequireDefault(__webpack_require__("./src/commonStyles.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js")),_deleteElementButtonModule=_interopRequireDefault(__webpack_require__("./src/applab/designElements/delete-element-button.module.scss"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DeleteElementButton=function(_React$Component){function DeleteElementButton(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{confirming:!1}),_defineProperty(_assertThisInitialized(_this),"handleDeleteInternal",(function(event){_this.props.shouldConfirm?_this.setState({confirming:!0}):_this.finishDelete()})),_defineProperty(_assertThisInitialized(_this),"finishDelete",(function(){return _this.props.handleDelete()})),_defineProperty(_assertThisInitialized(_this),"abortDelete",(function(event){return _this.setState({confirming:!1})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DeleteElementButton,_React$Component),DeleteElementButton.prototype.render=function render(){return this.state.confirming?_react.default.createElement("div",{className:(0,_classnames.default)(_deleteElementButtonModule.default.right,_deleteElementButtonModule.default.confirming)},_locale.default.deleteConfirm(),_react.default.createElement("button",{type:"button",className:_deleteElementButtonModule.default.red,style:_commonStyles.default.button,onClick:this.finishDelete},_locale.default.yes()),_react.default.createElement("button",{type:"button",style:_commonStyles.default.button,onClick:this.abortDelete},_locale.default.no())):_react.default.createElement("div",null,_react.default.createElement("button",{type:"button",style:_commonStyles.default.button,className:(0,_classnames.default)(_deleteElementButtonModule.default.red,_deleteElementButtonModule.default.right),onClick:this.handleDeleteInternal},_locale.default.delete()))},DeleteElementButton}(_react.default.Component);_defineProperty(DeleteElementButton,"propTypes",{shouldConfirm:_propTypes.default.bool.isRequired,handleDelete:_propTypes.default.func.isRequired});var _default=DeleteElementButton;exports.default=_default,module.exports=exports.default},"./src/applab/designElements/DuplicateElementButton.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_commonStyles=_interopRequireDefault(__webpack_require__("./src/commonStyles.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_duplicateElementButtonModule=_interopRequireDefault(__webpack_require__("./src/applab/designElements/duplicate-element-button.module.scss"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DuplicateElementButton=function(_React$Component){function DuplicateElementButton(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleDuplicate",(function(event){return _this.props.handleDuplicate()})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DuplicateElementButton,_React$Component),DuplicateElementButton.prototype.render=function render(){return _react.default.createElement("div",null,_react.default.createElement("button",{type:"button",className:_duplicateElementButtonModule.default.duplicateButton,style:_commonStyles.default.button,onClick:this.handleDuplicate},_locale.default.duplicate()))},DuplicateElementButton}(_react.default.Component);_defineProperty(DuplicateElementButton,"propTypes",{handleDuplicate:_propTypes.default.func.isRequired});var _default=DuplicateElementButton;exports.default=_default,module.exports=exports.default},"./src/applab/designElements/EnumPropertyRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var EnumPropertyRow=function(_React$Component){function EnumPropertyRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{selectedValue:_this.props.initialValue}),_defineProperty(_assertThisInitialized(_this),"handleChange",(function(event){_this.props.handleChange(event.target.value),_this.setState({selectedValue:event.target.value})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(EnumPropertyRow,_React$Component),EnumPropertyRow.prototype.render=function render(){var _this$props=this.props,options=_this$props.options,_this$props$displayOp=_this$props.displayOptions,displayOptions=void 0===_this$props$displayOp?[]:_this$props$displayOp,desc=_this$props.desc,selectedValue=this.state.selectedValue,renderedOptions=options.map((function(option,index){return _react.default.createElement("option",{key:index,value:option},displayOptions[index]||option)}));return _react.default.createElement("div",{style:this.props.containerStyle||rowStyle.container},_react.default.createElement("div",{style:rowStyle.description},desc),_react.default.createElement("select",{className:"form-control",style:rowStyle.enumInput,value:selectedValue,onChange:this.handleChange},renderedOptions))},EnumPropertyRow}(_react.default.Component);exports.default=EnumPropertyRow,_defineProperty(EnumPropertyRow,"propTypes",{initialValue:_propTypes.default.string.isRequired,displayOptions:_propTypes.default.arrayOf(_propTypes.default.string),options:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,handleChange:_propTypes.default.func.isRequired,desc:_propTypes.default.node,containerStyle:_propTypes.default.object}),module.exports=exports.default},"./src/applab/designElements/EventHeaderRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var EventHeaderRow=function(_React$Component){function EventHeaderRow(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(EventHeaderRow,_React$Component),EventHeaderRow.prototype.render=function render(){var style=Object.assign({},rowStyle.container,rowStyle.maxWidth,{color:_color.default.charcoal});return _react.default.createElement("div",{style},_locale.default.addEventHeader())},EventHeaderRow}(_react.default.Component);exports.default=EventHeaderRow,module.exports=exports.default},"./src/applab/designElements/EventRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var EventRow=function(_React$Component){function EventRow(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(EventRow,_React$Component),EventRow.prototype.render=function render(){var style={container:Object.assign({},rowStyle.container,rowStyle.maxWidth),name:{color:_color.default.dark_charcoal,fontWeight:"bold",fontSize:15},desc:{color:_color.default.light_gray,fontStyle:"italic"}};return _react.default.createElement("div",{style:style.container},_react.default.createElement("div",{style:style.name},this.props.name),_react.default.createElement("div",{style:style.desc},this.props.desc),_react.default.createElement("div",null,_react.default.createElement("a",{onClick:this.props.handleInsert,className:"hover-pointer"},_locale.default.designWorkspace_eventInsertButton())))},EventRow}(_react.default.Component);exports.default=EventRow,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(EventRow,"propTypes",{name:_propTypes.default.string.isRequired,desc:_propTypes.default.string.isRequired,handleInsert:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/applab/designElements/FontFamilyPropertyRow.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_EnumPropertyRow2=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EnumPropertyRow.jsx")),_constants=__webpack_require__("./src/applab/constants.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var FontFamilyPropertyRow=function(_EnumPropertyRow){function FontFamilyPropertyRow(){return _EnumPropertyRow.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(FontFamilyPropertyRow,_EnumPropertyRow),FontFamilyPropertyRow}(_EnumPropertyRow2.default);exports.default=FontFamilyPropertyRow,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(FontFamilyPropertyRow,"defaultProps",{desc:_locale.default.designElementProperty_fontFamily(),initialValue:_constants.fontFamilyOptions[0],options:_constants.fontFamilyOptions}),module.exports=exports.default},"./src/applab/designElements/ImagePickerPropertyRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js")),_redux=__webpack_require__("./src/redux.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ImagePickerPropertyRow=function(_React$Component){function ImagePickerPropertyRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{value:_this.props.initialValue,lastEdit:0}),_defineProperty(_assertThisInitialized(_this),"handleChangeInternal",(function(event){var filename=event.target.value;_this.changeUnlessEditing(filename),_this.setState({value:filename,lastEdit:Date.now()}),setTimeout(function(){this.changeUnlessEditing(this.state.value)}.bind(_assertThisInitialized(_this)),1500)})),_defineProperty(_assertThisInitialized(_this),"handleButtonClick",(function(){dashboard.assets.showAssetManager(_this.changeImage,"image",null,{showUnderageWarning:!(0,_redux.getStore)().getState().pageConstants.is13Plus,elementId:_this.props.elementId,currentValue:_this.state.value,currentImageType:_this.props.currentImageType})})),_defineProperty(_assertThisInitialized(_this),"changeImage",(function(filename,timestamp){_this.props.handleChange(filename,timestamp),_this.isMounted_&&_this.setState({value:filename})})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ImagePickerPropertyRow,_React$Component);var _proto=ImagePickerPropertyRow.prototype;return _proto.componentDidMount=function componentDidMount(){this.isMounted_=!0},_proto.componentWillUnmount=function componentWillUnmount(){this.isMounted_=!1},_proto.changeUnlessEditing=function changeUnlessEditing(filename){Date.now()-this.state.lastEdit>=1500&&this.changeImage(filename)},_proto.render=function render(){return _react.default.createElement("div",{style:rowStyle.container},_react.default.createElement("div",{style:rowStyle.description},this.props.desc),_react.default.createElement("div",null,_react.default.createElement("input",{className:"imagePickerInput",value:this.state.value,onChange:this.handleChangeInternal,style:rowStyle.input})," ",_react.default.createElement("a",{style:rowStyle.link,onClick:this.handleButtonClick},_locale.default.choosePrefix())))},ImagePickerPropertyRow}(_react.default.Component);exports.default=ImagePickerPropertyRow,_defineProperty(ImagePickerPropertyRow,"propTypes",{initialValue:_propTypes.default.string.isRequired,handleChange:_propTypes.default.func,desc:_propTypes.default.node,elementId:_propTypes.default.string,currentImageType:_propTypes.default.string}),module.exports=exports.default},"./src/applab/designElements/OptionsSelectRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var OptionsSelectRow=function(_React$Component){function OptionsSelectRow(props){var _this;_defineProperty(function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(_this=_React$Component.call(this,props)||this),"handleChangeInternal",(function(event){var value=event.target.value,optionList=value.split("\n").filter((function(val){return""!==val}));_this.props.handleChange(optionList),_this.setState({value})}));for(var element=props.element,_value="",i=0;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),rowStyle=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/rowStyle.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),utils=_interopRequireWildcard(__webpack_require__("./src/utils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var LockState=utils.makeEnum("LOCKED","UNLOCKED"),PropertyRow=function(_React$Component){function PropertyRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{value:_this.props.initialValue,isValidValue:!0}),_defineProperty(_assertThisInitialized(_this),"handleChangeInternal",(function(event){var isIdRow=_this.props.isIdRow,value=event.target.value;isIdRow&&(value=value.replace(/\s+/g,""));var isValidValue=!isIdRow||_this.isIdAvailable(value);_this.setValue(value,isValidValue)})),_defineProperty(_assertThisInitialized(_this),"handleClickLock",(function(){_this.props.lockState===LockState.LOCKED?_this.props.handleLockChange(LockState.UNLOCKED):_this.props.lockState===LockState.UNLOCKED&&_this.props.handleLockChange(LockState.LOCKED)})),_defineProperty(_assertThisInitialized(_this),"onIdRowBlur",(function(){if(!_this.state.isValidValue){var value=_this.props.initialValue;_this.setValue(value)}})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PropertyRow,_React$Component);var _proto=PropertyRow.prototype;return _proto.UNSAFE_componentWillReceiveProps=function UNSAFE_componentWillReceiveProps(newProps){this.setState({value:newProps.initialValue,isValidValue:!0})},_proto.isIdAvailable=function isIdAvailable(value){if(value===this.props.initialValue)return!0;return elementUtils.isIdAvailable(value,{allowCodeElements:!0,allowDesignElements:!1,allowDesignPrefix:!1})},_proto.setValue=function setValue(value,isValidValue){isValidValue=utils.valueOr(isValidValue,!0),this.setState({value,isValidValue}),isValidValue&&this.props.handleChange(value)},_proto.render=function render(){var inputElement,idRowStyle=Object.assign({},rowStyle.container,rowStyle.maxWidth,{backgroundColor:_color.default.light_purple,paddingBottom:10}),inputStyle=Object.assign({},rowStyle.input,{backgroundColor:this.state.isValidValue?null:"#ffcccc"});if(this.props.isMultiLine)inputElement=_react.default.createElement("textarea",{value:this.state.value,onChange:this.handleChangeInternal});else{var value=this.state.value;this.props.isNumber&&isNaN(value)&&(value=""),inputElement=_react.default.createElement("input",{type:this.props.isNumber?"number":void 0,value,onChange:this.handleChangeInternal,onBlur:this.props.isIdRow?this.onIdRowBlur:null,style:inputStyle})}var lockIcon;if(this.props.lockState){var lockClass="fa fa-"+(this.props.lockState===LockState.LOCKED?"lock":"unlock");lockIcon=_react.default.createElement("i",{className:lockClass,style:{marginLeft:"5px"},onClick:this.handleClickLock})}return _react.default.createElement("div",{style:this.props.isIdRow?idRowStyle:rowStyle.container},_react.default.createElement("div",{style:rowStyle.description},this.props.desc),_react.default.createElement("div",null,inputElement,lockIcon))},PropertyRow}(_react.default.Component);exports.default=PropertyRow,_defineProperty(PropertyRow,"propTypes",{desc:_propTypes.default.string.isRequired,initialValue:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.number]).isRequired,isNumber:_propTypes.default.bool,lockState:_propTypes.default.oneOf([LockState.LOCKED,LockState.UNLOCKED,void 0]),isMultiLine:_propTypes.default.bool,handleChange:_propTypes.default.func,handleLockChange:_propTypes.default.func,isIdRow:_propTypes.default.bool}),_defineProperty(PropertyRow,"LockState",LockState),module.exports=exports.default},"./src/applab/designElements/RestoreThemeDefaultsButton.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_commonStyles=_interopRequireDefault(__webpack_require__("./src/commonStyles.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_restoreThemeDefaultsButtonModule=_interopRequireDefault(__webpack_require__("./src/applab/designElements/restore-theme-defaults-button.module.scss"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEXT_ALIGNMENT_RIGHT=exports.TEXT_ALIGNMENT_LEFT=exports.TEXT_ALIGNMENT_JUSTIFY=exports.TEXT_ALIGNMENT_CENTER=void 0,exports.default=TextAlignmentPropertyRow;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_EnumPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EnumPropertyRow.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.TEXT_ALIGNMENT_LEFT="left";exports.TEXT_ALIGNMENT_RIGHT="right";exports.TEXT_ALIGNMENT_CENTER="center";exports.TEXT_ALIGNMENT_JUSTIFY="justify";var TEXT_ALIGNMENTS=["left","right","center","justify"];function TextAlignmentPropertyRow(props){return _react.default.createElement(_EnumPropertyRow.default,{desc:_locale.default.designElementProperty_textAlignment(),initialValue:props.initialValue,options:TEXT_ALIGNMENTS,displayOptions:TEXT_ALIGNMENTS.map((function(textAlignment){return _locale.default["designElementProperty_textAlignment_".concat(textAlignment)]()})),handleChange:props.handleChange})}TextAlignmentPropertyRow.propTypes={initialValue:_propTypes.default.string,handleChange:_propTypes.default.func.isRequired}},"./src/applab/designElements/ThemeDropdown.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_constants=__webpack_require__("./src/applab/constants.js"),_reactSelect=_interopRequireDefault(__webpack_require__("./node_modules/react-select/dist/react-select.es.js"));__webpack_require__("./node_modules/react-select/dist/react-select.css");var _FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ThemeDropdown=function(_React$Component){function ThemeDropdown(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{selectedValue:_this.props.initialValue}),_defineProperty(_assertThisInitialized(_this),"handleChange",(function(event){var newValue=event?event.value:_constants.themeOptionsForSelect[_constants.DEFAULT_THEME_INDEX].option;_this.props.handleChange(newValue),_this.setState({selectedValue:newValue})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ThemeDropdown,_React$Component),ThemeDropdown.prototype.render=function render(){var description=this.props.description,selectedValue=this.state.selectedValue,renderedOptions=_constants.themeOptionsForSelect.map((function(themeOption){return{value:themeOption.option,label:_react.default.createElement("div",{className:"theme-dropdown-label",style:styles.dropdownLabel},_react.default.createElement("img",{style:styles.icon,src:themeOption.icon}),_react.default.createElement("div",{style:styles.label},_locale.default["designElementTheme_".concat(themeOption.option)]()),_react.default.createElement("div",{className:"checkbox"},selectedValue===themeOption.option&&_react.default.createElement(_FontAwesome.default,{icon:"check"})))}}));return _react.default.createElement("div",{style:styles.outerContainer,className:"theme-dropdown"},_react.default.createElement("div",{style:styles.description},description),_react.default.createElement(_reactSelect.default,{className:"form-control",value:selectedValue,onChange:this.handleChange,options:renderedOptions,placeholder:"",clearable:!1}))},ThemeDropdown}(_react.default.Component);exports.default=ThemeDropdown,_defineProperty(ThemeDropdown,"propTypes",{initialValue:_propTypes.default.string.isRequired,handleChange:_propTypes.default.func.isRequired,description:_propTypes.default.node});var styles={outerContainer:{marginBottom:8,width:240},description:{paddingLeft:2,paddingBottom:2},label:{paddingLeft:4},icon:{marginTop:4,marginBottom:4},dropdownLabel:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingRight:"10px",cursor:"pointer"}};module.exports=exports.default},"./src/applab/designElements/ZOrderRow.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),rowStyle=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/rowStyle.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ZOrderRow=function(_React$Component){function ZOrderRow(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ZOrderRow,_React$Component),ZOrderRow.prototype.render=function render(){var element=this.props.element,outerElement=element.parentNode,index=Array.prototype.indexOf.call(outerElement.parentNode.children,outerElement),isBackMost=0===index,isFrontMost=index+1===outerElement.parentNode.children.length,squareButton={width:42,height:42,marginLeft:0,marginRight:10,backgroundColor:_color.default.cyan},squareButtonDisabled={width:42,height:42,marginLeft:0,marginRight:10};return _react.default.createElement("div",{style:rowStyle.container},_react.default.createElement("div",{style:rowStyle.description},_locale.default.designElementProperty_zOrder()),_react.default.createElement("div",null,_react.default.createElement("button",{type:"button",style:isBackMost?squareButtonDisabled:squareButton,onClick:this.props.onDepthChange.bind(this,element,"toBack"),disabled:isBackMost,title:_locale.default.designElementProperty_zOrder_backButton()},_react.default.createElement(_FontAwesome.default,{icon:"angle-double-left"})),_react.default.createElement("button",{type:"button",style:isBackMost?squareButtonDisabled:squareButton,onClick:this.props.onDepthChange.bind(this,element,"backward"),disabled:isBackMost,title:_locale.default.designElementProperty_zOrder_backwardButton()},_react.default.createElement(_FontAwesome.default,{icon:"angle-left"})),_react.default.createElement("button",{type:"button",style:isFrontMost?squareButtonDisabled:squareButton,onClick:this.props.onDepthChange.bind(this,element,"forward"),disabled:isFrontMost,title:_locale.default.designElementProperty_zOrder_forwardButton()},_react.default.createElement(_FontAwesome.default,{icon:"angle-right"})),_react.default.createElement("button",{type:"button",style:isFrontMost?squareButtonDisabled:squareButton,onClick:this.props.onDepthChange.bind(this,element,"toFront"),disabled:isFrontMost,title:_locale.default.designElementProperty_zOrder_frontButton()},_react.default.createElement(_FontAwesome.default,{icon:"angle-double-right"}))))},ZOrderRow}(_react.default.Component);exports.default=ZOrderRow,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ZOrderRow,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,onDepthChange:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/applab/designElements/button.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_ImagePickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ImagePickerPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_FontFamilyPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/FontFamilyPropertyRow.jsx")),_TextAlignmentPropertyRow=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/TextAlignmentPropertyRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),_themeValues=_interopRequireDefault(__webpack_require__("./src/applab/themeValues.js")),_constants=__webpack_require__("./src/applab/constants.js"),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ButtonProperties=function(_React$Component){function ButtonProperties(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleIconColorChange",(function(value){_this.props.handleChange("icon-color",value),_this.props.handleChange("image",_this.props.element.getAttribute("data-canonical-image-url"))})),_this}return _inheritsLoose(ButtonProperties,_React$Component),ButtonProperties.prototype.render=function render(){var iconColorPicker,element=this.props.element,canonicalImage=element.getAttribute("data-canonical-image-url");return _constants.ICON_PREFIX_REGEX.test(canonicalImage)&&(iconColorPicker=_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_iconColor(),initialValue:element.getAttribute("data-icon-color")||"#000000",handleChange:this.handleIconColorChange})),_react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_text(),initialValue:(0,_jquery.default)(element).text(),handleChange:this.props.handleChange.bind(this,"text")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_textColor(),initialValue:element.style.color,handleChange:this.props.handleChange.bind(this,"textColor")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_FontFamilyPropertyRow.default,{initialValue:_designMode.default.fontFamilyOptionFromStyle(element.style.fontFamily),handleChange:this.props.handleChange.bind(this,"fontFamily")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_fontSizePx(),isNumber:!0,initialValue:parseInt(element.style.fontSize,10),handleChange:this.props.handleChange.bind(this,"fontSize")}),_react.default.createElement(_TextAlignmentPropertyRow.default,{initialValue:element.style.textAlign||_TextAlignmentPropertyRow.TEXT_ALIGNMENT_CENTER,handleChange:this.props.handleChange.bind(this,"textAlign")}),_react.default.createElement(_ImagePickerPropertyRow.default,{desc:_locale.default.designElementProperty_image(),initialValue:element.getAttribute("data-canonical-image-url")||"",currentImageType:element.getAttribute("data-image-type")||"",handleChange:this.props.handleChange.bind(this,"image"),elementId:elementUtils.getId(element)}),iconColorPicker,_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},ButtonProperties}(_react.default.Component);_defineProperty(ButtonProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var ButtonEvents=function(_React$Component2){function ButtonEvents(){for(var _this2,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return _defineProperty(_assertThisInitialized(_this2=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertClick",(function(){return _this2.props.onInsertEvent(_this2.getClickEventCode())})),_this2}_inheritsLoose(ButtonEvents,_React$Component2);var _proto2=ButtonEvents.prototype;return _proto2.getClickEventCode=function getClickEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' clicked!");\n}');return'onEvent("'.concat(id,'", "click", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_click(),desc:_locale.default.designElement_button_clickEventDesc(),handleInsert:this.insertClick}))},ButtonEvents}(_react.default.Component);_defineProperty(ButtonEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:ButtonProperties,EventTab:ButtonEvents,themeValues:_themeValues.default.button,create:function create(){var element=document.createElement("button");element.appendChild(document.createTextNode("Button")),element.style.padding="0px",element.style.margin="0px",element.style.borderStyle="solid";var currentTheme=_library.default.getCurrentTheme(_designMode.default.activeScreen()),fontIsSmall=this.themeValues.fontSize[currentTheme]<=14;return element.style.height=fontIsSmall?"30px":"40px",element.style.width=fontIsSmall?"80px":"100px",_library.default.setAllPropertiesToCurrentTheme(element,_designMode.default.activeScreen()),element},onDeserialize:function onDeserialize(element,updateProperty){var url=element.getAttribute("data-canonical-image-url");url&&updateProperty(element,"image",url),elementUtils.setDefaultBorderStyles(element),elementUtils.setDefaultFontFamilyStyle(element)}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/canvas.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var CanvasProperties=function(_React$Component){function CanvasProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(CanvasProperties,_React$Component),CanvasProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.getAttribute("width"),10),handleChange:this.props.handleChange.bind(this,"width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.getAttribute("height"),10),handleChange:this.props.handleChange.bind(this,"height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},CanvasProperties}(_react.default.Component);_defineProperty(CanvasProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var CanvasEvents=function(_React$Component2){function CanvasEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertClick",(function(){return _this.props.onInsertEvent(_this.getClickEventCode())})),_this}_inheritsLoose(CanvasEvents,_React$Component2);var _proto2=CanvasEvents.prototype;return _proto2.getClickEventCode=function getClickEventCode(){var id=elementUtils.getId(this.props.element),commands=['console.log("'.concat(id,' clicked at x: " + event.offsetX + " y: " + event.offsetY);'),'setActiveCanvas("'.concat(id,'");'),"circle(event.offsetX, event.offsetY, 10);"],callback="function(event) {\n\t".concat(commands.join("\n\t"),"\n}");return'onEvent("'.concat(id,'", "click", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_click(),desc:_locale.default.designElement_canvas_clickEventDesc(),handleInsert:this.insertClick}))},CanvasEvents}(_react.default.Component);_defineProperty(CanvasEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:CanvasProperties,EventTab:CanvasEvents,create:function create(){var element=document.createElement("canvas");return element.setAttribute("width","100px"),element.setAttribute("height","100px"),element}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/chart.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ChartProperties=function(_React$Component){function ChartProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(ChartProperties,_React$Component),ChartProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},ChartProperties}(_react.default.Component);_defineProperty(ChartProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var ChartEvents=function(_React$Component2){function ChartEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertDrawChart",(function(){_this.props.onInsertEvent(_this.getDrawChartCode())})),_defineProperty(_assertThisInitialized(_this),"insertDrawChartFromRecords",(function(){_this.props.onInsertEvent(_this.getDrawChartFromRecordsCode())})),_this}_inheritsLoose(ChartEvents,_React$Component2);var _proto2=ChartEvents.prototype;return _proto2.getDrawChartCode=function getDrawChartCode(){return'drawChart("'+elementUtils.getId(this.props.element)+'", "bar", [\n\t{ label: "Row 1", value: 1 },\n\t{ label: "Row 2", value: 2 }\n]);\n'},_proto2.getDrawChartFromRecordsCode=function getDrawChartFromRecordsCode(){return'drawChartFromRecords("'+elementUtils.getId(this.props.element)+'", "bar", "tableName", ["columnOne", "columnTwo"]);\n'},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElement_chart_drawEvent(),desc:_locale.default.designElement_chart_drawEventDesc(),handleInsert:this.insertDrawChart}),_react.default.createElement(_EventRow.default,{name:_locale.default.designElement_chart_drawFromRecordsEvent(),desc:_locale.default.designElement_chart_drawFromRecordsEventDesc(),handleInsert:this.insertDrawChartFromRecords}))},ChartEvents}(_react.default.Component);_defineProperty(ChartEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:ChartProperties,EventTab:ChartEvents,create:function create(){var element=document.createElement("div");return element.setAttribute("class","chart"),element.style.height="100px",element.style.width="100px",element}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/checkbox.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var CheckboxProperties=function(_React$Component){function CheckboxProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(CheckboxProperties,_React$Component),CheckboxProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_checked(),initialValue:element.checked,handleChange:this.props.handleChange.bind(this,"checked")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},CheckboxProperties}(_react.default.Component);_defineProperty(CheckboxProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var CheckboxEvents=function(_React$Component2){function CheckboxEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertChange",(function(){_this.props.onInsertEvent(_this.getChangeEventCode())})),_this}_inheritsLoose(CheckboxEvents,_React$Component2);var _proto2=CheckboxEvents.prototype;return _proto2.getChangeEventCode=function getChangeEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' checked? " + getChecked("').concat(id,'"));\n}');return'onEvent("'.concat(id,'", "change", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_change(),desc:_locale.default.designElement_checkbox_changeEventDesc(),handleInsert:this.insertChange}))},CheckboxEvents}(_react.default.Component);_defineProperty(CheckboxEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:CheckboxProperties,EventTab:CheckboxEvents,create:function create(){var element=document.createElement("input");return element.type="checkbox",element.style.width="12px",element.style.height="12px",element.style.margin="0px",this.onDeserialize(element),element},onDeserialize:function onDeserialize(element){(0,_jquery.default)(element).on("click",(function(e){Applab.isRunning()||(element.checked=!element.checked)}))}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/dropdown.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_OptionsSelectRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/OptionsSelectRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_themeValues=_interopRequireWildcard(__webpack_require__("./src/applab/themeValues.js")),_TextAlignmentPropertyRow=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/TextAlignmentPropertyRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),_FontFamilyPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/FontFamilyPropertyRow.jsx")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js")),_rgbcolor=_interopRequireDefault(__webpack_require__("./node_modules/rgbcolor/index.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DropdownProperties=function(_React$Component){function DropdownProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(DropdownProperties,_React$Component),DropdownProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_OptionsSelectRow.default,{desc:_locale.default.designElementProperty_options(),element,handleChange:this.props.handleChange.bind(this,"options")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_index(),isNumber:!0,initialValue:parseInt(element.selectedIndex,10),handleChange:this.props.handleChange.bind(this,"index")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_textColor(),initialValue:element.style.color,handleChange:this.props.handleChange.bind(this,"textColor")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_FontFamilyPropertyRow.default,{initialValue:_designMode.default.fontFamilyOptionFromStyle(element.style.fontFamily),handleChange:this.props.handleChange.bind(this,"fontFamily")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_fontSizePx(),isNumber:!0,initialValue:parseInt(element.style.fontSize,10),handleChange:this.props.handleChange.bind(this,"fontSize")}),_react.default.createElement(_TextAlignmentPropertyRow.default,{initialValue:element.style.textAlign||_TextAlignmentPropertyRow.TEXT_ALIGNMENT_CENTER,handleChange:this.props.handleChange.bind(this,"textAlign")}),_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},DropdownProperties}(_react.default.Component);_defineProperty(DropdownProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var DropdownEvents=function(_React$Component2){function DropdownEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertChange",(function(){_this.props.onInsertEvent(_this.getChangeEventCode())})),_this}_inheritsLoose(DropdownEvents,_React$Component2);var _proto2=DropdownEvents.prototype;return _proto2.getChangeEventCode=function getChangeEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("Selected option: " + getText("'.concat(id,'"));\n}');return'onEvent("'.concat(id,'", "change", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_change(),desc:_locale.default.designElement_dropdown_changeEventDesc(),handleInsert:this.insertChange}))},DropdownEvents}(_react.default.Component);_defineProperty(DropdownEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var svgArrowUrl=function svgArrowUrl(color){return"url(data:image/svg+xml;charset=US-ASCII,".concat(encodeURIComponent('')),")")},_default={PropertyTab:DropdownProperties,EventTab:DropdownEvents,themeValues:_themeValues.default.dropdown,create:function create(){var element=document.createElement("select");element.style.width="200px",element.style.height="30px",element.style.margin="0",element.style.borderStyle="solid",_library.default.setAllPropertiesToCurrentTheme(element,_designMode.default.activeScreen());var option1=document.createElement("option");option1.innerHTML="Option 1",element.appendChild(option1);var option2=document.createElement("option");return option2.innerHTML="Option 2",element.appendChild(option2),element},onDeserialize:function onDeserialize(element){elementUtils.setDefaultBorderStyles(element),elementUtils.setDefaultFontFamilyStyle(element),element.style.backgroundImage||(element.style.backgroundImage=svgArrowUrl(new _rgbcolor.default(element.style.color).toHex())),""===element.style.padding&&(element.style.padding=_themeValues.CLASSIC_DROPDOWN_PADDING),(0,_jquery.default)(element).on("mousedown",(function(e){Applab.isRunning()||(e.preventDefault(),this.blur(),window.focus())}))},onPropertyChange:function onPropertyChange(element,name,value){switch(name){case"value":case"text":element.value=value;break;case"textColor":element.style.backgroundImage=svgArrowUrl(new _rgbcolor.default(element.style.color).toHex());break;case"index":element.selectedIndex=value;break;default:return!1}return!0},readProperty:function readProperty(element,name){switch(name){case"value":return element.value;case"index":return element.selectedIndex;default:throw"unknown property name ".concat(name)}}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/elementUtils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.addIdPrefix=function addIdPrefix(element,prefix){prefix=utils.valueOr(prefix,""),setId(element,element.getAttribute("id"),prefix)},exports.calculatePadding=function calculatePadding(cssPaddingString){for(var horizontalPadding,verticalPadding,paddingValues=(cssPaddingString||"").split(/\s+/).map((function(part){return parseInt(part,10)})),validPaddingValues=0;validPaddingValues1&&void 0!==arguments[1]?arguments[1]:{},textInput=options.textInput,forceDefaults=options.forceDefaults;element.style.borderStyle="solid",(forceDefaults||""===element.style.borderWidth)&&(element.style.borderWidth=textInput?"1px":"0px");(forceDefaults||""===element.style.borderColor)&&(element.style.borderColor=textInput?_themeValues.default.textInput.borderColor.classic:_themeValues.default.dropdown.borderColor.classic);(forceDefaults||""===element.style.borderRadius)&&(element.style.borderRadius="0px")},exports.setDefaultFontFamilyStyle=function setDefaultFontFamilyStyle(element){""===element.style.fontFamily&&(element.style.fontFamily=constants.fontFamilyStyles[0])},exports.setId=setId;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),constants=_interopRequireWildcard(__webpack_require__("./src/applab/constants.js")),utils=_interopRequireWildcard(__webpack_require__("./src/utils.js")),_themeValues=_interopRequireDefault(__webpack_require__("./src/applab/themeValues.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function getId(element,prefix){var elementId=element.getAttribute("id");return null===elementId?null:(function checkId(element,prefix){if(element.id.substr(0,prefix.length)!==prefix)throw new Error('element.id "'+element.id+'" does not start with prefix "'+prefix+'".')}(element,prefix=utils.valueOr(prefix,constants.DESIGN_ELEMENT_ID_PREFIX)),elementId.substr(prefix.length))}function setId(element,value,prefix){null!==value&&(prefix=utils.valueOr(prefix,constants.DESIGN_ELEMENT_ID_PREFIX),element.setAttribute("id",prefix+value))}function getPrefixedElementById(elementId,prefix){return prefix=void 0===prefix?constants.DESIGN_ELEMENT_ID_PREFIX:prefix,document.getElementById(prefix+elementId)}var ELEMENT_ID_DENYLIST=["finishButton","submitButton","unsubmitButton","turtleImage","prompt-icon","bubble"];function getScreens(){return(0,_jquery.default)("#designModeViz > .screen")}},"./src/applab/designElements/image.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_objectFitImages=_interopRequireDefault(__webpack_require__("./node_modules/object-fit-images/dist/ofi.common-js.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ImagePickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ImagePickerPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_constants=__webpack_require__("./src/applab/constants.js"),_EnumPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EnumPropertyRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ImageProperties=function(_React$Component){function ImageProperties(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleIconColorChange",(function(value){_this.props.handleChange("icon-color",value),_this.props.handleChange("picture",_this.props.element.getAttribute("data-canonical-image-url"))})),_this}return _inheritsLoose(ImageProperties,_React$Component),ImageProperties.prototype.render=function render(){var iconColorPicker,element=this.props.element,canonicalImage=element.getAttribute("data-canonical-image-url");return _constants.ICON_PREFIX_REGEX.test(canonicalImage)&&(iconColorPicker=_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_iconColor(),initialValue:element.getAttribute("data-icon-color")||"#000000",handleChange:this.handleIconColorChange})),_react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ImagePickerPropertyRow.default,{desc:_locale.default.designElementProperty_image(),initialValue:element.getAttribute("data-canonical-image-url")||"",currentImageType:element.getAttribute("data-image-type")||"",handleChange:this.props.handleChange.bind(this,"picture"),elementId:elementUtils.getId(element)}),iconColorPicker,_react.default.createElement(_EnumPropertyRow.default,{desc:_locale.default.designElementProperty_fitImage(),initialValue:element.style.objectFit||"fill",options:["fill","cover","contain","none"],displayOptions:[_locale.default.designElementProperty_fitImage_fill(),_locale.default.designElementProperty_fitImage_cover(),_locale.default.designElementProperty_fitImage_contain(),_locale.default.designElementProperty_fitImage_none()],handleChange:this.props.handleChange.bind(this,"objectFit")}),_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},ImageProperties}(_react.default.Component);_defineProperty(ImageProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var ImageEvents=function(_React$Component2){function ImageEvents(){for(var _this2,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return _defineProperty(_assertThisInitialized(_this2=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertClick",(function(){_this2.props.onInsertEvent(_this2.getClickEventCode())})),_this2}_inheritsLoose(ImageEvents,_React$Component2);var _proto2=ImageEvents.prototype;return _proto2.getClickEventCode=function getClickEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' clicked!");\n}');return'onEvent("'.concat(id,'", "click", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_click(),desc:_locale.default.designElement_image_clickEventDesc(),handleInsert:this.insertClick}))},ImageEvents}(_react.default.Component);function setObjectFitStyles(element,value,forceObjectFitNow){element.style.objectFit=value,element.style.fontFamily="'object-fit: ".concat(value,";'"),forceObjectFitNow&&(0,_objectFitImages.default)(element)}_defineProperty(ImageEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:ImageProperties,EventTab:ImageEvents,create:function create(){var element=document.createElement("img");return element.style.height="100px",element.style.width="100px",elementUtils.setDefaultBorderStyles(element,{forceDefaults:!0}),element.setAttribute("src","/blockly/media/1x1.gif"),element.setAttribute("data-canonical-image-url",""),element.setAttribute("data-image-type",""),element.setAttribute("data-object-fit","contain"),setObjectFitStyles(element,"contain",!0),element},onDeserialize:function onDeserialize(element,updateProperty){elementUtils.setDefaultBorderStyles(element);var url=element.getAttribute("data-canonical-image-url")||"";url?updateProperty(element,"picture",url):(element.setAttribute("src","/blockly/media/1x1.gif"),element.setAttribute("data-canonical-image-url",""));var objectFitValue=element.getAttribute("data-object-fit");objectFitValue&&setObjectFitStyles(element,objectFitValue)},onPropertyChange:function onPropertyChange(element,name,value){return"objectFit"===name&&(element.setAttribute("data-object-fit",value),setObjectFitStyles(element,value,!0),!0)},readProperty:function readProperty(element,name){if("objectFit"===name)return element.getAttribute("data-object-fit");throw"unknown property name ".concat(name)}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/label.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_FontFamilyPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/FontFamilyPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_TextAlignmentPropertyRow=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/TextAlignmentPropertyRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),applabConstants=_interopRequireWildcard(__webpack_require__("./src/applab/constants.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),gridUtils=_interopRequireWildcard(__webpack_require__("./src/applab/gridUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_themeValues=_interopRequireDefault(__webpack_require__("./src/applab/themeValues.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var LabelProperties=function(_React$Component){function LabelProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(LabelProperties,_React$Component),LabelProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_text(),initialValue:(0,_jquery.default)(element).text(),handleChange:this.props.handleChange.bind(this,"text")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,lockState:(0,_jquery.default)(element).data("lock-width")||_PropertyRow.default.LockState.UNLOCKED,handleLockChange:this.props.handleChange.bind(this,"lock-width"),initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,lockState:(0,_jquery.default)(element).data("lock-height")||_PropertyRow.default.LockState.UNLOCKED,handleLockChange:this.props.handleChange.bind(this,"lock-height"),initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_textColor(),initialValue:element.style.color,handleChange:this.props.handleChange.bind(this,"textColor")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_FontFamilyPropertyRow.default,{initialValue:_designMode.default.fontFamilyOptionFromStyle(element.style.fontFamily),handleChange:this.props.handleChange.bind(this,"fontFamily")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_fontSizePx(),isNumber:!0,initialValue:parseInt(element.style.fontSize,10),handleChange:this.props.handleChange.bind(this,"fontSize")}),_react.default.createElement(_TextAlignmentPropertyRow.default,{initialValue:element.style.textAlign||_TextAlignmentPropertyRow.TEXT_ALIGNMENT_LEFT,handleChange:this.props.handleChange.bind(this,"textAlign")}),_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},LabelProperties}(_react.default.Component);_defineProperty(LabelProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var LabelEvents=function(_React$Component2){function LabelEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertClick",(function(){_this.props.onInsertEvent(_this.getClickEventCode())})),_this}_inheritsLoose(LabelEvents,_React$Component2);var _proto2=LabelEvents.prototype;return _proto2.getClickEventCode=function getClickEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' clicked!");\n}');return'onEvent("'.concat(id,'", "click", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_click(),desc:_locale.default.designElement_label_clickEventDesc(),handleInsert:this.insertClick}))},LabelEvents}(_react.default.Component);_defineProperty(LabelEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:LabelProperties,EventTab:LabelEvents,themeValues:_themeValues.default.label,create:function create(){var element=document.createElement("label");return element.style.margin="0px",element.style.lineHeight="1",element.style.overflow="hidden",element.style.wordWrap="break-word",element.textContent="text",element.style.maxWidth=applabConstants.APP_WIDTH+"px",element.style.borderStyle="solid",element.style.textRendering="optimizeSpeed",_library.default.setAllPropertiesToCurrentTheme(element,_designMode.default.activeScreen()),this.resizeToFitText(element),element},onDeserialize:function onDeserialize(element){element.style.backgroundColor||(element.style.backgroundColor=_themeValues.default.label.backgroundColor.classic),element.style.textRendering||(element.style.textRendering="optimizeSpeed"),elementUtils.setDefaultBorderStyles(element),elementUtils.setDefaultFontFamilyStyle(element)},getCurrentSize:function getCurrentSize(element){return{width:parseInt(element.style.width,10),height:parseInt(element.style.height,10)}},getBestSize:function getBestSize(element){var size=this.getCurrentSize(element),widthLocked=(0,_jquery.default)(element).data("lock-width")===_PropertyRow.default.LockState.LOCKED,heightLocked=(0,_jquery.default)(element).data("lock-height")===_PropertyRow.default.LockState.LOCKED;if(element.textContent){var maxWidth;if("center"===element.style.textAlign)maxWidth=applabConstants.APP_WIDTH;else{var left=parseInt(element.style.left||"0",10);maxWidth="right"===element.style.textAlign?left+size.width:applabConstants.APP_WIDTH-left}var clone=(0,_jquery.default)(element).clone().css({position:"absolute",visibility:"hidden",width:"auto",height:"auto",maxWidth:maxWidth+"px"}).appendTo((0,_jquery.default)(document.body)),_elementUtils$calcula=elementUtils.calculatePadding(element.style.padding),horizontalPadding=_elementUtils$calcula.horizontalPadding,verticalPadding=_elementUtils$calcula.verticalPadding;widthLocked||(size.width=Math.min(clone.width()+1+horizontalPadding+2*parseInt(element.style.borderWidth),maxWidth)),heightLocked||(size.height=clone.height()+1+verticalPadding+2*parseInt(element.style.borderWidth)),clone.remove()}else widthLocked||heightLocked||(size.width=size.height=15);return size},resizeToFitText:function resizeToFitText(element){var size=this.getBestSize(element);if("center"===element.style.textAlign||"right"===element.style.textAlign){var left=parseInt(element.style.left,10),width=parseInt(element.style.width,10),delta=size.width-width;"right"===element.style.textAlign?left-=delta:left-=delta/2,element.style.left=Math.max(0,left)+"px",gridUtils.isDraggableContainer(element.parentNode)&&(element.parentNode.style.left=element.style.left)}element.style.width=size.width+"px",element.style.height=size.height+"px"},_lastFitsExactly:{},beforePropertyChange:function beforePropertyChange(element,name,batchChangeId){switch(name){case"padding":case"text":case"fontFamily":case"fontSize":var _this$_lastFitsExactl=this._lastFitsExactly,_this$_lastFitsExactl2=_this$_lastFitsExactl.batchId,batchId=void 0===_this$_lastFitsExactl2?-1:_this$_lastFitsExactl2,batchPreviouslyFitExactly=_this$_lastFitsExactl.previouslyFitExactly;if(batchId===batchChangeId)return batchPreviouslyFitExactly;var currentSize=this.getCurrentSize(element),bestSize=this.getBestSize(element),previouslyFitExactly=Math.abs(currentSize.width-bestSize.width)<5&&Math.abs(currentSize.height-bestSize.height)<5;return this._lastFitsExactly=batchChangeId?{batchId:batchChangeId,previouslyFitExactly}:{},previouslyFitExactly;default:return null}},onPropertyChange:function onPropertyChange(element,name,value,previouslyFitExactly){switch(name){case"text":case"fontFamily":case"fontSize":case"padding":previouslyFitExactly&&this.resizeToFitText(element);break;case"lock-width":(0,_jquery.default)(element).data("lock-width",value);break;case"lock-height":(0,_jquery.default)(element).data("lock-height",value);break;default:return!1}return!0}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/library.js":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),utils=_interopRequireWildcard(__webpack_require__("./src/utils.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_constants=__webpack_require__("./src/applab/constants.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var nextElementIdMap={},ElementType=utils.makeEnum("BUTTON","LABEL","TEXT_INPUT","CHECKBOX","DROPDOWN","RADIO_BUTTON","TEXT_AREA","IMAGE","CANVAS","SCREEN","CHART","SLIDER","PHOTO_SELECT"),elements={};elements[ElementType.BUTTON]=__webpack_require__("./src/applab/designElements/button.jsx"),elements[ElementType.LABEL]=__webpack_require__("./src/applab/designElements/label.jsx"),elements[ElementType.TEXT_INPUT]=__webpack_require__("./src/applab/designElements/textInput.jsx"),elements[ElementType.CHECKBOX]=__webpack_require__("./src/applab/designElements/checkbox.jsx"),elements[ElementType.DROPDOWN]=__webpack_require__("./src/applab/designElements/dropdown.jsx"),elements[ElementType.RADIO_BUTTON]=__webpack_require__("./src/applab/designElements/radioButton.jsx"),elements[ElementType.TEXT_AREA]=__webpack_require__("./src/applab/designElements/textarea.jsx"),elements[ElementType.IMAGE]=__webpack_require__("./src/applab/designElements/image.jsx"),elements[ElementType.CANVAS]=__webpack_require__("./src/applab/designElements/canvas.jsx"),elements[ElementType.SCREEN]=__webpack_require__("./src/applab/designElements/screen.jsx"),elements[ElementType.CHART]=__webpack_require__("./src/applab/designElements/chart.jsx"),elements[ElementType.SLIDER]=__webpack_require__("./src/applab/designElements/slider.jsx"),elements[ElementType.PHOTO_SELECT]=__webpack_require__("./src/applab/designElements/photoSelect.jsx");var _default={ElementType,elements,getUnusedElementId:function getUnusedElementId(prefix){for(var i=nextElementIdMap[prefix]||1;elementUtils.getPrefixedElementById(prefix+i);)i++;return nextElementIdMap[prefix]=i+1,prefix+i},resetIds:function resetIds(){nextElementIdMap={}},createElement:function createElement(elementType,left,top,withoutId){var elementClass=elements[elementType];if(!elementClass)throw new Error("Unknown elementType: "+elementType);var element=elementClass.create(withoutId);return withoutId||elementUtils.setId(element,this.getUnusedElementId(elementType.toLowerCase())),elementType!==ElementType.SCREEN&&(element.style.position="absolute",element.style.left=left+"px",element.style.top=top+"px",element.style.margin="0px"),element},getElementPropertyTab:function getElementPropertyTab(elementType){return elements[elementType].PropertyTab},getElementEventTab:function getElementEventTab(elementType){return elements[elementType].EventTab},getElementType:function getElementType(element,allowUnknown){switch(element.tagName.toLowerCase()){case"button":return ElementType.BUTTON;case"label":return(0,_jquery.default)(element).hasClass("img-upload")?ElementType.PHOTO_SELECT:ElementType.LABEL;case"select":return ElementType.DROPDOWN;case"div":return(0,_jquery.default)(element).hasClass("screen")?ElementType.SCREEN:(0,_jquery.default)(element).hasClass("chart")?ElementType.CHART:ElementType.TEXT_AREA;case"img":return ElementType.IMAGE;case"canvas":return ElementType.CANVAS;case"input":switch(element.getAttribute("type")){case"checkbox":return ElementType.CHECKBOX;case"radio":return ElementType.RADIO_BUTTON;case"range":return ElementType.SLIDER;default:return ElementType.TEXT_INPUT}}var errorMessage="Project contains an element with an unknown type"+"\nType: ".concat(element.tagName)+"\nId: ".concat(element.id)+"\nClass: ".concat(element.className);if(allowUnknown)return console.warn(errorMessage),null;throw new Error(errorMessage)},getThemeValues:function getThemeValues(element){var elementType=this.getElementType(element);return(elements[elementType]||{}).themeValues},getCurrentTheme:function getCurrentTheme(parentScreen){return parentScreen&&parentScreen.getAttribute("data-theme")||_constants.themeOptions[_constants.DEFAULT_THEME_INDEX]},setAllPropertiesToCurrentTheme:function setAllPropertiesToCurrentTheme(element,parentScreen){var currentTheme=this.getCurrentTheme(parentScreen),themeValues=this.getThemeValues(element);for(var propName in themeValues){var defaultValue=themeValues[propName][currentTheme];_designMode.default.updateProperty(element,propName,defaultValue)}},onDeserialize:function onDeserialize(element,updateProperty,skipIfUnknown){var elementType=this.getElementType(element,skipIfUnknown);elementType&&elements[elementType]&&elements[elementType].onDeserialize&&elements[elementType].onDeserialize(element,updateProperty)},getPreChangeData:function getPreChangeData(element,name,batchChangeId){var elementType=this.getElementType(element);return elements[elementType].beforePropertyChange?elements[elementType].beforePropertyChange(element,name,batchChangeId):null},typeSpecificPropertyChange:function typeSpecificPropertyChange(element,name,value,preChangeData){var elementType=this.getElementType(element);return!!elements[elementType].onPropertyChange&&elements[elementType].onPropertyChange(element,name,value,preChangeData)},typeSpecificPropertyRead:function typeSpecificPropertyRead(element,name){var elementType=this.getElementType(element);if(elements[elementType].readProperty)return elements[elementType].readProperty(element,name);throw"unknown property type ".concat(name)}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/photoSelect.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),_themeValues=_interopRequireDefault(__webpack_require__("./src/applab/themeValues.js")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var PhotoChooserProperties=function(_React$Component){function PhotoChooserProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(PhotoChooserProperties,_React$Component),PhotoChooserProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_iconColor(),initialValue:element.style.color||"#000000",handleChange:this.props.handleChange.bind(this,"textColor")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_iconSizePx(),isNumber:!0,initialValue:parseInt(element.style.fontSize,10),handleChange:this.props.handleChange.bind(this,"fontSize")}),_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},PhotoChooserProperties}(_react.default.Component);_defineProperty(PhotoChooserProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var PhotoChooserEvents=function(_React$Component2){function PhotoChooserEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertPhotoSelected",(function(){return _this.props.onInsertEvent(_this.getPhotoSelectedEventCode())})),_this}_inheritsLoose(PhotoChooserEvents,_React$Component2);var _proto2=PhotoChooserEvents.prototype;return _proto2.getPhotoSelectedEventCode=function getPhotoSelectedEventCode(){var id=elementUtils.getId(this.props.element),commands=['console.log("'.concat(id,' photo selected!");'),'console.log(getImageURL("'.concat(id,'"));')],callback="function( ) {\n\t".concat(commands.join("\n\t"),"\n}");return'onEvent("'.concat(id,'", "change", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element,clickName=_locale.default.designElementPhotoSelectClickName(),clickDescription=_locale.default.designElementPhotoSelectClickDescription();return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:clickName,desc:clickDescription,handleInsert:this.insertPhotoSelected}))},PhotoChooserEvents}(_react.default.Component);_defineProperty(PhotoChooserEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:PhotoChooserProperties,EventTab:PhotoChooserEvents,themeValues:_themeValues.default.photoSelect,create:function create(){var element=document.createElement("label");element.setAttribute("class","img-upload fa fa-camera"),element.style.margin="0",element.style.borderStyle="solid",element.style.overflow="hidden",_library.default.setAllPropertiesToCurrentTheme(element,_designMode.default.activeScreen()),element.style.padding="0",element.style.textAlign="center",element.style.fontSize="32px",element.style.width="75px",element.style.height="50px",element.style.display="flex",element.style.alignItems="center",element.style.justifyContent="center";var newInput=document.createElement("input");return newInput.type="file",newInput.accept="image/*",newInput.capture="camera",newInput.hidden=!0,element.appendChild(newInput),element},onDeserialize:function onDeserialize(element,updateProperty){(0,_jquery.default)(element).on("click",(function(){element.childNodes[0].disabled=!Applab.isRunning()}))}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/radioButton.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var RadioButtonProperties=function(_React$Component){function RadioButtonProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(RadioButtonProperties,_React$Component),RadioButtonProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_groupId(),initialValue:element.getAttribute("name")||"",handleChange:this.props.handleChange.bind(this,"groupId")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_checked(),initialValue:element.checked,handleChange:this.props.handleChange.bind(this,"checked")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},RadioButtonProperties}(_react.default.Component);_defineProperty(RadioButtonProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var RadioButtonEvents=function(_React$Component2){function RadioButtonEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertChange",(function(){_this.props.onInsertEvent(_this.getChangeEventCode())})),_this}_inheritsLoose(RadioButtonEvents,_React$Component2);var _proto2=RadioButtonEvents.prototype;return _proto2.getChangeEventCode=function getChangeEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' checked? " + getChecked("').concat(id,'"));\n}');return'onEvent("'.concat(id,'", "change", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_change(),desc:_locale.default.designElement_radioButton_changeEventDesc(),handleInsert:this.insertChange}))},RadioButtonEvents}(_react.default.Component);function getInitialGroupId(){var lastRadioButton=function getLastRadioButtonOnCurrentScreen(){var radioButton=(0,_jquery.default)("#designModeViz .screen:visible").first().find("input[type=radio]").last();return radioButton.length>0?radioButton[0]:null}();return lastRadioButton&&lastRadioButton.getAttribute("name")&&""!==lastRadioButton.getAttribute("name").trim()?lastRadioButton.getAttribute("name"):function getUnusedGroupId(){var i=1;for(;(0,_jquery.default)("input[name=radio_group"+i+"]").length>0;)i++;return"radio_group"+i}()}_defineProperty(RadioButtonEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:RadioButtonProperties,EventTab:RadioButtonEvents,create:function create(withoutId){var element=document.createElement("input");return element.type="radio",element.style.width="12px",element.style.height="12px",element.style.margin="0px",withoutId||(element.name=getInitialGroupId()),this.onDeserialize(element),element},onDeserialize:function onDeserialize(element){(0,_jquery.default)(element).on("click",(function(e){Applab.isRunning()||(element.checked=!element.checked)}))}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/rowStyle.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.maxWidth=exports.link=exports.input=exports.enumInput=exports.description=exports.container=exports.checkbox=void 0;var _color=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./src/util/color.js"));var input={display:"inline-block",height:20,padding:"4px 6px",marginBottom:0,marginLeft:0,fontSize:14,lineHeight:"20px",color:_color.default.charcoal,WebkitBorderRadius:4,MozBorderRadius:4,borderRadius:4,border:"1px solid "+_color.default.light_gray,verticalAlign:"middle"};exports.input=input;var enumInput={marginBottom:0,border:"1px solid "+_color.default.light_gray};exports.enumInput=enumInput;exports.container={paddingLeft:20,marginBottom:8};exports.maxWidth={maxWidth:245};exports.description={paddingLeft:2};exports.checkbox={width:20,height:20,fontSize:20,paddingLeft:2};exports.link={cursor:"pointer"}},"./src/applab/designElements/screen.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_ImagePickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ImagePickerPropertyRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_DefaultScreenButtonPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/DefaultScreenButtonPropertyRow.jsx")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js")),applabConstants=_interopRequireWildcard(__webpack_require__("./src/applab/constants.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_themeValues=_interopRequireDefault(__webpack_require__("./src/applab/themeValues.js")),_redux=__webpack_require__("./src/redux.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ScreenProperties=function(_React$Component){function ScreenProperties(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleIconColorChange",(function(value){_this.props.handleChange("icon-color",value),_this.props.handleChange("screen-image",_this.props.element.getAttribute("data-canonical-image-url"))})),_this}return _inheritsLoose(ScreenProperties,_React$Component),ScreenProperties.prototype.render=function render(){var iconColorPicker,element=this.props.element,canonicalImage=element.getAttribute("data-canonical-image-url");return applabConstants.ICON_PREFIX_REGEX.test(canonicalImage)&&(iconColorPicker=_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_iconColor(),initialValue:element.getAttribute("data-icon-color")||"#000000",handleChange:this.handleIconColorChange})),_react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_ImagePickerPropertyRow.default,{desc:_locale.default.designElementProperty_image(),initialValue:element.getAttribute("data-canonical-image-url")||"",currentImageType:element.getAttribute("data-image-type")||"",handleChange:this.props.handleChange.bind(this,"screen-image"),elementId:elementUtils.getId(element)}),iconColorPicker,_react.default.createElement(_DefaultScreenButtonPropertyRow.default,{screenId:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"is-default")}))},ScreenProperties}(_react.default.Component);_defineProperty(ScreenProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired});var ScreenEvents=function(_React$Component2){function ScreenEvents(){for(var _this2,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return _defineProperty(_assertThisInitialized(_this2=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertClick",(function(){_this2.props.onInsertEvent(_this2.getClickEventCode())})),_defineProperty(_assertThisInitialized(_this2),"insertKey",(function(){_this2.props.onInsertEvent(_this2.getKeyEventCode())})),_this2}_inheritsLoose(ScreenEvents,_React$Component2);var _proto2=ScreenEvents.prototype;return _proto2.getClickEventCode=function getClickEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' clicked!");\n}');return'onEvent("'.concat(id,'", "click", ').concat(callback,");")},_proto2.getKeyEventCode=function getKeyEventCode(){var id=elementUtils.getId(this.props.element);return'onEvent("'.concat(id,'", "keydown", ').concat('function(event) {\n\tconsole.log("Key pressed: " + event.key);\n}',");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_click(),desc:_locale.default.designElement_screen_clickEventDesc(),handleInsert:this.insertClick}),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_key(),desc:_locale.default.designElement_screen_keyEventDesc(),handleInsert:this.insertKey}))},ScreenEvents}(_react.default.Component);_defineProperty(ScreenEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:ScreenProperties,EventTab:ScreenEvents,themeValues:_themeValues.default.screen,create:function create(){var width=applabConstants.getAppWidth((0,_redux.getStore)().getState().pageConstants),element=document.createElement("div");element.setAttribute("class","screen"),element.setAttribute("tabIndex","1"),element.style.display="block",element.style.height=applabConstants.APP_HEIGHT-applabConstants.FOOTER_HEIGHT+"px",element.style.width=width+"px",element.style.left="0px",element.style.top="0px",element.style.position="absolute",element.style.zIndex=0;var currentTheme=_library.default.getCurrentTheme(_designMode.default.activeScreen());return element.setAttribute("data-theme",currentTheme),_library.default.setAllPropertiesToCurrentTheme(element,element),element},onDeserialize:function onDeserialize(element,updateProperty){var url=element.getAttribute("data-canonical-image-url");url&&updateProperty(element,"screen-image",url),element.style.position="absolute",element.style.zIndex=0,element.setAttribute("tabIndex","1"),element.getAttribute("data-theme")||element.setAttribute("data-theme",applabConstants.themeOptions[applabConstants.CLASSIC_THEME_INDEX]),""===element.style.backgroundColor&&(element.style.backgroundColor=this.themeValues.backgroundColor[applabConstants.themeOptions[applabConstants.CLASSIC_THEME_INDEX]])},readProperty:function readProperty(element,name){if("theme"===name)return element.getAttribute("data-theme");throw"unknown property name ".concat(name)},onPropertyChange:function onPropertyChange(element,name,value){return"theme"===name&&(_designMode.default.changeThemeForScreen(element,value),!0)}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/slider.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),elementUtils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/designElements/elementUtils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var SliderProperties=function(_React$Component){function SliderProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(SliderProperties,_React$Component),SliderProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_value(),isNumber:!0,initialValue:element.defaultValue,handleChange:this.props.handleChange.bind(this,"defaultValue")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_minimumValue(),isNumber:!0,initialValue:parseInt(element.min,10),handleChange:this.props.handleChange.bind(this,"min")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_maximumValue(),isNumber:!0,initialValue:parseInt(element.max,10),handleChange:this.props.handleChange.bind(this,"max")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_stepSize(),isNumber:!0,initialValue:parseInt(element.step,10),handleChange:this.props.handleChange.bind(this,"step")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},SliderProperties}(_react.default.Component);_defineProperty(SliderProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var SliderEvents=function(_React$Component2){function SliderEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertInput",(function(){_this.props.onInsertEvent(_this.getInputEventCode())})),_this}_inheritsLoose(SliderEvents,_React$Component2);var _proto2=SliderEvents.prototype;return _proto2.getInputEventCode=function getInputEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' value: " + getNumber("').concat(id,'"));\n}');return'onEvent("'.concat(id,'", "input", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_input(),desc:_locale.default.designElement_slider_inputEventDesc(),handleInsert:this.insertInput}))},SliderEvents}(_react.default.Component);_defineProperty(SliderEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:SliderProperties,EventTab:SliderEvents,create:function create(){var element=document.createElement("input");return element.type="range",element.style.margin="0px",element.style.padding="0px",element.style.width="150px",element.style.height="24px",element.defaultValue=50,element.min=0,element.max=100,element.step=1,element},onPropertyChange:function onPropertyChange(element,name,value){switch(name){case"defaultValue":element.defaultValue=value;break;case"sliderValue":element.value=value;break;case"min":element.min=value;break;case"max":element.max=value;break;case"step":element.step=value;break;default:return!1}return!0},readProperty:function readProperty(element,name){switch(name){case"defaultValue":return element.defaultValue;case"sliderValue":return parseInt(element.value,10);case"min":return parseInt(element.min,10);case"max":return parseInt(element.max,10);case"step":return parseInt(element.step,10);default:throw"unknown property name ".concat(name)}}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/textInput.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_FontFamilyPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/FontFamilyPropertyRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),_TextAlignmentPropertyRow=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/TextAlignmentPropertyRow.jsx")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_constants=__webpack_require__("./src/applab/constants.js"),_themeValues=_interopRequireWildcard(__webpack_require__("./src/applab/themeValues.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var TextInputProperties=function(_React$Component){function TextInputProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(TextInputProperties,_React$Component),TextInputProperties.prototype.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_placeholder(),initialValue:element.getAttribute("placeholder")||"",handleChange:this.props.handleChange.bind(this,"placeholder")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_textColor(),initialValue:element.style.color,handleChange:this.props.handleChange.bind(this,"textColor")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_FontFamilyPropertyRow.default,{initialValue:_designMode.default.fontFamilyOptionFromStyle(element.style.fontFamily),handleChange:this.props.handleChange.bind(this,"fontFamily")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_fontSizePx(),isNumber:!0,initialValue:parseInt(element.style.fontSize,10),handleChange:this.props.handleChange.bind(this,"fontSize")}),_react.default.createElement(_TextAlignmentPropertyRow.default,{initialValue:element.style.textAlign||_TextAlignmentPropertyRow.TEXT_ALIGNMENT_LEFT,handleChange:this.props.handleChange.bind(this,"textAlign")}),_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},TextInputProperties}(_react.default.Component);_defineProperty(TextInputProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var TextInputEvents=function(_React$Component2){function TextInputEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertChange",(function(){_this.props.onInsertEvent(_this.getChangeEventCode())})),_defineProperty(_assertThisInitialized(_this),"insertInput",(function(){_this.props.onInsertEvent(_this.getInputEventCode())})),_this}_inheritsLoose(TextInputEvents,_React$Component2);var _proto2=TextInputEvents.prototype;return _proto2.getChangeEventCode=function getChangeEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' entered text: " + getText("').concat(id,'"));\n}');return'onEvent("'.concat(id,'", "change", ').concat(callback,");")},_proto2.getInputEventCode=function getInputEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' current text: " + getText("').concat(id,'"));\n}');return'onEvent("'.concat(id,'", "input", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_change(),desc:_locale.default.designElement_textInput_changeEventDesc(),handleInsert:this.insertChange}),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_input(),desc:_locale.default.designElement_textInput_inputEventDesc(),handleInsert:this.insertInput}))},TextInputEvents}(_react.default.Component);_defineProperty(TextInputEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:TextInputProperties,EventTab:TextInputEvents,themeValues:_themeValues.default.textInput,create:function create(){var element=document.createElement("input");return element.style.margin="0px",element.style.width="200px",element.style.height="30px",element.style.borderStyle="solid",_library.default.setAllPropertiesToCurrentTheme(element,_designMode.default.activeScreen()),element},onDeserialize:function onDeserialize(element){elementUtils.setDefaultBorderStyles(element,{textInput:!0}),elementUtils.setDefaultFontFamilyStyle(element),""===element.style.padding&&(element.style.padding=_themeValues.CLASSIC_TEXT_INPUT_PADDING),""===element.style.backgroundColor&&(element.style.backgroundColor=this.themeValues.backgroundColor[_constants.themeOptions[_constants.CLASSIC_THEME_INDEX]]),(0,_jquery.default)(element).on("mousedown",(function(e){Applab.isRunning()||e.preventDefault()})),(0,_jquery.default)(element).on("keydown",(function(e){Applab.isRunning()||e.preventDefault()}))},onPropertyChange:function onPropertyChange(element,name,value){switch(name){case"value":case"text":element.value=value;break;default:return!1}return!0},readProperty:function readProperty(element,name){if("value"===name)return element.value;throw"unknown property name ".concat(name)}};exports.default=_default,module.exports=exports.default},"./src/applab/designElements/textarea.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_PropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/PropertyRow.jsx")),_BooleanPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BooleanPropertyRow.jsx")),_ColorPickerPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ColorPickerPropertyRow.jsx")),_ZOrderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/ZOrderRow.jsx")),_EventHeaderRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventHeaderRow.jsx")),_EventRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/EventRow.jsx")),_FontFamilyPropertyRow=_interopRequireDefault(__webpack_require__("./src/applab/designElements/FontFamilyPropertyRow.jsx")),_TextAlignmentPropertyRow=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/TextAlignmentPropertyRow.jsx")),_BorderProperties=_interopRequireDefault(__webpack_require__("./src/applab/designElements/BorderProperties.jsx")),utils=_interopRequireWildcard(__webpack_require__("./src/utils.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),_themeValues=_interopRequireWildcard(__webpack_require__("./src/applab/themeValues.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var TextAreaProperties=function(_React$Component){function TextAreaProperties(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(TextAreaProperties,_React$Component),TextAreaProperties.prototype.render=function render(){var element=this.props.element,escapedText="";return escapedText="textArea"===element.parentElement.className?utils.unescapeText(element.parentElement.innerHTML):utils.unescapeText(element.innerHTML),_react.default.createElement("div",{id:"propertyRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_text(),isMultiLine:!0,initialValue:escapedText,handleChange:this.props.handleChange.bind(this,"text")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_widthPx(),isNumber:!0,initialValue:parseInt(element.style.width,10),foo:parseInt(element.style.width,10),handleChange:this.props.handleChange.bind(this,"style-width")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_heightPx(),isNumber:!0,initialValue:parseInt(element.style.height,10),handleChange:this.props.handleChange.bind(this,"style-height")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_xPositionPx(),isNumber:!0,initialValue:parseInt(element.style.left,10),handleChange:this.props.handleChange.bind(this,"left")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_yPositionPx(),isNumber:!0,initialValue:parseInt(element.style.top,10),handleChange:this.props.handleChange.bind(this,"top")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_textColor(),initialValue:element.style.color,handleChange:this.props.handleChange.bind(this,"textColor")}),_react.default.createElement(_ColorPickerPropertyRow.default,{desc:_locale.default.designElementProperty_backgroundColor(),initialValue:element.style.backgroundColor,handleChange:this.props.handleChange.bind(this,"backgroundColor")}),_react.default.createElement(_FontFamilyPropertyRow.default,{initialValue:_designMode.default.fontFamilyOptionFromStyle(element.style.fontFamily),handleChange:this.props.handleChange.bind(this,"fontFamily")}),_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_fontSizePx(),isNumber:!0,initialValue:parseInt(element.style.fontSize,10),handleChange:this.props.handleChange.bind(this,"fontSize")}),_react.default.createElement(_TextAlignmentPropertyRow.default,{initialValue:element.style.textAlign||_TextAlignmentPropertyRow.TEXT_ALIGNMENT_LEFT,handleChange:this.props.handleChange.bind(this,"textAlign")}),_react.default.createElement(_BorderProperties.default,{element,handleBorderWidthChange:this.props.handleChange.bind(this,"borderWidth"),handleBorderColorChange:this.props.handleChange.bind(this,"borderColor"),handleBorderRadiusChange:this.props.handleChange.bind(this,"borderRadius")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_readOnly(),initialValue:!element.isContentEditable,handleChange:this.props.handleChange.bind(this,"readonly")}),_react.default.createElement(_BooleanPropertyRow.default,{desc:_locale.default.designElementProperty_hidden(),initialValue:(0,_jquery.default)(element).hasClass("design-mode-hidden"),handleChange:this.props.handleChange.bind(this,"hidden")}),_react.default.createElement(_ZOrderRow.default,{element:this.props.element,onDepthChange:this.props.onDepthChange}))},TextAreaProperties}(_react.default.Component);_defineProperty(TextAreaProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired});var TextAreaEvents=function(_React$Component2){function TextAreaEvents(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"insertChange",(function(){_this.props.onInsertEvent(_this.getChangeEventCode())})),_this}_inheritsLoose(TextAreaEvents,_React$Component2);var _proto2=TextAreaEvents.prototype;return _proto2.getChangeEventCode=function getChangeEventCode(){var id=elementUtils.getId(this.props.element),callback='function( ) {\n\tconsole.log("'.concat(id,' entered text: " + getText("').concat(id,'"));\n}');return'onEvent("'.concat(id,'", "change", ').concat(callback,");")},_proto2.render=function render(){var element=this.props.element;return _react.default.createElement("div",{id:"eventRowContainer"},_react.default.createElement(_PropertyRow.default,{desc:_locale.default.designElementProperty_id(),initialValue:elementUtils.getId(element),handleChange:this.props.handleChange.bind(this,"id"),isIdRow:!0}),_react.default.createElement(_EventHeaderRow.default,null),_react.default.createElement(_EventRow.default,{name:_locale.default.designElementEvent_change(),desc:_locale.default.designElement_textArea_changeEventDesc(),handleInsert:this.insertChange}))},TextAreaEvents}(_react.default.Component);_defineProperty(TextAreaEvents,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement).isRequired,handleChange:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired});var _default={PropertyTab:TextAreaProperties,EventTab:TextAreaEvents,themeValues:_themeValues.default.textArea,create:function create(){var element=document.createElement("div");return element.setAttribute("contenteditable",!0),element.style.width="200px",element.style.height="100px",element.style.borderStyle="solid",_library.default.setAllPropertiesToCurrentTheme(element,_designMode.default.activeScreen()),(0,_jquery.default)(element).addClass("textArea"),this.onDeserialize(element),element},onDeserialize:function onDeserialize(element){elementUtils.setDefaultBorderStyles(element,{textInput:!0}),elementUtils.setDefaultFontFamilyStyle(element),""===element.style.padding&&(element.style.padding=_themeValues.CLASSIC_TEXT_AREA_PADDING),(0,_jquery.default)(element).addClass("textArea"),(0,_jquery.default)(element).on("mousedown",(function(e){Applab.isRunning()||e.preventDefault()})),(0,_jquery.default)(element).on("keydown",(function(e){Applab.isRunning()||e.preventDefault()}))}};exports.default=_default,module.exports=exports.default},"./src/applab/designMode.js":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));__webpack_require__("./node_modules/jquery-ui/ui/effects/effect-drop.js"),__webpack_require__("./node_modules/jquery-ui/ui/widgets/draggable.js"),__webpack_require__("./node_modules/jquery-ui/ui/widgets/droppable.js"),__webpack_require__("./node_modules/jquery-ui/ui/widgets/resizable.js");var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_rgbcolor=_interopRequireDefault(__webpack_require__("./node_modules/rgbcolor/index.js")),_objectFitImages=_interopRequireDefault(__webpack_require__("./node_modules/object-fit-images/dist/ofi.common-js.js")),_DesignWorkspace=_interopRequireDefault(__webpack_require__("./src/applab/DesignWorkspace.jsx")),assetPrefix=_interopRequireWildcard(__webpack_require__("./src/assetManagement/assetPrefix.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),_StudioApp=__webpack_require__("./src/StudioApp.js"),_constants=__webpack_require__("./src/constants.js"),applabConstants=_interopRequireWildcard(__webpack_require__("./src/applab/constants.js")),_sanitizeHtml=_interopRequireDefault(__webpack_require__("./src/applab/sanitizeHtml.js")),utils=_interopRequireWildcard(__webpack_require__("./src/utils.js")),gridUtils=_interopRequireWildcard(__webpack_require__("./src/applab/gridUtils.js")),_logToCloud=_interopRequireDefault(__webpack_require__("./src/logToCloud.js")),_applab=__webpack_require__("./src/applab/redux/applab.js"),screens=_interopRequireWildcard(__webpack_require__("./src/applab/redux/screens.js")),_redux=__webpack_require__("./src/redux.js"),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_project=_interopRequireDefault(__webpack_require__("./src/code-studio/initApp/project.js")),_AssetManager=__webpack_require__("./src/code-studio/components/AssetManager.jsx"),_ai=_interopRequireDefault(__webpack_require__("./src/applab/ai.js")),_MetricsReporter=_interopRequireDefault(__webpack_require__("./src/lib/metrics/MetricsReporter.ts"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i").parent().resizable({create:function create(){(0,_jquery.default)(this).children().css("z-index","")},start:function start(){highlightElement(elm[0])},resize:function resize(event,ui){var scale=getVisualizationScale(),deltaWidth=ui.size.width-ui.originalSize.width,deltaHeight=ui.size.height-ui.originalSize.height,newWidth=ui.originalSize.width+deltaWidth/scale,newHeight=ui.originalSize.height+deltaHeight/scale;newWidth=gridUtils.snapToGridSize(newWidth),newHeight=gridUtils.snapToGridSize(newHeight);var dimensions=function boundedResize(left,top,width,height,preserveAspectRatio){var container=(0,_jquery.default)("#designModeViz"),maxWidth=container.outerWidth()-left,maxHeight=container.outerHeight()-top,newWidth=Math.min(width,maxWidth);newWidth=Math.max(newWidth,20);var newHeight=Math.min(height,maxHeight);if(newHeight=Math.max(newHeight,20),preserveAspectRatio){var ratio=Math.min(newWidth/width,newHeight/height);newWidth=width*ratio,newHeight=height*ratio}return{width:newWidth,height:newHeight}}(ui.position.left,ui.position.top,newWidth,newHeight,!1);ui.element.outerWidth(dimensions.width),ui.element.outerHeight(dimensions.height),elm.is("canvas")&&(elm.attr("width",dimensions.width+"px"),elm.attr("height",dimensions.height+"px")),elm.outerWidth(dimensions.width),elm.outerHeight(dimensions.height),designMode.renderDesignWorkspace(elm[0])}}).draggable({cancel:!1,start:function start(){highlightElement(elm[0]),designMode.setAppSpaceClipping(!1)},drag:function drag(event,ui){var scale=getVisualizationScale(),newLeft=ui.position.left/scale,newTop=ui.position.top/scale;newLeft=gridUtils.snapToGridSize(newLeft),newTop=gridUtils.snapToGridSize(newTop),ui.position.left=newLeft,ui.position.top=newTop,elm.css({left:newLeft,top:newTop}),isMouseEventInBounds(event)?elm.removeClass("toDelete"):elm.addClass("toDelete"),designMode.renderDesignWorkspace(elm[0])},stop:function stop(event,ui){isMouseEventInBounds(event)?designMode.renderDesignWorkspace(elm[0]):ui.helper.hide("drop",{direction:"down"},ANIMATION_LENGTH_MS,(function(){deleteElement(elm[0])})),designMode.setAppSpaceClipping(!0)}}).css({position:"absolute",lineHeight:"0px"});wrapper.css({top:elm.css("top"),left:elm.css("left")});var currHeight=wrapper.parent().height();wrapper.parent().height(currHeight+1),wrapper.parent().height(currHeight),"DIV"===this.tagName&&setTimeout((function(){wrapper.hide().show(0)}),0),elm.css("position","static")})),setTimeout((function(){return(0,_objectFitImages.default)()}),0)}function enforceContainment(left,top,width,height){var container=(0,_jquery.default)("#designModeViz"),maxLeft=container.outerWidth()-width,maxTop=container.outerHeight()-height,newLeft=Math.min(left,maxLeft);newLeft=Math.max(newLeft,0);var newTop=Math.min(top,maxTop);return{left:newLeft,top:newTop=Math.max(newTop,0)}}function isMouseEventInBounds(mouseEvent){var container=(0,_jquery.default)("#designModeViz");return gridUtils.isMouseEventInBounds(mouseEvent,container)}function getVisualizationScale(){var div=document.getElementById("designModeViz");return div.getBoundingClientRect().width/div.offsetWidth}function makeUndraggable(jqueryElements){var foundOne=!1;return jqueryElements.each((function(){var wrapper=(0,_jquery.default)(this),elm=(0,_jquery.default)(getInnerElement(this));wrapper.hasClass("ui-draggable")&&(foundOne=!0,wrapper.resizable("destroy").draggable("destroy"),elm.css("position","absolute"),elm.unwrap())})),foundOne}function highlightElement(element){!function removeElementHighlights(){(0,_jquery.default)("#designModeViz .ui-draggable").css({outlineStyle:"",outlineWidth:""})}(),(0,_jquery.default)(element).is('#designModeViz img[src!=""], #designModeViz label')&&(0,_jquery.default)(element).parent().css({outlineStyle:"dashed",outlineWidth:"1px"})}designMode.onRestoreThemeDefaults=function(element){_firehose.default.putRecord({study:"applab",study_group:"design_mode",event:"restore_theme_defaults",project_id:_project.default.getCurrentId(),data_json:JSON.stringify({elementId:element.id,elementTag:element.tagName,elementClass:element.className})});var currentThemeValue=_library.default.getCurrentTheme(designMode.activeScreen()),themeValues=_library.default.getThemeValues(element),modifiedProperty=!1;for(var propName in batchChangeId++,themeValues){var dataModifiedAttributeName="data-mod-".concat(propName),propTheme=themeValues[propName],currentDefault=propTheme[currentThemeValue],currentPropValue=designMode.readProperty(element,propName);("color"===propTheme.type?new _rgbcolor.default(currentPropValue).toHex()!==new _rgbcolor.default(currentDefault).toHex():currentPropValue!==currentDefault)&&(designMode.updateProperty(element,propName,currentDefault,null,batchChangeId),modifiedProperty=!0),element.removeAttribute(dataModifiedAttributeName)}modifiedProperty&&designMode.renderDesignWorkspace(element)},designMode.changeThemeForElement=function(element,prevThemeValue,themeValue){var themeValues=_library.default.getThemeValues(element),modifiedProperty=!1;for(var propName in batchChangeId++,themeValues){var dataModifiedAttributeName="data-mod-".concat(propName);if(!element.getAttribute(dataModifiedAttributeName)){var propTheme=themeValues[propName],prevDefault=propTheme[prevThemeValue],newDefault=propTheme[themeValue],currentPropValue=designMode.readProperty(element,propName),type=propTheme.type;""===currentPropValue||("color"===type?new _rgbcolor.default(currentPropValue).toHex()===new _rgbcolor.default(prevDefault).toHex():currentPropValue===prevDefault)?(designMode.updateProperty(element,propName,newDefault,null,batchChangeId),modifiedProperty=!0):element.setAttribute(dataModifiedAttributeName,1)}}modifiedProperty&&designMode.renderDesignWorkspace(element)},designMode.changeThemeForScreen=function(screenElement,themeValue){if(!applabConstants.themeOptions.includes(themeValue))throw new Error("Invalid themeValue: ".concat(themeValue));var prevThemeValue=_library.default.getCurrentTheme(screenElement);screenElement.setAttribute("data-theme",themeValue);var currentScreen=(0,_jquery.default)(screenElement),madeUndraggable=makeUndraggable(currentScreen.children());[currentScreen[0]].concat(_toConsumableArray(currentScreen.children().toArray())).forEach((function(element){return designMode.changeThemeForElement(element,prevThemeValue,themeValue)})),madeUndraggable&&makeDraggable(currentScreen.children())},designMode.onCopyElementToScreen=function(element,destScreen){_firehose.default.putRecord({study:"applab",study_group:"design_mode",event:"copy_to_screen",project_id:_project.default.getCurrentId(),data_json:JSON.stringify({elementId:element.id,elementTag:element.tagName,elementClass:element.className,destinationScreen:destScreen})});var sourceElement=(0,_jquery.default)(element),prevThemeName=_library.default.getCurrentTheme(designMode.activeScreen());designMode.changeScreen(destScreen);var madeUndraggable=makeUndraggable(sourceElement.children()),duplicateElement=sourceElement.clone()[0],elementType=_library.default.getElementType(duplicateElement);elementUtils.setId(duplicateElement,_library.default.getUnusedElementId(elementType.toLowerCase())),designMode.changeThemeForElement(duplicateElement,prevThemeName,_library.default.getCurrentTheme(designMode.activeScreen())),designMode.attachElement(duplicateElement),madeUndraggable&&makeDraggable(sourceElement.children());var alert=_react.default.createElement("div",{style:{textAlign:"center"}},"Copied ",_react.default.createElement("b",null,elementUtils.getId(element))," to ",_react.default.createElement("b",null,destScreen)," as"," ",_react.default.createElement("b",null,elementUtils.getId(duplicateElement)));(0,_StudioApp.singleton)().displayPlayspaceAlert(_constants.NOTIFICATION_ALERT_TYPE,alert)},designMode.onDeletePropertiesButton=function(element,event){deleteElement(element)},designMode.onDepthChange=function(element,depthDirection){var removed,outerElement=element.parentNode,parent=outerElement.parentNode,index=Array.prototype.indexOf.call(parent.children,outerElement);switch("forward"===depthDirection&&index+2>=parent.children.length&&(depthDirection="toFront"),depthDirection){case"forward":var twoAhead=outerElement.nextSibling.nextSibling;removed=parent.removeChild(outerElement),parent.insertBefore(removed,twoAhead);break;case"toFront":removed=parent.removeChild(outerElement),parent.appendChild(removed);break;case"backward":var previous=outerElement.previousSibling;if(!previous)return;removed=parent.removeChild(outerElement),parent.insertBefore(removed,previous);break;case"toBack":if(1===parent.children.length)return;removed=parent.removeChild(outerElement),parent.insertBefore(removed,parent.children[0]);break;default:throw new Error("unknown depthDirection: "+depthDirection)}element.focus(),designMode.editElementProperties(element)},designMode.onInsertEvent=function(code){Applab.appendToEditor(code),(0,_redux.getStore)().dispatch(_applab.actions.changeInterfaceMode(ApplabInterfaceMode.CODE)),Applab.scrollToEnd()},designMode.onInsertAICode=function(code){Applab.appendToEditor(code),(0,_redux.getStore)().dispatch(_applab.actions.changeInterfaceMode(ApplabInterfaceMode.DESIGN)),(0,_redux.getStore)().dispatch(_applab.actions.changeInterfaceMode(ApplabInterfaceMode.CODE)),Applab.scrollToEnd()},designMode.serializeToLevelHtml=function(){var designModeViz=(0,_jquery.default)("#designModeViz"),madeUndraggable=makeUndraggable(designModeViz.children().children()),designModeVizClone=designModeViz.clone();(0,_jquery.default)(designModeVizClone).removeClass("withCrosshair"),designModeVizClone.children().each((function(){elementUtils.removeIdPrefix(this)})),designModeVizClone.children().children().each((function(){if(elementUtils.removeIdPrefix(this),"IMG"===this.nodeName){this.style.objectFit="",this.style.backgroundPosition="",this.style.backgroundImage="",this.style.backgroundRepeat="",this.style.backgroundOrigin="",this.style.backgroundSize="",this.style.fontFamily="",this.removeAttribute("data-ofi-undefined");var ofiSrc=this.getAttribute("data-ofi-src");ofiSrc&&(this.src=makeUrlProtocolRelative(ofiSrc),this.removeAttribute("data-ofi-src"))}})),designModeVizClone.find('[data-canonical-image-url^="'+ICON_PREFIX+'"]').each((function(){this.removeAttribute("src"),this.style.backgroundImage=""}));var serialization=designModeVizClone[0]?designModeVizClone[0].outerHTML:"";return madeUndraggable&&makeDraggable(designModeViz.children().children()),Applab.levelHtml=serialization,serialization},designMode.makeUrlProtocolRelative=makeUrlProtocolRelative,designMode.parseScreenFromLevelHtml=function(screenEl,allowDragging,prefix,skipUnknownElements){var screen=(0,_jquery.default)(screenEl);return elementUtils.addIdPrefix(screen[0],prefix),screen.children().each((function(){elementUtils.addIdPrefix(this,prefix)})),allowDragging&&makeDraggable(screen.children()),_library.default.onDeserialize(screen[0],designMode.updateProperty.bind(this)),screen.children().each((function(){var element=(0,_jquery.default)(this).hasClass("ui-draggable")?this.firstChild:this;_library.default.onDeserialize(element,designMode.updateProperty.bind(element),skipUnknownElements)})),screen[0]},designMode.parseFromLevelHtml=function(rootEl,allowDragging,prefix){if(rootEl){for(;rootEl.firstChild;)rootEl.removeChild(rootEl.firstChild);if(Applab.levelHtml){var reportUnsafeHtml=getUnsafeHtmlReporter(rootEl.id),levelDom=_jquery.default.parseHTML((0,_sanitizeHtml.default)(Applab.levelHtml,reportUnsafeHtml,!0));!function sanitizeLevelDom(levelDom){for(var foundSelectors=[],_i=0,_disallowedSelectors=["#codeApp","#visualizationColumn","#visualizationResizeBar",".editor-column"];_i<_disallowedSelectors.length;_i++){var selector=_disallowedSelectors[_i];(0,_jquery.default)(levelDom).find(selector).length>0&&(foundSelectors.push(selector),(0,_jquery.default)(levelDom).find(selector).remove())}foundSelectors.length>0&&_MetricsReporter.default.logWarning({message:"Invalid HTML detected in App Lab project",channelId:Applab.channelId,selectors:foundSelectors})}(levelDom);var children=(0,_jquery.default)(levelDom).children();children.each((function(){designMode.parseScreenFromLevelHtml(this,allowDragging,prefix,!0)})),children.appendTo(rootEl)}}},designMode.setAppSpaceClipping=function(clip){var container=(0,_jquery.default)("#designModeViz");clip?container.delay(ANIMATION_LENGTH_MS).addClass("clip-content",ANIMATION_LENGTH_MS):container.removeClass("clip-content")},designMode.configureDragAndDrop=function(){(0,_jquery.default)("#visualization").droppable({accept:".new-design-element",activate:function activate(event,ui){designMode.setAppSpaceClipping(!1)},deactivate:function deactivate(event,ui){designMode.setAppSpaceClipping(!0)},drop:function drop(event,ui){var elementType=ui.draggable[0].getAttribute("data-element-type"),point=gridUtils.scaledDropPoint(ui.helper),element=designMode.createElement(elementType,point.left,point.top);if(elementType===_library.default.ElementType.SCREEN&&designMode.changeScreen(elementUtils.getId(element)),function moveElementIntoBounds(element){if(0===(0,_jquery.default)(element).parent(".ui-draggable").length)return;var width=parseFloat((0,_jquery.default)(element).css("width")),height=parseFloat((0,_jquery.default)(element).css("height")),elm=(0,_jquery.default)(element).parent(".ui-draggable"),left=parseFloat(elm.css("left")),top=parseFloat(elm.css("top")),newContainedPos=enforceContainment(left,top,width,height);elm.animate({left:newContainedPos.left,top:newContainedPos.top},ANIMATION_LENGTH_MS),(0,_jquery.default)(element).css({left:newContainedPos.left,top:newContainedPos.top})}(element),elementType===_library.default.ElementType.IMAGE){var parent=(0,_jquery.default)(element).parent();if(0===parent.width()){var origLeft=parent.css("left");parent.css("visibility","hidden"),parent.css("left","0px"),setTimeout((function(){parent.css("left",origLeft),parent.css("visibility","")}),1)}}designMode.renderDesignWorkspace(element)}})},designMode.createScreen=function(){var newScreen=_library.default.createElement("SCREEN",0,0);return(0,_jquery.default)("#designModeViz").append(newScreen),elementUtils.getId(newScreen)},designMode.changeScreen=function(screenId){(0,_redux.getStore)().dispatch(screens.changeScreen(screenId))},designMode.getAllScreenIds=function(){return elementUtils.getScreens().get().map((function(screen){return elementUtils.getId(screen)}))},designMode.loadDefaultScreen=function(){var defaultScreen;defaultScreen=0===elementUtils.getScreens().length?designMode.createScreen():elementUtils.getDefaultScreenId(),designMode.changeScreen(defaultScreen)},designMode.renderDesignWorkspace=function(element){var designWorkspace=document.getElementById("designWorkspace");if(designWorkspace){var props={handleDragStart:function handleDragStart(){(0,_jquery.default)("#resetButton").is(":visible")&&(0,_StudioApp.singleton)().resetButtonClick()},element:element||null,elementIdList:Applab.getIdDropdownForCurrentScreen(),handleChange:designMode.onPropertyChange.bind(this,element),onCopyElementToScreen:designMode.onCopyElementToScreen.bind(this,element),onChangeElement:designMode.editElementProperties.bind(this),onDepthChange:designMode.onDepthChange,onDuplicate:designMode.onDuplicate.bind(this,element,null),onRestoreThemeDefaults:designMode.onRestoreThemeDefaults.bind(this,element),onDelete:designMode.onDeletePropertiesButton.bind(this,element),onInsertEvent:designMode.onInsertEvent.bind(this),handleVersionHistory:Applab.handleVersionHistory,isDimmed:Applab.running,screenIds:designMode.getAllScreenIds(),currentTheme:_library.default.getCurrentTheme(designMode.activeScreen()),handleScreenChange:designMode.onPropertyChange.bind(this,designMode.activeScreen()),autogenerateML:_ai.default};_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store:(0,_redux.getStore)()},_react.default.createElement(_DesignWorkspace.default,props)),designWorkspace)}},designMode.addScreenIfNecessary=function(html){var reportUnsafeHtml=getUnsafeHtmlReporter("levelHtml");html=(0,_sanitizeHtml.default)(html,reportUnsafeHtml,!0);var rootDiv=(0,_jquery.default)(html);if(0===rootDiv.children().length||rootDiv.children().eq(0).hasClass("screen"))return html;var screenElement=_library.default.createElement(_library.default.ElementType.SCREEN);return rootDiv.children().appendTo(screenElement),rootDiv.append(screenElement),rootDiv[0].outerHTML},designMode.setAsClipboardElement=function(element){if(element){var madeUndraggable,jqueryElement=(0,_jquery.default)(element),isScreen=jqueryElement.hasClass("screen");isScreen&&(madeUndraggable=makeUndraggable(jqueryElement.children())),clipboardElement=jqueryElement.clone()[0],clipboardElementTheme=_library.default.getCurrentTheme(designMode.activeScreen()),isScreen&&madeUndraggable&&makeDraggable(jqueryElement.children())}},designMode.addKeyboardHandlers=function(){(0,_jquery.default)("#designModeViz").keydown((function(event){if(Applab.isInDesignMode()&&!Applab.isRunning()){if(event.altKey||event.ctrlKey||event.metaKey)switch(event.which){case _constants.KeyCodes.COPY:designMode.setAsClipboardElement(currentlyEditedElement);break;case _constants.KeyCodes.PASTE:if(clipboardElement){var duplicateElement=designMode.onDuplicate(clipboardElement,clipboardElementTheme);designMode.setAsClipboardElement(duplicateElement)}break;default:return}if(currentlyEditedElement&&!(0,_jquery.default)(currentlyEditedElement).hasClass("screen")){var property,newValue;switch(event.which){case _constants.KeyCodes.LEFT:newValue=parseInt(currentlyEditedElement.style.left,10)-1,property="left";break;case _constants.KeyCodes.RIGHT:newValue=parseInt(currentlyEditedElement.style.left,10)+1,property="left";break;case _constants.KeyCodes.UP:newValue=parseInt(currentlyEditedElement.style.top,10)-1,property="top";break;case _constants.KeyCodes.DOWN:newValue=parseInt(currentlyEditedElement.style.top,10)+1,property="top";break;default:return}designMode.onPropertyChange(currentlyEditedElement,property,newValue)}}}))},designMode.resetIds=function(){_library.default.resetIds()},module.exports=exports.default},"./src/applab/designProperties.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/applab/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_library=_interopRequireDefault(__webpack_require__("./src/applab/designElements/library.js")),_DeleteElementButton=_interopRequireDefault(__webpack_require__("./src/applab/designElements/DeleteElementButton.jsx")),_ElementSelect=_interopRequireDefault(__webpack_require__("./src/applab/ElementSelect.jsx")),_DuplicateElementButton=_interopRequireDefault(__webpack_require__("./src/applab/designElements/DuplicateElementButton.jsx")),_CopyElementToScreenButton=_interopRequireDefault(__webpack_require__("./src/applab/designElements/CopyElementToScreenButton.jsx")),_RestoreThemeDefaultsButton=_interopRequireDefault(__webpack_require__("./src/applab/designElements/RestoreThemeDefaultsButton.jsx")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var nextKey=0,DesignProperties=function(_React$Component){function DesignProperties(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{selectedTab:TabType.PROPERTIES}),_defineProperty(_assertThisInitialized(_this),"handleTabClick",(function(newTab){return _this.setState({selectedTab:newTab})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DesignProperties,_React$Component),DesignProperties.prototype.render=function render(){if(!this.props.element||!this.props.element.parentNode)return _react.default.createElement("p",null,_locale.default.designWorkspaceDescription());var key=(0,_jquery.default)(this.props.element).data("key");key||(key=nextKey++,(0,_jquery.default)(this.props.element).data("key",key));var hasCustomizedThemeProps=_designMode.default.hasCustomizedThemeProperties(this.props.element),elementType=_library.default.getElementType(this.props.element),PropertyComponent=_library.default.getElementPropertyTab(elementType),EventComponent=_library.default.getElementEventTab(elementType),isScreen=elementType===_library.default.ElementType.SCREEN,onlyOneScreen=1===this.props.screenIds.length,isOnlyScreen=isScreen&&onlyOneScreen,borderColor=_color.default.lighter_gray,bgColor=_color.default.lightest_gray,baseTabStyle={borderColor,borderStyle:"solid",boxSizing:"border-box",height:35,padding:"0 10px"},styles={activeTab:Object.assign({},baseTabStyle,{backgroundColor:bgColor,borderTopWidth:1,borderRightWidth:1,borderBottomWidth:0,borderLeftWidth:0,float:"left"}),inactiveTab:Object.assign({},baseTabStyle,{borderTopWidth:1,borderRightWidth:1,borderBottomWidth:1,borderLeftWidth:0,float:"left"}),emptyTab:Object.assign({},baseTabStyle,{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:1,borderLeftWidth:0,width:"100%"}),workspaceDescription:{height:28,overflow:"hidden"},workspaceDescriptionText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},workspaceTabs:{borderColor,borderStyle:"solid",borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:1},tabLabel:{lineHeight:"35px",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},workspaceBody:{height:"calc(100% - 83px)",padding:"10px 10px 10px 0",borderColor,borderStyle:"solid",borderTopWidth:0,borderRightWidth:1,borderBottomWidth:1,borderLeftWidth:1,backgroundColor:bgColor},activeBody:{height:"100%",overflowY:"scroll"},inactiveBody:{display:"none",height:"100%",overflowY:"scroll"}};return _react.default.createElement("div",{style:{height:"100%"}},_react.default.createElement("div",{id:"designDescription",style:styles.workspaceDescription},_react.default.createElement("p",{style:styles.workspaceDescriptionText,title:_locale.default.designWorkspaceDescription()},_locale.default.designWorkspaceDescription())),_react.default.createElement("div",{id:"designWorkspaceTabs",style:styles.workspaceTabs},_react.default.createElement("div",{id:"propertiesTab",style:this.state.selectedTab===TabType.PROPERTIES?styles.activeTab:styles.inactiveTab,className:"hover-pointer",onClick:this.handleTabClick.bind(this,TabType.PROPERTIES)},_react.default.createElement("span",{style:styles.tabLabel},_locale.default.designWorkspace_propertiesTab())),_react.default.createElement("div",{id:"eventsTab",style:this.state.selectedTab===TabType.EVENTS?styles.activeTab:styles.inactiveTab,className:"hover-pointer",onClick:this.handleTabClick.bind(this,TabType.EVENTS)},_react.default.createElement("span",{style:styles.tabLabel},_locale.default.designWorkspace_eventsTab())),_react.default.createElement("div",{id:"emptyTab",style:styles.emptyTab},_react.default.createElement(_ElementSelect.default,{onChangeElement:this.props.onChangeElement,elementIdList:this.props.elementIdList,selected:this.props.element}))),_react.default.createElement("div",{id:"designWorkspaceBody",style:styles.workspaceBody},_react.default.createElement("div",{id:"propertiesBody",style:this.state.selectedTab===TabType.PROPERTIES?styles.activeBody:styles.inactiveBody},_react.default.createElement("div",{key},_react.default.createElement("div",{style:{float:"right"}},!isOnlyScreen&&_react.default.createElement(_DeleteElementButton.default,{shouldConfirm:isScreen,handleDelete:this.props.onDelete}),_react.default.createElement(_DuplicateElementButton.default,{handleDuplicate:this.props.onDuplicate}),hasCustomizedThemeProps&&_react.default.createElement(_RestoreThemeDefaultsButton.default,{handleRestore:this.props.onRestoreThemeDefaults}),!onlyOneScreen&&!isScreen&&_react.default.createElement(_CopyElementToScreenButton.default,{handleCopyElementToScreen:this.props.onCopyElementToScreen,screenIds:this.props.screenIds})),_react.default.createElement(PropertyComponent,{element:this.props.element,handleChange:this.props.handleChange,onDepthChange:this.props.onDepthChange}))),_react.default.createElement("div",{id:"eventsBody",style:this.state.selectedTab===TabType.EVENTS?styles.activeBody:styles.inactiveBody},_react.default.createElement(EventComponent,{element:this.props.element,handleChange:this.props.handleChange,onInsertEvent:this.props.onInsertEvent}))))},DesignProperties}(_react.default.Component);exports.default=DesignProperties,_defineProperty(DesignProperties,"propTypes",{element:_propTypes.default.instanceOf(HTMLElement),elementIdList:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,handleChange:_propTypes.default.func.isRequired,onCopyElementToScreen:_propTypes.default.func.isRequired,onChangeElement:_propTypes.default.func.isRequired,onDepthChange:_propTypes.default.func.isRequired,onDuplicate:_propTypes.default.func.isRequired,onRestoreThemeDefaults:_propTypes.default.func.isRequired,onDelete:_propTypes.default.func.isRequired,onInsertEvent:_propTypes.default.func.isRequired,screenIds:_propTypes.default.arrayOf(_propTypes.default.string).isRequired});var TabType={PROPERTIES:"properties",EVENTS:"events"};DesignProperties.TabType=TabType,module.exports=exports.default},"./src/applab/gridUtils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.draggedElementDropPoint=function draggedElementDropPoint(){var draggedElement=getDraggedElement();if(!draggedElement.length)return null;return scaledDropPoint(draggedElement)},exports.getDraggedElement=getDraggedElement,exports.growToGridSize=function growToGridSize(dimension){return 5*Math.ceil(dimension/5)},exports.isDraggableContainer=function isDraggableContainer(element){return(0,_jquery.default)(element).hasClass("ui-draggable")},exports.isMouseEventInBounds=function isMouseEventInBounds(mouseEvent,container){var clientX=mouseEvent.clientX,clientY=mouseEvent.clientY,clientRect=container[0].getBoundingClientRect();return clientX>clientRect.left&&clientXclientRect.top&&clientY{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getImportableProject=function getImportableProject(project){if(!project)return null;var channel=project.channel,sources=project.sources,assets=project.assets,existingAssets=project.existingAssets,screens=[];(0,_jquery.default)(sources.html).find(".screen").css("position","inherit").css("display","block").each((function(index,screen){screens.push(function getImportableScreen(dom){var id=dom.id,willReplace=_designMode.default.getAllScreenIds().includes(id),conflictingIds=[];Array.from(dom.children).forEach((function(child){if(!elementUtils.isIdAvailable(child.id)){var existingElement=elementUtils.getPrefixedElementById(child.id);if(existingElement){var existingElementScreen=(0,_jquery.default)(existingElement).parents(".screen")[0];elementUtils.getId(existingElementScreen)!==id&&conflictingIds.push(child.id)}}}));var assetsToReplace=[],assetsToImport=(0,_jquery.default)("[data-canonical-image-url]",dom).toArray().map((function(n){return(0,_jquery.default)(n).attr("data-canonical-image-url")}));(0,_jquery.default)(dom).is("[data-canonical-image-url]")&&assetsToImport.push((0,_jquery.default)(dom).attr("data-canonical-image-url"));return assetsToImport=assetsToImport.filter((function(asset){return!((0,_jquery.default)('#designModeViz [data-canonical-image-url="'.concat(asset,'"]')).length>0)||(assetsToReplace.push(asset),!1)})),{id,willReplace,assetsToReplace,assetsToImport,conflictingIds,html:dom.outerHTML,canBeImported:0===conflictingIds.length}}(screen))}));var usedAssets={};screens.forEach((function(screen){return screen.assetsToImport.concat(screen.assetsToReplace).forEach((function(asset){return usedAssets[asset]=!0}))}));var existingAssetNames={};existingAssets.forEach((function(asset){return existingAssetNames[asset.filename]=!0}));var otherAssets=assets.filter((function(asset){return!usedAssets[asset.filename]})).map((function(asset){return{filename:asset.filename,category:asset.category,willReplace:!!existingAssetNames[asset.filename]}}));return{id:channel.id,name:channel.name,screens,otherAssets}},exports.importScreensAndAssets=function importScreensAndAssets(projectId,screens,assets){return new Promise((function(resolve,reject){var allAssetsToCopy={};function finishImporting(xhr){screens.forEach((function(importableScreen){var newScreen=importableScreen.html,deleteAfterAdd=elementUtils.getPrefixedElementById(importableScreen.id);_designMode.default.attachElement(_designMode.default.parseScreenFromLevelHtml(newScreen,!0,applabConstants.DESIGN_ELEMENT_ID_PREFIX)),deleteAfterAdd&&_designMode.default.onDeletePropertiesButton(deleteAfterAdd)})),_designMode.default.resetPropertyTab(),resolve(xhr)}assets.forEach((function(asset){return allAssetsToCopy[asset.filename]=!0})),screens.forEach((function(importableScreen){importableScreen.assetsToReplace.forEach((function(asset){return allAssetsToCopy[asset]=!0})),importableScreen.assetsToImport.forEach((function(asset){return allAssetsToCopy[asset]=!0}))})),(allAssetsToCopy=(allAssetsToCopy=Object.keys(allAssetsToCopy)).filter((function(asset){return!DATA_PREFIX_REGEX.test(asset)}))).length>0?_clientApi.assets.copyAssets(projectId,allAssetsToCopy,finishImporting,(function(xhr){console.error("Failed to copy assets:",xhr),reject(xhr)})):finishImporting()}))},exports.importableScreenShape=exports.importableProjectShape=exports.importableAssetShape=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_designMode=_interopRequireDefault(__webpack_require__("./src/applab/designMode.js")),elementUtils=_interopRequireWildcard(__webpack_require__("./src/applab/designElements/elementUtils.js")),applabConstants=_interopRequireWildcard(__webpack_require__("./src/applab/constants.js")),_clientApi=__webpack_require__("./src/clientApi.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var DATA_PREFIX_REGEX=applabConstants.DATA_URL_PREFIX_REGEX,importableScreenShape=_propTypes.default.shape({id:_propTypes.default.string.isRequired,willReplace:_propTypes.default.bool.isRequired,assetsToReplace:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,assetsToImport:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,conflictingIds:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,html:_propTypes.default.string.isRequired,canBeImported:_propTypes.default.bool.isRequired});exports.importableScreenShape=importableScreenShape;var importableAssetShape=_propTypes.default.shape({filename:_propTypes.default.string.isRequired,category:_propTypes.default.string.isRequired,willReplace:_propTypes.default.bool.isRequired});exports.importableAssetShape=importableAssetShape;var importableProjectShape=_propTypes.default.shape({id:_propTypes.default.string.isRequired,name:_propTypes.default.string.isRequired,screens:_propTypes.default.arrayOf(importableScreenShape).isRequired,otherAssets:_propTypes.default.arrayOf(importableAssetShape).isRequired});exports.importableProjectShape=importableProjectShape},"./src/applab/locale-do-not-import.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _safeLoadLocale=_interopRequireDefault(__webpack_require__("./src/util/safeLoadLocale.js")),_i18nStringTracker=_interopRequireDefault(__webpack_require__("./src/util/i18nStringTracker.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var locale=(0,_safeLoadLocale.default)("applab_locale");locale=(0,_i18nStringTracker.default)(locale,"applab"),module.exports=locale},"./src/applab/redux/applab.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.reducers=exports.actions=exports.REDIRECT_RESPONSE=void 0;var _constants=__webpack_require__("./src/applab/constants.js"),_data=_interopRequireDefault(__webpack_require__("./src/storage/redux/data.js")),_screens=_interopRequireDefault(__webpack_require__("./src/applab/redux/screens.js")),_redux=__webpack_require__("./src/lib/tools/jsdebugger/redux.js"),_redux2=__webpack_require__("./src/lib/kits/maker/redux.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0?state.slice(1):state;default:return state}},screens:_screens.default,level:function level(state,action){return state=state||{},"applab/SET_LEVEL_DATA"===action.type?_objectSpread(_objectSpread({},state),action.data):state}});exports.reducers=reducers},"./src/applab/redux/screens.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.changeScreen=void 0,exports.default=function _default(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;return(state=screensReducer(state,action)).set("importProject",importReducer(state.importProject,action))},exports.fetchProject=function fetchProject(url){return function(dispatch){var sources,channel,assets,existingAssets,onError=function onError(){return dispatch({type:IMPORT_PROJECT.FAILED_FETCHING,url})},onSuccess=function onSuccess(){sources&&channel&&assets&&existingAssets&&dispatch({type:IMPORT_PROJECT.FINISHED_FETCHING,url,project:{channel,sources,assets,existingAssets}})},attemptFetchProject=function attemptFetchProject(projectId){_clientApi.assets.getFiles((function(result){existingAssets=result.files,onSuccess()}),onError),_clientApi.assets.withProjectId(projectId).getFiles((function(result){assets=result.files,onSuccess()}),onError),_clientApi.channels.withProjectId(projectId).ajax("GET","",(function(xhr){channel=JSON.parse(xhr.response),onSuccess()}),onError),_clientApi.sources.withProjectId(projectId).ajax("GET","main.json",(function(xhr){sources=JSON.parse(xhr.response),onSuccess()}),onError)};dispatch({type:IMPORT_PROJECT.START_FETCHING,url});var projectId=getProjectIdFromUrl(url);projectId?attemptFetchProject(projectId):_jquery.default.get("/redirected_url?u="+encodeURIComponent(url),(function(response){var projectId=getProjectIdFromUrl(response);projectId?attemptFetchProject(projectId):onError()})).fail(onError)}},exports.importIntoProject=function importIntoProject(projectId,screens,assets){return function(dispatch){dispatch({type:IMPORT_SCREENS.START_IMPORTING,screens,assets}),importFuncs.importScreensAndAssets(projectId,screens,assets).then((function(){if(dispatch({type:IMPORT_SCREENS.FINISHED_IMPORTING}),screens.length>0){var lastScreen=screens[screens.length-1];dispatch(changeScreen(lastScreen.id))}}),(function(){return dispatch({type:IMPORT_SCREENS.FAILED_IMPORTING})}))}},exports.toggleImportScreen=void 0;var _immutable=_interopRequireDefault(__webpack_require__("./node_modules/immutable/dist/immutable.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_clientApi=__webpack_require__("./src/clientApi.js"),importFuncs=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/applab/import.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var IMPORT_PROJECT={START_FETCHING:"screens/importProject/START_FETCHING",FAILED_FETCHING:"screens/importProject/FAILED_FETCHING",FINISHED_FETCHING:"screens/importProject/FINISHED_FETCHING"},IMPORT_SCREENS={START_IMPORTING:"screens/importScreens/START_IMPORTING",FAILED_IMPORTING:"screens/importScreens/FAILED_IMPORTING",FINISHED_IMPORTING:"screens/importScreens/FINISHED_IMPORTING"},ImportProjectState=_immutable.default.Record({isFetchingProject:!1,errorFetchingProject:!1,fetchedProject:null,importableProject:null,isImportingProject:!1,errorImportingProject:!1}),initialState=new(_immutable.default.Record({currentScreenId:null,isImportingScreen:!1,importProject:void 0}));function screensReducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"screens/CHANGE_SCREEN":return state.set("currentScreenId",action.screenId);case"screens/TOGGLE_IMPORT_SCREEN":return state.set("isImportingScreen",action.importing);case IMPORT_SCREENS.FINISHED_IMPORTING:return state.set("isImportingScreen",!1);default:return state}}function importReducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ImportProjectState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"screens/TOGGLE_IMPORT_SCREEN":return new ImportProjectState;case IMPORT_PROJECT.START_FETCHING:return state.set("isFetchingProject",!0);case IMPORT_PROJECT.FINISHED_FETCHING:return state.merge({isFetchingProject:!1,errorFetchingProject:null}).set("fetchedProject",action.project).set("importableProject",importFuncs.getImportableProject(action.project));case IMPORT_PROJECT.FAILED_FETCHING:return state.merge({isFetchingProject:!1,errorFetchingProject:!0});case IMPORT_SCREENS.START_IMPORTING:return state.set("isImportingProject",!0);case IMPORT_SCREENS.FINISHED_IMPORTING:return new ImportProjectState;case IMPORT_SCREENS.FAILED_IMPORTING:return state.merge({isImportingProject:!1,errorImportingProject:!0});default:return state}}var changeScreen=function changeScreen(screenId){return{type:"screens/CHANGE_SCREEN",screenId}};exports.changeScreen=changeScreen;function getProjectIdFromUrl(url){var match=url.match(/projects\/applab\/([^\/]+)/);if(match)return match[1]}exports.toggleImportScreen=function toggleImportScreen(importing){return{type:"screens/TOGGLE_IMPORT_SCREEN",importing}}},"./src/applab/sanitizeHtml.js":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function sanitizeHtml(unsafe,warn,persistingHtml,rejectExistingIds){var warnings=[],standardAttributes=["id","class","data-*","height","spellcheck","style","title","width"],tagsWithStandardAttributes=["b","br","canvas","em","font","h1","h2","h3","h4","h5","h6","hr","i","label","li","ol","option","p","strong","table","td","th","tr","u","ul"];persistingHtml||tagsWithStandardAttributes.push("span");var defaultAttributesMap={};tagsWithStandardAttributes.forEach((function(tag){defaultAttributesMap[tag]=standardAttributes}));var customAttributesMap={button:standardAttributes.concat(["data-canonical-image-url"]),div:standardAttributes.concat(["contenteditable","data-canonical-image-url","data-theme","tabindex","xmlns"]),img:standardAttributes.concat(["data-canonical-image-url","src"]),input:standardAttributes.concat(["autocomplete","checked","max","min","name","placeholder","step","type","value","accept","hidden","capture","readonly"]),select:standardAttributes.concat(["multiple","size"])},tagsWithCustomAttributes=Object.keys(customAttributesMap),allowedTags=_sanitizeHtml.default.defaults.allowedTags.concat(tagsWithStandardAttributes).concat(tagsWithCustomAttributes),allowedAttributes=Object.assign({},_sanitizeHtml.default.defaults.allowedAttributes,defaultAttributesMap,customAttributesMap),safe=(0,_sanitizeHtml.default)(unsafe,{allowedTags,allowedAttributes,allowedSchemes:_sanitizeHtml.default.defaults.allowedSchemes.concat(["data"]),transformTags:{"*":function _(tagName,attribs){return rejectExistingIds&&attribs.id&&!function isIdAvailable(elementId){var options={allowCodeElements:!1,allowDesignElements:!0,allowDesignPrefix:!0};if(!elementUtils.isIdAvailable(elementId,options))return!1;return!0}(attribs.id)&&(warnings.push("element id is already in use: "+attribs.id),delete attribs.id),"password"===attribs.type&&"input"===tagName&&(warnings.push("for security reasons, input type can not be: "+attribs.type),delete attribs.type),{tagName,attribs}}}});"function"==typeof warn&&safe!==unsafe&&function warnAboutUnsafeHtml(warn,unsafe,safe,warnings){var allSchemes=[];allSchemes.indexOf=function(){return 0};var ignoredAttributes=["pmbx_context","kl_vkbd_parsed","kl_virtual_keyboard_secure_input","vk_16761","vk_19391","vk_197cd","_vkenabled","abp"],ignoredTags=["grammarly-btn"],processed=(0,_sanitizeHtml.default)(unsafe,{allowedTags:!1,allowedAttributes:!1,allowedSchemes:allSchemes,transformTags:{"*":function _(tagName,attribs){for(var i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CLASSIC_TEXT_INPUT_PADDING=exports.CLASSIC_TEXT_AREA_PADDING=exports.CLASSIC_DROPDOWN_PADDING=void 0;exports.CLASSIC_TEXT_INPUT_PADDING="5px";exports.CLASSIC_DROPDOWN_PADDING="0 30px 0 10px";exports.CLASSIC_TEXT_AREA_PADDING="5px";var STANDARD_FONT_SIZE_THEME_VALUES={default:13,orange:13,citrus:13,ketchupAndMustard:13,lemonade:13,forest:13,watermelon:13,area51:13,polar:13,glowInTheDark:13,bubblegum:13,millennial:13,robot:13,classic:14,coralReef:13,mintChip:13,lavender:13,cherryVanilla:13,berryPatch:13,cucumber:13,crushedVelvet:13,playtime:13,underTheSea:13,blueAndGold:13,blueSteel:13,darkscheme:13,twoTone:13,pastel:13,peachy:13},TEXT_INPUT_BORDER_COLOR_THEME_VALUES={type:"color",default:"#4D575F",orange:"#FFFFFF",citrus:"#69883D",ketchupAndMustard:"#FFFFFF",lemonade:"#193A55",forest:"#000000",watermelon:"#578B2E",area51:"#D8FFA7",polar:"#FFFFFF",glowInTheDark:"#FFFFFF",bubblegum:"#000000",millennial:"#FFFFFF",robot:"#353C42",classic:"rgb(153, 153, 153)",coralReef:"#D75D52",mintChip:"#3D95A1",lavender:"#8875B1",cherryVanilla:"#A51928",berryPatch:"#DF6589",cucumber:"#209864",crushedVelvet:"#69396D",playtime:"#18BC3C",underTheSea:"#096A6A",blueAndGold:"#FFD662",blueSteel:"#353B51",darkscheme:"#B22D2D",twoTone:"#000000",pastel:"#C87FDB",peachy:"#DF6C06"},_default={screen:{backgroundColor:{type:"color",default:"#FFFFFF",orange:"#FFA400",citrus:"#96C257",ketchupAndMustard:"#EB5757",lemonade:"#FFE049",forest:"#23782B",watermelon:"#C5E255",area51:"#362F49",polar:"#AEE2F4",glowInTheDark:"#7D6CA6",bubblegum:"#FFC3E6",millennial:"#FEDBD0",robot:"#D8E0E3",classic:"#FFFFFF",coralReef:"#5BA0ED",mintChip:"#5CC8D7",lavender:"#A189BA",cherryVanilla:"#FFF5F5",berryPatch:"#64337D",cucumber:"#AAEBDF",crushedVelvet:"#46154A",playtime:"#FCFF5E",underTheSea:"#078282",blueAndGold:"#00539C",blueSteel:"#4B526B",darkscheme:"#000000",twoTone:"#FFFFFF",pastel:"#89BFEC",peachy:"#FFBE7B"}},label:{textColor:{type:"color",default:"#4D575F",orange:"#FFFFFF",citrus:"#F7EC60",ketchupAndMustard:"#FFFFFF",lemonade:"#5BB7E7",forest:"#004624",watermelon:"#E2F0AA",area51:"#D8FFA7",polar:"#EFFAFF",glowInTheDark:"#D9FFD9",bubblegum:"#000000",millennial:"#442C2E",robot:"#F5F5F6",classic:"#333333",coralReef:"#FDF995",mintChip:"#E9FCFF",lavender:"#5E4D83",cherryVanilla:"#A51928",berryPatch:"#3C1053",cucumber:"#209864",crushedVelvet:"#FFFFFF",playtime:"#FFFFFF",underTheSea:"#096A6A",blueAndGold:"#00539C",blueSteel:"#FFFFFF",darkscheme:"#FFFFFF",twoTone:"#000000",pastel:"#A065AF",peachy:"#DF6C06"},backgroundColor:{type:"color",default:"rgba(0, 0, 0, 0)",orange:"#4D3100",citrus:"#69883D",ketchupAndMustard:"#A53D3D",lemonade:"rgba(0, 0, 0, 0)",forest:"rgba(0, 0, 0, 0)",watermelon:"#578B2E",area51:"#221D30",polar:"#0094CA",glowInTheDark:"#635982",bubblegum:"#FFD4ED",millennial:"#FEEAE6",robot:"#80A7B9",classic:"rgba(0, 0, 0, 0)",coralReef:"#FC766A",mintChip:"#4EB4C2",lavender:"#CCB9E1",cherryVanilla:"#F1E2D4",berryPatch:"#FFDBE6",cucumber:"#EFFFF9",crushedVelvet:"#69396D",playtime:"#6AA4FC",underTheSea:"#95DBE5",blueAndGold:"#D1D1D1",blueSteel:"#71788E",darkscheme:"#707070",twoTone:"#FFFFFF",pastel:"#D1F3DF",peachy:"#FBEFB4"},borderColor:TEXT_INPUT_BORDER_COLOR_THEME_VALUES,borderRadius:{default:0,orange:0,citrus:2,ketchupAndMustard:10,lemonade:0,forest:2,watermelon:0,area51:10,polar:2,glowInTheDark:0,bubblegum:10,millennial:4,robot:0,classic:0,coralReef:10,mintChip:10,lavender:10,cherryVanilla:25,berryPatch:30,cucumber:30,crushedVelvet:5,playtime:10,underTheSea:30,blueAndGold:30,blueSteel:30,darkscheme:30,twoTone:30,pastel:30,peachy:30},borderWidth:{default:0,orange:0,citrus:0,ketchupAndMustard:0,lemonade:0,forest:0,watermelon:0,area51:0,polar:0,glowInTheDark:0,bubblegum:0,millennial:0,robot:0,classic:0,coralReef:2,mintChip:2,lavender:1,cherryVanilla:0,berryPatch:2,cucumber:1,crushedVelvet:1,playtime:2,underTheSea:2,blueAndGold:2,blueSteel:0,darkscheme:0,twoTone:0,pastel:2,peachy:1},fontFamily:{default:"Arial Black",orange:"Arial",citrus:"Georgia",ketchupAndMustard:"Georgia",lemonade:"Arial Black",forest:"Verdana",watermelon:"Georgia",area51:"Trebuchet",polar:"Verdana",glowInTheDark:"Tahoma",bubblegum:"Georgia",millennial:"Arial",robot:"Tahoma",classic:"Arial",coralReef:"Arial",mintChip:"Verdana",lavender:"Georgia",cherryVanilla:"Trebuchet",berryPatch:"Trebuchet",cucumber:"Verdana",crushedVelvet:"Verdana",playtime:"Verdana",underTheSea:"Trebuchet",blueAndGold:"Trebuchet",blueSteel:"Trebuchet",darkscheme:"Trebuchet",twoTone:"Trebuchet",pastel:"Trebuchet",peachy:"Verdana"},fontSize:STANDARD_FONT_SIZE_THEME_VALUES,padding:{default:"2px 15px",orange:"2px 15px",citrus:"2px 15px",ketchupAndMustard:"2px 15px",lemonade:"2px 15px",forest:"2px 15px",watermelon:"2px 15px",area51:"2px 15px",polar:"2px 15px",glowInTheDark:"2px 15px",bubblegum:"2px 15px",millennial:"2px 15px",robot:"2px 15px",classic:"2px",coralReef:"2px 15px",mintChip:"2px 15px",lavender:"2px 15px",cherryVanilla:"2px 15px",berryPatch:"2px 15px",cucumber:"2px 15px",crushedVelvet:"2px 15px",playtime:"2px 15px",underTheSea:"2px 15px",blueAndGold:"2px 15px",blueSteel:"2px 15px",darkscheme:"2px 15px",twoTone:"2px 15px",pastel:"2px 15px",peachy:"2px 15px"}},textInput:{textColor:{type:"color",default:"#4D575F",orange:"#FFFFFF",citrus:"#000000",ketchupAndMustard:"#FFFFFF",lemonade:"#00A8FF",forest:"#FFFFFF",watermelon:"#151F00",area51:"#D8FFA7",polar:"#442C2E",glowInTheDark:"#D9FFD9",bubblegum:"#000000",millennial:"#442C2E",robot:"#353C42",classic:"#000000",coralReef:"#5BA0ED",mintChip:"#E5F4F6",lavender:"#5E4D83",cherryVanilla:"#A51928",berryPatch:"#3C1053",cucumber:"#209864",crushedVelvet:"#FFFFFF",playtime:"#FFFFFF",underTheSea:"#096A6A",blueAndGold:"#00539C",blueSteel:"#FFFFFF",darkscheme:"#FFFFFF",twoTone:"#000000",pastel:"#A065AF",peachy:"#DF6C06"},backgroundColor:{type:"color",default:"#F2F2F2",orange:"#B37300",citrus:"#FFFFFF",ketchupAndMustard:"#A53D3D",lemonade:"#FFFFFF",forest:"#004624",watermelon:"#E2F0AA",area51:"#221D30",polar:"#ACCFDE",glowInTheDark:"#4D575F",bubblegum:"#FFD4ED",millennial:"#FEDBD0",robot:"#FFFFFF",classic:"#FFFFFF",coralReef:"#FDF995",mintChip:"#4EB4C2",lavender:"#CCB9E1",cherryVanilla:"#F1E2D4",berryPatch:"#FFDBE6",cucumber:"#EFFFF9",crushedVelvet:"#2D0A30",playtime:"#3EE061",underTheSea:"#95DBE5",blueAndGold:"#D1D1D1",blueSteel:"#71788E",darkscheme:"#707070",twoTone:"#FFFFFF",pastel:"#D1F3DF",peachy:"#FBEFB4"},borderColor:TEXT_INPUT_BORDER_COLOR_THEME_VALUES,borderRadius:{default:4,orange:0,citrus:4,ketchupAndMustard:5,lemonade:4,forest:4,watermelon:0,area51:10,polar:4,glowInTheDark:0,bubblegum:4,millennial:4,robot:0,classic:0,coralReef:10,mintChip:10,lavender:10,cherryVanilla:5,berryPatch:30,cucumber:30,crushedVelvet:5,playtime:10,underTheSea:30,blueAndGold:30,blueSteel:30,darkscheme:30,twoTone:30,pastel:30,peachy:30},borderWidth:{default:1,orange:1,citrus:1,ketchupAndMustard:1,lemonade:1,forest:1,watermelon:2,area51:1,polar:1,glowInTheDark:1,bubblegum:1,millennial:2,robot:1,classic:1,coralReef:2,mintChip:2,lavender:1,cherryVanilla:1,berryPatch:2,cucumber:1,crushedVelvet:1,playtime:2,underTheSea:2,blueAndGold:2,blueSteel:2,darkscheme:2,twoTone:1,pastel:2,peachy:1},fontFamily:{default:"Arial",orange:"Arial",citrus:"Palatino",ketchupAndMustard:"Tahoma",lemonade:"Arial",forest:"Arial",watermelon:"Georgia",area51:"Trebuchet",polar:"Verdana",glowInTheDark:"Tahoma",bubblegum:"Trebuchet",millennial:"Arial",robot:"Tahoma",classic:"Arial",coralReef:"Arial",mintChip:"Verdana",lavender:"Georgia",cherryVanilla:"Trebuchet",berryPatch:"Trebuchet",cucumber:"Verdana",crushedVelvet:"Verdana",playtime:"Verdana",underTheSea:"Trebuchet",blueAndGold:"Trebuchet",blueSteel:"Trebuchet",darkscheme:"Trebuchet",twoTone:"Trebuchet",pastel:"Trebuchet",peachy:"Verdana"},fontSize:STANDARD_FONT_SIZE_THEME_VALUES,padding:{default:"5px 15px",orange:"5px 15px",citrus:"5px 15px",ketchupAndMustard:"5px 15px",lemonade:"5px 15px",forest:"5px 15px",watermelon:"5px 15px",area51:"5px 15px",polar:"5px 15px",glowInTheDark:"5px 15px",bubblegum:"5px 15px",millennial:"5px 15px",robot:"5px 15px",classic:"5px",coralReef:"5px 15px",mintChip:"5px 15px",lavender:"5px 15px",cherryVanilla:"5px 15px",berryPatch:"5px 15px",cucumber:"5px 15px",crushedVelvet:"5px 15px",playtime:"5px 15px",underTheSea:"5px 15px",blueAndGold:"5px 15px",blueSteel:"5px 15px",darkscheme:"5px 15px",twoTone:"5px 15px",pastel:"5px 15px",peachy:"5px 15px"}},dropdown:{backgroundColor:{type:"color",default:"#FFFFFF",orange:"#FFFFFF",citrus:"#F7EC60",ketchupAndMustard:"#F9DD54",lemonade:"#5BB7E7",forest:"#A46C15",watermelon:"#FF8660",area51:"#362F49",polar:"#EFFAFF",glowInTheDark:"#D9FFD9",bubblegum:"#FF7CD0",millennial:"#FFFFFF",robot:"#B2D9EB",classic:"#1ABC9C",coralReef:"#FC766A",mintChip:"#A77D72",lavender:"#8875B1",cherryVanilla:"#A51928",berryPatch:"#DF6589",cucumber:"#52C794",crushedVelvet:"#69396D",playtime:"#6AA4FC",underTheSea:"#096A6A",blueAndGold:"#FFD662",blueSteel:"#353B51",darkscheme:"#B22D2D",twoTone:"#000000",pastel:"#C87FDB",peachy:"#FFA351"},textColor:{type:"color",default:"#4D575F",orange:"#000000",citrus:"#000000",ketchupAndMustard:"#193A55",lemonade:"#FFFFFF",forest:"#FFFFFF",watermelon:"#151F00",area51:"#D8FFA7",polar:"#0094CA",glowInTheDark:"#000000",bubblegum:"#FFFFFF",millennial:"#442C2E",robot:"#353C42",classic:"#FFFFFF",coralReef:"#FDF995",mintChip:"#E9FCFF",lavender:"#FFFFFF",cherryVanilla:"#FFF5F5",berryPatch:"#FFFFFF",cucumber:"#EFFFF9",crushedVelvet:"#FFFFFF",playtime:"#FFFFFF",underTheSea:"#FFFFFF",blueAndGold:"#00539C",blueSteel:"#FFFFFF",darkscheme:"#FFFFFF",twoTone:"#FFFFFF",pastel:"#FFFFFF",peachy:"#FFFFFF"},borderColor:{type:"color",default:"#000000",orange:"#000000",citrus:"#69883D",ketchupAndMustard:"#193A55",lemonade:"#ACCFDE",forest:"#482F08",watermelon:"#578B2E",area51:"#B394FF",polar:"#ACCFDE",glowInTheDark:"#5EFF5E",bubblegum:"#FFFFFF",millennial:"#442C2E",robot:"#80A7B9",classic:"#000000",coralReef:"#D75D52",mintChip:"#B1624E",lavender:"#CCB9E1",cherryVanilla:"#CECECC",berryPatch:"#FFDBE5",cucumber:"#EFFFF9",crushedVelvet:"#2D0A30",playtime:"#4B85DD",underTheSea:"#95DBE5",blueAndGold:"#D1D1D1",blueSteel:"#71788E",darkscheme:"#000000",twoTone:"#000000",pastel:"#D1F3DF",peachy:"#DF6C06"},borderRadius:{default:4,orange:0,citrus:2,ketchupAndMustard:5,lemonade:6,forest:6,watermelon:20,area51:10,polar:20,glowInTheDark:10,bubblegum:20,millennial:20,robot:0,classic:0,coralReef:10,mintChip:10,lavender:10,cherryVanilla:25,berryPatch:30,cucumber:30,crushedVelvet:30,playtime:10,underTheSea:30,blueAndGold:30,blueSteel:30,darkscheme:30,twoTone:30,pastel:30,peachy:30},borderWidth:{default:1,orange:2,citrus:2,ketchupAndMustard:0,lemonade:0,forest:2,watermelon:4,area51:2,polar:2,glowInTheDark:2,bubblegum:2,millennial:0,robot:2,classic:0,coralReef:0,mintChip:0,lavender:0,cherryVanilla:0,berryPatch:0,cucumber:1,crushedVelvet:1,playtime:2,underTheSea:0,blueAndGold:0,blueSteel:0,darkscheme:0,twoTone:0,pastel:0,peachy:0},fontFamily:{default:"Arial",orange:"Verdana",citrus:"Georgia",ketchupAndMustard:"Georgia",lemonade:"Arial",forest:"Verdana",watermelon:"Georgia",area51:"Arial Black",polar:"Verdana",glowInTheDark:"Tahoma",bubblegum:"Georgia",millennial:"Verdana",robot:"Arial Black",classic:"Arial",coralReef:"Arial",mintChip:"Verdana",lavender:"Georgia",cherryVanilla:"Trebuchet",berryPatch:"Trebuchet",cucumber:"Verdana",crushedVelvet:"Verdana",playtime:"Verdana",underTheSea:"Trebuchet",blueAndGold:"Trebuchet",blueSteel:"Trebuchet",darkscheme:"Trebuchet",twoTone:"Trebuchet",pastel:"Trebuchet",peachy:"Verdana"},fontSize:STANDARD_FONT_SIZE_THEME_VALUES,padding:{default:"0 30px 0 15px",orange:"0 30px 0 15px",citrus:"0 30px 0 15px",ketchupAndMustard:"0 30px 0 15px",lemonade:"0 30px 0 15px",forest:"0 30px 0 15px",watermelon:"0 30px 0 15px",area51:"0 30px 0 15px",polar:"0 30px 0 15px",glowInTheDark:"0 30px 0 15px",bubblegum:"0 30px 0 15px",millennial:"0 30px 0 15px",robot:"0 30px 0 15px",classic:"0 30px 0 10px",coralReef:"0 30px 0 15px",mintChip:"0 30px 0 15px",lavender:"0 30px 0 15px",cherryVanilla:"0 30px 0 15px",berryPatch:"0 30px 0 15px",cucumber:"0 30px 0 15px",crushedVelvet:"0 30px 0 15px",playtime:"0 30px 0 15px",underTheSea:"0 30px 0 15px",blueAndGold:"0 30px 0 15px",blueSteel:"0 30px 0 15px",darkscheme:"0 30px 0 15px",twoTone:"0 30px 0 15px",pastel:"0 30px 0 15px",peachy:"0 30px 0 15px"}},photoSelect:{backgroundColor:{type:"color",default:"#FFA400",orange:"#4BC6D0",citrus:"#F7EC60",ketchupAndMustard:"#F9DD54",lemonade:"#5BB7E7",forest:"#A46C15",watermelon:"#FF8660",area51:"#362F49",polar:"#EFFAFF",glowInTheDark:"#D9FFD9",bubblegum:"#FF7CD0",millennial:"#442C2E",robot:"#B2D9EB",classic:"#1ABC9C",coralReef:"#FC766A",mintChip:"#A77D72",lavender:"#8875B1",cherryVanilla:"#A51928",berryPatch:"#DF6589",cucumber:"#52C794",crushedVelvet:"#69396D",playtime:"#FF7B70",underTheSea:"#096A6A",blueAndGold:"#FFD662",blueSteel:"#353B51",darkscheme:"#B22D2D",twoTone:"#000000",pastel:"#C87FDB",peachy:"#FFA351"},textColor:{type:"color",default:"#FFFFFF",orange:"#FFFFFF",citrus:"#000000",ketchupAndMustard:"#193A55",lemonade:"#FFFFFF",forest:"#FFFFFF",watermelon:"#151F00",area51:"#D8FFA7",polar:"#0094CA",glowInTheDark:"#000000",bubblegum:"#FFFFFF",millennial:"#FFFFFF",robot:"#353C42",classic:"#FFFFFF",coralReef:"#FDF995",mintChip:"#E9FCFF",lavender:"#FFFFFF",cherryVanilla:"#FFF5F5",berryPatch:"#FFFFFF",cucumber:"#FFFFFF",crushedVelvet:"#FFFFFF",playtime:"#FFFFFF",underTheSea:"#FFFFFF",blueAndGold:"#00539C",blueSteel:"#FFFFFF",darkscheme:"#FFFFFF",twoTone:"#FFFFFF",pastel:"#FFFFFF",peachy:"#FFFFFF"},borderColor:{type:"color",default:"#4D575F",orange:"#FFFFFF",citrus:"#69883D",ketchupAndMustard:"#193A55",lemonade:"#ACCFDE",forest:"#482F08",watermelon:"#578B2E",area51:"#B394FF",polar:"#ACCFDE",glowInTheDark:"#5EFF5E",bubblegum:"#FFFFFF",millennial:"#FFFFFF",robot:"#80A7B9",classic:"#000000",coralReef:"#FDF995",mintChip:"#D75D52",lavender:"#CCB9E1",cherryVanilla:"#CECECC",berryPatch:"#FFDBE5",cucumber:"#EFFFF9",crushedVelvet:"#2D0A30",playtime:"#DA5145",underTheSea:"#95DBE5",blueAndGold:"#D1D1D1",blueSteel:"#71788E",darkscheme:"#000000",twoTone:"#000000",pastel:"#D1F3DF",peachy:"#DF6C06"},borderRadius:{default:4,orange:0,citrus:2,ketchupAndMustard:5,lemonade:6,forest:6,watermelon:20,area51:10,polar:20,glowInTheDark:10,bubblegum:20,millennial:20,robot:0,classic:0,coralReef:10,mintChip:10,lavender:10,cherryVanilla:25,berryPatch:30,cucumber:30,crushedVelvet:30,playtime:10,underTheSea:30,blueAndGold:30,blueSteel:30,darkscheme:30,twoTone:30,pastel:30,peachy:30},borderWidth:{default:1,orange:2,citrus:2,ketchupAndMustard:0,lemonade:0,forest:2,watermelon:4,area51:2,polar:2,glowInTheDark:2,bubblegum:2,millennial:0,robot:2,classic:0,coralReef:2,mintChip:0,lavender:0,cherryVanilla:0,berryPatch:0,cucumber:1,crushedVelvet:2,playtime:2,underTheSea:0,blueAndGold:2,blueSteel:2,darkscheme:0,twoTone:0,pastel:0,peachy:0}},button:{backgroundColor:{type:"color",default:"#FFA400",orange:"#4BC6D0",citrus:"#F7EC60",ketchupAndMustard:"#F9DD54",lemonade:"#5BB7E7",forest:"#A46C15",watermelon:"#FF8660",area51:"#362F49",polar:"#EFFAFF",glowInTheDark:"#D9FFD9",bubblegum:"#FF7CD0",millennial:"#442C2E",robot:"#B2D9EB",classic:"#1ABC9C",coralReef:"#FC766A",mintChip:"#A77D72",lavender:"#8875B1",cherryVanilla:"#A51928",berryPatch:"#DF6589",cucumber:"#52C794",crushedVelvet:"#69396D",playtime:"#FF7B70",underTheSea:"#096A6A",blueAndGold:"#FFD662",blueSteel:"#353B51",darkscheme:"#B22D2D",twoTone:"#000000",pastel:"#C87FDB",peachy:"#FFA351"},textColor:{type:"color",default:"#FFFFFF",orange:"#FFFFFF",citrus:"#000000",ketchupAndMustard:"#193A55",lemonade:"#FFFFFF",forest:"#FFFFFF",watermelon:"#151F00",area51:"#D8FFA7",polar:"#0094CA",glowInTheDark:"#000000",bubblegum:"#FFFFFF",millennial:"#FFFFFF",robot:"#353C42",classic:"#FFFFFF",coralReef:"#FDF995",mintChip:"#E9FCFF",lavender:"#FFFFFF",cherryVanilla:"#FFF5F5",berryPatch:"#FFFFFF",cucumber:"#FFFFFF",crushedVelvet:"#FFFFFF",playtime:"#FFFFFF",underTheSea:"#FFFFFF",blueAndGold:"#00539C",blueSteel:"#FFFFFF",darkscheme:"#FFFFFF",twoTone:"#FFFFFF",pastel:"#FFFFFF",peachy:"#FFFFFF"},borderColor:{type:"color",default:"#4D575F",orange:"#FFFFFF",citrus:"#69883D",ketchupAndMustard:"#193A55",lemonade:"#ACCFDE",forest:"#482F08",watermelon:"#578B2E",area51:"#B394FF",polar:"#ACCFDE",glowInTheDark:"#5EFF5E",bubblegum:"#FFFFFF",millennial:"#FFFFFF",robot:"#80A7B9",classic:"#000000",coralReef:"#FDF995",mintChip:"#D75D52",lavender:"#CCB9E1",cherryVanilla:"#CECECC",berryPatch:"#FFDBE5",cucumber:"#EFFFF9",crushedVelvet:"#2D0A30",playtime:"#DA5145",underTheSea:"#95DBE5",blueAndGold:"#D1D1D1",blueSteel:"#71788E",darkscheme:"#000000",twoTone:"#000000",pastel:"#D1F3DF",peachy:"#DF6C06"},borderRadius:{default:4,orange:0,citrus:2,ketchupAndMustard:5,lemonade:6,forest:6,watermelon:20,area51:10,polar:20,glowInTheDark:10,bubblegum:20,millennial:20,robot:0,classic:0,coralReef:10,mintChip:10,lavender:10,cherryVanilla:25,berryPatch:30,cucumber:30,crushedVelvet:30,playtime:10,underTheSea:30,blueAndGold:30,blueSteel:30,darkscheme:30,twoTone:30,pastel:30,peachy:30},borderWidth:{default:1,orange:2,citrus:2,ketchupAndMustard:0,lemonade:0,forest:2,watermelon:4,area51:2,polar:2,glowInTheDark:2,bubblegum:2,millennial:0,robot:2,classic:0,coralReef:2,mintChip:0,lavender:0,cherryVanilla:0,berryPatch:0,cucumber:1,crushedVelvet:2,playtime:2,underTheSea:0,blueAndGold:2,blueSteel:2,darkscheme:0,twoTone:0,pastel:0,peachy:0},fontFamily:{default:"Arial Black",orange:"Verdana",citrus:"Georgia",ketchupAndMustard:"Georgia",lemonade:"Arial",forest:"Verdana",watermelon:"Georgia",area51:"Arial Black",polar:"Verdana",glowInTheDark:"Tahoma",bubblegum:"Georgia",millennial:"Verdana",robot:"Arial Black",classic:"Arial",coralReef:"Arial Black",mintChip:"Verdana",lavender:"Georgia",cherryVanilla:"Trebuchet",berryPatch:"Trebuchet",cucumber:"Verdana",crushedVelvet:"Verdana",playtime:"Verdana",underTheSea:"Trebuchet",blueAndGold:"Trebuchet",blueSteel:"Trebuchet",darkscheme:"Trebuchet",twoTone:"Trebuchet",pastel:"Trebuchet",peachy:"Verdana"},fontSize:{default:15,orange:15,citrus:15,ketchupAndMustard:15,lemonade:15,forest:15,watermelon:15,area51:15,polar:15,glowInTheDark:15,bubblegum:15,millennial:15,robot:15,classic:14,coralReef:15,mintChip:15,lavender:15,cherryVanilla:15,berryPatch:15,cucumber:15,crushedVelvet:15,playtime:15,underTheSea:15,blueAndGold:15,blueSteel:15,darkscheme:15,twoTone:15,pastel:15,peachy:15}},textArea:{backgroundColor:{type:"color",default:"#F2F2F2",orange:"#4D3100",citrus:"#FFFFFF",ketchupAndMustard:"#FFFFFF",lemonade:"#FFFFFF",forest:"#FFD18A",watermelon:"#E2F0AA",area51:"#221D30",polar:"#0094CA",glowInTheDark:"#262B2F",bubblegum:"#FFFFFF",millennial:"#FEEAE6",robot:"#F5F5F6",classic:"#FFFFFF",coralReef:"#FDF995",mintChip:"#4EB4C2",lavender:"#CCB9E1",cherryVanilla:"#F1E2D4",berryPatch:"#FFDBE6",cucumber:"#EFFFF9",crushedVelvet:"#2D0A30",playtime:"#3EE061",underTheSea:"#95DBE5",blueAndGold:"#D1D1D1",blueSteel:"#71788E",darkscheme:"#707070",twoTone:"#FFFFFF",pastel:"#D1F3DF",peachy:"#FBEFB4"},textColor:{type:"color",default:"#4D575F",orange:"#FFFFFF",citrus:"#000000",ketchupAndMustard:"#193A55",lemonade:"#00A8FF",forest:"#482F08",watermelon:"#151F00",area51:"#C4ABFF",polar:"#EFFAFF",glowInTheDark:"#D9FFD9",bubblegum:"#000000",millennial:"#442C2E",robot:"#353C42",classic:"#000000",coralReef:"#5BA0ED",mintChip:"#E5F4F6",lavender:"#5E4D83",cherryVanilla:"#A51928",berryPatch:"#3C1053",cucumber:"#209864",crushedVelvet:"#FFFFFF",playtime:"#FFFFFF",underTheSea:"#096A6A",blueAndGold:"#00539C",blueSteel:"#FFFFFF",darkscheme:"#FFFFFF",twoTone:"#000000",pastel:"#A065AF",peachy:"#DF6C06"},borderColor:{type:"color",default:"#FFFFFF",orange:"#FFFFFF",citrus:"#69883D",ketchupAndMustard:"#193A55",lemonade:"#193A55",forest:"#000000",watermelon:"#578B2E",area51:"#C4ABFF",polar:"#FFFFFF",glowInTheDark:"#FFFFFF",bubblegum:"#000000",millennial:"#FFFFFF",robot:"#80A7B9",classic:"rgb(153, 153, 153)",coralReef:"#D75D52",mintChip:"#D75D52",lavender:"#CECECC",cherryVanilla:"#CECECC",berryPatch:"#CECECC",cucumber:"#209864",crushedVelvet:"#69396D",playtime:"#18BC3C",underTheSea:"#096A6A",blueAndGold:"#FFD662",blueSteel:"#4B526B",darkscheme:"#000000",twoTone:"#000000",pastel:"#C87FDB",peachy:"#CECECC"},borderRadius:{default:2,orange:2,citrus:4,ketchupAndMustard:5,lemonade:6,forest:5,watermelon:20,area51:20,polar:8,glowInTheDark:0,bubblegum:8,millennial:8,robot:0,classic:0,coralReef:10,mintChip:10,lavender:10,cherryVanilla:5,berryPatch:30,cucumber:30,crushedVelvet:5,playtime:10,underTheSea:30,blueAndGold:30,blueSteel:30,darkscheme:30,twoTone:30,pastel:30,peachy:30},borderWidth:{default:1,orange:0,citrus:0,ketchupAndMustard:2,lemonade:0,forest:0,watermelon:0,area51:0,polar:2,glowInTheDark:0,bubblegum:0,millennial:0,robot:1,classic:1,coralReef:0,mintChip:0,lavender:0,cherryVanilla:0,berryPatch:0,cucumber:0,crushedVelvet:1,playtime:0,underTheSea:0,blueAndGold:0,blueSteel:0,darkscheme:1,twoTone:1,pastel:0,peachy:0},fontFamily:{default:"Arial",orange:"Arial",citrus:"Palatino",ketchupAndMustard:"Tahoma",lemonade:"Arial",forest:"Arial",watermelon:"Georgia",area51:"Trebuchet",polar:"Arial",glowInTheDark:"Tahoma",bubblegum:"Trebuchet",millennial:"Arial",robot:"Tahoma",classic:"Arial",coralReef:"Arial",mintChip:"Verdana",lavender:"Georgia",cherryVanilla:"Trebuchet",berryPatch:"Trebuchet",cucumber:"Verdana",crushedVelvet:"Verdana",playtime:"Verdana",underTheSea:"Trebuchet",blueAndGold:"Trebuchet",blueSteel:"Trebuchet",darkscheme:"Trebuchet",twoTone:"Trebuchet",pastel:"Trebuchet",peachy:"Verdana"},fontSize:STANDARD_FONT_SIZE_THEME_VALUES,padding:{default:"5px 15px",orange:"5px 15px",citrus:"5px 15px",ketchupAndMustard:"5px 15px",lemonade:"5px 15px",forest:"5px 15px",watermelon:"5px 15px",area51:"5px 15px",polar:"5px 15px",glowInTheDark:"5px 15px",bubblegum:"5px 15px",millennial:"5px 15px",robot:"5px 15px",classic:"5px",coralReef:"5px 15px",mintChip:"5px 15px",lavender:"5px 15px",cherryVanilla:"5px 15px",berryPatch:"5px 15px",cucumber:"5px 15px",crushedVelvet:"5px 15px",playtime:"5px 15px",underTheSea:"5px 15px",blueAndGold:"5px 15px",blueSteel:"5px 15px",darkscheme:"5px 15px",twoTone:"5px 15px",pastel:"5px 15px",peachy:"5px 15px"}}};exports.default=_default},"./src/assetManagement/assetPrefix.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.STARTER_ASSET_PREFIX_REGEX=exports.STARTER_ASSET_PREFIX=exports.SOUND_PREFIX_REGEX=exports.SOUND_PREFIX=exports.ICON_PREFIX_REGEX=exports.ICON_PREFIX=exports.DEFAULT_SOUND_PATH_PREFIX=exports.DATA_URL_PREFIX_REGEX=exports.ABSOLUTE_REGEXP=void 0,exports.fixPath=function fixPath(filename){var _state$pageConstants;if(ABSOLUTE_REGEXP.test(filename)&&"file:"!==window.location.protocol)return ABSOLUTE_CDO_CURRICULUM_REGEXP.test(filename)||ABSOLUTE_CDO_IMAGES_REGEXP.test(filename)?filename:MEDIA_PROXY+encodeURIComponent(filename.replace(/ /g,"%20"));if(0===(filename=filename||"").length)return"/blockly/media/1x1.gif";if(SOUND_PREFIX_REGEX.test(filename))return filename.replace("sound://",soundPathPrefix);var state=(0,_redux.getStore)().getState();null!==(_state$pageConstants=state.pageConstants)&&void 0!==_state$pageConstants&&_state$pageConstants.isCurriculumLevel||(filename=filename.replace("image://",""));if(STARTER_ASSET_PREFIX_REGEX.test(filename))return filename.replace("image://",function starterAssetPathPrefix(levelName){return"/level_starter_assets/".concat(levelName,"/")}(state.level.name));if(-1!==filename.indexOf("/")||!channelId)return filename;return assetPathPrefix+channelId+"/"+encodeURIComponent(filename)},exports.init=function init(config){assetPathPrefix=config.assetPathPrefix||"/v3/assets/",soundPathPrefix=config.soundPathPrefix||"/api/v1/sound-library/",channelId=config.channel||DEFAULT_CHANNEL_ID},exports.renderIconToString=function renderIconToString(value,element){var canvas=document.createElement("canvas");canvas.width=canvas.height=400;var ctx=canvas.getContext("2d");ctx.font="300px FontAwesome, serif",ctx.textBaseline="middle",ctx.textAlign="center",ctx.fillStyle=element.getAttribute("data-icon-color")||"#000";var regex=new RegExp("^icon://fa-"),character="0x"+_icons.unicode[value.replace(regex,"")];return ctx.fillText(String.fromCharCode(character),200,200),canvas.toDataURL()};var _icons=__webpack_require__("./src/code-studio/components/icons.js"),_redux=__webpack_require__("./src/redux.js"),MEDIA_PROXY="//"+location.host+"/media?u=",ABSOLUTE_REGEXP=new RegExp("^https?://","i");exports.ABSOLUTE_REGEXP=ABSOLUTE_REGEXP;var ABSOLUTE_CDO_CURRICULUM_REGEXP=new RegExp("^https://curriculum.code.org/","i"),ABSOLUTE_CDO_IMAGES_REGEXP=new RegExp("^https://images.code.org/","i"),DATA_URL_PREFIX_REGEX=new RegExp("^data:image");exports.DATA_URL_PREFIX_REGEX=DATA_URL_PREFIX_REGEX;exports.ICON_PREFIX="icon://";var ICON_PREFIX_REGEX=new RegExp("^icon://");exports.ICON_PREFIX_REGEX=ICON_PREFIX_REGEX;exports.SOUND_PREFIX="sound://";var SOUND_PREFIX_REGEX=new RegExp("^sound://");exports.SOUND_PREFIX_REGEX=SOUND_PREFIX_REGEX;exports.STARTER_ASSET_PREFIX="image://";var STARTER_ASSET_PREFIX_REGEX=new RegExp("^image://");exports.STARTER_ASSET_PREFIX_REGEX=STARTER_ASSET_PREFIX_REGEX;exports.DEFAULT_SOUND_PATH_PREFIX="/api/v1/sound-library/";var DEFAULT_CHANNEL_ID=void 0,assetPathPrefix="/v3/assets/",soundPathPrefix="/api/v1/sound-library/",channelId=undefined},"./src/authoredHintUtils.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_feedbackBlocks=_interopRequireDefault(__webpack_require__("./src/feedbackBlocks.js")),_utils=__webpack_require__("./src/utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var parseXmlElement=__webpack_require__("./src/xml.js").parseElement,msg=__webpack_require__("./src/util/locale-do-not-import.js"),authoredHintUtils={};module.exports=authoredHintUtils,authoredHintUtils.getFromLocalStorage_=function(key,defaultValue){var result=localStorage.getItem(key);try{result=result?JSON.parse(result):defaultValue}catch(e){result=defaultValue}return result},authoredHintUtils.getUnfinishedHints_=function(){return authoredHintUtils.getFromLocalStorage_("unfinished_authored_hint_views",[])},authoredHintUtils.getFinishedHints_=function(){return authoredHintUtils.getFromLocalStorage_("finished_authored_hint_views",[])},authoredHintUtils.getLastAttemptRecord_=function(){return authoredHintUtils.getFromLocalStorage_("last_attempt_record",void 0)},authoredHintUtils.recordFinishedHints_=function(hints){var finishedHintViews=authoredHintUtils.getFinishedHints_();finishedHintViews=finishedHintViews.concat(hints),(0,_utils.trySetLocalStorage)("finished_authored_hint_views",JSON.stringify(finishedHintViews))},authoredHintUtils.clearUnfinishedHints=function(){(0,_utils.trySetLocalStorage)("unfinished_authored_hint_views",JSON.stringify([]))},authoredHintUtils.clearFinishedHints_=function(){(0,_utils.trySetLocalStorage)("finished_authored_hint_views",JSON.stringify([]))},authoredHintUtils.finalizeHints_=function(){var finalAttemptRecord=authoredHintUtils.getLastAttemptRecord_();localStorage.removeItem("last_attempt_record");var hints=authoredHintUtils.getFinishedHints_();return finalAttemptRecord&&(hints=hints.map((function(hint){return hint=Object.assign({finalTime:finalAttemptRecord.time,finalAttempt:finalAttemptRecord.attempt,finalTestResult:finalAttemptRecord.testResult,finalActivityId:finalAttemptRecord.activityId,finalLevelSourceId:finalAttemptRecord.levelSourceId},hint)}))),hints},authoredHintUtils.recordUnfinishedHint=function(hint){var lastAttemptRecord=authoredHintUtils.getLastAttemptRecord_();lastAttemptRecord&&(hint=Object.assign({prevTime:lastAttemptRecord.time,prevAttempt:lastAttemptRecord.attempt,prevTestResult:lastAttemptRecord.testResult,prevActivityId:lastAttemptRecord.activityId,prevLevelSourceId:lastAttemptRecord.levelSourceId},hint));var unfinishedHintViews=authoredHintUtils.getUnfinishedHints_();unfinishedHintViews.push(hint),(0,_utils.trySetLocalStorage)("unfinished_authored_hint_views",JSON.stringify(unfinishedHintViews))},authoredHintUtils.finishHints=function(nextAttemptRecord){if(nextAttemptRecord){(0,_utils.trySetLocalStorage)("last_attempt_record",JSON.stringify(nextAttemptRecord));var unfinishedHintViews=authoredHintUtils.getUnfinishedHints_();authoredHintUtils.clearUnfinishedHints();var finishedHintViews=unfinishedHintViews.map((function(hint){return hint=Object.assign({nextTime:nextAttemptRecord.time,nextAttempt:nextAttemptRecord.attempt,nextTestResult:nextAttemptRecord.testResult,nextActivityId:nextAttemptRecord.activityId,nextLevelSourceId:nextAttemptRecord.levelSourceId},hint)}));authoredHintUtils.recordFinishedHints_(finishedHintViews)}},authoredHintUtils.submitHints=function(url){var unfinishedHints=authoredHintUtils.getUnfinishedHints_();if(unfinishedHints&&unfinishedHints.length){var finalHint=unfinishedHints[unfinishedHints.length-1];authoredHintUtils.finishHints({time:finalHint.prevTime,attempt:finalHint.prevAttempt,testResult:finalHint.prevTestResult,activityId:finalHint.prevActivityId,levelSourceId:finalHint.prevLevelSourceId})}var hints=authoredHintUtils.finalizeHints_();hints&&hints.length&&_jquery.default.ajax({url,method:"POST",contentType:"application/json",data:JSON.stringify({hints}),complete:function complete(){authoredHintUtils.clearFinishedHints_()}})},authoredHintUtils.createContextualHintsFromBlocks=function(blocks){return blocks.map((function(block){var xmlBlock=parseXmlElement(_feedbackBlocks.default.generateXMLForBlocks([block])),blockType=xmlBlock.firstChild.getAttribute("type");return{markdown:msg.recommendedBlockContextualHintTitle(),ttsMessage:msg.recommendedBlockContextualHintTitle(),block:xmlBlock,hintId:"recommended_block_"+blockType,hintClass:"recommended",hintType:"contextual",alreadySeen:block.alreadySeen}}))},authoredHintUtils.generateAuthoredHints=function(levelBuilderAuthoredHints){var hints;try{hints=JSON.parse(levelBuilderAuthoredHints)}catch(e){hints=[]}return hints.map((function(hint){return{markdown:hint.hint_markdown,hintId:hint.hint_id,hintClass:hint.hint_class,hintType:hint.hint_type,hintPath:JSON.parse(hint.hint_path||"[]"),hintVideo:hint.hint_video||void 0,ttsUrl:hint.tts_url,alreadySeen:!1}}))},authoredHintUtils.currentOpenedHintCount=function(levelId){var unfinished=authoredHintUtils.getUnfinishedHints_(),finished=authoredHintUtils.getFinishedHints_();return unfinished.concat(finished).filter((function(hint){return hint.levelId===levelId})).length}},"./src/authoredHints.js":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _authoredHintUtils=_interopRequireDefault(__webpack_require__("./src/authoredHintUtils.js")),_redux=__webpack_require__("./src/redux.js"),_instructions=__webpack_require__("./src/redux/instructions.js"),_authoredHints=__webpack_require__("./src/redux/authoredHints.js"),_constants=__webpack_require__("./src/constants.js"),_utils=__webpack_require__("./src/utils.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var AuthoredHints=function(){function AuthoredHints(studioApp){this.studioApp_=studioApp,this.scriptId_=void 0,this.levelId_=void 0}var _proto=AuthoredHints.prototype;return _proto.getUnseenHints=function getUnseenHints(){return(0,_redux.getStore)().getState().authoredHints.unseenHints},_proto.getSeenHints=function getSeenHints(){return(0,_redux.getStore)().getState().authoredHints.seenHints},_proto.displayMissingBlockHints=function displayMissingBlockHints(blocks){var newContextualHints=_authoredHintUtils.default.createContextualHintsFromBlocks(blocks);(0,_redux.getStore)().dispatch((0,_authoredHints.displayMissingBlockHints)(newContextualHints)),newContextualHints.length>0&&this.getUnseenHints().length>0&&(0,_redux.getStore)().dispatch((0,_instructions.setHasAuthoredHints)(!0))},_proto.finishHints=function finishHints(response){_authoredHintUtils.default.finishHints({time:(new Date).getTime()-this.studioApp_.initTime,attempt:this.studioApp_.attempts,testResult:this.studioApp_.lastTestResult,activityId:response&&response.activity_id,levelSourceId:response&&response.level_source_id})},_proto.submitHints=function submitHints(url){_authoredHintUtils.default.submitHints(url)},_proto.init=function init(hints,hintsUsedIds,scriptId,levelId){this.scriptId_=scriptId,this.levelId_=levelId,hints&&hints.length>0&&((0,_redux.getStore)().dispatch((0,_authoredHints.enqueueHints)(hints,hintsUsedIds)),(0,_redux.getStore)().dispatch((0,_instructions.setHasAuthoredHints)(!0)))},_proto.showNextHint=function showNextHint(){if(0!==this.getUnseenHints().length){var hint=this.getUnseenHints()[0];if(this.recordUserViewedHint_(hint),hint.hintPath&&hint.hintPath.length){var event=(0,_utils.createEvent)("displayHintPath");event.detail=hint.hintPath,window.dispatchEvent(event)}return hint}},_proto.recordUserViewedHint_=function recordUserViewedHint_(hint){(0,_redux.getStore)().dispatch((0,_authoredHints.showNextHint)(hint)),_authoredHintUtils.default.recordUnfinishedHint({scriptId:this.scriptId_,levelId:this.levelId_,hintId:hint.hintId,hintClass:hint.hintClass,hintType:hint.hintType})},_proto.getOnetimeHintPromptSeenLevelIds=function getOnetimeHintPromptSeenLevelIds(){var sessionValue=(0,_utils.tryGetSessionStorage)("hint_prompt_seen_levels","[]");return JSON.parse(sessionValue||"[]")},_proto.onetimeHintPromptSeenThisLevel=function onetimeHintPromptSeenThisLevel(){var thisLevel=this.levelId_;return this.getOnetimeHintPromptSeenLevelIds().includes(thisLevel)},_proto.shouldShowOnetimeHintPrompt=function shouldShowOnetimeHintPrompt(){var puzzleUnpassed=this.studioApp_.lastTestResult<_constants.TestResults.MINIMUM_PASS_RESULT,hintsAvailable=this.getUnseenHints().length>0,notSeenHintPromptThisLevel=!this.onetimeHintPromptSeenThisLevel(),noHintsViewed=0===this.getSeenHints().length,runsOverThreshold=this.studioApp_.attempts>=this.studioApp_.config.level.hintPromptAttemptsThreshold;return puzzleUnpassed&&hintsAvailable&¬SeenHintPromptThisLevel&&noHintsViewed&&runsOverThreshold},_proto.considerShowingOnetimeHintPrompt=function considerShowingOnetimeHintPrompt(){this.shouldShowOnetimeHintPrompt()&&this.showOnetimeHintPrompt()},_proto.showOnetimeHintPrompt=function showOnetimeHintPrompt(){var seenLevels=this.getOnetimeHintPromptSeenLevelIds();seenLevels.push(this.levelId_),(0,_utils.trySetSessionStorage)("hint_prompt_seen_levels",JSON.stringify(seenLevels));var title=_locale.default.onetimeHintPromptTitle(),message=_locale.default.onetimeHintPromptMessage();(0,_utils.showGenericQtip)("#lightbulb",title,message,{my:"top left",at:"bottom right"})},AuthoredHints}();exports.default=AuthoredHints,module.exports=exports.default},"./src/blockTooltips/DropletAutocompleteParameterTooltipManager.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_dropletUtils=__webpack_require__("./src/dropletUtils.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0;if(!(hasTooltipParams&¶mInfo.currentParameterIndex>=tooltipInfo.parameterInfos.length)){var cursorTooltip=this.createOrUpdateCursorTooltip_();if(cursorTooltip.tooltipster("content",this.getTooltipHTML(tooltipInfo,paramInfo.currentParameterIndex)),cursorTooltip.tooltipster("show"),this.showExamplesLink){var seeExamplesLink=(0,_jquery.default)(cursorTooltip.tooltipster("elementTooltip")).find(".tooltip-example-link > a")[0];dom.addClickTouchEvent(seeExamplesLink,function(event){this.dropletTooltipManager.showDocFor(docFunc),event.stopPropagation()}.bind(this))}if(hasTooltipParams){var chooseAsset=tooltipInfo.parameterInfos[paramInfo.currentParameterIndex].assetTooltip;if(chooseAsset){var chooseAssetLink=(0,_jquery.default)(cursorTooltip.tooltipster("elementTooltip")).find(".tooltip-choose-link > a")[0];dom.addClickTouchEvent(chooseAssetLink,function(event){this.hideTooltip_(),chooseAsset((function(filename){aceEditor.onTextInput('"'+filename+'"')})),event.stopPropagation()}.bind(this))}}}}},DropletAutocompleteParameterTooltipManager.prototype.hideTooltip_=function(){this.cursorTooltip_&&this.cursorTooltip_.tooltipster("hide")};DropletAutocompleteParameterTooltipManager.prototype.getDesiredTooltipPosition_=function(){var aceRect=(0,_jquery.default)(".ace_editor")[0].getBoundingClientRect(),cursorRect=this.cursorTooltip_[0].getBoundingClientRect(),showOnLeft=this.showParamDropdowns&&(cursorRect.top-aceRect.top<150||aceRect.bottom-cursorRect.bottom<150),offsetX=0,position=this.tooltipConfig.position;return showOnLeft&&(position="left",offsetX=Math.max(0,cursorRect.left-(window.innerWidth-100-280))),{position,offsetX}},DropletAutocompleteParameterTooltipManager.prototype.createOrUpdateCursorTooltip_=function(){this.cursorTooltip_||(this.cursorTooltip_=(0,_jquery.default)(".droplet-ace .ace_cursor"));var curPosition,curOffsetX,_this$getDesiredToolt=this.getDesiredTooltipPosition_(),position=_this$getDesiredToolt.position,offsetX=_this$getDesiredToolt.offsetX;try{curPosition=this.cursorTooltip_.tooltipster("option","position"),curOffsetX=this.cursorTooltip_.tooltipster("option","offsetX")}catch(e){}if(position!==curPosition||offsetX!==curOffsetX){try{this.cursorTooltip_.tooltipster("destroy")}catch(e){}this.cursorTooltip_.tooltipster(_objectSpread(_objectSpread({},this.tooltipConfig),{},{position,offsetX}))}return this.cursorTooltip_},DropletAutocompleteParameterTooltipManager.prototype.getTooltipHTML=function(tooltipInfo,currentParameterIndex){return DropletFunctionTooltipMarkup({funcName:tooltipInfo.functionName,functionName:tooltipInfo.functionName,isProperty:tooltipInfo.isProperty,tipPrefix:tooltipInfo.tipPrefix,functionShortDescription:tooltipInfo.description,parameters:tooltipInfo.parameterInfos,signatureOverride:tooltipInfo.signatureOverride,showExamplesLink:this.showExamplesLink,currentParameterIndex})},DropletAutocompleteParameterTooltipManager.prototype.installAceCompleterHooks_=function(editor){editor.completer.showPopup!==DropletAutocompleteParameterTooltipManager.showPopup&&(DropletAutocompleteParameterTooltipManager.originalShowPopup=editor.completer.showPopup,editor.completer.showPopup=DropletAutocompleteParameterTooltipManager.showPopup),editor.completer.gatherCompletions!==DropletAutocompleteParameterTooltipManager.gatherCompletions&&(DropletAutocompleteParameterTooltipManager.originalGatherCompletions=editor.completer.gatherCompletions,editor.completer.gatherCompletions=DropletAutocompleteParameterTooltipManager.gatherCompletions),editor.completer.insertMatchOverride||(editor.completer.insertMatchOverride=DropletAutocompleteParameterTooltipManager.insertMatch.bind(editor.completer,this)),editor.completer.insertMatch!==editor.completer.insertMatchOverride&&(DropletAutocompleteParameterTooltipManager.originalInsertMatch=editor.completer.insertMatch,editor.completer.insertMatch=editor.completer.insertMatchOverride)},DropletAutocompleteParameterTooltipManager.gatherCompletions=function(editor,callback){if(this.overrideCompleter){var allCompleters=editor.completers;editor.completers=[this.overrideCompleter],editor.completer.autoInsert=!1,editor.completer.lastGatheredWithOverride=!0,DropletAutocompleteParameterTooltipManager.originalGatherCompletions.call(this,editor,callback),editor.completers=allCompleters}else editor.completer.lastGatheredWithOverride=!1,DropletAutocompleteParameterTooltipManager.originalGatherCompletions.call(this,editor,callback)},DropletAutocompleteParameterTooltipManager.showPopup=function(editor){DropletAutocompleteParameterTooltipManager.originalShowPopup.call(this,editor),this.overrideCompleter=null},DropletAutocompleteParameterTooltipManager.insertMatch=function(self,data){var _this=this;if(data||(data=this.popup.getData(this.popup.getRow())),!data)return!1;var insertMatch=function insertMatch(data,overrideCompletions){var origCompletions=_this.editor.completer.completions;overrideCompletions&&(_this.editor.completer.completions=overrideCompletions),_this.editor.completer.lastGatheredWithOverride?DropletAutocompleteParameterTooltipManager.customInsertMatch(data,_this.editor):DropletAutocompleteParameterTooltipManager.originalInsertMatch.call(_this,data),overrideCompletions&&(_this.editor.completer.completions=origCompletions)};if(data.click){var completions=this.editor.completer.completions;this.detach(),self.hideTooltip_(),self.blockDropdownsAndTooltips=!0,ace.require("./lib/lang").delayedCall((function(){data.click((function(data){insertMatch(data,completions),self.blockDropdownsAndTooltips=!1}))})).schedule()}else insertMatch(data)},DropletAutocompleteParameterTooltipManager.retrieveToEndOfQuotedText=function(line,pos,character){var remainingLine=line.substring(pos);if(remainingLine){var endQuotePos=remainingLine.indexOf(character);return-1===endQuotePos?remainingLine:remainingLine.substring(0,endQuotePos+1)}return remainingLine},DropletAutocompleteParameterTooltipManager.customInsertMatch=function(data,editor){var acUtil=ace.require("ace/autocomplete/util"),filterText=editor.completer.completions.filterText;if(filterText)for(var range,ranges=editor.selection.getAllRanges(),i=0;range=ranges[i];i++){range.start.column-=editor.completer.completions.filterText.length;var line=editor.session.getLine(range.end.row),firstFilterChar=filterText[0];if('"'===firstFilterChar||"'"===firstFilterChar){var lengthOfRestOfQuotedText=this.retrieveToEndOfQuotedText(line,range.end.column,firstFilterChar).length;range.end.column+=lengthOfRestOfQuotedText}else{var lengthOfRestOfIdentifier=acUtil.retrieveFollowingIdentifier(line,range.end.column).length;range.end.column+=lengthOfRestOfIdentifier}editor.session.remove(range)}editor.execCommand("insertstring",data.value||data)},DropletAutocompleteParameterTooltipManager.prototype.setTooltipsEnabled=function(enabled){this.tooltipConfig.tooltipsEnabled=!!enabled},module.exports=DropletAutocompleteParameterTooltipManager},"./src/blockTooltips/DropletAutocompletePopupTooltipManager.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/jquery/dist/jquery.js"));var DropletFunctionTooltipMarkup=__webpack_require__("./src/blockTooltips/DropletFunctionTooltip.html.ejs"),dom=__webpack_require__("./src/dom.js"),DropletAutocompletePopupTooltipManager=function DropletAutocompletePopupTooltipManager(dropletTooltipManager){this.dropletTooltipManager=dropletTooltipManager,this.showExamplesLink=dropletTooltipManager.dropletConfig.showExamplesLink,this.tooltipsEnabled=!0},DEFAULT_TOOLTIP_CONFIG={interactive:!0,autoClose:!1,trigger:"custom",speed:100,maxWidth:450,position:"left",contentAsHTML:!0,theme:"droplet-block-tooltipster",offsetY:2,restoration:"none",updateAnimation:!1};DropletAutocompletePopupTooltipManager.prototype.installTooltipsForEditor_=function(dropletEditor){var aceEditor=dropletEditor.aceEditor;this.editorChangedEventHandler_=this.setupOnPopupShown_.bind(this,aceEditor),aceEditor.commands.on("afterExec",this.editorChangedEventHandler_)},DropletAutocompletePopupTooltipManager.prototype.setupOnPopupShown_=function(aceEditor,changeEvent){"insertstring"===changeEvent.command.name&&(aceEditor.completer&&aceEditor.completer.popup&&(this.setupForEditorPopup_(aceEditor),aceEditor.commands.removeListener("afterExec",this.editorChangedEventHandler_),this.editorChangedEventHandler_=null))},DropletAutocompletePopupTooltipManager.prototype.setupForEditorPopup_=function(aceEditor){aceEditor.completer.popup.setSelectOnHover(!0),aceEditor.completer.popup.renderer.on("afterRender",function(){this.updateAutocompletePopupTooltip(aceEditor)}.bind(this)),aceEditor.completer.popup.on("hide",function(){this.destroyAutocompleteTooltips_()}.bind(this))},DropletAutocompletePopupTooltipManager.prototype.updateAutocompletePopupTooltip=function(aceEditor){if(this.tooltipsEnabled&&aceEditor.completer.completions){var keyboardRow=aceEditor.completer.popup.getRow();if(!(keyboardRow<0)){var filteredCompletions=aceEditor.completer.completions.filtered,funcName=filteredCompletions[keyboardRow].docFunc||filteredCompletions[keyboardRow].value;this.destroyAutocompleteTooltips_(),this.dropletTooltipManager.getDocFor(funcName)&&this.attachTooltipForFunction(funcName)}}},DropletAutocompletePopupTooltipManager.prototype.attachTooltipForFunction=function(funcName){var tooltipDOM=this.getTooltipHTML(funcName),configuration=Object.assign({},DEFAULT_TOOLTIP_CONFIG,{content:tooltipDOM,functionReady:function(_,contents){if(this.showExamplesLink){var seeExamplesLink=contents.find(".tooltip-example-link > a")[0];dom.addMouseDownTouchEvent(seeExamplesLink,function(event){this.dropletTooltipManager.showDocFor(funcName),event.stopPropagation()}.bind(this))}}.bind(this)}),rowOverlayDiv=(0,_jquery.default)(".ace_selected");rowOverlayDiv.tooltipster(configuration),rowOverlayDiv.tooltipster("show")},DropletAutocompletePopupTooltipManager.prototype.destroyAutocompleteTooltips_=function(){(0,_jquery.default)(".ace_autocomplete .tooltipstered").tooltipster("destroy")},DropletAutocompletePopupTooltipManager.prototype.getTooltipHTML=function(functionName){var tooltipInfo=this.dropletTooltipManager.getDropletTooltip(functionName);return DropletFunctionTooltipMarkup({functionName:tooltipInfo.functionName,isProperty:tooltipInfo.isProperty,tipPrefix:tooltipInfo.tipPrefix,functionShortDescription:tooltipInfo.description,parameters:tooltipInfo.parameterInfos,signatureOverride:tooltipInfo.signatureOverride,showExamplesLink:this.showExamplesLink})},DropletAutocompletePopupTooltipManager.prototype.setTooltipsEnabled=function(enabled){this.tooltipsEnabled=!!enabled},module.exports=DropletAutocompletePopupTooltipManager},"./src/blockTooltips/DropletBlockTooltipManager.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_LibraryViewCode=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryViewCode.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var DropletFunctionTooltipMarkup=__webpack_require__("./src/blockTooltips/DropletFunctionTooltip.html.ejs"),dom=__webpack_require__("./src/dom.js"),DropletBlockTooltipManager=function DropletBlockTooltipManager(dropletTooltipManager){this.dropletTooltipManager=dropletTooltipManager,this.showExamplesLink=dropletTooltipManager.dropletConfig.showExamplesLink,this.tooltipsEnabled=!0},DEFAULT_TOOLTIP_CONFIG={interactive:!0,speed:150,maxWidth:450,position:"right",contentAsHTML:!0,theme:"droplet-block-tooltipster",offsetY:2,delay:400};function swallowErrors(fn){return function(){try{fn()}catch(err){"undefined"!=typeof console&&console.error&&console.error(err)}}}DropletBlockTooltipManager.prototype.installTooltipsForEditor_=function(dropletEditor){this.installTooltipsForCurrentCategoryBlocks_(),this.hideTooltipsOnBlockPick_(dropletEditor),dropletEditor.on("changepalette",swallowErrors(this.installTooltipsForCurrentCategoryBlocks_.bind(this))),dropletEditor.on("toggledone",swallowErrors(this.installTooltipsIfNotInstalled_.bind(this)))},DropletBlockTooltipManager.prototype.installTooltipsIfNotInstalled_=function(){(0,_jquery.default)(".droplet-hover-div").hasClass("tooltipstered")||this.installTooltipsForCurrentCategoryBlocks_()},DropletBlockTooltipManager.prototype.installTooltipsForCurrentCategoryBlocks_=function(){this.tooltipsEnabled&&(0,_jquery.default)(".droplet-hover-div").each(function(_,blockHoverDiv){if(!(0,_jquery.default)(blockHoverDiv).hasClass("tooltipstered")){var funcName=(0,_jquery.default)(blockHoverDiv).attr("title"),hoverDivRect=blockHoverDiv.getBoundingClientRect(),toolboxRight=(0,_jquery.default)(".droplet-palette-scroller").width(),offsetX=Math.min(hoverDivRect.width,toolboxRight);if(0!==offsetX){var offsetY=-hoverDivRect.height/2+2,configuration=Object.assign({},DEFAULT_TOOLTIP_CONFIG,{content:this.getTooltipHTML(funcName),offsetX,offsetY,functionReady:function(_,contents){var tooltip=this.dropletTooltipManager.getDropletTooltip(funcName);if(tooltip.showExamplesLink){var seeExamplesLink=contents.find(".tooltip-example-link > a")[0];dom.addClickTouchEvent(seeExamplesLink,function(event){this.dropletTooltipManager.showDocFor(funcName),event.stopPropagation()}.bind(this))}else if(tooltip.showCodeLink){var showCodeLink=contents.find(".tooltip-code-link > a")[0];dom.addClickTouchEvent(showCodeLink,(function(event){var projectLibraries=dashboard.project.getProjectLibraries(),libraryName=funcName.split(".")[0],library=projectLibraries.find((function(library){return library.name===libraryName}));library&&((0,_jquery.default)(".tooltipstered").tooltipster("hide"),(0,_jquery.default)("body").append("
"),_reactDom.default.render(_react.default.createElement(_LibraryViewCode.default,{title:library.name,description:library.description,onClose:function onClose(){var element=document.getElementById("libraryFunctionTooltipModal");element.parentNode.removeChild(element)},sourceCode:library.source}),document.querySelector("#libraryFunctionTooltipModal")))}))}}.bind(this)});(0,_jquery.default)(blockHoverDiv).attr("data-block",funcName),(0,_jquery.default)(blockHoverDiv).attr("id","droplet_palette_block_"+funcName),(0,_jquery.default)(blockHoverDiv).tooltipster(configuration)}}}.bind(this))},DropletBlockTooltipManager.prototype.hideTooltipsOnBlockPick_=function(dropletEditor){dropletEditor.on("pickblock",(function(){(0,_jquery.default)(".tooltipstered").tooltipster("hide")}))},DropletBlockTooltipManager.prototype.getTooltipHTML=function(functionName){var tooltipInfo=this.dropletTooltipManager.getDropletTooltip(functionName);return DropletFunctionTooltipMarkup({functionName:tooltipInfo.functionName,isProperty:tooltipInfo.isProperty,tipPrefix:tooltipInfo.tipPrefix,functionShortDescription:tooltipInfo.description,parameters:tooltipInfo.parameterInfos,signatureOverride:tooltipInfo.signatureOverride,showExamplesLink:tooltipInfo.showExamplesLink,showCodeLink:tooltipInfo.showCodeLink})},DropletBlockTooltipManager.prototype.setTooltipsEnabled=function(enabled){this.tooltipsEnabled=!!enabled},module.exports=DropletBlockTooltipManager},"./src/blockTooltips/DropletFunctionTooltip.js":(module,__unused_webpack_exports,__webpack_require__)=>{var msg=__webpack_require__("./src/util/locale-do-not-import.js"),DropletFunctionTooltip=function DropletFunctionTooltip(appMsg,definition){this.appMsg=appMsg,this.functionName=definition.func,this.isProperty="property"===definition.type||"readonlyproperty"===definition.type,this.tipPrefix=definition.tipPrefix,this.customDocURL=definition.customDocURL;var localizedDescription=this.getLocalization(this.descriptionKey());this.showExamplesLink=!0,definition.comment?(this.description=definition.comment,this.showCodeLink=!0,this.showExamplesLink=!1):localizedDescription&&(this.description=localizedDescription());var signatureOverride=this.getLocalization(this.signatureOverrideKey());signatureOverride&&(this.signatureOverride=signatureOverride()),this.parameterInfos=[];for(var paramId=0;;paramId++){var paramInfo={},paramName=this.getLocalization(this.parameterNameKey(paramId));if(paramInfo.name=paramName?paramName():definition.paletteParams&&definition.paletteParams[paramId],!paramInfo.name)break;var paramDesc=this.getLocalization(this.parameterDescriptionKey(paramId));paramDesc&&(paramInfo.description=paramDesc()),definition.assetTooltip&&(paramInfo.assetTooltip=definition.assetTooltip[paramId]),this.parameterInfos.push(paramInfo)}};DropletFunctionTooltip.prototype.getLocalization=function(key){return this.appMsg[key]||msg[key]},DropletFunctionTooltip.prototype.descriptionKey=function(){return this.i18nPrefix()+"_description"},DropletFunctionTooltip.prototype.signatureOverrideKey=function(){return this.i18nPrefix()+"_signatureOverride"},DropletFunctionTooltip.prototype.parameterNameKey=function(paramIndex){return this.i18nPrefix()+"_param"+paramIndex},DropletFunctionTooltip.prototype.parameterDescriptionKey=function(paramIndex){return this.i18nPrefix()+"_param"+paramIndex+"_description"},DropletFunctionTooltip.prototype.i18nPrefix=function(){return"dropletBlock_"+this.functionName},DropletFunctionTooltip.prototype.getFullDocumentationURL=function(appType){return this.customDocURL?this.customDocURL:"/docs/"+appType+"/"+this.functionName+"/"},module.exports=DropletFunctionTooltip},"./src/blockTooltips/DropletTooltipManager.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_dropletUtils=__webpack_require__("./src/dropletUtils.js"),_LegacyDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/LegacyDialog.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var DropletFunctionTooltip=__webpack_require__("./src/blockTooltips/DropletFunctionTooltip.js"),DropletBlockTooltipManager=__webpack_require__("./src/blockTooltips/DropletBlockTooltipManager.js"),DropletAutocompletePopupTooltipManager=__webpack_require__("./src/blockTooltips/DropletAutocompletePopupTooltipManager.js"),DropletAutocompleteParameterTooltipManager=__webpack_require__("./src/blockTooltips/DropletAutocompleteParameterTooltipManager.js");function DropletTooltipManager(appMsg,dropletConfig,codeFunctions,autocompletePaletteApisOnly,appType){this.appType=appType,this.appMsg=appMsg||{},this.tooltipsEnabled=!0,this.dropletConfig=dropletConfig||{},this.codeFunctions=codeFunctions,this.autocompletePaletteApisOnly=autocompletePaletteApisOnly,this.blockTypeToTooltip_={},this.docFuncMapping_={},this.dropletBlockTooltipManager_=new DropletBlockTooltipManager(this),this.dropletAutocompletePopupTooltipManager_=new DropletAutocompletePopupTooltipManager(this),this.dropletAutocompleteParameterTooltipManager_=new DropletAutocompleteParameterTooltipManager(this)}DropletTooltipManager.prototype.registerDropletBlockModeHandlers=function(dropletEditor){this.dropletBlockTooltipManager_.installTooltipsForEditor_(dropletEditor)},DropletTooltipManager.prototype.registerDropletTextModeHandlers=function(dropletEditor){this.dropletAutocompletePopupTooltipManager_.installTooltipsForEditor_(dropletEditor),this.dropletAutocompleteParameterTooltipManager_.installTooltipsForEditor_(dropletEditor)},DropletTooltipManager.prototype.registerBlocks=function(){(0,_dropletUtils.getAllAvailableDropletBlocks)(this.dropletConfig,this.codeFunctions,this.autocompletePaletteApisOnly).forEach((function(dropletBlockDefinition){var key=dropletBlockDefinition.modeOptionName||dropletBlockDefinition.func;dropletBlockDefinition.docFunc?this.docFuncMapping_[key]=dropletBlockDefinition.docFunc:this.blockTypeToTooltip_[key]=new DropletFunctionTooltip(this.appMsg,dropletBlockDefinition)}),this)},DropletTooltipManager.prototype.getDocFor=function(functionName){var docFuncName=this.docFuncMapping_[functionName]||functionName;return this.blockTypeToTooltip_[docFuncName]},DropletTooltipManager.prototype.showDocFor=function(functionName){if(this.tooltipsEnabled){var tooltip=this.getDropletTooltip(functionName);if(tooltip.customDocURL)window.open(tooltip.customDocURL,"_blank","noopener,noreferrer").focus();else(0,_jquery.default)(".tooltipstered").tooltipster("hide"),new _LegacyDialog.default({body:(0,_jquery.default)("');return _react.default.createElement("div",null,_react.default.createElement("p",{style:style.p},_locale.default.shareEmbedDescription()),_react.default.createElement("p",{style:_objectSpread(_objectSpread({},style.p),style.warningp)},_locale.default.shareEmbedWarning()),_react.default.createElement("textarea",{type:"text",onClick:function onClick(e){return e.target.select()},readOnly:"true",value:iframeHtml,style:style.embedInput}),_react.default.createElement("label",{style:{display:"flex"}},_react.default.createElement("input",{type:"checkbox",style:{accentColor:color.brand_primary_default},checked:this.state.embedWithoutCode,onChange:function onChange(){return _this2.setState({embedWithoutCode:!_this2.state.embedWithoutCode})}}),_react.default.createElement("span",{style:{marginLeft:5}},"Hide ability to view code")))},_proto.renderExportTab=function renderExportTab(){var spinner=this.state.exporting?_react.default.createElement("i",{className:"fa fa-spinner fa-spin"}):null,alert=this.state.exportError?_react.default.createElement("div",{className:"alert fade in"},this.state.exportError):null;return _react.default.createElement("div",null,_react.default.createElement("p",{style:style.p},"Export your project as a zipped file, which will contain the HTML/CSS/JS files, as well as any assets, for your project."),_react.default.createElement(_Button.default,{color:_Button.default.ButtonColor.neutralDark,onClick:this.downloadExport,style:{margin:0,paddingRight:11,fontSize:"large",height:40}},spinner,"Export"),alert)},_proto.render=function render(){var optionsNav,selectedTab,libraryTab,_this$props=this.props,expanded=_this$props.expanded,exportApp=_this$props.exportApp,onExpand=_this$props.onExpand,librariesEnabled=_this$props.librariesEnabled,selectedOption=this.state.selectedOption;if(!selectedOption)return null;if(expanded){var exportTab=null;exportApp&&(exportTab=this.renderAdvancedListItem(ShareOptions_EXPORT,_locale.default.exportForWeb()));var embedTab=this.renderAdvancedListItem(ShareOptions_EMBED,_locale.default.embed());switch(librariesEnabled&&(libraryTab=this.renderAdvancedListItem(ShareOptions_LIBRARY,_locale.default.shareLibrary())),optionsNav=_react.default.createElement("div",null,_react.default.createElement("ul",{style:style.nav.ul},exportTab,embedTab,libraryTab)),selectedOption){case ShareOptions_EXPORT:selectedTab=this.renderExportTab();break;case ShareOptions_EMBED:selectedTab=this.renderEmbedTab();break;case ShareOptions_LIBRARY:selectedTab=this.renderLibraryTab()}}var expand=expanded&&selectedOption?null:_react.default.createElement("a",{onClick:onExpand,style:style.expand},_locale.default.advancedShare());return _react.default.createElement("div",{style:style.root},expand,optionsNav,selectedTab)},AdvancedShareOptions}(_react.default.Component);_defineProperty(AdvancedShareOptions,"propTypes",{shareUrl:_propTypes.default.string.isRequired,exportApp:_propTypes.default.func,librariesEnabled:_propTypes.default.bool,openLibraryCreationDialog:_propTypes.default.func.isRequired,onExpand:_propTypes.default.func.isRequired,expanded:_propTypes.default.bool.isRequired,channelId:_propTypes.default.string.isRequired,embedOptions:_propTypes.default.shape({iframeHeight:_propTypes.default.number.isRequired,iframeWidth:_propTypes.default.number.isRequired}).isRequired});var _default=(0,_reactRedux.connect)((function(state){return{librariesEnabled:state.pageConstants.librariesEnabled}}),(function(dispatch){return{openLibraryCreationDialog:function openLibraryCreationDialog(){dispatch((0,_shareDialogRedux.showLibraryCreationDialog)()),dispatch((0,_shareDialogRedux.hideShareDialog)())}}}))((0,_radium.default)(AdvancedShareOptions));exports.default=_default,module.exports=exports.default},"./src/code-studio/components/AssetManager.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ImageMode=exports.AudioErrorType=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_clientApi=__webpack_require__("./src/clientApi.js"),_AssetRow=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AssetRow.jsx")),_assetListStore=_interopRequireDefault(__webpack_require__("./src/code-studio/assets/assetListStore.js")),_AudioRecorder=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AudioRecorder.jsx")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_AddAssetButtonRow=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AddAssetButtonRow.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_assetPrefix=__webpack_require__("./src/assetManagement/assetPrefix.js"),_recorders=__webpack_require__("./src/code-studio/components/recorders.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_AssetThumbnail=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AssetThumbnail.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var AssetRow=function(_React$Component){function AssetRow(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{action:"normal",actionText:"",attemptedUsedDelete:!1}),_defineProperty(_assertThisInitialized(_this),"confirmDelete",(function(){_this.setState({action:"confirming delete",actionText:""}),_firehose.default.putRecord({study:"delete-asset",study_group:_this.props.onChoose&&"function"==typeof _this.props.onChoose?"choose-assets":"manage-assets",event:"initiate",project_id:_this.props.projectId,data_json:JSON.stringify({assetName:_this.props.name,elementId:_this.props.elementId})})})),_defineProperty(_assertThisInitialized(_this),"cancelDelete",(function(){_this.setState({action:"normal",actionText:""})})),_defineProperty(_assertThisInitialized(_this),"handleDelete",(function(){_this.setState({action:"deleting",actionText:""}),_this.props.api.deleteFile(_this.props.name,_this.props.onDelete,(function(){_this.setState({action:"confirming delete",actionText:_locale.default.errorDeleting()})}))})),_defineProperty(_assertThisInitialized(_this),"chooseAsset",(function(){_this.props.imagePicker||_firehose.default.putRecord({study:"sound-dialog-2",study_group:"library-tab",event:"choose-uploaded-sound",data_json:_this.props.name},{includeUserId:!0}),_this.props.onChoose()})),_defineProperty(_assertThisInitialized(_this),"attemptBadDelete",(function(){_this.setState({attemptedUsedDelete:!0})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(AssetRow,_React$Component),AssetRow.prototype.render=function render(){var actions,flex;this.props.onChoose?flex=_react.default.createElement("button",{type:"button",onClick:this.chooseAsset},_locale.default.choose()):flex=(this.props.size/1e3).toFixed(2)+" kb";var usage=(0,_jquery.default)("#visualization").find('[src*="'.concat(encodeURIComponent(this.props.name),'"]')).length;switch(this.state.action){case"normal":actions=_react.default.createElement("td",{width:"250",style:{textAlign:"right"}},flex,!this.props.hideDelete&&_react.default.createElement("button",{type:"button",className:usage>0?"":"btn-danger",onClick:usage>0?this.attemptBadDelete:this.confirmDelete},_react.default.createElement("i",{className:"fa fa-trash-o"})),this.state.attemptedUsedDelete&&_react.default.createElement("div",{style:styles.deleteWarning},_locale.default.cannotDeleteUsedImage()));break;case"confirming delete":actions=_react.default.createElement("td",{width:"250",style:{textAlign:"right"}},_react.default.createElement("button",{type:"button",className:"btn-danger",onClick:this.handleDelete},"Delete File"),_react.default.createElement("button",{type:"button",onClick:this.cancelDelete},"Cancel"),_react.default.createElement("div",{style:styles.deleteWarning},_locale.default.confirmDeleteExplanation()),this.state.actionText);break;case"deleting":actions=_react.default.createElement("td",{width:"250",style:{textAlign:"right"}},_react.default.createElement("i",{className:"fa fa-spinner fa-spin",style:{fontSize:"32px",marginRight:"15px"}}))}return _react.default.createElement("tr",{className:"assetRow",onDoubleClick:this.props.onChoose},_react.default.createElement("td",{width:"80"},_react.default.createElement(_AssetThumbnail.default,{type:this.props.type,name:this.props.name,timestamp:this.props.timestamp,api:this.props.api,soundPlayer:this.props.soundPlayer,levelName:this.props.levelName})),_react.default.createElement("td",null,this.props.name),actions)},AssetRow}(_react.default.Component);exports.default=AssetRow,_defineProperty(AssetRow,"propTypes",{name:_propTypes.default.string.isRequired,timestamp:_propTypes.default.string,type:_propTypes.default.oneOf(["image","audio","video","pdf","doc"]).isRequired,size:_propTypes.default.number,api:_propTypes.default.object.isRequired,onChoose:_propTypes.default.func,onDelete:_propTypes.default.func.isRequired,soundPlayer:_propTypes.default.object,projectId:_propTypes.default.string,levelName:_propTypes.default.string,hideDelete:_propTypes.default.bool,imagePicker:_propTypes.default.bool,elementId:_propTypes.default.string});var styles={deleteWarning:{paddingLeft:"34px",textAlign:"left",color:_color.default.red}};module.exports=exports.default},"./src/code-studio/components/AssetThumbnail.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.styles=exports.default=void 0;var _class,_class2,_class3,_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_clientApi=__webpack_require__("./src/clientApi.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VideoThumbnail=exports.PDFThumbnail=exports.ImageThumbnail=exports.DocThumbnail=exports.AudioThumbnail=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_AssetThumbnail=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AssetThumbnail.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_HiddenUploader=_interopRequireDefault(__webpack_require__("./src/code-studio/components/HiddenUploader.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_AddAssetButtonRow=__webpack_require__("./src/code-studio/components/AddAssetButtonRow.jsx"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var AssetUploader=function(_React$Component){function AssetUploader(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"fileUploadClicked",(function(){return _this.refs.uploader.openFileChooser()})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(AssetUploader,_React$Component),AssetUploader.prototype.render=function render(){var api=this.props.api,url=api.getUploadUrl(),uploadDone=api.wrapUploadDoneCallback(this.props.onUploadDone),uploadStart=api.wrapUploadStartCallback(this.props.onUploadStart);return _react.default.createElement("span",null,_react.default.createElement(_HiddenUploader.default,{ref:"uploader",toUrl:url,allowedExtensions:this.props.allowedExtensions,onUploadStart:uploadStart,onUploadDone:uploadDone,onUploadError:this.props.onUploadError}),_react.default.createElement(_Button.default,{onClick:this.fileUploadClicked,className:"share",id:"upload-asset",disabled:!this.props.uploadsEnabled,icon:"upload",text:_locale.default.uploadFile(),style:_AddAssetButtonRow.assetButtonStyles.button,size:"large"}))},AssetUploader}(_react.default.Component);exports.default=AssetUploader,_defineProperty(AssetUploader,"propTypes",{onUploadStart:_propTypes.default.func.isRequired,onUploadDone:_propTypes.default.func.isRequired,onUploadError:_propTypes.default.func,allowedExtensions:_propTypes.default.string,uploadsEnabled:_propTypes.default.bool.isRequired,api:_propTypes.default.object.isRequired}),module.exports=exports.default},"./src/code-studio/components/AudioRecorder.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_clientApi=__webpack_require__("./src/clientApi.js"),_AddAssetButtonRow=__webpack_require__("./src/code-studio/components/AddAssetButtonRow.jsx"),_AssetManager=__webpack_require__("./src/code-studio/components/AssetManager.jsx"),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_recorders=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/code-studio/components/recorders.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var AudioRecorder=function(_React$Component){function AudioRecorder(props){var _this;return _defineProperty(_assertThisInitialized(_this=_React$Component.call(this,props)||this),"componentDidMount",(function(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?(_this.recorder=(0,_recorders.default)(_this.props.recordingFileType),navigator.mediaDevices.getUserMedia({audio:!0}).then(_this.recorder.init).then((function(){return _this.setState({loading:!1})})).catch((function(){return _this.props.afterAudioSaved(_AssetManager.AudioErrorType.INITIALIZE)}))):_this.props.afterAudioSaved(_AssetManager.AudioErrorType.INITIALIZE)})),_defineProperty(_assertThisInitialized(_this),"saveAudio",(function(blob){_this.setState({loading:!0}),_clientApi.assets.putAsset(_this.state.audioName+_this.recorder.getExtension(),blob,(function(xhr){_this.setState({audioName:"",loading:!1});var result=JSON.parse(xhr.response);result.filename=decodeURI(result.filename),_this.props.onUploadDone(result),_this.props.afterAudioSaved(_AssetManager.AudioErrorType.NONE)}),(function(error){_this.setState({loading:!1}),console.error("Audio Failed to Save: ".concat(error)),_this.props.afterAudioSaved(_AssetManager.AudioErrorType.SAVE)}))})),_defineProperty(_assertThisInitialized(_this),"onNameChange",(function(event){_this.setState({audioName:event.target.value})})),_defineProperty(_assertThisInitialized(_this),"onCancel",(function(){_this.setState({audioName:"",recording:!1},(function(){_this.props.afterAudioSaved(_AssetManager.AudioErrorType.NONE),_this.recorder.isRecording()&&(clearTimeout(_this.recordTimeout),_this.recorder.stopRecording())}))})),_defineProperty(_assertThisInitialized(_this),"toggleRecord",(function(){_this.state.recording?_this.stopRecordingAndSave():_this.startRecording()})),_defineProperty(_assertThisInitialized(_this),"startRecording",(function(){var studyGroup=_this.props.imagePicker?"manage-assets":"library-tab";_this.recorder.startRecording().then((function(){_firehose.default.putRecord({study:"sound-dialog-2",study_group:studyGroup,event:"record-sound",data_json:_this.state.audioName},{includeUserId:!0}),_this.setState({recording:!_this.state.recording})})),_this.recordTimeout=setTimeout(_this.stopRecordingAndSave,3e4)})),_defineProperty(_assertThisInitialized(_this),"stopRecordingAndSave",(function(){_this.state.recording&&(clearTimeout(_this.recordTimeout),_this.recorder.stopRecording().then((function(blob){_this.saveAudio(blob)})),_this.setState({recording:!_this.state.recording}))})),_this.timeout=null,_this.recorder=null,_this.state={audioName:"",recording:!1,loading:!0},_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(AudioRecorder,_React$Component),AudioRecorder.prototype.render=function render(){return _react.default.createElement("div",null,_react.default.createElement("div",{style:styles.buttonRow},_react.default.createElement("input",{type:"text",placeholder:_locale.default.soundName(),onChange:this.onNameChange,value:this.state.audioName}),this.state.recording&&_react.default.createElement("span",{style:_AddAssetButtonRow.assetButtonStyles.button},_react.default.createElement("i",{style:styles.recordingIcon,className:"fa fa-circle"}),_locale.default.recording()),_react.default.createElement("span",null,this.state.loading&&this.state.audioName.length>0&&_react.default.createElement("div",{style:styles.spinner},_react.default.createElement("i",{className:"fa fa-spinner fa-spin",style:{fontSize:"20px"}})),_react.default.createElement(_Button.default,{onClick:this.toggleRecord,id:"start-stop-record",style:_AddAssetButtonRow.assetButtonStyles.button,color:_Button.default.ButtonColor.blue,icon:this.state.recording?"stop":"circle",text:this.state.recording?_locale.default.stop():_locale.default.record(),size:"large",disabled:0===this.state.audioName.length||this.state.loading}),_react.default.createElement(_Button.default,{onClick:this.onCancel,id:"cancel-record",style:_AddAssetButtonRow.assetButtonStyles.button,color:_Button.default.ButtonColor.gray,text:_locale.default.cancel(),size:"large"}))))},AudioRecorder}(_react.default.Component);exports.default=AudioRecorder,_defineProperty(AudioRecorder,"propTypes",{onUploadDone:_propTypes.default.func,afterAudioSaved:_propTypes.default.func,recordingFileType:_propTypes.default.oneOf(Object.values(_recorders.RecordingFileType)),imagePicker:_propTypes.default.bool});var styles={buttonRow:{display:"flex",flexFlow:"row",justifyContent:"space-between",alignItems:"center"},recordingIcon:{color:"red",margin:5},warning:{textAlign:"left",color:_color.default.red},spinner:{display:"inline-block",verticalAlign:"top",marginTop:"16px",marginRight:"10px"}};module.exports=exports.default},"./src/code-studio/components/BeeCellEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_CellEditor2=_interopRequireDefault(__webpack_require__("./src/code-studio/components/CellEditor.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var BeeCell=__webpack_require__("./node_modules/@code-dot-org/maze/dist/main.js").cells.BeeCell,BeeCellEditor=function(_CellEditor){function BeeCellEditor(){return _CellEditor.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(BeeCellEditor,_CellEditor);var _proto=BeeCellEditor.prototype;return _proto.getSelectFieldNames=function getSelectFieldNames(){return _CellEditor.prototype.getSelectFieldNames.call(this).concat(["featureType","cloudType","flowerColor"])},_proto.getSanitizedValues=function getSanitizedValues(){var values=_CellEditor.prototype.getSanitizedValues.call(this);return this.props.cell.isVariableCloud()&&(values.featureType=BeeCell.FeatureType.VARIABLE),"undefined"===values.featureType&&(values.value="",values.range=""),this.props.cell.isFlower()||(values.flowerColor=""),values},_proto.renderFields=function renderFields(values){return _react.default.createElement("div",null,_CellEditor.prototype.renderFields.call(this,values),_react.default.createElement("label",{htmlFor:"featureType"},"Feature Type:"),_react.default.createElement("select",{name:"featureType",value:values.featureType,disabled:this.props.cell.isVariableCloud(),onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"none"),_react.default.createElement("option",{value:BeeCell.FeatureType.HIVE},"hive"),_react.default.createElement("option",{value:BeeCell.FeatureType.FLOWER},"flower"),_react.default.createElement("option",{value:BeeCell.FeatureType.VARIABLE},"variable")),_react.default.createElement("label",{htmlFor:"cloudType"},"Cloud Type:"),_react.default.createElement("select",{name:"cloudType",value:values.cloudType,onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"none"),_react.default.createElement("option",{value:BeeCell.CloudType.STATIC},"classic"),_react.default.createElement("option",{value:BeeCell.CloudType.HIVE_OR_FLOWER},"hive or flower"),_react.default.createElement("option",{value:BeeCell.CloudType.FLOWER_OR_NOTHING},"flower or nothing"),_react.default.createElement("option",{value:BeeCell.CloudType.HIVE_OR_NOTHING},"hive or nothing"),_react.default.createElement("option",{value:BeeCell.CloudType.ANY},"any")),_react.default.createElement("label",{htmlFor:"flowerColor"},"Flower Color:"),_react.default.createElement("select",{name:"flowerColor",value:values.flowerColor,disabled:!this.props.cell.isFlower(),onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"default"),_react.default.createElement("option",{value:BeeCell.FlowerColor.RED},"red"),_react.default.createElement("option",{value:BeeCell.FlowerColor.PURPLE},"purple")))},BeeCellEditor}(_CellEditor2.default);exports.default=BeeCellEditor,module.exports=exports.default},"./src/code-studio/components/BounceCellEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_CellEditor2=_interopRequireDefault(__webpack_require__("./src/code-studio/components/CellEditor.jsx")),_tiles=__webpack_require__("./src/bounce/tiles.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var BounceCellEditor=function(_CellEditor){function BounceCellEditor(){return _CellEditor.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(BounceCellEditor,_CellEditor),BounceCellEditor.prototype.renderFields=function renderFields(values){return _react.default.createElement("div",null,_CellEditor.prototype.renderTileTypes.call(this,values,_tiles.SquareType))},BounceCellEditor}(_CellEditor2.default);exports.default=BounceCellEditor,module.exports=exports.default},"./src/code-studio/components/CellEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&void 0!==arguments[1]?arguments[1]:SquareType;return _react.default.createElement("div",null,_react.default.createElement("label",{htmlFor:"tileType"},"Tile Type (required):"),_react.default.createElement("select",{name:"tileType",value:values.tileType,onChange:this.handleChange},Object.keys(squareTypes).map((function(key){return _react.default.createElement("option",{key,value:squareTypes[key]},key.toLowerCase())}))))},_proto.renderFields=function renderFields(values){return _react.default.createElement("div",null,this.renderTileTypes(values),_react.default.createElement("label",{htmlFor:"value"},"Value:"),_react.default.createElement("input",{type:"number",name:"value",value:values.value,onChange:this.handleChange}),_react.default.createElement("label",{htmlFor:"range"},"Range (defaults to value):"),_react.default.createElement("input",{type:"number",name:"range",value:values.range,disabled:"undefined"===values.featureType,onChange:this.handleChange}))},_proto.render=function render(){var _this2=this;return _react.default.createElement("form",{className:"span4 offset1",ref:function ref(form){_this2.form=form}},_react.default.createElement("header",null,_react.default.createElement("strong",null,"Editing Cell (",this.props.row,", ",this.props.col,")")),this.renderFields(this.getSanitizedValues()))},CellEditor}(_react.default.Component);exports.default=CellEditor,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(CellEditor,"propTypes",{cell:_propTypes.default.object.isRequired,row:_propTypes.default.number.isRequired,col:_propTypes.default.number.isRequired,onUpdate:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/code-studio/components/DownloadReplayVideoButton.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedDownloadReplayVideoButton=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function downloadRemoteUrl(url,downloadName){_firehose.default.putRecord({study:"finish_dialog",study_group:"replay_video",event:"download_started"}),fetch(url,{method:"GET"}).then((function(response){return response.blob()})).then((function(blob){var element=document.createElement("a"),url=URL.createObjectURL(blob);element.setAttribute("href",url),element.setAttribute("download",downloadName),element.style.display="none",document.body.appendChild(element),element.click(),document.body.removeChild(element),_firehose.default.putRecord({study:"finish_dialog",study_group:"replay_video",event:"download_succeeded"})})).catch((function(error){console.log(error),_firehose.default.putRecord({study:"finish_dialog",study_group:"replay_video",event:"download_failed"})}))}var DownloadReplayVideoButton=function(_React$Component){function DownloadReplayVideoButton(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{videoExists:!1,downloadInitiated:!1,checkVideoAttempts:0}),_defineProperty(_assertThisInitialized(_this),"getUploadUrl",(function(){return window&&window.appOptions&&window.appOptions.signedReplayLogUrl})),_defineProperty(_assertThisInitialized(_this),"hasReplayVideo",(function(){return"dance"===_this.props.appType&&_this.getUploadUrl()})),_defineProperty(_assertThisInitialized(_this),"shouldCreateReplayVideo",(function(){return _this.hasReplayVideo()&&_this.props.replayLog&&_this.props.replayLog.length>1})),_defineProperty(_assertThisInitialized(_this),"tryCreateReplayVideo",(function(){_this.shouldCreateReplayVideo()&&fetch(_this.getUploadUrl(),{method:"PUT",body:JSON.stringify(_this.props.replayLog)})})),_defineProperty(_assertThisInitialized(_this),"getVideoUrl",(function(){return"https://dance-api.code.org/videos/video-".concat(_this.props.channelId,".mp4")})),_defineProperty(_assertThisInitialized(_this),"buttonEnabled",(function(){return _this.state.videoExists||!_this.state.downloadInitiated})),_defineProperty(_assertThisInitialized(_this),"clickDownloadVideo",(function(event){_firehose.default.putRecord({study:"finish_dialog",study_group:"replay_video",event:"download_clicked"}),_this.tryDownloadVideo(event)})),_defineProperty(_assertThisInitialized(_this),"tryDownloadVideo",(function(event){return _this.state.downloadInitiated||_this.setState({downloadInitiated:!0}),_this.state.videoExists?(downloadRemoteUrl(_this.getVideoUrl(),"dance_party.mp4"),_this.setState({downloadInitiated:!1})):_this.checkVideo(),event&&event.preventDefault(),!1})),_defineProperty(_assertThisInitialized(_this),"checkVideoUntilSuccess",(function(){var delay=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;if(_this.hasReplayVideo()&&!_this.state.videoExists){if(_this.checkVideoUntilSuccessTimeout&&clearTimeout(_this.checkVideoUntilSuccessTimeout),_this.state.checkVideoAttempts>=30)return _this.setState({checkVideoAttempts:0}),_this.props.onError&&_this.props.onError(),void _firehose.default.putRecord({study:"finish_dialog",study_group:"replay_video",event:"download_failed_timeout"});_this.checkVideo().then((function(response){_this.checkVideoUntilSuccessTimeout=null;var attempts=_this.state.checkVideoAttempts;response.ok||(_this.checkVideoUntilSuccessTimeout=setTimeout(_this.checkVideoUntilSuccess,delay),attempts+=1),_this.setState({checkVideoAttempts:attempts})}))}})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DownloadReplayVideoButton,_React$Component);var _proto=DownloadReplayVideoButton.prototype;return _proto.componentDidUpdate=function componentDidUpdate(prevProps,prevState,snapshot){this.state.downloadInitiated&&this.state.videoExists&&!prevState.videoExists&&this.tryDownloadVideo()},_proto.componentDidMount=function componentDidMount(){this.tryCreateReplayVideo(),this.checkVideoUntilSuccess(),this.shouldRenderButton()&&_firehose.default.putRecord({study:"finish_dialog",study_group:"replay_video",event:"download_button_seen"})},_proto.componentWillUnmount=function componentWillUnmount(){clearTimeout(this.checkVideoUntilSuccessTimeout)},_proto.checkVideo=function checkVideo(){var _this2=this;return fetch(this.getVideoUrl(),{method:"HEAD"}).then((function(response){return _this2.setState({videoExists:response.ok}),response}))},_proto.shouldRenderButton=function shouldRenderButton(){return this.props.channelId&&this.hasReplayVideo()},_proto.render=function render(){if(!this.shouldRenderButton())return null;var icon="fa-download";this.state.downloadInitiated&&(icon="fa-spinner fa-pulse");var style=Object.assign({},this.props.style);return _react.default.createElement(_Button.default,{color:_Button.default.ButtonColor.neutralDark,type:"button",className:"download-replay-video-button",style,disabled:!this.buttonEnabled(),onClick:this.clickDownloadVideo},_react.default.createElement("i",{className:"fa ".concat(icon),style:styles.icon}),_react.default.createElement("span",{style:styles.span},_locale.default.downloadReplayVideoButtonDownload()))},DownloadReplayVideoButton}(_react.default.Component);_defineProperty(DownloadReplayVideoButton,"propTypes",{appType:_propTypes.default.string,channelId:_propTypes.default.string,onError:_propTypes.default.func,replayLog:_propTypes.default.array,style:_propTypes.default.object});var styles={icon:{fontSize:17},span:{paddingLeft:10}},UnconnectedDownloadReplayVideoButton=DownloadReplayVideoButton;exports.UnconnectedDownloadReplayVideoButton=UnconnectedDownloadReplayVideoButton;var _default=(0,_reactRedux.connect)((function(state){var _state$pageConstants,_state$pageConstants2;return{appType:null===(_state$pageConstants=state.pageConstants)||void 0===_state$pageConstants?void 0:_state$pageConstants.appType,channelId:null===(_state$pageConstants2=state.pageConstants)||void 0===_state$pageConstants2?void 0:_state$pageConstants2.channelId,replayLog:state.shareDialog.replayLog}}))(DownloadReplayVideoButton);exports.default=_default},"./src/code-studio/components/Grid.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _studioTiles,_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_constants=__webpack_require__("./src/studio/constants.js"),_maze=__webpack_require__("./node_modules/@code-dot-org/maze/dist/main.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var studioTiles=(_defineProperty(_studioTiles={},_constants.SquareType.OPEN,"none"),_defineProperty(_studioTiles,_constants.SquareType.SPRITEFINISH,"goal"),_defineProperty(_studioTiles,_constants.SquareType.SPRITESTART,"sprite"),_studioTiles),studioAvatarList=["dog","cat","penguin","dinosaur","octopus","witch","bat","bird","dragon","squirrel","wizard","alien","ghost","monster","robot","unicorn","zombie","knight","ninja","pirate","caveboy","cavegirl","princess","spacebot","soccergirl","soccerboy","tennisgirl","tennisboy"],karelTiles=["border","path","start","end","obstacle"],beeConditions=["","flower-or-hive","flower-or-nothing","hive-or-nothing","flower-hive-or-nothing"],beeFeatures=["hive","flower"],Cell=function(_React$Component){function Cell(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(Cell,_React$Component),Cell.prototype.render=function render(){var text,cell=this.props.cell,classNames=[],tdStyle={};if(this.props.selected&&classNames.push("selected"),this.props.highlighted&&classNames.push("highlighted"),"playlab"===this.props.skin)classNames.push("playlab",studioTiles[cell.getTileType()]),cell.getTileType()===_constants.SquareType.SPRITESTART&&void 0!==cell.sprite_&&(tdStyle.backgroundImage="url('/blockly/media/skins/studio/"+studioAvatarList[cell.sprite_]+"_spritesheet_200px.png')");else if("starwarsgrid"===this.props.skin)if(1===cell.tileType_)tdStyle.backgroundImage="url('/blockly/media/skins/hoc2015x/goal.png')";else if(16===cell.tileType_)tdStyle.backgroundImage="url('/blockly/media/skins/hoc2015x/instructions_bb8.png')",tdStyle.backgroundSize="cover";else{text=_constants.WallTypeMask&cell.tileType_?"2x":"";var x=(_constants.WallCoordColMask&cell.tileType_)>>_constants.WallCoordColShift,y=(_constants.WallCoordRowMask&cell.tileType_)>>_constants.WallCoordRowShift;tdStyle.backgroundImage="url('/blockly/media/skins/hoc2015x/tiles_background1.png')",tdStyle.backgroundSize="800% 800%",tdStyle.backgroundPosition="-".concat(48*x,"px -").concat(38*y,"px")}else if("bounce"===this.props.skin){if(cell.tileType_){var image=["tiles_wall","goal","ball","paddle","paddle","ball","obstacle"][Math.log2(cell.tileType_)];tdStyle.backgroundImage="url('/blockly/media/skins/bounce/".concat(image,".png')")}}else{if(classNames.push(karelTiles[cell.tileType_]),_maze.utils.isBeeSkin(this.props.skin))cell.isVariableCloud()?(classNames.push("conditional"),classNames.push(beeConditions[cell.cloudType_])):void 0!==cell.featureType_&&classNames.push(beeFeatures[cell.featureType_]);else if(cell.isDirt()){classNames.push("dirt");var dirtValue=cell.getCurrentValue(),dirtIndex=10+dirtValue+(dirtValue<0?1:0);tdStyle.backgroundPosition=50*-dirtIndex}void 0!==cell.originalValue_&&null!==cell.originalValue_&&(text=cell.originalValue_.toString(),cell.range_&&cell.range_>cell.originalValue_&&(text+=" - "+cell.range_.toString()))}return _react.default.createElement("td",{className:classNames.join(" "),onClick:this.props.onClick.bind(null,this.props.row,this.props.col),onMouseDown:this.props.onMouseDown.bind(null,this.props.row,this.props.col),onMouseOver:this.props.onMouseOver.bind(null,this.props.row,this.props.col),onMouseUp:this.props.onMouseUp.bind(null,this.props.row,this.props.col),style:tdStyle},text)},Cell}(_react.default.Component);_defineProperty(Cell,"propTypes",{cell:_propTypes.default.object.isRequired,row:_propTypes.default.number.isRequired,col:_propTypes.default.number.isRequired,selected:_propTypes.default.bool.isRequired,onClick:_propTypes.default.func.isRequired,onMouseDown:_propTypes.default.func.isRequired,onMouseOver:_propTypes.default.func.isRequired,onMouseUp:_propTypes.default.func.isRequired,skin:_propTypes.default.string.isRequired,highlighted:_propTypes.default.bool});var Grid=function(_React$Component2){function Grid(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"state",{}),_defineProperty(_assertThisInitialized(_this),"beginDrag",(function(row,col){_this.setState({dragging:!0,dragStart:{row,col}})})),_defineProperty(_assertThisInitialized(_this),"moveDrag",(function(row,col){_this.state.dragging&&_this.setState({dragCurrent:{row,col}})})),_defineProperty(_assertThisInitialized(_this),"endDrag",(function(row,col){var dragStart=_this.state.dragStart;if(_this.setState({dragging:!1,dragStart:null,dragCurrent:null}),dragStart&&(dragStart.row!==row||dragStart.col!==col)){var top=Math.min(dragStart.row,row),left=Math.min(dragStart.col,col),bottom=Math.max(dragStart.row,row),right=Math.max(dragStart.col,col),cells=_this.props.cells.slice(top,bottom+1).map((function(row){return row.slice(left,right+1).map((function(cell){return cell.serialize()}))}));_this.props.setCopiedCells(cells)}})),_this}_inheritsLoose(Grid,_React$Component2);var _proto2=Grid.prototype;return _proto2.isHighlighting=function isHighlighting(row,col){return!(!this.state.dragging||!this.state.dragCurrent)&&(row>=Math.min(this.state.dragStart.row,this.state.dragCurrent.row)&&row<=Math.max(this.state.dragStart.row,this.state.dragCurrent.row)&&col>=Math.min(this.state.dragStart.col,this.state.dragCurrent.col)&&col<=Math.max(this.state.dragStart.col,this.state.dragCurrent.col))},_proto2.render=function render(){var _this2=this,tableRows=this.props.cells.map((function(row,x){var tableDatas=row.map((function(cell,y){var selected=_this2.props.selectedRow===x&&_this2.props.selectedCol===y;return _react.default.createElement(Cell,{key:"cell-"+x+"-"+y,cell,row:x,col:y,selected,highlighted:_this2.isHighlighting(x,y),onClick:_this2.props.onSelectionChange,onMouseDown:_this2.beginDrag,onMouseOver:_this2.moveDrag,onMouseUp:_this2.endDrag,skin:_this2.props.skin})}));return _react.default.createElement("tr",{key:"row-"+x},tableDatas)}));return _react.default.createElement("table",null,_react.default.createElement("tbody",null,tableRows))},Grid}(_react.default.Component);exports.default=Grid,_defineProperty(Grid,"propTypes",{cells:_propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.object)).isRequired,selectedRow:_propTypes.default.number,selectedCol:_propTypes.default.number,skin:_propTypes.default.string.isRequired,onSelectionChange:_propTypes.default.func.isRequired,setCopiedCells:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/code-studio/components/GridEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_maze=__webpack_require__("./node_modules/@code-dot-org/maze/dist/main.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var StudioCell=__webpack_require__("./src/studio/cell.js"),HarvesterCellEditor=__webpack_require__("./src/code-studio/components/HarvesterCellEditor.jsx"),PlanterCellEditor=__webpack_require__("./src/code-studio/components/PlanterCellEditor.jsx"),BeeCellEditor=__webpack_require__("./src/code-studio/components/BeeCellEditor.jsx"),CellEditor=__webpack_require__("./src/code-studio/components/CellEditor.jsx"),StudioCellEditor=__webpack_require__("./src/code-studio/components/StudioCellEditor.jsx"),StarWarsGridCellEditor=__webpack_require__("./src/code-studio/components/StarWarsGridCellEditor.jsx"),BounceCellEditor=__webpack_require__("./src/code-studio/components/BounceCellEditor.jsx"),Grid=__webpack_require__("./src/code-studio/components/Grid.jsx"),CellJSON=function(_React$Component){function CellJSON(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleChange",(function(event){_this.props.onChange(JSON.parse(event.target.value))})),_this}_inheritsLoose(CellJSON,_React$Component);var _proto=CellJSON.prototype;return _proto.componentDidUpdate=function componentDidUpdate(){var node=this.refs.serializedInput;node.focus(),node.select()},_proto.render=function render(){return _react.default.createElement("label",null,"Cell JSON (for copy/pasting):",_react.default.createElement("input",{type:"text",value:JSON.stringify(this.props.serialization),ref:"serializedInput",onChange:this.handleChange}))},CellJSON}(_react.default.Component);_defineProperty(CellJSON,"propTypes",{serialization:_propTypes.default.object.isRequired,onChange:_propTypes.default.func.isRequired});var GridEditor=function(_React$Component2){function GridEditor(props){var _this2,_cells;_defineProperty(_assertThisInitialized(_this2=_React$Component2.call(this,props)||this),"changeSelection",(function(row,col){_this2.setState({selectedRow:row,selectedCol:col})})),_defineProperty(_assertThisInitialized(_this2),"handleCellChange",(function(newSerializedCellData){var row=_this2.state.selectedRow,col=_this2.state.selectedCol;_this2.updateCells(row,col,[[newSerializedCellData]])})),_defineProperty(_assertThisInitialized(_this2),"pasteCopiedCells",(function(){var copiedCells=_this2.state.copiedCells,row=_this2.state.selectedRow,col=_this2.state.selectedCol;_this2.updateCells(row,col,copiedCells)})),_defineProperty(_assertThisInitialized(_this2),"setCopiedCells",(function(cells){_this2.setState({copiedCells:cells})})),_defineProperty(_assertThisInitialized(_this2),"computeNumMaps",(function(grid){if("playlab"===_this2.props.skin||"starwarsgrid"===_this2.props.skin)return 1;var numMaps=1;return grid.forEach((function(row){row.forEach((function(cell){var numPossibilitiesForCell=cell.getPossibleGridAssets().length;numMaps*=numPossibilitiesForCell}))})),numMaps}));var cellClass=_this2.getCellClass();return _cells=props.serializedMaze?props.serializedMaze.map((function(row){return row.map(cellClass.deserialize)})):props.maze.map((function(row,x){return row.map((function(mazeCell,y){var initialDirtCell=props.initialDirt[x][y];return cellClass.parseFromOldValues(mazeCell,initialDirtCell)}))})),_this2.state={cells:_cells},_this2}_inheritsLoose(GridEditor,_React$Component2);var _proto2=GridEditor.prototype;return _proto2.getCellClass=function getCellClass(){return"playlab"===this.props.skin||"starwarsgrid"===this.props.skin?StudioCell:_maze.utils.isBeeSkin(this.props.skin)?_maze.cells.BeeCell:_maze.utils.isHarvesterSkin(this.props.skin)?_maze.cells.HarvesterCell:_maze.utils.isPlanterSkin(this.props.skin)?_maze.cells.PlanterCell:_maze.cells.Cell},_proto2.getEditorClass=function getEditorClass(){return"bounce"===this.props.skin?BounceCellEditor:"playlab"===this.props.skin?StudioCellEditor:"starwarsgrid"===this.props.skin?StarWarsGridCellEditor:_maze.utils.isBeeSkin(this.props.skin)?BeeCellEditor:_maze.utils.isHarvesterSkin(this.props.skin)?HarvesterCellEditor:_maze.utils.isPlanterSkin(this.props.skin)?PlanterCellEditor:CellEditor},_proto2.updateCells=function updateCells(row,col,newCells){var _this3=this;if(void 0!==newCells&&void 0!==row&&void 0!==col){var cells=this.state.cells;newCells.forEach((function(newRow,i){newRow.forEach((function(cell,j){cells[row+i]&&cells[row+i][col+j]&&(cells[row+i][col+j]=_this3.getCellClass().deserialize(cell))}))}));var serializedData=cells.map((function(row){return row.map((function(cell){return cell.serialize()}))}));this.props.onUpdate(serializedData),this.setState({cells})}},_proto2.render=function render(){var cellEditor,selectedCellJson,pasteButton,cells=this.state.cells,row=this.state.selectedRow,col=this.state.selectedCol;if(cells[row]&&cells[row][col]){var cell=cells[row][col],EditorClass=this.getEditorClass();cellEditor=_react.default.createElement(EditorClass,{cell,row,col,onUpdate:this.handleCellChange}),selectedCellJson=_react.default.createElement(CellJSON,{serialization:cell.serialize(),onChange:this.handleCellChange}),this.state.copiedCells&&(pasteButton=_react.default.createElement("button",{type:"button",onClick:this.pasteCopiedCells},"Paste Selected "+this.state.copiedCells.length+"x"+this.state.copiedCells[0].length+" Cells"))}var numMaps=this.computeNumMaps(cells);return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"span5"},_react.default.createElement(Grid,{cells,selectedRow:this.state.selectedRow,selectedCol:this.state.selectedCol,skin:this.props.skin,setCopiedCells:this.setCopiedCells,onSelectionChange:this.changeSelection}),numMaps>1&&_react.default.createElement("p",null,"This configuration will generate ".concat(numMaps," maps.\n We run student code against each possible map, so if this number is large,\n performance will suffer.")),selectedCellJson,pasteButton),cellEditor)},GridEditor}(_react.default.Component);exports.default=GridEditor,_defineProperty(GridEditor,"propTypes",{serializedMaze:_propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.object)),maze:_propTypes.default.arrayOf(_propTypes.default.array),initialDirt:_propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.number)),skin:_propTypes.default.string.isRequired,onUpdate:_propTypes.default.func.isRequired}),window.dashboard=window.dashboard||{},window.dashboard.GridEditor=GridEditor,module.exports=exports.default},"./src/code-studio/components/GridEditor.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_GridEditor=_interopRequireDefault(__webpack_require__("./src/code-studio/components/GridEditor.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){var serializedMaze=[[16908288,16908288,0,0,0,0,0,0],[16908288,16908288,0,65536,131072,1048576,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,1,0,0],[0,0,0,0,0,0,0,0],[0,0,0,1048576,65536,1179648,0,0],[0,17956864,17956864,0,0,0,0,1048576],[0,17956864,17956864,0,0,0,0,0]].map((function(row){return row.map((function(cell){return{tileType:cell}}))}));storybook.storiesOf("GridEditor",module).addStoryTable([{name:"Karel: Farmer/Bee/Collector editor",story:function story(){return _react.default.createElement("div",{id:"grid"},_react.default.createElement(_GridEditor.default,{skin:"bee",maze:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,2,1,1,1,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],initialDirt:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],onUpdate:function onUpdate(){}}))}},{name:"Star Wars: BB-8 editor",story:function story(){return _react.default.createElement("div",{id:"grid"},_react.default.createElement(_GridEditor.default,{skin:"starwarsgrid",serializedMaze,onUpdate:function onUpdate(){}}))}}])},module.exports=exports.default},"./src/code-studio/components/HarvesterCellEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_CellEditor2=_interopRequireDefault(__webpack_require__("./src/code-studio/components/CellEditor.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var HarvesterCell=__webpack_require__("./node_modules/@code-dot-org/maze/dist/main.js").cells.HarvesterCell,PlanterCellEditor=function(_CellEditor){function PlanterCellEditor(){return _CellEditor.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PlanterCellEditor,_CellEditor),PlanterCellEditor.prototype.renderFields=function renderFields(values){return _react.default.createElement("div",null,_CellEditor.prototype.renderFields.call(this,values),_react.default.createElement("label",{htmlFor:"possibleFeatures"},"Possible Features:"),Object.keys(HarvesterCell.FeatureType).map((function(type){var value=HarvesterCell.FeatureType[type];return _react.default.createElement("label",{className:"checkbox",key:type},_react.default.createElement("input",{type:"checkbox",name:"possibleFeatures",value,checked:values.possibleFeatures.includes(value),onChange:this.handleChange}),type)}),this),_react.default.createElement("label",{htmlFor:"startsHidden"},"Starts Hidden:"),_react.default.createElement("input",{style:{margin:0},type:"checkbox",name:"startsHidden",checked:values.startsHidden,value:1,onChange:this.handleChange}))},PlanterCellEditor}(_CellEditor2.default);exports.default=PlanterCellEditor,module.exports=exports.default},"./src/code-studio/components/HiddenUploader.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var HiddenUploader=function(_React$Component){function HiddenUploader(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"openFileChooser",(function(){return _this.refs.uploader.click()})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(HiddenUploader,_React$Component);var _proto=HiddenUploader.prototype;return _proto.componentDidMount=function componentDidMount(){var props=this.props;(0,_jquery.default)(this.refs.uploader).fileupload({dataType:"json",url:this.props.toUrl,replaceFileInput:!1,add:function add(e,data){props.onUploadStart(data);var audioFileName=data.files[0].name.includes("mp3")?data.files[0].name:null;audioFileName&&_firehose.default.putRecord({study:"sound-dialog-2",study_group:"library-file",event:"upload-file",data_json:audioFileName},{includeUserId:!0})},done:function done(e,data){props.onUploadDone(data.result)},error:function error(e,data){props.onUploadError&&props.onUploadError(e.status)}})},_proto.componentWillUnmount=function componentWillUnmount(){(0,_jquery.default)(this.refs.uploader).fileupload("destroy")},_proto.render=function render(){return _react.default.createElement("input",{ref:"uploader",className:"uitest-hidden-uploader",type:"file",style:{display:"none"},accept:this.props.allowedExtensions||"*"})},HiddenUploader}(_react.default.Component);exports.default=HiddenUploader,_defineProperty(HiddenUploader,"propTypes",{toUrl:_propTypes.default.string.isRequired,allowedExtensions:_propTypes.default.string,onUploadStart:_propTypes.default.func.isRequired,onUploadDone:_propTypes.default.func.isRequired,onUploadError:_propTypes.default.func}),window.dashboard=window.dashboard||{},window.dashboard.HiddenUploader=HiddenUploader,module.exports=exports.default},"./src/code-studio/components/Icon.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var Icon=function(_React$Component){function Icon(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(Icon,_React$Component),Icon.prototype.render=function render(){return _react.default.createElement("i",{className:"fa fa-"+this.props.iconId,style:{float:"left",fontSize:"24px",width:"32px",textAlign:"center"}})},Icon}(_react.default.Component);exports.default=Icon,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(Icon,"propTypes",{iconId:_propTypes.default.string.isRequired}),window.dashboard=window.dashboard||{},window.dashboard.Icon=Icon,module.exports=exports.default},"./src/code-studio/components/IconLibrary.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_IconList=_interopRequireDefault(__webpack_require__("./src/code-studio/components/IconList.jsx")),_SearchBar=_interopRequireDefault(__webpack_require__("./src/templates/SearchBar.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var IconLibrary=function(_React$Component){function IconLibrary(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{search:""}),_defineProperty(_assertThisInitialized(_this),"search",(function(e){_this.setState({search:e.target.value.toLowerCase().replace(/[^-a-z0-9]/g,"")})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(IconLibrary,_React$Component),IconLibrary.prototype.render=function render(){return _react.default.createElement("div",null,_react.default.createElement("div",{style:{width:"300px",float:"right",marginBottom:10}},_react.default.createElement(_SearchBar.default,{onChange:this.search,placeholderText:_locale.default.iconSearchPlaceholder()})),_react.default.createElement(_IconList.default,{assetChosen:this.props.assetChosen,search:this.state.search}))},IconLibrary}(_react.default.Component);exports.default=IconLibrary,_defineProperty(IconLibrary,"propTypes",{assetChosen:_propTypes.default.func.isRequired}),module.exports=exports.default},"./src/code-studio/components/IconLibrary.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_IconLibrary=_interopRequireDefault(__webpack_require__("./src/code-studio/components/IconLibrary.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"IconLibrary",component:_IconLibrary.default};exports.default=_default;var Default=function Template(args){return _react.default.createElement("div",{style:{width:800}},_react.default.createElement(_IconLibrary.default,args))}.bind({});exports.Default=Default,Default.args={assetChosen:(0,_addonActions.action)("Selected Icon")}},"./src/code-studio/components/IconList.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_IconListEntry=_interopRequireDefault(__webpack_require__("./src/code-studio/components/IconListEntry.jsx")),_icons=__webpack_require__("./src/code-studio/components/icons.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var IconList=function(_React$Component){function IconList(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(IconList,_React$Component);var _proto=IconList.prototype;return _proto.getMatches=function getMatches(query){var results={};return Object.keys(_icons.aliases).forEach((function(alias){query.test(alias)&&_icons.aliases[alias].forEach((function(match){results[match]=alias}))})),results},_proto.render=function render(){var _this=this,search=this.props.search;"-"!==search[0]&&(search="(^|-)"+search);var query=new RegExp(search),results=this.getMatches(query),iconEntries=Object.keys(results).map((function(iconId){return _react.default.createElement(_IconListEntry.default,{key:iconId,assetChosen:_this.props.assetChosen,iconId,altMatch:results[iconId],query,search:_this.props.search})}));return _react.default.createElement("div",{style:{height:"330px",overflowY:"scroll",clear:"both"}},iconEntries.length>0?iconEntries:_locale.default.noIconsFound())},IconList}(_react.default.Component);exports.default=IconList,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(IconList,"propTypes",{assetChosen:_propTypes.default.func.isRequired,search:_propTypes.default.string.isRequired}),module.exports=exports.default},"./src/code-studio/components/IconListEntry.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_Icon=_interopRequireDefault(__webpack_require__("./src/code-studio/components/Icon.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var IconListEntry=function(_React$Component){function IconListEntry(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(IconListEntry,_React$Component);var _proto=IconListEntry.prototype;return _proto.highlightSearch=function highlightSearch(str){var offset=str.indexOf(this.props.search);if(-1===offset)return str;var left=str.substr(0,offset),right=str.substr(offset+this.props.search.length);return _react.default.createElement("span",null,left,_react.default.createElement("span",{style:{backgroundColor:"#ffc"}},this.props.search),right)},_proto.render=function render(){var iconLabel,columnWidth,altMatchText,styles={altMatchText:{float:"left",fontSize:"13px",color:"#999"},iconLabel:{float:"left",margin:"0 5px",fontSize:"13px",color:"#000"}};if(this.props.search){columnWidth="33%";var highlightedName=this.props.iconId;this.props.query.test(this.props.iconId)?highlightedName=this.highlightSearch(this.props.iconId):altMatchText=_react.default.createElement("p",{style:styles.altMatchText},"(",this.highlightSearch(this.props.altMatch),")"),iconLabel=_react.default.createElement("div",null,_react.default.createElement("p",{style:styles.iconLabel},highlightedName),altMatchText)}var rootStyles={float:"left",width:columnWidth,height:"35px",cursor:"pointer"},asset="fa-"+this.props.iconId;return _react.default.createElement("div",{style:rootStyles,title:this.props.iconId,onClick:this.props.assetChosen.bind(null,asset)},_react.default.createElement(_Icon.default,{iconId:this.props.iconId}),iconLabel)},IconListEntry}(_react.default.Component);exports.default=IconListEntry,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(IconListEntry,"propTypes",{assetChosen:_propTypes.default.func.isRequired,iconId:_propTypes.default.string.isRequired,altMatch:_propTypes.default.string.isRequired,query:_propTypes.default.instanceOf(RegExp).isRequired,search:_propTypes.default.string.isRequired}),window.dashboard=window.dashboard||{},window.dashboard.IconListEntry=IconListEntry,module.exports=exports.default},"./src/code-studio/components/ImagePicker.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_redux=__webpack_require__("./src/redux.js"),_AssetManager=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/code-studio/components/AssetManager.jsx")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_IconLibrary=_interopRequireDefault(__webpack_require__("./src/code-studio/components/IconLibrary.jsx")),_ImageURLInput=_interopRequireDefault(__webpack_require__("./src/code-studio/components/ImageURLInput.jsx")),_constants=__webpack_require__("./src/applab/constants.js"),_recorders=__webpack_require__("./src/code-studio/components/recorders.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var extensionFilter={image:".jpg, .jpeg, .jfif, .gif, .png",audio:".mp3, .wav",document:".jpg, .jpeg, .gif, .png, .pdf, .doc, .docx",default:".jpg, .jpeg, .jfif, .gif, .png, .mp3, .wav, .pdf, .doc, .docx"},ImagePicker=function(_React$Component){function ImagePicker(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{mode:_AssetManager.ImageMode.FILE}),_defineProperty(_assertThisInitialized(_this),"getAssetNameWithPrefix",(function(icon){_this.props.assetChosen(_constants.ICON_PREFIX+icon)})),_defineProperty(_assertThisInitialized(_this),"setMode",(function(mode){_this.setState({mode})})),_defineProperty(_assertThisInitialized(_this),"getBody",(function(disableAudio,levelName,isStartMode){if(_this.props.assetChosen&&_this.state.mode!==_AssetManager.ImageMode.FILE)return _this.state.mode===_AssetManager.ImageMode.ICON?_react.default.createElement(_IconLibrary.default,{assetChosen:_this.getAssetNameWithPrefix}):_react.default.createElement(_ImageURLInput.default,{assetChosen:_this.props.assetChosen,allowedExtensions:extensionFilter[_this.props.typeFilter],currentValue:_this.props.currentImageType===_AssetManager.ImageMode.URL?_this.props.currentValue:""});var allowedExtensions=_this.props.customAllowedExtensions||extensionFilter[_this.props.typeFilter]||extensionFilter.default;return _react.default.createElement(_AssetManager.default,{assetChosen:_this.props.assetChosen,assetsChanged:_this.props.assetsChanged,allowedExtensions,uploadsEnabled:_this.props.uploadsEnabled,useFilesApi:_this.props.useFilesApi,projectId:_this.props.projectId,soundPlayer:_this.props.soundPlayer,disableAudioRecording:disableAudio,recordingFileType:_this.props.recordingFileType,imagePicker:!0,elementId:_this.props.elementId,levelName,isStartMode})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ImagePicker,_React$Component),ImagePicker.prototype.render=function render(){var modeSwitch,_this2=this,styles={root:{margin:"0 0 0 5px"},fileModeToggle:{float:"left",margin:"0 20px 0 0",fontFamily:this.state.mode===_AssetManager.ImageMode.FILE?'"Gotham 5r"':null,color:this.state.mode===_AssetManager.ImageMode.FILE?null:"#999",fontSize:"16px",cursor:"pointer"},iconModeToggle:{margin:0,fontSize:"16px",fontFamily:this.state.mode===_AssetManager.ImageMode.ICON?'"Gotham 5r"':null,color:this.state.mode===_AssetManager.ImageMode.ICON?null:"#999",cursor:"pointer"},urlModeToggle:{margin:"0 20px 0 0",fontSize:"16px",fontFamily:this.state.mode===_AssetManager.ImageMode.URL?'"Gotham 5r"':null,color:this.state.mode===_AssetManager.ImageMode.URL?null:"#999",cursor:"pointer"},divider:{borderColor:_color.default.purple,margin:"5px 0"},warning:{color:_color.default.red,fontSize:13,fontWeight:"bold"}},title=this.props.assetChosen?_react.default.createElement("p",{className:"dialog-title"},_locale.default.chooseAssets()):_react.default.createElement("p",{className:"dialog-title"},_locale.default.manageAssets()),imageTypeFilter=!this.props.typeFilter||"image"===this.props.typeFilter;this.props.assetChosen&&imageTypeFilter&&(modeSwitch=_react.default.createElement("div",{id:"modeSwitch"},_react.default.createElement("span",{onClick:function onClick(){return _this2.setMode(_AssetManager.ImageMode.FILE)},style:styles.fileModeToggle},_locale.default.myFiles()),_react.default.createElement("span",{onClick:function onClick(){return _this2.setMode(_AssetManager.ImageMode.URL)},style:styles.urlModeToggle},_locale.default.linkToImage()),_react.default.createElement("span",{onClick:function onClick(){return _this2.setMode(_AssetManager.ImageMode.ICON)},style:styles.iconModeToggle},_locale.default.icons()),_react.default.createElement("hr",{style:styles.divider})));var levelName,isStartMode,disableAudio=this.props.disableAudioRecording||!!this.props.assetChosen,reduxState=(0,_redux.getStore)().getState();return reduxState&&reduxState.level&&(levelName=reduxState.level.name,isStartMode=reduxState.level.isStartMode),reduxState.javalab&&reduxState.javalab.levelName&&(levelName=reduxState.javalab.levelName,isStartMode=reduxState.javalab.isStartMode),_react.default.createElement("div",{className:"modal-content",style:styles.root},title,this.props.showUnderageWarning&&_react.default.createElement("p",{style:styles.warning},_locale.default.warningUploadingPersonalInformation()),modeSwitch,this.getBody(disableAudio,levelName,isStartMode))},ImagePicker}(_react.default.Component);exports.default=ImagePicker,_defineProperty(ImagePicker,"propTypes",{assetChosen:_propTypes.default.func,assetsChanged:_propTypes.default.func,typeFilter:_propTypes.default.string,customAllowedExtensions:_propTypes.default.string,uploadsEnabled:_propTypes.default.bool.isRequired,showUnderageWarning:_propTypes.default.bool.isRequired,useFilesApi:_propTypes.default.bool,soundPlayer:_propTypes.default.object,disableAudioRecording:_propTypes.default.bool,recordingFileType:_propTypes.default.oneOf(Object.values(_recorders.RecordingFileType)),currentValue:_propTypes.default.string,currentImageType:_propTypes.default.string,projectId:_propTypes.default.string,elementId:_propTypes.default.string}),module.exports=exports.default},"./src/code-studio/components/ImagePicker.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WithWarning=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ImagePicker=_interopRequireDefault(__webpack_require__("./src/code-studio/components/ImagePicker.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"ImagePicker",component:_ImagePicker.default};exports.default=_default;var WithWarning=function Template(args){return _react.default.createElement(_ImagePicker.default,args)}.bind({});exports.WithWarning=WithWarning,WithWarning.args={showUnderageWarning:!0,uploadsEnabled:!0}},"./src/code-studio/components/ImageURLInput.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_moment=_interopRequireDefault(__webpack_require__("./node_modules/moment/moment.js")),_InputPrompt=_interopRequireDefault(__webpack_require__("./src/templates/InputPrompt.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_assetPrefix=__webpack_require__("./src/assetManagement/assetPrefix.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ImageURLInput=function(_React$Component){function ImageURLInput(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{showError:!1}),_defineProperty(_assertThisInitialized(_this),"handleSubmitWrapper",(function(url){_assetPrefix.ABSOLUTE_REGEXP.test(url)?_this.props.assetChosen(url,(0,_moment.default)()):_this.setState({showError:!0})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ImageURLInput,_React$Component),ImageURLInput.prototype.render=function render(){return _react.default.createElement("div",null,_react.default.createElement("div",{style:styles.supportingText},_locale.default.imageURLInputDescription()),_react.default.createElement(_InputPrompt.default,{question:_locale.default.imageURLInputPrompt(),onInputReceived:this.handleSubmitWrapper,currentValue:this.props.currentValue}),this.state.showError&&_react.default.createElement("div",{style:styles.error},_locale.default.imageURLInputInvalid()),_react.default.createElement("div",{style:styles.example},_locale.default.imageURLInputExample()))},ImageURLInput}(_react.default.Component);exports.default=ImageURLInput,_defineProperty(ImageURLInput,"propTypes",{assetChosen:_propTypes.default.func,allowedExtensions:_propTypes.default.string,currentValue:_propTypes.default.string});var styles={supportingText:{margin:"1em 0",fontSize:"16px",lineHeight:"20px"},example:{margin:"1em 0",fontSize:"16px",lineHeight:"20px"},error:{color:"red"}};module.exports=exports.default},"./src/code-studio/components/InstructorsOnly.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_currentUserRedux=__webpack_require__("./src/templates/currentUserRedux.js"),_propTypes=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/prop-types/index.js"));var InstructorsOnly=function InstructorsOnly(_ref){var isInstructor=_ref.isInstructor,children=_ref.children;return isInstructor?children:null};InstructorsOnly.propTypes={isInstructor:_propTypes.default.bool,children:_propTypes.default.object};var _default=(0,_reactRedux.connect)((function(state){return{isInstructor:state.currentUser.userRoleInCourse===_currentUserRedux.CourseRoles.Instructor}}))(InstructorsOnly);exports.default=_default,module.exports=exports.default},"./src/code-studio/components/ModelCard.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var FeatureDetails=function(_React$Component){function FeatureDetails(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(FeatureDetails,_React$Component),FeatureDetails.prototype.render=function render(){var feature=this.props.feature;return _react.default.createElement("div",null,_react.default.createElement("p",{style:styles.bold},feature.id),_react.default.createElement("p",null,feature.description),_react.default.createElement("div",null,"Possible Values:"," ",!feature.values&&_react.default.createElement("p",{style:styles.details},"min: ",feature.min,", max: ",feature.max),feature.values&&feature.values.join(", ")),_react.default.createElement("br",null))},FeatureDetails}(_react.default.Component);_defineProperty(FeatureDetails,"propTypes",{feature:_propTypes.default.object});var ModelCard=function(_React$Component2){function ModelCard(){return _React$Component2.apply(this,arguments)||this}return _inheritsLoose(ModelCard,_React$Component2),ModelCard.prototype.render=function render(){var _metadata$summaryStat,_metadata$datasetDeta,_metadata$datasetDeta2,_metadata$datasetDeta3,model=this.props.model,metadata=null==model?void 0:model.metadata,selectedFeatures=null==metadata?void 0:metadata.features.map((function(feature){return feature.id}));return _react.default.createElement("div",null,model&&metadata&&_react.default.createElement("div",{style:styles.container},_react.default.createElement("h3",{style:styles.header},metadata.name),_react.default.createElement("div",null,_react.default.createElement("span",{style:styles.bold},"Id: "),_react.default.createElement("span",null,this.props.model.id)),_react.default.createElement("br",null),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"Accuracy"),_react.default.createElement("p",{style:styles.details},null===(_metadata$summaryStat=metadata.summaryStat)||void 0===_metadata$summaryStat?void 0:_metadata$summaryStat.stat,"%")),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"Intended Use"),_react.default.createElement("p",{style:styles.details},metadata.potentialUses)),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"Warnings and Limitations"),_react.default.createElement("p",{style:styles.details},metadata.potentialMisuses)),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"About the Data"),_react.default.createElement("p",{style:styles.details},null===(_metadata$datasetDeta=metadata.datasetDetails)||void 0===_metadata$datasetDeta?void 0:_metadata$datasetDeta.description),_react.default.createElement("br",null),(null===(_metadata$datasetDeta2=metadata.datasetDetails)||void 0===_metadata$datasetDeta2?void 0:_metadata$datasetDeta2.numRows)&&_react.default.createElement("p",{style:styles.details},"Dataset size: ",null===(_metadata$datasetDeta3=metadata.datasetDetails)||void 0===_metadata$datasetDeta3?void 0:_metadata$datasetDeta3.numRows," rows")),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"Features and Label"),_react.default.createElement("p",{style:styles.details},"Predict ",metadata.label.id," based on"," ",selectedFeatures.join(", "),".")),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"Label"),_react.default.createElement(FeatureDetails,{feature:metadata.label})),_react.default.createElement("div",{style:styles.subPanel},_react.default.createElement("div",{style:styles.heading},"Features"),metadata.features.map((function(feature){return _react.default.createElement(FeatureDetails,{feature,key:feature.id})})))))},ModelCard}(_react.default.Component);exports.default=ModelCard,_defineProperty(ModelCard,"propTypes",{model:_propTypes.default.object});var styles={container:{color:_color.default.black,textAlign:"left",backgroundColor:_color.default.lighter_gray,borderRadius:5,padding:20,whiteSpace:"normal",lineHeight:1.5,maxHeight:"calc(80vh - 150px)",overflow:"scroll"},subPanel:{backgroundColor:_color.default.lightest_gray,borderRadius:5,borderColor:_color.default.gray,marginBottom:10,padding:10,overflowWrap:"break-word"},bold:{fontFamily:"'Gotham 7r', sans-serif"},header:{fontFamily:"'Gotham 7r', sans-serif",marginTop:0,lineHeight:"20px"},heading:{fontFamily:"'Gotham 7r', sans-serif",fontSize:14,marginBottom:5,textAlign:"center"},details:{marginBottom:0}};module.exports=exports.default},"./src/code-studio/components/ModelManagerDialog.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_ModelCard=_interopRequireDefault(__webpack_require__("./src/code-studio/components/ModelCard.jsx")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_spinner=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/components/spinner.jsx")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ModelManagerDialog=function(_React$Component){function ModelManagerDialog(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{selectedModel:void 0,models:[],isModelListPending:!0,isImportPending:!1,isDeletePending:!1,confirmDialogOpen:!1,deletionStatus:void 0}),_defineProperty(_assertThisInitialized(_this),"closeModelManager",(function(){_this.props.onClose()})),_defineProperty(_assertThisInitialized(_this),"getModelList",(function(){_this.setState({isModelListPending:!0}),_jquery.default.ajax({url:"/api/v1/ml_models/names",method:"GET"}).then((function(models){var _this$props$levelbuil;null!==(_this$props$levelbuil=_this.props.levelbuilderModel)&&void 0!==_this$props$levelbuil&&_this$props$levelbuil.id?_jquery.default.ajax({url:"/api/v1/ml_models/".concat(_this.props.levelbuilderModel.id),method:"GET"}).then((function(metadata){_this.props.levelbuilderModel.metadata=metadata,models.unshift(_this.props.levelbuilderModel),_this.setState({isModelListPending:!1,models,selectedModel:models[0]})})):_this.setState({isModelListPending:!1,models,selectedModel:models[0]})}))})),_defineProperty(_assertThisInitialized(_this),"getModelById",(function(id){return _this.state.models.find((function(model){return model.id===id}))})),_defineProperty(_assertThisInitialized(_this),"logImport",(function(modelId){_firehose.default.putRecord({study:"ai-ml",study_group:"trained-models",event:"import-to-applab",data_json:JSON.stringify({modelId})},{includeUserId:!0})})),_defineProperty(_assertThisInitialized(_this),"importMLModel",_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var modelId;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _this.setState({isImportPending:!0}),modelId=_this.root.value,_this.logImport(modelId),_context.next=5,_this.props.autogenerateML(modelId);case 5:_this.setState({isImportPending:!1}),_this.closeModelManager();case 7:case"end":return _context.stop()}}),_callee)})))),_defineProperty(_assertThisInitialized(_this),"handleChange",(function(e){var model=_this.getModelById(e.target.value);_this.setState({selectedModel:model})})),_defineProperty(_assertThisInitialized(_this),"showDeleteConfirmation",(function(){_this.setState({confirmDialogOpen:!0})})),_defineProperty(_assertThisInitialized(_this),"closeConfirmDialog",(function(){_this.setState({confirmDialogOpen:!1,deletionStatus:void 0})})),_defineProperty(_assertThisInitialized(_this),"deleteModel",(function(){_this.setState({isDeletePending:!0}),_jquery.default.ajax({url:"/api/v1/ml_models/".concat(_this.state.selectedModel.id),method:"DELETE"}).then((function(response){"failure"===response.status?_this.setState({deletionStatus:_locale.default.aiTrainedModelsDeleteModelFailed({id:response.id}),isDeletePending:!1}):(_this.setState({confirmDialogOpen:!1,isDeletePending:!1}),_this.getModelList())}))})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ModelManagerDialog,_React$Component);var _proto=ModelManagerDialog.prototype;return _proto.componentDidUpdate=function componentDidUpdate(prevProps){this.props.isOpen&&!prevProps.isOpen&&(this.setState({selectedModel:void 0,models:[]}),this.getModelList())},_proto.render=function render(){var _this$state$selectedM,_this$props$levelbuil2,_this2=this,isOpen=this.props.isOpen,noModels=!this.state.isModelListPending&&0===this.state.models.length,showDeleteButton=(null===(_this$state$selectedM=this.state.selectedModel)||void 0===_this$state$selectedM?void 0:_this$state$selectedM.id)!==(null===(_this$props$levelbuil2=this.props.levelbuilderModel)||void 0===_this$props$levelbuil2?void 0:_this$props$levelbuil2.id);return _react.default.createElement("div",{className:"ml-modal"},_react.default.createElement(_BaseDialog.default,{isOpen,handleClose:this.closeModelManager,useUpdatedStyles:!0,style:styles.dialog},_react.default.createElement("h1",{style:styles.header},_locale.default.aiTrainedModels()),this.state.isModelListPending&&_react.default.createElement("div",{style:styles.spinner},_react.default.createElement(_spinner.default,null)),!this.state.isModelListPending&&_react.default.createElement("div",null,_react.default.createElement("div",{style:styles.left},_react.default.createElement("select",{name:"model",ref:function ref(element){return _this2.root=element},onChange:this.handleChange,style:{marginBottom:0}},this.state.models.map((function(model){return _react.default.createElement("option",{key:model.id,value:model.id},model.name)}))),noModels&&_react.default.createElement("div",{style:styles.message},_locale.default.aiTrainedModelsNoModels()),_react.default.createElement("br",null),_react.default.createElement(_Button.default,{text:_locale.default.import(),color:_Button.default.ButtonColor.brandSecondaryDefault,onClick:this.importMLModel,disabled:noModels,isPending:this.state.isImportPending,pendingText:_locale.default.importingWithEllipsis()}),showDeleteButton&&_react.default.createElement(_Button.default,{text:_locale.default.delete(),color:_Button.default.ButtonColor.red,onClick:this.showDeleteConfirmation,disabled:noModels,icon:"trash",iconClassName:"fa-trash"})),_react.default.createElement("div",{style:styles.right},_react.default.createElement(_ModelCard.default,{model:this.state.selectedModel})))),_react.default.createElement(_BaseDialog.default,{isOpen:this.state.confirmDialogOpen,handleClose:this.closeConfirmDialog,useUpdatedStyles:!0,style:styles.dialog},_react.default.createElement("h1",{style:styles.header},_locale.default.aiTrainedModelsDeleteModelConfirm()),_react.default.createElement("div",{style:styles.left},_react.default.createElement("p",{style:styles.message},_locale.default.aiTrainedModelsDeleteModelMessage()),_react.default.createElement("div",null,_react.default.createElement(_Button.default,{text:_locale.default.no(),color:_Button.default.ButtonColor.brandSecondaryDefault,onClick:this.closeConfirmDialog}),_react.default.createElement(_Button.default,{text:_locale.default.delete(),color:_Button.default.ButtonColor.red,onClick:this.deleteModel,icon:"trash",iconClassName:"fa-trash",pendingText:_locale.default.deletingWithEllipsis(),isPending:this.state.isDeletePending})),_react.default.createElement("p",{style:styles.message},this.state.deletionStatus)),_react.default.createElement("div",{style:styles.right},_react.default.createElement(_ModelCard.default,{model:this.state.selectedModel}))))},ModelManagerDialog}(_react.default.Component);exports.default=ModelManagerDialog,_defineProperty(ModelManagerDialog,"propTypes",{isOpen:_propTypes.default.bool.isRequired,onClose:_propTypes.default.func.isRequired,autogenerateML:_propTypes.default.func,levelbuilderModel:_propTypes.default.object});var styles={dialog:{padding:"0 15px",cursor:"default"},left:{float:"left",width:"40%",padding:20,boxSizing:"border-box"},right:{float:"left",width:"60%",padding:20,boxSizing:"border-box"},header:{textAlign:"center",fontSize:24,marginTop:20},message:{color:_color.default.dark_charcoal,textAlign:"left",margin:7,overflow:"hidden",lineHeight:"15px",whiteSpace:"pre-wrap"},spinner:{height:"calc(80vh - 140px)",color:_color.default.dark_charcoal}};module.exports=exports.default},"./src/code-studio/components/NameFailureDialog.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_DialogFooter=_interopRequireDefault(__webpack_require__("./src/templates/teacherDashboard/DialogFooter.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var NameFailureDialog=function(_React$Component){function NameFailureDialog(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(NameFailureDialog,_React$Component),NameFailureDialog.prototype.render=function render(){return _react.default.createElement(_BaseDialog.default,{title:"Unable to rename project",isOpen:this.props.isOpen,handleClose:this.props.handleClose},_react.default.createElement("h1",{style:styles.title},_locale.default.nameFailureDialogTitle()),_react.default.createElement("div",{style:styles.body},_react.default.createElement("p",null,_locale.default.nameFailureDialogBody({text:this.props.flaggedText}))),_react.default.createElement(_DialogFooter.default,{rightAlign:!0},_react.default.createElement(_Button.default,{__useDeprecatedTag:!0,text:_locale.default.ok(),onClick:this.props.handleClose,color:_Button.default.ButtonColor.brandSecondaryDefault,className:"no-mc ui-confirm-project-delete-button"})))},NameFailureDialog}(_react.default.Component);exports.default=NameFailureDialog,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(NameFailureDialog,"propTypes",{flaggedText:_propTypes.default.string,isOpen:_propTypes.default.bool.isRequired,handleClose:_propTypes.default.func.isRequired});var styles={title:{textAlign:"left",fontSize:"32px"},body:{textAlign:"left",color:_color.default.black}};module.exports=exports.default},"./src/code-studio/components/PlanterCellEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_CellEditor2=_interopRequireDefault(__webpack_require__("./src/code-studio/components/CellEditor.jsx")),_maze=__webpack_require__("./node_modules/@code-dot-org/maze/dist/main.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var PlanterCell=_maze.cells.PlanterCell,SquareType=_maze.tiles.SquareType,PlanterCellEditor=function(_CellEditor){function PlanterCellEditor(){return _CellEditor.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PlanterCellEditor,_CellEditor);var _proto=PlanterCellEditor.prototype;return _proto.getSelectFieldNames=function getSelectFieldNames(){return["tileType","featureType"]},_proto.renderFields=function renderFields(values){return _react.default.createElement("div",null,this.renderTileTypes(values),_react.default.createElement("label",{htmlFor:"featureType"},"Feature Type:"),_react.default.createElement("select",{name:"featureType",value:values.featureType,disabled:this.props.cell.getTile()!==SquareType.OPEN,onChange:this.handleChange},Object.keys(PlanterCell.FeatureType).map((function(type){return _react.default.createElement("option",{key:type,value:PlanterCell.FeatureType[type]},type.toLowerCase())}))))},PlanterCellEditor}(_CellEditor2.default);exports.default=PlanterCellEditor,module.exports=exports.default},"./src/code-studio/components/SendToPhone.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_trackEvent=_interopRequireDefault(__webpack_require__("./src/util/trackEvent.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedShareAllowedDialog=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_PendingButton=_interopRequireDefault(__webpack_require__("./src/templates/PendingButton.jsx")),_AdvancedShareOptions=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AdvancedShareOptions.jsx")),_AbuseError=_interopRequireDefault(__webpack_require__("./src/code-studio/components/AbuseError.jsx")),_SendToPhone=_interopRequireDefault(__webpack_require__("./src/code-studio/components/SendToPhone.jsx")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),applabConstants=_interopRequireWildcard(__webpack_require__("./src/applab/constants.js")),p5labConstants=_interopRequireWildcard(__webpack_require__("./src/p5lab/constants.js")),_dancePartySongArtistTags=__webpack_require__("./src/code-studio/dancePartySongArtistTags.js"),_shareDialogRedux=__webpack_require__("./src/code-studio/components/shareDialogRedux.js"),_DownloadReplayVideoButton=_interopRequireDefault(__webpack_require__("./src/code-studio/components/DownloadReplayVideoButton.jsx")),_publishDialogRedux=__webpack_require__("./src/templates/projects/publishDialog/publishDialogRedux.js"),_PublishDialog=_interopRequireDefault(__webpack_require__("./src/templates/projects/publishDialog/PublishDialog.jsx")),_utils=__webpack_require__("./src/utils.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_LibraryCreationDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryCreationDialog.jsx")),_qrcode=_interopRequireDefault(__webpack_require__("./node_modules/qrcode.react/lib/index.js")),_copyToClipboard=_interopRequireDefault(__webpack_require__("./src/util/copyToClipboard.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_project_default=_interopRequireDefault(__webpack_require__("./static/projects/project_default.png"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WithUnpublishPending=exports.WithUnpublishButton=exports.WithUnder13Warning=exports.WithThumbnail=exports.WithSharingForUserDisabled=exports.WithPublishButton=exports.WithExportForWeb=exports.WithDisabledPublishButton=exports.SpriteLab=exports.InRestrictedShareMode=exports.AppLab=exports.Abusive=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ShareAllowedDialog=__webpack_require__("./src/code-studio/components/ShareAllowedDialog.jsx"),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_decorators=__webpack_require__("./.storybook/decorators.js"),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_publishDialogRedux=_interopRequireDefault(__webpack_require__("./src/templates/projects/publishDialog/publishDialogRedux.js")),_pageConstants=_interopRequireDefault(__webpack_require__("./src/redux/pageConstants.js")),_shareDialogRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/components/shareDialogRedux.js")),_projectRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/projectRedux.ts"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedShareDialog=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_currentUserRedux=__webpack_require__("./src/templates/currentUserRedux.js"),_ShareAllowedDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/components/ShareAllowedDialog.jsx")),_ShareDisallowedDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/components/ShareDisallowedDialog.jsx")),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_excluded=["signInState","isProjectLevel","allowSignedOutShare"];function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ShareDialog=function(_Component){function ShareDialog(){return _Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ShareDialog,_Component),ShareDialog.prototype.render=function render(){var _this$props=this.props,signInState=_this$props.signInState,isProjectLevel=_this$props.isProjectLevel,allowSignedOutShare=_this$props.allowSignedOutShare,otherProps=_objectWithoutProperties(_this$props,_excluded);return signInState===_currentUserRedux.SignInState.SignedIn||isProjectLevel||allowSignedOutShare?_react.default.createElement(_ShareAllowedDialog.default,otherProps):_react.default.createElement(_ShareDisallowedDialog.default,null)},ShareDialog}(_react.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ShareDialog,"propTypes",{signInState:_propTypes.default.oneOf(Object.values(_currentUserRedux.SignInState)),isProjectLevel:_propTypes.default.bool.isRequired,allowSignedOutShare:_propTypes.default.bool,selectedSong:_propTypes.default.string,shareUrl:_propTypes.default.string,thumbnailUrl:_propTypes.default.string,isAbusive:_propTypes.default.bool,canPrint:_propTypes.default.bool,canPublish:_propTypes.default.bool,isPublished:_propTypes.default.bool,channelId:_propTypes.default.string,appType:_propTypes.default.string,onClickPopup:_propTypes.default.func,hideBackdrop:_BaseDialog.default.propTypes.hideBackdrop,canShareSocial:_propTypes.default.bool,userSharingDisabled:_propTypes.default.bool});var UnconnectedShareDialog=ShareDialog;exports.UnconnectedShareDialog=UnconnectedShareDialog;var _default=(0,_reactRedux.connect)((function(state){return{signInState:state.currentUser.signInState}}))(ShareDialog);exports.default=_default},"./src/code-studio/components/ShareDisallowedDialog.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedShareDisallowedDialog=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_shareDialogRedux=__webpack_require__("./src/code-studio/components/shareDialogRedux.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ShareDisallowedDialog=function(_Component){function ShareDisallowedDialog(){return _Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ShareDisallowedDialog,_Component),ShareDisallowedDialog.prototype.render=function render(){return _react.default.createElement(_BaseDialog.default,{useUpdatedStyles:!0,isOpen:this.props.isOpen,handleClose:this.props.hideShareDialog},_react.default.createElement("div",{style:styles.container},_react.default.createElement("div",{style:styles.heading},_locale.default.createAccountToShare()),_react.default.createElement("div",{style:styles.middle},_locale.default.createAccountToShareDescription()),_react.default.createElement("div",{style:styles.bottom},_react.default.createElement(_Button.default,{__useDeprecatedTag:!0,onClick:this.props.hideShareDialog,text:_locale.default.cancel(),color:_Button.default.ButtonColor.gray}),_react.default.createElement(_Button.default,{__useDeprecatedTag:!0,href:"/users/sign_up?user_return_to=".concat(location.pathname),text:_locale.default.createAccount(),color:_Button.default.ButtonColor.brandSecondaryDefault}))))},ShareDisallowedDialog}(_react.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ShareDisallowedDialog,"propTypes",{isOpen:_propTypes.default.bool.isRequired,hideShareDialog:_propTypes.default.func.isRequired});var styles={container:{margin:20,color:_color.default.charcoal},heading:{fontSize:16,fontFamily:"'Gotham 5r', sans-serif"},middle:{marginTop:20,marginBottom:20,paddingBottom:20,paddingTop:20,borderTopWidth:1,borderBottomWidth:1,borderRightWidth:0,borderLeftWidth:0,borderStyle:"solid",borderColor:_color.default.lighter_gray,display:"flex"},bottom:{display:"flex",justifyContent:"space-between"}},UnconnectedShareDisallowedDialog=ShareDisallowedDialog;exports.UnconnectedShareDisallowedDialog=UnconnectedShareDisallowedDialog;var _default=(0,_reactRedux.connect)((function(state){return{isOpen:state.shareDialog.isOpen}}),{hideShareDialog:_shareDialogRedux.hideShareDialog})(ShareDisallowedDialog);exports.default=_default},"./src/code-studio/components/ShareDisallowedDialog.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js")),_ShareDisallowedDialog=__webpack_require__("./src/code-studio/components/ShareDisallowedDialog.jsx");exports.default=function _default(storybook){storybook.storiesOf("ShareDisallowedDialog",module).addStoryTable([{name:"basic example",story:function story(){return _react.default.createElement(_ShareDisallowedDialog.UnconnectedShareDisallowedDialog,{isOpen:!0,hideShareDialog:function hideShareDialog(){}})}}])},module.exports=exports.default},"./src/code-studio/components/SmallFooter.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_debounce=_interopRequireDefault(__webpack_require__("./node_modules/lodash/debounce.js")),_SafeMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/SafeMarkdown.jsx")),_reportAbuse=__webpack_require__("./src/reportAbuse.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0){var caretIcon=this.state.menuState===MenuState_EXPANDED?"fa fa-caret-down":"fa fa-caret-up";return _react.default.createElement("button",{type:"button",className:"more-link",onClick:this.clickBaseMenu},this.props.baseMoreMenuString," ",_react.default.createElement("i",{className:caretIcon}))}},_proto.renderMoreMenu=function renderMoreMenu(styles){var channelId=this.props.channel;(0,_reportAbuse.userAlreadyReportedAbuse)(channelId)&&_lodash.default.remove(this.props.menuItems,(function(menuItem){return"report-abuse"===menuItem.key}));var menuItemElements=this.props.menuItems.map(function(item,index){return _react.default.createElement("li",{key:index,style:styles.listItem,className:"ui-test-".concat(item.key)},_react.default.createElement("a",{href:item.link,ref:item.copyright?"menuCopyright":void 0,target:item.newWindow?"_blank":"_parent",onClick:item.copyright?this.clickMenuCopyright:void 0},item.text))}.bind(this));return _react.default.createElement("ul",{id:"more-menu",style:styles.moreMenu},menuItemElements)},SmallFooter}(_react.default.Component);exports.default=SmallFooter,_defineProperty(SmallFooter,"propTypes",{i18nDropdown:_propTypes.default.string,copyrightInBase:_propTypes.default.bool.isRequired,copyrightStrings:_propTypes.default.shape({thank_you:_propTypes.default.string.isRequired,help_from_html:_propTypes.default.string.isRequired,art_from_html:_propTypes.default.string.isRequired,code_from_html:_propTypes.default.string.isRequired,trademark:_propTypes.default.string.isRequired,built_on_github:_propTypes.default.string.isRequired}),baseCopyrightString:_propTypes.default.string,baseMoreMenuString:_propTypes.default.string.isRequired,baseStyle:_propTypes.default.object,menuItems:_propTypes.default.arrayOf(_propTypes.default.shape({text:_propTypes.default.string.isRequired,link:_propTypes.default.string.isRequired,copyright:_propTypes.default.bool,newWindow:_propTypes.default.bool})).isRequired,phoneFooter:_propTypes.default.bool,className:_propTypes.default.string,fontSize:_propTypes.default.number,rowHeight:_propTypes.default.number,fullWidth:_propTypes.default.bool,channel:_propTypes.default.string,unitYear:_propTypes.default.string}),module.exports=exports.default},"./src/code-studio/components/SortedTableSelect.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),Table=_interopRequireWildcard(__webpack_require__("./node_modules/reactabular-table/dist/index.js")),_Headings=__webpack_require__("./src/lib/ui/Headings.jsx"),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_tableConstants=__webpack_require__("./src/templates/tables/tableConstants.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_lodash=__webpack_require__("./node_modules/lodash/lodash.js"),sort=_interopRequireWildcard(__webpack_require__("./node_modules/sortabular/dist/index.js")),_wrapped_sortable=_interopRequireDefault(__webpack_require__("./src/templates/tables/wrapped_sortable.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_constants=__webpack_require__("./src/studio/constants.js"),_tileGuide=_interopRequireDefault(__webpack_require__("./static/code_studio/tile-guide.png")),_CellEditor2=_interopRequireDefault(__webpack_require__("./src/code-studio/components/CellEditor.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i65535&&_react.default.createElement("span",null,_react.default.createElement("label",{htmlFor:"zoom"},"Double size:"),_react.default.createElement("input",{ref:function ref(c){_this.zoom=c},name:"zoom",type:"checkbox",checked:zoom,onChange:this.handleChange})),type===_constants.SquareType.SPRITESTART&&_react.default.createElement("span",null,_react.default.createElement("label",{htmlFor:"direction"},"Start direction:"),_react.default.createElement("select",{ref:function ref(c){_this.direction=c},name:"direction",value:this.props.cell.direction_,onChange:this.handleChange},Object.entries(startDirections).map((function(_ref3){var _ref4=_slicedToArray(_ref3,2),name=_ref4[0],value=_ref4[1];return _react.default.createElement("option",{value,key:value},name)})))))},StarWarsGridCellEditor}(_CellEditor2.default);exports.default=StarWarsGridCellEditor,module.exports=exports.default},"./src/code-studio/components/StudioCellEditor.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _constants=__webpack_require__("./src/studio/constants.js"),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_CellEditor2=_interopRequireDefault(__webpack_require__("./src/code-studio/components/CellEditor.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var avatarList=["dog","cat","penguin","dinosaur","octopus","witch","bat","bird","dragon","squirrel","wizard","alien","ghost","monster","robot","unicorn","zombie","knight","ninja","pirate","caveboy","cavegirl","princess","spacebot","soccergirl","soccerboy","tennisgirl","tennisboy"],usedSquareTypes={OPEN:_constants.SquareType.OPEN,GOAL:_constants.SquareType.SPRITEFINISH,START:_constants.SquareType.SPRITESTART},StudioCellEditor=function(_CellEditor){function StudioCellEditor(){return _CellEditor.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(StudioCellEditor,_CellEditor);var _proto=StudioCellEditor.prototype;return _proto.getSelectFieldNames=function getSelectFieldNames(){return _CellEditor.prototype.getSelectFieldNames.call(this).concat(["speed","size","direction","emotion","sprite"])},_proto.renderFields=function renderFields(values){return _react.default.createElement("div",null,_CellEditor.prototype.renderTileTypes.call(this,values,usedSquareTypes),values.tileType===_constants.SquareType.SPRITESTART&&_react.default.createElement("div",null,_react.default.createElement("label",{htmlFor:"sprite"},"Sprite:"),_react.default.createElement("select",{name:"sprite",value:values.sprite,onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"default"),avatarList.map((function(sprite,i){return _react.default.createElement("option",{key:sprite,value:i},sprite)}))),_react.default.createElement("label",{htmlFor:"speed"},"Speed: "),_react.default.createElement("select",{name:"speed",value:values.speed,onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"default"),Object.keys(_constants.SpriteSpeed).map((function(type){return _react.default.createElement("option",{key:type,value:_constants.SpriteSpeed[type]},type.replace(/_/g," ").toLowerCase())}))),_react.default.createElement("label",{htmlFor:"size"},"Size: "),_react.default.createElement("select",{name:"size",value:values.size,onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"default"),Object.keys(_constants.SpriteSize).map((function(type){return _react.default.createElement("option",{key:type,value:_constants.SpriteSize[type]},type.replace(/_/g," ").toLowerCase())}))),_react.default.createElement("label",{htmlFor:"direction"},"Direction: "),_react.default.createElement("select",{name:"direction",value:values.direction,onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"default"),Object.keys(_constants.Direction).map((function(type){return _react.default.createElement("option",{key:type,value:_constants.Direction[type]},type.replace(/_/g," ").toLowerCase())}))),_react.default.createElement("label",{htmlFor:"emotion"},"Emotion: "),_react.default.createElement("select",{name:"emotion",value:values.emotion,onChange:this.handleChange},_react.default.createElement("option",{value:"undefined"},"default"),Object.keys(_constants.Emotions).map((function(type){return _react.default.createElement("option",{key:type,value:_constants.Emotions[type]},type.replace(/_/g," ").toLowerCase())})))))},StudioCellEditor}(_CellEditor2.default);exports.default=StudioCellEditor,module.exports=exports.default},"./src/code-studio/components/SublevelCard.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_ProgressBubble=_interopRequireDefault(__webpack_require__("./src/templates/progress/ProgressBubble.jsx")),_progressHelpers=__webpack_require__("./src/templates/progress/progressHelpers.js"),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_LessonExtrasFlagIcon=_interopRequireDefault(__webpack_require__("./src/templates/progress/LessonExtrasFlagIcon.jsx")),_MazeThumbnail=_interopRequireDefault(__webpack_require__("./src/code-studio/components/lessonExtras/MazeThumbnail.jsx")),_queryString=_interopRequireDefault(__webpack_require__("./node_modules/query-string/index.js")),_progressTypes=__webpack_require__("./src/templates/progress/progressTypes.js"),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_SafeMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/SafeMarkdown.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_radium=_interopRequireDefault(__webpack_require__("./node_modules/radium/es/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_alert=_interopRequireDefault(__webpack_require__("./src/templates/alert.jsx")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_ProjectUpdatedAt=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectUpdatedAt.jsx")),_projectHeaderModule=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/project-header.module.scss")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var DisplayProjectName=function(_React$Component){function DisplayProjectName(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(DisplayProjectName,_React$Component),DisplayProjectName.prototype.render=function render(){return _react.default.createElement("div",{className:_projectHeaderModule.default.buttonWrapper},_react.default.createElement("div",{className:"project_name_wrapper header_text",tabIndex:0},_react.default.createElement("div",{className:"project_name header_text"},this.props.projectName),_react.default.createElement(_ProjectUpdatedAt.default,null)),_react.default.createElement("button",{type:"button",className:(0,_classnames.default)(_projectHeaderModule.default.buttonSpacing,"project_edit","header_button","header_button_light","no-mc"),onClick:this.props.beginEdit},_locale.default.rename()))},DisplayProjectName}(_react.default.Component);exports.default=DisplayProjectName,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(DisplayProjectName,"propTypes",{beginEdit:_propTypes.default.func.isRequired,projectName:_propTypes.default.string.isRequired}),module.exports=exports.default},"./src/code-studio/components/header/EditProjectName.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_NameFailureDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/components/NameFailureDialog.jsx")),_NameFailureError=_interopRequireDefault(__webpack_require__("./src/code-studio/NameFailureError.js")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts"),_projectHeaderModule=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/project-header.module.scss")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var UnconnectedEditProjectName=function(_React$Component){function UnconnectedEditProjectName(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{savingName:!1}),_defineProperty(_assertThisInitialized(_this),"onCancel",(function(event){"Escape"===event.code&&_this.props.finishEdit()})),_defineProperty(_assertThisInitialized(_this),"saveNameChange",(function(){if(!_this.state.savingName){var newName=_this.nameChangeInput.value.trim().substr(0,100);0!==newName.length&&(_this.setState({savingName:!0}),_this.props.saveProjectName(newName).then((function(){_this.setState({savingName:!1}),dashboard.header.updateTimestamp(),_this.props.finishEdit()})).catch((function(error){error instanceof _NameFailureError.default&&_this.props.setNameFailure(error.nameFailure),_this.setState({savingName:!1})})))}})),_defineProperty(_assertThisInitialized(_this),"onSubmit",(function(event){event.preventDefault(),_this.saveNameChange()})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(UnconnectedEditProjectName,_React$Component);var _proto=UnconnectedEditProjectName.prototype;return _proto.componentDidMount=function componentDidMount(){this.nameChangeInput.focus(),this.nameChangeInput.addEventListener("keyup",this.onCancel)},_proto.componentWillUnmount=function componentWillUnmount(){this.nameChangeInput.removeEventListener("keyup",this.onCancel)},_proto.render=function render(){var _this2=this;return _react.default.createElement(_react.default.Fragment,null,_react.default.createElement("form",{onSubmit:this.onSubmit,className:_projectHeaderModule.default.buttonWrapper},_react.default.createElement("div",{className:"project_name_wrapper header_text"},_react.default.createElement("input",{type:"text",className:"project_name header_input",maxLength:"100",defaultValue:this.props.projectName,ref:function ref(input){_this2.nameChangeInput=input}})),_react.default.createElement("button",{type:"button",className:(0,_classnames.default)(_projectHeaderModule.default.buttonSpacing,"project_save","header_button","header_button_light no-mc"),onClick:this.saveNameChange,disabled:this.state.savingName},_locale.default.save())),_react.default.createElement(_NameFailureDialog.default,{flaggedText:this.props.projectNameFailure,isOpen:!!this.props.projectNameFailure,handleClose:this.props.unsetNameFailure}))},UnconnectedEditProjectName}(_react.default.Component);_defineProperty(UnconnectedEditProjectName,"propTypes",{finishEdit:_propTypes.default.func.isRequired,projectName:_propTypes.default.string.isRequired,saveProjectName:_propTypes.default.func.isRequired,projectNameFailure:_propTypes.default.string,setNameFailure:_propTypes.default.func.isRequired,unsetNameFailure:_propTypes.default.func.isRequired});var _default=(0,_reactRedux.connect)((function(state){return{projectNameFailure:state.project.projectNameFailure}}),{setNameFailure:_projectRedux.setNameFailure,unsetNameFailure:_projectRedux.unsetNameFailure})(UnconnectedEditProjectName);exports.default=_default,module.exports=exports.default},"./src/code-studio/components/header/HeaderFinish.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_HeaderVignette=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/HeaderVignette.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var HeaderFinish=function(_React$Component){function HeaderFinish(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(HeaderFinish,_React$Component);var _proto=HeaderFinish.prototype;return _proto.getFullWidth=function getFullWidth(){var component=(0,_jquery.default)(this.refs.headerFinish);return component.length>0?component.width():0},_proto.setDesiredWidth=function setDesiredWidth(){this.props.setDesiredWidth&&this.props.setDesiredWidth(this.getFullWidth())},_proto.componentDidMount=function componentDidMount(){this.setDesiredWidth()},_proto.componentDidUpdate=function componentDidUpdate(){this.setDesiredWidth()},_proto.shouldComponentUpdate=function shouldComponentUpdate(nextProps,nextState){var lessonData=this.props.lessonData;return this.props.width!==nextProps.width||!!lessonData!=!!nextProps.lessonData||lessonData.finishLink!==nextProps.lessonData.finishLink},_proto.render=function render(){var _this$props=this.props,lessonData=_this$props.lessonData,isRtl=_this$props.isRtl,fullWidth=this.getFullWidth(),vignetteStyle=this.props.width{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_ProjectInfo=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectInfo.jsx")),_ScriptName=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ScriptName.jsx")),_LessonProgress=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/LessonProgress.jsx")),_HeaderPopup=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/HeaderPopup.jsx")),_HeaderFinish=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/HeaderFinish.jsx")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i1?showPopup=!0:progressWidth{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_progress=_interopRequireDefault(__webpack_require__("./src/code-studio/progress.js")),_MiniView=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/MiniView.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_headerPopupModule=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/header-popup.module.scss")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var HeaderPopup=function(_Component){function HeaderPopup(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_Component.call.apply(_Component,[this].concat(args))||this),"state",{open:!1}),_defineProperty(_assertThisInitialized(_this),"handleClickOpen",(function(){_this.setState({open:!0}),_progress.default.retrieveProgress(_this.props.scriptName,_this.props.scriptData,_this.props.currentLevelId),_firehose.default.putRecord({study:"mini_view",event:"mini_view_opened",data_json:JSON.stringify({current_level_id:_this.props.currentLevelId})},{includeUserId:!0}),$(document).on("click",_this.handleClickDocument)})),_defineProperty(_assertThisInitialized(_this),"handleClickClose",(function(){_this.setState({open:!1}),$(document).off("click",_this.handleClickDocument)})),_defineProperty(_assertThisInitialized(_this),"handleClickDocument",(function(event){var target=event&&event.target;$(_this.refs.headerPopup).find(target).length>0||_this.handleClickClose()})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(HeaderPopup,_Component);var _proto=HeaderPopup.prototype;return _proto.shouldComponentUpdate=function shouldComponentUpdate(nextProps,nextState){return this.props.windowHeight!==nextProps.windowHeight||this.props.minimal!==nextProps.minimal||this.state.open!==nextState.open},_proto.render=function render(){return _react.default.createElement("div",null,!this.state.open&&_react.default.createElement("button",{type:"button",className:(0,_classnames.default)("no-mc","header_popup_link",_headerPopupModule.default.headerItem),onClick:this.handleClickOpen},_react.default.createElement("i",{className:(0,_classnames.default)("fa fa-caret-down",_headerPopupModule.default.caret)}),_react.default.createElement("div",{className:_headerPopupModule.default.more},_locale.default.moreAllCaps())),this.state.open&&_react.default.createElement("div",null,_react.default.createElement("button",{type:"button",className:(0,_classnames.default)("no-mc",_headerPopupModule.default.headerItem,_headerPopupModule.default.headerItemLess),onClick:this.handleClickClose},_react.default.createElement("i",{className:(0,_classnames.default)("fa fa-caret-up",_headerPopupModule.default.caret)}),_react.default.createElement("div",{className:_headerPopupModule.default.more},_locale.default.lessAllCaps())),_react.default.createElement("div",{className:"header_popup",ref:"headerPopup"},_react.default.createElement("div",{className:"header_popup_scrollable",style:{maxHeight:this.props.windowHeight-80}},_react.default.createElement("div",{className:"header_popup_body"},_react.default.createElement("div",{className:"user-stats-block"},_react.default.createElement(_MiniView.default,{minimal:this.props.minimal})))))))},HeaderPopup}(_react.Component);exports.default=HeaderPopup,_defineProperty(HeaderPopup,"propTypes",{scriptName:_propTypes.default.string,scriptData:_propTypes.default.object,currentLevelId:_propTypes.default.string,minimal:_propTypes.default.bool,windowHeight:_propTypes.default.number}),module.exports=exports.default},"./src/code-studio/components/header/HeaderVignette.js":(module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default={left:{position:"absolute",width:"100%",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(0, 173, 188, 1) 0%, rgba(0, 173, 188, 0) 20px)"},right:{position:"absolute",width:"100%",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(0, 173, 188, 0) calc(100% - 20px), rgba(0, 173, 188, 1) 100%)"}},module.exports=exports.default},"./src/code-studio/components/header/LevelBuilderSaveButton.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_ProjectUpdatedAt=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectUpdatedAt.jsx")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var LevelBuilderSaveButton=function(_React$Component){function LevelBuilderSaveButton(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"onSave",(function(){_this.props.setProjectUpdatedSaving(),$.ajax({type:"POST",url:_this.props.overrideOnSaveURL||"../update_start_code",data:JSON.stringify(_this.props.getChanges()),dataType:"json",error:_this.props.setProjectUpdatedError,success:_this.props.setProjectUpdatedSaved,contentType:"application/json"})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(LevelBuilderSaveButton,_React$Component),LevelBuilderSaveButton.prototype.render=function render(){return _react.default.createElement("div",{style:{display:"flex"}},_react.default.createElement("div",{className:"project_name_wrapper header_text"},_react.default.createElement("div",{className:"project_name header_text"},this.props.overrideHeaderText||"Levelbuilder: edit start code"),_react.default.createElement(_ProjectUpdatedAt.default,null)),_react.default.createElement("div",{className:"project_remix header_button",onClick:this.onSave},"Save"))},LevelBuilderSaveButton}(_react.default.Component);_defineProperty(LevelBuilderSaveButton,"propTypes",{getChanges:_propTypes.default.func.isRequired,setProjectUpdatedError:_propTypes.default.func.isRequired,setProjectUpdatedSaving:_propTypes.default.func.isRequired,setProjectUpdatedSaved:_propTypes.default.func.isRequired,overrideHeaderText:_propTypes.default.string,overrideOnSaveURL:_propTypes.default.string});var _default=(0,_reactRedux.connect)((function(state){return{getChanges:state.header.getLevelBuilderChanges,overrideHeaderText:state.header.overrideHeaderText,overrideOnSaveURL:state.header.overrideOnSaveURL}}),{setProjectUpdatedError:_projectRedux.setProjectUpdatedError,setProjectUpdatedSaving:_projectRedux.setProjectUpdatedSaving,setProjectUpdatedSaved:_projectRedux.setProjectUpdatedSaved})(LevelBuilderSaveButton);exports.default=_default,module.exports=exports.default},"./src/code-studio/components/header/MinimalProjectHeader.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_ProjectRemix=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectRemix.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var MinimalProjectHeader=function(_React$Component){function MinimalProjectHeader(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(MinimalProjectHeader,_React$Component),MinimalProjectHeader.prototype.render=function render(){var _this$props=this.props,inRestrictedShareMode=_this$props.inRestrictedShareMode,legacyProjectName=_this$props.legacyProjectName,lab2ProjectName=_this$props.lab2ProjectName,projectName=legacyProjectName||lab2ProjectName;return _react.default.createElement("div",{style:{display:"flex"}},_react.default.createElement("div",{className:"project_name_wrapper header_text"},_react.default.createElement("div",{className:"project_name header_text"},projectName),!inRestrictedShareMode&&_react.default.createElement("div",{className:"project_updated_at header_text"},_locale.default.clickToRemix())),_react.default.createElement(_ProjectRemix.default,null))},MinimalProjectHeader}(_react.default.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(MinimalProjectHeader,"propTypes",{legacyProjectName:_propTypes.default.string,lab2ProjectName:_propTypes.default.string,inRestrictedShareMode:_propTypes.default.bool});var _default=(0,_reactRedux.connect)((function(state){return{legacyProjectName:state.project.projectName,lab2ProjectName:state.lab.channel&&state.lab.channel.name,inRestrictedShareMode:state.project&&state.project.inRestrictedShareMode}}))(MinimalProjectHeader);exports.default=_default,module.exports=exports.default},"./src/code-studio/components/header/ProjectBackedHeader.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ProjectShare=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectShare.jsx")),_ProjectRemix=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectRemix.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ProjectBackedHeader=function(_React$Component){function ProjectBackedHeader(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectBackedHeader,_React$Component),ProjectBackedHeader.prototype.render=function render(){return _react.default.createElement("div",{style:styles.projectButtons},_react.default.createElement(_ProjectShare.default,null),_react.default.createElement(_ProjectRemix.default,{lightStyle:!0}))},ProjectBackedHeader}(_react.default.Component);exports.default=ProjectBackedHeader;var styles={projectButtons:{display:"flex"}};module.exports=exports.default},"./src/code-studio/components/header/ProjectHeader.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_EditableProjectName=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/EditableProjectName.tsx")),_ProjectImport=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectImport.jsx")),_ProjectRemix=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectRemix.jsx")),_ProjectShare=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectShare.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ProjectHeader=function(_React$Component){function ProjectHeader(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectHeader,_React$Component),ProjectHeader.prototype.render=function render(){var onChangedWidth=this.props.onChangedWidth;return _react.default.createElement("div",{style:{display:"flex"}},_react.default.createElement(_EditableProjectName.default,{onChangedWidth}),_react.default.createElement(_ProjectShare.default,null),_react.default.createElement(_ProjectRemix.default,{lightStyle:!0}),window.appOptions&&appOptions.level.isConnectionLevel&&_react.default.createElement(_ProjectImport.default,null))},ProjectHeader}(_react.default.Component);exports.default=ProjectHeader,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ProjectHeader,"propTypes",{onChangedWidth:_propTypes.default.func}),module.exports=exports.default},"./src/code-studio/components/header/ProjectImport.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_utils=__webpack_require__("./src/craft/code-connection/utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ProjectImport=function(_React$Component){function ProjectImport(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"importProject",(function(){Craft&&Craft.showImportFromShareLinkPopup((function(shareLink){if(shareLink){var sharePath;try{var anchor=document.createElement("a");anchor.href=shareLink,sharePath=anchor.pathname}catch(e){return void Craft.showErrorMessagePopup(_locale.default.projectShareLinkImportBadLinkHeader(),_locale.default.projectShareLinkImportBadLinkBody())}var levelSourcePath,channelId,legacyShareRegex=/^\/?c\/([^\/]*)/,obfuscatedShareRegex=/^\/?r\/([^\/]*)/,projectShareRegex=/^\/?projects\/minecraft_hero\/([^\/]*)/;if(sharePath.match(legacyShareRegex)){var levelSourceId=sharePath.match(legacyShareRegex)[1];levelSourcePath="/c/".concat(levelSourceId,".json")}else if(sharePath.match(obfuscatedShareRegex)){var _levelSourceId=sharePath.match(obfuscatedShareRegex)[1];levelSourcePath="/r/".concat(_levelSourceId,".json")}else sharePath.match(projectShareRegex)&&(channelId=sharePath.match(projectShareRegex)[1]);var onFinish=function onFinish(source){var convertedSource=(0,_utils.convertBlocksXml)(source);dashboard.project.createNewChannelFromSource(convertedSource,(function(channelData){var pathName=dashboard.project.appToProjectUrl()+"/"+channelData.id+"/edit";location.href=pathName}))},onError=function onError(){Craft.showErrorMessagePopup(_locale.default.projectShareLinkImportErrorHeader(),_locale.default.projectShareLinkImportErrorBody())};levelSourcePath?_jquery.default.ajax({url:levelSourcePath,type:"get",dataType:"json"}).done((function(data){onFinish(data.data)})).error((function(){onError()})):channelId?dashboard.project.getSourceForChannel(channelId,(function(source){source?onFinish(source):onError()})):Craft.showErrorMessagePopup(_locale.default.projectShareLinkImportBadLinkHeader(),_locale.default.projectShareLinkImportBadLinkBody())}}))})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectImport,_React$Component),ProjectImport.prototype.render=function render(){return _react.default.createElement("div",{className:"project_import header_button header_button_light",onClick:this.importProject},_locale.default.import())},ProjectImport}(_react.default.Component);exports.default=ProjectImport,module.exports=exports.default},"./src/code-studio/components/header/ProjectInfo.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedProjectInfo=void 0;var _headerComponents,_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_ProjectHeader=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectHeader.jsx")),_MinimalProjectHeader=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/MinimalProjectHeader.jsx")),_ProjectBackedHeader=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectBackedHeader.jsx")),_LevelBuilderSaveButton=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/LevelBuilderSaveButton.jsx")),_headerRedux=__webpack_require__("./src/code-studio/headerRedux.ts"),_HeaderVignette=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/HeaderVignette.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var headerComponents=(_defineProperty(_headerComponents={},_headerRedux.possibleHeaders.project,_ProjectHeader.default),_defineProperty(_headerComponents,_headerRedux.possibleHeaders.minimalProject,_MinimalProjectHeader.default),_defineProperty(_headerComponents,_headerRedux.possibleHeaders.projectBacked,_ProjectBackedHeader.default),_defineProperty(_headerComponents,_headerRedux.possibleHeaders.levelBuilderSave,_LevelBuilderSaveButton.default),_headerComponents),ProjectInfo=function(_React$Component){function ProjectInfo(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectInfo,_React$Component);var _proto=ProjectInfo.prototype;return _proto.getFullWidth=function getFullWidth(){var component=(0,_jquery.default)(this.refs.projectInfo);return component.length>0?component.width():0},_proto.setDesiredWidth=function setDesiredWidth(){this.props.setDesiredWidth&&this.props.setDesiredWidth(this.getFullWidth())},_proto.componentDidMount=function componentDidMount(){this.setDesiredWidth()},_proto.componentDidUpdate=function componentDidUpdate(){this.setDesiredWidth()},_proto.onChangedWidth=function onChangedWidth(){this.setDesiredWidth()},_proto.render=function render(){var _this=this;if(!this.props.currentHeader)return null;var fullWidth=this.getFullWidth(),vignetteStyle=this.props.width{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedProjectRemix=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),utils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/utils.js")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts"),_projectHeaderModule=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/project-header.module.scss")),_Lab2Registry=_interopRequireDefault(__webpack_require__("./src/lab2/Lab2Registry.ts")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ProjectRemix=function(_React$Component){function ProjectRemix(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"remixProject",(function(){_Lab2Registry.default.hasEnabledProjects()?_this.remixLab2Project():_this.remixLegacyProject()})),_defineProperty(_assertThisInitialized(_this),"remixLegacyProject",(function(){if(dashboard.project.getCurrentId()&&dashboard.project.canServerSideRemix())dashboard.project.serverSideRemix();else if(_this.props.isSignedIn){var newName="Remix: "+(dashboard.project.getCurrentName()||appOptions.level.projectTemplateLevelName||"My Project");dashboard.project.copy(newName,{shouldNavigate:!0}).then((function(){return _this.props.refreshProjectName()})).catch((function(err){return console.log(err)}))}else utils.navigateToHref("/users/sign_in?user_return_to=".concat(window.location.pathname))})),_defineProperty(_assertThisInitialized(_this),"remixLab2Project",(function(){var projectManager=_Lab2Registry.default.getInstance().getProjectManager();projectManager&&projectManager.flushSave().then((function(){projectManager.redirectToRemix()}))})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectRemix,_React$Component),ProjectRemix.prototype.render=function render(){var _this$props=this.props,className="project_remix header_button no-mc";return _this$props.lightStyle&&(className+=" header_button_light"),_this$props.inRestrictedShareMode?null:_react.default.createElement("button",{type:"button",className:(0,_classnames.default)(_projectHeaderModule.default.buttonSpacing,className),onClick:this.remixProject},_locale.default.remix())},ProjectRemix}(_react.default.Component);_defineProperty(ProjectRemix,"propTypes",{isSignedIn:_propTypes.default.bool,lightStyle:_propTypes.default.bool,refreshProjectName:_propTypes.default.func.isRequired,inRestrictedShareMode:_propTypes.default.bool});var UnconnectedProjectRemix=ProjectRemix;exports.UnconnectedProjectRemix=UnconnectedProjectRemix;var _default=(0,_reactRedux.connect)((function(state){return{isSignedIn:state.pageConstants&&state.pageConstants.isSignedIn,inRestrictedShareMode:state.project&&state.project.inRestrictedShareMode}}),{refreshProjectName:_projectRedux.refreshProjectName})(ProjectRemix);exports.default=_default},"./src/code-studio/components/header/ProjectShare.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_headerShare=__webpack_require__("./src/code-studio/headerShare.js"),_projectHeaderModule=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/project-header.module.scss")),_Lab2Registry=_interopRequireDefault(__webpack_require__("./src/lab2/Lab2Registry.ts")),_lab2HeaderShare=__webpack_require__("./src/lab2/header/lab2HeaderShare.js"),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ProjectShare=function(_React$Component){function ProjectShare(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"shareProject",(function(){_Lab2Registry.default.hasEnabledProjects()?(0,_lab2HeaderShare.shareLab2Project)(_Lab2Registry.default.getInstance().getProjectManager().getShareUrl()):(0,_headerShare.shareProject)(dashboard.project.getShareUrl())})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectShare,_React$Component),ProjectShare.prototype.render=function render(){return _react.default.createElement("button",{type:"button",className:(0,_classnames.default)(_projectHeaderModule.default.buttonSpacing,"project_share","header_button","header_button_light","no-mc"),onClick:this.shareProject},_locale.default.share())},ProjectShare}(_react.default.Component);exports.default=ProjectShare,module.exports=exports.default},"./src/code-studio/components/header/ProjectUpdatedAt.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_TimeAgo=_interopRequireDefault(__webpack_require__("./src/templates/TimeAgo.jsx")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts"),_RetryProjectSaveDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/RetryProjectSaveDialog.jsx")),_project=_interopRequireDefault(__webpack_require__("./src/code-studio/initApp/project.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var ProjectUpdatedAt=function(_React$Component){function ProjectUpdatedAt(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ProjectUpdatedAt,_React$Component);var _proto=ProjectUpdatedAt.prototype;return _proto.componentDidMount=function componentDidMount(){this.props.onContentUpdated&&this.props.onContentUpdated()},_proto.componentDidUpdate=function componentDidUpdate(){this.props.onContentUpdated&&this.props.onContentUpdated()},_proto.renderText=function renderText(){return this.props.status===_projectRedux.projectUpdatedStatuses.error?_react.default.createElement("span",{className:"project-save-error",title:_locale.default.projectSaveErrorTooltip()},_react.default.createElement("i",{className:"fa fa-exclamation-triangle"})," ",_locale.default.projectSaveError()):this.props.status===_projectRedux.projectUpdatedStatuses.saving?_locale.default.saving():this.props.status===_projectRedux.projectUpdatedStatuses.saved?_react.default.createElement("div",null,_locale.default.savedToGallery()," ",this.props.updatedAt&&_react.default.createElement(_TimeAgo.default,{dateString:this.props.updatedAt})):_locale.default.notSaved()},_proto.render=function render(){return _react.default.createElement("div",{className:"project_updated_at header_text",style:styles.container},this.renderText(),_react.default.createElement(_RetryProjectSaveDialog.default,{onTryAgain:function onTryAgain(){return _project.default.save()}}))},ProjectUpdatedAt}(_react.default.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ProjectUpdatedAt,"propTypes",{status:_propTypes.default.oneOf(Object.values(_projectRedux.projectUpdatedStatuses)),updatedAt:_propTypes.default.string,onContentUpdated:_propTypes.default.func});var styles={container:{display:"block",textAlign:"left"}},_default=(0,_reactRedux.connect)((function(state){return{status:state.project.projectUpdatedStatus,updatedAt:state.project.projectUpdatedAt}}))(ProjectUpdatedAt);exports.default=_default,module.exports=exports.default},"./src/code-studio/components/header/RetryProjectSaveDialog.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedRetryProjectSaveDialog=void 0;var _color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts"),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_DialogFooter=_interopRequireDefault(__webpack_require__("./src/templates/teacherDashboard/DialogFooter.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var UnconnectedRetryProjectSaveDialog=function(_Component){function UnconnectedRetryProjectSaveDialog(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_Component.call.apply(_Component,[this].concat(args))||this),"handleClick",(function(){_this.props.projectUpdatedStatus!==_projectRedux.projectUpdatedStatuses.saving&&_this.props.onTryAgain()})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(UnconnectedRetryProjectSaveDialog,_Component),UnconnectedRetryProjectSaveDialog.prototype.render=function render(){var isSavePending=this.props.projectUpdatedStatus===_projectRedux.projectUpdatedStatuses.saving;return _react.default.createElement(_BaseDialog.default,{isOpen:this.props.isOpen,uncloseable:!0,hideCloseButton:!0,style:styles.dialog,useUpdatedStyles:!0},_react.default.createElement("h2",{className:"retry-save-title"},_locale.default.retryProjectSaveDialogHeader()),_react.default.createElement("div",{style:{marginBottom:10}},_locale.default.retryProjectSaveDialogBody()),_react.default.createElement(_DialogFooter.default,{rightAlign:!0},_react.default.createElement(_Button.default,{text:_locale.default.retryProjectSaveDialogButton(),onClick:this.handleClick,color:_Button.default.ButtonColor.brandSecondaryDefault,className:"no-mc",isPending:isSavePending,pendingText:_locale.default.retryProjectSavePending(),id:"try-again-save-button"})))},UnconnectedRetryProjectSaveDialog}(_react.Component);exports.UnconnectedRetryProjectSaveDialog=UnconnectedRetryProjectSaveDialog,_defineProperty(UnconnectedRetryProjectSaveDialog,"propTypes",{projectUpdatedStatus:_propTypes.default.oneOf(Object.values(_projectRedux.projectUpdatedStatuses)),isOpen:_propTypes.default.bool,onTryAgain:_propTypes.default.func.isRequired});var styles={dialog:{color:_color.default.default_text,fontSize:15,paddingLeft:20,paddingRight:20,paddingBottom:20}},_default=(0,_reactRedux.connect)((function(state){return{projectUpdatedStatus:state.project.projectUpdatedStatus,isOpen:state.project.showTryAgainDialog}}))(UnconnectedRetryProjectSaveDialog);exports.default=_default},"./src/code-studio/components/header/RetryProjectSaveDialog.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DialogOpenWithPendingSave=exports.DialogOpenDefault=void 0;var _RetryProjectSaveDialog=__webpack_require__("./src/code-studio/components/header/RetryProjectSaveDialog.jsx"),_react=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js")),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts"),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_ProjectUpdatedAt=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/ProjectUpdatedAt.jsx")),_HeaderVignette=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/HeaderVignette.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0?component.width():0},_proto.setDesiredWidth=function setDesiredWidth(){this.props.setDesiredWidth&&this.props.setDesiredWidth(this.getFullWidth())},_proto.componentDidMount=function componentDidMount(){this.setDesiredWidth()},_proto.componentDidUpdate=function componentDidUpdate(){this.setDesiredWidth()},_proto.shouldComponentUpdate=function shouldComponentUpdate(nextProps,nextState){return this.props.width!==nextProps.width||this.props.name!==nextProps.name||this.props.showProjectUpdatedAt!==nextProps.showProjectUpdatedAt},_proto.renderScriptLink=function renderScriptLink(){var className="header_text";return this.props.smallText&&(className+=" small_font_on_tablet"),_react.default.createElement("a",{href:this.props.href,className,style:this.props.showProjectUpdatedAt?_objectSpread({},styles.scriptLinkWithUpdatedAt):{},title:this.props.name},this.props.name)},_proto.render=function render(){var fullWidth=this.getFullWidth(),vignetteStyle=this.props.width{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var SignInCallout=function(_React$Component){function SignInCallout(props){var _this;return(_this=_React$Component.call(this,props)||this).renderContent=_this.renderContent.bind(function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(_this)),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(SignInCallout,_React$Component);var _proto=SignInCallout.prototype;return _proto.renderContent=function renderContent(){return _react.default.createElement("div",{style:styles.contentContainer},_react.default.createElement("img",{style:styles.imageContainer,src:"/shared/images/user-not-signed-in.png"}),_react.default.createElement("div",{style:styles.textContainer},_react.default.createElement("h2",{style:styles.textHeader},_locale.default.notSignedInHeader()),_react.default.createElement("p",null," ",_locale.default.notSignedInBody())))},_proto.render=function render(){return _react.default.createElement("div",{style:styles.container,onClick:this.props.handleClose},_react.default.createElement("div",{className:"modal-backdrop",style:styles.modalBackdrop}),_react.default.createElement("div",{style:styles.upTriangle}),_react.default.createElement("div",{className:"uitest-login-callout",style:styles.content},this.renderContent()))},SignInCallout}(_react.default.Component);exports.default=SignInCallout,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(SignInCallout,"propTypes",{handleClose:_propTypes.default.func.isRequired});var styles={container:{position:"relative",height:0,width:0},content:{position:"absolute",top:30,right:-90,zIndex:1040,backgroundColor:"#454545",borderRadius:3},modalBackdrop:{opacity:.5,zIndex:-1},upTriangle:{position:"absolute",top:15,left:-7.5,width:0,height:0,borderStyle:"solid",borderTopWidth:0,borderRightWidth:30,borderBottomWidth:15,borderLeftWidth:30,borderTopColor:"transparent",borderRightColor:"transparent",borderBottomColor:"#454545",borderLeftColor:"transparent",zIndex:1040},contentContainer:{display:"flex",padding:20},imageContainer:{width:116,height:116,marginRight:20},textContainer:{width:400,textAlign:"left",whiteSpace:"normal"},textHeader:{marginTop:0}};module.exports=exports.default},"./src/code-studio/components/header/SignInCalloutWrapper.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_jsCookie=_interopRequireDefault(__webpack_require__("./node_modules/js-cookie/src/js.cookie.js")),_SignInCallout=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/SignInCallout.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var SignInCalloutWrapper=function(_React$Component){function SignInCalloutWrapper(props){var _this;return(_this=_React$Component.call(this,props)||this).closeCallout=_this.closeCallout.bind(function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(_this)),_this.state={hideCallout:"true"===_jsCookie.default.get("hide_signin_callout")||"true"===sessionStorage.getItem("hide_signin_callout")},_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(SignInCalloutWrapper,_React$Component);var _proto=SignInCalloutWrapper.prototype;return _proto.componentDidMount=function componentDidMount(){this.state.hideCallout||(this.signInElement=document.getElementById("sign_in_or_user"),this.signInElement&&this.signInElement.classList.add("z_index_above_modal"))},_proto.closeCallout=function closeCallout(event){this.setState({hideCallout:!0}),_jsCookie.default.set("hide_signin_callout","true",{expires:1,path:"/"}),sessionStorage.setItem("hide_signin_callout","true"),event.preventDefault(),this.signInElement&&this.signInElement.classList.remove("z_index_above_modal")},_proto.render=function render(){return this.state.hideCallout?null:_react.default.createElement("div",{className:"uitest-signincallout"},_react.default.createElement(_SignInCallout.default,{handleClose:this.closeCallout}))},SignInCalloutWrapper}(_react.default.Component);exports.default=SignInCalloutWrapper,module.exports=exports.default},"./src/code-studio/components/icons.js":module=>{module.exports={aliases:{music:["music","headphones","volume-off","volume-down","volume-up","play"],note:["music","comment","comment-o"],sound:["music","headphones","volume-off","volume-down","volume-up","play","microphone","microphone-slash"],search:["search"],magnify:["search","search-plus","search-minus"],zoom:["search","search-plus","search-minus"],enlarge:["search","search-plus","expand","arrows-alt"],bigger:["search","search-plus","expand","arrows-alt"],"envelope-o":["envelope-o"],email:["envelope-o","envelope"],support:["envelope-o","question-circle","phone","phone-square","envelope","ambulance","medkit","question","ticket","life-ring"],"e-mail":["envelope-o","envelope"],letter:["envelope-o","envelope"],mail:["envelope-o","envelope"],notification:["envelope-o","flag","exclamation-circle","exclamation-triangle","comment","comments","bell","envelope","comment-o","comments-o","bell-o","circle","flag-o","flag-checkered","exclamation","dot-circle-o"],heart:["heart","gratipay"],love:["heart","heart-o","gratipay"],like:["heart","thumbs-o-up","heart-o","thumbs-up","gratipay"],favorite:["heart","thumbs-o-up","heart-o","thumbs-up","gratipay"],star:["star","certificate"],award:["star","star-o","star-half","trophy","star-half-o","shield"],achievement:["star","star-o","star-half","trophy","star-half-o","shield"],night:["star","star-o","moon-o"],rating:["star","star-o","star-half","smile-o","frown-o","meh-o","star-half-o"],score:["star","star-o","star-half","star-half-o"],"star-o":["star-o"],user:["user","female","male"],person:["user","female","male","wheelchair"],man:["user","male"],head:["user"],profile:["user","user-md","female","male"],film:["film","video-camera","youtube-square","youtube"],movie:["film","video-camera","ticket"],"th-large":["th-large"],blocks:["th-large","th"],squares:["th-large","th"],boxes:["th-large","th"],grid:["th-large","th"],th:["th"],"th-list":["th-list"],ul:["th-list","list-alt","list","bars","list-ul","list-ol"],ol:["th-list","list-alt","list","bars","list-ul","list-ol"],checklist:["th-list","list-alt","list","bars","list-ul","list-ol"],finished:["th-list","list-alt","list"],completed:["th-list","list-alt","list"],done:["th-list","check","list-alt","list","check-square-o","check-circle","check-circle-o","check-square"],todo:["th-list","check","list-alt","list","check-square-o","check-circle","check-circle-o","bars","list-ul","list-ol","check-square"],check:["check"],checkmark:["check","check-square"],agree:["check","check-square-o","check-circle","check-circle-o","thumbs-o-up","check-square","thumbs-up"],accept:["check","check-square-o","check-circle","check-circle-o","check-square"],confirm:["check","check-square-o","check-circle","check-circle-o","check-square"],tick:["check"],ok:["check","check-square-o","check-circle","check-circle-o","check-square","calendar-check-o"],times:["times"],close:["times","times","times-circle","times-circle-o"],exit:["times","times-circle","times-circle-o","sign-out"],x:["times","times-circle","times-circle-o"],cross:["times"],remove:["times","trash-o","minus-circle","ban","minus","chain-broken","minus-square","minus-square-o","trash"],"search-plus":["search-plus"],"search-minus":["search-minus"],minify:["search-minus","minus","minus-square","minus-square-o"],smaller:["search-minus","compress"],"power-off":["power-off"],on:["power-off"],signal:["signal"],cog:["cog"],settings:["cog","cogs","wrench","tasks","bars"],gear:["cog"],"trash-o":["trash-o"],garbage:["trash-o","trash"],delete:["trash-o","minus-circle","ban","minus","minus-square","minus-square-o","trash"],trash:["trash-o","minus-circle","ban","minus","minus-square","minus-square-o","trash"],hide:["trash-o","minus-circle","ban","minus","minus","eye-slash","minus-square","minus-square","minus-square-o","minus-square-o","trash"],home:["home"],main:["home"],house:["home"],"file-o":["file-o"],new:["file-o","plus-circle","plus","external-link","file-text-o","plus-square","external-link-square","file","file-text","plus-square-o"],page:["file-o","file-text-o","file","file-text"],pdf:["file-o","file-text-o","file","file-text"],document:["file-o","file-text-o","file","file-text"],"clock-o":["clock-o"],watch:["clock-o"],timer:["clock-o"],late:["clock-o"],timestamp:["clock-o"],road:["road"],street:["road"],download:["download","arrow-circle-o-down","arrow-down","arrow-circle-down"],import:["download","upload","cloud-download","cloud-upload"],"arrow-circle-o-down":["arrow-circle-o-down"],"arrow-circle-o-up":["arrow-circle-o-up"],inbox:["inbox"],"play-circle-o":["play-circle-o"],repeat:["repeat"],redo:["repeat"],forward:["repeat","forward","forward","chevron-right","arrow-right","hand-o-right","arrow-circle-right","caret-right","angle-double-right","angle-right","chevron-circle-right","caret-square-o-right","arrow-circle-o-right"],"rotate-right":["repeat"],refresh:["refresh","retweet"],reload:["refresh","retweet"],sync:["refresh"],"list-alt":["list-alt"],lock:["lock","unlock","unlock-alt"],protect:["lock","unlock","unlock-alt"],admin:["lock","unlock","unlock-alt"],flag:["flag"],report:["flag","flag-o","flag-checkered","bug"],notify:["flag","flag-checkered","exclamation"],headphones:["headphones"],listen:["headphones"],"volume-off":["volume-off"],mute:["volume-off","microphone-slash"],"volume-down":["volume-down"],lower:["volume-down"],quieter:["volume-down"],"volume-up":["volume-up"],higher:["volume-up"],louder:["volume-up","bullhorn"],qrcode:["qrcode"],scan:["qrcode","barcode"],barcode:["barcode"],tag:["tag"],label:["tag"],tags:["tags"],labels:["tags"],book:["book"],read:["book"],documentation:["book"],bookmark:["bookmark"],save:["bookmark","bookmark-o","hdd-o","cloud","floppy-o"],print:["print"],camera:["camera"],photo:["camera","picture-o","camera-retro"],picture:["camera","camera-retro"],record:["camera","video-camera","camera-retro","microphone","microphone-slash"],font:["font"],text:["font","align-left","align-center","align-right","align-justify","mobile"],bold:["bold"],italic:["italic"],italics:["italic"],"text-height":["text-height"],"text-width":["text-width"],"align-left":["align-left"],"align-center":["align-center"],middle:["align-center"],"align-right":["align-right"],"align-justify":["align-justify"],list:["list","bars","bars","list-ul","list-ol","list-ol"],outdent:["outdent"],dedent:["outdent"],indent:["indent"],"video-camera":["video-camera"],"picture-o":["picture-o"],image:["picture-o"],pencil:["pencil"],write:["pencil","pencil-square-o","pencil-square"],edit:["pencil","pencil-square-o","pencil-square-o","pencil-square"],update:["pencil","pencil-square-o","wrench","pencil-square"],"map-marker":["map-marker"],map:["map-marker","globe","location-arrow","street-view","map"],pin:["map-marker","thumb-tack"],location:["map-marker","plane","thumb-tack","globe","location-arrow","compass"],coordinates:["map-marker","thumb-tack","globe","location-arrow"],localize:["map-marker","globe"],address:["map-marker","location-arrow"],travel:["map-marker","plane","globe","suitcase","bed"],where:["map-marker","location-arrow"],place:["map-marker","globe","location-arrow"],adjust:["adjust"],contrast:["adjust","sun-o","moon-o"],tint:["tint"],raindrop:["tint"],waterdrop:["tint"],drop:["tint"],droplet:["tint"],"pencil-square-o":["pencil-square-o"],"share-square-o":["share-square-o"],social:["share-square-o","share-square"],send:["share-square-o","share-square","paper-plane"],"check-square-o":["check-square-o"],arrows:["arrows","exchange"],move:["arrows","arrows-alt","suitcase"],reorder:["arrows","arrows-alt","bars","bars"],resize:["arrows","expand","arrows-v","arrows-h","arrows-alt"],"step-backward":["step-backward"],rewind:["step-backward","fast-backward","backward"],previous:["step-backward","fast-backward","backward","chevron-left","arrow-left","hand-o-left","arrow-circle-left","caret-left","angle-double-left","angle-left","chevron-circle-left","long-arrow-left","arrow-circle-o-left","caret-square-o-left"],beginning:["step-backward","fast-backward"],start:["step-backward","fast-backward","play","play-circle","youtube-play"],first:["step-backward","fast-backward"],"fast-backward":["fast-backward"],backward:["backward"],play:["play"],playing:["play","play-circle","youtube-play"],pause:["pause"],wait:["pause"],stop:["stop","ban"],block:["stop","ban","square-o","square"],box:["stop","square-o","square","archive"],square:["stop","square-o","square"],next:["forward","fast-forward","step-forward","chevron-right","arrow-right","hand-o-right","arrow-circle-right","caret-right","angle-double-right","angle-right","chevron-circle-right","caret-square-o-right","arrow-circle-o-right"],"fast-forward":["fast-forward"],end:["fast-forward","step-forward"],last:["fast-forward","step-forward"],"step-forward":["step-forward"],eject:["eject"],"chevron-left":["chevron-left"],bracket:["chevron-left","chevron-right"],back:["chevron-left","arrow-left","hand-o-left","arrow-circle-left","caret-left","undo","angle-double-left","angle-left","chevron-circle-left","long-arrow-left","arrow-circle-o-left","caret-square-o-left"],"chevron-right":["chevron-right"],"plus-circle":["plus-circle"],add:["plus-circle","plus","plus-square","plus-square-o","cart-plus"],create:["plus-circle","plus","plus-square","plus-square-o"],expand:["plus-circle","expand","plus","arrows-alt","plus-square","plus-square-o"],"minus-circle":["minus-circle"],"times-circle":["times-circle"],"check-circle":["check-circle"],"question-circle":["question-circle"],help:["question-circle","info-circle","ambulance","medkit","question","info"],information:["question-circle","info-circle","question","info"],unknown:["question-circle","question"],"info-circle":["info-circle"],more:["info-circle","caret-down","sort-desc","info","chevron-circle-down","caret-square-o-down"],details:["info-circle","asterisk","info"],"times-circle-o":["times-circle-o"],"check-circle-o":["check-circle-o"],ban:["ban"],abort:["ban"],cancel:["ban"],"arrow-left":["arrow-left"],"arrow-right":["arrow-right"],"arrow-up":["arrow-up"],"arrow-down":["arrow-down"],share:["share","retweet","bullhorn"],"mail-forward":["share"],compress:["compress"],collapse:["compress","minus","minus-square","minus-square-o"],combine:["compress"],contract:["compress"],merge:["compress","code-fork"],plus:["plus"],minus:["minus"],asterisk:["asterisk"],"exclamation-circle":["exclamation-circle"],warning:["exclamation-circle","exclamation-triangle","exclamation-triangle","exclamation"],error:["exclamation-circle","exclamation-triangle","exclamation"],problem:["exclamation-circle","exclamation-triangle","exclamation"],alert:["exclamation-circle","exclamation-triangle","bell","bell-o","exclamation"],gift:["gift"],present:["gift"],leaf:["leaf","pagelines"],eco:["leaf","pagelines"],nature:["leaf","pagelines"],fire:["fire"],flame:["fire"],hot:["fire"],popular:["fire"],eye:["eye"],show:["eye","eye-slash"],visible:["eye","eye-slash"],views:["eye","eye-slash"],"eye-slash":["eye-slash"],toggle:["eye-slash"],visiblity:["eye-slash"],"exclamation-triangle":["exclamation-triangle"],plane:["plane"],trip:["plane","suitcase"],destination:["plane"],airplane:["plane"],fly:["plane"],mode:["plane"],calendar:["calendar"],date:["calendar","calendar-o"],time:["calendar","calendar-o"],when:["calendar","calendar-o"],random:["random"],sort:["random","sort"],shuffle:["random"],comment:["comment"],speech:["comment","comment-o"],chat:["comment","comment-o"],bubble:["comment","comment-o"],feedback:["comment","comment-o"],message:["comment","comments","comment-o","comments-o","commenting","commenting-o"],texting:["comment","comments","comment-o","comments-o"],sms:["comment","comments","comment-o","comments-o"],magnet:["magnet"],"chevron-up":["chevron-up"],"chevron-down":["chevron-down"],retweet:["retweet"],"shopping-cart":["shopping-cart"],checkout:["shopping-cart","credit-card","money","credit-card-alt"],buy:["shopping-cart","credit-card","money","credit-card-alt"],purchase:["shopping-cart","credit-card","money","credit-card-alt"],payment:["shopping-cart","credit-card","money","credit-card-alt"],folder:["folder"],"folder-open":["folder-open"],"arrows-v":["arrows-v"],"arrows-h":["arrows-h"],"bar-chart":["bar-chart"],graph:["bar-chart","area-chart","pie-chart","line-chart"],analytics:["bar-chart","area-chart","pie-chart","line-chart"],"bar-chart-o":["bar-chart"],"twitter-square":["twitter-square"],tweet:["twitter-square","twitter"],"social network":["twitter-square","facebook-square","twitter","facebook","google-plus-square","google-plus"],"facebook-square":["facebook-square"],"camera-retro":["camera-retro"],key:["key"],unlock:["key","unlock"],password:["key","unlock","unlock-alt"],cogs:["cogs"],gears:["cogs"],comments:["comments"],conversation:["comments","comments-o"],notes:["comments","comments-o"],"thumbs-o-up":["thumbs-o-up"],approve:["thumbs-o-up","smile-o","thumbs-up"],hand:["thumbs-o-up","thumbs-o-down","thumbs-up","thumbs-down"],"thumbs-o-down":["thumbs-o-down"],dislike:["thumbs-o-down","thumbs-down"],disapprove:["thumbs-o-down","frown-o","thumbs-down"],disagree:["thumbs-o-down","thumbs-down"],"star-half":["star-half"],"heart-o":["heart-o"],"sign-out":["sign-out"],"log out":["sign-out"],logout:["sign-out"],leave:["sign-out"],arrow:["sign-out","sign-in","exchange"],"linkedin-square":["linkedin-square"],"thumb-tack":["thumb-tack"],marker:["thumb-tack"],"external-link":["external-link"],open:["external-link","external-link-square"],"sign-in":["sign-in"],enter:["sign-in"],join:["sign-in"],"log in":["sign-in"],login:["sign-in"],"sign up":["sign-in","user-plus"],"sign in":["sign-in"],signin:["sign-in"],signup:["sign-in","user-plus"],trophy:["trophy"],winner:["trophy","shield"],game:["trophy"],"github-square":["github-square"],octocat:["github-square","github","github-alt"],upload:["upload"],"lemon-o":["lemon-o"],phone:["phone"],call:["phone","phone-square","mobile"],voice:["phone","phone-square","microphone","microphone-slash"],number:["phone","phone-square","mobile"],earphone:["phone"],"square-o":["square-o"],"bookmark-o":["bookmark-o"],"phone-square":["phone-square"],twitter:["twitter"],facebook:["facebook"],"facebook-f":["facebook"],github:["github","code-fork"],"credit-card":["credit-card"],money:["credit-card","money","money","credit-card-alt"],debit:["credit-card","credit-card-alt"],rss:["rss"],blog:["rss","rss-square"],feed:["rss","rss-square"],"hdd-o":["hdd-o"],harddrive:["hdd-o"],"hard drive":["hdd-o"],storage:["hdd-o","archive"],bullhorn:["bullhorn"],announcement:["bullhorn"],broadcast:["bullhorn"],bell:["bell"],reminder:["bell","bell-o"],certificate:["certificate"],badge:["certificate"],"hand-o-right":["hand-o-right"],point:["hand-o-right","hand-o-left","hand-o-up","hand-o-down"],right:["hand-o-right"],"hand-o-left":["hand-o-left"],left:["hand-o-left"],"hand-o-up":["hand-o-up"],"hand-o-down":["hand-o-down"],"arrow-circle-left":["arrow-circle-left"],"arrow-circle-right":["arrow-circle-right"],"arrow-circle-up":["arrow-circle-up"],"arrow-circle-down":["arrow-circle-down"],globe:["globe"],world:["globe"],planet:["globe"],earth:["globe"],global:["globe"],translate:["globe"],all:["globe"],language:["globe","language"],country:["globe"],wrench:["wrench"],fix:["wrench"],tasks:["tasks"],progress:["tasks","spinner"],loading:["tasks","spinner"],downloading:["tasks"],downloads:["tasks"],filter:["filter"],funnel:["filter"],options:["filter"],briefcase:["briefcase"],work:["briefcase","building-o","building"],business:["briefcase","building-o","building"],office:["briefcase","building-o","building"],luggage:["briefcase","suitcase"],bag:["briefcase"],"arrows-alt":["arrows-alt"],fullscreen:["arrows-alt"],users:["users"],people:["users"],profiles:["users"],persons:["users"],group:["users"],link:["link","anchor"],chain:["link","link"],cloud:["cloud"],flask:["flask"],science:["flask"],beaker:["flask"],experimental:["flask"],labs:["flask"],scissors:["scissors"],cut:["scissors"],"files-o":["files-o"],duplicate:["files-o"],copy:["files-o","clipboard","clone"],paperclip:["paperclip"],attachment:["paperclip"],"floppy-o":["floppy-o"],bars:["bars"],menu:["bars","caret-down","sort-desc","chevron-circle-down","compass","caret-square-o-down"],drag:["bars"],hamburger:["bars"],navicon:["bars"],"list-ul":["list-ul"],"list-ol":["list-ol"],numbers:["list-ol","sort-numeric-asc","sort-numeric-desc"],strikethrough:["strikethrough"],underline:["underline"],table:["table"],data:["table"],excel:["table"],spreadsheet:["table"],magic:["magic"],wizard:["magic"],automatic:["magic"],autocomplete:["magic"],truck:["truck"],shipping:["truck"],pinterest:["pinterest"],"pinterest-square":["pinterest-square"],"google-plus-square":["google-plus-square"],"google-plus":["google-plus"],cash:["money"],"caret-down":["caret-down"],dropdown:["caret-down","sort-desc","chevron-circle-down","caret-square-o-down"],"triangle down":["caret-down"],"caret-up":["caret-up"],"triangle up":["caret-up"],"caret-left":["caret-left"],"triangle left":["caret-left"],"caret-right":["caret-right"],"triangle right":["caret-right"],columns:["columns"],split:["columns"],panes:["columns"],order:["sort"],unsorted:["sort"],"sort-desc":["sort-desc"],"sort-down":["sort-desc"],"sort-asc":["sort-asc"],"sort-up":["sort-asc"],envelope:["envelope"],linkedin:["linkedin"],undo:["undo"],"rotate-left":["undo"],gavel:["gavel"],legal:["gavel"],tachometer:["tachometer"],dashboard:["tachometer"],"comment-o":["comment-o"],"comments-o":["comments-o"],bolt:["bolt"],lightning:["bolt"],weather:["bolt","sun-o"],flash:["bolt"],sitemap:["sitemap"],directory:["sitemap","compass"],hierarchy:["sitemap"],organization:["sitemap"],umbrella:["umbrella"],clipboard:["clipboard"],paste:["clipboard"],"lightbulb-o":["lightbulb-o"],idea:["lightbulb-o"],inspiration:["lightbulb-o"],exchange:["exchange"],transfer:["exchange"],"cloud-download":["cloud-download"],"cloud-upload":["cloud-upload"],"user-md":["user-md"],doctor:["user-md"],medical:["user-md"],nurse:["user-md"],stethoscope:["stethoscope"],suitcase:["suitcase"],baggage:["suitcase"],"bell-o":["bell-o"],coffee:["coffee"],morning:["coffee"],mug:["coffee"],breakfast:["coffee"],tea:["coffee"],drink:["coffee"],cafe:["coffee"],cutlery:["cutlery"],food:["cutlery"],restaurant:["cutlery"],spoon:["cutlery","spoon"],knife:["cutlery"],dinner:["cutlery"],eat:["cutlery"],"file-text-o":["file-text-o"],"building-o":["building-o"],apartment:["building-o","building"],company:["building-o","building"],"hospital-o":["hospital-o"],building:["hospital-o","building"],ambulance:["ambulance"],medkit:["medkit"],"first aid":["medkit"],firstaid:["medkit"],health:["medkit"],"h-square":["h-square"],hospital:["h-square"],hotel:["h-square","bed"],"plus-square":["plus-square"],"angle-double-left":["angle-double-left"],laquo:["angle-double-left"],quote:["angle-double-left","angle-double-right"],"angle-double-right":["angle-double-right"],raquo:["angle-double-right"],"angle-double-up":["angle-double-up"],"angle-double-down":["angle-double-down"],"angle-left":["angle-left"],"angle-right":["angle-right"],"angle-up":["angle-up"],"angle-down":["angle-down"],desktop:["desktop","desktop"],monitor:["desktop"],screen:["desktop"],computer:["desktop","laptop"],demo:["desktop","laptop"],device:["desktop","laptop","tablet"],laptop:["laptop"],tablet:["tablet"],ipad:["tablet"],mobile:["mobile"],"cell phone":["mobile"],cellphone:["mobile"],iphone:["mobile"],"mobile-phone":["mobile"],"circle-o":["circle-o"],"quote-left":["quote-left"],"quote-right":["quote-right"],spinner:["spinner"],circle:["circle"],dot:["circle"],reply:["reply"],"mail-reply":["reply"],"github-alt":["github-alt"],"folder-o":["folder-o"],"folder-open-o":["folder-open-o"],"smile-o":["smile-o"],emoticon:["smile-o","frown-o","meh-o"],happy:["smile-o"],satisfied:["smile-o"],"frown-o":["frown-o"],sad:["frown-o"],"meh-o":["meh-o"],neutral:["meh-o"],gamepad:["gamepad"],controller:["gamepad"],"keyboard-o":["keyboard-o"],type:["keyboard-o"],input:["keyboard-o"],"flag-o":["flag-o"],"flag-checkered":["flag-checkered"],terminal:["terminal"],command:["terminal"],prompt:["terminal"],code:["terminal","code","css3"],html:["code"],brackets:["code"],"reply-all":["reply-all"],"mail-reply-all":["reply-all"],"star-half-o":["star-half-o"],"star-half-empty":["star-half-o"],"star-half-full":["star-half-o"],"location-arrow":["location-arrow"],crop:["crop"],"code-fork":["code-fork"],git:["code-fork","bitbucket","bitbucket-square","git"],fork:["code-fork"],vcs:["code-fork"],svn:["code-fork"],rebase:["code-fork"],version:["code-fork"],"chain-broken":["chain-broken"],unlink:["chain-broken"],question:["question"],info:["info"],exclamation:["exclamation"],superscript:["superscript"],exponential:["superscript"],subscript:["subscript"],eraser:["eraser"],"puzzle-piece":["puzzle-piece"],addon:["puzzle-piece"],"add-on":["puzzle-piece"],section:["puzzle-piece"],microphone:["microphone"],"microphone-slash":["microphone-slash"],shield:["shield"],"calendar-o":["calendar-o"],"fire-extinguisher":["fire-extinguisher"],rocket:["rocket"],app:["rocket"],maxcdn:["maxcdn"],"chevron-circle-left":["chevron-circle-left"],"chevron-circle-right":["chevron-circle-right"],"chevron-circle-up":["chevron-circle-up"],"chevron-circle-down":["chevron-circle-down"],html5:["html5"],css3:["css3"],anchor:["anchor"],"unlock-alt":["unlock-alt"],bullseye:["bullseye","dot-circle-o"],target:["bullseye","dot-circle-o"],"ellipsis-h":["ellipsis-h"],dots:["ellipsis-h","ellipsis-v"],"ellipsis-v":["ellipsis-v"],"rss-square":["rss-square"],"play-circle":["play-circle"],ticket:["ticket"],pass:["ticket"],"minus-square":["minus-square"],"minus-square-o":["minus-square-o"],"level-up":["level-up"],"level-down":["level-down"],"check-square":["check-square"],"pencil-square":["pencil-square"],"external-link-square":["external-link-square"],"share-square":["share-square"],compass:["compass"],safari:["compass","safari"],"caret-square-o-down":["caret-square-o-down"],"toggle-down":["caret-square-o-down"],"caret-square-o-up":["caret-square-o-up"],"toggle-up":["caret-square-o-up"],"caret-square-o-right":["caret-square-o-right"],"toggle-right":["caret-square-o-right"],eur:["eur"],euro:["eur"],gbp:["gbp"],usd:["usd"],dollar:["usd"],inr:["inr"],rupee:["inr"],jpy:["jpy"],cny:["jpy"],rmb:["jpy"],yen:["jpy"],rub:["rub"],ruble:["rub"],rouble:["rub"],krw:["krw"],won:["krw"],btc:["btc"],bitcoin:["btc"],file:["file"],"file-text":["file-text"],"sort-alpha-asc":["sort-alpha-asc"],"sort-alpha-desc":["sort-alpha-desc"],"sort-amount-asc":["sort-amount-asc"],"sort-amount-desc":["sort-amount-desc"],"sort-numeric-asc":["sort-numeric-asc"],"sort-numeric-desc":["sort-numeric-desc"],"thumbs-up":["thumbs-up"],"thumbs-down":["thumbs-down"],"youtube-square":["youtube-square"],video:["youtube-square","youtube"],youtube:["youtube"],xing:["xing"],"xing-square":["xing-square"],"youtube-play":["youtube-play"],dropbox:["dropbox"],"stack-overflow":["stack-overflow"],instagram:["instagram"],flickr:["flickr"],adn:["adn"],bitbucket:["bitbucket"],"bitbucket-square":["bitbucket-square"],tumblr:["tumblr"],"tumblr-square":["tumblr-square"],"long-arrow-down":["long-arrow-down"],"long-arrow-up":["long-arrow-up"],"long-arrow-left":["long-arrow-left"],"long-arrow-right":["long-arrow-right"],apple:["apple"],osx:["apple"],windows:["windows"],microsoft:["windows"],android:["android"],linux:["linux"],tux:["linux"],dribbble:["dribbble"],skype:["skype"],foursquare:["foursquare"],trello:["trello"],female:["female"],woman:["female"],male:["male"],gratipay:["gratipay"],gittip:["gratipay"],"sun-o":["sun-o"],lighter:["sun-o"],brighten:["sun-o"],day:["sun-o"],"moon-o":["moon-o"],darker:["moon-o"],archive:["archive"],bug:["bug"],insect:["bug"],vk:["vk"],weibo:["weibo"],renren:["renren"],pagelines:["pagelines"],leaves:["pagelines"],tree:["pagelines","tree"],plant:["pagelines"],"stack-exchange":["stack-exchange"],"arrow-circle-o-right":["arrow-circle-o-right"],"arrow-circle-o-left":["arrow-circle-o-left"],"caret-square-o-left":["caret-square-o-left"],"toggle-left":["caret-square-o-left"],"dot-circle-o":["dot-circle-o"],wheelchair:["wheelchair"],handicap:["wheelchair"],accessibility:["wheelchair"],accessibile:["wheelchair"],"vimeo-square":["vimeo-square"],try:["try"],"turkish-lira":["try"],"plus-square-o":["plus-square-o"],"space-shuttle":["space-shuttle"],slack:["slack"],"envelope-square":["envelope-square"],wordpress:["wordpress"],openid:["openid"],university:["university"],institution:["university"],bank:["university"],"graduation-cap":["graduation-cap"],learning:["graduation-cap"],school:["graduation-cap"],student:["graduation-cap"],"mortar-board":["graduation-cap"],yahoo:["yahoo"],google:["google"],reddit:["reddit"],"reddit-square":["reddit-square"],"stumbleupon-circle":["stumbleupon-circle"],stumbleupon:["stumbleupon"],delicious:["delicious"],digg:["digg"],"pied-piper":["pied-piper"],"pied-piper-alt":["pied-piper-alt"],drupal:["drupal"],joomla:["joomla"],fax:["fax"],child:["child"],paw:["paw"],pet:["paw"],cube:["cube"],cubes:["cubes"],behance:["behance"],"behance-square":["behance-square"],steam:["steam"],"steam-square":["steam-square"],recycle:["recycle"],car:["car"],vehicle:["car","taxi","bicycle","bus","motorcycle"],automobile:["car"],taxi:["taxi"],cab:["taxi"],spotify:["spotify"],deviantart:["deviantart"],soundcloud:["soundcloud"],database:["database"],"file-pdf-o":["file-pdf-o"],"file-word-o":["file-word-o"],"file-excel-o":["file-excel-o"],"file-powerpoint-o":["file-powerpoint-o"],"file-image-o":["file-image-o"],"file-photo-o":["file-image-o"],"file-picture-o":["file-image-o"],"file-archive-o":["file-archive-o"],"file-zip-o":["file-archive-o"],"file-audio-o":["file-audio-o"],"file-sound-o":["file-audio-o"],"file-video-o":["file-video-o"],"file-movie-o":["file-video-o"],"file-code-o":["file-code-o"],vine:["vine"],codepen:["codepen"],jsfiddle:["jsfiddle"],"life-ring":["life-ring"],"life-bouy":["life-ring"],"life-buoy":["life-ring"],"life-saver":["life-ring"],"circle-o-notch":["circle-o-notch"],rebel:["rebel"],ra:["rebel"],empire:["empire"],ge:["empire"],"git-square":["git-square"],"hacker-news":["hacker-news"],"y-combinator-square":["hacker-news"],"yc-square":["hacker-news"],"tencent-weibo":["tencent-weibo"],qq:["qq"],weixin:["weixin"],wechat:["weixin"],"paper-plane":["paper-plane"],"paper-plane-o":["paper-plane-o"],"send-o":["paper-plane-o"],history:["history"],"circle-thin":["circle-thin"],header:["header"],heading:["header"],paragraph:["paragraph"],sliders:["sliders"],"share-alt":["share-alt"],"share-alt-square":["share-alt-square"],"futbol-o":["futbol-o"],"soccer-ball-o":["futbol-o"],tty:["tty"],binoculars:["binoculars"],plug:["plug"],slideshare:["slideshare"],twitch:["twitch"],yelp:["yelp"],"newspaper-o":["newspaper-o"],press:["newspaper-o"],wifi:["wifi"],calculator:["calculator"],paypal:["paypal"],"google-wallet":["google-wallet"],"cc-visa":["cc-visa"],"cc-mastercard":["cc-mastercard"],"cc-discover":["cc-discover"],"cc-amex":["cc-amex"],amex:["cc-amex"],"cc-paypal":["cc-paypal"],"cc-stripe":["cc-stripe"],"bell-slash":["bell-slash"],"bell-slash-o":["bell-slash-o"],copyright:["copyright"],at:["at"],eyedropper:["eyedropper"],"paint-brush":["paint-brush"],"birthday-cake":["birthday-cake"],"area-chart":["area-chart"],"pie-chart":["pie-chart"],"line-chart":["line-chart"],lastfm:["lastfm"],"lastfm-square":["lastfm-square"],"toggle-off":["toggle-off"],"toggle-on":["toggle-on"],bicycle:["bicycle"],bike:["bicycle","motorcycle"],bus:["bus"],ioxhost:["ioxhost"],angellist:["angellist"],cc:["cc"],ils:["ils"],shekel:["ils"],sheqel:["ils"],meanpath:["meanpath"],buysellads:["buysellads"],connectdevelop:["connectdevelop"],dashcube:["dashcube"],forumbee:["forumbee"],leanpub:["leanpub"],sellsy:["sellsy"],shirtsinbulk:["shirtsinbulk"],simplybuilt:["simplybuilt"],skyatlas:["skyatlas"],"cart-plus":["cart-plus"],shopping:["cart-plus","cart-arrow-down"],"cart-arrow-down":["cart-arrow-down"],diamond:["diamond"],gem:["diamond"],gemstone:["diamond"],ship:["ship"],boat:["ship"],sea:["ship"],"user-secret":["user-secret"],whisper:["user-secret"],spy:["user-secret"],incognito:["user-secret"],motorcycle:["motorcycle"],"street-view":["street-view"],heartbeat:["heartbeat"],ekg:["heartbeat"],"facebook-official":["facebook-official"],"pinterest-p":["pinterest-p"],whatsapp:["whatsapp"],server:["server"],"user-plus":["user-plus"],"user-times":["user-times"],bed:["bed"],viacoin:["viacoin"],train:["train"],subway:["subway"],medium:["medium"],"y-combinator":["y-combinator"],yc:["y-combinator"],"optin-monster":["optin-monster"],opencart:["opencart"],expeditedssl:["expeditedssl"],"battery-full":["battery-full"],"battery-4":["battery-full"],"battery-three-quarters":["battery-three-quarters"],"battery-3":["battery-three-quarters"],"battery-half":["battery-half"],"battery-2":["battery-half"],"battery-quarter":["battery-quarter"],"battery-1":["battery-quarter"],"battery-empty":["battery-empty"],"battery-0":["battery-empty"],"mouse-pointer":["mouse-pointer"],"i-cursor":["i-cursor"],"object-group":["object-group"],"object-ungroup":["object-ungroup"],"sticky-note":["sticky-note"],"sticky-note-o":["sticky-note-o"],"cc-jcb":["cc-jcb"],"cc-diners-club":["cc-diners-club"],clone:["clone"],"balance-scale":["balance-scale"],"hourglass-o":["hourglass-o"],"hourglass-start":["hourglass-start"],"hourglass-1":["hourglass-start"],"hourglass-half":["hourglass-half"],"hourglass-2":["hourglass-half"],"hourglass-end":["hourglass-end"],"hourglass-3":["hourglass-end"],hourglass:["hourglass"],"hand-rock-o":["hand-rock-o"],"hand-grab-o":["hand-rock-o"],"hand-paper-o":["hand-paper-o"],"hand-stop-o":["hand-paper-o"],"hand-scissors-o":["hand-scissors-o"],"hand-lizard-o":["hand-lizard-o"],"hand-spock-o":["hand-spock-o"],"hand-pointer-o":["hand-pointer-o"],"hand-peace-o":["hand-peace-o"],trademark:["trademark"],registered:["registered"],"creative-commons":["creative-commons"],gg:["gg"],"gg-circle":["gg-circle"],tripadvisor:["tripadvisor"],odnoklassniki:["odnoklassniki"],"odnoklassniki-square":["odnoklassniki-square"],"get-pocket":["get-pocket"],"wikipedia-w":["wikipedia-w"],browser:["safari","chrome","firefox","internet-explorer","edge"],chrome:["chrome"],firefox:["firefox"],opera:["opera"],"internet-explorer":["internet-explorer"],ie:["internet-explorer","edge"],television:["television"],tv:["television"],contao:["contao"],"500px":["500px"],amazon:["amazon"],"calendar-plus-o":["calendar-plus-o"],"calendar-minus-o":["calendar-minus-o"],"calendar-times-o":["calendar-times-o"],"calendar-check-o":["calendar-check-o"],industry:["industry"],factory:["industry"],"map-pin":["map-pin"],"map-signs":["map-signs"],"map-o":["map-o"],commenting:["commenting"],"commenting-o":["commenting-o"],houzz:["houzz"],vimeo:["vimeo"],"black-tie":["black-tie"],fonticons:["fonticons"],"reddit-alien":["reddit-alien"],edge:["edge"],"credit-card-alt":["credit-card-alt"],"credit card":["credit-card-alt"],codiepie:["codiepie"],modx:["modx"],"fort-awesome":["fort-awesome"],usb:["usb"],"product-hunt":["product-hunt"],mixcloud:["mixcloud"],scribd:["scribd"],"pause-circle":["pause-circle"],"pause-circle-o":["pause-circle-o"],"stop-circle":["stop-circle"],"stop-circle-o":["stop-circle-o"],"shopping-bag":["shopping-bag"],"shopping-basket":["shopping-basket"],hashtag:["hashtag"],bluetooth:["bluetooth"],"bluetooth-b":["bluetooth-b"],percent:["percent"]},unicode:{music:"f001",search:"f002","envelope-o":"f003",heart:"f004",star:"f005","star-o":"f006",user:"f007",film:"f008","th-large":"f009",th:"f00a","th-list":"f00b",check:"f00c",times:"f00d","search-plus":"f00e","search-minus":"f010","power-off":"f011",signal:"f012",cog:"f013","trash-o":"f014",home:"f015","file-o":"f016","clock-o":"f017",road:"f018",download:"f019","arrow-circle-o-down":"f01a","arrow-circle-o-up":"f01b",inbox:"f01c","play-circle-o":"f01d",repeat:"f01e",refresh:"f021","list-alt":"f022",lock:"f023",flag:"f024",headphones:"f025","volume-off":"f026","volume-down":"f027","volume-up":"f028",qrcode:"f029",barcode:"f02a",tag:"f02b",tags:"f02c",book:"f02d",bookmark:"f02e",print:"f02f",camera:"f030",font:"f031",bold:"f032",italic:"f033","text-height":"f034","text-width":"f035","align-left":"f036","align-center":"f037","align-right":"f038","align-justify":"f039",list:"f03a",outdent:"f03b",indent:"f03c","video-camera":"f03d","picture-o":"f03e",pencil:"f040","map-marker":"f041",adjust:"f042",tint:"f043","pencil-square-o":"f044","share-square-o":"f045","check-square-o":"f046",arrows:"f047","step-backward":"f048","fast-backward":"f049",backward:"f04a",play:"f04b",pause:"f04c",stop:"f04d",forward:"f04e","fast-forward":"f050","step-forward":"f051",eject:"f052","chevron-left":"f053","chevron-right":"f054","plus-circle":"f055","minus-circle":"f056","times-circle":"f057","check-circle":"f058","question-circle":"f059","info-circle":"f05a","times-circle-o":"f05c","check-circle-o":"f05d",ban:"f05e","arrow-left":"f060","arrow-right":"f061","arrow-up":"f062","arrow-down":"f063",share:"f064",expand:"f065",compress:"f066",plus:"f067",minus:"f068",asterisk:"f069","exclamation-circle":"f06a",gift:"f06b",leaf:"f06c",fire:"f06d",eye:"f06e","eye-slash":"f070","exclamation-triangle":"f071",plane:"f072",calendar:"f073",random:"f074",comment:"f075",magnet:"f076","chevron-up":"f077","chevron-down":"f078",retweet:"f079","shopping-cart":"f07a",folder:"f07b","folder-open":"f07c","arrows-v":"f07d","arrows-h":"f07e","bar-chart":"f080","twitter-square":"f081","facebook-square":"f082","camera-retro":"f083",key:"f084",cogs:"f085",comments:"f086","thumbs-o-up":"f087","thumbs-o-down":"f088","star-half":"f089","heart-o":"f08a","sign-out":"f08b","linkedin-square":"f08c","thumb-tack":"f08d","external-link":"f08e","sign-in":"f090",trophy:"f091","github-square":"f092",upload:"f093","lemon-o":"f094",phone:"f095","square-o":"f096","bookmark-o":"f097","phone-square":"f098",twitter:"f099",facebook:"f09a",github:"f09b",unlock:"f09c","credit-card":"f09d",rss:"f09e","hdd-o":"f0a0",bullhorn:"f0a1",bell:"f0f3",certificate:"f0a3","hand-o-right":"f0a4","hand-o-left":"f0a5","hand-o-up":"f0a6","hand-o-down":"f0a7","arrow-circle-left":"f0a8","arrow-circle-right":"f0a9","arrow-circle-up":"f0aa","arrow-circle-down":"f0ab",globe:"f0ac",wrench:"f0ad",tasks:"f0ae",filter:"f0b0",briefcase:"f0b1","arrows-alt":"f0b2",users:"f0c0",link:"f0c1",cloud:"f0c2",flask:"f0c3",scissors:"f0c4","files-o":"f0c5",paperclip:"f0c6","floppy-o":"f0c7",square:"f0c8",bars:"f0c9","list-ul":"f0ca","list-ol":"f0cb",strikethrough:"f0cc",underline:"f0cd",table:"f0ce",magic:"f0d0",truck:"f0d1",pinterest:"f0d2","pinterest-square":"f0d3","google-plus-square":"f0d4","google-plus":"f0d5",money:"f0d6","caret-down":"f0d7","caret-up":"f0d8","caret-left":"f0d9","caret-right":"f0da",columns:"f0db",sort:"f0dc","sort-desc":"f0dd","sort-asc":"f0de",envelope:"f0e0",linkedin:"f0e1",undo:"f0e2",gavel:"f0e3",tachometer:"f0e4","comment-o":"f0e5","comments-o":"f0e6",bolt:"f0e7",sitemap:"f0e8",umbrella:"f0e9",clipboard:"f0ea","lightbulb-o":"f0eb",exchange:"f0ec","cloud-download":"f0ed","cloud-upload":"f0ee","user-md":"f0f0",stethoscope:"f0f1",suitcase:"f0f2","bell-o":"f0a2",coffee:"f0f4",cutlery:"f0f5","file-text-o":"f0f6","building-o":"f0f7","hospital-o":"f0f8",ambulance:"f0f9",medkit:"f0fa","h-square":"f0fd","plus-square":"f0fe","angle-double-left":"f100","angle-double-right":"f101","angle-double-up":"f102","angle-double-down":"f103","angle-left":"f104","angle-right":"f105","angle-up":"f106","angle-down":"f107",desktop:"f108",laptop:"f109",tablet:"f10a",mobile:"f10b","circle-o":"f10c","quote-left":"f10d","quote-right":"f10e",spinner:"f110",circle:"f111",reply:"f112","github-alt":"f113","folder-o":"f114","folder-open-o":"f115","smile-o":"f118","frown-o":"f119","meh-o":"f11a",gamepad:"f11b","keyboard-o":"f11c","flag-o":"f11d","flag-checkered":"f11e",terminal:"f120",code:"f121","reply-all":"f122","star-half-o":"f123","location-arrow":"f124",crop:"f125","code-fork":"f126","chain-broken":"f127",question:"f128",info:"f129",exclamation:"f12a",superscript:"f12b",subscript:"f12c",eraser:"f12d","puzzle-piece":"f12e",microphone:"f130","microphone-slash":"f131",shield:"f132","calendar-o":"f133","fire-extinguisher":"f134",rocket:"f135",maxcdn:"f136","chevron-circle-left":"f137","chevron-circle-right":"f138","chevron-circle-up":"f139","chevron-circle-down":"f13a",html5:"f13b",css3:"f13c",anchor:"f13d","unlock-alt":"f13e",bullseye:"f140","ellipsis-h":"f141","ellipsis-v":"f142","rss-square":"f143","play-circle":"f144",ticket:"f145","minus-square":"f146","minus-square-o":"f147","level-up":"f148","level-down":"f149","check-square":"f14a","pencil-square":"f14b","external-link-square":"f14c","share-square":"f14d",compass:"f14e","caret-square-o-down":"f150","caret-square-o-up":"f151","caret-square-o-right":"f152",eur:"f153",gbp:"f154",usd:"f155",inr:"f156",jpy:"f157",rub:"f158",krw:"f159",btc:"f15a",file:"f15b","file-text":"f15c","sort-alpha-asc":"f15d","sort-alpha-desc":"f15e","sort-amount-asc":"f160","sort-amount-desc":"f161","sort-numeric-asc":"f162","sort-numeric-desc":"f163","thumbs-up":"f164","thumbs-down":"f165","youtube-square":"f166",youtube:"f167",xing:"f168","xing-square":"f169","youtube-play":"f16a",dropbox:"f16b","stack-overflow":"f16c",instagram:"f16d",flickr:"f16e",adn:"f170",bitbucket:"f171","bitbucket-square":"f172",tumblr:"f173","tumblr-square":"f174","long-arrow-down":"f175","long-arrow-up":"f176","long-arrow-left":"f177","long-arrow-right":"f178",apple:"f179",windows:"f17a",android:"f17b",linux:"f17c",dribbble:"f17d",skype:"f17e",foursquare:"f180",trello:"f181",female:"f182",male:"f183",gratipay:"f184","sun-o":"f185","moon-o":"f186",archive:"f187",bug:"f188",vk:"f189",weibo:"f18a",renren:"f18b",pagelines:"f18c","stack-exchange":"f18d","arrow-circle-o-right":"f18e","arrow-circle-o-left":"f190","caret-square-o-left":"f191","dot-circle-o":"f192",wheelchair:"f193","vimeo-square":"f194",try:"f195","plus-square-o":"f196","space-shuttle":"f197",slack:"f198","envelope-square":"f199",wordpress:"f19a",openid:"f19b",university:"f19c","graduation-cap":"f19d",yahoo:"f19e",google:"f1a0",reddit:"f1a1","reddit-square":"f1a2","stumbleupon-circle":"f1a3",stumbleupon:"f1a4",delicious:"f1a5",digg:"f1a6","pied-piper":"f1a7","pied-piper-alt":"f1a8",drupal:"f1a9",joomla:"f1aa",language:"f1ab",fax:"f1ac",building:"f1ad",child:"f1ae",paw:"f1b0",spoon:"f1b1",cube:"f1b2",cubes:"f1b3",behance:"f1b4","behance-square":"f1b5",steam:"f1b6","steam-square":"f1b7",recycle:"f1b8",car:"f1b9",taxi:"f1ba",tree:"f1bb",spotify:"f1bc",deviantart:"f1bd",soundcloud:"f1be",database:"f1c0","file-pdf-o":"f1c1","file-word-o":"f1c2","file-excel-o":"f1c3","file-powerpoint-o":"f1c4","file-image-o":"f1c5","file-archive-o":"f1c6","file-audio-o":"f1c7","file-video-o":"f1c8","file-code-o":"f1c9",vine:"f1ca",codepen:"f1cb",jsfiddle:"f1cc","life-ring":"f1cd","circle-o-notch":"f1ce",rebel:"f1d0",empire:"f1d1","git-square":"f1d2",git:"f1d3","hacker-news":"f1d4","tencent-weibo":"f1d5",qq:"f1d6",weixin:"f1d7","paper-plane":"f1d8","paper-plane-o":"f1d9",history:"f1da","circle-thin":"f1db",header:"f1dc",paragraph:"f1dd",sliders:"f1de","share-alt":"f1e0","share-alt-square":"f1e1","futbol-o":"f1e3",tty:"f1e4",binoculars:"f1e5",plug:"f1e6",slideshare:"f1e7",twitch:"f1e8",yelp:"f1e9","newspaper-o":"f1ea",wifi:"f1eb",calculator:"f1ec",paypal:"f1ed","google-wallet":"f1ee","cc-visa":"f1f0","cc-mastercard":"f1f1","cc-discover":"f1f2","cc-amex":"f1f3","cc-paypal":"f1f4","cc-stripe":"f1f5","bell-slash":"f1f6","bell-slash-o":"f1f7",trash:"f1f8",copyright:"f1f9",at:"f1fa",eyedropper:"f1fb","paint-brush":"f1fc","birthday-cake":"f1fd","area-chart":"f1fe","pie-chart":"f200","line-chart":"f201",lastfm:"f202","lastfm-square":"f203","toggle-off":"f204","toggle-on":"f205",bicycle:"f206",bus:"f207",ioxhost:"f208",angellist:"f209",cc:"f20a",ils:"f20b",meanpath:"f20c",buysellads:"f20d",connectdevelop:"f20e",dashcube:"f210",forumbee:"f211",leanpub:"f212",sellsy:"f213",shirtsinbulk:"f214",simplybuilt:"f215",skyatlas:"f216","cart-plus":"f217","cart-arrow-down":"f218",diamond:"f219",ship:"f21a","user-secret":"f21b",motorcycle:"f21c","street-view":"f21d",heartbeat:"f21e","facebook-official":"f230","pinterest-p":"f231",whatsapp:"f232",server:"f233","user-plus":"f234","user-times":"f235",bed:"f236",viacoin:"f237",train:"f238",subway:"f239",medium:"f23a","y-combinator":"f23b","optin-monster":"f23c",opencart:"f23d",expeditedssl:"f23e","battery-full":"f240","battery-three-quarters":"f241","battery-half":"f242","battery-quarter":"f243","battery-empty":"f244","mouse-pointer":"f245","i-cursor":"f246","object-group":"f247","object-ungroup":"f248","sticky-note":"f249","sticky-note-o":"f24a","cc-jcb":"f24b","cc-diners-club":"f24c",clone:"f24d","balance-scale":"f24e","hourglass-o":"f250","hourglass-start":"f251","hourglass-half":"f252","hourglass-end":"f253",hourglass:"f254","hand-rock-o":"f255","hand-paper-o":"f256","hand-scissors-o":"f257","hand-lizard-o":"f258","hand-spock-o":"f259","hand-pointer-o":"f25a","hand-peace-o":"f25b",trademark:"f25c",registered:"f25d","creative-commons":"f25e",gg:"f260","gg-circle":"f261",tripadvisor:"f262",odnoklassniki:"f263","odnoklassniki-square":"f264","get-pocket":"f265","wikipedia-w":"f266",safari:"f267",chrome:"f268",firefox:"f269",opera:"f26a","internet-explorer":"f26b",television:"f26c",contao:"f26d","500px":"f26e",amazon:"f270","calendar-plus-o":"f271","calendar-minus-o":"f272","calendar-times-o":"f273","calendar-check-o":"f274",industry:"f275","map-pin":"f276","map-signs":"f277","map-o":"f278",map:"f279",commenting:"f27a","commenting-o":"f27b",houzz:"f27c",vimeo:"f27d","black-tie":"f27e",fonticons:"f280","reddit-alien":"f281",edge:"f282","credit-card-alt":"f283",codiepie:"f284",modx:"f285","fort-awesome":"f286",usb:"f287","product-hunt":"f288",mixcloud:"f289",scribd:"f28a","pause-circle":"f28b","pause-circle-o":"f28c","stop-circle":"f28d","stop-circle-o":"f28e","shopping-bag":"f290","shopping-basket":"f291",hashtag:"f292",bluetooth:"f293","bluetooth-b":"f294",percent:"f295"}}},"./src/code-studio/components/lessonExtras/CreateSomething.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var CreateSomething=function(_React$Component){function CreateSomething(props){var _this;return(_this=_React$Component.call(this,props)||this).links=[{href:"/projects/artist/new",img:"/shared/images/courses/logo_tall_artist.jpg",title:_locale.default.playzoneArtistTitle(),className:"artist",description:_locale.default.playzoneArtistDescription()},{href:"/projects/playlab/new",img:"/shared/images/courses/logo_tall_playlab.jpg",title:_locale.default.playzonePlaylabTitle(),className:"playlab",description:_locale.default.playzonePlaylabDescription()},{href:"/projects",img:"/shared/images/courses/logo_tall_applab.png",title:_locale.default.playzoneProjectsTitle(),className:"projects",description:_locale.default.playzoneProjectsDescription()}],_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(CreateSomething,_React$Component),CreateSomething.prototype.render=function render(){return _react.default.createElement("div",{className:"center",style:styles.courseblockContainer},this.links.map((function(link){return _react.default.createElement("div",{key:link.className,className:"courseblock-noaction courseblock-span3 courseblock-tall"},_react.default.createElement("a",{href:link.href},_react.default.createElement("div",{className:"imgspan"},_react.default.createElement("img",{height:"120px",src:link.img,alt:"Logo tall ".concat(link.className)})),_react.default.createElement("div",{className:"heading"},_react.default.createElement("h3",null,link.title)),_react.default.createElement("div",{className:"smalltext"},link.description)))})))},CreateSomething}(_react.default.Component);exports.default=CreateSomething;var styles={courseblockContainer:{width:720,paddingTop:20}};module.exports=exports.default},"./src/code-studio/components/lessonExtras/MazeThumbnail.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ProtectedStatefulDiv=_interopRequireDefault(__webpack_require__("./src/templates/ProtectedStatefulDiv.jsx")),_skins=_interopRequireDefault(__webpack_require__("./src/maze/skins.js")),_assetUrl=_interopRequireDefault(__webpack_require__("./src/code-studio/assetUrl.js")),_maze=__webpack_require__("./node_modules/@code-dot-org/maze/dist/main.js"),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Scrat=exports.PlantsVsZombies=exports.Harvester=exports.FarmerNight=exports.Farmer=exports.Collector=exports.Bee=exports.AngryBirds=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_MazeThumbnail=_interopRequireDefault(__webpack_require__("./src/code-studio/components/lessonExtras/MazeThumbnail.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var sampleMap=[[0,0,0,4,0,0,0,0],[0,0,0,1,0,1,0,0],[0,0,2,1,1,1,0,0],[0,0,0,0,0,1,0,0],[0,0,0,0,0,1,1,4],[0,0,0,0,0,1,0,0],[0,3,1,1,1,1,0,0],[0,0,0,0,0,0,0,0]],_default={title:"MazeThumbnail",component:_MazeThumbnail.default};exports.default=_default;var Template=function Template(args){return _react.default.createElement(_MazeThumbnail.default,args)},AngryBirds=Template.bind({});exports.AngryBirds=AngryBirds,AngryBirds.args={mazeSummary:{map:sampleMap,level:{startDirection:1},skin:"birds"}};var PlantsVsZombies=Template.bind({});exports.PlantsVsZombies=PlantsVsZombies,PlantsVsZombies.args={mazeSummary:{map:sampleMap,level:{startDirection:1},skin:"pvz"}};var Scrat=Template.bind({});exports.Scrat=Scrat,Scrat.args={mazeSummary:{map:sampleMap,level:{startDirection:1},skin:"scrat"}};var Farmer=Template.bind({});exports.Farmer=Farmer,Farmer.args={mazeSummary:{map:sampleMap,level:{startDirection:1},skin:"farmer"}};var FarmerNight=Template.bind({});exports.FarmerNight=FarmerNight,FarmerNight.args={mazeSummary:{map:sampleMap,level:{startDirection:1},skin:"farmer_night"}};var Bee=Template.bind({});exports.Bee=Bee,Bee.args={mazeSummary:{map:[[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:2},{tileType:1,featureType:1,value:1,flowerColor:0,range:1},{tileType:1},{tileType:1},{tileType:1,featureType:1,value:1,flowerColor:0,range:1},{tileType:1},{tileType:1,featureType:1,value:1,flowerColor:0,range:1},{tileType:1,featureType:1,value:1,flowerColor:0,range:1}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}]],level:{startDirection:1,flowerType:"redWithNectar"},skin:"bee"}};var Harvester=Template.bind({});exports.Harvester=Harvester,Harvester.args={mazeSummary:{map:[[{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1}],[{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,value:1,range:1,possibleFeatures:[2],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,value:1,range:1,possibleFeatures:[1],startsHidden:!1},{tileType:2,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1}],[{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,value:1,range:1,possibleFeatures:[1],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1}],[{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1}],[{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1}],[{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1}],[{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,value:1,range:1,possibleFeatures:[2],startsHidden:!1},{tileType:1,value:1,range:1,possibleFeatures:[1],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,value:1,range:1,possibleFeatures:[2],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1}],[{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:1,possibleFeatures:[0],startsHidden:!1},{tileType:0,possibleFeatures:[0],startsHidden:!1}]],level:{startDirection:1},skin:"harvester"}};var Collector=Template.bind({});exports.Collector=Collector,Collector.args={mazeSummary:{map:[[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}],[{tileType:0},{tileType:1},{tileType:1,value:1,range:1},{tileType:1},{tileType:1,value:2,range:2},{tileType:1},{tileType:0},{tileType:0}],[{tileType:0},{tileType:1,value:4,range:4},{tileType:0},{tileType:1},{tileType:0},{tileType:1,value:3,range:3},{tileType:0},{tileType:0}],[{tileType:0},{tileType:1},{tileType:1},{tileType:2},{tileType:1},{tileType:1},{tileType:0},{tileType:0}],[{tileType:0},{tileType:1,value:3,range:3},{tileType:0},{tileType:1},{tileType:0},{tileType:1,value:1,range:1},{tileType:0},{tileType:0}],[{tileType:0},{tileType:1},{tileType:1,value:2,range:2},{tileType:1},{tileType:1,value:4,range:4},{tileType:1},{tileType:0},{tileType:0}],[{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0},{tileType:0}]],level:{startDirection:1},skin:"collector"}}},"./src/code-studio/components/libraries/LibraryClientApi.js":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _clientApi=_interopRequireDefault(__webpack_require__("./src/code-studio/initApp/clientApi.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:"unknown";this.libraryApi.fetch(this.channelId+"/library.json/versions",(function(error,data){if(data){var mostRecent=data.find((function(libraryVersion){return libraryVersion.isLatest}));onSuccess(mostRecent.versionId)}else _firehose.default.putRecord({study:"applab_library_versions",event,data_json:JSON.stringify({error:error.message,channelId:_this4.channelId,pathname:location.pathname})},{includeUserId:!0}),onError(error)}))},_proto.fetchByVersion=function fetchByVersion(versionId,onSuccess,onError){this.libraryApi.fetch(this.channelId+"/library.json?version="+versionId,(function(error,data){data?onSuccess(data):onError(error)}))},_proto.delete=function _delete(onSuccess,onError){var _this5=this;this.libraryApi.deleteObject(this.channelId+"/library.json",(function(error,success){success?(_this5.cacheBustSuffix=(new Date).getTime(),onSuccess()):onError(error)}))},_proto.getClassLibraries=function(){var _getClassLibraries=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(onSuccess,onError){var data,response;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.prev=0,_context.next=3,fetch("/api/v1/section_libraries/",{method:"GET"});case 3:if((response=_context.sent).ok){_context.next=7;break}return onError(response.status+": "+response.statusText),_context.abrupt("return");case 7:return _context.next=9,response.json();case 9:data=_context.sent,_context.next=15;break;case 12:_context.prev=12,_context.t0=_context.catch(0),onError(_context.t0);case 15:onSuccess(data);case 16:case"end":return _context.stop()}}),_callee,null,[[0,12]])})));return function getClassLibraries(_x,_x2){return _getClassLibraries.apply(this,arguments)}}(),LibraryClientApi}();exports.default=LibraryClientApi,module.exports=exports.default},"./src/code-studio/components/libraries/LibraryCreationDialog.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnpublishSuccessDisplay=exports.UnconnectedLibraryCreationDialog=exports.LoadingDisplay=exports.ErrorDisplay=exports.DialogState=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_Dialog=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/templates/Dialog.jsx")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_shareDialogRedux=__webpack_require__("./src/code-studio/components/shareDialogRedux.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_PadAndCenter=_interopRequireDefault(__webpack_require__("./src/templates/teacherDashboard/PadAndCenter.jsx")),_Headings=__webpack_require__("./src/lib/ui/Headings.jsx"),_spinner=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/components/spinner.jsx")),_PublishSuccessDisplay=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/PublishSuccessDisplay.jsx")),_ShareTeacherLibraries=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/ShareTeacherLibraries.jsx")),_LibraryPublisher=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryPublisher.jsx")),_libraryLoader=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/libraryLoader.js")),_LibraryClientApi=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryClientApi.js")),_redux=__webpack_require__("./src/redux.js"),_utils=__webpack_require__("./src/utils.js"),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_copyToClipboard=_interopRequireDefault(__webpack_require__("./src/util/copyToClipboard.js")),_InlineMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/InlineMarkdown.jsx"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var DEFAULT_COPY_BUTTON_TEXT=_locale.default.copyId(),DialogState={LOADING:"loading",DONE_LOADING:"done_loading",PUBLISHED:"published",UNPUBLISHED:"unpublished",SHARE_TEACHER_LIBRARIES:"share_teacher_libraries",CODE_PROFANITY:"code_profanity",ERROR:"error"};exports.DialogState=DialogState;var LibraryCreationDialog=function(_React$Component){function LibraryCreationDialog(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{dialogState:DialogState.LOADING,libraryName:"",libraryDetails:{},libraryClientApi:new _LibraryClientApi.default(_this.props.channelId),errorMessage:"",copyButtonText:DEFAULT_COPY_BUTTON_TEXT}),_defineProperty(_assertThisInitialized(_this),"onOpen",(function(){(0,_libraryLoader.default)(_this.state.libraryClientApi,(function(error){return _this.setState({dialogState:DialogState.ERROR,errorMessage:error})}),_this.onLibraryLoaded)})),_defineProperty(_assertThisInitialized(_this),"onLibraryLoaded",function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(libraryDetails){var defaultNewState,profaneWords;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return defaultNewState={dialogState:DialogState.DONE_LOADING,libraryDetails},_context.prev=1,_context.next=4,(0,_utils.findProfanity)(libraryDetails.librarySource);case 4:(profaneWords=_context.sent)&&profaneWords.length>0?_this.setState({dialogState:DialogState.CODE_PROFANITY,errorMessage:_locale.default.libraryCodeProfanity({profanityCount:profaneWords.length,profaneWords:profaneWords.join(", ")})}):_this.setState(defaultNewState),_context.next=11;break;case 8:_context.prev=8,_context.t0=_context.catch(1),_this.setState(defaultNewState);case 11:case"end":return _context.stop()}}),_callee,null,[[1,8]])})));return function(_x){return _ref.apply(this,arguments)}}()),_defineProperty(_assertThisInitialized(_this),"handleClose",(function(){_this.setState({dialogState:DialogState.LOADING}),_this.props.onClose()})),_defineProperty(_assertThisInitialized(_this),"displayPublisherSubtitle",(function(){var libraryDetails=_this.state.libraryDetails,channelId=_this.props.channelId,onClickCopy=_lodash.default.debounce((function(){(0,_copyToClipboard.default)(channelId),_this.setState({copyButtonText:_locale.default.copied()}),window.setInterval((function(){return _this.setState({copyButtonText:DEFAULT_COPY_BUTTON_TEXT})}),3e3)}),3e3,{leading:!0});return _react.default.createElement("div",{style:styles.info},libraryDetails&&libraryDetails.alreadyPublished&&_react.default.createElement("div",{style:styles.idInfo},_react.default.createElement(_InlineMarkdown.default,{markdown:_locale.default.libraryExportId({channelId})}),_react.default.createElement(_Button.default,{text:_this.state.copyButtonText,color:_Button.default.ButtonColor.blue,style:styles.copyBtn,onClick:onClickCopy})),_locale.default.libraryExportSubtitle())})),_defineProperty(_assertThisInitialized(_this),"displayPublisherContent",(function(){var _this$state=_this.state,libraryDetails=_this$state.libraryDetails,libraryClientApi=_this$state.libraryClientApi;return _react.default.createElement(_LibraryPublisher.default,{onPublishSuccess:function onPublishSuccess(libraryName){return _this.setState({dialogState:DialogState.PUBLISHED,libraryName})},onUnpublishSuccess:function onUnpublishSuccess(){return _this.setState({dialogState:DialogState.UNPUBLISHED})},onShareTeacherLibrary:_this.onShareTeacherLibrary(),libraryDetails,libraryClientApi})})),_defineProperty(_assertThisInitialized(_this),"onShareTeacherLibrary",(function(){return _this.isTeacher()?function(){return _this.setState({dialogState:DialogState.SHARE_TEACHER_LIBRARIES})}:void 0})),_this}_inheritsLoose(LibraryCreationDialog,_React$Component);var _proto=LibraryCreationDialog.prototype;return _proto.componentDidUpdate=function componentDidUpdate(prevProps){!1===prevProps.dialogIsOpen&&!0===this.props.dialogIsOpen&&this.onOpen()},_proto.isTeacher=function isTeacher(){return"teacher"===(0,_redux.getStore)().getState().currentUser.userType},_proto.render=function render(){var subtitleContent,bodyContent,_this$state2=this.state,dialogState=_this$state2.dialogState,libraryName=_this$state2.libraryName,errorMessage=_this$state2.errorMessage,_this$props=this.props,dialogIsOpen=_this$props.dialogIsOpen,channelId=_this$props.channelId,onClose=_this$props.onClose;switch(dialogState){case DialogState.LOADING:bodyContent=_react.default.createElement(LoadingDisplay,null);break;case DialogState.PUBLISHED:bodyContent=_react.default.createElement(_PublishSuccessDisplay.default,{libraryName,channelId});break;case DialogState.UNPUBLISHED:bodyContent=_react.default.createElement(UnpublishSuccessDisplay,null);break;case DialogState.ERROR:bodyContent=_react.default.createElement(ErrorDisplay,{message:errorMessage});break;case DialogState.DONE_LOADING:subtitleContent=this.displayPublisherSubtitle(),bodyContent=this.displayPublisherContent();break;case DialogState.SHARE_TEACHER_LIBRARIES:bodyContent=_react.default.createElement(_ShareTeacherLibraries.default,{onCancel:onClose});break;case DialogState.CODE_PROFANITY:bodyContent=_react.default.createElement(ErrorDisplay,{message:errorMessage});break;default:bodyContent=_react.default.createElement(ErrorDisplay,{message:_locale.default.libraryCreatorError()})}var title=dialogState===DialogState.SHARE_TEACHER_LIBRARIES?_locale.default.manageYourLibraries():_locale.default.libraryExportTitle();return _react.default.createElement(_Dialog.default,{isOpen:dialogIsOpen,handleClose:this.handleClose,useUpdatedStyles:!0,style:{width:800}},_react.default.createElement(_Dialog.Body,null,_react.default.createElement(_PadAndCenter.default,null,_react.default.createElement("div",{style:styles.libraryBoundary},_react.default.createElement(_Headings.Heading1,null,title),subtitleContent,bodyContent))))},LibraryCreationDialog}(_react.default.Component);_defineProperty(LibraryCreationDialog,"propTypes",{channelId:_propTypes.default.string.isRequired,dialogIsOpen:_propTypes.default.bool.isRequired,onClose:_propTypes.default.func.isRequired});var ErrorDisplay=function(_React$Component2){function ErrorDisplay(){return _React$Component2.apply(this,arguments)||this}return _inheritsLoose(ErrorDisplay,_React$Component2),ErrorDisplay.prototype.render=function render(){var message=this.props.message;return _react.default.createElement("div",null,message)},ErrorDisplay}(_react.default.Component);exports.ErrorDisplay=ErrorDisplay,_defineProperty(ErrorDisplay,"propTypes",{message:_propTypes.default.string.isRequired});var LoadingDisplay=function(_React$Component3){function LoadingDisplay(){return _React$Component3.apply(this,arguments)||this}return _inheritsLoose(LoadingDisplay,_React$Component3),LoadingDisplay.prototype.render=function render(){return _react.default.createElement("div",{style:styles.centerContent},_react.default.createElement(_spinner.default,null))},LoadingDisplay}(_react.default.Component);exports.LoadingDisplay=LoadingDisplay;var UnpublishSuccessDisplay=function(_React$Component4){function UnpublishSuccessDisplay(){return _React$Component4.apply(this,arguments)||this}return _inheritsLoose(UnpublishSuccessDisplay,_React$Component4),UnpublishSuccessDisplay.prototype.render=function render(){return _react.default.createElement("div",null,_react.default.createElement(_Headings.Heading2,null,_react.default.createElement("b",null,_locale.default.libraryUnPublishTitle())),_react.default.createElement("p",null,_locale.default.libraryUnPublishExplanation()))},UnpublishSuccessDisplay}(_react.default.Component);exports.UnpublishSuccessDisplay=UnpublishSuccessDisplay;var styles={libraryBoundary:{padding:10,width:"90%"},centerContent:{display:"flex",justifyContent:"center"},info:{fontSize:12,fontStyle:"italic",lineHeight:1.2},idInfo:{marginBottom:10},copyBtn:{margin:"0 15px",":hover":{cursor:"copy"}}},UnconnectedLibraryCreationDialog=LibraryCreationDialog;exports.UnconnectedLibraryCreationDialog=UnconnectedLibraryCreationDialog;var _default=(0,_reactRedux.connect)((function(state){return{dialogIsOpen:state.shareDialog.libraryDialogIsOpen}}),(function(dispatch){return{onClose:function onClose(){dispatch((0,_shareDialogRedux.hideLibraryCreationDialog)())}}}))(LibraryCreationDialog);exports.default=_default},"./src/code-studio/components/libraries/LibraryIdCopier.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var LibraryIdCopier=function(_React$Component){function LibraryIdCopier(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"copyChannelId",(function(){_this.channelId.select(),document.execCommand("copy")})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(LibraryIdCopier,_React$Component),LibraryIdCopier.prototype.render=function render(){var _this2=this,channelId=this.props.channelId;return _react.default.createElement("div",null,_react.default.createElement("input",{type:"text",ref:function ref(channelId){return _this2.channelId=channelId},onClick:function onClick(event){return event.target.select()},readOnly:!0,value:channelId,style:styles.copy}),_react.default.createElement(_Button.default,{onClick:this.copyChannelId,text:_locale.default.copyId(),style:styles.button}))},LibraryIdCopier}(_react.default.Component);exports.default=LibraryIdCopier,_defineProperty(LibraryIdCopier,"propTypes",{channelId:_propTypes.default.string.isRequired});var styles={copy:{cursor:"copy",width:250,height:25,marginBottom:0},button:{marginLeft:10}};module.exports=exports.default},"./src/code-studio/components/libraries/LibraryListItem.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.LibraryListItem=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_radium=_interopRequireDefault(__webpack_require__("./node_modules/radium/es/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_InlineMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/InlineMarkdown.jsx")),_Tooltip=_interopRequireDefault(__webpack_require__("./src/templates/Tooltip.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var LibraryListItem=function(_React$Component){function LibraryListItem(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"viewCode",(function(event){event.preventDefault(),_this.props.onViewCode()})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(LibraryListItem,_React$Component),LibraryListItem.prototype.render=function render(){var _this2=this,library=this.props.library;return _react.default.createElement("div",{style:styles.listItem},_react.default.createElement("div",{style:[{marginRight:25},styles.overflowEllipsis]},_react.default.createElement(_Tooltip.default,{text:_locale.default.viewCode(),place:"bottom"},_react.default.createElement("a",{onClick:this.viewCode,style:styles.libraryTitle},library.name)),library.userName&&_react.default.createElement("div",{style:[styles.author,styles.overflowEllipsis]},_react.default.createElement(_InlineMarkdown.default,{markdown:_locale.default.authorName({name:library.userName})}))),_react.default.createElement("div",{style:[styles.description,styles.overflowEllipsis]},library.description),_react.default.createElement("div",{style:styles.actions},this.props.onAdd&&_react.default.createElement(_Tooltip.default,{text:_locale.default.add(),place:"bottom"},_react.default.createElement("button",{type:"button",key:"add-"+library.id,onClick:function onClick(){return _this2.props.onAdd(library.id)},style:[styles.actionBtn,styles.addBtn]},_react.default.createElement(_FontAwesome.default,{icon:"plus",style:styles.iconPadding}))),this.props.onUpdate&&_react.default.createElement("button",{type:"button",key:"update-"+library.id,onClick:function onClick(){return _this2.props.onUpdate(library.channelId)},style:[styles.actionBtn,styles.updateBtn]},_react.default.createElement(_FontAwesome.default,{icon:"refresh",style:{padding:"0 1px"}}),_react.default.createElement("span",{style:styles.updateText},_locale.default.update())),this.props.onRemove&&_react.default.createElement(_Tooltip.default,{text:library.fromLevelbuilder?_locale.default.cannotDeleteLibrary():_locale.default.removeFromProject(),place:"bottom"},_react.default.createElement("button",{type:"button",className:"ui-test-remove-library",key:"remove-"+library.id,onClick:function onClick(){return _this2.props.onRemove(library.channelId)},style:[styles.actionBtn,styles.removeBtn],disabled:!!library.fromLevelbuilder},_react.default.createElement(_FontAwesome.default,{icon:"trash-o",style:styles.iconPadding})))))},LibraryListItem}(_react.default.Component);exports.LibraryListItem=LibraryListItem,_defineProperty(LibraryListItem,"propTypes",{library:_propTypes.default.object.isRequired,onUpdate:_propTypes.default.func,onRemove:_propTypes.default.func,onAdd:_propTypes.default.func,onViewCode:_propTypes.default.func});var styles={overflowEllipsis:{textOverflow:"ellipsis",overflow:"hidden"},listItem:{padding:8,margin:2,color:_color.default.dark_charcoal,textAlign:"left",display:"flex",borderBottom:"1px solid ".concat(_color.default.lightest_gray),lineHeight:1.5},libraryTitle:{fontFamily:"'Gotham 5r', sans-serif",fontSize:16,cursor:"pointer",color:_color.default.link_color,":hover":{color:_color.default.link_color}},description:{marginRight:25,flexShrink:2},actions:{display:"flex",flexGrow:1,justifyContent:"flex-end"},actionBtn:{padding:8,fontSize:18,backgroundColor:_color.default.white,":hover":{boxShadow:"none"}},iconPadding:{padding:"0 2px"},addBtn:{color:_color.default.link_color,borderColor:_color.default.link_color,":hover":{color:_color.default.white,backgroundColor:_color.default.link_color}},updateBtn:{color:_color.default.orange,borderColor:_color.default.orange,":hover":{color:_color.default.white,backgroundColor:_color.default.orange}},updateText:{fontFamily:"'Gotham 5r', sans-serif",paddingLeft:5,fontSize:16},removeBtn:{color:_color.default.dark_red,borderColor:_color.default.dark_red,":hover":{color:_color.default.white,backgroundColor:_color.default.dark_red},":disabled":{color:_color.default.light_gray,borderColor:_color.default.light_gray,backgroundColor:_color.default.lightest_gray,cursor:"default"}}},_default=(0,_radium.default)(LibraryListItem);exports.default=_default},"./src/code-studio/components/libraries/LibraryManagerDialog.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mapUserNameToProjectLibraries=exports.default=exports.LibraryManagerDialog=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_radium=_interopRequireDefault(__webpack_require__("./node_modules/radium/es/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_LibraryClientApi=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryClientApi.js")),_LibraryListItem=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryListItem.jsx")),_LibraryViewCode=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryViewCode.jsx")),_libraryParser=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/libraryParser.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.PublishState=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_libraryParser=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/libraryParser.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_Headings=__webpack_require__("./src/lib/ui/Headings.jsx"),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_utils=__webpack_require__("./src/utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var PublishState={DEFAULT:"default",ERROR_PUBLISH:"error_publish",INVALID_INPUT:"invalid_input",PII_INPUT:"pII_input",PROFANE_INPUT:"profane_input",TOO_LONG:"too_long",ERROR_UNPUBLISH:"error_unpublish"};exports.PublishState=PublishState;var LibraryPublisher=function(_React$Component){function LibraryPublisher(props){var _this;_defineProperty(_assertThisInitialized(_this=_React$Component.call(this,props)||this),"setLibraryName",(function(event){var libraryName=_this.state.libraryName,sanitizedName=_libraryParser.default.sanitizeName(event.target.value);sanitizedName!==libraryName&&_this.setState({libraryName:sanitizedName})})),_defineProperty(_assertThisInitialized(_this),"getFunctionsToPublish",(function(){var selectedFunctions=_this.state.selectedFunctions;return(_this.props.libraryDetails.sourceFunctionList||[]).filter((function(sourceFunction){return selectedFunctions[sourceFunction.functionName]}))})),_defineProperty(_assertThisInitialized(_this),"validateAndPublish",_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var _this$state,libraryDescription,libraryName,profaneWords;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(_this$state=_this.state,libraryDescription=_this$state.libraryDescription,libraryName=_this$state.libraryName,libraryDescription&&_this.getFunctionsToPublish().length>0){_context.next=4;break}return _this.setState({publishState:PublishState.INVALID_INPUT}),_context.abrupt("return");case 4:return _context.prev=4,_context.next=7,(0,_utils.findProfanity)("".concat(libraryName," ").concat(libraryDescription));case 7:(profaneWords=_context.sent)&&profaneWords.length>0?_this.setState({publishState:PublishState.PROFANE_INPUT,profaneWords}):_this.publish(),_context.next=14;break;case 11:_context.prev=11,_context.t0=_context.catch(4),_this.publish();case 14:case"end":return _context.stop()}}),_callee,null,[[4,11]])})))),_defineProperty(_assertThisInitialized(_this),"publish",(function(){var _this$state2=_this.state,libraryDescription=_this$state2.libraryDescription,libraryName=_this$state2.libraryName,librarySource=_this.props.libraryDetails.librarySource,_this$props=_this.props,libraryClientApi=_this$props.libraryClientApi,onPublishSuccess=_this$props.onPublishSuccess,libraryJson=_libraryParser.default.createLibraryJson(librarySource,_this.getFunctionsToPublish(),libraryName,libraryDescription);libraryClientApi.publish(libraryJson,(function(error){var _error$cause;console.warn("Error publishing library: ".concat(error)),error.message.includes("httpStatusCode: 413")?_this.setState({publishState:PublishState.TOO_LONG}):null!==(_error$cause=error.cause)&&void 0!==_error$cause&&_error$cause.pIIWords?_this.setState({publishState:PublishState.PII_INPUT,pIIWords:error.cause.pIIWords}):_this.setState({publishState:PublishState.ERROR_PUBLISH})}),(function(data){dashboard.project.setLibraryDetails({libraryName,libraryDescription,publishing:!0,latestLibraryVersion:data&&data.versionId}),onPublishSuccess(libraryName)}))})),_defineProperty(_assertThisInitialized(_this),"displayNameInput",(function(){var libraryName=_this.state.libraryName;return _react.default.createElement("div",null,_react.default.createElement("input",{style:styles.textInput,type:"text",value:libraryName,onChange:_this.setLibraryName,onBlur:function onBlur(event){return _this.setState({libraryName:_libraryParser.default.suggestName(event.target.value)})}}),_react.default.createElement("div",{style:styles.info},_locale.default.libraryNameRequirements()))})),_defineProperty(_assertThisInitialized(_this),"resetErrorMessage",(function(){var _this$state3=_this.state,libraryDescription=_this$state3.libraryDescription,selectedFunctions=_this$state3.selectedFunctions,publishState=_this$state3.publishState;libraryDescription&&Object.values(selectedFunctions).find((function(value){return value}))&&publishState===PublishState.INVALID_INPUT&&_this.setState({publishState:PublishState.DEFAULT})})),_defineProperty(_assertThisInitialized(_this),"displayDescription",(function(){var libraryDescription=_this.state.libraryDescription;return _react.default.createElement("textarea",{id:"ui-test-library-description",rows:"2",cols:"200",style:_objectSpread(_objectSpread({},styles.textInput),styles.description),placeholder:_locale.default.libraryDescriptionPlaceholder(),value:libraryDescription,onChange:function onChange(event){_this.setState({libraryDescription:event.target.value},_this.resetErrorMessage)}})})),_defineProperty(_assertThisInitialized(_this),"hasComment",(function(sourceFunction){return(sourceFunction.comment||"").length>0})),_defineProperty(_assertThisInitialized(_this),"duplicateFunction",(function(sourceFunction){var sourceFunctionList=_this.props.libraryDetails.sourceFunctionList,functionName=sourceFunction.functionName;return sourceFunctionList.filter((function(source){return source.functionName===functionName})).length>1})),_defineProperty(_assertThisInitialized(_this),"isFunctionValid",(function(sourceFunction){return _this.hasComment(sourceFunction)&&!_this.duplicateFunction(sourceFunction)})),_defineProperty(_assertThisInitialized(_this),"boxChecked",(function(sourceFunction){if(_this.isFunctionValid(sourceFunction)){var name=sourceFunction.functionName;_this.setState((function(state){return state.selectedFunctions[name]=!state.selectedFunctions[name],state}),_this.resetErrorMessage)}})),_defineProperty(_assertThisInitialized(_this),"displayFunctions",(function(){var selectedFunctions=_this.state.selectedFunctions;return _this.props.libraryDetails.sourceFunctionList.map((function(sourceFunction){var functionName=sourceFunction.functionName,comment=sourceFunction.comment,checked=selectedFunctions[functionName]||!1,functionId=_lodash.default.uniqueId("".concat(functionName,"-"));return _react.default.createElement("div",{key:functionName},_react.default.createElement("div",{style:styles.functionSelector},_react.default.createElement("input",{style:styles.largerCheckbox,type:"checkbox",id:functionId,disabled:!_this.isFunctionValid(sourceFunction),name:functionName,checked,onChange:function onChange(){return _this.boxChecked(sourceFunction)}}),_react.default.createElement("label",{htmlFor:functionId,style:styles.functionLabel},functionName)),!_this.hasComment(sourceFunction)&&_react.default.createElement("p",{style:styles.alert},_locale.default.libraryExportNoCommentError()),_this.duplicateFunction(sourceFunction)&&_react.default.createElement("p",{style:styles.alert},_locale.default.libraryExportDuplicationFunctionError()),_react.default.createElement("pre",{style:styles.textInput},comment))}))})),_defineProperty(_assertThisInitialized(_this),"displayError",(function(){var errorMessage,_this$state4=_this.state,publishState=_this$state4.publishState,pIIWords=_this$state4.pIIWords,profaneWords=_this$state4.profaneWords;switch(publishState){case PublishState.INVALID_INPUT:errorMessage=_locale.default.libraryPublishInvalid();break;case PublishState.PII_INPUT:errorMessage=_locale.default.libraryDetailsPII({pIICount:pIIWords.length,pIIWords:pIIWords.join(", ")});break;case PublishState.PROFANE_INPUT:errorMessage=_locale.default.libraryDetailsProfanity({profanityCount:profaneWords.length,profaneWords:profaneWords.join(", ")});break;case PublishState.ERROR_PUBLISH:errorMessage=_locale.default.libraryPublishFail();break;case PublishState.TOO_LONG:errorMessage=_locale.default.libraryTooLongFail();break;case PublishState.ERROR_UNPUBLISH:errorMessage=_locale.default.libraryUnPublishFail();break;default:return}return _react.default.createElement("div",null,_react.default.createElement("p",{style:styles.alert},errorMessage))})),_defineProperty(_assertThisInitialized(_this),"unpublish",(function(){var _this$props2=_this.props,libraryClientApi=_this$props2.libraryClientApi,onUnpublishSuccess=_this$props2.onUnpublishSuccess;libraryClientApi.delete((function(){dashboard.project.setLibraryDetails({libraryName:void 0,libraryDescription:void 0,publishing:!1,latestLibraryVersion:-1}),onUnpublishSuccess()}),(function(error){console.warn("Error unpublishing library: ".concat(error)),_this.setState({publishState:PublishState.ERROR_UNPUBLISH})}))})),_defineProperty(_assertThisInitialized(_this),"allFunctionsSelected",(function(){var sourceFunctionList=_this.props.libraryDetails.sourceFunctionList,selectedFunctions=_this.state.selectedFunctions,allSelected=!0;return sourceFunctionList.forEach((function(sourceFunction){!selectedFunctions[sourceFunction.functionName]&&_this.isFunctionValid(sourceFunction)&&(allSelected=!1)})),allSelected})),_defineProperty(_assertThisInitialized(_this),"toggleAllFunctionsSelected",(function(){if(_this.allFunctionsSelected())_this.setState({selectedFunctions:{}});else{var sourceFunctionList=_this.props.libraryDetails.sourceFunctionList,selectedFunctions={};sourceFunctionList.forEach((function(sourceFunction){_this.isFunctionValid(sourceFunction)&&(selectedFunctions[sourceFunction.functionName]=!0)})),_this.setState({selectedFunctions})}}));var initialSelectedFunctions=props.libraryDetails.selectedFunctions,validSelectedFunctions={};return props.libraryDetails.sourceFunctionList.forEach((function(sourceFunction){initialSelectedFunctions[sourceFunction.functionName]&&_this.isFunctionValid(sourceFunction)&&(validSelectedFunctions[sourceFunction.functionName]=!0)})),_this.state={publishState:PublishState.DEFAULT,libraryName:_libraryParser.default.suggestName(props.libraryDetails.libraryName),libraryDescription:props.libraryDetails.libraryDescription,selectedFunctions:validSelectedFunctions,profaneWords:null,pIIWords:null},_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(LibraryPublisher,_React$Component),LibraryPublisher.prototype.render=function render(){var alreadyPublished=this.props.libraryDetails.alreadyPublished,onShareTeacherLibrary=this.props.onShareTeacherLibrary,selectAllCheckboxId=_lodash.default.uniqueId("func-select-all-");return _react.default.createElement("div",null,_react.default.createElement(_Headings.Heading2,null,_locale.default.libraryName()),this.displayNameInput(),_react.default.createElement(_Headings.Heading2,null,_locale.default.description()),this.displayDescription(),_react.default.createElement(_Headings.Heading2,null,_locale.default.catProcedures()),_react.default.createElement("div",{style:styles.functionSelector},_react.default.createElement("input",{style:styles.largerCheckbox,type:"checkbox",id:selectAllCheckboxId,checked:this.allFunctionsSelected(),onChange:this.toggleAllFunctionsSelected}),_react.default.createElement("label",{htmlFor:selectAllCheckboxId,style:styles.selectAllFunctionsLabel},_locale.default.selectAllFunctions())),this.displayFunctions(),_react.default.createElement("div",{style:styles.info},_locale.default.libraryFunctionRequirements()),_react.default.createElement("div",{style:{position:"relative"}},_react.default.createElement(_Button.default,{id:"ui-test-publish-library",style:styles.button,onClick:this.validateAndPublish,text:alreadyPublished?_locale.default.update():_locale.default.publish()}),onShareTeacherLibrary&&_react.default.createElement(_Button.default,{id:"ui-test-manage-libraries",style:_objectSpread(_objectSpread({},styles.button),{},{marginLeft:10}),onClick:onShareTeacherLibrary,text:_locale.default.manageLibraries(),color:_Button.default.ButtonColor.gray}),alreadyPublished&&_react.default.createElement(_Button.default,{id:"ui-test-unpublish-library",style:_objectSpread(_objectSpread({},styles.button),styles.unpublishButton),onClick:this.unpublish,text:_locale.default.unpublish(),color:_Button.default.ButtonColor.red})),this.displayError())},LibraryPublisher}(_react.default.Component);exports.default=LibraryPublisher,_defineProperty(LibraryPublisher,"propTypes",{onPublishSuccess:_propTypes.default.func.isRequired,onUnpublishSuccess:_propTypes.default.func.isRequired,libraryDetails:_propTypes.default.object.isRequired,libraryClientApi:_propTypes.default.object.isRequired,onShareTeacherLibrary:_propTypes.default.func});var styles={alert:{color:_color.default.red,width:"90%",paddingTop:8,fontStyle:"italic"},functionSelector:{display:"flex",alignItems:"center",margin:"10px 10px 10px 0"},largerCheckbox:{width:20,height:20},selectAllFunctionsLabel:{margin:0,fontSize:20,fontFamily:'"Gotham 5r", sans-serif'},functionLabel:{margin:0,fontSize:20},info:{fontSize:12,fontStyle:"italic",lineHeight:1.2},textInput:{fontSize:14,padding:6,color:_color.default.dimgray},description:{width:"98%",resize:"vertical"},unpublishButton:{right:0,position:"absolute"},button:{margin:0,marginTop:20}}},"./src/code-studio/components/libraries/LibraryViewCode.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_Dialog=__webpack_require__("./src/templates/Dialog.jsx"),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var LibraryViewCode=function(_React$Component){function LibraryViewCode(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(LibraryViewCode,_React$Component);var _proto=LibraryViewCode.prototype;return _proto.componentDidMount=function componentDidMount(){this.editor=new droplet.Editor(this.libraryCodeViewer,{mode:"javascript",allowFloatingBlocks:!1,enablePaletteAtStart:!1,textModeAtStart:!0,palette:[]}),this.editor.setValue(this.props.sourceCode),this.editor.setReadOnly(!0)},_proto.render=function render(){var _this=this,_this$props=this.props,title=_this$props.title,description=_this$props.description,onClose=_this$props.onClose,buttons=_this$props.buttons;return _react.default.createElement(_BaseDialog.default,{isOpen:!0,handleClose:onClose,style:styles.dialog,useUpdatedStyles:!0},_react.default.createElement("h1",{style:styles.header},title),_react.default.createElement(_Dialog.Body,null,_react.default.createElement("div",{style:{textAlign:"left"}},_react.default.createElement("p",{style:styles.message},description),_react.default.createElement("div",{className:"libraryCodeViewerContainer",style:styles.code},_react.default.createElement("div",{ref:function ref(node){return _this.libraryCodeViewer=node}})))),buttons)},LibraryViewCode}(_react.default.Component);exports.default=LibraryViewCode,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(LibraryViewCode,"propTypes",{title:_propTypes.default.string.isRequired,description:_propTypes.default.string.isRequired,onClose:_propTypes.default.func.isRequired,sourceCode:_propTypes.default.string.isRequired,buttons:_propTypes.default.node});var styles={dialog:{padding:15},header:{textAlign:"left",fontSize:24,marginTop:5,whiteSpace:"pre-wrap",lineHeight:1.25,textOverflow:"ellipsis",overflow:"hidden"},message:{color:_color.default.dark_charcoal,margin:7,overflow:"auto",whiteSpace:"pre-wrap",fontSize:14,maxHeight:95},code:{position:"relative",height:390,margin:7}};module.exports=exports.default},"./src/code-studio/components/libraries/PublishSuccessDisplay.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_Headings=__webpack_require__("./src/lib/ui/Headings.jsx"),_LibraryIdCopier=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryIdCopier.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var PublishSuccessDisplay=function(_React$Component){function PublishSuccessDisplay(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"render",(function(){var _this$props=_this.props,libraryName=_this$props.libraryName,channelId=_this$props.channelId,onShareTeacherLibrary=_this$props.onShareTeacherLibrary;return _react.default.createElement("div",null,_react.default.createElement(_Headings.Heading2,null,_react.default.createElement("b",null,_locale.default.libraryPublishTitle()),libraryName),_react.default.createElement("div",null,_react.default.createElement("p",null,_locale.default.libraryPublishExplanation()),_react.default.createElement("div",{style:styles.centerContent},_react.default.createElement(_LibraryIdCopier.default,{channelId}),onShareTeacherLibrary&&_react.default.createElement(_Button.default,{color:_Button.default.ButtonColor.gray,onClick:onShareTeacherLibrary,text:_locale.default.manageLibraries()}))))})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PublishSuccessDisplay,_React$Component),PublishSuccessDisplay}(_react.default.Component);exports.default=PublishSuccessDisplay,_defineProperty(PublishSuccessDisplay,"propTypes",{libraryName:_propTypes.default.string.isRequired,channelId:_propTypes.default.string.isRequired,onShareTeacherLibrary:_propTypes.default.func});var styles={centerContent:{display:"flex",justifyContent:"center"}};module.exports=exports.default},"./src/code-studio/components/libraries/ShareTeacherLibraries.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ShareTeacherLibraries=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_SortedTableSelect=_interopRequireDefault(__webpack_require__("./src/code-studio/components/SortedTableSelect.jsx")),_LibraryIdCopier=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/LibraryIdCopier.jsx")),_spinner=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/components/spinner.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js"),_projectsRedux=__webpack_require__("./src/templates/projects/projectsRedux.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function load(_x,_x2,_x3){return _load.apply(this,arguments)};var _libraryParser=_interopRequireDefault(__webpack_require__("./src/code-studio/components/libraries/libraryParser.js")),_annotationList=_interopRequireDefault(__webpack_require__("./src/acemode/annotationList.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function _load(){return(_load=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(libraryClientApi,onError,onSuccess){var projectName,sourceAndHtml,publishedLibrary,getSource,getLibrary;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(!_annotationList.default.getJSLintAnnotations().find((function(annotation){return"error"===annotation.type}))){_context.next=4;break}return onError(_locale.default.libraryCodeError()),_context.abrupt("return");case 4:return projectName=dashboard.project.getLevelName(),getSource=new Promise((function(resolve,reject){dashboard.project.getUpdatedSourceAndHtml_((function(response){sourceAndHtml=response,resolve()}))})),getLibrary=new Promise((function(resolve,reject){libraryClientApi.fetchLatest((function(data){publishedLibrary=JSON.parse(data),resolve()}),(function(_,errorCode){404===errorCode?resolve():reject()}))})),_context.next=9,Promise.all([getSource,getLibrary]).then((function(){var functionsList=_libraryParser.default.getFunctions(sourceAndHtml.source);if(functionsList&&0!==functionsList.length){var librarySource=sourceAndHtml.source;sourceAndHtml.libraries&&sourceAndHtml.libraries.forEach((function(library){librarySource=_libraryParser.default.createLibraryClosure(library)+librarySource}));var description="",selectedFunctions={},alreadyPublished=!1;publishedLibrary&&(alreadyPublished=!0,description=publishedLibrary.description,projectName=publishedLibrary.name,publishedLibrary.functions.forEach((function(publishedFunction){functionsList.find((function(projectFunction){return projectFunction.functionName===publishedFunction}))&&(selectedFunctions[publishedFunction]=!0)}))),onSuccess({libraryName:projectName,libraryDescription:description,librarySource,sourceFunctionList:functionsList,selectedFunctions,alreadyPublished})}else onError(_locale.default.libraryNoFunctionsError())})).catch((function(){return onError(_locale.default.libraryLoadError())}));case 9:case"end":return _context.stop()}}),_callee)})))).apply(this,arguments)}module.exports=exports.default},"./src/code-studio/components/libraries/libraryParser.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createLibraryClosure=createLibraryClosure,exports.createLibraryJson=createLibraryJson,exports.default=void 0,exports.getFunctions=getFunctions,exports.prepareLibraryForImport=prepareLibraryForImport,exports.sanitizeName=sanitizeName,exports.suggestName=suggestName;var _JSInterpreter=__webpack_require__("./src/lib/tools/jsinterpreter/JSInterpreter.js");function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function F(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&(individualConfig.params=currentFunction.parameters,individualConfig.paletteParams=currentFunction.parameters),fullConfig.push(individualConfig)}}catch(err){_iterator.e(err)}finally{_iterator.f()}return fullConfig}(selectedFunctions),functions=selectedFunctions&&selectedFunctions.map((function(func){return func.functionName}));if(config&&functions)return JSON.stringify({name:libraryName,description:libraryDescription,functions,dropletConfig:config,source:code})}}function suggestName(libraryName){var suggestedName=sanitizeName(libraryName);return 0!==suggestedName.length&&isNaN(suggestedName.charAt(0))||(suggestedName="Lib"+suggestedName),suggestedName=suggestedName.charAt(0).toUpperCase()+suggestedName.slice(1)}function sanitizeName(libraryName){return libraryName.replace(/\s+/g,"").replace(/\W/g,"")}var _default={prepareLibraryForImport,getFunctions,createLibraryJson,suggestName,sanitizeName,createLibraryClosure};exports.default=_default},"./src/code-studio/components/playzone.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_CreateSomething=_interopRequireDefault(__webpack_require__("./src/code-studio/components/lessonExtras/CreateSomething.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var PlayZone=function(_React$Component){function PlayZone(props){return _React$Component.call(this,props)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PlayZone,_React$Component),PlayZone.prototype.render=function render(){return _react.default.createElement("div",{style:styles.container},_react.default.createElement("h1",{style:styles.primaryHeader},_locale.default.playzonePrimaryHeader({stageName:this.props.lessonName})),_react.default.createElement("h4",{style:styles.secondaryHeader},_locale.default.playzoneSecondaryHeader()),_react.default.createElement(_CreateSomething.default,null),_react.default.createElement("div",{className:"farSide"},_react.default.createElement("button",{type:"button",id:"ok-button",onClick:this.props.onContinue,style:styles.continueButton},_locale.default.playzoneContinueButton())))},PlayZone}(_react.default.Component);exports.default=PlayZone;var styles={container:{margin:20},primaryHeader:{fontSize:"200%"},secondaryHeader:{color:_color.default.charcoal},courseblockContainer:{width:720,paddingTop:20},continueButton:{marginTop:20,marginRight:0}};PlayZone.propTypes={lessonName:_propTypes.default.string.isRequired,onContinue:_propTypes.default.func.isRequired},module.exports=exports.default},"./src/code-studio/components/playzone.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_playzone=_interopRequireDefault(__webpack_require__("./src/code-studio/components/playzone.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"PlayZone",component:_playzone.default};exports.default=_default;var Default=function Template(args){return _react.default.createElement(_playzone.default,args)}.bind({});exports.Default=Default,Default.args={lessonName:"Test Lesson",onContinue:(0,_addonActions.action)("Selected Continue")}},"./src/code-studio/components/progress/Announcements.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_announcementsRedux=__webpack_require__("./src/code-studio/announcementsRedux.js"),_Notification=_interopRequireDefault(__webpack_require__("./src/templates/Notification.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_viewAsRedux=__webpack_require__("./src/code-studio/viewAsRedux.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var Announcements=function(_Component){function Announcements(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_Component.call.apply(_Component,[this].concat(args))||this),"filteredAnnouncements",(function(){var currentView=_this.props.viewAs;return _this.props.announcements.filter((function(element){return _this.isVisible(currentView,element)}))})),_defineProperty(_assertThisInitialized(_this),"isVisible",(function(currentView,element){return element.visibility===_announcementsRedux.VisibilityType.teacherAndStudent||currentView===_viewAsRedux.ViewType.Instructor&&(element.visibility===_announcementsRedux.VisibilityType.teacher||void 0===element.visibility)||currentView===_viewAsRedux.ViewType.Participant&&element.visibility===_announcementsRedux.VisibilityType.student})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(Announcements,_Component),Announcements.prototype.render=function render(){var _this2=this;return _react.default.createElement("div",null,this.filteredAnnouncements().map((function(announcement,index){return _react.default.createElement(_Notification.default,{key:index,type:announcement.type,notice:announcement.notice,details:announcement.details,buttonText:void 0===announcement.buttonText?_locale.default.learnMore():announcement.buttonText,buttonLink:announcement.link,dismissible:void 0===announcement.dismissible||announcement.dismissible,width:_this2.props.width,firehoseAnalyticsData:_this2.props.firehoseAnalyticsData})})))},Announcements}(_react.Component);exports.default=Announcements,_defineProperty(Announcements,"propTypes",{announcements:_propTypes.default.arrayOf(_announcementsRedux.announcementShape).isRequired,width:_propTypes.default.oneOfType([_propTypes.default.number,_propTypes.default.string]),viewAs:_propTypes.default.oneOf(Object.values(_viewAsRedux.ViewType)).isRequired,firehoseAnalyticsData:_propTypes.default.object}),module.exports=exports.default},"./src/code-studio/components/progress/LessonProgress.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedLessonProgress=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_LessonExtrasProgressBubble=_interopRequireDefault(__webpack_require__("./src/templates/progress/LessonExtrasProgressBubble.jsx")),_progressRedux=__webpack_require__("./src/code-studio/progressRedux.ts"),_progressReduxSelectors=__webpack_require__("./src/code-studio/progressReduxSelectors.js"),_ProgressBubble=_interopRequireDefault(__webpack_require__("./src/templates/progress/ProgressBubble.jsx")),_progressTypes=__webpack_require__("./src/templates/progress/progressTypes.js"),_sharedConstants=__webpack_require__("./src/util/sharedConstants.js"),_browserNavigation=__webpack_require__("./src/code-studio/browserNavigation.js"),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0?component.width():0},_proto.setDesiredWidth=function setDesiredWidth(){this.props.setDesiredWidth&&this.props.setDesiredWidth(this.getFullWidth())},_proto.componentDidMount=function componentDidMount(){this.setDesiredWidth()},_proto.componentDidUpdate=function componentDidUpdate(){this.setDesiredWidth()},_proto.shouldComponentUpdate=function shouldComponentUpdate(nextProps){for(var levelIndex=0;levelIndexactualWidth){var desiredOffset=actualWidth/2-currentLevelOffset-17,vignetteStyle=styles.headerVignetteLeftRight;return desiredOffset+fullWidth0&&(desiredOffset=0,vignetteStyle=styles.headerVignetteRight),{headerFullProgressOffset:desiredOffset,vignetteStyle:_objectSpread(_objectSpread({},styles.headerVignette),vignetteStyle)}}}return{headerFullProgressOffset:0,vignetteStyle:null}},_proto.isBonusComplete=function isBonusComplete(){return this.props.levels.some((function(level){return level.bonus&&level.status===_sharedConstants.LevelStatus.perfect}))},_proto.isOnBonusLevel=function isOnBonusLevel(){var _this$props=this.props,isLessonExtras=_this$props.isLessonExtras,levels=_this$props.levels,currentLevelId=_this$props.currentLevelId;return isLessonExtras||levels.some((function(level){return level.id===currentLevelId&&level.bonus}))},_proto.render=function render(){var _this$props2=this.props,currentPageNumber=_this$props2.currentPageNumber,lessonExtrasUrl=_this$props2.lessonExtrasUrl,lessonName=_this$props2.lessonName,navigateToLevelId=_this$props2.navigateToLevelId,levels=this.props.levels;levels=levels.filter((function(level){return!level.bonus}));var _this$getFullProgress=this.getFullProgressOffset(),headerFullProgressOffset=_this$getFullProgress.headerFullProgressOffset,vignetteStyle=_this$getFullProgress.vignetteStyle,onBonusLevel=this.isOnBonusLevel(),currentLevel=levels.find((function(level){return level.isCurrentLevel}));return _react.default.createElement("div",{className:"react_stage",style:styles.container},_react.default.createElement("div",{className:"full_progress_outer",style:_objectSpread(_objectSpread({},styles.outer),{},{left:headerFullProgressOffset})},_react.default.createElement("div",{className:"full_progress_inner",ref:"fullProgressInner",style:styles.inner},levels.map((function(level,index){var isCurrent=level.isCurrentLevel;isCurrent&&level.kind===_sharedConstants.LevelKind.assessment&&(isCurrent=currentPageNumber===level.pageNumber);var onBubbleClick=(0,_browserNavigation.canChangeLevelInPage)(currentLevel,level)?function(){return navigateToLevelId(level.id)}:void 0;return _react.default.createElement("div",{key:index,ref:isCurrent?"currentLevel":null,style:_objectSpread(_objectSpread({},styles.inner),level.isUnplugged&&isCurrent&&styles.pillContainer)},_react.default.createElement(_ProgressBubble.default,{level,disabled:!1,smallBubble:!isCurrent,lessonName,onClick:onBubbleClick}))})),lessonExtrasUrl&&_react.default.createElement("div",{ref:onBonusLevel?"currentLevel":null},_react.default.createElement(_LessonExtrasProgressBubble.default,{lessonExtrasUrl,isPerfect:this.isBonusComplete(),isSelected:onBonusLevel})))),_react.default.createElement("div",{className:"vignette",style:vignetteStyle}))},LessonProgress}(_react.Component);_defineProperty(LessonProgress,"propTypes",{levels:_propTypes.default.arrayOf(_progressTypes.levelWithProgressType).isRequired,lessonName:_propTypes.default.string,lessonExtrasUrl:_propTypes.default.string,isLessonExtras:_propTypes.default.bool,width:_propTypes.default.number,setDesiredWidth:_propTypes.default.func,currentPageNumber:_propTypes.default.number,currentLevelId:_propTypes.default.string,navigateToLevelId:_propTypes.default.func});var styles={container:{backgroundColor:_color.default.lightest_gray,border:"1px solid ".concat(_color.default.lighter_gray),borderRadius:5,height:40,position:"relative",overflow:"hidden"},outer:{position:"absolute",paddingLeft:4,paddingRight:4,height:"100%",whiteSpace:"nowrap"},inner:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},headerVignette:{width:"100%",height:"100%",position:"absolute",pointerEvents:"none"},headerVignetteLeftRight:{background:"linear-gradient(to right, rgba(231, 232, 234, 1) 0%, rgba(231, 232, 234, 0) 20px, rgba(231, 232, 234, 0) calc(100% - 20px), rgba(231, 232, 234, 1) 100%)"},headerVignetteLeft:{background:"linear-gradient(to right, rgba(231, 232, 234, 1) 0%, rgba(231, 232, 234, 0) 20px"},headerVignetteRight:{background:"linear-gradient(to right, rgba(231, 232, 234, 0) calc(100% - 20px), rgba(231, 232, 234, 1) 100%)"},spacer:{marginRight:"auto"},lessonTrophyContainer:{border:0,borderRadius:20,paddingLeft:8,paddingRight:0,minWidth:350,marginLeft:48},pillContainer:{paddingTop:4,paddingBottom:4}},UnconnectedLessonProgress=LessonProgress;exports.UnconnectedLessonProgress=UnconnectedLessonProgress;var _default=(0,_reactRedux.connect)((function(state){return{levels:(0,_progressReduxSelectors.levelsForLessonId)(state.progress,state.progress.currentLessonId),lessonExtrasUrl:(0,_progressReduxSelectors.lessonExtrasUrl)(state.progress,state.progress.currentLessonId),isLessonExtras:state.progress.isLessonExtras,currentPageNumber:state.progress.currentPageNumber,currentLevelId:state.progress.currentLevelId}}),(function(dispatch){return{navigateToLevelId:function navigateToLevelId(levelId){dispatch((0,_progressRedux.navigateToLevelId)(levelId))}}}))(LessonProgress);exports.default=_default},"./src/code-studio/components/progress/LessonProgress.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnpluggedAsNonCurrent=exports.UnpluggedAsCurrent=exports.LessonProgressExample=exports.LessonMasteryTrophy=exports.LessonExtrasNotStarted=exports.LessonExtrasCurrentLevelNotStarted=exports.LessonExtrasCurrentLevelCompleted=exports.LessonExtrasCompleted=exports.LessonEmptyTrophy=exports.Lesson67PercentTrophy=exports.Lesson20PercentTrophy=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_redux=__webpack_require__("./node_modules/redux/es/redux.js"),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_LessonProgress=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/LessonProgress.jsx")),_lessonLockRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/lessonLockRedux.js")),_progressRedux=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/code-studio/progressRedux.ts")),_constants=__webpack_require__("./src/constants.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var activityPuzzle={ids:["123"],activeId:"123",position:1,kind:"puzzle",icon:"",title:1,url:"http://studio.code.org/s/course1/lessons/3/levels/2",freePlay:!1,is_concept_level:!1},conceptPuzzle={ids:["5086"],activeId:"5086",position:2,kind:"puzzle",icon:"fa-file-text",title:2,url:"http://studio.code.org/s/csp1-2019/lessons/2/levels/1",freePlay:!1,progression:"Lesson Vocabulary & Resources",is_concept_level:!0},assessment1={ids:["2441"],activeId:"2441",position:3,kind:"assessment",icon:"fa-check-square-o",title:3,url:"http://studio.code.org/s/csp1-2019/lessons/2/levels/3",freePlay:!1,progression:"Check Your Understanding"},unplugged={ids:["2093"],activeId:"2093",is_concept_level:!1,kind:"unplugged",isUnplugged:!0,position:1,title:1,url:"http://studio.code.org/s/course1/lessons/1/levels/1"},bonus={ids:["100"],activeId:"100",title:1,bonus:!0},_default={title:"LessonProgress",component:_LessonProgress.default};exports.default=_default;var createStoreForLevels=function createStoreForLevels(levels,currentLevelIndex,showLessonExtras,onLessonExtras,bonusCompleted){var store=(0,_redux.createStore)((0,_redux.combineReducers)({progress:_progressRedux.default,lessonLock:_lessonLockRedux.default}));store.dispatch((0,_progressRedux.initProgress)({currentLevelId:currentLevelIndex?levels[currentLevelIndex].ids[0].toString():null,isLessonExtras:onLessonExtras,scriptName:"csp1",saveAnswersBeforeNavigation:!1,lessons:[{id:123,lesson_extras_level_url:showLessonExtras&&"fakeurl",levels}]}));var results={123:_constants.TestResults.ALL_PASS};return bonusCompleted&&(results[100]=_constants.TestResults.ALL_PASS),store.dispatch((0,_progressRedux.mergeResults)(results)),store.dispatch((0,_progressRedux.setLessonExtrasEnabled)(showLessonExtras)),store},Template=function Template(args){return _react.default.createElement(_reactRedux.Provider,{store:args.store},_react.default.createElement(_LessonProgress.default,null))},LessonProgressExample=Template.bind({});exports.LessonProgressExample=LessonProgressExample,LessonProgressExample.args={store:createStoreForLevels([activityPuzzle,conceptPuzzle,assessment1,{ids:["2444"],activeId:"2444",position:4,kind:"assessment",icon:"fa-check-square-o",title:4,url:"http://studio.code.org/s/csp1-2019/lessons/2/levels/4",freePlay:!1,progression:"Check Your Understanding"},{ids:["2744"],activeId:"2744",position:5,kind:"assessment",icon:"fa-check-square-o",title:5,url:"http://studio.code.org/s/csp1-2019/lessons/2/levels/5",freePlay:!1,progression:"Check Your Understanding"}],4)};var UnpluggedAsCurrent=Template.bind({});exports.UnpluggedAsCurrent=UnpluggedAsCurrent,UnpluggedAsCurrent.args={store:createStoreForLevels([unplugged,assessment1],0)};var UnpluggedAsNonCurrent=Template.bind({});exports.UnpluggedAsNonCurrent=UnpluggedAsNonCurrent,UnpluggedAsNonCurrent.args={store:createStoreForLevels([unplugged,assessment1],1)};var LessonExtrasNotStarted=Template.bind({});exports.LessonExtrasNotStarted=LessonExtrasNotStarted,LessonExtrasNotStarted.args={store:createStoreForLevels([activityPuzzle,conceptPuzzle],1,!0,!1)};var LessonExtrasCompleted=Template.bind({});exports.LessonExtrasCompleted=LessonExtrasCompleted,LessonExtrasCompleted.args={store:createStoreForLevels([activityPuzzle,conceptPuzzle,bonus],1,!0,!1,!0)};var LessonExtrasCurrentLevelNotStarted=Template.bind({});exports.LessonExtrasCurrentLevelNotStarted=LessonExtrasCurrentLevelNotStarted,LessonExtrasCurrentLevelNotStarted.args={store:createStoreForLevels([activityPuzzle,conceptPuzzle],null,!0,!0)};var LessonExtrasCurrentLevelCompleted=Template.bind({});exports.LessonExtrasCurrentLevelCompleted=LessonExtrasCurrentLevelCompleted,LessonExtrasCurrentLevelCompleted.args={store:createStoreForLevels([activityPuzzle,conceptPuzzle,bonus],null,!0,!0,!0)};var LessonEmptyTrophy=Template.bind({});exports.LessonEmptyTrophy=LessonEmptyTrophy,LessonEmptyTrophy.args={store:createStoreForLevels([assessment1,assessment1],0,!1,!0)};var Lesson20PercentTrophy=Template.bind({});exports.Lesson20PercentTrophy=Lesson20PercentTrophy,Lesson20PercentTrophy.args={store:createStoreForLevels([activityPuzzle,assessment1,assessment1,assessment1,assessment1],0,!1,!0)};var Lesson67PercentTrophy=Template.bind({});exports.Lesson67PercentTrophy=Lesson67PercentTrophy,Lesson67PercentTrophy.args={store:createStoreForLevels([activityPuzzle,activityPuzzle,assessment1],0,!1,!0)};var LessonMasteryTrophy=Template.bind({});exports.LessonMasteryTrophy=LessonMasteryTrophy,LessonMasteryTrophy.args={store:createStoreForLevels([activityPuzzle,activityPuzzle,activityPuzzle],0,!1,!0)}},"./src/code-studio/components/progress/MiniView.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedMiniView=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_MiniViewTopRow=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/MiniViewTopRow.jsx")),_progressReduxSelectors=__webpack_require__("./src/code-studio/progressReduxSelectors.js"),_ProgressTable=_interopRequireDefault(__webpack_require__("./src/templates/progress/ProgressTable.jsx")),_GoogleClassroomAttributionLabel=_interopRequireDefault(__webpack_require__("./src/templates/progress/GoogleClassroomAttributionLabel.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_ProgressDetailToggle=_interopRequireDefault(__webpack_require__("./src/templates/progress/ProgressDetailToggle.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_utils=__webpack_require__("./src/utils.js"),_utils2=__webpack_require__("./src/code-studio/utils.js"),_redux=__webpack_require__("./src/redux.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var MiniViewTopRow=function(_React$Component){function MiniViewTopRow(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(MiniViewTopRow,_React$Component),MiniViewTopRow.prototype.render=function render(){var _this$props=this.props,scriptName=_this$props.scriptName,selectedSectionId=_this$props.selectedSectionId,isRtl=(0,_redux.getStore)().getState().isRtl,sectionId=(0,_utils2.queryParams)("section_id");switch(!0){case!!selectedSectionId:(0,_utils2.updateQueryParam)("section_id",selectedSectionId);break;case!!sectionId&&"undefined"!==sectionId:(0,_utils2.updateQueryParam)("section_id",sectionId);break;default:(0,_utils2.updateQueryParam)("section_id",void 0)}var params=(0,_utils.stringifyQueryParams)((0,_utils2.queryParams)());return _react.default.createElement("div",{style:styles.main},_react.default.createElement(_Button.default,{__useDeprecatedTag:!0,text:_locale.default.viewUnitOverview(),href:"/s/".concat(scriptName).concat(params),color:_Button.default.ButtonColor.gray,style:isRtl?styles.buttonRtl:styles.button}),_react.default.createElement("div",{style:isRtl?styles.toggleRtl:styles.toggle},_react.default.createElement(_ProgressDetailToggle.default,{activeColor:_color.default.teal,whiteBorder:!0,toggleStudyGroup:"mini-view"})))},MiniViewTopRow}(_react.default.Component);exports.default=MiniViewTopRow,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(MiniViewTopRow,"propTypes",{scriptName:_propTypes.default.string.isRequired,selectedSectionId:_propTypes.default.number});var styles={main:{fontSize:16,backgroundColor:_color.default.teal,color:_color.default.white,padding:15,marginBottom:0,height:34,lineHeight:"34px"},button:{position:"absolute",left:15},buttonRtl:{position:"absolute",right:15},toggle:{position:"absolute",top:10,right:15},toggleRtl:{position:"absolute",top:10,left:15,direction:"ltr"}};module.exports=exports.default},"./src/code-studio/components/progress/MiniViewTopRow.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_MiniViewTopRow=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/MiniViewTopRow.jsx")),_progressRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/progressRedux.ts")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_decorators=__webpack_require__("./.storybook/decorators.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var initialState={progress:{lessonGroups:[],lessons:[{levels:[]}],focusAreaLessonIds:[],isSummaryView:!1,deeperLearningCourse:!1}},_default={title:"MiniViewTopRow",component:_MiniViewTopRow.default};exports.default=_default;var Default=function Template(args){return _react.default.createElement(_reactRedux.Provider,{store:(0,_decorators.reduxStore)({progress:_progressRedux.default},initialState)},_react.default.createElement("div",{style:{width:635,position:"relative"}},_react.default.createElement(_MiniViewTopRow.default,args)))}.bind({});exports.Default=Default,Default.args={scriptName:"course1"}},"./src/code-studio/components/progress/ResourcesDropdown.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_DropdownButton=_interopRequireDefault(__webpack_require__("./src/templates/DropdownButton.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_shapes=__webpack_require__("./src/lib/levelbuilder/shapes.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ResourcesDropdown=function(_React$Component){function ResourcesDropdown(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleDropdownClick",(function(){var study=_this.props.studentFacing?"student-resources":"teacher-resources";_this.props.unitGroupId?_this.recordFirehose(study,"unit-group","click-dropdown",{unitGroupId:_this.props.unitGroupId}):_this.props.unitId&&_this.recordFirehose(study,"unit","click-dropdown",{unitId:_this.props.unitId})})),_defineProperty(_assertThisInitialized(_this),"handleItemClick",(function(e,resource){e.preventDefault();var study=_this.props.studentFacing?"student-resources":"teacher-resources",resourceKey=resource.key,resourceUrl=resource.url,callback=function callback(){window.open(resourceUrl,"noopener","noreferrer")};_this.props.unitGroupId?_this.recordFirehose(study,"unit-group","click-resource",{unitGroupId:_this.props.unitGroupId,resourceKey},callback):_this.props.unitId&&_this.recordFirehose(study,"unit","click-resource",{unitId:_this.props.unitId,resourceKey},callback)})),_defineProperty(_assertThisInitialized(_this),"recordFirehose",(function(study,study_group,event,data_json,callback){_firehose.default.putRecord({study,study_group,event,data_json:JSON.stringify(data_json)},{includeUserId:!0,callback})})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ResourcesDropdown,_React$Component),ResourcesDropdown.prototype.render=function render(){var _this2=this,dropdownResources=this.props.resources.map((function(resource){return _react.default.createElement("a",{key:resource.key,href:resource.url,onClick:function onClick(e){return _this2.handleItemClick(e,resource)}},resource.name)}));return _react.default.createElement("div",{style:styles.dropdown},_react.default.createElement(_DropdownButton.default,{text:this.props.studentFacing?_locale.default.studentResources():_locale.default.teacherResources(),color:this.props.studentFacing?_Button.default.ButtonColor.gray:_Button.default.ButtonColor.blue,size:this.props.studentFacing?_Button.default.ButtonSize.large:_Button.default.ButtonSize.default,onClick:this.handleDropdownClick},dropdownResources))},ResourcesDropdown}(_react.default.Component);exports.default=ResourcesDropdown,_defineProperty(ResourcesDropdown,"propTypes",{resources:_propTypes.default.arrayOf(_shapes.resourceShape).isRequired,studentFacing:_propTypes.default.bool,unitGroupId:_propTypes.default.number,unitId:_propTypes.default.number});var styles={dropdown:{display:"inline-block",marginRight:5}};module.exports=exports.default},"./src/code-studio/components/progress/ResourcesDropdown.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.MigratedTeacherResources=exports.MigratedStudentResources=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ResourcesDropdown=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/ResourcesDropdown.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedSectionSelector=exports.NO_SELECTED_SECTION_VALUE=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_utils=__webpack_require__("./src/code-studio/utils.js"),_utils2=__webpack_require__("./src/utils.js"),_teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedViewAsToggle=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_ToggleGroup=_interopRequireDefault(__webpack_require__("./src/templates/ToggleGroup.jsx")),_viewAsRedux=__webpack_require__("./src/code-studio/viewAsRedux.js"),_utils=__webpack_require__("./src/code-studio/utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ViewAsToggle=function(_React$Component){function ViewAsToggle(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"toggleHideAsStudent",(function(viewAs){(0,_jquery.default)(".hide-as-student").toggle(viewAs===_viewAsRedux.ViewType.Instructor)})),_defineProperty(_assertThisInitialized(_this),"onChange",(function(viewType){var _this$props=_this.props,changeViewType=_this$props.changeViewType,logToFirehose=_this$props.logToFirehose;(0,_utils.updateQueryParam)("viewAs",viewType),changeViewType(viewType),logToFirehose&&logToFirehose("toggle_view",{view_type:viewType})})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ViewAsToggle,_React$Component);var _proto=ViewAsToggle.prototype;return _proto.componentDidMount=function componentDidMount(){this.toggleHideAsStudent(this.props.viewAs)},_proto.UNSAFE_componentWillReceiveProps=function UNSAFE_componentWillReceiveProps(nextProps){nextProps.viewAs!==this.props.viewAs&&this.toggleHideAsStudent(nextProps.viewAs)},_proto.render=function render(){var viewAs=this.props.viewAs;return _react.default.createElement("div",{className:"non-scrollable-wrapper",style:styles.main},_react.default.createElement("div",{style:styles.viewAs},_locale.default.viewPageAs()),_react.default.createElement("div",{style:styles.toggleGroup},_react.default.createElement(_ToggleGroup.default,{selected:viewAs,onChange:this.onChange},_react.default.createElement("button",{type:"button",className:"uitest-viewAsStudent",value:_viewAsRedux.ViewType.Participant},_locale.default.student()),_react.default.createElement("button",{type:"button",className:"uitest-viewAsTeacher",value:_viewAsRedux.ViewType.Instructor},_locale.default.teacher()))))},ViewAsToggle}(_react.default.Component);_defineProperty(ViewAsToggle,"propTypes",{viewAs:_propTypes.default.oneOf(Object.values(_viewAsRedux.ViewType)).isRequired,changeViewType:_propTypes.default.func.isRequired,logToFirehose:_propTypes.default.func});var styles={main:{textAlign:"center"},viewAs:{fontSize:16,margin:10},toggleGroup:{margin:10}},UnconnectedViewAsToggle=ViewAsToggle;exports.UnconnectedViewAsToggle=UnconnectedViewAsToggle;var _default=(0,_reactRedux.connect)((function(state){return{viewAs:state.viewAs}}),(function(dispatch){return{changeViewType:function changeViewType(viewAs){dispatch((0,_viewAsRedux.changeViewType)(viewAs))}}}))(UnconnectedViewAsToggle);exports.default=_default},"./src/code-studio/components/progress/lessonLockDialog/LessonLockDataApi.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LockStatus=void 0,exports.saveLockState=function saveLockState(previousLockState,newLockState,csrfToken){var lockStateChanges=newLockState.filter((function(item,index){return!_lodash.default.isEqual(item,previousLockState[index])})).map((function(item){return{user_level_data:item.userLevelData,locked:item.lockStatus===LockStatus.Locked,readonly_answers:item.lockStatus===LockStatus.ReadonlyAnswers}}));return fetch("/api/lock_status",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":csrfToken},credentials:"same-origin",body:JSON.stringify({updates:lockStateChanges})})},exports.useGetLockState=function useGetLockState(unitId,lessonId,sectionId){var _useFetch=(0,_useFetch2.useFetch)("/api/lock_status?script_id=".concat(unitId)),loading=_useFetch.loading,data=_useFetch.data,serverLockState=(0,_react.useMemo)((function(){return function extractLockData(serverLockState,sectionId,lessonId){var lessonData=serverLockState&&serverLockState[sectionId]&&serverLockState[sectionId].lessons&&serverLockState[sectionId].lessons[lessonId];if(!lessonData)return[];return lessonData.map((function(studentData){return{name:studentData.name,lockStatus:toLockStatus(studentData),userLevelData:studentData.user_level_data}}))}(data,sectionId,lessonId)}),[data,sectionId,lessonId]);return{loading,serverLockState}};var _react=__webpack_require__("./node_modules/react/index.js"),_lodash=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/lodash/lodash.js")),_utils=__webpack_require__("./src/utils.js"),_useFetch2=__webpack_require__("./src/util/useFetch.js");var LockStatus=(0,_utils.makeEnum)("Locked","Editable","ReadonlyAnswers");function toLockStatus(lockData){return lockData.locked?LockStatus.Locked:lockData.readonly_answers?LockStatus.ReadonlyAnswers:LockStatus.Editable}exports.LockStatus=LockStatus},"./src/code-studio/components/progress/lessonLockDialog/LessonLockDialog.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedLessonLockDialog=void 0;var _react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_BaseDialog=_interopRequireDefault(__webpack_require__("./src/templates/BaseDialog.jsx")),_progressStyles=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/progressStyles.js")),_lessonLockRedux=__webpack_require__("./src/code-studio/lessonLockRedux.js"),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_SectionSelector=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/SectionSelector.jsx")),_teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js"),_urlHelpers=__webpack_require__("./src/templates/teacherDashboard/urlHelpers.js"),_LessonLockDataApi=__webpack_require__("./src/code-studio/components/progress/lessonLockDialog/LessonLockDataApi.js"),_StudentRow=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/lessonLockDialog/StudentRow.jsx")),_SkeletonRows=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/lessonLockDialog/SkeletonRows.jsx")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_loadingSkeleton=_interopRequireDefault(__webpack_require__("./src/util/loadingSkeleton.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var SkeletonRows=function SkeletonRows(_ref){var numRows=_ref.numRows,numCols=_ref.numCols;return _lodash.default.times(numRows,(function(rowIndex){return _react.default.createElement("tr",{key:rowIndex},_lodash.default.times(numCols,(function(colIndex){return _react.default.createElement("td",{key:colIndex,style:styles.tableCell},_react.default.createElement(_loadingSkeleton.default,null))})))}))};SkeletonRows.propTypes={numRows:_propTypes.default.number.isRequired,numCols:_propTypes.default.number.isRequired};var styles={tableCell:{borderWidth:1,borderStyle:"solid",borderColor:_color.default.light_gray,padding:10}},_default=SkeletonRows;exports.default=_default,module.exports=exports.default},"./src/code-studio/components/progress/lessonLockDialog/StudentRow.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_LessonLockDataApi=__webpack_require__("./src/code-studio/components/progress/lessonLockDialog/LessonLockDataApi.js"),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.createOutline=void 0;var _color=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./src/util/color.js"));exports.createOutline=function createOutline(color){return"\n ".concat(color," 0 1px,\n ").concat(color," 1px 1px,\n ").concat(color," 1px 0px,\n ").concat(color," 1px -1px,\n ").concat(color," 0 -1px,\n ").concat(color," -1px -1px,\n ").concat(color," -1px 0,\n ").concat(color," -1px 1px")};var baseButtonStyle={fontSize:14,paddingTop:5,paddingBottom:5,paddingLeft:10,paddingRight:10,whiteSpace:"nowrap"},_default={baseButton:baseButtonStyle,blueButton:Object.assign({},baseButtonStyle,{backgroundColor:_color.default.cyan,color:_color.default.white}),orangeButton:Object.assign({},baseButtonStyle,{backgroundColor:_color.default.orange,color:_color.default.white}),whiteButton:Object.assign({},baseButtonStyle,{backgroundColor:_color.default.white,color:_color.default.dark_charcoal,borderColor:_color.default.lighter_gray})};exports.default=_default},"./src/code-studio/components/progress/teacherPanel/SelectedStudentInfo.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_sharedConstants=__webpack_require__("./src/util/sharedConstants.js"),_radium=_interopRequireDefault(__webpack_require__("./node_modules/radium/es/index.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_ProgressBubble=_interopRequireDefault(__webpack_require__("./src/templates/progress/ProgressBubble.jsx")),_SelectedStudentPairing=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/teacherPanel/SelectedStudentPairing.jsx")),_types=__webpack_require__("./src/code-studio/components/progress/teacherPanel/types.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var RadiumFontAwesome=(0,_radium.default)(_FontAwesome.default),SelectedStudentInfo=function(_React$Component){function SelectedStudentInfo(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"onUnsubmit",(function(userLevelId){$.ajax({url:"/user_levels/".concat(userLevelId),method:"PUT",data:{user_level:{best_result:1,submitted:!1}}}).done((function(data){location.reload()})).fail((function(err){return console.error(err)}))})),_defineProperty(_assertThisInitialized(_this),"nextStudent",(function(){var _this$props=_this.props,students=_this$props.students,selectedUserId=_this$props.selectedUserId,onSelectUser=_this$props.onSelectUser,currentStudentIndex=students.findIndex((function(student){return student.id===selectedUserId}));currentStudentIndex===students.length-1?onSelectUser(null):onSelectUser(students[currentStudentIndex+1].id)})),_defineProperty(_assertThisInitialized(_this),"previousStudent",(function(){var _this$props2=_this.props,students=_this$props2.students,selectedUserId=_this$props2.selectedUserId,onSelectUser=_this$props2.onSelectUser,currentStudentIndex=students.findIndex((function(student){return student.id===selectedUserId}));onSelectUser(0===currentStudentIndex?null:-1===currentStudentIndex?students[students.length-1].id:students[currentStudentIndex-1].id)})),_defineProperty(_assertThisInitialized(_this),"getSelectedUser",(function(){var _this$props3=_this.props,students=_this$props3.students,selectedUserId=_this$props3.selectedUserId,teacherId=_this$props3.teacherId,currentStudent=students.find((function(student){return selectedUserId===student.id}));return currentStudent||{id:teacherId,name:_locale.default.studentTableTeacherDemo()}})),_defineProperty(_assertThisInitialized(_this),"getLevelWithProgressForUser",(function(userId){var levelsWithProgress=_this.props.levelsWithProgress;return levelsWithProgress?levelsWithProgress.find((function(level){return userId===level.userId})):null})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(SelectedStudentInfo,_React$Component),SelectedStudentInfo.prototype.render=function render(){var _this2=this,selectedStudent=this.getSelectedUser(),levelWithProgress=this.getLevelWithProgressForUser(selectedStudent.id);if(!levelWithProgress)return _react.default.createElement("div",{style:styles.main},_react.default.createElement(RadiumFontAwesome,{icon:"caret-left",onClick:this.previousStudent,style:styles.arrow}),_react.default.createElement("div",{style:styles.studentInfo},_react.default.createElement("div",{style:styles.name},selectedStudent.name)),_react.default.createElement(RadiumFontAwesome,{icon:"caret-right",onClick:this.nextStudent,style:styles.arrow}));var paired=levelWithProgress.paired,submitLevel=levelWithProgress.submitLevel,status=levelWithProgress.status,updatedAt=levelWithProgress.updatedAt,partnerNames=levelWithProgress.partnerNames,partnerCount=levelWithProgress.partnerCount;return _react.default.createElement("div",{style:styles.main},_react.default.createElement(RadiumFontAwesome,{icon:"caret-left",onClick:this.previousStudent,style:styles.arrow}),_react.default.createElement("div",{style:styles.studentInfo},_react.default.createElement("div",{style:styles.name},selectedStudent.name),paired&&_react.default.createElement(_SelectedStudentPairing.default,{partnerNames,partnerCount}),_react.default.createElement("div",{style:styles.bubble},_react.default.createElement(_ProgressBubble.default,{level:levelWithProgress,disabled:!0,hideTooltips:!0,hideAssessmentBadge:!0})),!submitLevel&&_react.default.createElement("div",null,_react.default.createElement("div",{style:styles.timeHeader},_locale.default.lastUpdatedNoTime()),_react.default.createElement("div",null,status!==_sharedConstants.LevelStatus.not_tried&&updatedAt?new Date(updatedAt).toLocaleString():_locale.default.notApplicable())),submitLevel&&_react.default.createElement("div",null,_react.default.createElement("div",{style:styles.timeHeader},_locale.default.submittedOn()),_react.default.createElement("div",null,status===_sharedConstants.LevelStatus.submitted?new Date(updatedAt).toLocaleString():_locale.default.notApplicable()),_react.default.createElement(_Button.default,{text:_locale.default.unsubmit(),color:"blue",onClick:function onClick(){return _this2.onUnsubmit(levelWithProgress.userLevelId)},id:"unsubmit-button-uitest",disabled:status!==_sharedConstants.LevelStatus.submitted}))),_react.default.createElement(RadiumFontAwesome,{icon:"caret-right",onClick:this.nextStudent,style:styles.arrow}))},SelectedStudentInfo}(_react.default.Component);exports.default=SelectedStudentInfo,_defineProperty(SelectedStudentInfo,"propTypes",{students:_propTypes.default.arrayOf(_types.studentShape).isRequired,onSelectUser:_propTypes.default.func.isRequired,selectedUserId:_propTypes.default.number,teacherId:_propTypes.default.number,levelsWithProgress:_propTypes.default.arrayOf(_types.levelWithProgress)});var styles={main:{display:"flex",justifyContent:"center",flexDirection:"row"},studentInfo:{minHeight:80,width:150,textAlign:"center",display:"flex",alignItems:"center",flexDirection:"column"},bubble:{marginLeft:0},name:{fontFamily:'"Gotham 5r", sans-serif',fontWeight:"bold",fontSize:15},timeHeader:{fontFamily:'"Gotham 5r", sans-serif',fontWeight:"bold"},arrow:{fontSize:40,cursor:"pointer",position:"relative",top:30},button:{margin:0,boxShadow:"inset 0 2px 0 0 rgb(255 255 255 / 40%)"}};module.exports=exports.default},"./src/code-studio/components/progress/teacherPanel/SelectedStudentPairing.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_Tooltip=_interopRequireDefault(__webpack_require__("./src/templates/Tooltip.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var SelectedStudentPairing=function SelectedStudentPairing(_ref){var partnerNames=_ref.partnerNames,partnerCount=_ref.partnerCount;return _react.default.createElement("div",null,_react.default.createElement("div",null,_locale.default.workedWith()),function renderPartners(){if(0===partnerNames.length)return _react.default.createElement("div",null,_locale.default.otherStudents({count:partnerCount}));if(1===partnerNames.length&&1===partnerCount)return _react.default.createElement("div",null,partnerNames[0]);var tooltipText=partnerNames.join(", "),unknownPartnersCount=partnerCount-partnerNames.length;return unknownPartnersCount>0&&(tooltipText+=" + "+_locale.default.otherStudents({count:unknownPartnersCount})),_react.default.createElement(_Tooltip.default,{text:tooltipText,place:"bottom"},_react.default.createElement("div",null,partnerNames[0]+" + "+(partnerCount-1)))}())};SelectedStudentPairing.propTypes={partnerNames:_propTypes.default.array,partnerCount:_propTypes.default.number};var _default=SelectedStudentPairing;exports.default=_default,module.exports=exports.default},"./src/code-studio/components/progress/teacherPanel/StudentTable.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedStudentTable=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_radium=_interopRequireDefault(__webpack_require__("./node_modules/radium/es/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_ProgressBubble=_interopRequireDefault(__webpack_require__("./src/templates/progress/ProgressBubble.jsx")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_types=__webpack_require__("./src/code-studio/components/progress/teacherPanel/types.js"),_stringKeyComparator=_interopRequireDefault(__webpack_require__("./src/util/stringKeyComparator.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var StudentTable=function(_React$Component){function StudentTable(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"getRowLink",(function(studentId){var _this$props$levelsWit,queryStr="?section_id=".concat(_this.props.sectionId,"&user_id=").concat(studentId);return(null!==(_this$props$levelsWit=_this.props.levelsWithProgress)&&void 0!==_this$props$levelsWit&&_this$props$levelsWit.length?_this.props.levelsWithProgress[0].bonus?"extras":_this.props.levelsWithProgress[0].levelNumber:_this.props.unitName)+queryStr})),_defineProperty(_assertThisInitialized(_this),"getRowStyle",(function(selectedUserId,id){return selectedUserId===id?[styles.tr,styles.selected]:styles.tr})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(StudentTable,_React$Component);var _proto=StudentTable.prototype;return _proto.componentDidMount=function componentDidMount(){this.sortStudents()},_proto.componentDidUpdate=function componentDidUpdate(prevProps){prevProps.isSortedByFamilyName!==this.props.isSortedByFamilyName&&this.sortStudents()},_proto.sortStudents=function sortStudents(){var _this$props=this.props,students=_this$props.students;_this$props.isSortedByFamilyName?students.sort((0,_stringKeyComparator.default)(["familyName","name"])):students.sort((0,_stringKeyComparator.default)(["name","familyName"])),this.setState({students})},_proto.render=function render(){var _this2=this,_this$props2=this.props,students=_this$props2.students,onSelectUser=_this$props2.onSelectUser,selectedUserId=_this$props2.selectedUserId,levelsWithProgress=_this$props2.levelsWithProgress;return _react.default.createElement("table",{style:styles.table,className:"student-table"},_react.default.createElement("tbody",null,_react.default.createElement("tr",{style:this.getRowStyle(selectedUserId,null),onClick:function onClick(){return onSelectUser(null)}},_react.default.createElement("td",{style:styles.meRow},_locale.default.studentTableTeacherDemo())),students.map((function(student){return _react.default.createElement("tr",{key:"tr-".concat(student.id),style:_this2.getRowStyle(selectedUserId,student.id),onClick:function onClick(){return onSelectUser(student.id)}},_react.default.createElement("td",{key:"td-".concat(student.id),style:styles.td},_react.default.createElement("div",{style:styles.studentTableRow},!(null==levelsWithProgress||!levelsWithProgress.length)&&_react.default.createElement(_ProgressBubble.default,{level:levelsWithProgress.find((function(userLevel){return student.id===userLevel.userId})),disabled:!0,hideTooltips:!0,hideAssessmentBadge:!0}),_react.default.createElement("div",{style:styles.name},"".concat(student.name," ").concat(student.familyName||""),_react.default.createElement("a",{href:_this2.getRowLink(student.id),target:"_blank",rel:"noopener noreferrer",style:styles.linkIcon},_react.default.createElement(_FontAwesome.default,{icon:"external-link"}))))))}))))},StudentTable}(_react.default.Component);_defineProperty(StudentTable,"propTypes",{students:_propTypes.default.arrayOf(_types.studentShape).isRequired,onSelectUser:_propTypes.default.func.isRequired,selectedUserId:_propTypes.default.number,levelsWithProgress:_propTypes.default.arrayOf(_types.levelWithProgress),sectionId:_propTypes.default.number,unitName:_propTypes.default.string,isSortedByFamilyName:_propTypes.default.bool});var styles={table:{width:"90%",margin:"auto"},tr:{height:41,color:_color.default.cyan,border:"1px solid ".concat(_color.default.lighter_cyan),backgroundColor:_color.default.lightest_gray,":hover":{backgroundColor:_color.default.lighter_cyan,cursor:"pointer"}},td:{padding:1},selected:{fontFamily:'"Gotham 7r", sans-serif',color:_color.default.white,backgroundColor:_color.default.light_cyan},studentTableRow:{display:"flex",alignItems:"center",width:"100%"},meRow:{padding:"1px 1px 1px 5px"},name:{paddingLeft:5,margin:"1px 1px 1px 0",flexGrow:1},linkIcon:{marginLeft:10}},UnconnectedStudentTable=(0,_radium.default)(StudentTable);exports.UnconnectedStudentTable=UnconnectedStudentTable;var _default=(0,_reactRedux.connect)((function(state){return{isSortedByFamilyName:state.currentUser.isSortedByFamilyName}}))(UnconnectedStudentTable);exports.default=_default},"./src/code-studio/components/progress/teacherPanel/TeacherPanel.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UnconnectedTeacherPanel=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_TeacherPanelContainer=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/teacherPanel/TeacherPanelContainer.jsx")),_SectionSelector=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/SectionSelector.jsx")),_ViewAsToggle=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/ViewAsToggle.jsx")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_lessonLockRedux=__webpack_require__("./src/code-studio/lessonLockRedux.js"),_viewAsRedux=__webpack_require__("./src/code-studio/viewAsRedux.js"),_teacherPanelRedux=__webpack_require__("./src/code-studio/teacherPanelRedux.js"),_teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js"),_StudentTable=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/teacherPanel/StudentTable.jsx")),_urlHelpers=__webpack_require__("./src/templates/teacherDashboard/urlHelpers.js"),_SelectedStudentInfo=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/teacherPanel/SelectedStudentInfo.jsx")),_Button=_interopRequireDefault(__webpack_require__("./src/templates/Button.jsx")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_progressRedux=__webpack_require__("./src/code-studio/progressRedux.ts"),_progressReduxSelectors=__webpack_require__("./src/code-studio/progressReduxSelectors.js"),_utils=__webpack_require__("./src/utils.js"),_utils2=__webpack_require__("./src/code-studio/utils.js"),_types=__webpack_require__("./src/code-studio/components/progress/teacherPanel/types.js"),_teacherPanelData=__webpack_require__("./src/code-studio/components/progress/teacherPanel/teacherPanelData.js"),_SortByNameDropdown=_interopRequireDefault(__webpack_require__("./src/templates/SortByNameDropdown.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},sectionId=_this.props.selectedSection&&_this.props.selectedSection.id,data=_objectSpread({section_id:sectionId,page_type:_this.props.pageType},overrideData);_firehose.default.putRecord({study:"teacher_panel",event:eventName,data_json:JSON.stringify(data)})})),_defineProperty(_assertThisInitialized(_this),"onSelectUser",(function(id,selectType){_this.logToFirehose("select_student",{select_type:selectType});var isAsync=_this.props.pageType===_teacherSectionsRedux.pageTypes.scriptOverview;_this.props.selectUser(id,isAsync)})),_defineProperty(_assertThisInitialized(_this),"getSelectedUserId",(function(){var userIdStr=(0,_utils2.queryParams)("user_id");return userIdStr?parseInt(userIdStr,10):null})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(TeacherPanel,_React$Component);var _proto=TeacherPanel.prototype;return _proto.componentDidMount=function componentDidMount(){var initialViewAs=(0,_utils2.queryParams)("viewAs")||_viewAsRedux.ViewType.Instructor;this.props.viewAs!==initialViewAs&&this.props.setViewType(initialViewAs),this.loadInitialData()},_proto.UNSAFE_componentWillReceiveProps=function UNSAFE_componentWillReceiveProps(nextProps){var _nextProps$selectedSe,_this$props$selectedS;this.props.pageType!==_teacherSectionsRedux.pageTypes.scriptOverview&&(null===(_nextProps$selectedSe=nextProps.selectedSection)||void 0===_nextProps$selectedSe?void 0:_nextProps$selectedSe.id)!==(null===(_this$props$selectedS=this.props.selectedSection)||void 0===_this$props$selectedS?void 0:_this$props$selectedS.id)&&this.props.loadLevelsWithProgress()},_proto.render=function render(){var _this2=this,_this$props=this.props,viewAs=_this$props.viewAs,hasSections=_this$props.hasSections,sectionsAreLoaded=_this$props.sectionsAreLoaded,selectedSection=_this$props.selectedSection,unitHasLockableLessons=_this$props.unitHasLockableLessons,unlockedLessonNames=_this$props.unlockedLessonNames,students=_this$props.students,unitName=_this$props.unitName,levelsWithProgress=_this$props.levelsWithProgress,pageType=_this$props.pageType,teacherId=_this$props.teacherId,exampleSolutions=_this$props.exampleSolutions,selectedUserId=this.getSelectedUserId(),sectionId=selectedSection&&selectedSection.id,displaySelectedStudentInfo=viewAs===_viewAsRedux.ViewType.Instructor&&!(null==students||!students.length)&&pageType!==_teacherSectionsRedux.pageTypes.scriptOverview,displayLevelExamples=viewAs===_viewAsRedux.ViewType.Instructor&&(null==exampleSolutions?void 0:exampleSolutions.length)>0,displayLockInfo=hasSections&&unitHasLockableLessons&&viewAs===_viewAsRedux.ViewType.Instructor;return _react.default.createElement(_TeacherPanelContainer.default,{logToFirehose:this.logToFirehose},_react.default.createElement("h3",null,_locale.default.teacherPanel()),_react.default.createElement("div",{style:styles.scrollable},_react.default.createElement(_ViewAsToggle.default,{logToFirehose:this.logToFirehose}),displaySelectedStudentInfo&&_react.default.createElement(_SelectedStudentInfo.default,{students,onSelectUser:function onSelectUser(id){return _this2.onSelectUser(id,"iterator")},selectedUserId,teacherId,levelsWithProgress}),displayLevelExamples&&_react.default.createElement("div",{style:styles.exampleSolutions},exampleSolutions.map((function(example,index){return _react.default.createElement(_Button.default,{__useDeprecatedTag:!0,key:index,text:_locale.default.exampleSolution({number:index+1}),color:"blue",href:example,target:"_blank",rel:"noopener noreferrer"})}))),!sectionsAreLoaded&&_react.default.createElement("div",{style:styles.text},_locale.default.loading()),sectionsAreLoaded&&hasSections&&_react.default.createElement("div",{style:styles.sectionInfo},_react.default.createElement("div",null,_locale.default.viewingSection()),_react.default.createElement(_SectionSelector.default,{style:{margin:"0px 10px"},reloadOnChange:!0,logToFirehose:function logToFirehose(){return _this2.logToFirehose("select_section")}}),selectedSection&&_react.default.createElement("a",{href:(0,_urlHelpers.teacherDashboardUrl)(selectedSection.id),target:"_blank",rel:"noopener noreferrer",style:styles.teacherDashboardLink,onClick:function onClick(){return _this2.logToFirehose("select_teacher_dashboard")}},_locale.default.teacherDashboard())),displayLockInfo&&_react.default.createElement("div",null,_react.default.createElement("div",{style:styles.text},_locale.default.selectSectionInstructions()),unlockedLessonNames.length>0&&_react.default.createElement("div",null,_react.default.createElement("div",{style:styles.text},_react.default.createElement(_FontAwesome.default,{icon:"exclamation-triangle",style:styles.exclamation}),_react.default.createElement("div",{style:styles.dontForget},_locale.default.dontForget())),_react.default.createElement("div",{style:styles.text},_locale.default.lockFollowing(),_react.default.createElement("ul",null,unlockedLessonNames.map((function(name,index){return _react.default.createElement("li",{key:index},name)})))))),_react.default.createElement(_SortByNameDropdown.default,{sortByStyles:styles.sortBy,selectStyles:styles.select,sectionId,unitName,source:"TeacherPanel"}),viewAs===_viewAsRedux.ViewType.Instructor&&(students||[]).length>0&&_react.default.createElement(_StudentTable.default,{levelsWithProgress,students,onSelectUser:function onSelectUser(id){return _this2.onSelectUser(id,"select_specific")},selectedUserId,sectionId,unitName})))},TeacherPanel}(_react.default.Component);_defineProperty(TeacherPanel,"propTypes",{scriptId:_propTypes.default.number,unitName:_propTypes.default.string,pageType:_propTypes.default.oneOf([_teacherSectionsRedux.pageTypes.level,_teacherSectionsRedux.pageTypes.scriptOverview,_teacherSectionsRedux.pageTypes.lessonExtras]),viewAs:_propTypes.default.oneOf(Object.values(_viewAsRedux.ViewType)).isRequired,hasSections:_propTypes.default.bool.isRequired,sectionsAreLoaded:_propTypes.default.bool.isRequired,selectedSection:_propTypes.default.shape({id:_propTypes.default.number.isRequired,name:_propTypes.default.string.isRequired}),unitHasLockableLessons:_propTypes.default.bool.isRequired,unlockedLessonNames:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,students:_propTypes.default.arrayOf(_types.studentShape),levelsWithProgress:_propTypes.default.arrayOf(_types.levelWithProgress),loadLevelsWithProgress:_propTypes.default.func.isRequired,teacherId:_propTypes.default.number,exampleSolutions:_propTypes.default.array,selectUser:_propTypes.default.func.isRequired,setStudentsForCurrentSection:_propTypes.default.func.isRequired,setSections:_propTypes.default.func.isRequired,setSectionLockStatus:_propTypes.default.func.isRequired,selectSection:_propTypes.default.func.isRequired,setViewType:_propTypes.default.func.isRequired});var styles={scrollable:{overflowY:"auto",overflowX:"hidden",maxHeight:"90%"},text:{margin:10},exclamation:{color:"red"},dontForget:{display:"inline",marginLeft:10,fontSize:16,fontFamily:'"Gotham 7r", sans-serif'},sectionHeader:{margin:10,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},exampleSolutions:{textAlign:"center",margin:5},sectionInfo:{textAlign:"center",padding:"5px 0px"},teacherDashboardLink:{fontSize:11},sortBy:{display:"block",textAlign:"center"},select:{width:180,margin:"0px 10px 5px"}},UnconnectedTeacherPanel=TeacherPanel;exports.UnconnectedTeacherPanel=UnconnectedTeacherPanel;var _default=(0,_reactRedux.connect)((function(state){var _state$progress$lesso,_state$pageConstants,_state$lessonLock=state.lessonLock,lessonsBySectionId=_state$lessonLock.lessonsBySectionId,lockableAuthorized=_state$lessonLock.lockableAuthorized,lockableAuthorizedLoaded=_state$lessonLock.lockableAuthorizedLoaded,_state$teacherSection=state.teacherSections,selectedSectionId=_state$teacherSection.selectedSectionId,sectionsAreLoaded=_state$teacherSection.sectionsAreLoaded,sectionIds=_state$teacherSection.sectionIds,currentSection=lessonsBySectionId[selectedSectionId],fullyLocked=(0,_lessonLockRedux.fullyLockedLessonMapping)(state.lessonLock.lessonsBySectionId[selectedSectionId]),unlockedLessonIds=Object.keys(currentSection||{}).filter((function(lessonId){return!fullyLocked[lessonId]})),lessonNames={};null===(_state$progress$lesso=state.progress.lessons)||void 0===_state$progress$lesso||_state$progress$lesso.forEach((function(lesson){lessonNames[lesson.id]=lesson.name}));var unitHasLockableLessons=lockableAuthorizedLoaded&&lockableAuthorized&&(0,_progressReduxSelectors.hasLockableLessons)(state.progress);return{viewAs:state.viewAs,hasSections:sectionIds.length>0,sectionsAreLoaded,unitHasLockableLessons,selectedSection:state.teacherSections.sections[selectedSectionId],unlockedLessonNames:unlockedLessonIds.map((function(id){return lessonNames[id]})),students:state.teacherSections.selectedStudents,levelsWithProgress:state.teacherPanel.levelsWithProgress,isLoadingLevelsWithProgress:state.teacherPanel.isLoadingLevelsWithProgress,teacherId:state.currentUser.userId,exampleSolutions:null===(_state$pageConstants=state.pageConstants)||void 0===_state$pageConstants?void 0:_state$pageConstants.exampleSolutions}}),(function(dispatch){return{loadLevelsWithProgress:function loadLevelsWithProgress(){return dispatch((0,_teacherPanelRedux.loadLevelsWithProgress)())},selectUser:function selectUser(userId){var isAsync=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,_utils2.updateQueryParam)("user_id",userId),(0,_utils2.updateQueryParam)("version"),isAsync?dispatch((0,_progressRedux.queryUserProgress)(userId)):(0,_utils.reload)()},setStudentsForCurrentSection:function setStudentsForCurrentSection(sectionId,students){dispatch((0,_teacherSectionsRedux.setStudentsForCurrentSection)(sectionId,students))},setSections:function setSections(teacherSections){dispatch((0,_teacherSectionsRedux.setSections)(teacherSections))},setSectionLockStatus:function setSectionLockStatus(data){dispatch((0,_lessonLockRedux.setSectionLockStatus)(data))},selectSection:function selectSection(sectionId){return dispatch((0,_teacherSectionsRedux.selectSection)(sectionId))},setViewType:function setViewType(initialViewAs){return dispatch((0,_viewAsRedux.setViewType)(initialViewAs))}}}))(TeacherPanel);exports.default=_default},"./src/code-studio/components/progress/teacherPanel/TeacherPanelContainer.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_classnames=_interopRequireDefault(__webpack_require__("./node_modules/classnames/index.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_utils=__webpack_require__("./src/utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var TeacherPanelContainer=function(_React$Component){function TeacherPanelContainer(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{open:"closed"!==(0,_utils.tryGetLocalStorage)("teacher-panel","open")}),_defineProperty(_assertThisInitialized(_this),"logToFirehose",(function(){if(_this.props.logToFirehose){var eventName=_this.state.open?"open":"close";_this.props.logToFirehose(eventName)}})),_defineProperty(_assertThisInitialized(_this),"hide",(function(){_this.setState({open:!1},_this.logToFirehose),(0,_utils.trySetLocalStorage)("teacher-panel","closed")})),_defineProperty(_assertThisInitialized(_this),"show",(function(){_this.setState({open:!0},_this.logToFirehose),(0,_utils.trySetLocalStorage)("teacher-panel","open")})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(TeacherPanelContainer,_React$Component),TeacherPanelContainer.prototype.render=function render(){return _react.default.createElement("div",{className:(0,_classnames.default)("teacher-panel",{hidden:!this.state.open})},_react.default.createElement("div",{className:"hide-handle"},_react.default.createElement(_FontAwesome.default,{icon:"chevron-right",onClick:this.hide})),_react.default.createElement("div",{className:"show-handle"},_react.default.createElement(_FontAwesome.default,{icon:"chevron-left",onClick:this.show})),this.props.children)},TeacherPanelContainer}(_react.default.Component);exports.default=TeacherPanelContainer,_defineProperty(TeacherPanelContainer,"propTypes",{children:_propTypes.default.node,logToFirehose:_propTypes.default.func}),module.exports=exports.default},"./src/code-studio/components/progress/teacherPanel/teacherPanelData.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.queryLockStatus=exports.getStudentsForSection=void 0;var _utils=__webpack_require__("./src/code-studio/utils.js");function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}var getStudentsForSection=function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var sectionId,request,response;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return sectionId=(0,_utils.queryParams)("section_id"),request="/api/teacher_panel_section",sectionId&&(request+="?section_id=".concat(sectionId)),_context.prev=3,_context.next=6,fetch(request,{credentials:"same-origin"});case 6:if(200!==(response=_context.sent).status){_context.next=9;break}return _context.abrupt("return",response.json());case 9:_context.next=14;break;case 11:_context.prev=11,_context.t0=_context.catch(3),console.log(_context.t0);case 14:case"end":return _context.stop()}}),_callee,null,[[3,11]])})));return function getStudentsForSection(){return _ref.apply(this,arguments)}}();exports.getStudentsForSection=getStudentsForSection;var queryLockStatus=function(){var _ref2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(scriptId){var response,data,teacherSections;return _regeneratorRuntime().wrap((function _callee2$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.prev=0,_context2.next=3,fetch("/api/lock_status?script_id=".concat(scriptId),{credentials:"same-origin"});case 3:return response=_context2.sent,_context2.next=6,response.json();case 6:return data=_context2.sent,teacherSections=Object.values(data).map((function(section){return{id:section.section_id,name:section.section_name}})),_context2.abrupt("return",{teacherSections,sectionLockStatus:data});case 11:_context2.prev=11,_context2.t0=_context2.catch(0),console.log(_context2.t0);case 14:case"end":return _context2.stop()}}),_callee2,null,[[0,11]])})));return function queryLockStatus(_x){return _ref2.apply(this,arguments)}}();exports.queryLockStatus=queryLockStatus},"./src/code-studio/components/progress/teacherPanel/types.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.studentShape=exports.sectionData=exports.levelWithProgress=void 0;var _propTypes=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/prop-types/index.js")),_types=__webpack_require__("./src/templates/feedback/types.js");var sectionData=_propTypes.default.shape({is_verified_instructor:_propTypes.default.bool,lesson_extra:lessonExtra,level_examples:_propTypes.default.array,page_type:_propTypes.default.string,script_id:_propTypes.default.number,script_name:_propTypes.default.string,section:_propTypes.default.object});exports.sectionData=sectionData;var lessonExtra=_propTypes.default.shape({bonusLevels:_propTypes.default.array,lessonNumber:_propTypes.default.number,nextLessonNumber:_propTypes.default.number,nextLevelPath:_propTypes.default.string}),levelWithProgress=_propTypes.default.shape({id:_propTypes.default.string.isRequired,contained:_propTypes.default.bool,submitLevel:_propTypes.default.bool,paired:_propTypes.default.bool,partnerNames:_propTypes.default.arrayOf(_propTypes.default.string),partnerCount:_propTypes.default.number,isConceptLevel:_propTypes.default.bool,userId:_propTypes.default.number.isRequired,passed:_propTypes.default.bool.isRequired,status:_propTypes.default.string.isRequired,levelNumber:_propTypes.default.number,assessment:_propTypes.default.bool,bonus:_propTypes.default.bool,teacherFeedbackReviewState:_propTypes.default.oneOf(Object.keys(_types.ReviewStates)),kind:_propTypes.default.string,userLevelId:_propTypes.default.number,updatedAt:_propTypes.default.date});exports.levelWithProgress=levelWithProgress;var studentShape=_propTypes.default.shape({id:_propTypes.default.number.isRequired,name:_propTypes.default.string.isRequired});exports.studentShape=studentShape},"./src/code-studio/components/recorders.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.RecordingFileType=void 0;var _vmsg=_interopRequireDefault(__webpack_require__("./node_modules/vmsg/vmsg.js")),_recorderJs=_interopRequireDefault(__webpack_require__("./node_modules/recorder-js/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var Mp3Recorder=function Mp3Recorder(){var _this=this;_defineProperty(this,"init",function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(stream){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,_this.recorder.initAudio();case 2:return _context.next=4,_this.recorder.initWorker();case 4:case"end":return _context.stop()}}),_callee)})));return function(_x){return _ref.apply(this,arguments)}}()),_defineProperty(this,"startRecording",_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:_this.recorder.startRecording();case 1:case"end":return _context2.stop()}}),_callee2)})))),_defineProperty(this,"stopRecording",_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var blob;return _regeneratorRuntime().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:return _context3.next=2,_this.recorder.stopRecording();case 2:return blob=_context3.sent,_context3.abrupt("return",blob);case 4:case"end":return _context3.stop()}}),_callee3)})))),_defineProperty(this,"isRecording",(function(){return!!_this.recorder.blob})),_defineProperty(this,"getExtension",(function(){return RecordingFileType.MP3})),this.recorder=new _vmsg.default.Recorder({wasmURL:"/shared/wasm/vmsg.wasm"})},WavRecorder=function WavRecorder(){var _this2=this;_defineProperty(this,"init",function(){var _ref4=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(stream){return _regeneratorRuntime().wrap((function _callee4$(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:return _this2.stream=stream,_context4.next=3,_this2.recorder.init(stream);case 3:case"end":return _context4.stop()}}),_callee4)})));return function(_x2){return _ref4.apply(this,arguments)}}()),_defineProperty(this,"startRecording",_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){return _regeneratorRuntime().wrap((function _callee5$(_context5){for(;;)switch(_context5.prev=_context5.next){case 0:return _context5.next=2,_this2.recorder.start();case 2:_this2.recording=!0;case 3:case"end":return _context5.stop()}}),_callee5)})))),_defineProperty(this,"stopRecording",_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var _yield$_this2$recorde,blob;return _regeneratorRuntime().wrap((function _callee6$(_context6){for(;;)switch(_context6.prev=_context6.next){case 0:return _context6.next=2,_this2.recorder.stop();case 2:return _yield$_this2$recorde=_context6.sent,blob=_yield$_this2$recorde.blob,_this2.recording=!1,_this2.stream.getTracks().forEach((function(track){return track.stop()})),_context6.abrupt("return",blob);case 7:case"end":return _context6.stop()}}),_callee6)})))),_defineProperty(this,"isRecording",(function(){return _this2.recording})),_defineProperty(this,"getExtension",(function(){return RecordingFileType.WAV}));var audioContext=new(window.AudioContext||window.webkitAudioContext);this.recorder=new _recorderJs.default(audioContext),this.recording=!1,this.stream=null},RecordingFileType={MP3:".mp3",WAV:".wav"};exports.RecordingFileType=RecordingFileType;var _default=function getRecorder(extension){return extension===RecordingFileType.WAV?new WavRecorder:new Mp3Recorder};exports.default=_default},"./src/code-studio/components/shareDialogRedux.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"shareDialog/SHOW_SHARE_DIALOG":return _objectSpread(_objectSpread(_objectSpread({},state),initialState),{},{isOpen:!0});case"shareDialog/HIDE_SHARE_DIALOG":return _objectSpread(_objectSpread({},state),{},{isUnpublishPending:!1,didUnpublish:!1,isOpen:!1});case"shareDialog/UNPUBLISH_REQUEST":return _objectSpread(_objectSpread({},state),{},{isUnpublishPending:!0});case"shareDialog/UNPUBLISH_SUCCESS":return _objectSpread(_objectSpread({},state),{},{isOpen:!1,isUnpublishPending:!1,didUnpublish:!0});case"shareDialog/UNPUBLISH_FAILURE":return _objectSpread(_objectSpread({},state),{},{isUnpublishPending:!1});case"shareDialog/SAVE_REPLAY_LOG":return _objectSpread(_objectSpread({},state),{},{replayLog:action.replayLog});case"shareDialog/SHOW_LIBRARY_CREATION_DIALOG":return _objectSpread(_objectSpread({},state),{},{libraryDialogIsOpen:!0});case"shareDialog/HIDE_LIBRARY_CREATION_DIALOG":return _objectSpread(_objectSpread({},state),{},{libraryDialogIsOpen:!1});default:return state}},exports.hideLibraryCreationDialog=function hideLibraryCreationDialog(){return{type:"shareDialog/HIDE_LIBRARY_CREATION_DIALOG"}},exports.hideShareDialog=function hideShareDialog(){return{type:"shareDialog/HIDE_SHARE_DIALOG"}},exports.saveReplayLog=function saveReplayLog(replayLog){return{type:"shareDialog/SAVE_REPLAY_LOG",replayLog}},exports.showLibraryCreationDialog=function showLibraryCreationDialog(){return{type:"shareDialog/SHOW_LIBRARY_CREATION_DIALOG"}},exports.showShareDialog=function showShareDialog(){return{type:"shareDialog/SHOW_SHARE_DIALOG"}},exports.unpublishProject=function unpublishProject(projectId){return function(dispatch){return dispatch({type:"shareDialog/UNPUBLISH_REQUEST"}),new Promise((function(resolve,reject){_clientApi.channels.withProjectId(projectId).ajax("POST","unpublish",(function(){dispatch({type:"shareDialog/UNPUBLISH_SUCCESS"}),resolve()}),(function(err){dispatch({type:"shareDialog/UNPUBLISH_FAILURE"}),reject(err)}),null)}))}};var _clientApi=__webpack_require__("./src/clientApi.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SongTitlesToArtistTwitterHandle=void 0;exports.SongTitlesToArtistTwitterHandle={backtoyou_selenagomez:"SelenaGomez",bornthisway_ladygaga:"ladygaga",callmemaybe_carlyraejepsen:"CarlyRaeJepsen",cantfeelmyface_theweeknd:"TheWeeknd",cantholdus_macklemore:"Macklemore",cheapthrills_sia:"Sia",countrygirl_lukebryan:"LukeBryanOnline",dancinginthedark_brucespringsteen:"Springsteen",heyya_outkast:"Outkast",iliketomoveit_william:"iamwill",getintothegroove_madonna:"Madonna",levelup_ciara:"Ciara",macarena_losdelrio:"LosDelRioMusic",migente_jbalvin:"JBalvin",needyounow_ladya:"LadyA",notearslefttocry_arianagrande:"ArianaGrande",shapeofyou_edsheeran:"EdSheeran",somebodylikeyou_keithurban:"KeithUrban",sorry_justinbieber:"JustinBieber",summer_calvinharris:"CalvinHarris",takeonme_aha:"Aha_Com",isawthesign_aceofbase:"AceofBase",thunder_imaginedragons:"ImagineDragons",canttouchthis_mchammer:"MCHammer",uptownfunk_brunomars:"BrunoMars",vivalavida_coldplay:"Coldplay",wakemeup_aviciialoeblacc:"AloeBlacc",wecantstop_mileycyrus:"MileyCyrus",wenospeakamericano_yolandabecool:"YolandaBeCool",ymca_villagepeople:"VillagePeople",firework_katyperry:"KatyPerry",calma_pedrocapo:"PedroCapo",highhopes_panicatthedisco:"PanicAtTheDisco",ificanthaveyou_shawnmendes:"ShawnMendes",introtoshamstep_47SOUL:"47soulofficial",kidzbop_ificanthaveyou_shawnmendes:"KIDZBOP",neverreallyover_katyperry:"KatyPerry",occidentalview_francescogabbani:"FrankGabbani",oldtownroadremix_lilnasx:"LilNasX",oldtownroadremix_lilnasx_long:"LilNasX",starships_nickiminaj:"NICKIMINAJ",sucker_jonasbrothers:"JonasBrothers",dancemonkey_tonesandi:"tonesandimusic",dernieredanse_indila:"Indila",dontstartnow_dualipa:"DUALIPA",euphoria_loreen:"LOREEN_TALHAOUI",ilkadimisenat_kenandogulu:"kenandogulu",jerusalema_masterkg:"MasterKGsa",odetocode_brendandominicpaolini:"CodeWeekEU",rainonme_ladygagaftarianagrande:"ladygaga",savagelove_jasonderulo:"jasonderulo",sayso_dojacat:"DojaCat",aire_jessejoy:"jesseyjoy",despedidaycierre_vanesamartin:"vanesamartin_",jazzy_beats:"codeorg",synthesize:"codeorg",onedance_drake:"Drake",elprestamo_maluma:"Maluma",despacito_luisfonsi:"LuisFonsi",tunaktunaktun_dalermehndi:"DalerMehndi",sapescommejamias_maitregims:"MaitreGIMS",lesercitodelselfie_takagi:"TakagiBeatz",gangnamstyle_psy:"Psy_Oppa",sophia_alvarosoler:"AsolerMusic",danzakuduro_donomar:"DONOMAR",cestlavie_khaled:"Khaled_Officiel",occidentaliskarma_francescogabbani:"FrankGabbani",isthatforme_anitta:"Anitta",janti_muratboz:"MuratBoz",gee_girlsgen:"GirlsGeneration",growingpains_alessiacara:"AlessiaCara",stay_thekidlaroi:"TheKidLaroi","2beloved_lizzo":"Lizzo",asitwas_harrystyles:"Harry_Styles",astronautintheocean_maskedwolf:"MaskedWolfMusic",breakmysoul_beyonce:"Beyonce",good4u_oliviarodrigo:"OliviaRodrigo",heatwaves_glassanimals:"GlassAnimals",higherpower_coldplay:"Coldplay",levitating_dualipa:"DUALIPA",showdaspoderosas_anitta:"Anitta",sunflower_postmaloneftswaelee:"PostMalone",sunroof_nickyoureanddazy:"Nicky_Youre",taconesrojos_sebastianyatra:"SebastianYatra",watermelonsugar_harrystyles:"Harry_Styles",wedonttalkaboutbruno_encanto:"EncantoMovie",butter_bts:"BTS",dynamite_bts:"BTS"}},"./src/code-studio/disabledBubbles.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.disabledBubblesSupportArticle=void 0;exports.disabledBubblesSupportArticle="https://support.code.org/hc/en-us/articles/360020520891"},"./src/code-studio/hashEmail.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function _default(options){var email=normalizeEmail((0,_jquery.default)(options.email_selector).val());if(""!==email&&EMAIL_REGEX.test(email)){var hashed_email=hashEmail(email);(0,_jquery.default)(options.hashed_email_selector).val(hashed_email),options.skip_clear_email||(!options.age_selector||(0,_jquery.default)(options.age_selector).val()<13)&&(0,_jquery.default)(options.email_selector).val("")}},exports.hashEmail=hashEmail;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_md=_interopRequireDefault(__webpack_require__("./node_modules/crypto-js/md5.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var EMAIL_REGEX=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;function hashEmail(cleartextEmail){return(0,_md.default)(normalizeEmail(cleartextEmail)).toString()}function normalizeEmail(rawEmail){return rawEmail.toLowerCase().trim()}},"./src/code-studio/header.js":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_headerRedux=__webpack_require__("./src/code-studio/headerRedux.ts"),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts"),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_progress=_interopRequireDefault(__webpack_require__("./src/code-studio/progress.js")),_redux=__webpack_require__("./src/redux.js"),_currentUserRedux=__webpack_require__("./src/templates/currentUserRedux.js"),_verifiedInstructorRedux=__webpack_require__("./src/code-studio/verifiedInstructorRedux.js"),_logToCloud=_interopRequireDefault(__webpack_require__("./src/logToCloud.js")),_progressTypes=__webpack_require__("./src/templates/progress/progressTypes.js"),_HeaderMiddle=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/HeaderMiddle.jsx")),_SignInCalloutWrapper=_interopRequireDefault(__webpack_require__("./src/code-studio/components/header/SignInCalloutWrapper.jsx")),_browserNavigation=__webpack_require__("./src/code-studio/browserNavigation.js"),_progressRedux=__webpack_require__("./src/code-studio/progressRedux.ts");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var header={};header.build=function(scriptData,lessonGroupData,lessonData,progressData,currentLevelId,currentPageNumber,signedIn,lessonExtrasEnabled,scriptNameData,isLessonExtras){scriptData=scriptData||{},lessonGroupData=lessonGroupData||{},lessonData=lessonData||{},progressData=progressData||{};var saveAnswersBeforeNavigation=currentPageNumber!==_progressTypes.PUZZLE_PAGE_NONE;_progress.default.generateLessonProgress(scriptData,lessonGroupData,lessonData,progressData,currentLevelId,saveAnswersBeforeNavigation,signedIn,lessonExtrasEnabled,isLessonExtras,currentPageNumber),(0,_browserNavigation.setupNavigationHandler)(lessonData),(0,_jquery.default)(document).ready((function(){_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store:(0,_redux.getStore)()},_react.default.createElement(_HeaderMiddle.default,{scriptNameData,lessonData,scriptData})),document.querySelector(".header_level")),scriptData.show_sign_in_callout&&!1===signedIn&&_reactDom.default.render(_react.default.createElement(_SignInCalloutWrapper.default,null),document.querySelector(".signin_callout_wrapper"))}))},header.buildProjectInfoOnly=function(currentLevelId){var store=(0,_redux.getStore)();store.dispatch((0,_progressRedux.setCurrentLevelId)(currentLevelId)),_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store},_react.default.createElement(_HeaderMiddle.default,{projectInfoOnly:!0})),document.querySelector(".header_level"))},header.buildScriptNameOnly=function(scriptNameData){_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store:(0,_redux.getStore)()},_react.default.createElement(_HeaderMiddle.default,{scriptNameData,scriptNameOnly:!0})),document.querySelector(".header_level"))},header.buildUserMenu=function(){(0,_jquery.default)(document).ready((function(){var showCreateMenu=(0,_jquery.default)(".create_menu").length>0;fetch("/dashboardapi/user_menu?showCreateMenu=".concat(showCreateMenu),{credentials:"same-origin"}).then((function(response){return response.text()})).then((function(data){return(0,_jquery.default)("#sign_in_or_user").html(data)})).catch((function(err){console.log(err)}))}))},function setupReduxSubscribers(store){var state={};store.subscribe((function(){var lastState=state;state=store.getState(),lastState.publishDialog&&lastState.publishDialog.lastPublishedAt!==state.publishDialog.lastPublishedAt&&window.dashboard.project.setPublishedAt(state.publishDialog.lastPublishedAt),lastState.shareDialog&&!lastState.shareDialog.didUnpublish&&state.shareDialog.didUnpublish&&window.dashboard.project.setPublishedAt(null)}))}((0,_redux.getStore)()),function setUpGlobalData(store){fetch("/api/v1/users/current",{credentials:"same-origin"}).then((function(response){return response.json()})).then((function(data){store.dispatch((0,_currentUserRedux.setUserSignedIn)(data.is_signed_in)),data.is_signed_in&&(store.dispatch((0,_currentUserRedux.setInitialData)(data)),data.is_verified_instructor&&store.dispatch((0,_verifiedInstructorRedux.setVerified)()),_logToCloud.default.setCustomAttribute("userId",data.id))})).catch((function(err){console.log(err)}))}((0,_redux.getStore)()),header.showMinimalProjectHeader=function(){(0,_redux.getStore)().dispatch((0,_projectRedux.refreshProjectName)()),(0,_redux.getStore)().dispatch((0,_headerRedux.showMinimalProjectHeader)())},header.showLevelBuilderSaveButton=function(getChanges,overrideHeaderText,overrideOnSaveURL){(0,_redux.getStore)().dispatch((0,_headerRedux.showLevelBuilderSaveButton)(getChanges,overrideHeaderText,overrideOnSaveURL))},header.showHeaderForProjectBacked=function(options){options.showShareAndRemix&&(0,_redux.getStore)().dispatch((0,_headerRedux.showProjectBackedHeader)()),(0,_redux.getStore)().dispatch((0,_projectRedux.showProjectUpdatedAt)()),header.updateTimestamp()},header.showProjectHeader=function(){header.updateTimestamp(),(0,_redux.getStore)().dispatch((0,_projectRedux.refreshProjectName)()),(0,_redux.getStore)().dispatch((0,_headerRedux.showProjectHeader)())},header.updateTimestamp=function(){var timestamp=dashboard.project.getCurrentTimestamp();(0,_redux.getStore)().dispatch((0,_projectRedux.setProjectUpdatedAt)(timestamp))},header.showProjectSaveError=function(){(0,_redux.getStore)().dispatch((0,_projectRedux.setProjectUpdatedError)())},header.showProjectSaving=function(){(0,_redux.getStore)().dispatch((0,_projectRedux.setProjectUpdatedSaving)())},header.showTryAgainDialog=function(){(0,_redux.getStore)().dispatch((0,_projectRedux.setShowTryAgainDialog)(!0))},header.hideTryAgainDialog=function(){(0,_redux.getStore)().dispatch((0,_projectRedux.setShowTryAgainDialog)(!1))};var _default=header;exports.default=_default,module.exports=exports.default},"./src/code-studio/headerShare.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.shareProject=function shareProject(shareUrl){dashboard.project.saveIfSourcesChanged().then((function(){var dialogDom=document.getElementById("project-share-dialog");dialogDom||((dialogDom=document.createElement("div")).setAttribute("id","project-share-dialog"),document.body.appendChild(dialogDom));var canShareSocial,appType=dashboard.project.getStandaloneApp(),selectedSong=dashboard.project.getSelectedSong(),pageConstants=(0,_redux.getStore)().getState().pageConstants;if("dance"===appType){var is13Plus="true"===sessionStorage.getItem("ad_anon_over13");canShareSocial=pageConstants.is13Plus||!pageConstants.isSignedIn&&is13Plus}else canShareSocial=pageConstants.is13Plus||!pageConstants.isSignedIn;var canPublish=!!appOptions.isSignedIn&&_sharedConstants.AllPublishableProjectTypes.includes(appType);_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store:(0,_redux.getStore)()},_react.default.createElement(_ShareDialog.default,{isProjectLevel:!!dashboard.project.isProjectLevel(),allowSignedOutShare:"dance"===appType,shareUrl,selectedSong,thumbnailUrl:dashboard.project.getThumbnailUrl(),isAbusive:dashboard.project.exceedsAbuseThreshold(),canPrint:"artist"===appType,canPublish,isPublished:dashboard.project.isPublished(),channelId:dashboard.project.getCurrentId(),appType,onClickPopup:_popupWindow.default,canShareSocial,userSharingDisabled:appOptions.userSharingDisabled})),dialogDom),(0,_redux.getStore)().dispatch((0,_shareDialogRedux.showShareDialog)())}))};var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_popupWindow=_interopRequireDefault(__webpack_require__("./src/code-studio/popup-window.js")),_ShareDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/components/ShareDialog.jsx")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_redux=__webpack_require__("./src/redux.js"),_shareDialogRedux=__webpack_require__("./src/code-studio/components/shareDialogRedux.js"),_sharedConstants=__webpack_require__("./src/util/sharedConstants.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}},"./src/code-studio/hiddenLessonRedux.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.STUDENT_SECTION_ID=void 0,exports.default=function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new HiddenState,action=arguments.length>1?arguments[1]:void 0;if("hiddenLesson/SET_HIDDEN_LESSONS"===action.type){var hiddenLessonsPerSection=action.hiddenLessonsPerSection,hideableLessonsAllowed=action.hideableLessonsAllowed,sectionIds=Object.keys(hiddenLessonsPerSection),nextState=state;return sectionIds.forEach((function(sectionId){hiddenLessonsPerSection[sectionId].forEach((function(lessonId){nextState=nextState.setIn(["lessonsBySection",sectionId,lessonId.toString()],!0)}))})),validateSectionIds(nextState),nextState.merge({hiddenLessonsInitialized:!0,hideableLessonsAllowed})}if("hiddenLesson/UPDATE_HIDDEN_LESSON"===action.type){var sectionId=action.sectionId,lessonId=action.lessonId,hidden=action.hidden,_nextState=state.setIn(["lessonsBySection",sectionId,lessonId.toString()],hidden);return validateSectionIds(_nextState),_nextState}if("hiddenLesson/UPDATE_HIDDEN_SCRIPT"===action.type){var _sectionId=action.sectionId,scriptId=action.scriptId,_hidden=action.hidden,_nextState2=state.setIn(["scriptsBySection",_sectionId.toString(),scriptId.toString()],_hidden);return validateSectionIds(_nextState2),_nextState2}return state},exports.getHiddenLessons=function getHiddenLessons(scriptName,canHideLessons){return function(dispatch){_jquery.default.ajax({type:"GET",url:"/s/".concat(scriptName,"/hidden_lessons"),dataType:"json",contentType:"application/json"}).done((function(response){return dispatch(function initializeHiddenLessons(data,canHideLessons){return function(dispatch){Array.isArray(data)&&(data=_defineProperty({},"STUDENT",data)),dispatch(setHiddenLessons(data,!!canHideLessons))}}(response,canHideLessons))})).fail((function(err){return console.error(err)}))}},exports.initializeHiddenScripts=function initializeHiddenScripts(data){return function(dispatch){data&&(Array.isArray(data)&&(data=_defineProperty({},"STUDENT",data)),Object.keys(data).forEach((function(sectionId){data[sectionId].forEach((function(scriptId){dispatch(updateHiddenScript(sectionId,scriptId,!0))}))})))}},exports.isLessonHiddenForSection=function isLessonHiddenForSection(state,sectionId,lessonId){return isHiddenForSection(state,sectionId,lessonId,"lessonsBySection")},exports.isScriptHiddenForSection=function isScriptHiddenForSection(state,sectionId,scriptId){return isHiddenForSection(state,sectionId,scriptId,"scriptsBySection")},exports.setHiddenLessons=setHiddenLessons,exports.toggleHiddenLesson=function toggleHiddenLesson(scriptName,sectionId,lessonId,hidden){return function(dispatch){dispatch(updateHiddenLesson(sectionId,lessonId,hidden)),postToggleHidden(scriptName,sectionId,lessonId,hidden)}},exports.toggleHiddenScript=function toggleHiddenScript(scriptName,sectionId,scriptId,hidden){return function(dispatch){dispatch(updateHiddenScript(sectionId,scriptId,hidden)),postToggleHidden(scriptName,sectionId,null,hidden)}},exports.updateHiddenLesson=updateHiddenLesson,exports.updateHiddenScript=updateHiddenScript;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_immutable=_interopRequireDefault(__webpack_require__("./node_modules/immutable/dist/immutable.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}exports.STUDENT_SECTION_ID="STUDENT";var HiddenState=_immutable.default.Record({hiddenLessonsInitialized:!1,hideableLessonsAllowed:!1,lessonsBySection:_immutable.default.Map({}),scriptsBySection:_immutable.default.Map({})});function validateSectionIds(state){if(state.getIn(["lessonsBySection","STUDENT"])&&state.get("lessonsBySection").size>1)throw new Error("Should never have STUDENT_SECTION_ID alongside other sectionIds")}function setHiddenLessons(hiddenLessonsPerSection,hideableLessonsAllowed){return{type:"hiddenLesson/SET_HIDDEN_LESSONS",hiddenLessonsPerSection,hideableLessonsAllowed}}function updateHiddenLesson(sectionId,lessonId,hidden){return{type:"hiddenLesson/UPDATE_HIDDEN_LESSON",sectionId,lessonId,hidden}}function updateHiddenScript(sectionId,scriptId,hidden){return{type:"hiddenLesson/UPDATE_HIDDEN_SCRIPT",sectionId,scriptId,hidden}}function postToggleHidden(scriptName,sectionId,lessonId,hidden){var data={section_id:sectionId,hidden};lessonId&&(data.stage_id=lessonId),_jquery.default.ajax({type:"POST",url:"/s/".concat(scriptName,"/toggle_hidden"),dataType:"json",contentType:"application/json",data:JSON.stringify(data)}).success((function(){window.__TestInterface=window.__TestInterface||{},window.__TestInterface.toggleHiddenUnitComplete=!0}))}function isHiddenForSection(state,sectionId,itemId,bySectionKey){return!!itemId&&(sectionId||(sectionId="STUDENT"),!!state.get(bySectionKey).getIn([sectionId.toString(),itemId.toString()]))}},"./src/code-studio/initApp/clientApi.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_utils=__webpack_require__("./src/utils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var base={api_base_url:"/v3/channels",all:function all(callback){_jquery.default.ajax({url:this.api_base_url,type:"get",dataType:"json"}).done((function(data,text){callback(null,data)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,null)}))},create:function create(value,callback,queryParams){_jquery.default.ajax({url:this.api_base_url+(0,_utils.stringifyQueryParams)(queryParams),type:"post",contentType:"application/json; charset=utf-8",data:JSON.stringify(value)}).done((function(data,text){callback(null,data)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,void 0)}))},delete:function _delete(childPath,callback){_jquery.default.ajax({url:this.api_base_url+"/"+childPath+"/delete",type:"post",dataType:"json"}).done((function(data,text){callback(null,!0)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,!1)}))},deleteObject:function deleteObject(childPath,callback){_jquery.default.ajax({url:this.api_base_url+"/"+childPath,type:"delete",dataType:"json"}).done((function(data,text){callback(null,!0)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,!1)}))},fetch:function fetch(childPath,callback,dataType){dataType=dataType||"json",_jquery.default.ajax({url:this.api_base_url+"/"+childPath,type:"get",dataType}).done((function(data,textStatus,jqXHR){callback(null,data,jqXHR)})).fail((function(response,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,void 0,void 0,response)}))},update:function update(childPath,value,callback){_jquery.default.ajax({url:this.api_base_url+"/"+childPath,type:"post",contentType:"application/json; charset=utf-8",data:JSON.stringify(value)}).done((function(data,text){callback(null,data)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);err.responseText=request.responseText,callback(err,!1)}))},copyAll:function copyAll(src,dest,callback){_jquery.default.ajax({url:this.api_base_url+"/"+dest+"?src="+src,type:"put"}).done((function(data,text){callback(null,data)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,!1)}))},put:function put(id,value,filename,callback){_jquery.default.ajax({url:this.api_base_url+"/"+id+"/"+filename,type:"put",contentType:"application/json; charset=utf-8",data:value}).done((function(data,text){callback(null,data)})).fail((function(request,status,error){var _request$responseJSON,err=function errorString(request,status,error){var details=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return new Error("httpStatusCode: ".concat(request.status,"; status: ").concat(status,"; error: ").concat(error),{cause:details})}(request,status,error,(null===(_request$responseJSON=request.responseJSON)||void 0===_request$responseJSON?void 0:_request$responseJSON.details)||null);callback(err,!1)}))},patchAll:function patchAll(id,queryParams,value,callback){_jquery.default.ajax({url:this.api_base_url+"/"+id+"/?"+queryParams,type:"patch",contentType:"application/json; charset=utf-8",data:value}).done((function(data,text){callback(null,data)})).fail((function(request,status,error){var err=new Error("status: "+status+"; error: "+error);callback(err,!1)}))}};module.exports={create:function create(url){return _lodash.default.assign({},base,{api_base_url:url})}}},"./src/code-studio/initApp/project.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),utils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/utils.js")),_constants=__webpack_require__("./src/constants.js"),_clientApi=__webpack_require__("./src/clientApi.js"),_firehose=_interopRequireDefault(__webpack_require__("./src/lib/util/firehose.js")),_sharedConstants=__webpack_require__("./src/util/sharedConstants.js"),_NameFailureError=_interopRequireDefault(__webpack_require__("./src/code-studio/NameFailureError.js")),_PlaygroundConstants=__webpack_require__("./src/lib/kits/maker/boards/circuitPlayground/PlaygroundConstants.js"),_header=_interopRequireDefault(__webpack_require__("./src/code-studio/header.js")),_utils2=__webpack_require__("./src/code-studio/utils.js"),_redux=__webpack_require__("./src/redux.js"),_projectRedux=__webpack_require__("./src/code-studio/projectRedux.ts");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:"",match=this.getUrl().match(PROJECT_URL_PATTERN),hashIndex=(url=match?match[1]:this.getUrl()).indexOf("#");-1!==hashIndex&&(url=url.substring(0,hashIndex));var queryString="",queryIndex=url.indexOf("?");if(-1!==queryIndex&&(queryString=url.substring(queryIndex),url=url.substring(0,queryIndex)),fragment.startsWith("/"))for(;url.endsWith("/");)url=url.substring(0,url.length-1);return url+fragment+queryString},getShareUrl:function getShareUrl(){var location=this.getLocation();if(this.isWebLab()){var environmentKey=location.hostname.replace(/([-.]?studio)?\.?code.org/i,""),subdomain=environmentKey.length>0?"".concat(environmentKey,"."):"",port="localhost"===environmentKey?":".concat(location.port):"";return"".concat(location.protocol,"//").concat(subdomain,"codeprojects.org").concat(port,"/projects/weblab/").concat(this.getCurrentId())}return location.origin+this.getPathName()},getProjectSourcesUrl:function getProjectSourcesUrl(){return"".concat(this.getLocation().origin,"/v3/sources/").concat(this.getCurrentId())},getCurrentTimestamp:function getCurrentTimestamp(){if(current)return current.updatedAt},getAbuseScore:function getAbuseScore(){return currentAbuseScore},getSharingDisabled:function getSharingDisabled(){return sharingDisabled},getMakerAPIs:function getMakerAPIs(){return currentSources.makerAPIsEnabled},getCurrentSourceVersionId:function getCurrentSourceVersionId(){return currentSourceVersionId},disableAutoContentModeration:function disableAutoContentModeration(){var _this=this;return new Promise((function(resolve,reject){channels.update("".concat(_this.getCurrentId(),"/disable-content-moderation"),null,(function(err){err?reject(err):resolve()}))}))},enableAutoContentModeration:function enableAutoContentModeration(){var _this2=this;return new Promise((function(resolve,reject){channels.update("".concat(_this2.getCurrentId(),"/enable-content-moderation"),null,(function(err){err?reject(err):resolve()}))}))},adminResetAbuseScore:function adminResetAbuseScore(){var score=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,id=this.getCurrentId();id&&channels.delete(id+"/abuse",(function(err,result){if(err)throw err;assets.patchAll(id,"abuse_score=".concat(score),null,(function(err,result){if(err)throw err})),files.patchAll(id,"abuse_score=".concat(score),null,(function(err,result){if(err)throw err;(0,_jquery.default)(".admin-abuse-score").text(score)}))}))},isEditable,isFrozen:function isFrozen(){if(current)return current.frozen},isOwner:function isOwner(){return!(!current||!current.isOwner)},isPublished:function isPublished(){return!(!current||!current.publishedAt)},hasPrivacyProfanityViolation:function hasPrivacyProfanityViolation(){return currentHasPrivacyProfanityViolation},privacyProfanityDetailsEnglish:function privacyProfanityDetailsEnglish(){return currentShareFailureEnglish},privacyProfanityDetailsIntl:function privacyProfanityDetailsIntl(){return currentShareFailureIntl},privacyProfanitySecondLanguage:function privacyProfanitySecondLanguage(){return intlLanguage},exceedsAbuseThreshold:function exceedsAbuseThreshold(){return currentAbuseScore>=ABUSE_THRESHOLD},hideBecausePrivacyViolationOrProfane:function hideBecausePrivacyViolationOrProfane(){return!this.showEvenIfPolicyViolatingOrAbusiveProject()&&this.hasPrivacyProfanityViolation()},hideBecauseAbusive:function hideBecauseAbusive(){return!this.showEvenIfPolicyViolatingOrAbusiveProject()&&this.exceedsAbuseThreshold()},showEvenIfPolicyViolatingOrAbusiveProject:function showEvenIfPolicyViolatingOrAbusiveProject(){if(appOptions.scriptId)return!0;var pageAction=parsePath().action;return(this.isOwner()||appOptions.canResetAbuse)&&("edit"===pageAction||"view"===pageAction)},channelNotFound:function channelNotFound(){return fetchChannelResponseCode>=400&&fetchChannelResponseCode<500},sourceNotFound:function sourceNotFound(){return fetchSourceResponseCode>=400&&fetchSourceResponseCode<500},__TestInterface:{getCurrent:function getCurrent(){return current},isInitialSaveComplete:function isInitialSaveComplete(){return initialSaveComplete},isInitialCaptureComplete:function isInitialCaptureComplete(){return initialCaptureComplete},setCurrentData:function setCurrentData(data){current=data},setCurrentSources:function setCurrentSources(data){currentSources=data},setInitialSaveComplete:function setInitialSaveComplete(value){initialSaveComplete=value},setSourceVersionInterval:function setSourceVersionInterval(seconds){newSourceVersionInterval=1e3*seconds},setCurrentSourceVersionId:function setCurrentSourceVersionId(id){currentSourceVersionId=id}},isEditing:function isEditing(){return _isEditing},isProjectLevel:function isProjectLevel(){return appOptions.level&&appOptions.level.isProjectLevel},shouldUpdateHeaders:function shouldUpdateHeaders(){return!appOptions.isExternalProjectLevel},showProjectHeader:function showProjectHeader(){this.shouldUpdateHeaders()&&_header.default.showProjectHeader()},showMinimalProjectHeader:function showMinimalProjectHeader(){this.shouldUpdateHeaders()&&_header.default.showMinimalProjectHeader()},shouldHideShareAndRemix:function shouldHideShareAndRemix(){return appOptions.level&&appOptions.level.hideShareAndRemix||appOptions.embed&&("applab"===appOptions.app||"gamelab"===appOptions.app||"spritelab"===appOptions.app)},showHeaderForProjectBacked:function showHeaderForProjectBacked(){this.shouldUpdateHeaders()&&_header.default.showHeaderForProjectBacked({showShareAndRemix:!this.shouldHideShareAndRemix()})},setName:function setName(newName){current=current||{},newName&&(current.name=newName,this.setTitle(newName))},setLibrarySharedClasses:function setLibrarySharedClasses(newSharedClasses,callback){current=current||{},Array.isArray(newSharedClasses)&&(current.sharedWith=newSharedClasses,this.updateChannels_(callback))},setLibraryDetails:function setLibraryDetails(){var config=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};current=current||{};var libraryName=config.libraryName,libraryDescription=config.libraryDescription,latestLibraryVersion=config.latestLibraryVersion,publishing=config.publishing;libraryName!==current.libraryName&&(current.libraryName=libraryName),libraryDescription!==current.libraryDescription&&(current.libraryDescription=libraryDescription),latestLibraryVersion!==current.latestLibraryVersion&&(current.latestLibraryVersion=-1===latestLibraryVersion?null:latestLibraryVersion),publishing?current.publishLibrary=!0:!1===publishing&&(current.libraryPublishedAt=null,current.publishLibrary=!1),this.updateChannels_()},setTitle:function setTitle(newName){newName&&appOptions.gameDisplayName&&(document.title="".concat(newName," - ").concat(appOptions.gameDisplayName," - ").concat(appOptions.appName))},init:function init(sourceHandler){this.sourceHandler=sourceHandler,redirectFromHashUrl()||redirectEditView()||(this.isProjectLevel()||current?(currentSources.html&&sourceHandler.setInitialLevelHtml(currentSources.html),function setMakerAPIsStatusFromLevel(){appOptions.level.makerlabEnabled&&(currentSources.makerAPIsEnabled=appOptions.level.makerlabEnabled)}(),function setMakerAPIsStatusFromQueryParams(){(0,_utils2.hasQueryParam)("enableMaker")&&(currentSources.makerAPIsEnabled=_PlaygroundConstants.CP_API,(0,_utils2.updateQueryParam)("enableMaker",void 0,!0));(0,_utils2.hasQueryParam)("disableMaker")&&(currentSources.makerAPIsEnabled=null,(0,_utils2.updateQueryParam)("disableMaker",void 0,!0))}(),this.getMakerAPIs()&&sourceHandler.setMakerAPIsEnabled(currentSources.makerAPIsEnabled),currentSources.selectedSong&&sourceHandler.setSelectedSong(currentSources.selectedSong),currentSources.selectedPoem&&sourceHandler.setSelectedPoem(currentSources.selectedPoem),currentSources.animations&&sourceHandler.setInitialAnimationList(currentSources.animations),currentSources.libraries&&sourceHandler.setInitialLibrariesList(currentSources.libraries),void 0!==currentSources.inRestrictedShareMode&&(sourceHandler.setInRestrictedShareMode(currentSources.inRestrictedShareMode),(0,_redux.getStore)().dispatch((0,_projectRedux.refreshInRestrictedShareMode)())),void 0!==currentSources.teacherHasConfirmedUploadWarning&&(sourceHandler.setTeacherHasConfirmedUploadWarning(currentSources.teacherHasConfirmedUploadWarning),(0,_redux.getStore)().dispatch((0,_projectRedux.refreshTeacherHasConfirmedUploadWarning)())),_isEditing?(current?(currentSources.source&&sourceHandler.setInitialLevelSource(currentSources.source),currentSources.hiddenDefinitions&&sourceHandler.setInitialHiddenDefinitions(currentSources.hiddenDefinitions)):this.setName("My Project"),appOptions.level.skipRunSave||(0,_jquery.default)(window).on(events_appModeChanged,this.saveIfSourcesChanged.bind(this)),(0,_jquery.default)(window).on(events_appInitialized,function(){this.sourceHandler.getLevelSource(currentSources.source).then((function(response){currentSources.source=response}))}.bind(this)),(0,_jquery.default)(window).on(events_workspaceChange,(function(){hasProjectChanged=!0})),appOptions.level.skipAutosave||window.setInterval(this.autosave.bind(this),3e4),current.hidden?this.isFrozen()||this.showHeaderForProjectBacked():current.isOwner||!parsePath().channelId?this.showProjectHeader():this.showMinimalProjectHeader()):current&&(this.sourceHandler.setInitialLevelSource(currentSources.source),this.showMinimalProjectHeader())):appOptions.legacyShareStyle&&this.getStandaloneApp()&&(this.setName("Untitled Project"),this.showMinimalProjectHeader()),appOptions.noPadding&&(0,_jquery.default)(".full_container").css({padding:"0px"}),showProjectAdmin(this))},projectChanged:function projectChanged(){hasProjectChanged=!0,projectSaveInProgress&&(projectChangedWhileSaveInProgress=!0)},hasOwnerChangedProject:function hasOwnerChangedProject(){return this.isOwner()&&hasProjectChanged},getNewProjectName:function getNewProjectName(){switch(appOptions.app){case"applab":return _locale.default.defaultProjectNameAppLab();case"gamelab":return _locale.default.defaultProjectNameGameLab();case"spritelab":case"thebadguys":return _locale.default.defaultProjectNameSpriteLab();case"weblab":return _locale.default.defaultProjectNameWebLab();case"turtle":switch(appOptions.skinId){case"artist":case"artist_zombie":return _locale.default.defaultProjectNameArtist();case"anna":case"elsa":return _locale.default.defaultProjectNameFrozen()}break;case"studio":if(appOptions.level.useContractEditor)return _locale.default.defaultProjectNameBigGame();switch(appOptions.skinId){case"studio":return _locale.default.defaultProjectNamePlayLab();case"infinity":return _locale.default.defaultProjectNameInfinity();case"gumball":return _locale.default.defaultProjectNameGumball();case"iceage":return _locale.default.defaultProjectNameIceAge();case"hoc2015":return _locale.default.defaultProjectNameStarWars()}break;case"craft":return _locale.default.defaultProjectNameMinecraft();case"flappy":return _locale.default.defaultProjectNameFlappy();case"bounce":return"sports"===appOptions.skinId?_locale.default.defaultProjectNameSports():"basketball"===appOptions.skinId?_locale.default.defaultProjectNameBasketball():_locale.default.defaultProjectNameBounce();case"dance":return _locale.default.defaultProjectNameDance()}return _locale.default.defaultProjectName()},getStandaloneApp:function getStandaloneApp(){if(appOptions.level&&appOptions.level.projectType)return appOptions.level.projectType;switch(appOptions.app){case"applab":case"calc":case"dance":case"eval":case"flappy":case"weblab":case"gamelab":case"thebadguys":case"javalab":return appOptions.app;case"turtle":return"elsa"===appOptions.skinId||"anna"===appOptions.skinId?"frozen":appOptions.level.isK1?"artist_k1":"artist";case"craft":return appOptions.level.isAgentLevel?"minecraft_hero":appOptions.level.isEventLevel?"minecraft_designer":appOptions.level.isConnectionLevel?"minecraft_codebuilder":appOptions.level.isAquaticLevel?"minecraft_aquatic":"minecraft_adventurer";case"studio":return appOptions.level.useContractEditor?"algebra_game":"hoc2015"===appOptions.skinId?appOptions.droplet?"starwars":"starwarsblocks_hour":"iceage"===appOptions.skinId?"iceage":"infinity"===appOptions.skinId?"infinity":"gumball"===appOptions.skinId?"gumball":appOptions.level.isK1?"playlab_k1":"playlab";case"bounce":return"sports"===appOptions.skinId?"sports":"basketball"===appOptions.skinId?"basketball":"bounce";case"poetry":return appOptions.level.standaloneAppName;case"spritelab":return appOptions.level.standaloneAppName||appOptions.app;default:return null}},isWebLab:function isWebLab(){return"weblab"===this.getStandaloneApp()},canServerSideRemix:function canServerSideRemix(){return!current.isOwner||!["artist","playlab"].includes(projects.getStandaloneApp())},isSupportedLevelType:function isSupportedLevelType(){return!!this.getStandaloneApp()},useSourcesApi:function useSourcesApi(){return"weblab"!==this.getStandaloneApp()},appToProjectUrl:function appToProjectUrl(){var app=projects.getStandaloneApp();if(!app)throw new Error("This type of project cannot be run as a standalone app.");return"/projects/"+app},clearHtml:function clearHtml(){currentSources.html=""},saveIfSourcesChanged:function saveIfSourcesChanged(){var _this3=this;return isEditable()?new Promise((function(resolve){_this3.getUpdatedSourceAndHtml_((function(newSources){JSON.stringify(currentSources)!==JSON.stringify(newSources)||thumbnailChanged?(thumbnailChanged=!1,_this3.saveSourceAndHtml_(newSources,resolve)):resolve()}))})):Promise.resolve()},isCurrentCodeDifferent:function isCurrentCodeDifferent(sampleCodeInput){var normalizedSample,normalizedCurrent,sampleCode=sampleCodeInput||"",currentCode=currentSources.source||"",parser=new DOMParser,parsedCurrent=parser.parseFromString(currentCode,"text/xml"),parsedSample=parser.parseFromString(sampleCode,"text/xml");if(parsedCurrent.getElementsByTagName("parsererror").length>0||parsedSample.getElementsByTagName("parsererror").length>0)normalizedSample=sampleCode.replace(/\s+/g,""),normalizedCurrent=currentCode.replace(/\s+/g,"");else{var serializer=new XMLSerializer;normalizedSample=serializer.serializeToString(parsedSample),normalizedCurrent=serializer.serializeToString(parsedCurrent)}return normalizedSample!==normalizedCurrent},save:function save(forceNewVersion,preparingRemix){var _this4=this;if(!isEditable())return Promise.resolve();var completeAsyncSave=function completeAsyncSave(){return new Promise((function(resolve,reject){return _this4.getUpdatedSourceAndHtml_((function(sourceAndHtml){try{_this4.saveSourceAndHtml_(sourceAndHtml,(function(err,result){return err?reject(err):resolve()}),forceNewVersion,preparingRemix)}catch(err){reject(err)}}))}))};return preparingRemix?this.sourceHandler.prepareForRemix().then(completeAsyncSave):completeAsyncSave()},saveSourceAndHtml_:function saveSourceAndHtml_(sourceAndHtml,callback,forceNewVersion,clientSideRemix){if(isEditable()){_header.default.showProjectSaving(),lastNewSourceVersionTime+newSourceVersionInterval=3&&_header.default.showTryAgainDialog(),err.message.includes("httpStatusCode: 422")&&(0,_redux.getStore)().dispatch((0,_projectRedux.displayWorkspaceAlert)(_projectRedux.workspaceAlertTypes.error,_locale.default.invalidCharactersErrorMessage(),!0))):(saveSourcesErrorCount>0&&this.logError_("sources-saved-after-errors",saveSourcesErrorCount,"sources saved after ".concat(saveSourcesErrorCount," consecutive failures")),saveSourcesErrorCount=0,firstSaveTimestamp||(firstSaveTimestamp=response.timestamp),currentSourceVersionId=response.versionId,replaceCurrentSourceVersion=!forceNewVersion,current.migratedToS3=!0,appOptions.reduceChannelUpdates&&initialSaveComplete?(console.log("Skipping channel metadata update"),this.onUpdateChannel(callback,null,current)):this.updateChannels_(callback))}.bind(this))}else this.updateChannels_(callback)}},saveSelectedSong:function saveSelectedSong(id){return this.sourceHandler.setSelectedSong(id),this.save()},saveSelectedPoem:function saveSelectedPoem(poem){return this.sourceHandler.setSelectedPoem(poem),this.save()},setInRestrictedShareMode:function setInRestrictedShareMode(inRestrictedShareMode){return this.sourceHandler.setInRestrictedShareMode(inRestrictedShareMode),this.save()},inRestrictedShareMode:function inRestrictedShareMode(){return this.sourceHandler.inRestrictedShareMode()},setTeacherHasConfirmedUploadWarning:function setTeacherHasConfirmedUploadWarning(hasConfirmedUploadWarning){return this.sourceHandler.setTeacherHasConfirmedUploadWarning(hasConfirmedUploadWarning),this.save()},teacherHasConfirmedUploadWarning:function teacherHasConfirmedUploadWarning(){return this.sourceHandler.teacherHasConfirmedUploadWarning()},updateChannels_:function updateChannels_(callback){var _this5=this;channels.update(current.id,current,(function(err,data){return _this5.onUpdateChannel(callback,err,data)}))},onUpdateChannel:function onUpdateChannel(callback,err,data){initialSaveComplete=!0,this.updateCurrentData_(err,data),executeCallback(callback,err,data)},getSourceForChannel:function getSourceForChannel(channelId,callback){channels.fetch(channelId,(function(err,data){if(err)executeCallback(callback,null);else{var url=channelId+"/main.json";sources.fetch(url,(function(err,data){executeCallback(callback,err?null:data.source)}))}}))},createNewChannelFromSource:function createNewChannelFromSource(source,callback){channels.create({name:"New Project"},(function(err,channelData){sources.put(channelData.id,JSON.stringify({source}),"main.json",(function(err,sourceData){channelData.migratedToS3=!0,channels.update(channelData.id,channelData,(function(err,finalChannelData){executeCallback(callback,finalChannelData)}))}))}))},getUpdatedSourceAndHtml_:function getUpdatedSourceAndHtml_(callback){var _this6=this;this.sourceHandler.getAnimationList((function(animations){return _this6.sourceHandler.getLevelSource().then((function(source){var html=_this6.sourceHandler.getLevelHtml(),makerAPIsEnabled=_this6.sourceHandler.getMakerAPIsEnabled(),selectedSong=_this6.sourceHandler.getSelectedSong(),selectedPoem=_this6.sourceHandler.getSelectedPoem(),libraries=_this6.sourceHandler.getLibrariesList(),inRestrictedShareMode=_this6.sourceHandler.inRestrictedShareMode(),teacherHasConfirmedUploadWarning=_this6.sourceHandler.teacherHasConfirmedUploadWarning(),hiddenDefinitions=_this6.sourceHandler.getHiddenDefinitions();callback({source,html,animations,makerAPIsEnabled,selectedSong,selectedPoem,libraries,inRestrictedShareMode,teacherHasConfirmedUploadWarning,hiddenDefinitions})})).catch((function(error){return callback({error})}))}))},getSelectedSong:function getSelectedSong(){return currentSources.selectedSong},setMakerEnabled:function setMakerEnabled(apisEnabled){var _this7=this;return new Promise((function(resolve){_this7.getUpdatedSourceAndHtml_((function(sourceAndHtml){_this7.saveSourceAndHtml_(_objectSpread(_objectSpread({},sourceAndHtml),{},{makerAPIsEnabled:apisEnabled}),(function(){resolve(),utils.reload()}))}))}))},setProjectLibraries:function setProjectLibraries(updatedLibrariesList){var _this8=this;return appOptions.level.editBlocks&&(currentSources.libraries=updatedLibrariesList,updatedLibrariesList.forEach((function(library){library.fromLevelbuilder=!0}))),new Promise((function(resolve){_this8.getUpdatedSourceAndHtml_((function(sourceAndHtml){_this8.saveSourceAndHtml_(_objectSpread(_objectSpread({},sourceAndHtml),{},{libraries:updatedLibrariesList}),(function(){resolve(),utils.reload()}))}))}))},getProjectLibraries:function getProjectLibraries(){var startLibraries=appOptions.level.startLibraries;return currentSources.libraries||startLibraries&&JSON.parse(startLibraries)},getLevelName:function getLevelName(){var name=current&¤t.name;return name=name||appOptions.level.name},showSaveError_:function showSaveError_(){_header.default.showProjectSaveError()},logError_:function logError_(errorType,errorCount,errorText){var shareUrl=this.getStandaloneApp()?this.getShareUrl():"";return _firehose.default.putRecord({study:"project-data-integrity",study_group:"v4",event:errorType,data_int:errorCount,project_id:current&¤t.id+"",data_string:errorText,data_json:JSON.stringify({errorCount,errorText,isOwner:this.isOwner(),currentUrl:window.location.href,shareUrl,currentSourceVersionId})},{includeUserId:!0})},updateCurrentData_:function updateCurrentData_(err,data){var options=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},shouldNavigate=options.shouldNavigate;if(err)return saveChannelErrorCount++,this.showSaveError_(),this.logError_("save-channel-error",saveChannelErrorCount,err+""),void(saveChannelErrorCount>=3&&_header.default.showTryAgainDialog());saveChannelErrorCount&&this.logError_("channel-saved-after-errors",saveChannelErrorCount,"channel save succeeded after ".concat(saveChannelErrorCount," consecutive failures")),saveChannelErrorCount=0,_header.default.hideTryAgainDialog(),current=current||{},Object.assign(current,data),shouldNavigate&&(_isEditing&&parsePath().appName?window.history.pushState&&window.history.pushState(null,document.title,this.getPathName("edit")):location.href=this.getPathName("edit")),_header.default.updateTimestamp()},autosave:function autosave(callback){var _this9=this,callCallback=function callCallback(){callback&&callback()};null!==currentSources.source&&(appOptions.droplet||hasProjectChanged)&&0===(0,_jquery.default)("#designModeViz .ui-draggable-dragging").length?(projectSaveInProgress=!0,this.getUpdatedSourceAndHtml_((function(newSources){return newSources.error?(_header.default.showProjectSaveError(),void callCallback()):JSON.stringify(currentSources)===JSON.stringify(newSources)?(projectChangedWhileSaveInProgress||(hasProjectChanged=!1),projectSaveInProgress=!1,projectChangedWhileSaveInProgress=!1,void callCallback()):void _this9.saveSourceAndHtml_(newSources,(function(){projectChangedWhileSaveInProgress||(hasProjectChanged=!1),projectSaveInProgress=!1,projectChangedWhileSaveInProgress=!1,callCallback()}))}))):callCallback()},rename:function rename(newName){return this.setName(newName),this.save().catch((function(error){if(error.responseText){var parsed=JSON.parse(error.responseText);throw new _NameFailureError.default(parsed.nameFailure)}throw new Error("Unknown error")}))},freeze:function freeze(callback){current&¤t.isOwner&&(current.frozen=!0,current.hidden=!0,this.updateChannels_(callback))},unfreeze:function unfreeze(callback){current&¤t.isOwner&&(current.frozen=!1,current.hidden=!1,this.updateChannels_(callback))},copy:function copy(newName){var _this10=this,options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},shouldPublish=options.shouldPublish,queryParams=(current=current||{}).id?{parent:current.id}:null;return delete current.id,delete current.hidden,delete current.libraryName,delete current.libraryDescription,current.projectType=this.getStandaloneApp(),shouldPublish&&(current.shouldPublish=!0),this.setName(newName),new Promise((function(resolve,reject){channels.create(current,(function(err,data){_this10.updateCurrentData_(err,data,options),err?reject(err):resolve()}),queryParams)})).then((function(){return _this10.save(!1,!0)}))},copyAssets:function copyAssets(srcChannel,callback){if(srcChannel){var destChannel=current.id;assets.copyAll(srcChannel,destChannel,(function(err){err?_header.default.showProjectSaveError():executeCallback(callback)}))}else executeCallback(callback)},copyAnimations:function copyAnimations(srcChannel,callback){executeCallback(callback)},serverSideRemix:function serverSideRemix(){var _this11=this;return function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var url,redirectToRemix;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(redirectToRemix=function _redirectToRemix(){utils.navigateToHref("".concat(projects.getPathName("remix")))},current&&!current.name&&(url=projects.appToProjectUrl(),_this11.setName("/projects/algebra_game"===url?"Big Game Template":"My Project")),!current.isOwner){_context.next=7;break}return _context.next=5,projects.save(!1,!0).then(redirectToRemix);case 5:_context.next=8;break;case 7:redirectToRemix();case 8:case"end":return _context.stop()}}),_callee)})))()},createNew:function createNew(){var url="".concat(projects.appToProjectUrl(),"/new");projects.save().then((function(){location.href=url}))},delete:function _delete(callback){var channelId=current.id;channels.delete(channelId,(function(err,data){executeCallback(callback,data)}))},load:function load(){return projects.isProjectLevel()?redirectFromHashUrl()||redirectEditView()?Promise.resolve():this.loadStandaloneProject_():appOptions.channel?this.loadProjectBackedLevel_():Promise.resolve()},loadStandaloneProject_:function loadStandaloneProject_(){var _this12=this,pathInfo=parsePath();return pathInfo.channelId?("edit"===pathInfo.action?_isEditing=!0:(0,_jquery.default)("#betainfo").hide(),this.fetchChannel(pathInfo.channelId).catch((function(err){return Promise.reject(err)})).then(this.fetchSource.bind(this)).catch((function(err){return Promise.reject(err)})).then((function(){return current.isOwner&&"view"===pathInfo.action&&(_isEditing=!0),fetchAbuseScoreAndPrivacyViolations(_this12)}))):(_isEditing=!0,Promise.resolve())},loadProjectBackedLevel_:function loadProjectBackedLevel_(){var _this13=this;return _isEditing=!0,this.fetchChannel(appOptions.channel).catch((function(err){return Promise.reject(err)})).then(this.fetchSource.bind(this)).catch((function(err){return Promise.reject(err)})).then((function(){return projects.showHeaderForProjectBacked(),fetchAbuseScoreAndPrivacyViolations(_this13)}))},getPathName:function getPathName(action){var projectId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentId(),pathName=this.appToProjectUrl()+"/"+projectId;return action&&(pathName+="/"+action),pathName},getThumbnailUrl:function getThumbnailUrl(){return current&¤t.thumbnailUrl},setThumbnailUrl:function setThumbnailUrl(){current.thumbnailUrl="/v3/files/".concat(current.id,"/").concat(".metadata/thumbnail.png"),thumbnailChanged=!0},setThumbnailPngBlob:function setThumbnailPngBlob(pngBlob){pngBlob&&(thumbnailPngBlob=pngBlob,projects.setThumbnailUrl())},saveThumbnail:function saveThumbnail(pngBlob){return pngBlob?current?current.isOwner?new Promise((function(resolve,reject){_clientApi.files.putFile(".metadata/thumbnail.png",pngBlob,(function(){projects.setThumbnailUrl(),initialCaptureComplete||(initialCaptureComplete=!0),resolve()}),(function(error){reject("error saving thumbnail image: ".concat(error))}))})):Promise.reject("Project not owned by current user."):Promise.reject("Project not initialized."):Promise.reject("PNG blob required.")},setPublishedAt:function setPublishedAt(publishedAt){(current=current||{}).publishedAt=publishedAt},fetchChannel:function fetchChannel(channelId){var _this14=this;return new Promise((function(resolve,reject){channels.fetch(channelId,(function(err,data,jqXhr,response){fetchChannelResponseCode=null==response?void 0:response.status,err?reject(err):resolve(data)}))})).catch((function(err){return _this14.logError_("load-channel-error",null,"unable to fetch project channel: ".concat(err)),Promise.reject(err)}))},fetchSource:function fetchSource(channelData){var _this15=this;delete channelData.levelSource,delete channelData.levelHtml,delete channelData.html,current=channelData,projects.setTitle(current.name);var sourcesApi=this.getSourcesApi_();if(sourcesApi&&channelData.migratedToS3){var url=current.id+"/main.json",version=(0,_utils2.queryParams)("version");return version&&(url+="?version="+version),new Promise((function(resolve,reject){sourcesApi.fetch(url,(function(err,data,jqXHR,response){fetchSourceResponseCode=null==response?void 0:response.status,err?reject(err):resolve({data,jqXHR})}))})).catch((function(err){return _this15.logError_("load-sources-error",null,"unable to fetch project source file: ".concat(err)),Promise.reject(err)})).then((function(_ref2){var data=_ref2.data,jqXHR=_ref2.jqXHR;currentSourceVersionId=jqXHR&&jqXHR.getResponseHeader("S3-Version-Id"),unpackSources(data)}))}return Promise.resolve()},getSourcesApi_:function getSourcesApi_(){var sourcesApi,useSourcesPublic=appOptions.share&&appOptions.level&&"dance"===appOptions.level.projectType;return this.useSourcesApi()&&(sourcesApi=useSourcesPublic?sourcesPublic:sources),sourcesApi}};function fetchAbuseScore(resolve){channels.fetch(current.id+"/abuse",(function(err,data){if(currentAbuseScore=data&&data.abuse_score||currentAbuseScore,resolve(),err)throw err}))}function fetchSharingDisabled(resolve){channels.fetch(current.id+"/sharing_disabled",(function(err,data){if(sharingDisabled=data&&data.sharing_disabled||sharingDisabled,resolve(),err)throw err}))}function fetchShareFailure(resolve){channels.fetch(current.id+"/share-failure",(function(err,data){if(currentShareFailureEnglish=data&&data.share_failure&&data.share_failure.content?data.share_failure.content:currentShareFailureEnglish,currentShareFailureIntl=data&&data.intl_share_failure&&data.intl_share_failure.content?data.intl_share_failure.content:currentShareFailureIntl,intlLanguage=data&&data.language?data.language:intlLanguage,resolve(),err)throw err}))}function fetchPrivacyProfanityViolations(resolve){channels.fetch(current.id+"/privacy-profanity",(function(err,data){if(currentHasPrivacyProfanityViolation=data&&!!data.has_violation||currentHasPrivacyProfanityViolation,resolve(),err)throw err}))}function fetchAbuseScoreAndPrivacyViolations(project){var promises=[new Promise(fetchAbuseScore),new Promise(fetchShareFailure)];return"playlab"===project.getStandaloneApp()?promises.push(new Promise(fetchPrivacyProfanityViolations)):("applab"===project.getStandaloneApp()||"gamelab"===project.getStandaloneApp()||project.isWebLab())&&promises.push(new Promise(fetchSharingDisabled)),Promise.all(promises)}function executeCallback(callback){if("function"==typeof callback){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];callback.apply(void 0,args)}}function isEditable(){return current&¤t.isOwner&&!current.frozen&&!(0,_utils2.queryParams)("version")}function redirectEditView(){var newUrl,parseInfo=parsePath();if(parseInfo.action&¤t)return"view"===parseInfo.action&&isEditable()?(newUrl=location.href.replace(/(\/projects\/[^/]+\/[^/]+)\/view/,"$1/edit"),appOptions.readonlyWorkspace=!1,_isEditing=!0):"edit"!==parseInfo.action||isEditable()||(newUrl=location.href.replace(/(\/projects\/[^/]+\/[^/]+)\/edit/,"$1/view"),appOptions.readonlyWorkspace=!0,_isEditing=!1),newUrl&&newUrl!==location.href&&window.history.pushState&&window.history.pushState({modified:!0},document.title,newUrl),!1}function redirectFromHashUrl(){var newUrl=location.href.replace("#","/");return newUrl!==location.href&&(location.href=newUrl,!0)}function parsePath(){var pathname=utils.currentLocation().pathname;utils.currentLocation().hash&&(pathname+=utils.currentLocation().hash.replace("#","/"));var tokens=pathname.split("/");if("p"!==tokens[PathPart_PROJECTS]&&"projects"!==tokens[PathPart_PROJECTS])return{appName:null,channelId:null,action:null};var channelId=tokens[PathPart_CHANNEL_ID];return utils.currentLocation().search.indexOf("nosource")>=0&&(channelId=channelId.split("").map((function(_char){return _constants.ALPHABET[_constants.CIPHER.indexOf(_char)]||_char})).join("")),{appName:tokens[PathPart_APP],channelId,action:tokens[PathPart_ACTION]}}},"./src/code-studio/initApp/userAgentParser.js":module=>{module.exports.isMobile=function(){return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile/.test(window.navigator.userAgent)},module.exports.isSafari=function(){return-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")}},"./src/code-studio/isRtlRedux.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function locale(){var state=arguments.length>0&&void 0!==arguments[0]&&arguments[0],action=arguments.length>1?arguments[1]:void 0;if("isRtl/SET_RTL"===action.type)return action.isRtl;return state},exports.isRtlFromDOM=isRtlFromDOM,exports.setRtlFromDOM=exports.setRtl=void 0;var setRtl=function setRtl(isRtl){return{type:"isRtl/SET_RTL",isRtl}};exports.setRtl=setRtl;function isRtlFromDOM(){var head=document.getElementsByTagName("head")[0];if(head&&head.parentElement){var dir=head.parentElement.getAttribute("dir");return!(!dir||"rtl"!==dir.toLowerCase())}return!1}exports.setRtlFromDOM=function setRtlFromDOM(){return setRtl(isRtlFromDOM())}},"./src/code-studio/lessonLockRedux.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.closeLockDialog=exports.beginSave=exports.authorizeLockable=exports.LockStatus=exports.FINISH_SAVE=exports.CLOSE_LOCK_DIALOG=exports.BEGIN_SAVE=void 0,exports.default=function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;if("lessonLock/AUTHORIZE_LOCKABLE"===action.type)return Object.assign({},state,{lockableAuthorized:action.isAuthorized,lockableAuthorizedLoaded:!0});if("lessonLock/SET_SECTION_LOCK_STATUS"===action.type)return _objectSpread(_objectSpread({},state),{},{lessonsBySectionId:_lodash.default.mapValues(action.sections,(function(section){return section.lessons})),lessonsBySectionIdLoaded:!0});if("lessonLock/REFRESH_SECTION_LOCK_STATUS"===action.type){var lessonsBySectionId=_lodash.default.mapValues(action.sections,(function(section){return section.lessons})),lockDialogLessonId=state.lockDialogLessonId;if(lockDialogLessonId){var lockStatus=lockStatusForLesson(lessonsBySectionId[action.sectionId],lockDialogLessonId);return _objectSpread(_objectSpread({},state),{},{lessonsBySectionId,lockStatus})}return _objectSpread(_objectSpread({},state),{},{lessonsBySectionId})}if(action.type===_teacherSectionsRedux.SELECT_SECTION){if(0===Object.keys(state.lessonsBySectionId).length)return state;var sectionId=action.sectionId;if(sectionId===_teacherSectionsRedux.NO_SECTION)return _objectSpread(_objectSpread({},state),{},{lockStatus:initialState.lockStatus});if(!state.lessonsBySectionId[sectionId])throw new Error("Unknown sectionId ".concat(sectionId));var _lockDialogLessonId=state.lockDialogLessonId;if(_lockDialogLessonId)return _objectSpread(_objectSpread({},state),{},{lockStatus:lockStatusForLesson(state.lessonsBySectionId[sectionId],_lockDialogLessonId)})}if("lessonLock/OPEN_LOCK_DIALOG"===action.type){var _sectionId=action.sectionId,lessonId=action.lessonId;return Object.assign({},state,{lockDialogLessonId:lessonId,lockStatus:lockStatusForLesson(state.lessonsBySectionId[_sectionId],lessonId)})}if(action.type===CLOSE_LOCK_DIALOG)return Object.assign({},state,{lockDialogLessonId:null,lockStatus:initialState.lockStatus});if(action.type===BEGIN_SAVE)return Object.assign({},state,{saving:!0});if(action.type===FINISH_SAVE){var _lessonsBySectionId=state.lessonsBySectionId,nextLockStatus=action.lockStatus,_sectionId2=action.sectionId,_lessonId=action.lessonId,nextLesson=_lodash.default.cloneDeep(_lessonsBySectionId[_sectionId2][_lessonId]);nextLesson.forEach((function(item,index){var update=nextLockStatus[index];if(item.user_level_id!==update.userLevelId)throw new Error("Expect user ids be the same");item.locked=update.lockStatus===LockStatus.Locked,item.readonly_answers=update.lockStatus===LockStatus.ReadonlyAnswers}));var nextState=_lodash.default.cloneDeep(state);return nextState.lessonsBySectionId[_sectionId2][_lessonId]=nextLesson,Object.assign(nextState,{lockStatus:nextLockStatus,saving:!1})}return state},exports.setSectionLockStatus=exports.saveLockDialog=exports.refetchSectionLockStatus=exports.openLockDialog=exports.lockLesson=exports.fullyLockedLessonMapping=exports.finishSave=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_utils=__webpack_require__("./src/utils.js"),_teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getContainedLevelId=getContainedLevelId,exports.getContainedLevelResult=getContainedLevelResult,exports.getLevel=getLevel,exports.getLevelIds=getLevelIds,exports.getResult=function getResult(){if(!registeredGetResult)return void console.error("No getResult function");return registeredGetResult()},exports.hasValidContainedLevelResult=function hasValidContainedLevelResult(){return getContainedLevelResult().result.valid},exports.lockContainedLevelAnswers=function lockContainedLevelAnswers(){var levelIds=getLevelIds();if(1!==levelIds.length)throw new Error("Expected exactly one contained level. Got ".concat(levelIds.length));getLevel(levelIds[0]).lockAnswers()},exports.onAnswerChanged=function onAnswerChanged(levelId,saveThisAnswer){if(answerChangedFn)return answerChangedFn(levelId,saveThisAnswer)},exports.registerAnswerChangedFn=function registerAnswerChangedFn(fn){answerChangedFn=fn},exports.registerGetResult=function registerGetResult(){var getResultFunction=arguments.length>0&&void 0!==arguments[0]?arguments[0]:basicGetResult;if(registeredGetResult)return void console.error("already have a getResult function");registeredGetResult=getResultFunction},exports.registerLevel=function registerLevel(levelId,level){objectHasFieldOfType(level,"getResult","function"),objectHasFieldOfType(level,"getAppName","function"),objectHasFieldOfType(level,"lockAnswers","function"),objectHasFieldOfType(level,"getCurrentAnswerFeedback","function"),objectHasFieldOfType(level,"levelId","number"),levelGroup[levelId]=level},exports.resetContainedLevel=function resetContainedLevel(){var levelIds=getLevelIds();if(1!==levelIds.length)throw new Error("Expected exactly one contained level. Got ".concat(levelIds.length));return function getAuthenticityToken(){return authenticityToken?Promise.resolve():fetch("/user_levels/get_token",{headers:{credentials:"same-origin"}}).then((function(response){response.ok&&(authenticityToken=response.headers.get("csrf-token"))}))}().then((function(){return fetch("/delete_predict_level_progress",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-CSRF-Token":authenticityToken},body:JSON.stringify({script_id:appOptions.serverScriptId,level_id:levelIds[0]})}).then((function(response){if(!response.ok)throw"Error resetting answer with status code ".concat(response.status);getLevel(levelIds[0]).resetAnswers(),$("#runButton").prop("disabled",!0)}))}))};var registeredGetResult=null,answerChangedFn=null,authenticityToken=null,levelGroup={};function basicGetResult(){return{response:"ok",result:!0}}function objectHasFieldOfType(obj,field,type){if(!obj[field])throw new Error("Expected object to have field of ".concat(field));if(_typeof(obj[field])!==type)throw new Error("Expected object['".concat(field,"'] to have type of ").concat(type))}function getLevel(levelId){return levelGroup[levelId]}function getLevelIds(){return Object.keys(levelGroup)}function getContainedLevelId(){var levelIds=getLevelIds();if(1!==levelIds.length)throw new Error("Expected exactly one contained level. Got ".concat(levelIds.length));return levelIds[0]}function getContainedLevelResult(){var level=getLevel(getContainedLevelId());return{id:level.levelId,app:level.getAppName(),callback:appOptions.report.sublevelCallback+level.levelId,result:level.getResult(),feedback:level.getCurrentAnswerFeedback()}}},"./src/code-studio/levels/dialogHelper.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSuccessDialog=getSuccessDialog,exports.processResults=function processResults(_onComplete,beforeHook){beforeHook?beforeHook(sendResultsCompletion):sendResultsCompletion();function sendResultsCompletion(){var results=(0,_codeStudioLevels.getResult)(),response=results.response,result=results.result,errorDialog=results.errorDialog,testResult=results.testResult?results.testResult:result?100:0,submitted=results.submitted||!1;result?appOptions.dialog.skipSound||_Sounds.default.getSingleton().play("success"):(errorDialog?showDialog(errorDialog):showDialog(_react.default.createElement(_LegacyDialogContents.LegacyErrorDialog,null),null,adjustScroll),appOptions.dialog.skipSound||_Sounds.default.getSingleton().play("failure")),window.dashboard.reporting.sendReport({program:response,fallbackResponse:appOptions.dialog.fallbackResponse,callback:appOptions.dialog.callback,app:appOptions.dialog.app,level:appOptions.dialog.level,result,pass:result,testResult,submitted,onComplete:function onComplete(){var lastServerResponse=window.dashboard.reporting.getLastServerResponse(),willRedirect=!!lastServerResponse.nextRedirect;if(_onComplete&&_onComplete(willRedirect),lastServerResponse.videoInfo)window.dashboard.videos.showVideoDialog(lastServerResponse.videoInfo);else if(lastServerResponse.endOfLessonExperience){var body=document.createElement("div"),lessonInfo=lastServerResponse.previousStageInfo,lessonName="".concat(_locale.default.lesson()," ").concat(lessonInfo.position,": ").concat(lessonInfo.name);_reactDom.default.render(_react.default.createElement(_playzone.default,{lessonName,onContinue:function onContinue(){dialog.hide()}}),body);var dialog=new _LegacyDialog.default({body,width:800,redirect:lastServerResponse.nextRedirect});dialog.show()}else lastServerResponse.nextRedirect&&(appOptions.dialog.shouldShowDialog?showDialog(getSuccessDialog(appOptions),null,(function(){var lastServerResponse=window.dashboard.reporting.getLastServerResponse();lastServerResponse.nextRedirect&&(window.location.href=lastServerResponse.nextRedirect)})):window.location.href=lastServerResponse.nextRedirect)}})}},exports.showDialog=showDialog;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_playzone=_interopRequireDefault(__webpack_require__("./src/code-studio/components/playzone.jsx")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_codeStudioLevels=__webpack_require__("./src/code-studio/levels/codeStudioLevels.js"),_LegacyDialog=_interopRequireDefault(__webpack_require__("./src/code-studio/LegacyDialog.js")),_experiments=_interopRequireDefault(__webpack_require__("./src/util/experiments.js")),_Sounds=_interopRequireDefault(__webpack_require__("./src/Sounds.js")),_LegacyDialogContents=__webpack_require__("./src/lib/ui/LegacyDialogContents.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var adjustedScroll=!1;function showDialog(component,callback,onHidden){if(!_experiments.default.isEnabled(_experiments.default.BYPASS_DIALOG_POPUP)){var div=document.createElement("div");_reactDom.default.render(component,div);var content=div.childNodes[0],dialog=new _LegacyDialog.default({body:content,onHidden,autoResizeScrollableElement:".scrollable-element"});return(0,_jquery.default)(content).find("#ok-button").click((function(){dialog.hide(),callback&&callback()})),(0,_jquery.default)(content).find("#cancel-button").click((function(){dialog.hide()})),dialog.show(),dialog}}function adjustScroll(){if(!adjustedScroll){var win=(0,_jquery.default)(window),el=(0,_jquery.default)(".mainblock");win.scrollTop()+win.height(){"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CohortViewTable=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_reactTooltip=_interopRequireDefault(__webpack_require__("./node_modules/react-tooltip/dist/index.js")),Table=_interopRequireWildcard(__webpack_require__("./node_modules/reactabular-table/dist/index.js")),sort=_interopRequireWildcard(__webpack_require__("./node_modules/sortabular/dist/index.js")),_color=_interopRequireDefault(__webpack_require__("./src/util/color.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_lodash=_interopRequireWildcard(__webpack_require__("./node_modules/lodash/lodash.js")),_moment=_interopRequireDefault(__webpack_require__("./node_modules/moment/moment.js")),_wrapped_sortable=_interopRequireDefault(__webpack_require__("./src/templates/tables/wrapped_sortable.js")),_sharedWorkshopConstants=__webpack_require__("./src/generated/pd/sharedWorkshopConstants.js"),_constants=__webpack_require__("./src/code-studio/pd/application_dashboard/constants.js"),_regional_partner_dropdown=__webpack_require__("./src/code-studio/pd/components/regional_partner_dropdown.jsx");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CohortViewTeacherApp=void 0;var _react=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js")),_cohort_view_table=__webpack_require__("./src/code-studio/pd/application_dashboard/cohort_view_table.jsx"),_sharedWorkshopConstants=__webpack_require__("./src/generated/pd/sharedWorkshopConstants.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getApplicationStatuses=exports.StatusColors=exports.ScholarshipStatusRequiredStatuses=exports.ApplicationFinalStatuses=void 0;var _color=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./src/util/color.js"));var STATUS_GREEN={backgroundColor:_color.default.level_perfect,color:_color.default.black},STATUS_ORANGE={backgroundColor:_color.default.lighter_orange,color:_color.default.black},STATUS_GRAY={backgroundColor:_color.default.charcoal,color:_color.default.white},StatusColors={incomplete:STATUS_GRAY,reopened:STATUS_GRAY,awaiting_admin_approval:STATUS_GRAY,unreviewed:{backgroundColor:_color.default.lightest_cyan,color:_color.default.black},pending:STATUS_ORANGE,pending_space_availability:STATUS_ORANGE,accepted:STATUS_GREEN,declined:{backgroundColor:_color.default.red,color:_color.default.white},withdrawn:{backgroundColor:_color.default.lightest_red,color:_color.default.black}};exports.StatusColors=StatusColors;exports.ApplicationFinalStatuses=["accepted","declined","pending_space_availability","withdrawn"];exports.ScholarshipStatusRequiredStatuses=["accepted"];function autoEmailText(addAutoEmail){return addAutoEmail?" (auto-email)":""}exports.getApplicationStatuses=function getApplicationStatuses(){var addAutoEmail=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{incomplete:"Incomplete",awaiting_admin_approval:"Awaiting Admin Approval".concat(autoEmailText(addAutoEmail)),unreviewed:"Unreviewed",reopened:"Reopened",pending:"Pending",pending_space_availability:"Pending Space Availability",accepted:"Accepted".concat(autoEmailText(addAutoEmail)),declined:"Declined".concat(autoEmailText(addAutoEmail)),withdrawn:"Withdrawn"}}},"./src/code-studio/pd/components/regional_partner_dropdown.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.UNMATCHED_PARTNER_VALUE=exports.UNMATCHED_PARTNER_OPTION=exports.UNMATCHED_PARTNER_LABEL=exports.RegionalPartnerValuePropType=exports.RegionalPartnerShape=exports.RegionalPartnerPropType=exports.RegionalPartnerDropdown=exports.ALL_PARTNERS_VALUE=exports.ALL_PARTNERS_OPTION=exports.ALL_PARTNERS_LABEL=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_reactSelect=_interopRequireDefault(__webpack_require__("./node_modules/react-select/dist/react-select.es.js")),_constants=__webpack_require__("./src/code-studio/pd/constants.js"),_regional_partners_reducers=__webpack_require__("./src/code-studio/pd/components/regional_partners_reducers.js"),_permission=__webpack_require__("./src/code-studio/pd/workshop_dashboard/permission.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"application_dashboard/SET_REGIONAL_PARTNER_FILTER":return sessionStorage.setItem("regionalPartnerFilter",JSON.stringify(action.filter)),_objectSpread(_objectSpread({},state),{},{regionalPartnerFilter:action.filter});case"application_dashboard/SET_REGIONAL_PARTNER_GROUP":return _objectSpread(_objectSpread({},state),{},{regionalPartnerGroup:action.group});case SET_REGIONAL_PARTNERS:return _objectSpread(_objectSpread({},state),{},{regionalPartners:action.partners});default:return state}},exports.getInitialRegionalPartnerFilter=function getInitialRegionalPartnerFilter(isWorkshopAdmin,regionalPartners,defaultAdminFilter){var regionalPartnerFilter=JSON.parse(sessionStorage.getItem("regionalPartnerFilter"));regionalPartnerFilter||(regionalPartnerFilter=isWorkshopAdmin?defaultAdminFilter||_regional_partner_dropdown.UNMATCHED_PARTNER_OPTION:1===regionalPartners.length?{label:regionalPartners[0].name,value:regionalPartners[0].id}:_regional_partner_dropdown.ALL_PARTNERS_OPTION);return regionalPartnerFilter},exports.setRegionalPartners=exports.setRegionalPartnerGroup=exports.setRegionalPartnerFilter=void 0;var _regional_partner_dropdown=__webpack_require__("./src/code-studio/pd/components/regional_partner_dropdown.jsx");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var Spinner=function(_React$Component){function Spinner(){return _React$Component.apply(this,arguments)||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(Spinner,_React$Component),Spinner.prototype.render=function render(){var _this$props=this.props,size=_this$props.size,style=_this$props.style,displaySize="small"===size?"":"medium"===size?"fa-2x":"fa-3x";return _react.default.createElement(_FontAwesome.default,{style,icon:"spinner",className:"fa-pulse ".concat(displaySize)})},Spinner}(_react.default.Component);exports.default=Spinner,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(Spinner,"propTypes",{size:_propTypes.default.oneOf(["small","medium","large"]),style:_propTypes.default.object}),module.exports=exports.default},"./src/code-studio/pd/constants.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.PrivacyDialogMode=void 0;var utils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/utils.js"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}exports.SelectStyleProps={menuContainerStyle:{maxHeight:400},menuStyle:{maxHeight:398}};var PrivacyDialogMode=utils.makeEnum("TEACHER_APPLICATION","PRINCIPAL_APPROVAL");exports.PrivacyDialogMode=PrivacyDialogMode},"./src/code-studio/pd/foorm/Foorm.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var Survey=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/survey-react/survey.react.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_spinner=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/components/spinner.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i=2e3?0:2e3-elapsedTime)},_proto.render=function render(){var _this3=this,css=_objectSpread(_objectSpread({},this.defaultCss),this.props.customCssClasses);return _react.default.createElement("div",null,_react.default.createElement(Survey.Survey,{model:this.surveyModel,onComplete:this.onComplete,data:this.props.surveyData,css,requiredText:"(Required)",showCompletedPage:!1,maxTextLength:4e3,maxOthersLength:4e3}),this.state.statusMessage&&_react.default.createElement("div",{style:styles.statusMessage},_react.default.createElement("h4",null,this.state.statusMessage),this.state.submitting&&_react.default.createElement(_spinner.default,null),this.state.hasError&&this.state.survey&&_react.default.createElement(_reactBootstrap.Button,{onClick:function onClick(){return _this3.onComplete(_this3.state.survey)}},"Try Again")))},Foorm}(_react.default.Component);exports.default=Foorm,_defineProperty(Foorm,"propTypes",{formQuestions:_propTypes.default.object.isRequired,formName:_propTypes.default.string.isRequired,formVersion:_propTypes.default.number.isRequired,submitApi:_propTypes.default.string.isRequired,surveyData:_propTypes.default.object,submitParams:_propTypes.default.object,customCssClasses:_propTypes.default.object,onComplete:_propTypes.default.func,inEditorMode:_propTypes.default.bool}),_defineProperty(Foorm,"defaultProps",{customCssClasses:{}});var styles={statusMessage:{textAlign:"center"}};module.exports=exports.default},"./src/code-studio/pd/form_components/ButtonList.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.otherString=exports.default=exports.ButtonList=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_utils=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/utils.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}exports.otherString="Other:";var ButtonList=function(_React$Component){function ButtonList(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleChange",(function(event){var value;if("radio"===_this.props.type)value=event.target.value;else if("check"===_this.props.type){var currentSelection=new Set(_this.props.selectedItems);event.target.checked?currentSelection.add(event.target.value):currentSelection.delete(event.target.value),value=currentSelection.size>0?Array.from(currentSelection):null}_this.props.onChange(_defineProperty({},_this.props.groupName,value))})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(ButtonList,_React$Component);var _proto=ButtonList.prototype;return _proto.handleAnswerInputChange=function handleAnswerInputChange(answer,event){answer.onInputChange(event.target.value)},_proto.renderInputComponents=function renderInputComponents(){var _this2=this,InputComponent={radio:_reactBootstrap.Radio,check:_reactBootstrap.Checkbox}[this.props.type],answers=this.props.answers;return this.props.includeOther&&(answers=_lodash.default.concat(answers,{answerText:"Other:",inputId:"".concat(this.props.groupName,"_other")})),answers.map((function(answer,i){var _utils$normalizeAnswe=_utils.default.normalizeAnswer(answer),answerText=_utils$normalizeAnswe.answerText,answerValue=_utils$normalizeAnswe.answerValue,checked="radio"===_this2.props.type?_this2.props.selectedItems===answerValue:!!(_this2.props.selectedItems&&_this2.props.selectedItems.indexOf(answerValue)>=0);return _react.default.createElement(InputComponent,{value:answerValue,label:answerText,key:i,name:_this2.props.groupName,onChange:_this2.props.onChange?_this2.handleChange:void 0,checked:_this2.props.onChange?checked:void 0},"object"===_typeof(answer)&&void 0===answer.answerValue?_react.default.createElement("div",null,_react.default.createElement("span",{style:styles.inputLabel},answerText)," ",_react.default.createElement("input",{type:"text",value:answer.onInputChange?answer.inputValue||"":void 0,id:answer.inputId,maxLength:"200",onChange:answer.onInputChange?_this2.handleAnswerInputChange.bind(_this2,answer):void 0})):answerText)}))},_proto.render=function render(){var validationState=this.props.validationState;this.props.errorText&&(validationState="error");var columnCount=this.props.columnCount?this.props.columnCount:1;return _react.default.createElement(_reactBootstrap.FormGroup,{id:this.props.groupName,controlId:this.props.groupName,validationState},_react.default.createElement(_reactBootstrap.ControlLabel,null,this.props.label,this.props.required&&_react.default.createElement("span",{style:{color:"red"}}," *")),_react.default.createElement(_reactBootstrap.FormGroup,{style:{columnCount}},this.renderInputComponents()),this.props.errorText&&_react.default.createElement(_reactBootstrap.HelpBlock,null,this.props.errorText),!this.props.suppressLineBreak&&_react.default.createElement("br",null))},ButtonList}(_react.default.Component);exports.ButtonList=ButtonList,_defineProperty(ButtonList,"propTypes",{type:_propTypes.default.oneOf(["radio","check"]).isRequired,label:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.element]).isRequired,groupName:_propTypes.default.string.isRequired,answers:_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.shape({answerText:_propTypes.default.string.isRequired,inputId:_propTypes.default.string,inputValue:_propTypes.default.string,onInputChange:_propTypes.default.func}),_propTypes.default.shape({answerText:_propTypes.default.string.isRequired,answerValue:_propTypes.default.string.isRequired})])).isRequired,includeOther:_propTypes.default.bool,onChange:_propTypes.default.func,selectedItems:_propTypes.default.oneOfType([_propTypes.default.array,_propTypes.default.string]),required:_propTypes.default.bool,validationState:_propTypes.default.string,errorText:_propTypes.default.string,columnCount:_propTypes.default.number,suppressLineBreak:_propTypes.default.bool}),_defineProperty(ButtonList,"defaultProps",{suppressLineBreak:!1});var styles={inputLabel:{verticalAlign:"top",marginRight:15}},_default=ButtonList;exports.default=_default},"./src/code-studio/pd/form_components/ButtonList.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.RadioButtons=exports.CheckboxesWithCustom=exports.CheckboxesIncludeOther=exports.Checkboxes=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ButtonList=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/ButtonList.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"ButtonList",component:_ButtonList.default};exports.default=_default;var Template=function Template(args){return _react.default.createElement(_ButtonList.default,args)},RadioButtons=Template.bind({});exports.RadioButtons=RadioButtons,RadioButtons.args={type:"radio",label:"What is your favorite pet?",groupName:"favoritePet",answers:["Cat","Dog"]};var Checkboxes=Template.bind({});exports.Checkboxes=Checkboxes,Checkboxes.args={type:"check",label:"What is your favorite pet?",groupName:"favoritePet",answers:["Cat","Dog"]};var CheckboxesIncludeOther=Template.bind({});exports.CheckboxesIncludeOther=CheckboxesIncludeOther,CheckboxesIncludeOther.args={type:"check",label:"What is your favorite pet?",groupName:"favoritePet",answers:["Cat","Dog"],includeOther:!0};var CheckboxesWithCustom=Template.bind({});exports.CheckboxesWithCustom=CheckboxesWithCustom,CheckboxesWithCustom.args={type:"check",label:"What is your favorite pet?",groupName:"favoritePet",answers:["Cat",{answerText:"Specific dog breed",inputId:"dog-breed-input"}]}},"./src/code-studio/pd/form_components/FieldGroup.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_excluded=["id","validationState","errorMessage","label","required","onChange","children","labelWidth","controlWidth","inlineControl"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_FieldGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FieldGroup.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var TestWrapper=function(_React$Component){function TestWrapper(props){var _this;return(_this=_React$Component.call(this,props)||this).state={data:""},_this.handleChange=_this.handleChange.bind(function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(_this)),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(TestWrapper,_React$Component);var _proto=TestWrapper.prototype;return _proto.handleChange=function handleChange(newState){this.props.onChange(newState),this.setState({data:newState.full})},_proto.render=function render(){var valid;return this.state.data&&(valid=/^[a-zA-Z]*$/.test(this.state.data)?"success":"error"),_react.default.createElement(_FieldGroup.default,{id:"full",type:"text",label:"this is a more full-featured example that errors if you type non-alpha characters",validationState:valid,onChange:this.handleChange,value:this.state.data,required:!0})},TestWrapper}(_react.default.Component);TestWrapper.propTypes={onChange:_propTypes.default.func.isRequired};exports.default=function _default(storybook){storybook.storiesOf("FormComponents/FieldGroup",module).addStoryTable([{name:"basic example",story:function story(){return _react.default.createElement(_FieldGroup.default,{id:"basic",type:"text",label:"this is a basic fieldgroup",onChange:(0,_addonActions.action)("onChange")})}},{name:"dropdown with children",story:function story(){return _react.default.createElement(_FieldGroup.default,{id:"dropdown",componentClass:"select",label:"a dropdown with children",onChange:(0,_addonActions.action)("onChange")},_react.default.createElement("option",null,"Please Select One:"),_react.default.createElement("option",{value:"first"},"One"),_react.default.createElement("option",{value:"second"},"Two"),_react.default.createElement("option",{value:"third"},"Three"))}},{name:"full-featured example",story:function story(){return _react.default.createElement(TestWrapper,{onChange:(0,_addonActions.action)("onChange")})}}])},module.exports=exports.default},"./src/code-studio/pd/form_components/FormComponent.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ButtonList=__webpack_require__("./src/code-studio/pd/form_components/ButtonList.jsx"),_FieldGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FieldGroup.jsx")),_UsPhoneNumberInput=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/UsPhoneNumberInput.jsx")),_SingleCheckbox=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/SingleCheckbox.jsx")),_utils=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/utils.js")),_excluded=["name","label","placeholder","required"],_excluded2=["name","label","placeholder","required","options"],_excluded3=["name","label","type","required"],_excluded4=["name","label","required"],_excluded5=["name","label","type","required"],_excluded6=["name","label","type","required","textFieldMap"],_excluded7=["name","label","type","required","options","textFieldMap"],_excluded8=["name","label","type","required","answers"],_excluded9=["name","label","required"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var FormComponent=function(_React$Component){function FormComponent(props){var _this;if((_this=_React$Component.call(this,props)||this).constructor===FormComponent)throw new TypeError("\n FormComponent is an abstract class; cannot construct instances directly\n ");return _this.handleChange=_this.handleChange.bind(function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(_this)),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(FormComponent,_React$Component),FormComponent.getDynamicallyRequiredFields=function getDynamicallyRequiredFields(data){return[]},FormComponent.getErrorMessages=function getErrorMessages(data){return{}},FormComponent.processPageData=function processPageData(data){return{}};var _proto=FormComponent.prototype;return _proto.handleChange=function handleChange(newState){this.props.onChange(newState)},_proto.getValidationState=function getValidationState(name){if(this.props.errors.includes(name))return"error"},_proto.buildSelectFieldGroupFromOptions=function buildSelectFieldGroupFromOptions(_ref){var name=_ref.name,label=_ref.label,placeholder=_ref.placeholder,required=_ref.required,props=_objectWithoutProperties(_ref,_excluded),options=this.props.options[name];return this.buildSelectFieldGroup(_objectSpread({name,label,placeholder,required,options},props))},_proto.buildSelectFieldGroup=function buildSelectFieldGroup(_ref2){var renderedOptions,name=_ref2.name,label=_ref2.label,placeholder=_ref2.placeholder,required=_ref2.required,options=_ref2.options,props=_objectWithoutProperties(_ref2,_excluded2);return renderedOptions=Array.isArray(options)?options.map((function(value){var _utils$normalizeAnswe=_utils.default.normalizeAnswer(value),answerText=_utils$normalizeAnswe.answerText,answerValue=_utils$normalizeAnswe.answerValue;return _react.default.createElement("option",{key:answerValue,value:answerValue},answerText)})):Object.keys(options).map((function(key){return _react.default.createElement("option",{key,value:key},options[key])})),_react.default.createElement(_FieldGroup.default,_extends({key:name,id:name,componentClass:"select",label,validationState:this.getValidationState(name),errorMessage:this.props.errorMessages[name],onChange:this.handleChange,value:this.props.data[name]||"",required},props),placeholder&&_react.default.createElement("option",{key:"placeholder",value:""},placeholder),renderedOptions)},_proto.buildFieldGroup=function buildFieldGroup(_ref3){var name=_ref3.name,label=_ref3.label,type=_ref3.type,required=_ref3.required,props=_objectWithoutProperties(_ref3,_excluded3);return _react.default.createElement(_FieldGroup.default,_extends({key:name,id:name,type,label,validationState:this.getValidationState(name),errorMessage:this.props.errorMessages[name],onChange:this.handleChange,value:this.props.data[name]||"",required},props))},_proto.buildUsPhoneNumberInput=function buildUsPhoneNumberInput(_ref4){var name=_ref4.name,label=_ref4.label,required=_ref4.required,props=_objectWithoutProperties(_ref4,_excluded4);return _react.default.createElement(_UsPhoneNumberInput.default,_extends({name,label,required,validationState:this.getValidationState(name),errorMessage:this.props.errorMessages[name],onChange:this.handleChange,value:this.props.data[name]},props))},_proto.buildButtonsFromOptions=function buildButtonsFromOptions(_ref5){var name=_ref5.name,label=_ref5.label,type=_ref5.type,required=_ref5.required,props=_objectWithoutProperties(_ref5,_excluded5);if(!this.props.options[name]||0===this.props.options[name].length)throw"Cannot create buttons for ".concat(name," without options");var answers=this.props.options[name];return this.buildButtons(_objectSpread({name,label,type,required,answers},props))},_proto.buildButtonsWithAdditionalTextFieldsFromOptions=function buildButtonsWithAdditionalTextFieldsFromOptions(_ref6){var name=_ref6.name,label=_ref6.label,type=_ref6.type,required=_ref6.required,textFieldMap=_ref6.textFieldMap,props=_objectWithoutProperties(_ref6,_excluded6);if(!this.props.options[name]||0===this.props.options[name].length)throw"Cannot create buttons for ".concat(name," without options");var options=this.props.options[name];return this.buildButtonsWithAdditionalTextFields(_objectSpread({name,label,type,required,options,textFieldMap},props))},_proto.buildButtonsWithAdditionalTextFields=function buildButtonsWithAdditionalTextFields(_ref7){var _this2=this,name=_ref7.name,label=_ref7.label,type=_ref7.type,required=_ref7.required,options=_ref7.options,textFieldMap=_ref7.textFieldMap,props=_objectWithoutProperties(_ref7,_excluded7),answers=options.map((function(answer){if(!(answer in textFieldMap))return answer;var textFieldName="".concat(name,"_").concat(textFieldMap[answer]);return{answerText:answer,inputValue:_this2.props.data[textFieldName],onInputChange:function onInputChange(newValue){return _this2.handleChange(_defineProperty({},textFieldName,newValue))}}}));return this.buildButtons(_objectSpread({name,label,type,required,answers},props))},_proto.buildButtons=function buildButtons(_ref8){var name=_ref8.name,label=_ref8.label,type=_ref8.type,required=_ref8.required,answers=_ref8.answers,props=_objectWithoutProperties(_ref8,_excluded8);return void 0===required&&(required=!0),_react.default.createElement(_ButtonList.ButtonList,_extends({key:name,answers,groupName:name,label,onChange:this.handleChange,selectedItems:this.props.data[name],validationState:this.getValidationState(name),required,type},props))},_proto.buildSingleCheckbox=function buildSingleCheckbox(_ref9){var name=_ref9.name,label=_ref9.label,required=_ref9.required,props=_objectWithoutProperties(_ref9,_excluded9);return void 0===required&&(required=!0),_react.default.createElement(_SingleCheckbox.default,_extends({name,label,required,validationState:this.getValidationState(name),value:this.props.data[name],onChange:this.handleChange},props))},FormComponent}(_react.default.Component);exports.default=FormComponent,_defineProperty(FormComponent,"propTypes",{options:_propTypes.default.object.isRequired,errors:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,errorMessages:_propTypes.default.object.isRequired,data:_propTypes.default.object.isRequired,onChange:_propTypes.default.func.isRequired}),_defineProperty(FormComponent,"associatedFields",[]),module.exports=exports.default},"./src/code-studio/pd/form_components/FormController.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_pagination=__webpack_require__("./node_modules/@react-bootstrap/pagination/lib/index.js"),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:this.state.currentPage,errors=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.errors,pageFields=this.getPageComponents()[page].associatedFields;if(!pageFields)throw new TypeError("\n Every PageComponent of a FormController must define an array\n PageComponent.associatedFields for error handling\n ");var flattenedErrors=errors.map((function(e){return e.replace(/\[[^\]]*\]/,"")}));return pageFields.some((function(field){return flattenedErrors.includes(field)}))},_proto.getPageProps=function getPageProps(){return{key:this.state.currentPage,options:this.props.options,onChange:this.handleChange,errors:this.state.errors,errorMessages:this.state.errorMessages,data:this.state.data}},_proto.renderCurrentPage=function renderCurrentPage(){var PageComponent=this.getCurrentPageComponent();return _react.default.createElement(PageComponent,this.getPageProps())},_proto.getRequiredFields=function getRequiredFields(){var _this3=this,requiredFields=_toConsumableArray(this.props.requiredFields);return this.getPageComponents().map((function(page){return page.getDynamicallyRequiredFields(_this3.state.data,_this3.getPageProps())})).reduce((function(flattened,subArray){return flattened.concat(subArray)}),requiredFields)},_proto.validatePageRequiredFields=function validatePageRequiredFields(pageIndex){var _this4=this;if(pageIndex<0||pageIndex>=this.getPageComponents().length)throw"Invalid page index ".concat(pageIndex);var page=this.getPageComponents()[pageIndex],requiredFields=this.getRequiredFields(),pageFields=page.associatedFields,pageData={};pageFields.forEach((function(field){var value=_this4.state.data[field];if("string"==typeof value){var trimmedValue=value.trim();pageData[field]=trimmedValue.length>0?trimmedValue:null}else pageData[field]=value})),pageData=Object.assign(pageData,page.processPageData(pageData)),this.setState({data:_objectSpread(_objectSpread({},this.state.data),pageData)});var missingRequiredFields=pageFields.filter((function(f){return requiredFields.includes(f)})).filter((function(f){return!pageData[f]})),formatErrors=page.getErrorMessages(pageData);return!missingRequiredFields.length&&!Object.keys(formatErrors).length||(this.setState({errors:[].concat(_toConsumableArray(missingRequiredFields),_toConsumableArray(Object.keys(formatErrors))),errorMessages:formatErrors,errorHeader:"Please fill out all required fields. You must completely fill out this section before moving on to the next section or going back to edit a previous section."}),!1)},_proto.validateCurrentPageRequiredFields=function validateCurrentPageRequiredFields(){return this.validatePageRequiredFields(this.state.currentPage)},_proto.nextPage=function nextPage(){this.setPage(this.state.currentPage+1)},_proto.prevPage=function prevPage(){this.setPage(this.state.currentPage-1)},_proto.setPage=function setPage(i){var newPage=Math.min(Math.max(i,0),this.getPageComponents().length-1);this.validateCurrentPageRequiredFields()&&(this.setState({currentPage:newPage}),this.saveToSessionStorage({currentPage:newPage}))},_proto.shouldShowSubmit=function shouldShowSubmit(){return this.state.currentPage===this.getPageComponents().length-1},_proto.renderControlButtons=function renderControlButtons(){var backButton,_this5=this;this.state.currentPage>0&&(backButton=_react.default.createElement(_reactBootstrap.Button,{key:"back",id:"back",onClick:this.prevPage},"Back"));var nextButton=_react.default.createElement(_reactBootstrap.Button,{bsStyle:"primary",key:"next",id:"next",onClick:this.nextPage},"Next");this.shouldShowSubmit()&&(nextButton=_react.default.createElement(_reactBootstrap.Button,{bsStyle:"primary",disabled:this.state.submitting,key:"submit",id:"submit",type:"submit"},this.constructor.submitButtonText));var pageButtons=this.getPageComponents().length>1&&_react.default.createElement(_pagination.Pagination,{style:styles.pageButtons,items:this.getPageComponents().length,activePage:this.state.currentPage+1,onSelect:function onSelect(i){return _this5.setPage(i-1)}});return _react.default.createElement(_reactBootstrap.FormGroup,{key:"control-buttons",className:"text-center"},backButton,pageButtons,nextButton)},_proto.render=function render(){var _this6=this;return _react.default.createElement("form",{ref:function ref(form){_this6.form=form},onSubmit:this.handleSubmit},this.renderErrorFeedback(),this.renderCurrentPage(),this.renderControlButtons())},FormController}(_react.default.Component);exports.default=FormController,_defineProperty(FormController,"sessionStorageKey",null),_defineProperty(FormController,"submitButtonText",_locale.default.submit());var styles={pageButtons:{verticalAlign:"middle",margin:"0 10px"}};FormController.propTypes={apiEndpoint:_propTypes.default.string.isRequired,options:_propTypes.default.object.isRequired,requiredFields:_propTypes.default.arrayOf(_propTypes.default.string).isRequired},FormController.defaultProps={requiredFields:[]},module.exports=exports.default},"./src/code-studio/pd/form_components/FormController.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_FormComponent5=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FormComponent.jsx")),_FormController2=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FormController.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var TestPageOne=function(_FormComponent){function TestPageOne(){return _FormComponent.apply(this,arguments)||this}return _inheritsLoose(TestPageOne,_FormComponent),TestPageOne.prototype.render=function render(){return _react.default.createElement(_reactBootstrap.FormGroup,null,_react.default.createElement("h4",null,"Page One"),this.buildButtonsFromOptions({name:"one",label:"Input One",type:"check"}))},TestPageOne}(_FormComponent5.default);TestPageOne.associatedFields=["one"];var TestPageTwo=function(_FormComponent2){function TestPageTwo(){return _FormComponent2.apply(this,arguments)||this}return _inheritsLoose(TestPageTwo,_FormComponent2),TestPageTwo.prototype.render=function render(){return _react.default.createElement(_reactBootstrap.FormGroup,null,_react.default.createElement("h4",null,"Page Two"),this.buildButtonsFromOptions({name:"two",label:"Input Two",type:"radio"}))},TestPageTwo}(_FormComponent5.default);TestPageTwo.associatedFields=["two"];var TestPageThree=function(_FormComponent3){function TestPageThree(){return _FormComponent3.apply(this,arguments)||this}return _inheritsLoose(TestPageThree,_FormComponent3),TestPageThree.prototype.render=function render(){return _react.default.createElement(_reactBootstrap.FormGroup,null,_react.default.createElement("h4",null,"Page Three"),this.buildSelectFieldGroupFromOptions({name:"three",label:"Input Three"}))},TestPageThree}(_FormComponent5.default);TestPageThree.associatedFields=["three"];var TestPageFour=function(_FormComponent4){function TestPageFour(){return _FormComponent4.apply(this,arguments)||this}return _inheritsLoose(TestPageFour,_FormComponent4),TestPageFour.prototype.render=function render(){return _react.default.createElement(_reactBootstrap.FormGroup,null,_react.default.createElement("h4",null,"Page Four"),this.buildFieldGroup({name:"four",label:"Input Four",type:"text"}))},TestPageFour}(_FormComponent5.default);TestPageFour.associatedFields=["four"];var TestController=function(_FormController){function TestController(){return _FormController.apply(this,arguments)||this}_inheritsLoose(TestController,_FormController);var _proto5=TestController.prototype;return _proto5.getPageComponents=function getPageComponents(){return[TestPageOne,TestPageTwo,TestPageThree,TestPageFour]},_proto5.handleChange=function handleChange(newState){this.props.action("onChange")(newState),_FormController.prototype.handleChange.call(this,newState)},_proto5.handleSubmit=function handleSubmit(event){this.props.action("submit")(this.serializeFormData()),event.preventDefault()},TestController}(_FormController2.default),OPTIONS={one:["First","Second","Third"],two:["Fourth","Fifth","Sixth"],three:["Seventh","Eighth","Ninth"]};exports.default=function _default(storybook){storybook.storiesOf("FormComponents/FormComponent",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"simple form with generated radio buttons",story:function story(){return _react.default.createElement(TestPageOne,{options:{one:OPTIONS.one},onChange:(0,_addonActions.action)("onChange"),errors:[],errorMessages:{},data:{}})}},{name:"simple form with generated check buttons",story:function story(){return _react.default.createElement(TestPageTwo,{options:{two:OPTIONS.two},onChange:(0,_addonActions.action)("onChange"),errors:[],errorMessages:{},data:{}})}},{name:"simple form with generated select dropdown",story:function story(){return _react.default.createElement(TestPageThree,{options:{three:OPTIONS.three},onChange:(0,_addonActions.action)("onChange"),errors:[],errorMessages:{},data:{}})}},{name:"simple form with generated text input",story:function story(){return _react.default.createElement(TestPageFour,{options:{},onChange:(0,_addonActions.action)("onChange"),errors:[],errorMessages:{},data:{}})}}]),storybook.storiesOf("FormComponents/FormController",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"simple multi-page form",story:function story(){return _react.default.createElement(TestController,{storybook,apiEndpoint:"",options:OPTIONS,requiredFields:[]})}}])},module.exports=exports.default},"./src/code-studio/pd/form_components/LabeledFormComponent.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_FormComponent2=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FormComponent.jsx")),_SafeMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/SafeMarkdown.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:1;return{controlWidth:{smOffset:depth},labelWidth:{smOffset:depth}}},_proto.defaultOptions=function defaultOptions(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{name,label:props.label||this.labelFor(name),controlWidth:{md:6},required:!0}},_proto.singleCheckboxFor=function singleCheckboxFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildSingleCheckbox(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),props))},_proto.checkBoxesFor=function checkBoxesFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildButtonsFromOptions(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"check"},props))},_proto.checkBoxesWithAdditionalTextFieldsFor=function checkBoxesWithAdditionalTextFieldsFor(name,textFieldMap){var props=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.buildButtonsWithAdditionalTextFieldsFromOptions(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"check",textFieldMap},props))},_proto.radioButtonsWithAdditionalTextFieldsFor=function radioButtonsWithAdditionalTextFieldsFor(name,textFieldMap){var props=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.buildButtonsWithAdditionalTextFieldsFromOptions(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"radio",textFieldMap},props))},_proto.radioButtonsFor=function radioButtonsFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildButtonsFromOptions(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"radio"},props))},_proto.dynamicRadioButtonsWithAdditionalTextFieldsFor=function dynamicRadioButtonsWithAdditionalTextFieldsFor(name,options,textFieldMap){var props=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.buildButtonsWithAdditionalTextFields(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"radio",options,textFieldMap},props))},_proto.dynamicCheckBoxesFor=function dynamicCheckBoxesFor(name,options){var props=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.buildButtons(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"check",answers:options},props))},_proto.dynamicCheckBoxesWithAdditionalTextFieldsFor=function dynamicCheckBoxesWithAdditionalTextFieldsFor(name,options,textFieldMap){var props=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.buildButtonsWithAdditionalTextFields(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"check",options,textFieldMap},props))},_proto.selectFor=function selectFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildSelectFieldGroupFromOptions(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"select"},props))},_proto.inputFor=function inputFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildFieldGroup(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"text"},props))},_proto.numberInputFor=function numberInputFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildFieldGroup(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),{},{type:"number"},props))},_proto.largeInputFor=function largeInputFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.inputFor(name,_objectSpread({componentClass:"textarea",controlWidth:{md:12},rows:4,maxLength:500},props))},_proto.usPhoneNumberInputFor=function usPhoneNumberInputFor(name){var props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.buildUsPhoneNumberInput(_objectSpread(_objectSpread({},this.defaultOptions(name,props)),props))},LabeledFormComponent}(_FormComponent2.default);exports.default=LabeledFormComponent,_defineProperty(LabeledFormComponent,"labels",{}),module.exports=exports.default},"./src/code-studio/pd/form_components/LabeledFormComponent.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_LabeledFormComponent13=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/LabeledFormComponent.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_QuestionsTable=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/QuestionsTable.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("FormComponents/QuestionsTable",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"simple questions table",story:function story(){return _react.default.createElement(_QuestionsTable.default,{options:["this is cool","this is okay","this is useless"],questions:[{label:"what do you think of this component?",name:"thinkOfComponent",required:!0},{label:"what do you think of this story?",name:"thinkOfStory"},{label:"what do you think of this question?",name:"thinkOfQuestion"}]})}},{name:"controlled questions table",story:function story(){return _react.default.createElement(_QuestionsTable.default,{data:{theOneThatIsSelected:"first"},errors:["theOneWithTheError"],onChange:(0,_addonActions.action)("onChange"),options:["first","second","third"],questions:[{label:"this one should have something selected",name:"theOneThatIsSelected"},{label:"this one should have an error",name:"theOneWithTheError"},{label:"this one should be plain",name:"theOtherOne"}]})}}])},module.exports=exports.default},"./src/code-studio/pd/form_components/SingleCheckbox.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var REQUIRED=_react.default.createElement("span",{style:{color:"red"}}," *"),SingleCheckbox=function(_React$Component){function SingleCheckbox(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"handleChange",(function(event){_this.props.onChange&&_this.props.onChange(_defineProperty({},_this.props.name,event.target.checked))})),_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(SingleCheckbox,_React$Component),SingleCheckbox.prototype.render=function render(){return _react.default.createElement(_reactBootstrap.Checkbox,{id:this.props.name,checked:this.props.value||!1,onChange:this.handleChange,validationState:this.props.validationState,style:this.props.style},this.props.label,this.props.required&&REQUIRED)},SingleCheckbox}(_react.default.Component);exports.default=SingleCheckbox,_defineProperty(SingleCheckbox,"propTypes",{name:_propTypes.default.string.isRequired,label:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.element]).isRequired,value:_propTypes.default.bool,required:_propTypes.default.bool,validationState:_propTypes.default.string,onChange:_propTypes.default.func,style:_propTypes.default.object}),module.exports=exports.default},"./src/code-studio/pd/form_components/UsPhoneNumberInput.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_FieldGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FieldGroup.jsx")),_excluded=["name","label","validationState","errorMessage","required","value","onChange"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var PHONE_NUMBER_REGEX=/(\()?(\(?\d{1,3})?(\) ?)?(\d{1,3})?(-| )?(\d{1,4})?/,UsPhoneNumberInput=function(_React$Component){function UsPhoneNumberInput(props){var _this;return _defineProperty(function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(_this=_React$Component.call(this,props)||this),"handleChange",(function(change){var phoneNumber=UsPhoneNumberInput.coercePhoneNumber(change[_this.props.name]);_this.setState({value:phoneNumber});var phoneNumberDigits=UsPhoneNumberInput.toJustNumbers(phoneNumber);_this.props.onChange&&phoneNumberDigits!==UsPhoneNumberInput.toJustNumbers(_this.props.value)&&_this.props.onChange(_defineProperty({},_this.props.name,phoneNumberDigits))})),_this.state={value:UsPhoneNumberInput.coercePhoneNumber(_this.props.value)},_this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(UsPhoneNumberInput,_React$Component),UsPhoneNumberInput.isValid=function isValid(value){return/^\d{10}$/.test(value)},UsPhoneNumberInput.coercePhoneNumber=function coercePhoneNumber(value){var match=PHONE_NUMBER_REGEX.exec(value),phoneNumber="";return match&&(match[1]&&!match[2]?phoneNumber=match[1]:match[2]&&(phoneNumber="(".concat(match[2]),3===match[2].length&&(match[3]&&!match[4]?phoneNumber+=match[3]:match[4]&&(phoneNumber+=") ".concat(match[4]),3===match[4].length&&(match[5]&&!match[6]?phoneNumber+="-":match[6]&&(phoneNumber+="-".concat(match[6]))))))),phoneNumber},UsPhoneNumberInput.toJustNumbers=function toJustNumbers(value){return"string"==typeof value?value.replace(/[^\d]/g,""):""},UsPhoneNumberInput.prototype.render=function render(){var _this$props=this.props,name=_this$props.name,label=_this$props.label,validationState=_this$props.validationState,errorMessage=_this$props.errorMessage,required=_this$props.required,props=(_this$props.value,_this$props.onChange,_objectWithoutProperties(_this$props,_excluded));return _react.default.createElement("div",null,_react.default.createElement(_FieldGroup.default,_extends({key:name,id:name,type:"text",label,validationState,errorMessage,onChange:this.handleChange,value:this.state.value||"",required,placeholder:"(xxx) xxx-xxxx"},props)))},UsPhoneNumberInput}(_react.default.Component);exports.default=UsPhoneNumberInput,_defineProperty(UsPhoneNumberInput,"propTypes",{name:_propTypes.default.string.isRequired,label:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.element]).isRequired,value:_propTypes.default.string,validationState:_propTypes.default.string,errorMessage:_propTypes.default.string,required:_propTypes.default.bool,onChange:_propTypes.default.func}),module.exports=exports.default},"./src/code-studio/pd/form_components/UsPhoneNumberInput.story.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DefaultPhoneInput=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_UsPhoneNumberInput=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/UsPhoneNumberInput.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"UsPhoneNumberInput",component:_UsPhoneNumberInput.default};exports.default=_default;var DefaultPhoneInput=function Template(args){return _react.default.createElement(_UsPhoneNumberInput.default,args)}.bind({});exports.DefaultPhoneInput=DefaultPhoneInput,DefaultPhoneInput.args={name:"Storybook",label:"Enter a phone number"}},"./src/code-studio/pd/form_components/utils.js":module=>{module.exports={},module.exports.normalizeAnswer=function(answer){var answerText="string"==typeof answer?answer:answer.answerText;return{answerText,answerValue:"string"==typeof answer?answer:answer.answerValue||answerText}}},"./src/code-studio/pd/form_components_func/FormComponent.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getValidationState=exports.FormContext=void 0;var FormContext=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js")).default.createContext({});exports.FormContext=FormContext;exports.getValidationState=function getValidationState(name,errors){if(errors.includes(name))return"error"}},"./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLabelFor=exports.useDefaultOptions=exports.LabelsContext=void 0;var _react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_SafeMarkdown=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./src/templates/SafeMarkdown.jsx"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}var LabelsContext=_react.default.createContext({});exports.LabelsContext=LabelsContext;var useLabelFor=function useLabelFor(name){var labels=(0,_react.useContext)(LabelsContext);return name in labels?_react.default.createElement("div",{className:"inline_markdown"},_react.default.createElement(_SafeMarkdown.default,{openExternalLinksInNewTab:!0,markdown:labels[name]})):(console.warn("Label missing for ".concat(name)),name)};exports.useLabelFor=useLabelFor;exports.useDefaultOptions=function useDefaultOptions(name,label){return{name,label:useLabelFor(name)||label,controlWidth:{md:6},required:!0}}},"./src/code-studio/pd/form_components_func/LabeledFormComponent.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx"),_LabeledCheckBoxes=__webpack_require__("./src/code-studio/pd/form_components_func/labeled/LabeledCheckBoxes.jsx"),_LabeledInput=__webpack_require__("./src/code-studio/pd/form_components_func/labeled/LabeledInput.jsx"),_LabeledRadioButtons=__webpack_require__("./src/code-studio/pd/form_components_func/labeled/LabeledRadioButtons.jsx"),_LabeledSelect=__webpack_require__("./src/code-studio/pd/form_components_func/labeled/LabeledSelect.jsx"),_LabeledSingleCheckbox=__webpack_require__("./src/code-studio/pd/form_components_func/labeled/LabeledSingleCheckbox.jsx"),_LabeledUsPhoneNumberInput=__webpack_require__("./src/code-studio/pd/form_components_func/labeled/LabeledUsPhoneNumberInput.jsx"),_FormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/FormComponent.js"),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_excluded=["children"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var OTHER="Other (please specify):";exports.default=function _default(storybook){var defaultProps={errors:[],errorMessages:{},data:{},options:{},onChange:(0,_addonActions.action)("onChange")},Context=function Context(_ref){var children=_ref.children,props=_objectWithoutProperties(_ref,_excluded),name=props.name,label=props.label;return _react.default.createElement(_FormComponent.FormContext.Provider,{value:_objectSpread(_objectSpread({},defaultProps),props)},_react.default.createElement(_LabeledFormComponent.LabelsContext.Provider,{value:_defineProperty({},name,label)},children))};Context.propTypes={name:_propTypes.default.string.isRequired,label:_propTypes.default.string.isRequired,children:_propTypes.default.node},storybook.storiesOf("FormComponents/LabeledFormComponentFunctional",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Single Checkbox",story:function story(){return _react.default.createElement(Context,{name:"singleCheckbox",label:"This is a single checkbox"},_react.default.createElement(_LabeledSingleCheckbox.LabeledSingleCheckbox,{name:"singleCheckbox"}))}},{name:"Checkboxes",story:function story(){return _react.default.createElement(Context,{name:"checkBoxes",label:"Select options",options:{checkBoxes:["option 1","option 2","option 3"]}},_react.default.createElement(_LabeledCheckBoxes.LabeledCheckBoxes,{name:"checkBoxes"}))}},{name:"CheckboxesWithAdditionalFields",story:function story(){return _react.default.createElement(Context,{name:"checkBoxesWithOther",label:"Select options and add text",options:{checkBoxesWithOther:["option 1","option 2",OTHER]}},_react.default.createElement(_LabeledCheckBoxes.LabeledCheckBoxesWithAdditionalTextFields,{name:"checkBoxesWithOther",textFieldMap:_defineProperty({},OTHER,"other")}))}},{name:"RadioButtons",story:function story(){return _react.default.createElement(Context,{name:"radioButtons",label:"Select an option",options:{radioButtons:["option 1","option 2","option 3"]}},_react.default.createElement(_LabeledRadioButtons.LabeledRadioButtons,{name:"radioButtons"}))}},{name:"RadioButtonsWithAdditionalFields",story:function story(){return _react.default.createElement(Context,{name:"radioButtonsWithOther",label:"Select an option and add text",options:{radioButtonsWithOther:["option 1","option 2",OTHER]}},_react.default.createElement(_LabeledRadioButtons.LabeledRadioButtonsWithAdditionalTextFields,{name:"radioButtonsWithOther",textFieldMap:_defineProperty({},OTHER,"other")}))}},{name:"DynamicRadioButtonsWithAdditionalFields",story:function story(){return _react.default.createElement(Context,{name:"dynamicRadioButtonsWithOther",label:"Select a dynamic option and add text"},_react.default.createElement(_LabeledRadioButtons.LabeledDynamicRadioButtonsWithAdditionalTextFields,{name:"dynamicRadioButtonsWithOther",options:[1,2,3].map((function(n){return"Dynamic option #".concat(n)})).concat([OTHER]),textFieldMap:_defineProperty({},OTHER,"other")}))}},{name:"DynamicCheckboxes",story:function story(){return _react.default.createElement(Context,{name:"dynamicCheckBoxes",label:"Select all dynamic options that apply"},_react.default.createElement(_LabeledCheckBoxes.LabeledDynamicCheckBoxes,{name:"dynamicCheckBoxes",options:[1,2,3].map((function(n){return"Dynamic option #".concat(n)}))}))}},{name:"DynamicCheckboxesWithAdditionalFields",story:function story(){return _react.default.createElement(Context,{name:"dynamicCheckboxesWithOther",label:"Select a dynamic option and add text"},_react.default.createElement(_LabeledCheckBoxes.LabeledDynamicCheckBoxesWithAdditionalTextFields,{name:"dynamicCheckboxesWithOther",options:[1,2,3].map((function(n){return"Dynamic option #".concat(n)})).concat([OTHER]),textFieldMap:_defineProperty({},OTHER,"other")}))}},{name:"Select",story:function story(){return _react.default.createElement(Context,{name:"select",label:"Select an option",options:{select:["option 1","option 2","option 3"]}},_react.default.createElement(_LabeledSelect.LabeledSelect,{name:"select",placeholder:"Select an option"}))}},{name:"Input",story:function story(){return _react.default.createElement(Context,{name:"input",label:"Enter some text"},_react.default.createElement(_LabeledInput.LabeledInput,{name:"input"}))}},{name:"LargeInput",story:function story(){return _react.default.createElement(Context,{name:"largeInput",label:"Enter some longer text"},_react.default.createElement(_LabeledInput.LabeledLargeInput,{name:"largeInput"}))}},{name:"UsPhoneNumber",story:function story(){return _react.default.createElement(Context,{name:"usPhoneNumber",label:"Enter a phone number"},_react.default.createElement(_LabeledUsPhoneNumberInput.LabeledUsPhoneNumberInput,{name:"usPhoneNumber"}))}}])},module.exports=exports.default},"./src/code-studio/pd/form_components_func/form/Buttons.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ButtonsWithAdditionalTextFieldsFromOptions=exports.ButtonsWithAdditionalTextFields=exports.ButtonsFromOptions=exports.Buttons=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_ButtonList=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/ButtonList.jsx")),_FormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/FormComponent.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldGroup=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_FieldGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FieldGroup.jsx")),_FormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/FormComponent.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectFieldGroupFromOptions=exports.SelectFieldGroup=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_FieldGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FieldGroup.jsx")),_utils=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/utils.js")),_FormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/FormComponent.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingleCheckbox=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_SingleCheckbox=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/SingleCheckbox.jsx")),_FormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/FormComponent.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.UsPhoneNumberInput=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./node_modules/react/index.js")),_UsPhoneNumberInput=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/UsPhoneNumberInput.jsx")),_FormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/FormComponent.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LabeledDynamicCheckBoxesWithAdditionalTextFields=exports.LabeledDynamicCheckBoxes=exports.LabeledCheckBoxesWithAdditionalTextFields=exports.LabeledCheckBoxes=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_Buttons=__webpack_require__("./src/code-studio/pd/form_components_func/form/Buttons.jsx"),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LabeledNumberInput=exports.LabeledLargeInput=exports.LabeledInput=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_FieldGroup=__webpack_require__("./src/code-studio/pd/form_components_func/form/FieldGroup.jsx"),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LabeledRadioButtonsWithAdditionalTextFields=exports.LabeledRadioButtons=exports.LabeledDynamicRadioButtonsWithAdditionalTextFields=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_Buttons=__webpack_require__("./src/code-studio/pd/form_components_func/form/Buttons.jsx"),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LabeledSelect=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_SelectFieldGroup=__webpack_require__("./src/code-studio/pd/form_components_func/form/SelectFieldGroup.jsx"),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{},defaults=(0,_LabeledFormComponent.useDefaultOptions)(props.name,props.label),passProps=_objectSpread(_objectSpread({},defaults),{},{type:"select"},props);return _react.default.createElement(_SelectFieldGroup.SelectFieldGroupFromOptions,passProps)};exports.LabeledSelect=LabeledSelect,LabeledSelect.propTypes={name:_propTypes.default.string.isRequired,label:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.element])}},"./src/code-studio/pd/form_components_func/labeled/LabeledSingleCheckbox.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LabeledSingleCheckbox=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_SingleCheckbox=__webpack_require__("./src/code-studio/pd/form_components_func/form/SingleCheckbox.jsx"),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LabeledUsPhoneNumberInput=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_UsPhoneNumberInput=__webpack_require__("./src/code-studio/pd/form_components_func/form/UsPhoneNumberInput.jsx"),_LabeledFormComponent=__webpack_require__("./src/code-studio/pd/form_components_func/LabeledFormComponent.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.EnrolledWorkshopsTable=exports.EnrolledWorkshops=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),utils=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/utils.js")),_workshop_table_loader=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/workshop_table_loader.jsx")),_types=__webpack_require__("./src/code-studio/pd/workshop_dashboard/types.js"),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_reactTooltip=_interopRequireDefault(__webpack_require__("./node_modules/react-tooltip/dist/index.js")),_moment=_interopRequireDefault(__webpack_require__("./node_modules/moment/moment.js")),_workshopConstants=__webpack_require__("./src/code-studio/pd/workshop_dashboard/workshopConstants.js");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var EnrolledWorkshops=function(_React$Component){function EnrolledWorkshops(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(EnrolledWorkshops,_React$Component),EnrolledWorkshops.prototype.render=function render(){return _react.default.createElement(_workshop_table_loader.default,{queryUrl:"/api/v1/pd/workshops_user_enrolled_in",hideNoWorkshopsMessage:!0},_react.default.createElement(EnrolledWorkshopsTable,null))},EnrolledWorkshops}(_react.default.Component);exports.EnrolledWorkshops=EnrolledWorkshops;var EnrolledWorkshopsTable=function(_React$Component2){function EnrolledWorkshopsTable(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"state",{showCancelModal:!1,enrollmentCodeToCancel:void 0}),_defineProperty(_assertThisInitialized(_this),"cancelEnrollment",(function(event){window.location="/pd/workshop_enrollment/".concat(_this.state.enrollmentCodeToCancel,"/cancel")})),_defineProperty(_assertThisInitialized(_this),"dismissCancelModal",(function(event){_this.setState({showCancelModal:!1,enrollmentCodeToCancel:void 0})})),_defineProperty(_assertThisInitialized(_this),"showCancelModal",(function(enrollmentCode){_this.setState({showCancelModal:!0,enrollmentCodeToCancel:enrollmentCode})})),_defineProperty(_assertThisInitialized(_this),"openCertificate",(function(_ref){var enrollment_code=_ref.enrollment_code;utils.windowOpen("/pd/generate_workshop_certificate/".concat(enrollment_code))})),_defineProperty(_assertThisInitialized(_this),"moreThanTenDaysUntilWorkshop",(function(workshop_starting_date){return(0,_moment.default)(workshop_starting_date).diff(_moment.default.now(),"days")>10})),_defineProperty(_assertThisInitialized(_this),"renderPreWorkshopSurveyButton",(function(workshop){var preWorkshopSurveyButton=_react.default.createElement(_reactBootstrap.Button,{onClick:function onClick(){return utils.windowOpen(workshop.pre_workshop_survey_url)},style:styles.button,disabled:_this.moreThanTenDaysUntilWorkshop(workshop.workshop_starting_date)},"Complete pre-workshop survey");return preWorkshopSurveyButton.props.disabled?_react.default.createElement("div",null,_react.default.createElement("span",{"data-tip":"\n Workshop surveys can only be started 10 days prior to your workshop date.\n ","data-for":"pre-survey-date-limit"},preWorkshopSurveyButton),_react.default.createElement(_reactTooltip.default,{id:"pre-survey-date-limit",effect:"solid",delayShow:500})):preWorkshopSurveyButton})),_this}_inheritsLoose(EnrolledWorkshopsTable,_React$Component2);var _proto2=EnrolledWorkshopsTable.prototype;return _proto2.renderWorkshopActionButtons=function renderWorkshopActionButtons(workshop){var _this2=this;return _react.default.createElement("div",null,"Not Started"===workshop.state&&workshop.pre_workshop_survey_url&&this.renderPreWorkshopSurveyButton(workshop),"Ended"===workshop.state&&_react.default.createElement(_reactBootstrap.Button,{onClick:function onClick(){return _this2.openCertificate(workshop)},style:styles.button,disabled:!workshop.attended},"Print certificate"),_react.default.createElement(_reactBootstrap.Button,{onClick:function onClick(){return utils.windowOpen("/pd/workshop_enrollment/".concat(workshop.enrollment_code))},style:styles.button},"Workshop details"),"Not Started"===workshop.state&&_react.default.createElement(_reactBootstrap.Button,{onClick:function onClick(){return _this2.showCancelModal(workshop.enrollment_code)},style:styles.button},"Cancel enrollment"))},_proto2.renderWorkshopsTable=function renderWorkshopsTable(){var _this3=this,rows=this.props.workshops.map((function(workshop,i){return _this3.renderRowForWorkshop(workshop)}));return _react.default.createElement(_reactBootstrap.Table,null,_react.default.createElement("thead",null,_react.default.createElement("tr",null,_react.default.createElement("th",null,"Name"),_react.default.createElement("th",null,"Date"),_react.default.createElement("th",null,"Time"),_react.default.createElement("th",null,"Location"),_react.default.createElement("th",{style:{width:"20%"}}))),_react.default.createElement("tbody",null,rows))},_proto2.renderRowForWorkshop=function renderRowForWorkshop(workshop){return _react.default.createElement("tr",{key:workshop.id},_react.default.createElement("td",null,workshop.course,_react.default.createElement("br",null),workshop.subject),_react.default.createElement("td",null,workshop.sessions.map((function(session,i){return _react.default.createElement("p",{key:i},_moment.default.utc(session.start).format(_workshopConstants.DATE_FORMAT))}))),_react.default.createElement("td",null,workshop.sessions.map((function(session,i){return _react.default.createElement("p",{key:i},"".concat(_moment.default.utc(session.start).format(_workshopConstants.TIME_FORMAT)," -\n ").concat(_moment.default.utc(session.end).format(_workshopConstants.TIME_FORMAT)))}))),_react.default.createElement("td",null,_react.default.createElement("div",null,_react.default.createElement("p",null,workshop.location_name),_react.default.createElement("p",null,workshop.location_address))),_react.default.createElement("td",null,this.renderWorkshopActionButtons(workshop)))},_proto2.render=function render(){return _react.default.createElement("div",null,_react.default.createElement(_reactBootstrap.Modal,{show:this.state.showCancelModal,onHide:this.dismissCancelModal,style:{width:560}},_react.default.createElement(_reactBootstrap.Modal.Body,null,"Are you sure you want to cancel your enrollment in this course?"),_react.default.createElement(_reactBootstrap.Modal.Footer,null,_react.default.createElement(_reactBootstrap.Button,{onClick:this.cancelEnrollment,bsStyle:"primary"},"Yes - cancel my enrollment"),_react.default.createElement(_reactBootstrap.Button,{onClick:this.dismissCancelModal},"No - stay enrolled in this class"))),_react.default.createElement("h2",null,"My Workshops"),this.renderWorkshopsTable())},EnrolledWorkshopsTable}(_react.default.Component);exports.EnrolledWorkshopsTable=EnrolledWorkshopsTable,_defineProperty(EnrolledWorkshopsTable,"propTypes",{workshops:_propTypes.default.arrayOf(_types.workshopShape)});var styles={button:{width:"100%"}}},"./src/code-studio/pd/professional_learning_landing/EnrolledWorkshops.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx")),_EnrolledWorkshops=__webpack_require__("./src/code-studio/pd/professional_learning_landing/EnrolledWorkshops.jsx");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var workshops=[{id:1,sessions:[],location_name:"My house",location_address:"123 Fake Street",on_map:!1,funded:!1,course:"course",subject:"subject",enrolled_teacher_count:10,capacity:15,facilitators:[],organizer:{name:"organizer_name",email:"organizer_email"},enrollment_code:"code1"},{id:2,sessions:[],location_name:"My house",location_address:null,on_map:!1,funded:!1,course:"course",subject:null,enrolled_teacher_count:10,capacity:15,facilitators:[],organizer:{name:null,email:null},enrollment_code:null}];exports.default=function _default(storybook){storybook.storiesOf("EnrolledWorkshopsTable",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"EnrolledWorkshopsTable",story:function story(){return _react.default.createElement(_EnrolledWorkshops.EnrolledWorkshopsTable,{workshops})}}])},module.exports=exports.default},"./src/code-studio/pd/reactBootstrapStoryDecorator.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/react/index.js"));exports.default=function _default(story){return _react.default.createElement("div",{id:"application-container"},story())},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/date_picker.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_radium=_interopRequireDefault(__webpack_require__("./node_modules/radium/es/index.js")),_reactDatepicker=_interopRequireDefault(__webpack_require__("./node_modules/react-datepicker/es/index.js")),_workshopConstants=__webpack_require__("./src/code-studio/pd/workshop_dashboard/workshopConstants.js"),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__("./node_modules/react-datepicker/dist/react-datepicker.css");var DateInputWithIconUnwrapped=function(_React$Component){function DateInputWithIconUnwrapped(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"focus",(function(){_this.inputControl&&_this.inputControl.focus()})),_defineProperty(_assertThisInitialized(_this),"handleClear",(function(e){e.stopPropagation(),_this.props.onClear()})),_this}return _inheritsLoose(DateInputWithIconUnwrapped,_React$Component),DateInputWithIconUnwrapped.prototype.render=function render(){var _this2=this;return _react.default.createElement(_reactBootstrap.InputGroup,{onClick:this.props.onClick},_react.default.createElement(_reactBootstrap.FormGroup,null,_react.default.createElement(_reactBootstrap.FormControl,{type:"text",value:this.props.value,onChange:this.props.onChange,style:this.props.disabled?styles.readOnlyInput:null,disabled:this.props.disabled,onBlur:this.props.onBlur,ref:function ref(_ref){return _this2.inputControl=_reactDom.default.findDOMNode(_ref)}}),!this.props.disabled&&this.props.value&&this.props.onClear&&_react.default.createElement(_reactBootstrap.FormControl.Feedback,null,_react.default.createElement("span",{style:styles.clearElement,onClick:this.handleClear,title:"Clear value"},"×"))),!this.props.disabled&&_react.default.createElement(_reactBootstrap.InputGroup.Addon,null,_react.default.createElement(_FontAwesome.default,{icon:"calendar"})))},DateInputWithIconUnwrapped}(_react.default.Component);_defineProperty(DateInputWithIconUnwrapped,"propTypes",{disabled:_propTypes.default.bool,onClear:_propTypes.default.func,onChange:_propTypes.default.func,onClick:_propTypes.default.func,value:_propTypes.default.string,onBlur:_propTypes.default.func});var DateInputWithIcon=(0,_radium.default)(DateInputWithIconUnwrapped),DatePicker=function(_React$Component2){function DatePicker(){for(var _this3,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return _defineProperty(_assertThisInitialized(_this3=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"handleChange",(function(date){return _this3.props.onChange(date)})),_defineProperty(_assertThisInitialized(_this3),"handleClear",(function(){return _this3.props.onChange(null)})),_this3}return _inheritsLoose(DatePicker,_React$Component2),DatePicker.prototype.render=function render(){return _react.default.createElement(_reactDatepicker.default,{customInput:_react.default.createElement(DateInputWithIcon,{disabled:this.props.readOnly,onClear:this.props.clearable&&this.handleClear}),selected:this.props.date,onChange:this.handleChange,onBlur:this.props.onBlur,dateFormat:_workshopConstants.DATE_FORMAT,minDate:this.props.minDate,maxDate:this.props.maxDate,selectsStart:this.props.selectsStart,selectsEnd:this.props.selectsEnd,startDate:this.props.startDate,endDate:this.props.endDate,disabled:this.props.readOnly})},DatePicker}(_react.default.Component);exports.default=DatePicker,_defineProperty(DatePicker,"propTypes",{date:_reactDatepicker.default.propTypes.selected,onChange:_propTypes.default.func.isRequired,onBlur:_reactDatepicker.default.propTypes.onBlur,minDate:_reactDatepicker.default.propTypes.minDate,maxDate:_reactDatepicker.default.propTypes.maxDate,selectsStart:_reactDatepicker.default.propTypes.selectsStart,selectsEnd:_reactDatepicker.default.propTypes.selectsEnd,startDate:_reactDatepicker.default.propTypes.startDate,endDate:_reactDatepicker.default.propTypes.endDate,readOnly:_reactDatepicker.default.propTypes.disabled,clearable:_propTypes.default.bool}),_defineProperty(DatePicker,"defaultProps",{selectsStart:!1,selectsEnd:!1,startDate:null,endDate:null});var styles={readOnlyInput:{backgroundColor:"inherit",cursor:"default",border:"none"},clearElement:{color:"#999",fontSize:"18px",zIndex:10,cursor:"pointer",pointerEvents:"all",":hover":{color:"#D0021B"}}};module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/date_picker.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_moment=_interopRequireDefault(__webpack_require__("./node_modules/moment/moment.js")),_date_picker=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/date_picker.jsx")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){return storybook.storiesOf("DatePicker",module).addDecorator((function(story){return _react.default.createElement("div",{id:"workshop-container",style:{width:300}},story())})).add("Basic",(function(){return _react.default.createElement(_date_picker.default,{date:(0,_moment.default)(),onChange:(0,_addonActions.action)("changed")})})).add("Clearable",(function(){return _react.default.createElement(_date_picker.default,{date:(0,_moment.default)(),onChange:(0,_addonActions.action)("changed"),clearable:!0})}))},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/choice_responses.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1,totalCountsPerFacilitator=facilitatorNames.map((function(name){return Object.values(_this2.props.answers[name]).reduce((function(sum,count){return sum+count}),0)})),facilitators=this.props.facilitators,headerRow=_react.default.createElement("tr",{key:"header"},_react.default.createElement("td",null),facilitatorNames.map((function(name,i){return _react.default.createElement("td",{colSpan:2,style:{paddingLeft:"20px"},key:i},facilitators&&facilitators[name]||name)})),showTotalCount&&_react.default.createElement("td",{colSpan:2,style:{paddingLeft:"20px"}},"Total Responses")),contentRows=this.props.possibleAnswers.map((function(possibleAnswer,i){var countsByFacilitator=facilitatorNames.map((function(name){return _this2.props.answers[name][_this2.getAnswerIndex(possibleAnswer,i)]||0})),totalCount=countsByFacilitator.reduce((function(sum,count){return sum+count}),0);return _react.default.createElement("tr",{key:i},_react.default.createElement("td",null,_this2.getPossibleAnswerText(possibleAnswer)),countsByFacilitator.map((function(count,j){return[_react.default.createElement("td",{style:{paddingLeft:"20px"},key:"".concat(j,".count")},count),_react.default.createElement("td",{style:{paddingLeft:"4px"},key:"".concat(j,".percentage")},"(".concat(_this2.formatPercentage(count/totalCountsPerFacilitator[j]),")"))]})),showTotalCount&&_react.default.createElement("td",{style:{paddingLeft:"20px"}},totalCount),showTotalCount&&_react.default.createElement("td",{style:{paddingLeft:"4px"}},"(".concat(_this2.formatPercentage(totalCount/_this2.getTotalRespondents()),")")))}));return[headerRow].concat(contentRows)},_proto.render=function render(){var possibleAnswers="scale"===this.props.answerType?this.props.possibleAnswers.map((function(x){return x.split(" ")[0]})):this.props.possibleAnswers,otherAnswers=this.props.otherAnswers;if(!otherAnswers)if(this.props.perFacilitator){var givenAnswers=Object.values(this.props.answers).reduce((function(set,answers){var _Object$keys;return new Set((_Object$keys=Object.keys(answers)).concat.apply(_Object$keys,_toConsumableArray(set.values())))}),new Set);otherAnswers=_lodash.default.difference(givenAnswers,possibleAnswers)}else otherAnswers=_lodash.default.difference(Object.keys(this.props.answers),possibleAnswers);return _react.default.createElement(_reactBootstrap.Panel,null,_react.default.createElement(_reactBootstrap.Panel.Body,null,this.props.question,_react.default.createElement("table",{style:{marginTop:"1em"}},_react.default.createElement("tbody",null,this.props.perFacilitator?this.renderPerFacilitatorAnswerCounts():this.renderSingleAnswerCounts(),this.props.otherText&&_react.default.createElement("tr",null,_react.default.createElement("td",null,this.formatPercentage(otherAnswers.length/this.getTotalRespondents())),_react.default.createElement("td",{style:{paddingLeft:"20px"}},otherAnswers.length),_react.default.createElement("td",{style:{paddingLeft:"20px"}},this.props.otherText)))),this.props.otherText&&otherAnswers.length>0&&_react.default.createElement("div",null,_react.default.createElement("br",null),this.props.otherText,_react.default.createElement("ul",null,_lodash.default.compact(otherAnswers).map((function(answer,i){return _react.default.createElement("li",{key:i},answer)}))))))},ChoiceResponses}(_react.default.Component);exports.default=ChoiceResponses,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(ChoiceResponses,"propTypes",{question:_propTypes.default.string.isRequired,answers:_propTypes.default.object.isRequired,perFacilitator:_propTypes.default.bool,numRespondents:_propTypes.default.number,answerType:_propTypes.default.string.isRequired,possibleAnswers:_propTypes.default.array.isRequired,possibleAnswersMap:_propTypes.default.object,otherText:_propTypes.default.string,otherAnswers:_propTypes.default.array,facilitators:_propTypes.default.object}),module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/choice_responses.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_choice_responses=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/survey_results/choice_responses.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("Choice responses",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Choice responses without other",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What is your favorite pizza topping?",answers:{Peppers:4,Onions:13,Mushrooms:2,Olives:2,Sausage:3},possibleAnswers:["Peppers","Onions","Mushrooms","Sausage","Olives","Pineapples"],answerType:"selectText"})}},{name:"Choice responses with others",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What is your favorite pizza topping? Please provide the topping if it is not listed here",answers:{Peppers:4,Onions:13,Mushrooms:2,Olives:2,Sausage:3,Corn:1,"Anything but pineapples lol":1,"Kalamata Olives specifically":1},possibleAnswers:["Peppers","Onions","Mushrooms","Sausage","Olives","Pineapples"],otherText:"Other toppings",answerType:"selectText"})}},{name:"Choice selectValue response",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What do you think about pineapples on pizza?",answers:{1:10,2:5,3:1,4:0,5:0},answerType:"selectValue",possibleAnswers:["Abhorrent","Not good","Ambivalent","Good","Delicious"]})}},{name:"Scale ratings",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"How do you feel about deep dish?",answers:{1:1,4:5,5:10},answerType:"scale",possibleAnswers:["1 - I hate it","2","3","4","5 - I love it"]})}}]),storybook.storiesOf("Choice per-facilitator responses",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Choice responses for only one facilitator",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What is your favorite pizza topping?",perFacilitator:!0,answers:{Tom:{Peppers:4,Mushrooms:2,Olives:2,Sausage:3}},possibleAnswers:["Peppers","Onions","Mushrooms","Sausage","Olives","Pineapples"],answerType:"selectText"})}},{name:"Choice responses without other",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What is your favorite pizza topping?",perFacilitator:!0,answers:{Tom:{Peppers:4,Mushrooms:2,Olives:2,Sausage:3},Dick:{Peppers:4,Onions:13,Sausage:3},Harry:{Pineapples:5,Onions:5}},possibleAnswers:["Peppers","Onions","Mushrooms","Sausage","Olives","Pineapples"],answerType:"selectText"})}},{name:"Choice responses with others",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What is your favorite pizza topping? Please provide the topping if it is not listed here",perFacilitator:!0,answers:{Tom:{Peppers:4,Onions:13,Mushrooms:2,Olives:2,Sausage:3,Corn:1,"Anything but pineapples lol":1,"Kalamata Olives specifically":1},Dick:{"Pepperoni and literally nothing else":1},Harry:{Peppers:16,Onions:17,Mushrooms:8,Sausage:16,Olives:12,Pineapples:14}},possibleAnswers:["Peppers","Onions","Mushrooms","Sausage","Olives","Pineapples"],otherText:"Other toppings",answerType:"selectText"})}},{name:"Choice selectValue response",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"What do you think about pineapples on pizza?",perFacilitator:!0,answers:{Tom:{1:10,2:5,3:1},Dick:{3:1,4:5,5:10},Harry:{1:1,2:1,3:1,4:1,5:1}},answerType:"selectValue",possibleAnswers:["Abhorrent","Not good","Ambivalent","Good","Delicious"]})}},{name:"Scale ratings",story:function story(){return _react.default.createElement(_choice_responses.default,{question:"How do you feel about deep dish?",perFacilitator:!0,answers:{Tom:{1:10,2:5,3:1},Dick:{3:1,4:5,5:10},Harry:{1:1,3:1,5:1}},answerType:"scale",possibleAnswers:["1 - I hate it","2","3","4","5 - I love it"]})}}])},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/free_response_section.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var FreeResponseSection=function(_React$Component){function FreeResponseSection(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(FreeResponseSection,_React$Component);var _proto=FreeResponseSection.prototype;return _proto.renderFacilitatorsAndAnswers=function renderFacilitatorsAndAnswers(answers){var _this=this;return Object.keys(answers).map((function(facilitator_name,i){return _react.default.createElement("li",{key:i},facilitator_name,_react.default.createElement("ul",null,answers[facilitator_name].map((function(feedback,j){return _this.renderBullet(feedback,j)}))))}))},_proto.renderAnswers=function renderAnswers(answers){var _this2=this;return answers.map((function(answer,i){return _this2.renderBullet(answer,i)}))},_proto.renderBullet=function renderBullet(text,key){var trimmedText=_lodash.default.trim(text);if(trimmedText)return _react.default.createElement("li",{key},trimmedText)},_proto.renderResponseSection=function renderResponseSection(responses){if(responses)return Array.isArray(responses)?this.renderAnswers(responses):this.renderFacilitatorsAndAnswers(responses)},_proto.render=function render(){var _this3=this;return _react.default.createElement("div",null,this.props.questions.map((function(question,i){return _react.default.createElement(_reactBootstrap.Well,{key:i},_react.default.createElement("b",null,question.text),_this3.renderResponseSection(_this3.props.responseData[question.key]))})))},FreeResponseSection}(_react.default.Component);exports.default=FreeResponseSection,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(FreeResponseSection,"propTypes",{questions:_propTypes.default.arrayOf(_propTypes.default.object).isRequired,responseData:_propTypes.default.object.isRequired}),module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/free_response_section.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_free_response_section=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/survey_results/free_response_section.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("FreeResponseSection",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Responses for a single facilitator",story:function story(){return _react.default.createElement(_free_response_section.default,{questions:[{text:"Question 1",key:"question_1"},{text:"Question 2",key:"question_2"}],responseData:{question_1:["Feedback 1_1","Feedback 1_2"],question_2:["Feedback 2_1","Feedback 2_2"]}})}},{name:"Responses for multiple facilitators",story:function story(){return _react.default.createElement(_free_response_section.default,{questions:[{text:"Question 1",key:"question_1"},{text:"Question 2",key:"question_2"}],responseData:{question_1:{"Facilitator 1":["Q1F1 feedback","Q1F1 feedback"],"Facilitator 2":["Q1F2 feedback","Q1F2 feedback"]},question_2:{"Facilitator 1":["Q2F1 feedback","Q2F1 feedback"],"Facilitator 2":["Q2F2 feedback","Q2F2 feedback"]}}})}}])},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/question_averages_table.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var QuestionAveragesTable=function(_React$Component){function QuestionAveragesTable(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(QuestionAveragesTable,_React$Component);var _proto=QuestionAveragesTable.prototype;return _proto.renderHeaderRow=function renderHeaderRow(){var facilitatorColumnHeaders;return this.props.facilitatorBreakdown&&(facilitatorColumnHeaders=this.props.facilitatorNames.map((function(facilitator,i){return _react.default.createElement("th",{key:i},facilitator)}))),_react.default.createElement("thead",null,_react.default.createElement("tr",null,_react.default.createElement("th",null),_react.default.createElement("th",null,"This workshop"),facilitatorColumnHeaders,_react.default.createElement("th",null,"All my ",this.props.workshopType),_react.default.createElement("th",null,"All workshops")))},_proto.renderRow=function renderRow(row,i){var scoreCells,_this=this,thisWorkshopData=this.props.thisWorkshopData[row.key];return this.props.facilitatorBreakdown&&"object"===_typeof(thisWorkshopData)?(scoreCells=this.props.facilitatorNames.map((function(facilitator_name){return _react.default.createElement("td",{key:facilitator_name},_this.renderScore(row,thisWorkshopData[facilitator_name]))}))).unshift(_react.default.createElement("td",{key:"this workshop"})):(scoreCells=[_react.default.createElement("td",{key:0},this.renderScore(row,thisWorkshopData))],this.props.facilitatorBreakdown&&_lodash.default.times(this.props.facilitatorNames.length,(function(i){scoreCells.push(_react.default.createElement("td",{key:i+1}))}))),_react.default.createElement("tr",{key:i},_react.default.createElement("td",null,row.text),scoreCells,_react.default.createElement("td",null,this.renderScore(row,this.props.allMyWorkshopsData[row.key])),_react.default.createElement("td",null,this.renderScore(row,this.props.allWorkshopsData[row.key])))},_proto.renderScore=function renderScore(row,score){return score&&row.score_base?"".concat(score," / ").concat(row.score_base):score||""},_proto.render=function render(){var _this2=this;return _react.default.createElement("table",{className:"table table-bordered",style:{width:"auto"}},this.renderHeaderRow(),_react.default.createElement("tbody",null,this.props.questions.map((function(row,i){return _this2.renderRow(row,i)}))))},QuestionAveragesTable}(_react.default.Component);exports.default=QuestionAveragesTable,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(QuestionAveragesTable,"propTypes",{questions:_propTypes.default.arrayOf(_propTypes.default.object).isRequired,thisWorkshopData:_propTypes.default.object.isRequired,allMyWorkshopsData:_propTypes.default.object.isRequired,allWorkshopsData:_propTypes.default.object.isRequired,facilitatorNames:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,facilitatorBreakdown:_propTypes.default.bool.isRequired,workshopType:_propTypes.default.string.isRequired}),module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/question_averages_table.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_question_averages_table=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/survey_results/question_averages_table.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){var questions=[{text:"Was the facilitator good at brooding?",key:"question_1",score_base:5},{text:"How was the session?",key:"question_2",score_base:5}];storybook.storiesOf("Question Averages Section",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Table for a single facilitator",story:function story(){return _react.default.createElement(_question_averages_table.default,{questions,thisWorkshopData:{question_1:5,question_2:5},allMyWorkshopsData:{question_1:4,question_2:4.1},allWorkshopsData:{question_1:3.5,question_2:3.6},allWorkshops:!0,facilitatorNames:["Jon Snow","Tyrion Lannister"],facilitatorBreakdown:!1,workshopType:"TeacherCons"})}},{name:"Table for multiple facilitators",story:function story(){return _react.default.createElement(_question_averages_table.default,{questions,facilitatorNames:["Jon Snow","Tyrion Lannister"],facilitatorBreakdown:!0,thisWorkshopData:{question_1:{"Jon Snow":5,"Tyrion Lannister":3},question_2:5},allMyWorkshopsData:{question_1:4,question_2:4.1},allWorkshopsData:{question_1:3.5,question_2:3.6},workshopType:"TeacherCons"})}}])},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/survey_rollup_table.jsx":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.SurveyRollupTable=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_workshopConstants=__webpack_require__("./src/code-studio/pd/workshop_dashboard/workshopConstants.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var questionCategories=["facilitator_effectiveness","teacher_engagement","overall_success"],SurveyRollupTable=function(_React$Component){function SurveyRollupTable(props){var _this;return(_this=_React$Component.call(this,props)||this).categoryDenominator={facilitator_effectiveness:7,teacher_engagement:props.courseName===_workshopConstants.COURSE_CSF?5:7,overall_success:7},_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(SurveyRollupTable,_React$Component);var _proto=SurveyRollupTable.prototype;return _proto.createOrderedRows=function createOrderedRows(categories,questions){var orderedRows=[];return categories.forEach((function(category){orderedRows.push({key:category,label:_lodash.default.startCase(category),isCategory:!0});var question_found=!1;Object.keys(questions).forEach((function(question_name){question_name.startsWith(category)&&(question_found=!0,orderedRows.push({key:question_name,label:questions[question_name],category}))})),question_found||orderedRows.pop()})),orderedRows},_proto.createColumnLabel=function createColumnLabel(facilitatorId,workshopId,courseName,facilitatorLookup){var label="";if(facilitatorId){var possessiveName="".concat(facilitatorLookup[facilitatorId],"'").concat(_lodash.default.endsWith(name,"s")?"":"s");label=workshopId?"".concat(possessiveName," average for this workshop"):"Average across all of ".concat(possessiveName," ").concat(courseName," workshops")}else workshopId&&(label="Average for this workshop");return label},_proto.createOrderedColumns=function createOrderedColumns(){var _this2=this;return Object.keys(this.props.rollups).map((function(scenario_key){return{key:scenario_key,label:_this2.createColumnLabel(_this2.props.rollups[scenario_key].facilitator_id,_this2.props.rollups[scenario_key].workshop_id,_this2.props.rollups[scenario_key].course_name,_this2.props.facilitators)||scenario_key.toString}}))},_proto.renderAverage=function renderAverage(value,category){return value?"".concat(value.toFixed(1)," / ").concat(this.categoryDenominator[category]):"-"},_proto.render=function render(){var _this3=this,orderedColumns=this.createOrderedColumns(),orderedRows=this.createOrderedRows(questionCategories,this.props.questions);return _react.default.createElement(_reactBootstrap.Table,{bordered:!0},_react.default.createElement("thead",null,_react.default.createElement("tr",null,_react.default.createElement("th",null),orderedColumns.map((function(column,i){return _react.default.createElement("th",{key:i},column.label)})))),_react.default.createElement("tbody",null,_react.default.createElement("tr",null,_react.default.createElement("td",null,"Total responses"),orderedColumns.map((function(column,i){return _react.default.createElement("td",{key:i},_this3.props.rollups[column.key].response_count)}))),orderedRows.map((function(row,i){return _react.default.createElement("tr",{key:i,style:row.isCategory?{borderTop:"solid"}:{}},_react.default.createElement("td",{style:row.isCategory?{}:{paddingLeft:"30px"}},row.label),orderedColumns.map((function(column,j){return _react.default.createElement("td",{key:j},_this3.renderAverage(_this3.props.rollups[column.key].averages[row.key],row.category||row.key))})))}))))},SurveyRollupTable}(_react.default.Component);exports.SurveyRollupTable=SurveyRollupTable,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(SurveyRollupTable,"propTypes",{courseName:_propTypes.default.string.isRequired,rollups:_propTypes.default.object.isRequired,questions:_propTypes.default.object.isRequired,facilitators:_propTypes.default.object.isRequired});var _default=SurveyRollupTable;exports.default=_default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/survey_rollup_table.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_survey_rollup_table=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/survey_results/survey_rollup_table.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx")),_workshopConstants=__webpack_require__("./src/code-studio/pd/workshop_dashboard/workshopConstants.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var facilitator_rollups={facilitators:{1:"Facilitator Person 1",2:"Facilitator Person 2"},questions:{facilitator_effectiveness_0:"Demonstrated knowledge of the curriculum.",facilitator_effectiveness_1:"Built and sustained an equitable learning environment in our workshop.",facilitator_effectiveness_2:"Kept the workshop and participants on track.",facilitator_effectiveness_3:"Supported productive workshop discussions.",facilitator_effectiveness_4:"Helped me see ways to create and support an equitable learning environment for my students.",facilitator_effectiveness_5:"Demonstrated a healthy working relationship with their co-facilitator (if applicable)."},rollups:{facilitator_1_single_ws:{facilitator_id:1,workshop_id:1,response_count:1,averages:{facilitator_effectiveness_0:1,facilitator_effectiveness_2:4,facilitator_effectiveness_4:3,facilitator_effectiveness_5:1,facilitator_effectiveness:2.25}},facilitator_1_all_ws:{facilitator_id:1,all_workshop_ids:[1],course_name:"CS Principles",response_count:1,averages:{facilitator_effectiveness_0:1,facilitator_effectiveness_2:4,facilitator_effectiveness_4:3,facilitator_effectiveness_5:1,facilitator_effectiveness:2.25}},facilitator_2_single_ws:{facilitator_id:2,workshop_id:1,response_count:1,averages:{facilitator_effectiveness_0:1,facilitator_effectiveness_2:4,facilitator_effectiveness_4:3,facilitator_effectiveness_5:1,facilitator_effectiveness:2.25}},facilitator_2_all_ws:{facilitator_id:2,all_workshop_ids:[1],course_name:"CS Principles",response_count:1,averages:{facilitator_effectiveness_0:1,facilitator_effectiveness_2:4,facilitator_effectiveness_4:3,facilitator_effectiveness_5:1,facilitator_effectiveness:2.25}}}},workshop_rollups={facilitators:{1:"Facilitator Person 1",2:"Facilitator Person 2"},questions:{overall_success_0:"I feel more prepared to teach the material covered in this workshop than before I came.",overall_success_1:"I know where to go if I need help preparing to teach this material.",overall_success_2:"This professional development was suitable for my level of experience with teaching CS.",overall_success_3:"I feel connected to a community of computer science teachers.",overall_success_4:"I would recommend this professional development to others",teacher_engagement_0:"I found the activities we did in this workshop interesting and engaging.",teacher_engagement_1:"I was highly active and participated a lot in the workshop activities.",teacher_engagement_2:"I frequently talk about ideas or content from the workshop with others.",teacher_engagement_3:"I am planning to make use of ideas and content covered in this workshop in my classroom."},rollups:{this_ws:{workshop_id:1,response_count:1,averages:{overall_success_0:6,overall_success_1:7,overall_success_2:6,overall_success_3:6,overall_success_4:7,teacher_engagement_0:7,teacher_engagement_1:6,teacher_engagement_2:6,teacher_engagement_3:7,overall_success:6.4,teacher_engagement:6.5}},facilitator_1_all_ws:{facilitator_id:1,all_workshop_ids:[1],course_name:"CS Principles",response_count:1,averages:{overall_success_0:6,overall_success_1:7,overall_success_2:6,overall_success_3:6,overall_success_4:7,teacher_engagement_0:7,teacher_engagement_1:6,teacher_engagement_2:6,teacher_engagement_3:7,overall_success:6.4,teacher_engagement:6.5}},facilitator_2_all_ws:{facilitator_id:2,all_workshop_ids:[1],course_name:"CS Principles",response_count:1,averages:{overall_success_0:6,overall_success_1:7,overall_success_2:6,overall_success_3:6,overall_success_4:7,teacher_engagement_0:7,teacher_engagement_1:6,teacher_engagement_2:6,teacher_engagement_3:7,overall_success:6.4,teacher_engagement:6.5}}}};exports.default=function _default(storybook){storybook.storiesOf("SurveyRollupTable",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Facilitator Rollup Table",story:function story(){return _react.default.createElement(_survey_rollup_table.default,{courseName:"CS Principles",rollups:facilitator_rollups.rollups,questions:facilitator_rollups.questions,facilitators:facilitator_rollups.facilitators})}},{name:"Workshop Rollup Table",story:function story(){return _react.default.createElement(_survey_rollup_table.default,{courseName:_workshopConstants.COURSE_CSF,rollups:workshop_rollups.rollups,questions:workshop_rollups.questions,facilitators:workshop_rollups.facilitators})}}])},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/text_responses.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_he=_interopRequireDefault(__webpack_require__("./node_modules/he/he.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var TextResponses=function(_React$Component){function TextResponses(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(TextResponses,_React$Component);var _proto=TextResponses.prototype;return _proto.renderResponseBullets=function renderResponseBullets(){var _this=this;if(Array.isArray(this.props.answers)){var answers=this.props.answers.map((function(answer,i){return _this.renderBullet(answer,i)}));if(this.props.showAverage){var average=this.computeAverageForAnswers(this.props.answers);answers.unshift(_react.default.createElement("li",{key:Object.keys(this.props.answers).length},"Average: ",average))}return answers}return Object.keys(this.props.answers).map((function(facilitator_name,i){var answers=_this.props.answers[facilitator_name].map((function(feedback,j){return _this.renderBullet(feedback,j)}));if(_this.props.showAverage){var _average=_this.computeAverageForAnswers(_this.props.answers[facilitator_name]);answers.unshift(_react.default.createElement("li",{key:Object.keys(_this.props.answers[facilitator_name]).length},"Average: ",_average))}return _react.default.createElement("li",{key:i},_this.props.facilitators&&_this.props.facilitators[facilitator_name]?_this.props.facilitators[facilitator_name]:facilitator_name,_react.default.createElement("ul",null,answers))}))},_proto.computeAverageForAnswers=function computeAverageForAnswers(answers){var numericAnswers=answers.filter((function(answer){return!isNaN(Number(answer))}));return(numericAnswers.reduce((function(sum,answer){var x=parseInt(answer);return x>0?sum+x:sum}),0)/numericAnswers.length).toFixed(2)},_proto.renderBullet=function renderBullet(text,key){var trimmedText=_lodash.default.trim(_he.default.decode(text));if(trimmedText)return _react.default.createElement("li",{key},trimmedText)},_proto.render=function render(){return _react.default.createElement(_reactBootstrap.Well,null,_react.default.createElement("b",null,this.props.question),this.renderResponseBullets())},TextResponses}(_react.default.Component);exports.default=TextResponses,function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(TextResponses,"propTypes",{question:_propTypes.default.string.isRequired,answers:_propTypes.default.oneOfType([_propTypes.default.array,_propTypes.default.object]).isRequired,showAverage:_propTypes.default.bool,facilitators:_propTypes.default.object}),module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/survey_results/text_responses.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_text_responses=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_dashboard/components/survey_results/text_responses.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("Text responses",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"General text responses",story:function story(){return _react.default.createElement(_text_responses.default,{question:"What is your favorite food?",answers:["Tacos","Pizza","Burritos","Vegetable Fried Rice"]})}},{name:"Facilitator specific text responses",story:function story(){return _react.default.createElement(_text_responses.default,{question:"What snacks do you want your facilitator to bring?",answers:{"Facilitator 1":["Chips","Apples","Nachos","Nachos","Cookies"],"Facilitator 2":["Fries","Carrots","Carrots","Peppers","Donuts"]}})}},{name:"General responses with an average",story:function story(){return _react.default.createElement(_text_responses.default,{question:"How many tacos do you want?",answers:["1","2","3","6","3","3","2","0","Dunno"],showAverage:!0})}},{name:"Facilitator responses with averages",story:function story(){return _react.default.createElement(_text_responses.default,{question:"On a scale of 1 to 5, how good was the facilitator's cooking?",answers:{"Facilitator 1":["3","4","5","5","4","5","5"],"Facilitator 2":["2","3","1","1","1","2","Dunno"]},showAverage:!0})}}])},module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/components/workshop_table_loader.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_spinner=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/components/spinner.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var WorkshopTableLoader=function(_React$Component){function WorkshopTableLoader(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"state",{loading:!0,workshops:null}),_defineProperty(_assertThisInitialized(_this),"load",(function(){var props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_this.props;_this.setState({loading:!0});var effectiveParams=_lodash.default.omitBy(props.queryParams,(function(value){return null==value})),url=props.queryParams?"".concat(props.queryUrl,"?").concat(_jquery.default.param(effectiveParams)):props.queryUrl;_this.loadRequest=_jquery.default.ajax({method:"GET",url,dataType:"json"}).done((function(data){_this.setState({loading:!1,workshops:data})}))})),_defineProperty(_assertThisInitialized(_this),"handleDelete",(function(workshopId){_this.deleteRequest=_jquery.default.ajax({method:"DELETE",url:"/api/v1/pd/workshops/"+workshopId}).done((function(){_this.load()}))})),_this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(WorkshopTableLoader,_React$Component);var _proto=WorkshopTableLoader.prototype;return _proto.UNSAFE_componentWillMount=function UNSAFE_componentWillMount(){this.load=_lodash.default.debounce(this.load,200)},_proto.componentDidMount=function componentDidMount(){this.load()},_proto.UNSAFE_componentWillReceiveProps=function UNSAFE_componentWillReceiveProps(nextProps){_lodash.default.isEqual(this.props,nextProps)||(this.abortPendingRequests(),this.load(nextProps))},_proto.componentDidUpdate=function componentDidUpdate(){this.childElement&&(this.childHeight=_reactDom.default.findDOMNode(this.childElement).offsetHeight)},_proto.componentWillUnmount=function componentWillUnmount(){this.abortPendingRequests()},_proto.abortPendingRequests=function abortPendingRequests(){this.loadRequest&&this.loadRequest.abort(),this.deleteRequest&&this.deleteRequest.abort()},_proto.render=function render(){var _this2=this;return this.state.loading?_react.default.createElement("div",{style:{height:this.childHeight}},_react.default.createElement(_spinner.default,null)):this.state.workshops.length||this.state.workshops.total_count?_react.default.createElement("div",{ref:function ref(el){return _this2.childElement=el}},_react.default.cloneElement(this.props.children,{workshops:this.state.workshops,onDelete:this.props.canDelete?this.handleDelete:null})):this.props.hideNoWorkshopsMessage?null:_react.default.createElement("p",null,"No workshops found")},WorkshopTableLoader}(_react.default.Component);exports.default=WorkshopTableLoader,_defineProperty(WorkshopTableLoader,"propTypes",{queryUrl:_propTypes.default.string.isRequired,queryParams:_propTypes.default.object,canDelete:_propTypes.default.bool,children:_propTypes.default.element.isRequired,hideNoWorkshopsMessage:_propTypes.default.bool}),module.exports=exports.default},"./src/code-studio/pd/workshop_dashboard/permission.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WorkshopAdmin=exports.ProgramManager=exports.PermissionPropType=exports.Organizer=exports.Facilitator=exports.CsfFacilitator=void 0;var _propTypes=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/prop-types/index.js"));function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}exports.default=function Permission(){var _this=this,permissions=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_defineProperty(this,"has",(function(name){return _this.permissions.has(name)})),_defineProperty(this,"hasAny",(function(){for(var _len=arguments.length,names=new Array(_len),_key=0;_key<_len;_key++)names[_key]=arguments[_key];return names.some((function(name){return _this.has(name)}))})),_defineProperty(this,"hasAll",(function(){for(var _len2=arguments.length,names=new Array(_len2),_key2=0;_key2<_len2;_key2++)names[_key2]=arguments[_key2];return names.every((function(name){return _this.has(name)}))})),this.permissions=new Set(permissions)};exports.WorkshopAdmin="WorkshopAdmin";exports.Facilitator="Facilitator";exports.CsfFacilitator="CsfFacilitator";exports.Organizer="Organizer";exports.ProgramManager="ProgramManager";var PermissionPropType=_propTypes.default.shape({has:_propTypes.default.func,hasAny:_propTypes.default.func,hasAll:_propTypes.default.func});exports.PermissionPropType=PermissionPropType},"./src/code-studio/pd/workshop_dashboard/types.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.workshopShape=exports.enrollmentShape=void 0;var _propTypes=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/prop-types/index.js"));var workshopShape=_propTypes.default.shape({id:_propTypes.default.number.isRequired,sessions:_propTypes.default.array.isRequired,location_name:_propTypes.default.string.isRequired,location_address:_propTypes.default.string,on_map:_propTypes.default.bool.isRequired,funded:_propTypes.default.bool.isRequired,course:_propTypes.default.string.isRequired,subject:_propTypes.default.string,enrolled_teacher_count:_propTypes.default.number.isRequired,capacity:_propTypes.default.number.isRequired,facilitators:_propTypes.default.array.isRequired,organizer:_propTypes.default.shape({name:_propTypes.default.string,email:_propTypes.default.string}).isRequired,enrollment_code:_propTypes.default.string,workshop_starting_date:_propTypes.default.string,pre_workshop_survey_url:_propTypes.default.string});exports.workshopShape=workshopShape;var enrollmentShape=_propTypes.default.shape({first_name:_propTypes.default.string.isRequired,last_name:_propTypes.default.string.isRequired,email:_propTypes.default.string.isRequired,district_name:_propTypes.default.string,school:_propTypes.default.string.isRequired,role:_propTypes.default.string,grades_teaching:_propTypes.default.string,user_id:_propTypes.default.number,attended:_propTypes.default.bool.isRequired,scholarship_status:_propTypes.default.string,pre_workshop_survey:_propTypes.default.shape({unit:_propTypes.default.string,lesson:_propTypes.default.string,questionsAndTopics:_propTypes.default.string,unitLessonShortName:_propTypes.default.string})});exports.enrollmentShape=enrollmentShape},"./src/code-studio/pd/workshop_dashboard/workshopConstants.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TIME_FORMAT=exports.MAX_SESSIONS=exports.DATE_FORMAT=exports.DATETIME_FORMAT=exports.COURSE_CSF=void 0;exports.TIME_FORMAT="h:mma";exports.DATE_FORMAT="YYYY-MM-DD";var DATETIME_FORMAT="".concat("YYYY-MM-DD"," ").concat("h:mma");exports.DATETIME_FORMAT=DATETIME_FORMAT;exports.COURSE_CSF="CS Fundamentals";exports.MAX_SESSIONS=10},"./src/code-studio/pd/workshop_survey/VariableFormGroup.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_ButtonList=__webpack_require__("./src/code-studio/pd/form_components/ButtonList.jsx"),_FieldGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/form_components/FieldGroup.jsx")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var questionPropType=_propTypes.default.shape({label:_propTypes.default.string.isRequired,name:_propTypes.default.string.isRequired,required:_propTypes.default.bool,type:_propTypes.default.oneOf(["single_select","multi_select","free_response","radio","check"]).isRequired,values:_propTypes.default.arrayOf(_propTypes.default.string)}),ColumnVariableQuestion=function(_React$Component){function ColumnVariableQuestion(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _defineProperty(_assertThisInitialized(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this),"buildColumn",(function(selectedValue){var key="".concat(_this.props.question.name,"[").concat(selectedValue,"]"),type=_this.props.question.type;"single_select"===_this.props.question.type?type="radio":"multi_select"===_this.props.question.type&&(type="check");var validationState,selected=_this.props.data&&_this.props.data[key];return selected&&"check"===type&&(selected=[selected]),_this.props.errors&&_this.props.errors.includes(key)&&(validationState="error"),_react.default.createElement("td",{key},_react.default.createElement(_reactBootstrap.FormGroup,{controlId:key,validationState},_react.default.createElement(_ButtonList.ButtonList,{answers:_this.props.question.values,groupName:key,label:"",type,selectedItems:selected,onChange:_this.props.onChange})))})),_this}return _inheritsLoose(ColumnVariableQuestion,_React$Component),ColumnVariableQuestion.prototype.render=function render(){return _react.default.createElement("tr",null,_react.default.createElement("td",{style:styles.tdLabel},_react.default.createElement(_reactBootstrap.ControlLabel,null,this.props.question.label,this.props.question.required&&_react.default.createElement("span",{className:"form-required-field"}," *"))),this.props.selectedValues.map(this.buildColumn))},ColumnVariableQuestion}(_react.default.Component);_defineProperty(ColumnVariableQuestion,"propTypes",{selectedValues:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,question:questionPropType,onChange:_propTypes.default.func,data:_propTypes.default.object,errors:_propTypes.default.arrayOf(_propTypes.default.string)});var RowVariableQuestion=function(_React$Component2){function RowVariableQuestion(){for(var _this2,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return _defineProperty(_assertThisInitialized(_this2=_React$Component2.call.apply(_React$Component2,[this].concat(args))||this),"buildRow",(function(selectedValue){var validationState,label=_this2.props.question.label.replace("{value}",selectedValue),key="".concat(_this2.props.question.name,"[").concat(selectedValue,"]");return _this2.props.errors&&_this2.props.errors.includes(key)&&(validationState="error"),_react.default.createElement(_FieldGroup.default,{key,id:key,label,validationState,required:_this2.props.question.required,componentClass:"textarea",name:key,rows:4,value:_this2.props.data&&_this2.props.data[key],onChange:_this2.props.onChange})})),_this2}return _inheritsLoose(RowVariableQuestion,_React$Component2),RowVariableQuestion.prototype.render=function render(){return _react.default.createElement("div",null,this.props.selectedValues.map(this.buildRow))},RowVariableQuestion}(_react.default.Component);_defineProperty(RowVariableQuestion,"propTypes",{selectedValues:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,question:questionPropType,onChange:_propTypes.default.func,data:_propTypes.default.object,errors:_propTypes.default.arrayOf(_propTypes.default.string)});var VariableFormGroup=function(_React$Component3){function VariableFormGroup(props){var _this3;_defineProperty(_assertThisInitialized(_this3=_React$Component3.call(this,props)||this),"setSelected",(function(values){_this3.props.onChange&&_this3.props.onChange(values),_this3.setState({selected:values[_this3.props.sourceName]})}));var selected=[];return _this3.hasSingleSourceValue()?selected=[props.sourceValues[0]]:props.data&&props.data[props.sourceName]&&(selected=props.data[props.sourceName]),_this3.state={selected},_this3}_inheritsLoose(VariableFormGroup,_React$Component3);var _proto3=VariableFormGroup.prototype;return _proto3.UNSAFE_componentWillMount=function UNSAFE_componentWillMount(){this.hasSingleSourceValue()&&this.props.onChange&&this.props.onChange(_defineProperty({},this.props.sourceName,this.state.selected))},_proto3.hasNoSourceValues=function hasNoSourceValues(){return 0===this.props.sourceValues.length},_proto3.hasSingleSourceValue=function hasSingleSourceValue(){return 1===this.props.sourceValues.length},_proto3.render=function render(){var columnQuestions,_this4=this;if(this.hasNoSourceValues())return _react.default.createElement(_reactBootstrap.FormGroup,null);columnQuestions=this.state.selected.length<1?_react.default.createElement("tr",null,_react.default.createElement("td",{style:styles.tdLabel,className:"warning"},_react.default.createElement(_reactBootstrap.ControlLabel,null,_react.default.createElement(_reactBootstrap.FormControl.Static,null,"Please select one or more answers from the question above.",_react.default.createElement("span",{className:"form-required-field"}," *"))))):this.props.columnVariableQuestions.map((function(question){return _react.default.createElement(ColumnVariableQuestion,{key:question.name,question,selectedValues:_this4.state.selected,data:_this4.props.data,errors:_this4.props.errors,onChange:_this4.props.onChange})}));var validationState,rowQuestions=this.props.rowVariableQuestions.map((function(question){return _react.default.createElement(RowVariableQuestion,{key:question.name,question,selectedValues:_this4.state.selected,data:_this4.props.data,errors:_this4.props.errors,onChange:_this4.props.onChange})})),thStyle={width:"".concat(100/(this.state.selected.length+1),"%"),backgroundColor:"#00b2c0",color:"white"};return this.props.errors&&this.props.errors.includes(this.props.sourceName)&&(validationState="error"),_react.default.createElement(_reactBootstrap.FormGroup,{validationState,controlId:this.props.sourceName},this.hasSingleSourceValue()?_react.default.createElement("input",{type:"hidden",name:this.props.sourceName,value:this.props.sourceValues[0]}):_react.default.createElement(_ButtonList.ButtonList,{answers:this.props.sourceValues,groupName:this.props.sourceName,label:this.props.sourceLabel,onChange:this.setSelected,selectedItems:this.state.selected,required:!0,type:"check"}),columnQuestions.length>0&&_react.default.createElement(_reactBootstrap.Table,{striped:!0,bordered:!0},_react.default.createElement("thead",null,_react.default.createElement("tr",null,_react.default.createElement("th",{style:thStyle}),this.state.selected.map((function(value){return _react.default.createElement("th",{key:value,style:thStyle},_react.default.createElement("label",null,value))})))),_react.default.createElement("tbody",null,columnQuestions)),rowQuestions)},VariableFormGroup}(_react.default.Component);exports.default=VariableFormGroup,_defineProperty(VariableFormGroup,"propTypes",{sourceLabel:_propTypes.default.string.isRequired,sourceName:_propTypes.default.string.isRequired,sourceValues:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,columnVariableQuestions:_propTypes.default.arrayOf(questionPropType),rowVariableQuestions:_propTypes.default.arrayOf(questionPropType),onChange:_propTypes.default.func,data:_propTypes.default.object,errors:_propTypes.default.arrayOf(_propTypes.default.string)}),_defineProperty(VariableFormGroup,"defaultProps",{columnVariableQuestions:[],rowVariableQuestions:[]});var styles={tdLabel:{padding:15,verticalAlign:"inherit"}};module.exports=exports.default},"./src/code-studio/pd/workshop_survey/VariableFormGroup.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_VariableFormGroup=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/workshop_survey/VariableFormGroup.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("FormComponents/VariableFormGroup",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"basic uncontrolled VariableFormGroup",story:function story(){return _react.default.createElement(_VariableFormGroup.default,{sourceLabel:"Who should go on the away mission?",sourceName:"roster",sourceValues:["an essential member of the bridge crew","an absolutely valueless redshirt","someone whose actual job is to go on away missions"],columnVariableQuestions:[{label:"is this person qualified for the mission?",name:"qualified",required:!0,type:"radio",values:["Yes","Not remotely"]},{label:"can the ship afford to risk this person's life?",name:"risk",required:!0,type:"radio",values:["Yes","We would all literally die without them"]}],rowVariableQuestions:[{label:"why are you selecing {value} for this mission?",name:"why",required:!1,type:"free_response"}]})}}])},module.exports=exports.default},"./src/code-studio/peer_reviews/PeerReviewLinkSection.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_FontAwesome=_interopRequireDefault(__webpack_require__("./src/templates/FontAwesome.jsx")),_moment=_interopRequireDefault(__webpack_require__("./node_modules/moment/moment.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var PeerReviewLinkSection=function(_React$Component){function PeerReviewLinkSection(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PeerReviewLinkSection,_React$Component);var _proto=PeerReviewLinkSection.prototype;return _proto.getIconForStatus=function getIconForStatus(status){switch(status){case"accepted":return"check";case"rejected":return"times";case"escalated":return"question";default:return"circle-thin"}},_proto.render=function render(){var _this=this;return _react.default.createElement("ul",{className:"fa-ul"},this.props.reviews.map((function(submission,i){return _react.default.createElement("li",{key:i,style:{whiteSpace:"nowrap"}},_react.default.createElement(_FontAwesome.default,{icon:"".concat(_this.getIconForStatus(submission[1])," fa-li")}),_react.default.createElement("a",{key:i,href:"/peer_reviews/".concat(submission[0])},(0,_moment.default)(submission[2]).fromNow()))})))},PeerReviewLinkSection}(_react.default.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(PeerReviewLinkSection,"propTypes",{reviews:_propTypes.default.arrayOf(_propTypes.default.array).isRequired,escalatedReviewId:_propTypes.default.number});var _default=PeerReviewLinkSection;exports.default=_default,module.exports=exports.default},"./src/code-studio/peer_reviews/PeerReviewLinkSection.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_PeerReviewLinkSection=_interopRequireDefault(__webpack_require__("./src/code-studio/peer_reviews/PeerReviewLinkSection.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("Peer Review Link Section",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Peer Review Links for non escalated submissions",story:function story(){return _react.default.createElement(_PeerReviewLinkSection.default,{filterType:"open",reviews:[[1,"accepted"],[2,"rejected"],[3,"escalated"],[4,""]]})}},{name:"Peer Review Links for escalated submissions",story:function story(){return _react.default.createElement(_PeerReviewLinkSection.default,{filterType:"escalated",escalatedReviewId:3,reviews:[[1,"accepted"],[2,"rejected"],[3,"escalated"],[4,""]]})}}])},module.exports=exports.default},"./src/code-studio/peer_reviews/PeerReviewSubmissionData.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_reactBootstrap=__webpack_require__("./node_modules/react-bootstrap/es/index.js"),_PeerReviewLinkSection=_interopRequireDefault(__webpack_require__("./src/code-studio/peer_reviews/PeerReviewLinkSection.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var PeerReviewSubmissionData=function(_React$Component){function PeerReviewSubmissionData(){return _React$Component.apply(this,arguments)||this}!function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,_setPrototypeOf(subClass,superClass)}(PeerReviewSubmissionData,_React$Component);var _proto=PeerReviewSubmissionData.prototype;return _proto.renderTableHeader=function renderTableHeader(){return _react.default.createElement("thead",null,_react.default.createElement("tr",null,_react.default.createElement("th",null,"Submitter"),_react.default.createElement("th",null,"Course"),_react.default.createElement("th",null,"Unit"),_react.default.createElement("th",null,"Activity"),_react.default.createElement("th",null,"Submitted"),_react.default.createElement("th",{style:{width:"115px"}},"Link")))},_proto.renderTableBody=function renderTableBody(){return _react.default.createElement("tbody",null,this.props.submissions.map((function(submission,i){return _react.default.createElement("tr",{key:i},_react.default.createElement("td",null,submission.submitter),_react.default.createElement("td",null,submission.course_name),_react.default.createElement("td",null,submission.unit_name),_react.default.createElement("td",null,submission.level_name),_react.default.createElement("td",null,submission.submission_date),_react.default.createElement("td",null,_react.default.createElement(_PeerReviewLinkSection.default,{reviews:submission.review_ids,escalatedReviewId:submission.escalated_review_id})))})))},_proto.render=function render(){return _react.default.createElement(_reactBootstrap.Table,{striped:!0},this.renderTableHeader(),this.renderTableBody())},PeerReviewSubmissionData}(_react.default.Component);!function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(PeerReviewSubmissionData,"propTypes",{submissions:_propTypes.default.arrayOf(_propTypes.default.object).isRequired});var _default=PeerReviewSubmissionData;exports.default=_default,module.exports=exports.default},"./src/code-studio/peer_reviews/PeerReviewSubmissionData.story.jsx":(module,exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_PeerReviewSubmissionData=_interopRequireDefault(__webpack_require__("./src/code-studio/peer_reviews/PeerReviewSubmissionData.jsx")),_reactBootstrapStoryDecorator=_interopRequireDefault(__webpack_require__("./src/code-studio/pd/reactBootstrapStoryDecorator.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function _default(storybook){storybook.storiesOf("Peer Review Submissions",module).addDecorator(_reactBootstrapStoryDecorator.default).addStoryTable([{name:"Peer Review Submissions",story:function story(){return _react.default.createElement(_PeerReviewSubmissionData.default,{submissions:[{submitter:"Jon Snow",course_name:"Intro to knowing things",unit_name:"So you know nothing",level_name:"Documenting all that you know",submission_date:"2/19/2017",escalation_date:"4/3/2/2017",review_ids:[[1,"escalated"],[2,"accepted"]],status:"escalated",escalated_review_id:1},{submitter:"Daenerys Targaryen",course_name:"How to train your dragon",unit_name:"Destruction 101",level_name:"Intro to Dracarys",submission_date:"2/19/2017",escalation_date:"4/3/2/2017",review_ids:[[3,"accepted"],[4,"rejected"],[5,"escalated"],[6,""]],status:"escalated",escalated_review_id:5}]})}}])},module.exports=exports.default},"./src/code-studio/popup-window.js":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function popupWindow(event){var url=(0,_jquery.default)(event.currentTarget).attr("href"),left=screen.width/2-320,top=screen.height/2-240,share=window.open(url,"Share","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=640, height=480, top="+top+", left="+left);return!share||(window.focus&&share.focus(),!1)}module.exports=popupWindow;var _default=popupWindow;exports.default=_default,module.exports=exports.default},"./src/code-studio/progress.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js")),_queryString=_interopRequireDefault(__webpack_require__("./node_modules/query-string/index.js")),_clientState=_interopRequireDefault(__webpack_require__("./src/code-studio/clientState.js")),_DisabledBubblesModal=_interopRequireDefault(__webpack_require__("./src/code-studio/DisabledBubblesModal.jsx")),_DisabledBubblesAlert=_interopRequireDefault(__webpack_require__("./src/code-studio/DisabledBubblesAlert.jsx")),_redux=__webpack_require__("./src/code-studio/redux.js"),_viewAsRedux=__webpack_require__("./src/code-studio/viewAsRedux.js"),_hiddenLessonRedux=__webpack_require__("./src/code-studio/hiddenLessonRedux.js"),_constants=__webpack_require__("./src/constants.js"),_progressRedux=__webpack_require__("./src/code-studio/progressRedux.ts"),_verifiedInstructorRedux=__webpack_require__("./src/code-studio/verifiedInstructorRedux.js"),_teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js"),_teacherPanelHelpers=__webpack_require__("./src/code-studio/teacherPanelHelpers.js"),_currentUserRedux=__webpack_require__("./src/templates/currentUserRedux.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var progress=module.exports;function extractLevelResults(userProgressResponse){return _lodash.default.mapValues(userProgressResponse.progress,(function(level){return level.submitted?_constants.TestResults.SUBMITTED_RESULT:level.result}))}function queryUserProgress(store,scriptData,currentLevelId){var userId=_clientState.default.queryParams("user_id");store.dispatch((0,_progressRedux.queryUserProgress)(userId)).then((function(data){if(!currentLevelId){data.signedIn||store.dispatch((0,_progressRedux.overwriteResults)(_clientState.default.levelProgress(scriptData.name)));var postMilestoneDisabled=store.getState().progress.postMilestoneDisabled;if(data.signedIn&&postMilestoneDisabled&&function showDisabledBubblesModal(){var div=(0,_jquery.default)("
");(0,_jquery.default)(document.body).append(div),_reactDom.default.render(_react.default.createElement(_DisabledBubblesModal.default,null),div[0])}(),(data.isInstructor||data.teacherViewingStudent)&&!data.deeperLearningCourse){var pageType=currentLevelId?_teacherSectionsRedux.pageTypes.level:_teacherSectionsRedux.pageTypes.scriptOverview;(0,_teacherPanelHelpers.renderTeacherPanel)(store,scriptData.id,scriptData.name,pageType)}}}))}function initializeStoreWithProgress(store,scriptData,currentLevelId,isFullProgress){var saveAnswersBeforeNavigation=arguments.length>4&&void 0!==arguments[4]&&arguments[4],isLessonExtras=arguments.length>5&&void 0!==arguments[5]&&arguments[5],currentPageNumber=arguments.length>6?arguments[6]:void 0;store.dispatch((0,_progressRedux.initProgress)({currentLevelId,deeperLearningCourse:scriptData.plc,saveAnswersBeforeNavigation,lessons:scriptData.lessons,lessonGroups:scriptData.lessonGroups,peerReviewLessonInfo:scriptData.peerReviewLessonInfo,scriptId:scriptData.id,scriptName:scriptData.name,scriptDisplayName:scriptData.displayName,unitTitle:scriptData.title,unitDescription:scriptData.description,unitStudentDescription:scriptData.studentDescription,courseVersionId:scriptData.courseVersionId,courseId:scriptData.course_id,isFullProgress,isLessonExtras,currentPageNumber})),scriptData.disablePostMilestone&&store.dispatch((0,_progressRedux.disablePostMilestone)()),scriptData.hideable_lessons&&store.dispatch((0,_hiddenLessonRedux.getHiddenLessons)(scriptData.name,!0)),store.dispatch((0,_progressRedux.setIsAge13Required)(scriptData.age_13_required))}progress.showDisabledBubblesAlert=function(){if((0,_redux.getStore)().getState().progress.postMilestoneDisabled){var div=(0,_jquery.default)("
").css({position:"absolute",left:0,right:0,top:45,zIndex:1e3});(0,_jquery.default)(document.body).append(div),_reactDom.default.render(_react.default.createElement(_DisabledBubblesAlert.default,null),div[0])}},progress.generateLessonProgress=function(scriptData,lessonGroupData,lessonData,progressData,currentLevelId,saveAnswersBeforeNavigation,signedIn,lessonExtrasEnabled,isLessonExtras,currentPageNumber){var store=(0,_redux.getStore)(),name=scriptData.name;return initializeStoreWithProgress(store,{name,displayName:scriptData.displayName,lessonGroups:lessonGroupData,lessons:[lessonData],disablePostMilestone:scriptData.disablePostMilestone,age_13_required:scriptData.age_13_required,id:lessonData.script_id},currentLevelId,!1,saveAnswersBeforeNavigation,isLessonExtras,currentPageNumber),lessonExtrasEnabled&&store.dispatch((0,_progressRedux.setLessonExtrasEnabled)(!0)),function populateProgress(store,signedIn,progressData,scriptName){return function getLevelProgress(signedIn,progressData,scriptName){switch(signedIn){case!0:return Promise.resolve({usingDbProgress:!0,levelResults:extractLevelResults(progressData),unitProgress:progressData.progress});case!1:return Promise.resolve({usingDbProgress:!1,levelResults:_clientState.default.levelProgress(scriptName)});case null:return _jquery.default.ajax({url:"/api/user_progress/".concat(scriptName),data:{user_id:_clientState.default.queryParams("user_id")}}).then((function(data){return data.signedIn?{usingDbProgress:!0,levelResults:extractLevelResults(data),unitProgress:data.progress}:{usingDbProgress:!1,levelResults:_clientState.default.levelProgress(scriptName)}})).fail((function(){return console.error("Could not load user progress. User progress may not be saved.")}))}}(signedIn,progressData,scriptName).then((function(data){data.usingDbProgress&&(store.dispatch((0,_progressRedux.useDbProgress)()),_clientState.default.clearProgress(),store.dispatch((0,_progressRedux.setScriptProgress)(data.unitProgress))),data.levelResults&&store.dispatch((0,_progressRedux.overwriteResults)(data.levelResults)),data.isVerifiedInstructor&&store.dispatch((0,_verifiedInstructorRedux.setVerified)()),signedIn&&progress.showDisabledBubblesAlert()}))}(store,signedIn,progressData,name)},progress.initCourseProgress=function(scriptData){var store=(0,_redux.getStore)();initializeStoreWithProgress(store,scriptData,null,!0),queryUserProgress(store,scriptData,null)},progress.initViewAs=function(store,isSignedInUser,isInstructor){var initialViewAs=_viewAsRedux.ViewType.Participant;(isInstructor&&(initialViewAs=_viewAsRedux.ViewType.Instructor,store.dispatch((0,_currentUserRedux.setUserRoleInCourse)(_currentUserRedux.CourseRoles.Instructor))),!isSignedInUser||isInstructor)&&(initialViewAs=_queryString.default.parse(location.search).viewAs||initialViewAs);store.dispatch((0,_viewAsRedux.setViewType)(initialViewAs))},progress.retrieveProgress=function(scriptName,scriptData,currentLevelId){var store=(0,_redux.getStore)();return _jquery.default.getJSON("/api/script_structure/".concat(scriptName),(function(scriptData){initializeStoreWithProgress(store,scriptData,currentLevelId,!0),queryUserProgress(store,scriptData,currentLevelId)}))}},"./src/code-studio/progressReduxSelectors.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.progressionsFromLevels=exports.nextLevelId=exports.levelsForLessonId=exports.levelsByLesson=exports.levelCount=exports.lessons=exports.lessonExtrasUrl=exports.isPerfect=exports.hasLockableLessons=exports.hasGroups=exports.groupedLessons=exports.getProgressLevelType=exports.getLevelPropertiesPath=exports.currentLevelIndex=exports.__testonly__=exports.ProgressLevelType=void 0;var _lodash=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/lodash/lodash.js")),_sharedConstants=__webpack_require__("./src/util/sharedConstants.js"),_progressHelpers=__webpack_require__("./src/templates/progress/progressHelpers.js"),_constants=__webpack_require__("./src/constants.js"),_activityUtils=__webpack_require__("./src/code-studio/activityUtils.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i1};var lessonFromLessonAtIndex=function lessonFromLessonAtIndex(state,lessonIndex){return _objectSpread(_objectSpread({},lessonFromLesson(state.lessons[lessonIndex])),{},{isFocusArea:state.focusAreaLessonIds.includes(state.lessons[lessonIndex].id)})},lessonFromLesson=function lessonFromLesson(lesson){return _lodash.default.pick(lesson,["name","id","lockable","lessonNumber","lessonStartUrl","lesson_plan_html_url","lesson_feedback_url","student_lesson_plan_html_url","description_student","description_teacher"])};exports.lessons=function lessons(state){return state.lessons.map((function(_,index){return lessonFromLessonAtIndex(state,index)}))};var peerReviewLesson=function peerReviewLesson(state){return _objectSpread(_objectSpread({},lessonFromLesson(state.peerReviewLessonInfo)),{},{id:-1,lockable:!1,isFocusArea:!1})},peerReviewLevels=function peerReviewLevels(state){return state.peerReviewLessonInfo.levels.map((function(level,index){return _objectSpread(_objectSpread({},level),{},{id:(-1).toString(),isLocked:level.locked,status:level.status||_sharedConstants.LevelStatus.not_tried,levelNumber:index+1})}))},ProgressLevelType={SCRIPT_LEVEL:"script_level",LEVEL:"level"};exports.ProgressLevelType=ProgressLevelType;var getProgressLevelType=function getProgressLevelType(state){return state.progress.lessons?ProgressLevelType.SCRIPT_LEVEL:state.progress.currentLevelId?ProgressLevelType.LEVEL:void 0};exports.getProgressLevelType=getProgressLevelType;exports.getLevelPropertiesPath=function getLevelPropertiesPath(state){if(state.progress.lessons){var _state$progress$lesso,scriptName=state.progress.scriptName,lessonPosition=null===(_state$progress$lesso=state.progress.lessons)||void 0===_state$progress$lesso?void 0:_state$progress$lesso.find((function(lesson){return lesson.id===state.progress.currentLessonId})).relative_position,levelNumber=levelsForLessonId(state.progress,state.progress.currentLessonId).findIndex((function(level){return level.isCurrentLevel}))+1;return"/s/".concat(scriptName,"/lessons/").concat(lessonPosition,"/levels/").concat(levelNumber,"/level_properties")}if(null!==state.progress.currentLevelId){var levelId=state.progress.currentLevelId;return"/levels/".concat(levelId,"/level_properties")}};var levelWithProgress=function levelWithProgress(_ref,level,isLockable){var _levelProgress,_level$ids,levelResults=_ref.levelResults,unitProgress=_ref.unitProgress,_ref$levelPairing=_ref.levelPairing,levelPairing=void 0===_ref$levelPairing?{}:_ref$levelPairing,currentLevelId=_ref.currentLevelId,normalizedLevel=(0,_progressHelpers.processedLevel)(level);level.ids&&(normalizedLevel.id=function bestResultLevelId(levelIds,progressData){if(1===levelIds.length)return levelIds[0];var attemptedIds=levelIds.filter((function(id){return progressData[id]}));if(0===attemptedIds.length)return levelIds[0];var bestId=attemptedIds[0],bestResult=progressData[bestId];return attemptedIds.forEach((function(id){var result=progressData[id];result>bestResult&&(bestId=id,bestResult=result)})),bestId}(level.ids,levelResults));var status=_sharedConstants.LevelStatus.not_tried,locked=isLockable,teacherFeedbackReviewState=null,levelProgress=unitProgress[normalizedLevel.id];null!==(_levelProgress=levelProgress)&&void 0!==_levelProgress&&_levelProgress.pages&&(levelProgress=levelProgress.pages[normalizedLevel.pageNumber-1]),levelProgress?(status=levelProgress.status,locked=levelProgress.locked,teacherFeedbackReviewState=levelProgress.teacherFeedbackReviewState):level.kind!==_sharedConstants.LevelKind.assessment&&(status=(0,_activityUtils.activityCssClass)(levelResults[normalizedLevel.id]));var isCurrent=normalizedLevel.id===currentLevelId||!(null===(_level$ids=level.ids)||void 0===_level$ids||!_level$ids.includes[currentLevelId]);return _objectSpread(_objectSpread({},normalizedLevel),{},{status,isCurrentLevel:isCurrent,paired:levelPairing[level.activeId],isLocked:locked,teacherFeedbackReviewState})},levelsByLesson=function levelsByLesson(_ref2){var lessons=_ref2.lessons,levelResults=_ref2.levelResults,unitProgress=_ref2.unitProgress,levelPairing=_ref2.levelPairing,currentLevelId=_ref2.currentLevelId;return lessons.map((function(lesson){return lesson.levels.map((function(level){var statusLevel=levelWithProgress({levelResults,unitProgress,levelPairing,currentLevelId},level,lesson.lockable);return statusLevel.sublevels&&(statusLevel.sublevels=level.sublevels.map((function(sublevel){return levelWithProgress({levelResults,unitProgress,levelPairing,currentLevelId},sublevel,lesson.lockable)}))),statusLevel}))}))};exports.levelsByLesson=levelsByLesson;var levelsForLessonId=function levelsForLessonId(state,lessonId){var _state$lessons,lesson=null===(_state$lessons=state.lessons)||void 0===_state$lessons?void 0:_state$lessons.find((function(lesson){return lesson.id===lessonId}));return null==lesson?void 0:lesson.levels.map((function(level){return levelWithProgress(state,level,lesson.lockable)}))};exports.levelsForLessonId=levelsForLessonId;exports.currentLevelIndex=function currentLevelIndex(state){return getProgressLevelType(state)===ProgressLevelType.LEVEL?0:getProgressLevelType(state)===ProgressLevelType.SCRIPT_LEVEL?levelsForLessonId(state.progress,state.progress.currentLessonId).findIndex((function(level){return level.isCurrentLevel})):void 0};exports.nextLevelId=function nextLevelId(state){if(getProgressLevelType(state)===ProgressLevelType.SCRIPT_LEVEL){var levels=levelsForLessonId(state.progress,state.progress.currentLessonId),currentLevelIndex=levels.findIndex((function(level){return level.isCurrentLevel}));if(currentLevelIndex!==levels.length-1)return levels[currentLevelIndex+1].id}};exports.levelCount=function levelCount(state){return getProgressLevelType(state)===ProgressLevelType.LEVEL?1:getProgressLevelType(state)===ProgressLevelType.SCRIPT_LEVEL?levelsForLessonId(state.progress,state.progress.currentLessonId).length:0};exports.lessonExtrasUrl=function lessonExtrasUrl(state,lessonId){return state.lessonExtrasEnabled?state.lessons.find((function(lesson){return lesson.id===lessonId})).lesson_extras_level_url:""};exports.isPerfect=function isPerfect(state,levelId){return!!state.levelResults&&state.levelResults[levelId]>=_constants.TestResults.MINIMUM_OPTIMAL_RESULT};var groupedLessons=function groupedLessons(state){var includeBonusLevels=arguments.length>1&&void 0!==arguments[1]&&arguments[1],byGroup={},allLevels=levelsByLesson(state);return state.lessonGroups.forEach((function(lessonGroup){byGroup[lessonGroup.display_name]={lessonGroup:{id:lessonGroup.id,userFacing:lessonGroup.user_facing,displayName:lessonGroup.display_name,description:lessonGroup.description,bigQuestions:lessonGroup.big_questions},lessons:[],levelsByLesson:[]}})),state.lessons.forEach((function(lesson,index){var group=lesson.lesson_group_display_name,lessonAtIndex=lessonFromLessonAtIndex(state,index),lessonLevels=allLevels[index];includeBonusLevels||(lessonLevels=lessonLevels.filter((function(level){return!level.bonus}))),byGroup[group]&&(byGroup[group].lessons.push(lessonAtIndex),byGroup[group].levelsByLesson.push(lessonLevels))})),state.peerReviewLessonInfo&&(byGroup[state.peerReviewLessonInfo.lesson_group_display_name]={group:state.peerReviewLessonInfo.lesson_group_display_name,lessonGroup:{id:null,displayName:state.peerReviewLessonInfo.lesson_group_display_name,description:null,bigQuestions:null},lessons:[peerReviewLesson(state)],levelsByLesson:[peerReviewLevels(state)]}),_lodash.default.values(byGroup)};exports.groupedLessons=groupedLessons;exports.progressionsFromLevels=function progressionsFromLevels(levels){var progressions=[];if(0===levels.length)return progressions;var currentProgression={start:0,name:levels[0].progression||levels[0].name,displayName:levels[0].progressionDisplayName||levels[0].name,levels:[levels[0]]};return levels.slice(1).forEach((function(level,index){(level.progression||level.name)===currentProgression.name?currentProgression.levels.push(level):(progressions.push(currentProgression),currentProgression={start:index+1,name:level.progression||level.name,displayName:level.progressionDisplayName||level.name,levels:[level]})})),progressions.push(currentProgression),progressions};var __testonly__={};exports.__testonly__=__testonly__},"./src/code-studio/redux.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"getStore",{enumerable:!0,get:function get(){return _redux.getStore}});var _redux=__webpack_require__("./src/redux.js"),_headerRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/headerRedux.ts")),_projectRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/projectRedux.ts")),_appRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/appRedux.js")),_progressRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/progressRedux.ts")),_teacherSectionsRedux=_interopRequireDefault(__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js")),_lessonLockRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/lessonLockRedux.js")),_viewAsRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/viewAsRedux.js")),_shareDialogRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/components/shareDialogRedux.js")),_hiddenLessonRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/hiddenLessonRedux.js")),_isRtlRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/isRtlRedux.js")),_responsiveRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/responsiveRedux.js")),_publishDialogRedux=_interopRequireDefault(__webpack_require__("./src/templates/projects/publishDialog/publishDialogRedux.js")),_projectsRedux=_interopRequireDefault(__webpack_require__("./src/templates/projects/projectsRedux.js")),_verifiedInstructorRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/verifiedInstructorRedux.js")),_currentUserRedux=_interopRequireDefault(__webpack_require__("./src/templates/currentUserRedux.js")),_arrowDisplayRedux=_interopRequireDefault(__webpack_require__("./src/templates/arrowDisplayRedux.js")),_teacherPanelRedux=_interopRequireDefault(__webpack_require__("./src/code-studio/teacherPanelRedux.js")),_microBitRedux=_interopRequireDefault(__webpack_require__("./src/lib/kits/maker/microBitRedux.js")),_lab2Redux=_interopRequireDefault(__webpack_require__("./src/lab2/lab2Redux.ts"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(0,_redux.registerReducers)({header:_headerRedux.default,project:_projectRedux.default,app:_appRedux.default,progress:_progressRedux.default,teacherSections:_teacherSectionsRedux.default,teacherPanel:_teacherPanelRedux.default,lessonLock:_lessonLockRedux.default,viewAs:_viewAsRedux.default,shareDialog:_shareDialogRedux.default,hiddenLesson:_hiddenLessonRedux.default,isRtl:_isRtlRedux.default,responsive:_responsiveRedux.default,publishDialog:_publishDialogRedux.default,projects:_projectsRedux.default,verifiedInstructor:_verifiedInstructorRedux.default,currentUser:_currentUserRedux.default,arrowDisplay:_arrowDisplayRedux.default,microBit:_microBitRedux.default,lab:_lab2Redux.default})},"./src/code-studio/responsiveRedux.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResponsiveSize=void 0,exports.default=function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;if("responsive/SET_RESPONSIVE_SIZE"===action.type&&state.responsiveSize!==action.responsiveSize)return _objectSpread(_objectSpread({},state),{},{responsiveSize:action.responsiveSize});return state},exports.getResponsiveBreakpoint=getResponsiveBreakpoint,exports.setResponsiveSize=void 0;var _utils=__webpack_require__("./src/utils.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;ibreakpoint})).responsiveSize}var initialState={responsiveSize:getResponsiveBreakpoint(window.innerWidth)}},"./src/code-studio/showProjectAdmin.js":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _jquery=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/jquery/dist/jquery.js"));function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function define(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName,nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}exports.default=function _default(project){if((0,_jquery.default)(".project_admin").length&&project.isProjectLevel()&&project.isOwner()&&(project.isFrozen()?((0,_jquery.default)(".project_admin").html((0,_jquery.default)('❄ Frozen! To use as an example, copy this id:
')),(0,_jquery.default)("#unfreeze").click((function(){project.unfreeze((function(){window.location.reload()}))}))):((0,_jquery.default)(".project_admin").html((0,_jquery.default)('')),(0,_jquery.default)("#freeze").click((function(){project.freeze((function(){window.location.reload()}))})))),project.isPublished()||(0,_jquery.default)("#unpublished_warning").show(),(0,_jquery.default)("#feature_project").length&&project.isProjectLevel()&&((0,_jquery.default)("#feature_project").click((function(){var url="/featured_projects/".concat(project.getCurrentId(),"/feature");_jquery.default.ajax({url,type:"PUT",dataType:"json",success:function success(data){(0,_jquery.default)("#unfeature_project").show(),(0,_jquery.default)("#feature_project").hide()},error:function error(data){alert("Shucks. Something went wrong - this project wasn't featured.")}})})),(0,_jquery.default)("#unfeature_project").click((function(){var url="/featured_projects/".concat(project.getCurrentId(),"/unfeature");_jquery.default.ajax({url,type:"PUT",dataType:"json",success:function success(data){(0,_jquery.default)("#unfeature_project").hide(),(0,_jquery.default)("#feature_project").show()},error:function error(data){alert("Shucks. Something went wrong - this project is still featured.")}})}))),(0,_jquery.default)(".admin-project-sharing").length&&(project.isProjectLevel()||!project.shouldHideShareAndRemix())){var sharingDisabled=project.getSharingDisabled(),privateOrProfane=project.hasPrivacyProfanityViolation(),abuseScore=project.getAbuseScore();(0,_jquery.default)(".admin-abuse-score").text(abuseScore),(0,_jquery.default)("#admin-abuse-reset").click((function(){project.adminResetAbuseScore(0)})),(0,_jquery.default)("#admin-abuse-buffer").click((function(){project.adminResetAbuseScore(-50)}));var abusive=project.exceedsAbuseThreshold();if(sharingDisabled||privateOrProfane||abusive){if((0,_jquery.default)(".blocked").show(),(0,_jquery.default)(".blocked-reasons").show(),(0,_jquery.default)(".unblocked").hide(),sharingDisabled&&(0,_jquery.default)(".admin-sharing").show(),privateOrProfane){(0,_jquery.default)(".privacy-profanity").show();var textViolationEnglish=project.privacyProfanityDetailsEnglish();textViolationEnglish&&((0,_jquery.default)(".eng-flagged-text").text(textViolationEnglish),(0,_jquery.default)(".privacy-profanity-details-english").show());var textViolationsIntl=project.privacyProfanityDetailsIntl(),secondLanguage=project.privacyProfanitySecondLanguage();textViolationsIntl&&secondLanguage&&((0,_jquery.default)(".intl-flagged-text").text(textViolationsIntl),(0,_jquery.default)(".intl-flagged-language").text(secondLanguage),(0,_jquery.default)(".privacy-profanity-details-intl").show())}abusive&&(15===abuseScore?((0,_jquery.default)(".abusive-image").show(),(0,_jquery.default)(".image-mod-controls").show()):(0,_jquery.default)(".reported-abuse").show())}else(0,_jquery.default)(".unblocked").show(),(0,_jquery.default)(".blocked").hide(),(0,_jquery.default)(".blocked-reasons").hide()}(0,_jquery.default)("#disable-auto-moderation").click(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,project.disableAutoContentModeration();case 2:(0,_jquery.default)("#disable-auto-moderation").hide(),(0,_jquery.default)("#moderation-explanation").hide(),(0,_jquery.default)("#enable-auto-moderation").show();case 5:case"end":return _context.stop()}}),_callee)})))),(0,_jquery.default)("#enable-auto-moderation").click(_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.next=2,project.enableAutoContentModeration();case 2:(0,_jquery.default)("#disable-auto-moderation").show(),(0,_jquery.default)("#moderation-explanation").show(),(0,_jquery.default)("#enable-auto-moderation").hide();case 5:case"end":return _context2.stop()}}),_callee2)}))))},module.exports=exports.default},"./src/code-studio/teacherPanelHelpers.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderTeacherPanel=function renderTeacherPanel(store,scriptId,scriptName){var pageType=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,div=document.createElement("div");div.setAttribute("id","teacher-panel-container"),_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store},_react.default.createElement(_InstructorsOnly.default,null,_react.default.createElement(_TeacherPanel.default,{unitName:scriptName,pageType,scriptId}))),div),document.body.appendChild(div)};var _reactRedux=__webpack_require__("./node_modules/react-redux/es/index.js"),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_TeacherPanel=_interopRequireDefault(__webpack_require__("./src/code-studio/components/progress/teacherPanel/TeacherPanel.jsx")),_InstructorsOnly=_interopRequireDefault(__webpack_require__("./src/code-studio/components/InstructorsOnly.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}},"./src/code-studio/teacherPanelRedux.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;if("progress/SET_LEVELS_WITH_PROGRESS"===action.type)return _objectSpread(_objectSpread({},state),{},{levelsWithProgress:action.levelsWithProgress});if("progress/SET_LOADING_LEVELS_WITH_PROGRESS"===action.type)return _objectSpread(_objectSpread({},state),{},{isLoadingLevelsWithProgress:action.isLoading});return state},exports.loadLevelsWithProgress=void 0;var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_queryString=_interopRequireDefault(__webpack_require__("./node_modules/query-string/index.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{module.exports=function testImageAccess(url){var element,successCallback=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},failureCallback=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},timeoutMs=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3,videoElement=arguments.length>4&&void 0!==arguments[4]&&arguments[4];element=videoElement?document.createElement("video"):new Image;var called=!1;function finish(callback){return function(){called||(called=!0,window.clearTimeout(timeout),callback())}}var timeout=window.setTimeout(finish(failureCallback),timeoutMs);element.onerror=finish(failureCallback),videoElement?element.ondurationchange=finish(successCallback):element.onload=finish(successCallback),element.src=url,window.testImages=window.testImages||[],window.testImages.push(element)}},"./src/code-studio/utils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.environmentSpecificCookieName=function environmentSpecificCookieName(name){var rack_env=window.dashboard.rack_env;if("production"===rack_env)return name;return"".concat(name,"_").concat(rack_env)},exports.getRootDomainFromHostname=function getRootDomainFromHostname(hostname){return hostname.split(".").slice(-2).join(".")},exports.hasQueryParam=function hasQueryParam(name){var parsedParams=queryParams();return Object.prototype.hasOwnProperty.call(parsedParams,name)},exports.queryParams=queryParams,exports.resetWindowLocation=function resetWindowLocation(){windowLocation=window.location},exports.setWindowLocation=function setWindowLocation(fakeLocation){windowLocation=fakeLocation},exports.updateQueryParam=function updateQueryParam(param,value){var useReplaceState=arguments.length>2&&void 0!==arguments[2]&&arguments[2],newString=_queryString.default.stringify(_objectSpread(_objectSpread({},_queryString.default.parse(windowLocation.search)),{},_defineProperty({},param,value))),newLocation=windowLocation.pathname;newString&&(newLocation+="?"+newString);var method=useReplaceState?"replaceState":"pushState";window.history[method](null,document.title,newLocation)};var _queryString=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("./node_modules/query-string/index.js"));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;if(action.type===SET_VERIFIED)return _objectSpread(_objectSpread({},state),{},{isVerified:!0});if("verifiedInstructor/SET_VERIFIED_RESOURCES"===action.type)return _objectSpread(_objectSpread({},state),{},{hasVerifiedResources:!0});return _objectSpread({},state)},exports.setVerifiedResources=exports.setVerified=void 0;var SET_VERIFIED="verifiedInstructor/SET_VERIFIED";exports.setVerified=function setVerified(){return{type:SET_VERIFIED}};exports.setVerifiedResources=function setVerifiedResources(hasVerifiedResources){return{type:"verifiedInstructor/SET_VERIFIED_RESOURCES"}};var initialState={isVerified:!1,hasVerifiedResources:!1}},"./src/code-studio/videos.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_trackEvent=_interopRequireDefault(__webpack_require__("./src/util/trackEvent.js")),_react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_reactDom=_interopRequireDefault(__webpack_require__("./node_modules/react-dom/index.js")),_FallbackPlayerCaptionDialogLink=_interopRequireDefault(__webpack_require__("./src/templates/FallbackPlayerCaptionDialogLink.jsx")),_video=_interopRequireDefault(__webpack_require__("./node_modules/video.js/dist/video.es.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_lodash=_interopRequireDefault(__webpack_require__("./node_modules/lodash/lodash.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var currentVideoOptions,testImageAccess=__webpack_require__("./src/code-studio/url_test.js"),clientState=__webpack_require__("./src/code-studio/clientState.js"),videos=module.exports={};function onVideoEnded(){(0,_jquery.default)(".video-modal").trigger("ended")}function createVideo(options){var videoDiv=(0,_jquery.default)('');iframe.appendTo("body"),iframe[0].contentWindow.document.write(''))}))},exports.createUuid=function createUuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){var r=16*Math.random()|0;return("x"===c?r:3&r|8).toString(16)}))},exports.currentLocation=currentLocation,exports.deepMergeConcatArrays=function deepMergeConcatArrays(baseObject,overrides){return _immutable.default.fromJS(baseObject).mergeWith((function deepConcatMerger(a,b){var isList=_immutable.default.List.isList;return isList(a)&&isList(b)?a.concat(b):a&&a.mergeWith?a.mergeWith(deepConcatMerger,b):b}),overrides).toJS()},exports.ellipsify=function ellipsify(inputText,maxLength){if(inputText&&inputText.length>maxLength)return inputText.substr(0,maxLength-3)+"...";return inputText||""},exports.escapeHtml=function escapeHtml(unsafe){return unsafe?unsafe.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/"):""},exports.escapeText=function escapeText(text){var escapedText=text.toString(),lines=(escapedText=(escapedText=(escapedText=(escapedText=escapedText.replace(/&/g,"&")).replace(//g,">")).replace(/ {2}/g,"  ")).split("\n"),first=lines[0],rest=lines.slice(1);0===first.length&&lines.length>1&&(first="
");return first+rest.map((function(line){return"
"+(line.length?line:"
")+"
"})).join("")},exports.executeIfConditional=function executeIfConditional(conditional,fn){return function(){if(conditional())return fn.apply(this,arguments)}},exports.extend=function extend(defaults,options){var finalOptions=exports.shallowCopy(defaults);for(var prop in options)finalOptions[prop]=options[prop];return finalOptions},exports.fetchSignedCookies=function fetchSignedCookies(){return fetch("/dashboardapi/sign_cookies",{credentials:"same-origin"})},exports.findProfanity=void 0,exports.fireResizeEvent=function fireResizeEvent(){var ev=document.createEvent("Event");ev.initEvent("resize",!0,!0),window.dispatchEvent(ev)},exports.flatten=function flatten(array){return array.reduce((function(flat,toFlatten){return flat.concat(Array.isArray(toFlatten)?flatten(toFlatten):toFlatten)}),[])},exports.getEnvironment=getEnvironment,exports.getTabId=function getTabId(){var tabId=tryGetSessionStorage("tabId",!1);if(tabId)return tabId;return trySetSessionStorage("tabId",Math.random()+""),tryGetSessionStorage("tabId",!1)},exports.hashString=function hashString(str){return(0,_md.default)(str).toString()},exports.interpolateColors=function interpolateColors(from,to,value){var fromRGB=new _rgbcolor.default(from),toRGB=new _rgbcolor.default(to),r=fromRGB.r*(1-value)+toRGB.r*value,g=fromRGB.g*(1-value)+toRGB.g*value,b=fromRGB.b*(1-value)+toRGB.b*value;return"rgb(".concat(r,", ").concat(g,", ").concat(b,")")},exports.isBlank=function isBlank(str){return!(str&&""!==str.trim())},exports.isDevelopmentEnvironment=function isDevelopmentEnvironment(){return getEnvironment()===Environments_development},exports.isInfiniteRecursionError=function isInfiniteRecursionError(err){if(err instanceof RangeError&&/^Maximum call stack size exceeded/.test(err.message))return!0;if("undefined"!=typeof InternalError&&err instanceof InternalError&&"too much recursion"===err.message)return!0;if(err instanceof Error&&"Out of stack space"===err.message)return!0;return!1},exports.isProductionEnvironment=function isProductionEnvironment(){return getEnvironment()===Environments_production},exports.isStagingEnvironment=function isStagingEnvironment(){return getEnvironment()===Environments_staging},exports.isSubsequence=function isSubsequence(sequence,subsequence){var superIndex=0,subIndex=0;for(;subIndex=sequence.length)return!1;subIndex++,superIndex++}return!0},exports.isTestEnvironment=function isTestEnvironment(){return getEnvironment()===Environments_test},exports.levenshtein=function levenshtein(a,b){if(!a||!b)return(a||b).length;for(var matrix=[],i=0;i<=b.length;i++)if(matrix[i]=[i],0!==i)for(var j=0;j<=a.length;j++)matrix[0][j]=j,0!==j&&(matrix[i][j]=b.charAt(i-1)===a.charAt(j-1)?matrix[i-1][j-1]:Math.min(matrix[i-1][j-1]+1,matrix[i][j-1]+1,matrix[i-1][j]+1));return matrix[b.length][a.length]},exports.linkWithQueryParams=function linkWithQueryParams(link){var queryParams=window.location.search||"";return link+queryParams},exports.makeEnum=function makeEnum(){for(var key,result={},i=0;i2&&void 0!==arguments[2]?arguments[2]:" ";return str.split(delimiter).reduce((function(acc,val){var lastVal="";return acc[acc.length-1].length+val.length]*>/gi,"\n")).replace(/<[^>]+>/gi,"")).replace(/ /gi," ")).replace(/>/gi,">")).replace(/</gi,"<")).replace(/&/gi,"&")},exports.valueOr=function valueOr(val,defaultVal){return void 0===val?defaultVal:val},exports.windowOpen=function windowOpen(){var _window;return(_window=window).open.apply(_window,arguments)},exports.wrapNumberValidatorsForLevelBuilder=function wrapNumberValidatorsForLevelBuilder(){var nonNeg=Blockly.FieldTextInput.nonnegativeIntegerValidator,numVal=Blockly.FieldTextInput.numberValidator;Blockly.FieldTextInput.nonnegativeIntegerValidator=function(text){return"???"===text?text:nonNeg(text)},Blockly.FieldTextInput.numberValidator=function(text){return"???"===text?text:numVal(text)}},exports.xFromPosition=function xFromPosition(position){var containerWidth=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,spriteWidth=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;switch(position){case _constants.Position.OUTTOPOUTLEFT:case _constants.Position.TOPOUTLEFT:case _constants.Position.MIDDLEOUTLEFT:case _constants.Position.BOTTOMOUTLEFT:case _constants.Position.OUTBOTTOMOUTLEFT:return-spriteWidth;case _constants.Position.OUTTOPLEFT:case _constants.Position.TOPLEFT:case _constants.Position.MIDDLELEFT:case _constants.Position.BOTTOMLEFT:case _constants.Position.OUTBOTTOMLEFT:return 0;case _constants.Position.OUTTOPCENTER:case _constants.Position.TOPCENTER:case _constants.Position.MIDDLECENTER:case _constants.Position.BOTTOMCENTER:case _constants.Position.OUTBOTTOMCENTER:return(containerWidth-spriteWidth)/2;case _constants.Position.OUTTOPRIGHT:case _constants.Position.TOPRIGHT:case _constants.Position.MIDDLERIGHT:case _constants.Position.BOTTOMRIGHT:case _constants.Position.OUTBOTTOMRIGHT:return containerWidth-spriteWidth;case _constants.Position.OUTTOPOUTRIGHT:case _constants.Position.TOPOUTRIGHT:case _constants.Position.MIDDLEOUTRIGHT:case _constants.Position.BOTTOMOUTRIGHT:case _constants.Position.OUTBOTTOMOUTRIGHT:return containerWidth}},exports.yFromPosition=function yFromPosition(position){var containerHeight=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,spriteHeight=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;switch(position){case _constants.Position.OUTTOPOUTLEFT:case _constants.Position.OUTTOPLEFT:case _constants.Position.OUTTOPCENTER:case _constants.Position.OUTTOPRIGHT:case _constants.Position.OUTTOPOUTRIGHT:return-spriteHeight;case _constants.Position.TOPOUTLEFT:case _constants.Position.TOPLEFT:case _constants.Position.TOPCENTER:case _constants.Position.TOPRIGHT:case _constants.Position.TOPOUTRIGHT:return 0;case _constants.Position.MIDDLEOUTLEFT:case _constants.Position.MIDDLELEFT:case _constants.Position.MIDDLECENTER:case _constants.Position.MIDDLERIGHT:case _constants.Position.MIDDLEOUTRIGHT:return(containerHeight-spriteHeight)/2;case _constants.Position.BOTTOMOUTLEFT:case _constants.Position.BOTTOMLEFT:case _constants.Position.BOTTOMCENTER:case _constants.Position.BOTTOMRIGHT:case _constants.Position.BOTTOMOUTRIGHT:return containerHeight-spriteHeight;case _constants.Position.OUTBOTTOMOUTLEFT:case _constants.Position.OUTBOTTOMLEFT:case _constants.Position.OUTBOTTOMCENTER:case _constants.Position.OUTBOTTOMRIGHT:case _constants.Position.OUTBOTTOMOUTRIGHT:return containerHeight}};var _jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_immutable=_interopRequireDefault(__webpack_require__("./node_modules/immutable/dist/immutable.js")),_md=_interopRequireDefault(__webpack_require__("./node_modules/crypto-js/md5.js")),_rgbcolor=_interopRequireDefault(__webpack_require__("./node_modules/rgbcolor/index.js")),_constants=__webpack_require__("./src/constants.js"),_imageUtils=__webpack_require__("./src/imageUtils.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}__webpack_require__("./src/polyfills.js");function randomValue(values){return values[Math.floor(Math.random()*values.length)]}function showGenericQtip(targetElement,title,message,position){(0,_jquery.default)(targetElement).qtip({content:{text:"\n

".concat(title,"

\n

").concat(message,"

\n "),title:{button:(0,_jquery.default)('
')}},position,style:{classes:"cdo-qtips",tip:{width:20,height:20}},hide:{event:"unfocus"},show:!1}).qtip("show")}function tryGetSessionStorage(key,defaultValue){if(void 0===defaultValue)throw"tryGetSessionStorage requires defaultValue";var returnValue=defaultValue;try{returnValue=sessionStorage.getItem(key)}catch(e){}return returnValue}function trySetSessionStorage(item,value){try{return sessionStorage.setItem(item,value),!0}catch(e){if("QuotaExceededError"!==e.name)throw e;return!1}}function currentLocation(){return window.location}exports.stripEncapsulatingDoubleQuotes=function stripEncapsulatingDoubleQuotes(inputString){return inputString.replace(/^"(.*)"$/,"$1")},Function.prototype.inherits=function(parent){this.prototype=Object.create(parent.prototype),this.prototype.constructor=this,this.superPrototype=parent.prototype};exports.findProfanity=function findProfanity(text,locale){var authenticityToken=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,request={url:"/profanity/find",method:"POST",contentType:"application/json;charset=UTF-8",data:JSON.stringify({text,locale})};return authenticityToken&&(request.headers={"X-CSRF-Token":authenticityToken}),_jquery.default.ajax(request)};var Environments_production="production",Environments_levelbuilder="levelbuilder",Environments_test="test",Environments_staging="staging",Environments_adhoc="adhoc",Environments_development="development",Environments_unknown="unknown";function getEnvironment(){var hostname=currentLocation().hostname;return hostname.includes("adhoc")?Environments_adhoc:hostname.includes("test")?Environments_test:hostname.includes("levelbuilder")?Environments_levelbuilder:hostname.includes("staging")?Environments_staging:hostname.includes("localhost")||hostname.includes("127.0.0.1")?Environments_development:"code.org"===hostname||"studio.code.org"===hostname?Environments_production:Environments_unknown}},"./src/weblab/SupportArticleMarkdown.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function SupportArticleMarkdown(){return _react.default.createElement(_SafeMarkdown.default,{markdown:_locale.default.troubleshootingSupport({url:_constants.SUPPORT_ARTICLE_URL}),openExternalLinksInNewTab:!0})};var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/weblab/locale-do-not-import.js")),_SafeMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/SafeMarkdown.jsx")),_constants=__webpack_require__("./src/weblab/constants.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports.default},"./src/weblab/constants.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SUPPORT_ARTICLE_URL=exports.FatalErrorType=exports.FILE_SYSTEM_ERROR=exports.BRAMBLE_READY_STATE=void 0;var _utils=__webpack_require__("./src/utils.js");exports.SUPPORT_ARTICLE_URL="https://support.code.org/hc/en-us/articles/360016804871";var FatalErrorType=(0,_utils.makeEnum)("Default","LoadFailure","ResetFailure");exports.FatalErrorType=FatalErrorType;exports.FILE_SYSTEM_ERROR="EFILESYSTEMERROR";exports.BRAMBLE_READY_STATE="bramble:readyToMount"},"./src/weblab/dialogs/DisallowedHtmlWarningDialog.jsx":(module,exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=DisallowedHtmlWarningDialog;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_locale2=_interopRequireDefault(__webpack_require__("./src/weblab/locale-do-not-import.js")),_StylizedBaseDialog=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/componentLibrary/StylizedBaseDialog.jsx")),_SafeMarkdown=_interopRequireDefault(__webpack_require__("./src/templates/SafeMarkdown.jsx")),_SupportArticleMarkdown=_interopRequireDefault(__webpack_require__("./src/weblab/SupportArticleMarkdown.jsx")),_excluded=["isOpen","filename","disallowedTags","handleClose"];function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function DisallowedHtmlWarningDialog(_ref){var isOpen=_ref.isOpen,filename=_ref.filename,disallowedTags=_ref.disallowedTags,handleClose=_ref.handleClose,props=_objectWithoutProperties(_ref,_excluded),body=_react.default.createElement("div",null,_react.default.createElement(_SafeMarkdown.default,{markdown:_locale2.default.disallowedHtml({filename,disallowedTags:disallowedTags.join(", ")})}),_react.default.createElement(_SupportArticleMarkdown.default,null));return _react.default.createElement(_StylizedBaseDialog.default,_extends({},props,{isOpen,title:_locale.default.warning(),body,handleClose,renderFooter:function renderFooter(){return _react.default.createElement(_StylizedBaseDialog.FooterButton,{type:"confirm",text:_locale.default.dialogOK(),onClick:handleClose})}}))}DisallowedHtmlWarningDialog.propTypes={isOpen:_propTypes.default.bool.isRequired,filename:_propTypes.default.string.isRequired,disallowedTags:_propTypes.default.arrayOf(_propTypes.default.string).isRequired,handleClose:_propTypes.default.func.isRequired},module.exports=exports.default},"./src/weblab/dialogs/DisallowedHtmlWarningDialog.story.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.SingleDisallowedTags=exports.MultipleDisallowedTags=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_DisallowedHtmlWarningDialog=_interopRequireDefault(__webpack_require__("./src/weblab/dialogs/DisallowedHtmlWarningDialog.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=FatalErrorDialog;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_locale2=_interopRequireDefault(__webpack_require__("./src/weblab/locale-do-not-import.js")),_StylizedBaseDialog=function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(__webpack_require__("./src/componentLibrary/StylizedBaseDialog.jsx")),_SupportArticleMarkdown=_interopRequireDefault(__webpack_require__("./src/weblab/SupportArticleMarkdown.jsx")),_utils=__webpack_require__("./src/utils.js"),_excluded=["isOpen","errorMessage","handleClose","handleResetProject"];function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function FatalErrorDialog(_ref){var isOpen=_ref.isOpen,errorMessage=_ref.errorMessage,handleClose=_ref.handleClose,handleResetProject=_ref.handleResetProject,props=_objectWithoutProperties(_ref,_excluded),body=_react.default.createElement("div",null,_react.default.createElement("p",null,errorMessage),_react.default.createElement(_SupportArticleMarkdown.default,null)),footerButtons=[_react.default.createElement(_StylizedBaseDialog.FooterButton,{text:_locale.default.tryAgain(),onClick:_utils.reload,key:"cancel",type:"cancel"}),_react.default.createElement(_StylizedBaseDialog.FooterButton,{text:_locale2.default.reset(),onClick:handleResetProject,key:"reset",color:"red"}),_react.default.createElement(_StylizedBaseDialog.FooterButton,{text:_locale.default.dismiss(),onClick:handleClose,key:"confirm",type:"confirm"})];return _react.default.createElement(_StylizedBaseDialog.default,_extends({},props,{isOpen,title:_locale.default.errorOccurredTitle(),body,handleClose,renderFooter:function renderFooter(){return footerButtons}}))}FatalErrorDialog.propTypes={isOpen:_propTypes.default.bool.isRequired,errorMessage:_propTypes.default.string.isRequired,handleClose:_propTypes.default.func.isRequired,handleResetProject:_propTypes.default.func.isRequired},module.exports=exports.default},"./src/weblab/dialogs/FatalErrorDialog.story.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Basic=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_FatalErrorDialog=_interopRequireDefault(__webpack_require__("./src/weblab/dialogs/FatalErrorDialog.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"FatalErrorDialog",component:_FatalErrorDialog.default};exports.default=_default;exports.Basic=function Basic(){return _react.default.createElement(_FatalErrorDialog.default,{isOpen:!0,errorMessage:"Web Lab failed to load",handleClose:(0,_addonActions.action)("close"),handleResetProject:(0,_addonActions.action)("resetting project"),hideBackdrop:!0})}},"./src/weblab/dialogs/ResetSuccessDialog.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=ResetSuccessDialog;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/weblab/locale-do-not-import.js")),_StylizedBaseDialog=_interopRequireDefault(__webpack_require__("./src/componentLibrary/StylizedBaseDialog.jsx")),_excluded=["isOpen","handleClose"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function ResetSuccessDialog(_ref){var isOpen=_ref.isOpen,handleClose=_ref.handleClose,props=_objectWithoutProperties(_ref,_excluded);return _react.default.createElement(_StylizedBaseDialog.default,_extends({},props,{isOpen,handleClose,title:_locale.default.resetComplete(),body:_locale.default.reloading(),hideFooter:!0}))}ResetSuccessDialog.propTypes={isOpen:_propTypes.default.bool.isRequired,handleClose:_propTypes.default.func.isRequired},module.exports=exports.default},"./src/weblab/dialogs/ResetSuccessDialog.story.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Default=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_ResetSuccessDialog=_interopRequireDefault(__webpack_require__("./src/weblab/dialogs/ResetSuccessDialog.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"ResetSuccessDialog",component:_ResetSuccessDialog.default};exports.default=_default;var Default=function Template(arg){return _react.default.createElement(_ResetSuccessDialog.default,{isOpen:!0,handleClose:(0,_addonActions.action)("close"),hideBackdrop:!0})}.bind({});exports.Default=Default},"./src/weblab/dialogs/UploadErrorDialog.jsx":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=UploadErrorDialog;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_propTypes=_interopRequireDefault(__webpack_require__("./node_modules/prop-types/index.js")),_locale=_interopRequireDefault(__webpack_require__("./src/util/locale-do-not-import.js")),_locale2=_interopRequireDefault(__webpack_require__("./src/weblab/locale-do-not-import.js")),_StylizedBaseDialog=_interopRequireDefault(__webpack_require__("./src/componentLibrary/StylizedBaseDialog.jsx")),_utils=__webpack_require__("./src/utils.js"),_excluded=["isOpen","handleClose"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function UploadErrorDialog(_ref){var isOpen=_ref.isOpen,handleClose=_ref.handleClose,props=_objectWithoutProperties(_ref,_excluded);return _react.default.createElement(_StylizedBaseDialog.default,_extends({},props,{isOpen,handleConfirmation:handleClose,handleClose,title:_locale2.default.uploadError(),body:_locale2.default.errorSavingProject(),cancellationButtonText:_locale.default.reloadPage(),handleCancellation:_utils.reload}))}UploadErrorDialog.propTypes={isOpen:_propTypes.default.bool.isRequired,handleClose:_propTypes.default.func.isRequired},module.exports=exports.default},"./src/weblab/dialogs/UploadErrorDialog.story.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.BasicExample=void 0;var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_addonActions=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_UploadErrorDialog=_interopRequireDefault(__webpack_require__("./src/weblab/dialogs/UploadErrorDialog.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default={title:"UploadErrorDialog",component:_UploadErrorDialog.default};exports.default=_default;var BasicExample=function Template(args){return _react.default.createElement(_UploadErrorDialog.default,{isOpen:!0,handleClose:(0,_addonActions.action)("close"),hideBackdrop:!0})}.bind({});exports.BasicExample=BasicExample},"./src/weblab/locale-do-not-import.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _safeLoadLocale=_interopRequireDefault(__webpack_require__("./src/util/safeLoadLocale.js")),_i18nStringTracker=_interopRequireDefault(__webpack_require__("./src/util/i18nStringTracker.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var locale=(0,_safeLoadLocale.default)("weblab_locale");locale=(0,_i18nStringTracker.default)(locale,"weblab"),module.exports=locale},"./src/xml.js":(__unused_webpack_module,exports)=>{function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function F(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&void 0!==arguments[1]&&arguments[1],parser=new DOMParser,dom=0===(text=text.trim()).indexOf(""+text+"","text/xml"),errors=dom.getElementsByTagName("parsererror"),element=dom.firstChild;if(!element)throw new Error("Nothing parsed");if(errors.length>0)throw new Error(exports.serialize(errors[0]));if(element!==dom.lastChild)throw new Error("Parsed multiple elements");return element},exports.visitAll=function(node,callback){callback(node);var _step,_iterator=_createForOfIteratorHelper(node.childNodes);try{for(_iterator.s();!(_step=_iterator.n()).done;){var child=_step.value;exports.visitAll(child,callback)}}catch(err){_iterator.e(err)}finally{_iterator.f()}}},"./test/unit/lib/levelbuilder/lesson-editor/activitiesTestData.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.searchOptions=exports.sampleActivityForLessonWithoutLessonPlan=exports.sampleActivities=void 0;exports.sampleActivities=[{key:"activity-1",displayName:"Main Activity",position:1,duration:20,activitySections:[{key:"section-3",position:1,displayName:"Making programs",duration:10,remarks:!0,scriptLevels:[],text:"Simple text",tips:[]},{key:"section-1",position:2,displayName:"",duration:0,remarks:!1,scriptLevels:[],text:"Details about this section",tips:[{key:"tip-1",type:"teachingTip",markdown:"Teaching tip content"},{key:"tip-2",type:"discussionGoal",markdown:"Discussion Goal content"}]},{tips:[],key:"progression-1",position:3,displayName:"",duration:0,remarks:!1,text:"This progression teaches you programming!",progressionName:"Programming Progression Name",scriptLevels:[{id:"10",levels:[{name:"Level 1",id:"1",url:"levels/598/edit",icon:"fa-desktop",isUnplugged:!1,isConceptLevel:!0,skin:null,videoKey:null,concepts:"",conceptDifficulty:""}],position:1,levelNumber:1,activeId:"1",kind:"puzzle",bonus:!1,assessment:!1,challenge:!1,expand:!1},{id:"11",levels:[{name:"Level 2",id:"2",url:"/levels/598/edit",icon:"fa-desktop",isUnplugged:!1,isConceptLevel:!0,skin:null,videoKey:null,concepts:"",conceptDifficulty:""},{name:"Level 3",id:"3",url:"/levels/598/edit",icon:"fa-desktop",isUnplugged:!1,isConceptLevel:!0,skin:null,videoKey:null,concepts:"",conceptDifficulty:""}],position:2,levelNumber:2,activeId:"2",kind:"assessment",bonus:!1,assessment:!0,challenge:!1,expand:!1}]}]}];exports.sampleActivityForLessonWithoutLessonPlan={key:"activity-1",displayName:"",position:1,duration:0,activitySections:[{tips:[],key:"progression-1",position:1,displayName:"",duration:0,remarks:!1,text:"",progressionName:"Programming Progression Name",scriptLevels:[{id:"10",levels:[{name:"LevelGroup 1",id:"1",url:"levels/598/edit",icon:"fa-desktop",isUnplugged:!1,isConceptLevel:!1,skin:null,videoKey:null,concepts:"",conceptDifficulty:""}],position:1,levelNumber:1,activeId:"1",kind:"puzzle",bonus:!1,assessment:!0,challenge:!1,expand:!1}]}]};exports.searchOptions={levelOptions:[["All types",""],["Applab","Applab"],["Dancelab","Dancelab"]],scriptOptions:[["All scripts",""],["Script 1","script-1"],["Script 2","script-2"]],ownerOptions:[["Any owner",""],["Levelbuilder 1",1],["Levelbuilder 2",2]]}},"./test/unit/templates/lessonOverview/sampleStandardsData.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cstaStandards=exports.cspStandards=void 0;exports.cspStandards=[{frameworkName:"CSP Conceptual Framework",parentCategoryShortcode:"DAT-1",parentCategoryDescription:"The way that the computer represents data is different from the way that the data are interpreted and displayed for the user. Programs are used to translate data into a representation that is more easily understood by people.",categoryShortcode:"DAT-1.A",categoryDescription:"Explain how data can be represented using bits.",shortcode:"DAT-1.A.2",description:"Computing devices represent data digitally, meaning that the lowest-level components of any value are bits."},{frameworkName:"CSP Conceptual Framework",parentCategoryShortcode:"DAT-1",parentCategoryDescription:"The way that the computer represents data is different from the way that the data are interpreted and displayed for the user. Programs are used to translate data into a representation that is more easily understood by people.",categoryShortcode:"DAT-1.A",categoryDescription:"Explain how data can be represented using bits.",shortcode:"DAT-1.A.4",description:"A byte is 8 bits. "},{frameworkName:"CSP Conceptual Framework",parentCategoryShortcode:"DAT-1",parentCategoryDescription:"The way that the computer represents data is different from the way that the data are interpreted and displayed for the user. Programs are used to translate data into a representation that is more easily understood by people.",categoryShortcode:"DAT-1.C",categoryDescription:"For binary numbers:\na. Calculate the binary (base 2) equivalent of a positive integer (base 10) and vice versa. \nb. Compare and order binary numbers.",shortcode:"DAT-1.C.1",description:"Number bases, including binary and decimal, are used to represent data."},{frameworkName:"CSP Conceptual Framework",parentCategoryShortcode:"DAT-1",parentCategoryDescription:"The way that the computer represents data is different from the way that the data are interpreted and displayed for the user. Programs are used to translate data into a representation that is more easily understood by people.",categoryShortcode:"DAT-1.C",categoryDescription:"For binary numbers:\na. Calculate the binary (base 2) equivalent of a positive integer (base 10) and vice versa. \nb. Compare and order binary numbers.",shortcode:"DAT-1.C.2",description:"Binary (base 2) uses only combinations of the digits zero and one."}];exports.cstaStandards=[{frameworkName:"CSTA K-12 Computer Science Standards (2017)",parentCategoryShortcode:null,parentCategoryDescription:null,categoryShortcode:"AP",categoryDescription:"Algorithms & Programming",shortcode:"1B-AP-09",description:"Create programs that use variables to store and modify data."},{frameworkName:"CSTA K-12 Computer Science Standards (2017)",parentCategoryShortcode:null,parentCategoryDescription:null,categoryShortcode:"DA",categoryDescription:"Data & Analysis",shortcode:"3A-DA-09",description:"Translate between different bit representations of real-world phenomena, such as characters, numbers, and images."}]},"./test/unit/templates/studioHomepages/fakeSectionUtils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.serverSections=exports.sections=exports.progressUrl=exports.manageStudentsUrl=void 0;var _teacherSectionsRedux=__webpack_require__("./src/templates/teacherDashboard/teacherSectionsRedux.js"),progressUrl="https://studio.code.org/teacher_dashboard/sections/111111/progress";exports.progressUrl=progressUrl;var manageStudentsUrl="https://studio.code.org/teacher_dashboard/sections/111111/manage_students";exports.manageStudentsUrl=manageStudentsUrl;var sections=[{id:11,name:"Period 1",teacherName:"Ms. Frizzle",linkToProgress:progressUrl,assignedTitle:"Course 1",linkToAssigned:"https://studio.code.org/s/course1",numberOfStudents:1,linkToStudents:manageStudentsUrl,code:"ABCDEF",loginType:"picture",lessonExtras:!1,pairingAllowed:!0,courseId:null,courseOfferingId:null,courseVersionId:null,unitId:null,isAssigned:!0,participant_type:"student"},{id:12,name:"Period 2",teacherName:"Ms. Frizzle",linkToProgress:progressUrl,assignedTitle:"Course 2",linkToAssigned:"https://studio.code.org/s/course2",numberOfStudents:2,linkToStudents:manageStudentsUrl,code:"EEBSKR",loginType:"picture",lessonExtras:!1,pairingAllowed:!0,courseId:null,courseOfferingId:null,courseVersionId:null,unitId:null,isAssigned:!1,participant_type:"student"}];exports.sections=sections;var serverSections=sections.map(_teacherSectionsRedux.serverSectionFromSection);exports.serverSections=serverSections},"./test/unit/templates/studioHomepages/homepagesTestData.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.topPlCourse=exports.topCourse=exports.taughtSections=exports.plCourses=exports.moreCourses=exports.joinedStorySections=exports.joinedSections=exports.joinedPlSections=exports.courses=exports.announcement=void 0;var _fakeSectionUtils=__webpack_require__("./test/unit/templates/studioHomepages/fakeSectionUtils.js");exports.announcement={heading:"Go beyond an Hour of Code",buttonText:"Go Beyond",description:"Go Beyond an Hour of Code and explore computer science concepts with your students every week. Code.org offers curriculum, lesson plans, high quality professional learning programs, and tons of great tools for all grade levels - and it's free. No experience required - find the next step that's right for your classroom.",link:"http://teacherblog.code.org/post/160703303174/coming-soon-access-your-top-resources-with-the"};var courses=[{title:"Course 1",description:"Start with Course 1 for early readers. Students will create computer programs that will help them learn to collaborate with others, develop problem-solving skills, and persist through difficult tasks. By the end of this course, students create their very own custom game or story that they can share. Recommended for grades K-1.",link:"https://studio.code.org/s/course1",assignedSections:[]},{title:"Course 2",description:"Start with Course 2 for students who can read and have no prior programming experience. In this course students will create programs to solve problems and develop interactive games or stories they can share. Recommended for grades 2-5.",link:"https://studio.code.org/s/course2",assignedSections:[]}];exports.courses=courses;exports.plCourses=[{title:"PL Course 1",description:"Teachers learning things about teaching",link:"https://studio.code.org/s/pl-course1",assignedSections:[]},{title:"Course 2",description:"Facilitators learning stuff about facilitating",link:"https://studio.code.org/s/pl-course2",assignedSections:[]}];var moreCourses=[].concat(courses,[{title:"Course 3",description:"Start with Course 3 for early readers. Students will create computer programs that will help them learn to collaborate with others, develop problem-solving skills, and persist through difficult tasks. By the end of this course, students create their very own custom game or story that they can share. Recommended for grades K-1.",link:"https://studio.code.org/s/course3",assignedSections:[]},{title:"Course 4",description:"Start with Course 4 for students who can read and have no prior programming experience. In this course students will create programs to solve problems and develop interactive games or stories they can share. Recommended for grades 2-5.",link:"https://studio.code.org/s/course4",assignedSections:[]},{title:"Course 5",description:"Start with Course 5 for early readers. Students will create computer programs that will help them learn to collaborate with others, develop problem-solving skills, and persist through difficult tasks. By the end of this course, students create their very own custom game or story that they can share. Recommended for grades K-1.",link:"https://studio.code.org/s/course5",assignedSections:[]},{title:"Course 6",description:"Start with Course 6 for students who can read and have no prior programming experience. In this course students will create programs to solve problems and develop interactive games or stories they can share. Recommended for grades 2-5.",link:"https://studio.code.org/s/course6",assignedSections:[]}]);exports.moreCourses=moreCourses;exports.taughtSections=[{id:1,name:"Best Section Ever",loginType:"picture",lessonExtras:!1,pairingAllowed:!0,studentCount:25,code:"MRTHUN",courseId:360,courseOfferingId:360,courseVersionId:362,unitId:361,grade:"K",providerManaged:!1,hidden:!1,participantType:"student"},{id:2,name:"Even Better Section",loginType:"word",lessonExtras:!1,pairingAllowed:!0,studentCount:18,code:"DINOSAR",courseId:150,courseOfferingId:150,courseVersionId:151,unitId:13,grade:"7",providerManaged:!1,hidden:!1,participantType:"student"}];var joinedSections=[{id:3,name:"Period 1",loginType:"picture",teacherName:"Ms. Frizzle",studentCount:18,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"Course 1",linkToAssigned:"https://studio.code.org/s/course1",numberOfStudents:1,linkToStudents:_fakeSectionUtils.manageStudentsUrl,code:"ClassOneCode",hidden:!1,participantType:"student"},{id:4,name:"Period 2",loginType:"picture",teacherName:"Ms. Frizzle",studentCount:10,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"Course 2",linkToAssigned:"https://studio.code.org/s/course2",currentUnitTitle:"Unit 3",linkToCurrentUnit:"https://studio.code.org/s/course2-unit3",numberOfStudents:2,linkToStudents:_fakeSectionUtils.manageStudentsUrl,code:"ClassTwoCode",hidden:!1,participantType:"student"},{id:5,name:"Period 3 (Google Classroom)",teacherName:"Ms. Frizzle",studentCount:4,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"Course 3",linkToAssigned:"https://studio.code.org/s/course3",numberOfStudents:3,linkToStudents:_fakeSectionUtils.manageStudentsUrl,login_type:"google_classroom",code:"DoNotShowThis",hidden:!1,participantType:"student"},{id:6,name:"Period 4 (Clever)",teacherName:"Ms. Frizzle",studentCount:22,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"Course 4",linkToAssigned:"https://studio.code.org/s/course4",numberOfStudents:4,linkToStudents:_fakeSectionUtils.manageStudentsUrl,login_type:"clever",code:"OrThisEither",hidden:!1,participantType:"student"}];exports.joinedSections=joinedSections;var joinedStorySections=[{id:30,name:"First Pd",loginType:"picture",teacherName:"Ms. Frizzle",studentCount:18,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"Course 1",linkToAssigned:"https://studio.code.org/s/course1",numberOfStudents:1,linkToStudents:_fakeSectionUtils.manageStudentsUrl,code:"ClassOneCode",hidden:!1,participantType:"student"},{id:40,name:"Second Pd",loginType:"picture",teacherName:"Ms. Frizzle",studentCount:10,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"Course 2",linkToAssigned:"https://studio.code.org/s/course2",currentUnitTitle:"Unit 3",linkToCurrentUnit:"https://studio.code.org/s/course2-unit3",numberOfStudents:2,linkToStudents:_fakeSectionUtils.manageStudentsUrl,code:"ClassTwoCode",hidden:!1,participantType:"student"}];exports.joinedStorySections=joinedStorySections;var joinedPlSections=[{id:7,name:"Period 1",loginType:"word",teacherName:"Ms. Frizzle",studentCount:18,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"PL Course 1",linkToAssigned:"https://studio.code.org/s/course1",numberOfStudents:1,linkToStudents:_fakeSectionUtils.manageStudentsUrl,code:"ClassOneCode",hidden:!1,participantType:"teacher"},{id:8,name:"Period 2",loginType:"word",teacherName:"Ms. Frizzle",studentCount:18,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"PL Course 2",linkToAssigned:"https://studio.code.org/s/course2",currentUnitTitle:"Unit 3",linkToCurrentUnit:"https://studio.code.org/s/course2-unit3",numberOfStudents:2,linkToStudents:_fakeSectionUtils.manageStudentsUrl,code:"ClassTwoCode",hidden:!1,participantType:"teacher"},{id:9,name:"Period 3 (Google Classroom)",teacherName:"Ms. Frizzle",studentCount:18,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"PL Course 3",linkToAssigned:"https://studio.code.org/s/course3",numberOfStudents:3,linkToStudents:_fakeSectionUtils.manageStudentsUrl,loginType:"google_classroom",code:"DoNotShowThis",hidden:!1,participantType:"teacher"},{id:10,name:"Period 4 (Clever)",teacherName:"Ms. Frizzle",studentCount:18,linkToProgress:_fakeSectionUtils.progressUrl,assignedTitle:"PL Course 4",linkToAssigned:"https://studio.code.org/s/course4",numberOfStudents:4,linkToStudents:_fakeSectionUtils.manageStudentsUrl,loginType:"clever",code:"OrThisEither",hidden:!1,participantType:"teacher"}];exports.joinedPlSections=joinedPlSections;exports.topCourse={assignableName:"Course 1",lessonName:"Lesson 3: Learn to drag and drop",linkToOverview:"http://localhost-studio.code.org:3000/s/course1",linkToLesson:"http://localhost-studio.code.org:3000/s/course1/lessons/3/levels/1"};exports.topPlCourse={assignableName:"PL Course 1",lessonName:"Learning how to teacher",linkToOverview:"http://studio.code.org/s/vpl-csp-2021",linkToLesson:"http://studio.code.org/s/vpl-csp-2021/lessons/3/levels/1"}},"./test/util/clearTimeoutsBetweenTests.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearTimeoutsBetweenTests=function clearTimeoutsBetweenTests(){var timeoutList=[],intervalList=[],leftover=[],setTimeoutNative=window.setTimeout,setIntervalNative=window.setInterval,clearTimeoutNative=window.clearTimeout,clearIntervalNative=window.clearInterval;window.setTimeout=function(){var result=setTimeoutNative.apply(void 0,arguments);return timeoutList.push(result),result},window.setInterval=function(){var result=setIntervalNative.apply(void 0,arguments);return intervalList.push(result),result},window.clearTimeout=function(id){var index=timeoutList.indexOf(id);return-1!==index&&timeoutList.splice(index,1),clearTimeoutNative(id)},window.clearInterval=function(id){var index=intervalList.indexOf(id);return-1!==index&&intervalList.splice(index,1),clearIntervalNative(id)},afterEach((function(){var testName=this&&this.currentTest&&this.currentTest.fullTitle();timeoutList.forEach((function(id){testName?leftover.push("(timeout) "+testName):(leftover.push("(timeout) Unknown test"),console.log("clearing leftover timeout")),clearTimeoutNative(id)})),intervalList.forEach((function(id){testName?leftover.push("(interval) "+testName):(leftover.push("(interval) Unknown test"),console.log("clearing leftover interval")),clearIntervalNative(id)})),timeoutList=[],intervalList=[]})),after((function(){console.log("Leftover timeouts/intervals: "+leftover.length)}))}},"./test/util/stubRailsAuthenticityToken.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stubRailsAuthenticityToken=function stubRailsAuthenticityToken(){"function"!=typeof _RailsAuthenticityToken.default.getRailsCSRFMetaTags.restore&&_sinon.default.stub(_RailsAuthenticityToken.default,"getRailsCSRFMetaTags").returns({param:void 0,token:void 0})},exports.unstubRailsAuthenticityToken=function unstubRailsAuthenticityToken(){_RailsAuthenticityToken.default.getRailsCSRFMetaTags.restore()};var _sinon=_interopRequireDefault(__webpack_require__("./node_modules/sinon/lib/sinon.js")),_RailsAuthenticityToken=_interopRequireDefault(__webpack_require__("./src/lib/util/RailsAuthenticityToken.jsx"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}},"./test/util/testUtils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"allowConsoleErrors",{enumerable:!0,get:function get(){return _throwOnConsole.allowConsoleErrors}}),Object.defineProperty(exports,"allowConsoleWarnings",{enumerable:!0,get:function get(){return _throwOnConsole.allowConsoleWarnings}}),Object.defineProperty(exports,"clearTimeoutsBetweenTests",{enumerable:!0,get:function get(){return _clearTimeoutsBetweenTests.clearTimeoutsBetweenTests}}),exports.createKeyEvent=function createKeyEvent(type,keyConfig){var keyboardEvent=new Event(type);return keyboardEvent.which=keyConfig.which,keyboardEvent.keyCode=keyConfig.keyCode,keyboardEvent.altKey=keyConfig.altKey,keyboardEvent.metaKey=keyConfig.metaKey,keyboardEvent.ctrlKey=keyConfig.ctrlKey,keyboardEvent.shiftKey=keyConfig.shiftKey,keyboardEvent},exports.createMouseEvent=function createMouseEvent(type,clientX,clientY){var evt,e={bubbles:!0,cancelable:"mousemove"!==type,view:window,detail:0,screenX:void 0,screenY:void 0,clientX,clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};if("function"==typeof document.createEvent)(evt=document.createEvent("MouseEvents")).initMouseEvent(type,e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,document.body.parentNode);else if(document.createEventObject){for(var prop in evt=document.createEventObject(),e)evt[prop]=e[prop];evt.button={0:1,1:4,2:2}[evt.button]||evt.button}return evt},exports.debugMode=function debugMode(){return-1!==location.search.substring(1).split("&").indexOf("debug")},exports.dragToVisualization=function dragToVisualization(type,left,top){var element=(0,_jquery.default)("[data-element-type='"+type+"']"),screenOffset=element.offset(),mousedown=_jquery.default.Event("mousedown",{which:1,pageX:screenOffset.left,pageY:screenOffset.top});element.trigger(mousedown);var drag=_jquery.default.Event("mousemove",{pageX:(0,_jquery.default)("#visualization").offset().left+left,pageY:(0,_jquery.default)("#visualization").offset().top+top});switch((0,_jquery.default)(document).trigger(drag),type){case"BUTTON":case"TEXT_INPUT":case"TEXT_AREA":case"RADIO_BUTTON":case"LABEL":case"SLIDER":case"CHECKBOX":case"DROPDOWN":(0,_jquery.default)(".draggingParent").first().children().first().css("box-sizing","border-box")}var halfWidth=(0,_jquery.default)(".draggingParent").width()/2,drag2=_jquery.default.Event("mousemove",{pageX:(0,_jquery.default)("#visualization").offset().left+left+halfWidth,pageY:(0,_jquery.default)("#visualization").offset().top+top});(0,_jquery.default)(document).trigger(drag2);var mouseup=_jquery.default.Event("mouseup",{pageX:(0,_jquery.default)("#visualization").offset().left+left+halfWidth,pageY:(0,_jquery.default)("#visualization").offset().top+top});(0,_jquery.default)(document).trigger(mouseup)},exports.enforceDocumentBodyCleanup=function enforceDocumentBodyCleanup(_ref,runTestCases){var initialInnerHTML,_ref$checkEveryTest=_ref.checkEveryTest,checkEveryTest=void 0!==_ref$checkEveryTest&&_ref$checkEveryTest,beforeFn=checkEveryTest?beforeEach:before,afterFn=checkEveryTest?afterEach:after;describe("",(function(){beforeFn((function(){initialInnerHTML||(initialInnerHTML=document.body.innerHTML),_sinon.default.spy(document.body,"addEventListener"),_sinon.default.spy(document.body,"removeEventListener")})),afterFn((function(){if(initialInnerHTML!==document.body.innerHTML)throw new Error("Test modified document.body.innerHTML:\n\nInitial:\n"+initialInnerHTML+"\n\nAfter:\n"+document.body.innerHTML);if(document.body.addEventListener.callCount!==document.body.removeEventListener.callCount)throw new Error("Added "+document.body.addEventListener.callCount+" event listener(s) to document.body, but only removed "+document.body.removeEventListener.callCount+" listeners");document.body.addEventListener.restore(),document.body.removeEventListener.restore()})),describe("",runTestCases)}))},exports.forEveryBooleanPermutation=function forEveryBooleanPermutation(fn){for(var argCount=fn.length,numPermutations=Math.pow(2,argCount),i=0;i0&&void 0!==arguments[0])||arguments[0],storeBody=function storeBody(){return originalDocumentBody=document.body.innerHTML},restoreBody=function restoreBody(){return document.body.innerHTML=originalDocumentBody};runOncePerTest?(beforeEach(storeBody),afterEach(restoreBody)):(before(storeBody),after(restoreBody))},exports.setAceText=function setAceText(text){var aceEditor=window.__TestInterface.getDroplet().aceEditor;aceEditor.textInput.focus(),aceEditor.setValue(text)},exports.setExternalGlobals=function setExternalGlobals(){var beforeFunc=arguments.length>0&&void 0!==arguments[0]?arguments[0]:before,afterFunc=arguments.length>1&&void 0!==arguments[1]?arguments[1]:after;window.React=_react.default,window.dashboard=_objectSpread(_objectSpread({},window.dashboard),{},{assets,project});var sandbox=_sinon.default.createSandbox();beforeFunc((function(){sandbox.stub(project,"clearHtml"),sandbox.stub(project,"exceedsAbuseThreshold").returns(!1),sandbox.stub(project,"hasPrivacyProfanityViolation").returns(!1),sandbox.stub(project,"getCurrentId").returns("fake_id"),sandbox.stub(project,"isEditing").returns(!0),sandbox.stub(project,"getMakerAPIs").returns(!1),sandbox.stub(assets.listStore,"reset"),sandbox.stub(assets.listStore,"add").returns([]),sandbox.stub(assets.listStore,"remove").returns([]),sandbox.stub(assets.listStore,"list").returns([])})),afterFunc((function(){sandbox.restore()})),window.trackEvent=function(){}},exports.stubWindowDashboard=function stubWindowDashboard(value){var originalDashboard;before((function(){return originalDashboard=window.dashboard})),after((function(){return window.dashboard=originalDashboard})),beforeEach((function(){return window.dashboard=value}))},exports.stubWindowPegasus=function stubWindowPegasus(value){var originalPegasus;before((function(){return originalPegasus=window.pegasus})),after((function(){return window.pegasus=originalPegasus})),beforeEach((function(){return window.pegasus=value}))},Object.defineProperty(exports,"throwOnConsoleErrorsEverywhere",{enumerable:!0,get:function get(){return _throwOnConsole.throwOnConsoleErrorsEverywhere}}),Object.defineProperty(exports,"throwOnConsoleWarningsEverywhere",{enumerable:!0,get:function get(){return _throwOnConsole.throwOnConsoleWarningsEverywhere}}),exports.typeAceText=function typeAceText(text){var aceEditor=window.__TestInterface.getDroplet().aceEditor;aceEditor.textInput.focus(),aceEditor.onTextInput(text)};var _react=_interopRequireDefault(__webpack_require__("./node_modules/react/index.js")),_jquery=_interopRequireDefault(__webpack_require__("./node_modules/jquery/dist/jquery.js")),_sinon=_interopRequireDefault(__webpack_require__("./node_modules/sinon/lib/sinon.js")),_throwOnConsole=__webpack_require__("./test/util/throwOnConsole.js"),_clearTimeoutsBetweenTests=__webpack_require__("./test/util/clearTimeoutsBetweenTests.js");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i{"use strict";function throwOnConsoleEverywhere(methodName){var throwing=!0,wrappedMethod=null;return{throwEverywhere:function throwEverywhere(){beforeEach((function(){var testTitle;this.currentTest&&(testTitle=this.currentTest.title),wrappedMethod=console[methodName],console[methodName]=function(msg){var prefix=throwing?"":"[ignoring]";if(wrappedMethod.call(console,prefix,msg),throwing)throw console[methodName]=wrappedMethod,wrappedMethod=null,new Error("Call to console.".concat(methodName,' from "').concat(testTitle,'": ').concat(msg,"\n").concat(function getStack(){var stack;try{throw new Error}catch(e){stack=e.stack}return stack}()))}})),afterEach((function(){wrappedMethod&&(console[methodName]=wrappedMethod),wrappedMethod=null}))},allow:function allow(){beforeEach((function(){throwing=!1})),afterEach((function(){throwing=!0}))}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.throwOnConsoleWarningsEverywhere=exports.throwOnConsoleErrorsEverywhere=exports.allowConsoleWarnings=exports.allowConsoleErrors=void 0;var consoleErrorFunctions=throwOnConsoleEverywhere("error"),throwOnConsoleErrorsEverywhere=consoleErrorFunctions.throwEverywhere;exports.throwOnConsoleErrorsEverywhere=throwOnConsoleErrorsEverywhere;var allowConsoleErrors=consoleErrorFunctions.allow;exports.allowConsoleErrors=allowConsoleErrors;var consoleWarningFunctions=throwOnConsoleEverywhere("warn"),throwOnConsoleWarningsEverywhere=consoleWarningFunctions.throwEverywhere;exports.throwOnConsoleWarningsEverywhere=throwOnConsoleWarningsEverywhere;var allowConsoleWarnings=consoleWarningFunctions.allow;exports.allowConsoleWarnings=allowConsoleWarnings},"./node_modules/css-loader/dist/cjs.js!./src/lib/ui/checkedRadioButton.css":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'/*\nBasis for this CSS from:\nhttps://weblog.west-wind.com/posts/2015/Feb/26/Using-FontAwesome-Fonts-for-HTML-Radio-Buttons-and-Checkboxes\n*/\n\ninput[type=radio].with-font {\n border: 0;\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n}\ninput[type=radio].with-font ~ label:before {\n font-family: FontAwesome;\n display: inline-block;\n content: "\\f1db"; /* fa-circle-thin */\n font-size: 18px;\n color: black;\n width: 15px;\n height: 15px;\n text-align: center;\n vertical-align: bottom;\n}\ninput[type=radio].with-font:checked ~ label:before {\n font-family: FontAwesome;\n display:inline-block;\n content: "\\f058"; /* fa-check-circle */\n font-size: 18px;\n color: #0094ca;\n width: 15px;\n height: 15px;\n line-height: 16px;\n background-color: white;\n text-align: center;\n border-radius: 60%;\n}\n\nlabel.hidden-label-checked-radio-button {\n margin: 0px;\n width: 16px;\n height: 16px;\n line-height: 16px;\n}',"",{version:3,sources:["webpack://./src/lib/ui/checkedRadioButton.css"],names:[],mappings:"AAAA;;;CAGC;;AAED;IACI,SAAS;IACT,mBAAmB;IACnB,UAAU;IACV,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,kBAAkB;AACtB;AACA;IACI,wBAAwB;IACxB,qBAAqB;IACrB,gBAAgB,GAAG,mBAAmB;IACtC,eAAe;IACf,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,sBAAsB;AAC1B;AACA;IACI,wBAAwB;IACxB,oBAAoB;IACpB,gBAAgB,GAAG,oBAAoB;IACvC,eAAe;IACf,cAAc;IACd,WAAW;IACX,YAAY;IACZ,iBAAiB;IACjB,uBAAuB;IACvB,kBAAkB;IAClB,kBAAkB;AACtB;;AAEA;IACI,WAAW;IACX,WAAW;IACX,YAAY;IACZ,iBAAiB;AACrB",sourcesContent:['/*\nBasis for this CSS from:\nhttps://weblog.west-wind.com/posts/2015/Feb/26/Using-FontAwesome-Fonts-for-HTML-Radio-Buttons-and-Checkboxes\n*/\n\ninput[type=radio].with-font {\n border: 0;\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n}\ninput[type=radio].with-font ~ label:before {\n font-family: FontAwesome;\n display: inline-block;\n content: "\\f1db"; /* fa-circle-thin */\n font-size: 18px;\n color: black;\n width: 15px;\n height: 15px;\n text-align: center;\n vertical-align: bottom;\n}\ninput[type=radio].with-font:checked ~ label:before {\n font-family: FontAwesome;\n display:inline-block;\n content: "\\f058"; /* fa-check-circle */\n font-size: 18px;\n color: #0094ca;\n width: 15px;\n height: 15px;\n line-height: 16px;\n background-color: white;\n text-align: center;\n border-radius: 60%;\n}\n\nlabel.hidden-label-checked-radio-button {\n margin: 0px;\n width: 16px;\n height: 16px;\n line-height: 16px;\n}'],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/aichat/views/chatWarningModal.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.RQ8j8AvK0lFTCJC1pVkS hr{margin:1rem 0;border-color:#d4d5d7}.RQ8j8AvK0lFTCJC1pVkS a{font-family:"Gotham 5r",sans-serif;font-size:1rem;color:#9660bf;margin:1rem 0;text-decoration:underline;transition:color ease-in-out .2s}.RQ8j8AvK0lFTCJC1pVkS a:hover{color:#6f488e}.gZjR0aBdpMzYtSBLALa0{background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit;box-shadow:none;position:absolute;top:1rem;right:1rem}.gZjR0aBdpMzYtSBLALa0 i{color:#bfc1c3;font-size:1.1875rem;line-height:1.4844rem;width:1.4844rem}.gZjR0aBdpMzYtSBLALa0:hover{box-shadow:none;background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit}.gZjR0aBdpMzYtSBLALa0:hover i{color:#94979b}.gZjR0aBdpMzYtSBLALa0:focus{outline:#009eb0 solid 2px;outline-offset:2px}.YmhZPySAgYe54sSDF567{display:flex;justify-content:flex-end}',"",{version:3,sources:["webpack://./src/aichat/views/chatWarningModal.module.scss","webpack://./../shared/css/color.scss","webpack://./../shared/css/font.scss"],names:[],mappings:"AAGE,yBACE,aAAA,CACA,oBC4La,CDzLf,wBACE,kCELU,CFMV,cAAA,CACA,aCyIsB,CDxItB,aAAA,CACA,yBAAA,CACA,gCAAA,CAEA,8BACE,aCoIiB,CD/HvB,sBAEE,eAAA,CACA,aAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,cAAA,CACA,eAAA,CACA,eAAA,CAEA,iBAAA,CACA,QAAA,CACA,UAAA,CAEA,wBACE,aC4Ja,CD3Jb,mBAAA,CACA,qBAAA,CACA,eAAA,CAGF,4BAEE,eAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,cAAA,CACA,eAAA,CAEA,8BACE,aC2IW,CDvIf,4BACE,yBAAA,CACA,kBAAA,CAIJ,sBACE,YAAA,CACA,wBAAA",sourcesContent:['@import "color", "font";\n\n.chatWarningModal {\n hr {\n margin: 1rem 0;\n border-color: $light_gray_200;\n }\n\n a {\n font-family: $gotham-bold;\n font-size: 1rem;\n color: $brand_secondary_default;\n margin: 1rem 0;\n text-decoration: underline;\n transition: color ease-in-out .2s;\n\n &:hover {\n color: $brand_secondary_dark;\n }\n }\n}\n\n.xCloseButton {\n // Clear default button styles\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n box-shadow: none;\n\n position: absolute;\n top: 1rem;\n right: 1rem;\n\n i {\n color: $light_gray_300;\n font-size: 1.1875rem;\n line-height: 1.4844rem;\n width: 1.4844rem;\n }\n\n &:hover {\n // Clear default button styles\n box-shadow: none;\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n\n i {\n color: $light_gray_500;\n }\n }\n\n &:focus {\n outline: $brand_primary_default solid 2px;\n outline-offset: 2px;\n }\n}\n\n.bottomSection {\n display: flex;\n justify-content: flex-end;\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;",'// Common site-wide fonts, put here for easy access from all scss files\n\n$gotham-regular: "Gotham 4r", sans-serif;\n$gotham-italics: "Gotham 4i", sans-serif;\n$gotham-bold: "Gotham 5r", sans-serif;\n$gotham-bold-italics: "Gotham 5i", sans-serif;\n$gotham-extra-bold: "Gotham 7r", sans-serif;\n$gotham-extra-bold-italics: "Gotham 7i";\n\n$barlowSemiCondensed-semibold: \'Barlow Semi Condensed Semibold\', sans-serif;\n$barlowSemiCondensed-medium: \'Barlow Semi Condensed Medium\', sans-serif;\n\n$code-font: \'Source Code Pro\', Monaco, \'Bitstream Vera Sans Mono\', \'Lucida Console\', Terminal, monospace;\n\n/*\n If you are changing the location of these files,\n see the readme in this directory for more detail on manual steps to take when uploading new files.\n */\n$font-awesome-core-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/fontawesome.min.css";\n$font-awesome-brands-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/brands.min.css";\n$font-awesome-solid-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/solid.min.css";\n$font-awesome-regular-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/regular.min.css";\n$font-awesome-v4-fonts-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/v4-font-face.min.css";\n$font-awesome-v4-shims-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/v4-shims.min.css";\n'],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={chatWarningModal:"RQ8j8AvK0lFTCJC1pVkS",xCloseButton:"gZjR0aBdpMzYtSBLALa0",bottomSection:"YmhZPySAgYe54sSDF567"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/applab/designElements/copy-element-to-screen-button.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".zNECB_z65Uj0WdXLqKpM{background-color:#0aa;color:#fff;float:right}.oduIyx6FqKVhXaBtgkie{max-height:200px;overflow-y:auto}","",{version:3,sources:["webpack://./src/applab/designElements/copy-element-to-screen-button.module.scss"],names:[],mappings:"AAAA,sBACE,qBAAA,CACA,UAAA,CACA,WAAA,CAGF,sBACE,gBAAA,CACA,eAAA",sourcesContent:[".copyElementToScreenButton {\n background-color: #0aa;\n color: white;\n float: right;\n}\n\n.menu {\n max-height: 200px;\n overflow-y: auto;\n}\n"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={copyElementToScreenButton:"zNECB_z65Uj0WdXLqKpM",menu:"oduIyx6FqKVhXaBtgkie"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/applab/designElements/delete-element-button.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".kq4SeHEFOa_NUjPnp_pL{float:right}.Bbs6iF2b1QCzG26X6QJV{margin-left:20px}.Lx995Q_1DgFxfkVfnTJg{background-color:#c00;color:#fff}","",{version:3,sources:["webpack://./src/applab/designElements/delete-element-button.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAEA,sBACE,WAAA,CAGF,sBACE,gBAAA,CAGF,sBACE,qBCwDI,CDvDJ,UCOM",sourcesContent:['@import "color.scss";\n\n.right {\n float: right;\n}\n\n.confirming {\n margin-left: 20px;\n}\n\n.red {\n background-color: $red;\n color: $white;\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={right:"kq4SeHEFOa_NUjPnp_pL",confirming:"Bbs6iF2b1QCzG26X6QJV",red:"Lx995Q_1DgFxfkVfnTJg"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/applab/designElements/duplicate-element-button.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".gtgOGMJYLkUrpajK7sSG{background-color:#0aa;color:#fff;float:right}","",{version:3,sources:["webpack://./src/applab/designElements/duplicate-element-button.module.scss"],names:[],mappings:"AAAA,sBACE,qBAAA,CACA,UAAA,CACA,WAAA",sourcesContent:[".duplicateButton {\n background-color: #0aa;\n color: white;\n float: right;\n}\n"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={duplicateButton:"gtgOGMJYLkUrpajK7sSG"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/applab/designElements/restore-theme-defaults-button.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".uaLW1kyMjsFGurhbdXyY{background-color:#0aa;color:#fff;float:right}","",{version:3,sources:["webpack://./src/applab/designElements/restore-theme-defaults-button.module.scss"],names:[],mappings:"AAAA,sBACE,qBAAA,CACA,UAAA,CACA,WAAA",sourcesContent:[".restoreButton {\n background-color: #0aa;\n color: white;\n float: right;\n}\n"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={restoreButton:"uaLW1kyMjsFGurhbdXyY"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/code-studio/components/header/header-popup.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".aJEvM9ETqVGVSdoyeEUl{text-align:center;cursor:pointer;background-color:rgba(0,0,0,0);padding:2px 0 2px 0;border:none;color:#ffa400}.aJEvM9ETqVGVSdoyeEUl:hover{cursor:pointer;box-shadow:none;color:#fff}.c4P3k2Z4tsCZAcY2Ma0j{padding:2px}.kCGXqqTy1uZ0EgZf3aia{font-size:40px;line-height:20px}.HAPZXCy29WaTboyCnPyy{font-size:10px;line-height:10px;color:#fff}","",{version:3,sources:["webpack://./src/code-studio/components/header/header-popup.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAEA,sBACE,iBAAA,CACA,cAAA,CACA,8BAAA,CACA,mBAAA,CACA,WAAA,CACA,aCiCO,CDhCP,4BACE,cAAA,CACA,eAAA,CACA,UCOI,CDHR,sBACE,WAAA,CAGF,sBACE,cAAA,CACA,gBAAA,CAGF,sBACE,cAAA,CACA,gBAAA,CACA,UCTM",sourcesContent:['@use "color.scss";\n\n.headerItem {\n text-align: center;\n cursor: pointer;\n background-color: transparent;\n padding: 2px 0 2px 0;\n border: none;\n color: color.$orange;\n &:hover {\n cursor: pointer;\n box-shadow: none;\n color: color.$white;\n }\n}\n\n.headerItemLess {\n padding: 2px;\n}\n\n.caret {\n font-size: 40px;\n line-height: 20px;\n}\n\n.more {\n font-size: 10px;\n line-height: 10px;\n color: color.$white;\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={headerItem:"aJEvM9ETqVGVSdoyeEUl",headerItemLess:"c4P3k2Z4tsCZAcY2Ma0j",caret:"kCGXqqTy1uZ0EgZf3aia",more:"HAPZXCy29WaTboyCnPyy"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/code-studio/components/header/project-header.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.H8km6PMEvKQFW2ta_mqt{float:left;display:flex;margin:0}.zi8_ttDtOgTR6H1vdZcQ{margin-top:0;margin-bottom:0;margin-left:10;margin-right:0;box-shadow:"none"}',"",{version:3,sources:["webpack://./src/code-studio/components/header/project-header.module.scss"],names:[],mappings:"AAAA,sBACE,UAAA,CACA,YAAA,CACA,QAAA,CAGF,sBACE,YAAA,CACA,eAAA,CACA,cAAA,CACA,cAAA,CACA,iBAAA",sourcesContent:[".buttonWrapper {\n float: left;\n display: flex;\n margin: 0;\n}\n\n.buttonSpacing {\n margin-top: 0;\n margin-bottom: 0;\n margin-left: 10;\n margin-right: 0;\n box-shadow: 'none';\n}\n"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={buttonWrapper:"H8km6PMEvKQFW2ta_mqt",buttonSpacing:"zi8_ttDtOgTR6H1vdZcQ"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/code-studio/components/styles.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".toggle-input:focus>.toggle-display{outline:1px solid #949ca2}.toggle-input:focus:not(:focus-visible)>.toggle-display{outline:0}","",{version:3,sources:["webpack://./src/code-studio/components/styles.scss"],names:[],mappings:"AAEA,oCACE,yBAAA,CAGF,wDACE,SAAA",sourcesContent:["// Styles for ToggleSwitch that cannot be handled with Radium\n// Only add an outline around the toggle when it is tabbed over, not clicked on.\n.toggle-input:focus > .toggle-display {\n outline: 1px solid #949ca2;\n}\n\n.toggle-input:focus:not(:focus-visible) > .toggle-display {\n outline: 0;\n}\n"],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/common-styles.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".w50SAzm7PI8sC3Giy7ix{display:none}.WtJqpXnab8KOtUiNpztm{height:30px;background-color:#292f36;color:#fff;overflow-y:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Bh4xVupPaKk0o4O3si7a{background-color:#292f36;color:#fff}.Bh4xVupPaKk0o4O3si7a button span{color:#292f36}.f31XfAP_xkeHPJNAhV_J{height:30px;background-color:#7665a0;color:#fff;overflow-y:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.xAZuQT7dhqVzvMzgkSSW{background-color:#cfc9de;color:#4d575f}.xAZuQT7dhqVzvMzgkSSW button span{color:#4d575f}.mPRhwueMvvFeSmojyl_9{background-color:#0094ca;color:#d9eff7}.TXoozqDEcTSrcfV6Ke5p{color:#4d575f}.icTzlAYsC35csRpfL7zc{background-color:#3b3b3b;color:#fff}.V33k3Ni01_bB2eyDSCKk{padding-top:5px;padding-bottom:5px;font-size:14px}.ZljiNLc0on1YgtuzgE7V{color:#000;margin-bottom:10px;position:relative;cursor:pointer}","",{version:3,sources:["webpack://./src/common-styles.module.scss","webpack://./../shared/css/style-constants.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAKA,sBACE,YAAA,CAGF,sBACE,WCNyB,CDOzB,wBEqKa,CFpKb,UEyJc,CFxJd,iBAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,sBACE,wBE4JW,CF3JX,UEgJY,CF7IV,kCACE,aEuJO,CF9If,sBACE,WC/ByB,CDgCzB,wBENO,CFOP,UElBM,CFmBN,iBAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,sBACE,wBEba,CFcb,aElCY,CFqCV,kCACE,aEtCQ,CF4ChB,sBACE,wBEtBK,CFuBL,aEpBc,CFuBhB,sBACE,aElDc,CFqDhB,sBACE,wBAAA,CACA,UEhDM,CFmDR,sBACE,eAAA,CACA,kBAAA,CACA,cAAA,CAKF,sBACE,UEzEM,CF0EN,kBAAA,CACA,iBAAA,CACA,cAAA",sourcesContent:['// As we move from inline css to css modules we are temporarily duplicating commonStyles.js into this css module.\n// Any changes in one should be made in the other to apply to all components.\n@use "color.scss";\n@use "style-constants.scss";\n\n.hidden {\n display: none;\n}\n\n.darkHeader {\n height: style-constants.$workspace-headers-height;\n background-color: color.$neutral_dark;\n color: color.$neutral_white;\n overflow-y: hidden;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n &Unfocused {\n background-color: color.$neutral_dark;\n color: color.$neutral_white;\n\n button {\n span {\n color: color.$neutral_dark;\n }\n }\n }\n}\n\n// TODO: [Phase 2] This now is legacy style that we use for Javalab. Remove .purpleHeader styles and it\'s usages\n// once we move all the headers to updated styles.\n// More info here: https://github.com/code-dot-org/code-dot-org/pull/50895\n.purpleHeader {\n height: style-constants.$workspace-headers-height;\n background-color: color.$purple;\n color: color.$white;\n overflow-y: hidden;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n &Unfocused {\n background-color: color.$lighter_purple;\n color: color.$dark_charcoal;\n\n button {\n span {\n color: color.$dark_charcoal;\n }\n }\n }\n}\n\n.teacherBlueHeader {\n background-color: color.$cyan;\n color: color.$lightest_cyan;\n}\n\n.teacherHeaderUnfocused {\n color: color.$dark_charcoal;\n}\n\n.minecraftHeader {\n background-color: #3b3b3b;\n color: color.$white;\n}\n\n.button {\n padding-top: 5px;\n padding-bottom: 5px;\n font-size: 14px;\n}\n\n// Div contain instructions; either below visualization or in top instructions\n// May not need a common location once everything is in top instructions\n.bubble {\n color: color.$black;\n margin-bottom: 10px;\n position: relative;\n cursor: pointer;\n}\n',"// Common styles and measures accessible from all stylesheets\n\n// Height of workspace headers (above actual blockly/droplet space, beneath\n// site header)\n$workspace-headers-height: 30px;\n\n// Width of horizontal and vertical resize bars\n$resize-bar-width: 13px;\n\n// Opacity of elements that are dragged out to be deleted\n$delete-opacity: 0.5;\n\n// Width of pegasus content as of 2017 redesign\n$content-width: 970px;\n","// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={hidden:"w50SAzm7PI8sC3Giy7ix",darkHeader:"WtJqpXnab8KOtUiNpztm",darkHeaderUnfocused:"Bh4xVupPaKk0o4O3si7a",purpleHeader:"f31XfAP_xkeHPJNAhV_J",purpleHeaderUnfocused:"xAZuQT7dhqVzvMzgkSSW",teacherBlueHeader:"mPRhwueMvvFeSmojyl_9",teacherHeaderUnfocused:"TXoozqDEcTSrcfV6Ke5p",minecraftHeader:"icTzlAYsC35csRpfL7zc",button:"V33k3Ni01_bB2eyDSCKk",bubble:"ZljiNLc0on1YgtuzgE7V"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/componentLibrary/checkbox/checkbox.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.aYCuDURDyCcrqvoxvhFZ{display:flex;gap:8px;align-items:start}.aYCuDURDyCcrqvoxvhFZ i{vertical-align:bottom}.aYCuDURDyCcrqvoxvhFZ i::before{display:inline-block;content:" ";text-align:center;border:2px solid #292f36;border-radius:4px}.aYCuDURDyCcrqvoxvhFZ span{margin-bottom:0;line-height:initial}.aYCuDURDyCcrqvoxvhFZ input[type=checkbox]{position:absolute;opacity:0}.aYCuDURDyCcrqvoxvhFZ input[type=checkbox]:checked+i::before{content:"";color:#fff;background:#0093a4;border:2px solid #0093a4;border-radius:4px}.aYCuDURDyCcrqvoxvhFZ input[type=checkbox]:indeterminate+i::before{content:"";color:#fff;background:#0093a4;border:2px solid #0093a4;border-radius:4px}.aYCuDURDyCcrqvoxvhFZ input[type=checkbox]:focus-visible+i::before{outline:2px solid #0093a4;outline-offset:2px;border-radius:4px}.aYCuDURDyCcrqvoxvhFZ input[type=checkbox]:focus-visible:indeterminate+i::before{color:#fff;background:#0093a4;border:2px solid #0093a4}.aYCuDURDyCcrqvoxvhFZ:hover{cursor:pointer}.aYCuDURDyCcrqvoxvhFZ:hover i::before{background-color:#abdfe5}.aYCuDURDyCcrqvoxvhFZ:hover input[type=checkbox]:checked+i::before,.aYCuDURDyCcrqvoxvhFZ:hover input[type=checkbox]:indeterminate+i::before{color:#fff;background:#008291;border-color:#008291}.aYCuDURDyCcrqvoxvhFZ:active i::before{background-color:#abdfe5;border-color:#0093a4}.aYCuDURDyCcrqvoxvhFZ:active input[type=checkbox]:checked+i::before,.aYCuDURDyCcrqvoxvhFZ:active input[type=checkbox]:indeterminate+i::before{color:#fff;background:#008291;border-color:#0093a4}.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled) span{color:#d4d5d7}.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled) i::before{border-color:#d4d5d7}.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled) input[type=checkbox]:checked+i::before,.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled) input[type=checkbox]:indeterminate+i::before{background:#d4d5d7;color:#fff}.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled):hover{cursor:not-allowed}.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled):hover i::before{background:#fff}.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled):hover input[type=checkbox]:checked+i::before,.aYCuDURDyCcrqvoxvhFZ:has(input[type=checkbox]:disabled):hover input[type=checkbox]:indeterminate+i::before{background:#d4d5d7;border-color:#d4d5d7}._1hTMIWRZKujswAEjgZE i{width:16px;height:16px}._1hTMIWRZKujswAEjgZE i::before{font-size:8px;width:12px;height:12px;line-height:12px}.kvHKspf4sbL3U3qVGRIs i{width:18px;height:18px}.kvHKspf4sbL3U3qVGRIs i::before{font-size:9.5px;width:14px;height:14px;line-height:14px}.qKbMC2tnRMagciMUC1K6 i{width:20px;height:20px}.qKbMC2tnRMagciMUC1K6 i::before{font-size:11px;width:16px;height:16px;line-height:16px}.utDCGxbRjQaZvyCW7aKO i{width:24px;height:24px}.utDCGxbRjQaZvyCW7aKO i::before{font-size:13px;width:20px;height:20px;line-height:20px}',"",{version:3,sources:["webpack://./src/componentLibrary/checkbox/checkbox.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAAA,sBAGA,YACE,CAAA,OACA,CAAA,iBACA,CAAA,wBAEA,qBACE,CAAA,gCAEA,oBACE,CAAA,WACA,CAAA,iBACA,CAAA,wBACA,CAAA,iBACA,CAAA,2BAIJ,eACE,CAAA,mBACA,CAAA,2CAGF,iBACE,CAAA,SACA,CAAA,6DAEA,WACE,CAAA,UCuIU,CAAA,kBAqBI,CAAA,wBDzJd,CAAA,iBACA,CAAA,mEAGF,WACE,CAAA,UC+HU,CAAA,kBAqBI,CAAA,wBDjJd,CAAA,iBACA,CAAA,mEAKA,yBACE,CAAA,kBACA,CAAA,iBACA,CAAA,iFAEF,UCiHU,CAAA,kBAqBI,CAAA,wBDnIZ,CAAA,4BAMN,cACE,CAAA,sCAGE,wBC8EgB,CAAA,4IDxEhB,UC8FU,CAAA,kBAsBI,CAAA,oBAAA,CAAA,uCDxGd,wBC4DgB,CAAA,oBA2CF,CAAA,8IDhGd,UC2EU,CAAA,kBAsBI,CAAA,oBADA,CAAA,8DDrFhB,aCmEa,CAAA,mED/Db,oBC+Da,CAAA,sMD1DX,kBC0DW,CAAA,UAHD,CAAA,+DDhDZ,kBACE,CAAA,yEACA,eC8CU,CAAA,kND1CV,kBC6CW,CAAA,oBAAA,CAAA,wBDlCf,UACE,CAAA,WACA,CAAA,gCAGF,aACE,CAAA,UACA,CAAA,WACA,CAAA,gBACA,CAAA,wBAKF,UACE,CAAA,WACA,CAAA,gCAGF,eACE,CAAA,UACA,CAAA,WACA,CAAA,gBACA,CAAA,wBAKF,UACE,CAAA,WACA,CAAA,gCAGF,cACE,CAAA,UACA,CAAA,WACA,CAAA,gBACA,CAAA,wBAKF,UACE,CAAA,WACA,CAAA,gCAGF,cACE,CAAA,UACA,CAAA,WACA,CAAA,gBACA",sourcesContent:['@import "color";\n\n// Checkbox common styles\n.label {\n display: flex;\n gap: 8px;\n align-items: start;\n\n i {\n vertical-align: bottom;\n\n &::before {\n display: inline-block;\n content: \' \';\n text-align: center;\n border: 2px solid $neutral_dark;\n border-radius: 4px;\n }\n }\n\n span {\n margin-bottom: 0;\n line-height: initial;\n }\n\n input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n\n &:checked + i::before {\n content: "\\f00c";\n color: $neutral_white;\n background: $light_primary_500;\n border: 2px solid $light_primary_500;\n border-radius: 4px;\n }\n\n &:indeterminate + i::before {\n content: "\\e404";\n color: $neutral_white;\n background: $light_primary_500;\n border: 2px solid $light_primary_500;\n border-radius: 4px;\n }\n\n // Focus styles\n &:focus-visible {\n + i::before {\n outline: 2px solid $light_primary_500;\n outline-offset: 2px;\n border-radius: 4px;\n }\n &:indeterminate + i::before {\n color: $neutral_white;\n background: $light_primary_500;\n border: 2px solid $light_primary_500;\n }\n }\n }\n\n // Hover styles\n &:hover {\n cursor: pointer;\n\n i {\n &::before {\n background-color: $brand_primary_light;\n }\n }\n\n input[type="checkbox"] {\n &:checked + i::before,\n &:indeterminate + i::before {\n color: $neutral_white;\n background: $light_primary_700;\n border-color: $light_primary_700;\n }\n }\n }\n\n // Pressed styles\n &:active {\n i {\n &::before {\n background-color: $brand_primary_light;\n border-color: $light_primary_500;\n }\n }\n\n input[type="checkbox"] {\n &:checked + i::before,\n &:indeterminate + i::before {\n color: $neutral_white;\n background: $light_primary_700;\n border-color: $light_primary_500;\n }\n }\n }\n\n // Disabled styles\n &:has(input[type="checkbox"]:disabled) {\n span {\n color: $neutral_dark20;\n }\n\n i::before {\n border-color: $neutral_dark20;\n }\n\n input[type="checkbox"] {\n &:checked + i::before,\n &:indeterminate + i::before {\n background: $neutral_dark20;\n color: $neutral_white;\n }\n }\n\n &:hover {\n cursor: not-allowed;\n i::before {\n background: $neutral_white;\n }\n\n input[type="checkbox"]:checked + i::before,\n input[type="checkbox"]:indeterminate + i::before {\n background: $neutral_dark20;\n border-color: $neutral_dark20;\n }\n }\n }\n}\n\n// Sizes\n.label-xs {\n i {\n width: 16px;\n height: 16px;\n }\n\n i::before {\n font-size: 8px;\n width: 12px;\n height: 12px;\n line-height: 12px;\n }\n}\n\n.label-s {\n i {\n width: 18px;\n height: 18px;\n }\n\n i::before {\n font-size: 9.5px;\n width: 14px;\n height: 14px;\n line-height: 14px;\n }\n}\n\n.label-m {\n i {\n width: 20px;\n height: 20px;\n }\n\n i::before {\n font-size: 11px;\n width: 16px;\n height: 16px;\n line-height: 16px;\n }\n}\n\n.label-l {\n i {\n width: 24px;\n height: 24px;\n }\n\n i::before {\n font-size: 13px;\n width: 20px;\n height: 20px;\n line-height: 20px;\n }\n}',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={label:"aYCuDURDyCcrqvoxvhFZ","label-xs":"_1hTMIWRZKujswAEjgZE","label-s":"kvHKspf4sbL3U3qVGRIs","label-m":"qKbMC2tnRMagciMUC1K6","label-l":"utDCGxbRjQaZvyCW7aKO"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/componentLibrary/radioButton/radioButton.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.YjYHLE4xe7y3ylsCozcM{display:flex;gap:10px;align-items:center;margin:0}.YjYHLE4xe7y3ylsCozcM input[type=radio]{position:absolute;opacity:0}.YjYHLE4xe7y3ylsCozcM .sblQceqkdIZ43tf4euIn{position:relative;box-sizing:border-box;margin:2px;font-size:unset;line-height:unset;border:2px solid #292f36;border-radius:50%;background:#fff}.YjYHLE4xe7y3ylsCozcM .sblQceqkdIZ43tf4euIn::after{content:"";background:#0093a4;position:absolute;border-radius:50%;top:50%;left:50%;transform:translate(-50%, -50%);opacity:0;transition:opacity .2s}.YjYHLE4xe7y3ylsCozcM input[type=radio]:checked+.sblQceqkdIZ43tf4euIn{border-color:#0093a4}.YjYHLE4xe7y3ylsCozcM input[type=radio]:checked+.sblQceqkdIZ43tf4euIn::after{opacity:1}.YjYHLE4xe7y3ylsCozcM .Dd7jzbXNinp2qzYT4lun{margin:0;user-select:none;-webkit-user-select:none}.YjYHLE4xe7y3ylsCozcM:hover input[type=radio]:not(:disabled)+.sblQceqkdIZ43tf4euIn{background:#abdfe5}.YjYHLE4xe7y3ylsCozcM:hover input[type=radio]:not(:disabled):checked+.sblQceqkdIZ43tf4euIn{border-color:#008291;background:#fff}.YjYHLE4xe7y3ylsCozcM:hover input[type=radio]:not(:disabled):checked+.sblQceqkdIZ43tf4euIn::after{background:#008291}.YjYHLE4xe7y3ylsCozcM input[type=radio]:focus-visible+.sblQceqkdIZ43tf4euIn{outline:2px solid #0093a4;outline-offset:2px}.YjYHLE4xe7y3ylsCozcM:active:has(input[type=radio]:not(:disabled)) .sblQceqkdIZ43tf4euIn,.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:active:not(:disabled)) .sblQceqkdIZ43tf4euIn{background:#abdfe5;border-color:#0093a4}.YjYHLE4xe7y3ylsCozcM:active:has(input[type=radio]:not(:disabled)):has(input[type=radio]:checked) .sblQceqkdIZ43tf4euIn,.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:active:not(:disabled)):has(input[type=radio]:checked) .sblQceqkdIZ43tf4euIn{background:#abdfe5;border-color:#008291}.YjYHLE4xe7y3ylsCozcM:active:has(input[type=radio]:not(:disabled)):has(input[type=radio]:checked) .sblQceqkdIZ43tf4euIn::after,.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:active:not(:disabled)):has(input[type=radio]:checked) .sblQceqkdIZ43tf4euIn::after{background:#008291}.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:disabled){cursor:not-allowed}.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:disabled) .sblQceqkdIZ43tf4euIn{border-color:#d4d5d7}.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:disabled) .sblQceqkdIZ43tf4euIn::after{background:#d4d5d7}.YjYHLE4xe7y3ylsCozcM:has(input[type=radio]:disabled) .Dd7jzbXNinp2qzYT4lun{color:#d4d5d7}.jxMnN5fuZlBUSpvcZN5s{height:28px}.jxMnN5fuZlBUSpvcZN5s .sblQceqkdIZ43tf4euIn{height:24px;width:24px}.jxMnN5fuZlBUSpvcZN5s .sblQceqkdIZ43tf4euIn::after{width:9.33px;height:9.33px}.gYAmViSAj4V_ZZG3Yfy8{height:24px}.gYAmViSAj4V_ZZG3Yfy8 .sblQceqkdIZ43tf4euIn{height:20px;width:20px}.gYAmViSAj4V_ZZG3Yfy8 .sblQceqkdIZ43tf4euIn::after{width:8px;height:8px}.P8KDdiI3OZtkYzbvIsrK{height:22px}.P8KDdiI3OZtkYzbvIsrK .sblQceqkdIZ43tf4euIn{height:18px;width:18px}.P8KDdiI3OZtkYzbvIsrK .sblQceqkdIZ43tf4euIn::after{width:7.33px;height:7.33px}.cn_hxte2ARsOuhPehO3U{height:20px}.cn_hxte2ARsOuhPehO3U .sblQceqkdIZ43tf4euIn{height:16px;width:16px}.cn_hxte2ARsOuhPehO3U .sblQceqkdIZ43tf4euIn::after{width:6.67px;height:6.67px}',"",{version:3,sources:["webpack://./src/componentLibrary/radioButton/radioButton.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAEA,sBACE,YAAA,CACA,QAAA,CACA,kBAAA,CACA,QAAA,CAEA,wCACE,iBAAA,CACA,SAAA,CAGF,4CACE,iBAAA,CACA,qBAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,wBAAA,CACA,iBAAA,CACA,eCgJY,CD9IZ,mDACE,UAAA,CACA,kBCiKc,CDhKd,iBAAA,CACA,iBAAA,CACA,OAAA,CACA,QAAA,CACA,+BAAA,CACA,SAAA,CACA,sBAAA,CAIJ,sEACE,oBCqJgB,CDnJhB,6EACE,SAAA,CAIJ,4CACE,QAAA,CACA,gBAAA,CACA,wBAAA,CAKE,mFACE,kBCoIY,CDlIhB,2FACE,oBCmIc,CDlId,eC4GU,CD1GV,kGACE,kBC+HY,CDzHlB,4EACE,yBAAA,CACA,kBAAA,CAMA,kLACE,kBC8Gc,CD7Gd,oBC8Gc,CD3Gd,gPACE,kBCyGY,CDxGZ,oBC0GY,CDxGZ,8PACE,kBCuGU,CDhGlB,sDACE,kBAAA,CAEA,4EACE,oBCyEW,CDvEX,mFACE,kBCsES,CDlEb,4EACE,aCiEW,CD1DjB,sBACE,WAAA,CAEA,4CACE,WAAA,CACA,UAAA,CAEA,mDACE,YAAA,CACA,aAAA,CAKN,sBACE,WAAA,CAEA,4CACE,WAAA,CACA,UAAA,CAEA,mDACE,SAAA,CACA,UAAA,CAKN,sBACE,WAAA,CAEA,4CACE,WAAA,CACA,UAAA,CAEA,mDACE,YAAA,CACA,aAAA,CAKN,sBACE,WAAA,CAEA,4CACE,WAAA,CACA,UAAA,CAEA,mDACE,YAAA,CACA,aAAA",sourcesContent:['@import "color";\n\n.radioButton {\n display: flex;\n gap: 10px;\n align-items: center;\n margin: 0;\n\n input[type="radio"] {\n position: absolute;\n opacity: 0;\n }\n\n .radioIcon {\n position: relative;\n box-sizing: border-box;\n margin: 2px;\n font-size: unset;\n line-height: unset;\n border: 2px solid $neutral_dark;\n border-radius: 50%;\n background: $neutral_white;\n\n &::after {\n content: \'\';\n background: $light_primary_500;\n position: absolute;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: opacity 0.2s;\n }\n }\n\n input[type="radio"]:checked + .radioIcon {\n border-color: $light_primary_500;\n\n &::after {\n opacity: 1;\n }\n }\n\n .radioButtonLabel {\n margin: 0;\n user-select: none;\n -webkit-user-select: none;\n }\n\n // Hover styles\n &:hover input[type="radio"]:not(:disabled) {\n + .radioIcon {\n background: $light_primary_100;\n }\n &:checked + .radioIcon {\n border-color: $light_primary_700;\n background: $neutral_white;\n\n &::after {\n background: $light_primary_700;\n }\n }\n }\n\n // Focus styles\n input[type="radio"]:focus-visible + .radioIcon {\n outline: 2px solid $light_primary_500;\n outline-offset: 2px;\n }\n\n // Pressed styles\n &:active:has(input[type="radio"]:not(:disabled)),\n &:has(input[type="radio"]:active:not(:disabled)){\n .radioIcon {\n background: $light_primary_100;\n border-color: $light_primary_500;\n }\n &:has(input[type="radio"]:checked) {\n .radioIcon {\n background: $light_primary_100;\n border-color: $light_primary_700;\n\n &::after {\n background: $light_primary_700;\n }\n }\n }\n }\n\n // Disabled styles\n &:has(input[type="radio"]:disabled) {\n cursor: not-allowed;\n\n .radioIcon {\n border-color: $neutral_dark20;\n\n &::after {\n background: $neutral_dark20;\n }\n }\n\n .radioButtonLabel {\n color: $neutral_dark20;\n }\n }\n\n}\n\n// Sizes\n.radioButton-l {\n height: 28px;\n\n .radioIcon {\n height: 24px;\n width: 24px;\n\n &::after {\n width: 9.33px;\n height: 9.33px;\n }\n }\n}\n\n.radioButton-m {\n height: 24px;\n\n .radioIcon {\n height: 20px;\n width: 20px;\n\n &::after {\n width: 8px;\n height: 8px;\n }\n }\n}\n\n.radioButton-s {\n height: 22px;\n\n .radioIcon {\n height: 18px;\n width: 18px;\n\n &::after {\n width: 7.33px;\n height: 7.33px;\n }\n }\n}\n\n.radioButton-xs {\n height: 20px;\n\n .radioIcon {\n height: 16px;\n width: 16px;\n\n &::after {\n width: 6.67px;\n height: 6.67px;\n }\n }\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={radioButton:"YjYHLE4xe7y3ylsCozcM",radioIcon:"sblQceqkdIZ43tf4euIn",radioButtonLabel:"Dd7jzbXNinp2qzYT4lun","radioButton-l":"jxMnN5fuZlBUSpvcZN5s","radioButton-m":"gYAmViSAj4V_ZZG3Yfy8","radioButton-s":"P8KDdiI3OZtkYzbvIsrK","radioButton-xs":"cn_hxte2ARsOuhPehO3U"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/componentLibrary/toggle/toggle.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.liRZkm5FDoh9T7ZB4SP0{display:flex;flex-direction:row;align-items:center;gap:8px;margin:0}.liRZkm5FDoh9T7ZB4SP0>span{margin-bottom:0;user-select:none;-webkit-user-select:none}.liRZkm5FDoh9T7ZB4SP0 div{display:inline-block;position:relative;vertical-align:middle;text-align:left}.liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]{position:absolute;opacity:0}.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ{display:block;overflow:hidden;cursor:pointer;border:0;border-radius:20px;margin:0;height:100%;width:100%}.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ i{display:block;height:100%;cursor:pointer;background-color:#94979b;border-radius:100px;width:200%;margin-left:-100%;transition:margin .3s ease 0s}.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ i::before,.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ i::after{display:block;float:left;width:50%;padding:2px;border:2px solid rgba(0,0,0,0);border-radius:100px;color:#fff;box-sizing:border-box}.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ i::before{content:"";background-color:#0093a4;padding-left:4px}.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ i::after{content:"";background-color:#94979b;text-align:right;padding-right:4px}.liRZkm5FDoh9T7ZB4SP0 div .BESCGwoHepktZfKv_HrQ span{display:block;margin:2px;background:#fff;position:absolute;top:0;left:0;bottom:0;right:50%;border:0;border-radius:20px;transition:all .2s ease 0s}.liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]:checked+.BESCGwoHepktZfKv_HrQ i{margin-left:0}.liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]:checked+.BESCGwoHepktZfKv_HrQ span{right:0;left:50%}.liRZkm5FDoh9T7ZB4SP0:hover div .BESCGwoHepktZfKv_HrQ i::before{background-color:#008291}.liRZkm5FDoh9T7ZB4SP0:hover div .BESCGwoHepktZfKv_HrQ i::after{background-color:#6a6e73}.liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]:focus-visible+.BESCGwoHepktZfKv_HrQ{outline:2px solid #0093a4;outline-offset:2px}.liRZkm5FDoh9T7ZB4SP0:active div input[type=checkbox]:not(:disabled)+.BESCGwoHepktZfKv_HrQ i::before,.liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]:active:not(:disabled)+.BESCGwoHepktZfKv_HrQ i::before{border-color:#0093a4;background:#008291}.liRZkm5FDoh9T7ZB4SP0:active div input[type=checkbox]:not(:disabled)+.BESCGwoHepktZfKv_HrQ i::after,.liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]:active:not(:disabled)+.BESCGwoHepktZfKv_HrQ i::after{border-color:#94979b;background:#6a6e73}.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled){cursor:default}.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>span{color:#d4d5d7}.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>div .BESCGwoHepktZfKv_HrQ,.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>div .BESCGwoHepktZfKv_HrQ i{cursor:not-allowed}.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>div .BESCGwoHepktZfKv_HrQ::before,.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>div .BESCGwoHepktZfKv_HrQ::after,.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>div .BESCGwoHepktZfKv_HrQ i::before,.liRZkm5FDoh9T7ZB4SP0:has(input[type=checkbox]:disabled)>div .BESCGwoHepktZfKv_HrQ i::after{background-color:#d4d5d7}html[dir=rtl] .liRZkm5FDoh9T7ZB4SP0 div input[type=checkbox]:checked+.BESCGwoHepktZfKv_HrQ i{margin-right:-100%}.A86_XBz_HSvx_2Go30Re div{width:56px;height:28px}.A86_XBz_HSvx_2Go30Re div .BESCGwoHepktZfKv_HrQ i::before,.A86_XBz_HSvx_2Go30Re div .BESCGwoHepktZfKv_HrQ i::after{height:28px;line-height:19px;font-size:19px}.A86_XBz_HSvx_2Go30Re div .BESCGwoHepktZfKv_HrQ span{width:24px}.OPwLhADM8XULOQBxXLHo div{width:48px;height:24px}.OPwLhADM8XULOQBxXLHo div .BESCGwoHepktZfKv_HrQ i::before,.OPwLhADM8XULOQBxXLHo div .BESCGwoHepktZfKv_HrQ i::after{height:24px;line-height:16px;font-size:16px}.OPwLhADM8XULOQBxXLHo div .BESCGwoHepktZfKv_HrQ span{width:20px}.XBkOgoguizagkhTZqWWN div{width:44px;height:22px}.XBkOgoguizagkhTZqWWN div .BESCGwoHepktZfKv_HrQ i::before,.XBkOgoguizagkhTZqWWN div .BESCGwoHepktZfKv_HrQ i::after{height:22px;line-height:14px;font-size:14px}.XBkOgoguizagkhTZqWWN div .BESCGwoHepktZfKv_HrQ span{width:18px}.BuNHM71n88kgw6jMTq9g div{width:40px;height:20px}.BuNHM71n88kgw6jMTq9g div .BESCGwoHepktZfKv_HrQ i::before,.BuNHM71n88kgw6jMTq9g div .BESCGwoHepktZfKv_HrQ i::after{height:20px;line-height:13px;font-size:13px}.BuNHM71n88kgw6jMTq9g div .BESCGwoHepktZfKv_HrQ span{width:16px}.NLB_iahS3AnVTGMNcDPg :nth-child(1){order:2}.NLB_iahS3AnVTGMNcDPg :nth-child(2){order:1}',"",{version:3,sources:["webpack://./src/componentLibrary/toggle/toggle.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAAA,sBAEA,YACE,CAAA,kBACA,CAAA,kBACA,CAAA,OACA,CAAA,QACA,CAAA,2BAEA,eACE,CAAA,gBACA,CAAA,wBACA,CAAA,0BAGF,oBACE,CAAA,iBACA,CAAA,qBACA,CAAA,eACA,CAAA,+CAEA,iBACE,CAAA,SACA,CAAA,gDAGF,aACE,CAAA,eACA,CAAA,cACA,CAAA,QACA,CAAA,kBACA,CAAA,QACA,CAAA,WACA,CAAA,UACA,CAAA,kDAEA,aACE,CAAA,WACA,CAAA,cACA,CAAA,wBCoIS,CAAA,mBDlIT,CAAA,UACA,CAAA,iBACA,CAAA,6BACA,CAAA,mHAEA,aAEE,CAAA,UACA,CAAA,SACA,CAAA,WACA,CAAA,8BACA,CAAA,mBACA,CAAA,UCgHM,CAAA,qBD9GN,CAAA,0DAIF,WACE,CAAA,wBC8HU,CAAA,gBD5HV,CAAA,yDAIF,WACE,CAAA,wBCgIO,CAAA,gBD9HP,CAAA,iBACA,CAAA,qDAKJ,aACE,CAAA,UACA,CAAA,eCwFQ,CAAA,iBDtFR,CAAA,KACA,CAAA,MACA,CAAA,QACA,CAAA,SACA,CAAA,QACA,CAAA,kBACA,CAAA,0BACA,CAAA,+EAKF,aACE,CAAA,kFAGF,OACE,CAAA,QACA,CAAA,gEAUE,wBCgFU,CAAA,+DD5EV,wBCqFO,CAAA,mFD5Ef,yBACE,CAAA,kBACA,CAAA,0MAMA,oBC0DgB,CAAA,kBACA,CAAA,wMDtDhB,oBC8Da,CAAA,kBACA,CAAA,yDDxDf,cACE,CAAA,8DACA,aCmDa,CAAA,wKD/CX,kBACE,CAAA,8WACA,wBC6CS,CAAA,6FDhCT,kBACE,CAAA,0BASR,UACE,CAAA,WACA,CAAA,mHAII,WAEE,CAAA,gBACA,CAAA,cACA,CAAA,qDAGJ,UACE,CAAA,0BAON,UACE,CAAA,WACA,CAAA,mHAII,WAEE,CAAA,gBACA,CAAA,cACA,CAAA,qDAIJ,UACE,CAAA,0BAON,UACE,CAAA,WACA,CAAA,mHAII,WAEE,CAAA,gBACA,CAAA,cACA,CAAA,qDAGJ,UACE,CAAA,0BAMN,UACE,CAAA,WACA,CAAA,mHAII,WAEE,CAAA,gBACA,CAAA,cACA,CAAA,qDAGJ,UACE,CAAA,oCAON,OACE,CAAA,oCAEF,OACE",sourcesContent:['@import "color";\n\n.toggle {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n margin: 0;\n\n > span {\n margin-bottom: 0;\n user-select: none;\n -webkit-user-select: none;\n }\n\n div {\n display: inline-block;\n position: relative;\n vertical-align: middle;\n text-align: left;\n\n input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n }\n\n .switch {\n display: block;\n overflow: hidden;\n cursor: pointer;\n border: 0;\n border-radius: 20px;\n margin: 0;\n height: 100%;\n width: 100%;\n\n i {\n display: block;\n height: 100%;\n cursor: pointer;\n background-color: $neutral_dark50;\n border-radius: 100px;\n width: 200%;\n margin-left: -100%;\n transition: margin 0.3s ease 0s;\n\n &::before,\n &::after {\n display: block;\n float: left;\n width: 50%;\n padding: 2px;\n border: 2px solid transparent;\n border-radius: 100px;\n color: $neutral_white;\n box-sizing: border-box;\n }\n\n // Checked styles\n &::before {\n content: "\\f00c";\n background-color: $light_primary_500;\n padding-left: 4px;\n }\n\n // Unchecked styles\n &::after {\n content: "\\f00d";\n background-color: $light_gray_500;\n text-align: right;\n padding-right: 4px;\n }\n }\n\n //Span is the circle (switch handle)\n span {\n display: block;\n margin: 2px;\n background: $neutral_white;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 50%;\n border: 0;\n border-radius: 20px;\n transition: all 0.2s ease 0s;\n }\n }\n\n input[type="checkbox"]:checked + .switch {\n i {\n margin-left: 0;\n }\n\n span {\n right: 0;\n left: 50%;\n }\n }\n }\n\n // Hover styles\n &:hover {\n div {\n .switch {\n i {\n &::before {\n background-color: $light_primary_700;\n }\n\n &::after {\n background-color: $light_gray_700;\n }\n }\n }\n }\n }\n\n // Focus styles\n div input[type="checkbox"]:focus-visible + .switch{\n outline: 2px solid $light_primary_500;\n outline-offset: 2px;\n }\n\n // Pressed styles\n &:active div input[type="checkbox"]:not(:disabled) + .switch i,\n div input[type="checkbox"]:active:not(:disabled) + .switch i {\n &::before {\n border-color: $light_primary_500;\n background: $light_primary_700;\n }\n\n &::after {\n border-color: $light_gray_500;\n background: $light_gray_700;\n }\n }\n\n // Disabled styles\n &:has(input[type="checkbox"]:disabled) {\n cursor: default;\n > span {\n color: $light_gray_200;\n }\n > div {\n .switch, .switch i {\n cursor: not-allowed;\n &::before, &::after {\n background-color: $light_gray_200;\n }\n }\n }\n }\n}\n\n// RTL language support\nhtml[dir="rtl"] {\n .toggle {\n div {\n input[type="checkbox"]:checked + .switch {\n i {\n margin-right: -100%;\n }\n }\n }\n }\n}\n\n// Toggle sizes\n.toggle-l {\n div {\n width: 56px;\n height: 28px;\n\n .switch {\n i {\n &::before,\n &::after {\n height: 28px;\n line-height: 19px;\n font-size: 19px;\n }\n }\n span {\n width: 24px;\n }\n }\n }\n}\n\n.toggle-m {\n div {\n width: 48px;\n height: 24px;\n\n .switch {\n i {\n &::before,\n &::after {\n height: 24px;\n line-height: 16px;\n font-size: 16px;\n }\n }\n\n span {\n width: 20px;\n }\n }\n }\n}\n\n.toggle-s {\n div {\n width: 44px;\n height: 22px;\n\n .switch {\n i {\n &::before,\n &::after {\n height: 22px;\n line-height: 14px;\n font-size: 14px;\n }\n }\n span {\n width: 18px;\n }\n }\n }\n}\n.toggle-xs {\n div {\n width: 40px;\n height: 20px;\n\n .switch {\n i {\n &::before,\n &::after {\n height: 20px;\n line-height: 13px;\n font-size: 13px;\n }\n }\n span {\n width: 16px;\n }\n }\n }\n}\n\n.toggle-right {\n :nth-child(1) {\n order: 2;\n }\n :nth-child(2) {\n order: 1;\n }\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={toggle:"liRZkm5FDoh9T7ZB4SP0",switch:"BESCGwoHepktZfKv_HrQ","toggle-l":"A86_XBz_HSvx_2Go30Re","toggle-m":"OPwLhADM8XULOQBxXLHo","toggle-s":"XBkOgoguizagkhTZqWWN","toggle-xs":"BuNHM71n88kgw6jMTq9g","toggle-right":"NLB_iahS3AnVTGMNcDPg"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/componentLibrary/typography/typography.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__),_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/css-loader/dist/runtime/getUrl.js"),_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__),___CSS_LOADER_URL_IMPORT_0___=new URL(__webpack_require__("./fonts/barlowSemiCondensed/BarlowSemiCondensed-SemiBold.ttf"),__webpack_require__.b),___CSS_LOADER_URL_IMPORT_1___=new URL(__webpack_require__("./fonts/barlowSemiCondensed/BarlowSemiCondensed-Medium.ttf"),__webpack_require__.b),___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()),___CSS_LOADER_URL_REPLACEMENT_0___=_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___),___CSS_LOADER_URL_REPLACEMENT_1___=_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);___CSS_LOADER_EXPORT___.push([module.id,'@font-face{font-family:"Barlow Semi Condensed Semibold";font-style:normal;font-weight:600;src:url('+___CSS_LOADER_URL_REPLACEMENT_0___+') format("truetype"),local("?")}@font-face{font-family:"Barlow Semi Condensed Medium";font-style:normal;font-weight:500;src:url('+___CSS_LOADER_URL_REPLACEMENT_1___+') format("truetype"),local("?")}html{font-size:100%}.ox01LszGG04aDD7QUbJF{color:#292f36;margin:0 0 .5em 0;font-family:"Barlow Semi Condensed Semibold",sans-serif;font-size:3rem;line-height:1.16}.MWdGPEUtv3_cMEG3jyp4{color:#292f36;margin:0 0 .5em 0;font-family:"Barlow Semi Condensed Semibold",sans-serif;font-size:2.125rem;line-height:1.24}.c1BgmtfeL7LEPYK8S46L{color:#292f36;margin:0 0 .5em 0;font-family:"Barlow Semi Condensed Semibold",sans-serif;font-size:1.75rem;line-height:1.28}.Rpgv_o9Qx_N31He_klT3{color:#292f36;margin:0 0 .5em 0;font-family:"Barlow Semi Condensed Medium",sans-serif;font-size:1.5rem;line-height:1.32}.Mi2VJ2nn7woBU14Tq7Oj{color:#292f36;margin:0 0 .5em 0;font-family:"Gotham 5r",sans-serif,sans-serif;font-size:1.25rem;line-height:1.4}.NPhzWa5l5OXTc33Qf7d4{color:#292f36;margin:0 0 .5em 0;font-family:"Gotham 5r",sans-serif,sans-serif;font-size:1rem;line-height:1.48}._xvfJnTyspUbiGH8uqNk{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-size:1.25rem;line-height:1.4}.Jqn_2_GWo4_UgA8GYGK2{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-size:1rem;line-height:1.48}.mgS1ZvrnJWRsIve2VRVl{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-size:.875rem;line-height:1.54}.iHLOFC7TOVenbq6Q7FpE{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-size:.75rem;line-height:1.64}.yJSiSVIE8LZ7ySb89I83{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-family:"Gotham 5r",sans-serif,sans-serif;text-transform:uppercase;letter-spacing:.04rem;font-size:.875rem;line-height:1.6}._8ooMcBUKB5yKjWgWvbmn{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-family:"Gotham 5r",sans-serif,sans-serif;text-transform:uppercase;letter-spacing:.04rem;font-size:.75rem;line-height:1.64}.CySV0rXEo2VhmvrH0nGe{color:#292f36;font-family:"Gotham 4r",sans-serif,sans-serif;margin-bottom:1em;font-family:"Gotham 5r",sans-serif,sans-serif;text-transform:uppercase;letter-spacing:.04rem;font-size:.625rem;line-height:1.76}strong,.UydEnv8nCgsy1HD5zs3A{font-family:"Gotham 5r",sans-serif,sans-serif}.zVyLzpgeTbgZR7iL7W3e{font-family:"Gotham 7r",sans-serif,sans-serif}em,.iy9JXp90GbB2a3R6KioK{font-family:"Gotham 4i",sans-serif,sans-serif}strong em,em strong,.iy9JXp90GbB2a3R6KioK .UydEnv8nCgsy1HD5zs3A,.UydEnv8nCgsy1HD5zs3A .iy9JXp90GbB2a3R6KioK{font-family:"Gotham 5i",sans-serif,sans-serif}.iy9JXp90GbB2a3R6KioK .zVyLzpgeTbgZR7iL7W3e,.zVyLzpgeTbgZR7iL7W3e .iy9JXp90GbB2a3R6KioK,em .zVyLzpgeTbgZR7iL7W3e,.zVyLzpgeTbgZR7iL7W3e em{font-family:"Gotham 7i",sans-serif}figcaption,.D9nU76XUYzpmxX_BA_oI{font-family:"Gotham 4r",sans-serif,sans-serif;font-size:.75rem;margin:.5em 0 1em;line-height:1.64}',"",{version:3,sources:["webpack://./src/componentLibrary/typography/typography.module.scss","webpack://./../shared/css/color.scss","webpack://./../shared/css/font.scss"],names:[],mappings:"AASA,WACE,4CAAA,CACA,iBAAA,CACA,eAAA,CACA,yEACE,CAIJ,WACE,0CAAA,CACA,iBAAA,CACA,eAAA,CACA,yEAAA,CAGF,KACE,cAAA,CAuMF,sBAvIE,aCsFa,CDrFb,iBAAA,CAKA,uDEvF6B,CFwF7B,cAAA,CACA,gBAAA,CAgIF,sBAxIE,aCsFa,CDrFb,iBAAA,CAYA,uDE9F6B,CF+F7B,kBAAA,CACA,gBAAA,CA0HF,sBAzIE,aCsFa,CDrFb,iBAAA,CAmBA,uDErG6B,CFsG7B,iBAAA,CACA,gBAAA,CAoHF,sBA1IE,aCsFa,CDrFb,iBAAA,CA0BA,qDE3G2B,CF4G3B,gBAAA,CACA,gBAAA,CA8GF,sBA3IE,aCsFa,CDrFb,iBAAA,CAiCA,6CAAA,CACA,iBAAA,CACA,eAAA,CAwGF,sBA5IE,aCsFa,CDrFb,iBAAA,CAwCA,6CAAA,CACA,cAAA,CACA,gBAAA,CAqGF,sBAhGE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CAKA,iBAAA,CACA,eAAA,CA0FF,sBAlGE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CAWA,cAAA,CACA,gBAAA,CAuFF,sBArGE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CAiBA,iBAAA,CACA,gBAAA,CAmFF,sBAvGE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CAuBA,gBAAA,CACA,gBAAA,CAkFF,sBA5GE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CA8BA,6CAAA,CACA,wBAAA,CACA,qBAAA,CAKA,iBAAA,CACA,eAAA,CAsEF,uBA9GE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CA8BA,6CAAA,CACA,wBAAA,CACA,qBAAA,CAWA,gBAAA,CACA,gBAAA,CAkEF,sBAhHE,aCsCa,CDrCb,6CAAA,CACA,iBAAA,CA8BA,6CAAA,CACA,wBAAA,CACA,qBAAA,CAiBA,iBAAA,CACA,gBAAA,CA+DF,6BA1DE,6CAAA,CA8DF,sBA1DE,6CAAA,CA8DF,yBA1DE,6CAAA,CA6DF,4GAzDE,6CAAA,CAgEF,0IA5DE,kCAAA,CAqEF,iCAhEE,6CAAA,CACA,gBAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:['@import "color", "font";\n\n/* This file is being copied and adopted to shared/css/typography.scss\n Updating styles in this file will require a manual sync of the that file.\n*/\n\n// TODO: [DSCO-64] (https://codedotorg.atlassian.net/browse/DSCO-64)\n// Once we move Typography to DSCO_ - make sure we delete apps/fonts/ folder,\n// since that folder is only needed for scss modules\n@font-face {\n font-family: "Barlow Semi Condensed Semibold";\n font-style: normal;\n font-weight: 600;\n src:\n url("/fonts/barlowSemiCondensed/BarlowSemiCondensed-SemiBold.ttf") format("truetype"),\n local("?");\n}\n\n@font-face {\n font-family: "Barlow Semi Condensed Medium";\n font-style: normal;\n font-weight: 500;\n src: url("/fonts/barlowSemiCondensed/BarlowSemiCondensed-Medium.ttf") format("truetype"), local("?");\n}\n\nhtml {\n font-size: 100%;\n}\n\n// This stylesheet can be imported to maintain typographic\n// consistency across Dashboard and Pegasus sites.\n\n// Includes heading, paragraph, and caption styles.\n\n// We\'re using mixins to style semantic tags and also creating\n// identical classes for potential use on other elements if needed.\n\n// ----------------------------------------\n// v 2.0.1\n// ----------------------------------------\n\n// Sizes\n// Most of the typography elements have a set of different sizes (defined by "-one", "-two", "-three", "-four" suffixes).\n// (Not applicable to Headings and elements without those suffixes)\n// Common rule for all of those sizes are following:\n// 1. "-one" is bigger size.\n// 2. "-two" is a DEFAULT size, used in most of cases.\n// 3. "-three" is smaller size.\n// 4. "-four" is the smallest size.\n\n// Values\n// font-size uses rem\n// - works when the root font-size is 100% which uses the\n// browser default font-size of 16px (3rem = 16 x 3 = 48px)\n\n// margin uses em\n// - sets the margin relative to the parent element rather than the root\n// example:\n// Imagine that we have h1 with font-size: 3rem (48px) and we want to set margin-bottom to it.\n// - Setting margin-bottom to 0.5rem == 8px (html.font_size * 0.5) >>> rem is relative to root element (html tag) which is 16px\n// - Setting margin-bottom to 0.5em == 24px (h1.font-size * 0.5) >>> em is relative to element itself or it\'s parent.\n// Our h1 element has a font-size of 3rem (48px), so 0.5em will be equal to 48 * 0.5 = 24px margin-bottom.\n\n// Read more about rem vs em:\n// https://www.digitalocean.com/community/tutorials/css-rem-vs-em-units\n\n// line-height uses unitless numbers\n// - this multiplies the line-height by the element\'s font-size\n// and is the preferred way to set line-height according to Mozilla\n// https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n\n// ----------------------------------------\n\n// Heading styles\n// Heading mixins are used to maintain accessible heading hierarchy\n// when design calls for a different style (semantic h3, h5 styling).\n\n// Use .heading-[xx] classes on single elements in the markup.\n// This is an h3 heading that will look like an h5.\n// - example: h3.heading-sm\n\n// Use @include [mixin-name] in stylesheets for widespread use.\n\n/* — example: all h3s in a ul need to look like h5s\n ul.icon-list {\n h3 { @include heading-sm }\n }\n*/\n\n@mixin heading-common {\n color: $neutral-dark;\n margin: 0 0 0.5em 0;\n}\n\n@mixin heading-xxl {\n @include heading-common;\n font-family: $barlowSemiCondensed-semibold;\n font-size: 3rem;\n line-height: 1.16;\n}\n\n@mixin heading-xl {\n @include heading-common;\n font-family: $barlowSemiCondensed-semibold;\n font-size: 2.125rem;\n line-height: 1.24;\n}\n\n@mixin heading-lg {\n @include heading-common;\n font-family: $barlowSemiCondensed-semibold;\n font-size: 1.75rem;\n line-height: 1.28;\n}\n\n@mixin heading-md {\n @include heading-common;\n font-family: $barlowSemiCondensed-medium;\n font-size: 1.5rem;\n line-height: 1.32;\n}\n\n@mixin heading-sm {\n @include heading-common;\n font-family: $gotham-bold, sans-serif;\n font-size: 1.25rem;\n line-height: 1.40;\n}\n\n@mixin heading-xs {\n @include heading-common;\n font-family: $gotham-bold, sans-serif;\n font-size: 1rem;\n line-height: 1.48;\n}\n\n// Paragraph styles\n@mixin paragraph-common {\n color: $neutral-dark;\n font-family: $gotham-regular, sans-serif;\n margin-bottom: 1em;\n}\n\n@mixin body-one {\n @include paragraph-common;\n font-size: 1.25rem;\n line-height: 1.4;\n}\n\n@mixin body-two {\n @include paragraph-common;\n font-size: 1rem;\n line-height: 1.48;\n}\n\n@mixin body-three {\n @include paragraph-common;\n font-size: 0.875rem;\n line-height: 1.54;\n}\n\n@mixin body-four {\n @include paragraph-common;\n font-size: 0.75rem;\n line-height: 1.64;\n}\n\n// Overline styles\n@mixin overline-common {\n @include paragraph-common;\n font-family: $gotham-bold, sans-serif;\n text-transform: uppercase;\n letter-spacing: 0.04rem;\n}\n\n@mixin overline-one {\n @include overline-common;\n font-size: 0.875rem;\n line-height: 1.6;\n}\n\n@mixin overline-two {\n @include overline-common;\n font-size: 0.75rem;\n line-height: 1.64;\n}\n\n@mixin overline-three {\n @include overline-common;\n font-size: 0.625rem;\n line-height: 1.76;\n}\n\n// Strong and Em styles\n@mixin strong {\n font-family: $gotham-bold, sans-serif;\n}\n\n@mixin extra-strong {\n font-family: $gotham-extra-bold, sans-serif;\n}\n\n@mixin em {\n font-family: $gotham-italics, sans-serif;\n}\n\n@mixin strong-em {\n font-family: $gotham-bold-italics, sans-serif;\n}\n\n@mixin extra-strong-em {\n font-family: $gotham-extra-bold-italics, sans-serif;\n}\n\n// Caption styles\n@mixin figcaption {\n font-family: $gotham-regular, sans-serif;\n font-size: 0.75rem;\n margin: 0.5em 0 1em;\n line-height: 1.64;\n}\n\n// ----------------------------------------\n\n// Headings\n.heading-xxl { @include heading-xxl; }\n.heading-xl { @include heading-xl; }\n.heading-lg { @include heading-lg; }\n.heading-md { @include heading-md; }\n.heading-sm { @include heading-sm; }\n.heading-xs { @include heading-xs; }\n\n// Paragraphs\n// Use on larger paragraphs\n.body-one { @include body-one; }\n// Use on default paragraphs\n.body-two { @include body-two; }\n// Use on course block descriptions or anywhere\n// else that needs smaller paragraph text\n.body-three { @include body-three; }\n// Use on smallest paragraph text\n.body-four { @include body-four; }\n\n// Overlines\n// Use on small uppercase labels or descriptions\n// (Bigger size)\n.overline-one { @include overline-one; }\n// (Default size)\n.overline-two { @include overline-two; }\n// (Smaller size)\n.overline-three { @include overline-three; }\n\n// Use in paragraphs to bold text\nstrong,\n.strong { @include strong; }\n// Use in paragraphs to italicize text\n\n.extra-strong {\n @include extra-strong;\n}\n\nem,\n.em { @include em; }\n\nstrong em,\nem strong,\n.em .strong,\n.strong .em {\n @include strong-em;\n}\n\n.em .extra-strong,\n.extra-strong .em,\nem .extra-strong,\n.extra-strong em {\n @include extra-strong-em;\n}\n\n// Captions\n// Use on figcaption elements that accompany images or videos\nfigcaption,\n.figcaption { @include figcaption; }\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;",'// Common site-wide fonts, put here for easy access from all scss files\n\n$gotham-regular: "Gotham 4r", sans-serif;\n$gotham-italics: "Gotham 4i", sans-serif;\n$gotham-bold: "Gotham 5r", sans-serif;\n$gotham-bold-italics: "Gotham 5i", sans-serif;\n$gotham-extra-bold: "Gotham 7r", sans-serif;\n$gotham-extra-bold-italics: "Gotham 7i";\n\n$barlowSemiCondensed-semibold: \'Barlow Semi Condensed Semibold\', sans-serif;\n$barlowSemiCondensed-medium: \'Barlow Semi Condensed Medium\', sans-serif;\n\n$code-font: \'Source Code Pro\', Monaco, \'Bitstream Vera Sans Mono\', \'Lucida Console\', Terminal, monospace;\n\n/*\n If you are changing the location of these files,\n see the readme in this directory for more detail on manual steps to take when uploading new files.\n */\n$font-awesome-core-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/fontawesome.min.css";\n$font-awesome-brands-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/brands.min.css";\n$font-awesome-solid-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/solid.min.css";\n$font-awesome-regular-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/regular.min.css";\n$font-awesome-v4-fonts-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/v4-font-face.min.css";\n$font-awesome-v4-shims-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/v4-shims.min.css";\n'],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={"heading-xxl":"ox01LszGG04aDD7QUbJF","heading-xl":"MWdGPEUtv3_cMEG3jyp4","heading-lg":"c1BgmtfeL7LEPYK8S46L","heading-md":"Rpgv_o9Qx_N31He_klT3","heading-sm":"Mi2VJ2nn7woBU14Tq7Oj","heading-xs":"NPhzWa5l5OXTc33Qf7d4","body-one":"_xvfJnTyspUbiGH8uqNk","body-two":"Jqn_2_GWo4_UgA8GYGK2","body-three":"mgS1ZvrnJWRsIve2VRVl","body-four":"iHLOFC7TOVenbq6Q7FpE","overline-one":"yJSiSVIE8LZ7ySb89I83","overline-two":"_8ooMcBUKB5yKjWgWvbmn","overline-three":"CySV0rXEo2VhmvrH0nGe",strong:"UydEnv8nCgsy1HD5zs3A","extra-strong":"zVyLzpgeTbgZR7iL7W3e",em:"iy9JXp90GbB2a3R6KioK",figcaption:"D9nU76XUYzpmxX_BA_oI"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/javalab/components/javalab-dropdown.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.Vz8H_N5muHGjHUl__P_M{padding:5px 0;position:absolute;z-index:1000;background-color:#fff;border:1px solid #5b6770;border-radius:4px;display:flex;flex-direction:column}.yTNOun7hU5UUUvgGDmGA{padding:5px 12px;color:#4d575f;font-family:"Gotham 4r",sans-serif;font-size:14px;display:block;background-color:#fff;text-decoration:none;line-height:20px;transition:background-color .2s ease-out;border:0;border-radius:0;margin:0;text-align:center;white-space:nowrap}.yTNOun7hU5UUUvgGDmGA:hover{background-color:#e7e8ea;cursor:pointer;box-shadow:none}',"",{version:3,sources:["webpack://./src/javalab/components/javalab-dropdown.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAGA,sBAEE,aAAA,CACA,iBAAA,CAEA,YAAA,CACA,qBCUM,CDTN,wBAAA,CACA,iBAAA,CACA,YAAA,CACA,qBAAA,CAGF,sBAEE,gBAAA,CACA,aCPc,CDQd,kCAAA,CACA,cAAA,CACA,aAAA,CACA,qBCJM,CDKN,oBAAA,CACA,gBAAA,CACA,wCAAA,CACA,QAAA,CACA,eAAA,CACA,QAAA,CACA,iBAAA,CACA,kBAAA,CAEA,4BACE,wBClBY,CDmBZ,cAAA,CACA,eAAA",sourcesContent:['@import "color.scss";\n\n// The placeholder classes (%) allow these to be extended in other modules\n.dropdown,\n%dropdown {\n padding: 5px 0;\n position: absolute;\n // without this, this will be below some content\n z-index: 1000;\n background-color: $white;\n border: 1px solid $charcoal;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.anchor,\n%anchor {\n padding: 5px 12px;\n color: $dark_charcoal;\n font-family: "Gotham 4r", sans-serif;\n font-size: 14px;\n display: block;\n background-color: $white;\n text-decoration: none;\n line-height: 20px;\n transition: background-color 0.2s ease-out;\n border: 0;\n border-radius: 0;\n margin: 0;\n text-align: center;\n white-space: nowrap;\n\n &:hover {\n background-color: $lightest_gray;\n cursor: pointer;\n box-shadow: none;\n }\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={dropdown:"Vz8H_N5muHGjHUl__P_M",anchor:"yTNOun7hU5UUUvgGDmGA"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/javalab/javalab-button.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".ezHAhqmyJcLce2vx14qt{display:flex;flex-direction:column;align-items:center;color:#fff}.uCRnwIJu_fWC2H2cc7Yj{flex-direction:row}.ezHAhqmyJcLce2vx14qt.d1Wy7MxE0EAdq9K7aPXo{background-color:#949ca2;border-color:#949ca2;cursor:default}.JtQOWgHpQIBzPaA4UWhC{padding-left:8px}.hzVb98h5P6g38dQyCmWD{padding-top:5px}","",{version:3,sources:["webpack://./src/javalab/javalab-button.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAEA,sBACE,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,UCaM,CDXN,sBACE,kBAAA,CAGF,2CACE,wBCCS,CAAA,oBAAA,CDCT,cAAA,CAIJ,sBACE,gBAAA,CAGF,sBACE,eAAA",sourcesContent:['@import "color.scss";\n\n.button {\n display: flex;\n flex-direction: column;\n align-items: center;\n color: $white;\n\n &Horizontal {\n flex-direction: row;\n }\n\n &.disabled {\n background-color: $light_gray;\n border-color: $light_gray;\n cursor: default;\n }\n}\n\n.horizontalPadding {\n padding-left: 8px;\n}\n\n.verticalPadding {\n padding-top: 5px;\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={button:"ezHAhqmyJcLce2vx14qt",buttonHorizontal:"uCRnwIJu_fWC2H2cc7Yj",disabled:"d1Wy7MxE0EAdq9K7aPXo",horizontalPadding:"JtQOWgHpQIBzPaA4UWhC",verticalPadding:"hzVb98h5P6g38dQyCmWD"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/lib/tools/jsdebugger/js-debugger.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".lN4X4rnTj57cMaANeZIZ{position:absolute;top:13px;left:0;right:0;text-align:center;line-height:30px}.w6_aIYF2xuU9zccVUoWw{padding:0}.UYlyAKMlB80hkQSGTm23{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.YB2AI46E448lStS32gxR{position:absolute;top:0;left:8px;margin:0;line-height:30px;font-size:18px}.YB2AI46E448lStS32gxR :hover{cursor:pointer}.dr_qkxOnwwuQbmaFlEQT{position:absolute;top:0;right:6px;width:18px;margin:0;line-height:30px;font-size:18px}.dr_qkxOnwwuQbmaFlEQT:hover{cursor:pointer}.uIR8Prri2jG7OlQo8Vxi{display:none}.tdh8l2x44EP1ZM6L8_h4{width:201px;float:right;border-left:1px solid gray}._N1RiGd5nQTj1IADXKTo{border-left:none;text-align:right;margin-right:30px}.A4pHty6twz2hVf4_2rxl{margin-left:5px;margin-right:5px}.rqfCVLLAnkf3NnpLz5FP{margin-left:45px;margin-right:5px}.AC6jthEg1AfsU4eYwcnb{display:initial}.o74bmxU9f7EtKlE1JK9W{padding:0;background-color:rgba(0,0,0,0);border:none;color:#fff}.o74bmxU9f7EtKlE1JK9W:hover{color:#d4d5d7;box-shadow:none}.DVJLyoONrSeRIf2K_Qho{color:#fff}.DVJLyoONrSeRIf2K_Qho:hover{color:#d4d5d7}","",{version:3,sources:["webpack://./src/lib/tools/jsdebugger/js-debugger.module.scss","webpack://./../shared/css/style-constants.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAGA,sBACE,iBAAA,CACA,QCEiB,CDDjB,MAAA,CACA,OAAA,CACA,iBAAA,CACA,gBAAA,CAGF,sBACE,SAAA,CAGF,sBACE,qBAAA,CACA,wBAAA,CACA,oBAAA,CACA,gBAAA,CAGF,sBACE,iBAAA,CACA,KAAA,CACA,QAAA,CACA,QAAA,CACA,gBCxByB,CDyBzB,cAAA,CACA,6BACE,cAAA,CAIJ,sBACE,iBAAA,CACA,KAAA,CACA,SAAA,CACA,UAAA,CACA,QAAA,CACA,gBCrCyB,CDsCzB,cAAA,CACA,4BACE,cAAA,CAIJ,sBACE,YAAA,CAMF,sBACE,WAAA,CACA,WAAA,CACA,0BAAA,CAGF,sBACE,gBAAA,CACA,gBAAA,CACA,iBAAA,CAGF,sBACE,eAAA,CACA,gBAAA,CAGF,sBACE,gBAAA,CACA,gBAAA,CAGF,sBACE,eAAA,CAGF,sBACE,SAAA,CACA,8BAAA,CACA,WAAA,CACA,UElEM,CFoEN,4BACE,aEgFa,CF/Eb,eAAA,CAGF,sBACE,UEwEY,CFtEZ,4BACE,aEwEW",sourcesContent:['@use "color.scss";\n@use "style-constants.scss";\n\n.debugAreaHeader {\n position: absolute;\n top: style-constants.$resize-bar-width;\n left: 0;\n right: 0;\n text-align: center;\n line-height: 30px;\n}\n\n.noPadding {\n padding: 0;\n}\n\n.noUserSelect {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.showHideIcon {\n position: absolute;\n top: 0;\n left: 8px;\n margin: 0;\n line-height: style-constants.$workspace-headers-height;\n font-size: 18px;\n :hover {\n cursor: pointer;\n }\n}\n\n.showDebugWatchIcon {\n position: absolute;\n top: 0;\n right: 6px;\n width: 18px;\n margin: 0;\n line-height: style-constants.$workspace-headers-height;\n font-size: 18px;\n &:hover {\n cursor: pointer;\n }\n}\n\n.hidden {\n display: none;\n}\n\n$debug-watch-max-column-width: 200px;\n$debug-header-border-width: 1px;\n\n.debugWatchHeader {\n width: $debug-watch-max-column-width + $debug-header-border-width;\n float: right;\n border-left: $debug-header-border-width solid gray;\n}\n\n.watchersHidden {\n border-left: none;\n text-align: right;\n margin-right: 30px;\n}\n\n.sliderDebug {\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.slider {\n margin-left: 45px;\n margin-right: 5px;\n}\n\n.displayInitial {\n display: initial;\n}\n\n.chevronButton {\n padding: 0;\n background-color: transparent;\n border: none;\n color: color.$white;\n\n &:hover {\n color: color.$neutral_dark20;\n box-shadow: none;\n }\n\n &Unfocused {\n color: color.$neutral_white;\n\n &:hover {\n color: color.$neutral_dark20;\n }\n }\n}\n',"// Common styles and measures accessible from all stylesheets\n\n// Height of workspace headers (above actual blockly/droplet space, beneath\n// site header)\n$workspace-headers-height: 30px;\n\n// Width of horizontal and vertical resize bars\n$resize-bar-width: 13px;\n\n// Opacity of elements that are dragged out to be deleted\n$delete-opacity: 0.5;\n\n// Width of pegasus content as of 2017 redesign\n$content-width: 970px;\n","// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={debugAreaHeader:"lN4X4rnTj57cMaANeZIZ",noPadding:"w6_aIYF2xuU9zccVUoWw",noUserSelect:"UYlyAKMlB80hkQSGTm23",showHideIcon:"YB2AI46E448lStS32gxR",showDebugWatchIcon:"dr_qkxOnwwuQbmaFlEQT",hidden:"uIR8Prri2jG7OlQo8Vxi",debugWatchHeader:"tdh8l2x44EP1ZM6L8_h4",watchersHidden:"_N1RiGd5nQTj1IADXKTo",sliderDebug:"A4pHty6twz2hVf4_2rxl",slider:"rqfCVLLAnkf3NnpLz5FP",displayInitial:"AC6jthEg1AfsU4eYwcnb",chevronButton:"o74bmxU9f7EtKlE1JK9W",chevronButtonUnfocused:"DVJLyoONrSeRIf2K_Qho"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/lib/ui/settings-cog.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".VVG6EAovSM6SB3sZxyQg{margin:0 10px;padding:0;border-width:0 1px;border-color:rgba(0,0,0,0);height:100%;background-color:rgba(0,0,0,0);color:#fff;display:flex;align-items:center}.qpV838fWa3qqMfzLy3TT{background-color:rgba(0,0,0,0);color:#fff}.VVG6EAovSM6SB3sZxyQg:hover{box-shadow:none;color:#d4d5d7}","",{version:3,sources:["webpack://./src/lib/ui/settings-cog.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAEA,sBACE,aAAA,CACA,SAAA,CACA,kBAAA,CACA,0BAAA,CACA,WAAA,CACA,8BAAA,CACA,UC4Jc,CD3Jd,YAAA,CACA,kBAAA,CAEA,sBACE,8BAAA,CACA,UCsJY,CDnJd,4BACE,eAAA,CACA,aCoJa",sourcesContent:['@import "color.scss";\n\n.settingsButton {\n margin: 0 10px;\n padding: 0;\n border-width: 0 1px;\n border-color: transparent;\n height: 100%;\n background-color: transparent;\n color: $neutral_white;\n display: flex;\n align-items: center;\n\n &Running {\n background-color: transparent;\n color: $neutral_white;\n }\n\n &:hover {\n box-shadow: none;\n color: $neutral_dark20;\n }\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={settingsButton:"VVG6EAovSM6SB3sZxyQg",settingsButtonRunning:"qpV838fWa3qqMfzLy3TT"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/storage/dataBrowser/data-styles.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'.uYItL77TWcU0wtVbhTfw{height:45px}.hzi4zAQLtOeALKbcN1HF{padding:10px;border:1px solid gray;font-size:14px;max-width:350px;overflow:hidden}.hzi4zAQLtOeALKbcN1HF.pEv7nG0FjvBfyWDiVoGw{background-color:#d9f3f5}.hzi4zAQLtOeALKbcN1HF.QFx0DJcXsNZPlS6OSqkP{background-color:#d9f3f5;width:142px}.QJTdjytrQErkwBhyZuMb{background-color:#00adbc;border:1px solid gray;max-width:350px;padding:6px 10px;white-space:nowrap}.aL4qZazwqcLIPHl9fJFo{color:#7665a0;cursor:pointer;font-family:"Gotham 7r",sans-serif}.vhcuGCSnanVtqh5MHMXu{display:inline-block;font-size:14px;line-height:20px;margin:0;padding:4px 12px;text-align:center;vertical-align:middle}.zehBIP29hpzIXp82knQ8{background-color:#fff;color:#000}.amzC_L72ues1STeirgwv{margin-right:10px;min-width:60px}.ymtkCADAvOyMnTc9TWB0{background-color:#d9534f;color:#fff}.Y34eEaDAmZWf41x33l5I{background-color:#337ab7;color:#fff}.aN85sU65aHSMhw7cqksL{margin-right:10px;min-width:60px}.k6pRSfcUhlMOgNeyKeSi{margin-left:5px;background-color:#f2f2f2}.IjgyOPtpufaXlzS3sObU{width:calc(100% - 14px);height:20px;border:1px solid gray;border-radius:5px;padding:4px 6px}',"",{version:3,sources:["webpack://./src/storage/dataBrowser/data-styles.module.scss","webpack://./../shared/css/color.scss"],names:[],mappings:"AAWA,sBACE,WANW,CASb,sBACE,YATa,CAUb,qBAAA,CACA,cAAA,CACA,eAVe,CAWf,eAAA,CACA,2CACE,wBCMY,CDJd,2CACE,wBCGY,CDFZ,WAlBqB,CAsBzB,sBACE,wBCRK,CDSL,qBAAA,CACA,eAxBe,CAyBf,gBAAA,CACA,kBAAA,CAGF,sBACE,aCTO,CDUP,cAAA,CACA,kCAAA,CAGF,sBACE,oBAAA,CACA,cAAA,CACA,gBAAA,CACA,QAAA,CACA,gBAAA,CACA,iBAAA,CACA,qBAAA,CAEA,sBACE,qBAAA,CACA,UAAA,CAEA,sBACE,iBAAA,CACA,cAAA,CAIJ,sBACE,wBC6CmB,CD5CnB,UAAA,CAGF,sBACE,wBCuCoB,CDtCpB,UAAA,CAEA,sBACE,iBAAA,CACA,cAAA,CAIJ,sBACE,eAAA,CACA,wBC/Dc,CDmElB,sBACE,uBAAA,CACA,WAAA,CACA,qBAAA,CACA,iBAAA,CACA,eAAA",sourcesContent:['/**\n * @file Styles shared by various react components in the applab data browser.\n */\n\n@import "color.scss";\n\n$row-height: 45px;\n$cell-padding: 10px;\n$edit-button-cell-width: 142px;\n$max-cell-width: 350px;\n\n.row {\n height: $row-height;\n}\n\n.cell {\n padding: $cell-padding;\n border: 1px solid gray;\n font-size: 14px;\n max-width: $max-cell-width;\n overflow: hidden;\n &.addButton {\n background-color: $lightest_teal;\n }\n &.editButton {\n background-color: $lightest_teal;\n width: $edit-button-cell-width;\n }\n}\n\n.headerCell {\n background-color: $teal;\n border: 1px solid gray;\n max-width: $max-cell-width;\n padding: 6px 10px;\n white-space: nowrap;\n}\n\n.link {\n color: $purple;\n cursor: pointer;\n font-family: "Gotham 7r", sans-serif;\n}\n\n.button {\n display: inline-block;\n font-size: 14px;\n line-height: 20px;\n margin: 0;\n padding: 4px 12px;\n text-align: center;\n vertical-align: middle;\n\n &White {\n background-color: white;\n color: black;\n\n &Edit {\n margin-right: 10px;\n min-width: 60px;\n }\n }\n\n &Red {\n background-color: $bootstrap_button_red;\n color: white;\n }\n\n &Blue {\n background-color: $bootstrap_button_blue;\n color: white;\n\n &Save {\n margin-right: 10px;\n min-width: 60px;\n }\n }\n\n &Gray {\n margin-left: 5px;\n background-color: $background_gray;\n }\n}\n\n.input {\n width: calc(100% - 14px);\n height: 20px;\n border: 1px solid gray;\n border-radius: 5px;\n padding: 4px 6px;\n}\n',"// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={row:"uYItL77TWcU0wtVbhTfw",cell:"hzi4zAQLtOeALKbcN1HF",addButton:"pEv7nG0FjvBfyWDiVoGw",editButton:"QFx0DJcXsNZPlS6OSqkP",headerCell:"QJTdjytrQErkwBhyZuMb",link:"aL4qZazwqcLIPHl9fJFo",button:"vhcuGCSnanVtqh5MHMXu",buttonWhite:"zehBIP29hpzIXp82knQ8",buttonWhiteEdit:"amzC_L72ues1STeirgwv",buttonRed:"ymtkCADAvOyMnTc9TWB0",buttonBlue:"Y34eEaDAmZWf41x33l5I",buttonBlueSave:"aN85sU65aHSMhw7cqksL",buttonGray:"k6pRSfcUhlMOgNeyKeSi",input:"IjgyOPtpufaXlzS3sObU"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/templates/accessible-dialogue.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".BX09vR0Q4ofs_78i8Yr8{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.6;z-index:1000}.Tcd_VomjDIrEcIWb2WdZ{position:fixed;top:10%;left:50%;transform:translateX(-50%);z-index:1050;width:70%;max-width:600px;background-color:#fff;border-radius:4px;padding:1rem;overflow:auto}","",{version:3,sources:["webpack://./src/templates/accessible-dialogue.module.scss"],names:[],mappings:"AAAA,sBACE,cAAA,CACA,KAAA,CACA,OAAA,CACA,QAAA,CACA,MAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CAGF,sBACE,cAAA,CACA,OAAA,CACA,QAAA,CACA,0BAAA,CACA,YAAA,CACA,SAAA,CACA,eAAA,CACA,qBAAA,CACA,iBAAA,CACA,YAAA,CACA,aAAA",sourcesContent:[".modalBackdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: #000;\n opacity: 0.6;\n z-index: 1000;\n};\n\n.modal {\n position: fixed;\n top: 10%;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1050;\n width: 70%;\n max-width: 600px;\n background-color: #fff;\n border-radius: 4px;\n padding: 1rem;\n overflow: auto;\n};\n"],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={modalBackdrop:"BX09vR0Q4ofs_78i8Yr8",modal:"Tcd_VomjDIrEcIWb2WdZ"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/templates/button.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,'div.RgEAWGSURVHXgsym55ZC,button.RgEAWGSURVHXgsym55ZC,a.RgEAWGSURVHXgsym55ZC,a:link.RgEAWGSURVHXgsym55ZC,a:visited.RgEAWGSURVHXgsym55ZC,.header a:link.RgEAWGSURVHXgsym55ZC,.header a:visited.RgEAWGSURVHXgsym55ZC{display:inline-block;font-size:12px;font-family:"Gotham 4r",sans-serif;border:1px solid #bbb;border-radius:3px;text-decoration:none;box-sizing:border-box;overflow:hidden;white-space:nowrap}div.RgEAWGSURVHXgsym55ZC:hover,button.RgEAWGSURVHXgsym55ZC:hover,a.RgEAWGSURVHXgsym55ZC:hover,a:link.RgEAWGSURVHXgsym55ZC:hover,a:visited.RgEAWGSURVHXgsym55ZC:hover,.header a:link.RgEAWGSURVHXgsym55ZC:hover,.header a:visited.RgEAWGSURVHXgsym55ZC:hover{background-color:#fff;cursor:pointer}div.RgEAWGSURVHXgsym55ZC:disabled,div.RgEAWGSURVHXgsym55ZC[disabled],button.RgEAWGSURVHXgsym55ZC:disabled,button.RgEAWGSURVHXgsym55ZC[disabled],a.RgEAWGSURVHXgsym55ZC:disabled,a.RgEAWGSURVHXgsym55ZC[disabled],a:link.RgEAWGSURVHXgsym55ZC:disabled,a:link.RgEAWGSURVHXgsym55ZC[disabled],a:visited.RgEAWGSURVHXgsym55ZC:disabled,a:visited.RgEAWGSURVHXgsym55ZC[disabled],.header a:link.RgEAWGSURVHXgsym55ZC:disabled,.header a:link.RgEAWGSURVHXgsym55ZC[disabled],.header a:visited.RgEAWGSURVHXgsym55ZC:disabled,.header a:visited.RgEAWGSURVHXgsym55ZC[disabled]{cursor:auto}div .WXbyAByPFDIxOlQjhjRA,button .WXbyAByPFDIxOlQjhjRA,a .WXbyAByPFDIxOlQjhjRA,a:link .WXbyAByPFDIxOlQjhjRA,a:visited .WXbyAByPFDIxOlQjhjRA,.header a:link .WXbyAByPFDIxOlQjhjRA,.header a:visited .WXbyAByPFDIxOlQjhjRA{margin-right:2.5px;margin-left:2.5px}div .C9TrlUErKq7GDcQxySiL,button .C9TrlUErKq7GDcQxySiL,a .C9TrlUErKq7GDcQxySiL,a:link .C9TrlUErKq7GDcQxySiL,a:visited .C9TrlUErKq7GDcQxySiL,.header a:link .C9TrlUErKq7GDcQxySiL,.header a:visited .C9TrlUErKq7GDcQxySiL{margin-right:2.5px;margin-left:2.5px}div.UXXxyfgzjsl53vaXMLzA,button.UXXxyfgzjsl53vaXMLzA,a.UXXxyfgzjsl53vaXMLzA,a:link.UXXxyfgzjsl53vaXMLzA,a:visited.UXXxyfgzjsl53vaXMLzA,.header a:link.UXXxyfgzjsl53vaXMLzA,.header a:visited.UXXxyfgzjsl53vaXMLzA{color:#fff;background-color:#ffa400;font-weight:bold;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.63)}div.UXXxyfgzjsl53vaXMLzA:hover,button.UXXxyfgzjsl53vaXMLzA:hover,a.UXXxyfgzjsl53vaXMLzA:hover,a:link.UXXxyfgzjsl53vaXMLzA:hover,a:visited.UXXxyfgzjsl53vaXMLzA:hover,.header a:link.UXXxyfgzjsl53vaXMLzA:hover,.header a:visited.UXXxyfgzjsl53vaXMLzA:hover{color:#ffa400;border-color:#ffa400}div.UXXxyfgzjsl53vaXMLzA:disabled,div.UXXxyfgzjsl53vaXMLzA[disabled],button.UXXxyfgzjsl53vaXMLzA:disabled,button.UXXxyfgzjsl53vaXMLzA[disabled],a.UXXxyfgzjsl53vaXMLzA:disabled,a.UXXxyfgzjsl53vaXMLzA[disabled],a:link.UXXxyfgzjsl53vaXMLzA:disabled,a:link.UXXxyfgzjsl53vaXMLzA[disabled],a:visited.UXXxyfgzjsl53vaXMLzA:disabled,a:visited.UXXxyfgzjsl53vaXMLzA[disabled],.header a:link.UXXxyfgzjsl53vaXMLzA:disabled,.header a:link.UXXxyfgzjsl53vaXMLzA[disabled],.header a:visited.UXXxyfgzjsl53vaXMLzA:disabled,.header a:visited.UXXxyfgzjsl53vaXMLzA[disabled]{background-color:#ffd27f;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.Fw6lzpqy3BhOLIEOJd4Q,button.Fw6lzpqy3BhOLIEOJd4Q,a.Fw6lzpqy3BhOLIEOJd4Q,a:link.Fw6lzpqy3BhOLIEOJd4Q,a:visited.Fw6lzpqy3BhOLIEOJd4Q,.header a:link.Fw6lzpqy3BhOLIEOJd4Q,.header a:visited.Fw6lzpqy3BhOLIEOJd4Q{color:#5b6770;background-color:#e7e8ea;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.73)}div.Fw6lzpqy3BhOLIEOJd4Q:disabled,div.Fw6lzpqy3BhOLIEOJd4Q[disabled],button.Fw6lzpqy3BhOLIEOJd4Q:disabled,button.Fw6lzpqy3BhOLIEOJd4Q[disabled],a.Fw6lzpqy3BhOLIEOJd4Q:disabled,a.Fw6lzpqy3BhOLIEOJd4Q[disabled],a:link.Fw6lzpqy3BhOLIEOJd4Q:disabled,a:link.Fw6lzpqy3BhOLIEOJd4Q[disabled],a:visited.Fw6lzpqy3BhOLIEOJd4Q:disabled,a:visited.Fw6lzpqy3BhOLIEOJd4Q[disabled],.header a:link.Fw6lzpqy3BhOLIEOJd4Q:disabled,.header a:link.Fw6lzpqy3BhOLIEOJd4Q[disabled],.header a:visited.Fw6lzpqy3BhOLIEOJd4Q:disabled,.header a:visited.Fw6lzpqy3BhOLIEOJd4Q[disabled]{background-color:#c6cacd;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.SogDtJ8Sr4CHsI4oRqoJ,button.SogDtJ8Sr4CHsI4oRqoJ,a.SogDtJ8Sr4CHsI4oRqoJ,a:link.SogDtJ8Sr4CHsI4oRqoJ,a:visited.SogDtJ8Sr4CHsI4oRqoJ,.header a:link.SogDtJ8Sr4CHsI4oRqoJ,.header a:visited.SogDtJ8Sr4CHsI4oRqoJ{color:#fff;background-color:#0094ca;font-weight:bold;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.4)}div.SogDtJ8Sr4CHsI4oRqoJ:hover,button.SogDtJ8Sr4CHsI4oRqoJ:hover,a.SogDtJ8Sr4CHsI4oRqoJ:hover,a:link.SogDtJ8Sr4CHsI4oRqoJ:hover,a:visited.SogDtJ8Sr4CHsI4oRqoJ:hover,.header a:link.SogDtJ8Sr4CHsI4oRqoJ:hover,.header a:visited.SogDtJ8Sr4CHsI4oRqoJ:hover{box-shadow:none;color:#0094ca;border-color:#0094ca;background-color:#d9eff7}div.SogDtJ8Sr4CHsI4oRqoJ:disabled,div.SogDtJ8Sr4CHsI4oRqoJ[disabled],button.SogDtJ8Sr4CHsI4oRqoJ:disabled,button.SogDtJ8Sr4CHsI4oRqoJ[disabled],a.SogDtJ8Sr4CHsI4oRqoJ:disabled,a.SogDtJ8Sr4CHsI4oRqoJ[disabled],a:link.SogDtJ8Sr4CHsI4oRqoJ:disabled,a:link.SogDtJ8Sr4CHsI4oRqoJ[disabled],a:visited.SogDtJ8Sr4CHsI4oRqoJ:disabled,a:visited.SogDtJ8Sr4CHsI4oRqoJ[disabled],.header a:link.SogDtJ8Sr4CHsI4oRqoJ:disabled,.header a:link.SogDtJ8Sr4CHsI4oRqoJ[disabled],.header a:visited.SogDtJ8Sr4CHsI4oRqoJ:disabled,.header a:visited.SogDtJ8Sr4CHsI4oRqoJ[disabled]{color:#a6daed;background-color:#d9eff7;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.thn9Ds5ihZL991wq4hjF,button.thn9Ds5ihZL991wq4hjF,a.thn9Ds5ihZL991wq4hjF,a:link.thn9Ds5ihZL991wq4hjF,a:visited.thn9Ds5ihZL991wq4hjF,.header a:link.thn9Ds5ihZL991wq4hjF,.header a:visited.thn9Ds5ihZL991wq4hjF{color:#fff;background-color:#00adbc;font-weight:bold;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.4)}div.thn9Ds5ihZL991wq4hjF:hover,button.thn9Ds5ihZL991wq4hjF:hover,a.thn9Ds5ihZL991wq4hjF:hover,a:link.thn9Ds5ihZL991wq4hjF:hover,a:visited.thn9Ds5ihZL991wq4hjF:hover,.header a:link.thn9Ds5ihZL991wq4hjF:hover,.header a:visited.thn9Ds5ihZL991wq4hjF:hover{box-shadow:none;color:#00adbc;border-color:#00adbc;background-color:#d9f3f5}div.thn9Ds5ihZL991wq4hjF:disabled,div.thn9Ds5ihZL991wq4hjF[disabled],button.thn9Ds5ihZL991wq4hjF:disabled,button.thn9Ds5ihZL991wq4hjF[disabled],a.thn9Ds5ihZL991wq4hjF:disabled,a.thn9Ds5ihZL991wq4hjF[disabled],a:link.thn9Ds5ihZL991wq4hjF:disabled,a:link.thn9Ds5ihZL991wq4hjF[disabled],a:visited.thn9Ds5ihZL991wq4hjF:disabled,a:visited.thn9Ds5ihZL991wq4hjF[disabled],.header a:link.thn9Ds5ihZL991wq4hjF:disabled,.header a:link.thn9Ds5ihZL991wq4hjF[disabled],.header a:visited.thn9Ds5ihZL991wq4hjF:disabled,.header a:visited.thn9Ds5ihZL991wq4hjF[disabled]{color:#a6daed;background-color:#d9eff7;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.SfFcj2dNRCSSkdsG0JWm,button.SfFcj2dNRCSSkdsG0JWm,a.SfFcj2dNRCSSkdsG0JWm,a:link.SfFcj2dNRCSSkdsG0JWm,a:visited.SfFcj2dNRCSSkdsG0JWm,.header a:link.SfFcj2dNRCSSkdsG0JWm,.header a:visited.SfFcj2dNRCSSkdsG0JWm{color:#5b6770;background-color:#fff;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.06)}div.SfFcj2dNRCSSkdsG0JWm:hover,button.SfFcj2dNRCSSkdsG0JWm:hover,a.SfFcj2dNRCSSkdsG0JWm:hover,a:link.SfFcj2dNRCSSkdsG0JWm:hover,a:visited.SfFcj2dNRCSSkdsG0JWm:hover,.header a:link.SfFcj2dNRCSSkdsG0JWm:hover,.header a:visited.SfFcj2dNRCSSkdsG0JWm:hover{box-shadow:none;background-color:#e7e8ea}div.SfFcj2dNRCSSkdsG0JWm:disabled,div.SfFcj2dNRCSSkdsG0JWm[disabled],button.SfFcj2dNRCSSkdsG0JWm:disabled,button.SfFcj2dNRCSSkdsG0JWm[disabled],a.SfFcj2dNRCSSkdsG0JWm:disabled,a.SfFcj2dNRCSSkdsG0JWm[disabled],a:link.SfFcj2dNRCSSkdsG0JWm:disabled,a:link.SfFcj2dNRCSSkdsG0JWm[disabled],a:visited.SfFcj2dNRCSSkdsG0JWm:disabled,a:visited.SfFcj2dNRCSSkdsG0JWm[disabled],.header a:link.SfFcj2dNRCSSkdsG0JWm:disabled,.header a:link.SfFcj2dNRCSSkdsG0JWm[disabled],.header a:visited.SfFcj2dNRCSSkdsG0JWm:disabled,.header a:visited.SfFcj2dNRCSSkdsG0JWm[disabled]{background-color:#e7e8ea;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.oroutysfFuyrHT44d9O6,button.oroutysfFuyrHT44d9O6,a.oroutysfFuyrHT44d9O6,a:link.oroutysfFuyrHT44d9O6,a:visited.oroutysfFuyrHT44d9O6,.header a:link.oroutysfFuyrHT44d9O6,.header a:visited.oroutysfFuyrHT44d9O6{color:#fff;background-color:#c00;font-weight:bold;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.4)}div.oroutysfFuyrHT44d9O6:hover,button.oroutysfFuyrHT44d9O6:hover,a.oroutysfFuyrHT44d9O6:hover,a:link.oroutysfFuyrHT44d9O6:hover,a:visited.oroutysfFuyrHT44d9O6:hover,.header a:link.oroutysfFuyrHT44d9O6:hover,.header a:visited.oroutysfFuyrHT44d9O6:hover{box-shadow:none;color:#c00;border-color:#c00}div.oroutysfFuyrHT44d9O6:disabled,div.oroutysfFuyrHT44d9O6[disabled],button.oroutysfFuyrHT44d9O6:disabled,button.oroutysfFuyrHT44d9O6[disabled],a.oroutysfFuyrHT44d9O6:disabled,a.oroutysfFuyrHT44d9O6[disabled],a:link.oroutysfFuyrHT44d9O6:disabled,a:link.oroutysfFuyrHT44d9O6[disabled],a:visited.oroutysfFuyrHT44d9O6:disabled,a:visited.oroutysfFuyrHT44d9O6[disabled],.header a:link.oroutysfFuyrHT44d9O6:disabled,.header a:link.oroutysfFuyrHT44d9O6[disabled],.header a:visited.oroutysfFuyrHT44d9O6:disabled,.header a:visited.oroutysfFuyrHT44d9O6[disabled]{background-color:#fcc;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.CleFRArPgxlGFWnGt9jX,button.CleFRArPgxlGFWnGt9jX,a.CleFRArPgxlGFWnGt9jX,a:link.CleFRArPgxlGFWnGt9jX,a:visited.CleFRArPgxlGFWnGt9jX,.header a:link.CleFRArPgxlGFWnGt9jX,.header a:visited.CleFRArPgxlGFWnGt9jX{color:#fff;background-color:#7665a0;font-weight:bold;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.4)}div.CleFRArPgxlGFWnGt9jX:hover,button.CleFRArPgxlGFWnGt9jX:hover,a.CleFRArPgxlGFWnGt9jX:hover,a:link.CleFRArPgxlGFWnGt9jX:hover,a:visited.CleFRArPgxlGFWnGt9jX:hover,.header a:link.CleFRArPgxlGFWnGt9jX:hover,.header a:visited.CleFRArPgxlGFWnGt9jX:hover{box-shadow:none;color:#7665a0;border-color:#7665a0;background-color:#ebe8f1}div.CleFRArPgxlGFWnGt9jX:disabled,div.CleFRArPgxlGFWnGt9jX[disabled],button.CleFRArPgxlGFWnGt9jX:disabled,button.CleFRArPgxlGFWnGt9jX[disabled],a.CleFRArPgxlGFWnGt9jX:disabled,a.CleFRArPgxlGFWnGt9jX[disabled],a:link.CleFRArPgxlGFWnGt9jX:disabled,a:link.CleFRArPgxlGFWnGt9jX[disabled],a:visited.CleFRArPgxlGFWnGt9jX:disabled,a:visited.CleFRArPgxlGFWnGt9jX[disabled],.header a:link.CleFRArPgxlGFWnGt9jX:disabled,.header a:link.CleFRArPgxlGFWnGt9jX[disabled],.header a:visited.CleFRArPgxlGFWnGt9jX:disabled,.header a:visited.CleFRArPgxlGFWnGt9jX[disabled]{color:#cfc9de;background-color:#ebe8f1;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.y1VYRnECR1w8hEpep3vF,button.y1VYRnECR1w8hEpep3vF,a.y1VYRnECR1w8hEpep3vF,a:link.y1VYRnECR1w8hEpep3vF,a:visited.y1VYRnECR1w8hEpep3vF,.header a:link.y1VYRnECR1w8hEpep3vF,.header a:visited.y1VYRnECR1w8hEpep3vF{color:#fff;background-color:#0ebe0e;font-weight:bold;box-shadow:inset 0 2px 0 0 rgba(255,255,255,.4)}div.y1VYRnECR1w8hEpep3vF:hover,button.y1VYRnECR1w8hEpep3vF:hover,a.y1VYRnECR1w8hEpep3vF:hover,a:link.y1VYRnECR1w8hEpep3vF:hover,a:visited.y1VYRnECR1w8hEpep3vF:hover,.header a:link.y1VYRnECR1w8hEpep3vF:hover,.header a:visited.y1VYRnECR1w8hEpep3vF:hover{box-shadow:none;color:#5b6770;border-color:#e7e8ea;background-color:#e7e8ea}div.y1VYRnECR1w8hEpep3vF:disabled,div.y1VYRnECR1w8hEpep3vF[disabled],button.y1VYRnECR1w8hEpep3vF:disabled,button.y1VYRnECR1w8hEpep3vF[disabled],a.y1VYRnECR1w8hEpep3vF:disabled,a.y1VYRnECR1w8hEpep3vF[disabled],a:link.y1VYRnECR1w8hEpep3vF:disabled,a:link.y1VYRnECR1w8hEpep3vF[disabled],a:visited.y1VYRnECR1w8hEpep3vF:disabled,a:visited.y1VYRnECR1w8hEpep3vF[disabled],.header a:link.y1VYRnECR1w8hEpep3vF:disabled,.header a:link.y1VYRnECR1w8hEpep3vF[disabled],.header a:visited.y1VYRnECR1w8hEpep3vF:disabled,.header a:visited.y1VYRnECR1w8hEpep3vF[disabled]{background-color:#e7e8ea;box-shadow:inset 0 2px 0 0 rgba(0,0,0,.1)}div.qW47iNnhv1vfNqsF8sJq,button.qW47iNnhv1vfNqsF8sJq,a.qW47iNnhv1vfNqsF8sJq,a:link.qW47iNnhv1vfNqsF8sJq,a:visited.qW47iNnhv1vfNqsF8sJq,.header a:link.qW47iNnhv1vfNqsF8sJq,.header a:visited.qW47iNnhv1vfNqsF8sJq{color:#fff;background-color:#9660bf;border-color:#9660bf;border-radius:4px;border-width:1px;line-height:30px}div.qW47iNnhv1vfNqsF8sJq:hover,button.qW47iNnhv1vfNqsF8sJq:hover,a.qW47iNnhv1vfNqsF8sJq:hover,a:link.qW47iNnhv1vfNqsF8sJq:hover,a:visited.qW47iNnhv1vfNqsF8sJq:hover,.header a:link.qW47iNnhv1vfNqsF8sJq:hover,.header a:visited.qW47iNnhv1vfNqsF8sJq:hover{box-shadow:none;color:#fff;border-color:#6f488e;background-color:#6f488e}div.qW47iNnhv1vfNqsF8sJq:focus-visible,button.qW47iNnhv1vfNqsF8sJq:focus-visible,a.qW47iNnhv1vfNqsF8sJq:focus-visible,a:link.qW47iNnhv1vfNqsF8sJq:focus-visible,a:visited.qW47iNnhv1vfNqsF8sJq:focus-visible,.header a:link.qW47iNnhv1vfNqsF8sJq:focus-visible,.header a:visited.qW47iNnhv1vfNqsF8sJq:focus-visible{outline:#009eb0 solid 2px;outline-offset:2px}div.qW47iNnhv1vfNqsF8sJq:disabled,div.qW47iNnhv1vfNqsF8sJq[disabled],button.qW47iNnhv1vfNqsF8sJq:disabled,button.qW47iNnhv1vfNqsF8sJq[disabled],a.qW47iNnhv1vfNqsF8sJq:disabled,a.qW47iNnhv1vfNqsF8sJq[disabled],a:link.qW47iNnhv1vfNqsF8sJq:disabled,a:link.qW47iNnhv1vfNqsF8sJq[disabled],a:visited.qW47iNnhv1vfNqsF8sJq:disabled,a:visited.qW47iNnhv1vfNqsF8sJq[disabled],.header a:link.qW47iNnhv1vfNqsF8sJq:disabled,.header a:link.qW47iNnhv1vfNqsF8sJq[disabled],.header a:visited.qW47iNnhv1vfNqsF8sJq:disabled,.header a:visited.qW47iNnhv1vfNqsF8sJq[disabled]{background-color:#e0d1ec;border:none}div.HQMxS6q4VCbKRv45lt8t,button.HQMxS6q4VCbKRv45lt8t,a.HQMxS6q4VCbKRv45lt8t,a:link.HQMxS6q4VCbKRv45lt8t,a:visited.HQMxS6q4VCbKRv45lt8t,.header a:link.HQMxS6q4VCbKRv45lt8t,.header a:visited.HQMxS6q4VCbKRv45lt8t{color:#292f36;background-color:#fff;border:1px solid #292f36;border-radius:4px;line-height:30px}div.HQMxS6q4VCbKRv45lt8t:hover,button.HQMxS6q4VCbKRv45lt8t:hover,a.HQMxS6q4VCbKRv45lt8t:hover,a:link.HQMxS6q4VCbKRv45lt8t:hover,a:visited.HQMxS6q4VCbKRv45lt8t:hover,.header a:link.HQMxS6q4VCbKRv45lt8t:hover,.header a:visited.HQMxS6q4VCbKRv45lt8t:hover{background-color:#eaebeb}div.HQMxS6q4VCbKRv45lt8t:focus-visible,button.HQMxS6q4VCbKRv45lt8t:focus-visible,a.HQMxS6q4VCbKRv45lt8t:focus-visible,a:link.HQMxS6q4VCbKRv45lt8t:focus-visible,a:visited.HQMxS6q4VCbKRv45lt8t:focus-visible,.header a:link.HQMxS6q4VCbKRv45lt8t:focus-visible,.header a:visited.HQMxS6q4VCbKRv45lt8t:focus-visible{outline:#009eb0 solid 2px;outline-offset:2px}div.HQMxS6q4VCbKRv45lt8t:disabled,button.HQMxS6q4VCbKRv45lt8t:disabled,a.HQMxS6q4VCbKRv45lt8t:disabled,a:link.HQMxS6q4VCbKRv45lt8t:disabled,a:visited.HQMxS6q4VCbKRv45lt8t:disabled,.header a:link.HQMxS6q4VCbKRv45lt8t:disabled,.header a:visited.HQMxS6q4VCbKRv45lt8t:disabled{color:#d4d5d7;border-color:#d4d5d7;background-color:#fff;cursor:not-allowed}div.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,div.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st,button.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,button.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st,a.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,a.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st,a:link.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,a:link.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st,a:visited.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,a:visited.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st,.header a:link.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,.header a:link.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st,.header a:visited.HQMxS6q4VCbKRv45lt8t.SpnpMKQTi1rIE2H6S2st,.header a:visited.qW47iNnhv1vfNqsF8sJq.SpnpMKQTi1rIE2H6S2st{padding-left:16px;padding-right:16px;font-family:"Gotham 5r",sans-serif}div.HQMxS6q4VCbKRv45lt8t:active,div.qW47iNnhv1vfNqsF8sJq:active,button.HQMxS6q4VCbKRv45lt8t:active,button.qW47iNnhv1vfNqsF8sJq:active,a.HQMxS6q4VCbKRv45lt8t:active,a.qW47iNnhv1vfNqsF8sJq:active,a:link.HQMxS6q4VCbKRv45lt8t:active,a:link.qW47iNnhv1vfNqsF8sJq:active,a:visited.HQMxS6q4VCbKRv45lt8t:active,a:visited.qW47iNnhv1vfNqsF8sJq:active,.header a:link.HQMxS6q4VCbKRv45lt8t:active,.header a:link.qW47iNnhv1vfNqsF8sJq:active,.header a:visited.HQMxS6q4VCbKRv45lt8t:active,.header a:visited.qW47iNnhv1vfNqsF8sJq:active{border-width:2px}div.SpnpMKQTi1rIE2H6S2st,button.SpnpMKQTi1rIE2H6S2st,a.SpnpMKQTi1rIE2H6S2st,a:link.SpnpMKQTi1rIE2H6S2st,a:visited.SpnpMKQTi1rIE2H6S2st,.header a:link.SpnpMKQTi1rIE2H6S2st,.header a:visited.SpnpMKQTi1rIE2H6S2st{height:34px;padding:0 24px;line-height:34px}div.RZjpqeKsBXOFJve7iNR5,button.RZjpqeKsBXOFJve7iNR5,a.RZjpqeKsBXOFJve7iNR5,a:link.RZjpqeKsBXOFJve7iNR5,a:visited.RZjpqeKsBXOFJve7iNR5,.header a:link.RZjpqeKsBXOFJve7iNR5,.header a:visited.RZjpqeKsBXOFJve7iNR5{height:40px;padding:0 30px;line-height:40px}div.XtN8qpA6DyEcHb1YIz2d,button.XtN8qpA6DyEcHb1YIz2d,a.XtN8qpA6DyEcHb1YIz2d,a:link.XtN8qpA6DyEcHb1YIz2d,a:visited.XtN8qpA6DyEcHb1YIz2d,.header a:link.XtN8qpA6DyEcHb1YIz2d,.header a:visited.XtN8qpA6DyEcHb1YIz2d{height:40px;padding:0 10px;line-height:40px}div.Yq5AYtW7_as0WLuoLhnb,button.Yq5AYtW7_as0WLuoLhnb,a.Yq5AYtW7_as0WLuoLhnb,a:link.Yq5AYtW7_as0WLuoLhnb,a:visited.Yq5AYtW7_as0WLuoLhnb,.header a:link.Yq5AYtW7_as0WLuoLhnb,.header a:visited.Yq5AYtW7_as0WLuoLhnb{height:20px;padding:0 5px;line-height:20px;position:relative}div.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA,button.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA,a.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA,a:link.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA,a:visited.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA,.header a:link.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA,.header a:visited.Yq5AYtW7_as0WLuoLhnb .WXbyAByPFDIxOlQjhjRA{font-size:12px;top:0}div.pUlkLwlwitRrefPiTBSj,button.pUlkLwlwitRrefPiTBSj,a.pUlkLwlwitRrefPiTBSj,a:link.pUlkLwlwitRrefPiTBSj,a:visited.pUlkLwlwitRrefPiTBSj,.header a:link.pUlkLwlwitRrefPiTBSj,.header a:visited.pUlkLwlwitRrefPiTBSj{line-height:12px}div.JANSAq67ZC5Qgd8W00pI,button.JANSAq67ZC5Qgd8W00pI,a.JANSAq67ZC5Qgd8W00pI,a:link.JANSAq67ZC5Qgd8W00pI,a:visited.JANSAq67ZC5Qgd8W00pI,.header a:link.JANSAq67ZC5Qgd8W00pI,.header a:visited.JANSAq67ZC5Qgd8W00pI{line-height:30px}div.C7_DF6o_uvgjGmTBmAdX,button.C7_DF6o_uvgjGmTBmAdX,a.C7_DF6o_uvgjGmTBmAdX,a:link.C7_DF6o_uvgjGmTBmAdX,a:visited.C7_DF6o_uvgjGmTBmAdX,.header a:link.C7_DF6o_uvgjGmTBmAdX,.header a:visited.C7_DF6o_uvgjGmTBmAdX{color:#00adbc;border-width:0;background-color:unset;font-family:"Gotham 5r",sans-serif;box-shadow:none;padding:0;margin:0}div.C7_DF6o_uvgjGmTBmAdX:hover,button.C7_DF6o_uvgjGmTBmAdX:hover,a.C7_DF6o_uvgjGmTBmAdX:hover,a:link.C7_DF6o_uvgjGmTBmAdX:hover,a:visited.C7_DF6o_uvgjGmTBmAdX:hover,.header a:link.C7_DF6o_uvgjGmTBmAdX:hover,.header a:visited.C7_DF6o_uvgjGmTBmAdX:hover{background-color:unset}div.PLetILmmzWj3aH7jMGug,button.PLetILmmzWj3aH7jMGug,a.PLetILmmzWj3aH7jMGug,a:link.PLetILmmzWj3aH7jMGug,a:visited.PLetILmmzWj3aH7jMGug,.header a:link.PLetILmmzWj3aH7jMGug,.header a:visited.PLetILmmzWj3aH7jMGug{color:#9660bf;font-size:16px;padding:12px 16px}div.PLetILmmzWj3aH7jMGug:hover,button.PLetILmmzWj3aH7jMGug:hover,a.PLetILmmzWj3aH7jMGug:hover,a:link.PLetILmmzWj3aH7jMGug:hover,a:visited.PLetILmmzWj3aH7jMGug:hover,.header a:link.PLetILmmzWj3aH7jMGug:hover,.header a:visited.PLetILmmzWj3aH7jMGug:hover{color:#6f488e}div.PLetILmmzWj3aH7jMGug:focus-visible,button.PLetILmmzWj3aH7jMGug:focus-visible,a.PLetILmmzWj3aH7jMGug:focus-visible,a:link.PLetILmmzWj3aH7jMGug:focus-visible,a:visited.PLetILmmzWj3aH7jMGug:focus-visible,.header a:link.PLetILmmzWj3aH7jMGug:focus-visible,.header a:visited.PLetILmmzWj3aH7jMGug:focus-visible{outline:#009eb0 solid 2px;outline-offset:2px;outline-offset:unset}',"",{version:3,sources:["webpack://./src/templates/button.module.scss","webpack://./../shared/css/color.scss","webpack://./../shared/css/font.scss"],names:[],mappings:"AAwBE,kNACE,oBAAA,CACA,cAAA,CACA,kCAAA,CACA,qBAAA,CACA,iBAAA,CACA,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,kBAAA,CAEA,4PACE,qBCjBE,CDkBF,cAAA,CAGF,yiBAGE,WAAA,CAKJ,yNACE,kBAAA,CACA,iBAAA,CAGF,yNACE,kBAAA,CACA,iBAAA,CAIF,kNACE,UCzCI,CD0CJ,wBCpBK,CDqBL,gBAAA,CACA,gDAAA,CAEA,4PACE,aCzBG,CD0BH,oBC1BG,CD6BL,yiBAIE,wBAAA,CACA,yCAAA,CAIJ,kNACE,aCnEO,CDoEP,wBCjEY,CDkEZ,gDAAA,CAEA,yiBAEE,wBCvES,CDwET,yCAAA,CAIJ,kNACE,UCzEI,CD0EJ,wBC1DG,CD2DH,gBAAA,CACA,+CAAA,CAEA,4PACE,eAAA,CACA,aChEC,CDiED,oBCjEC,CDkED,wBC/DU,CDkEZ,yiBAEE,aCrES,CDsET,wBCrEU,CDsEV,yCAAA,CAIJ,kNACE,UC9FI,CD+FJ,wBC3FG,CD4FH,gBAAA,CACA,+CAAA,CAEA,4PACE,eAAA,CACA,aCjGC,CDkGD,oBClGC,CDmGD,wBC9FU,CDiGZ,yiBAEE,aC1FS,CD2FT,wBC1FU,CD2FV,yCAAA,CAIJ,kNACE,aCzHO,CD0HP,qBCpHI,CDqHJ,0CAAA,CAEA,4PACE,eAAA,CACA,wBC5HU,CD+HZ,yiBAEE,wBCjIU,CDkIV,yCAAA,CAIJ,kNACE,UCpII,CDqIJ,qBCrFE,CDsFF,gBAAA,CACA,+CAAA,CAEA,4PACE,eAAA,CACA,UC3FA,CD4FA,iBC5FA,CD+FF,yiBAEE,qBChGS,CDiGT,yCAAA,CAIJ,kNACE,UCvJI,CDwJJ,wBC7IK,CD8IL,gBAAA,CACA,+CAAA,CAEA,4PACE,eAAA,CACA,aCnJG,CDoJH,oBCpJG,CDqJH,wBClJY,CDqJd,yiBAEE,aCxJW,CDyJX,wBCxJY,CDyJZ,yCAAA,CAIJ,kNACE,UC5KI,CD6KJ,wBC1GY,CD2GZ,gBAAA,CACA,+CAAA,CAEA,4PACE,eAAA,CACA,aCzLK,CD0LL,oBCvLU,CDwLV,wBCxLU,CD2LZ,yiBAEE,wBC7LU,CD8LV,yCAAA,CAKJ,kNACE,UC/CY,CDgDZ,wBCjEsB,CDkEtB,oBClEsB,CDmEtB,iBAAA,CACA,gBAAA,CACA,gBAAA,CAEA,4PACE,eAAA,CACA,UC1ME,CD2MF,oBCzEiB,CD0EjB,wBC1EiB,CD6EnB,oTAxNF,yBAAA,CACA,kBAAA,CA2NE,yiBAEE,wBCrFkB,CDsFlB,WAAA,CAIJ,kNACE,aC9DW,CD+DX,qBC1EY,CD2EZ,wBAAA,CACA,iBAAA,CACA,gBAAA,CAEA,4PACE,wBC9EW,CDiFb,oTA9OF,yBAAA,CACA,kBAAA,CAiPE,iRACE,aCrFW,CDsFX,oBCtFW,CDuFX,qBC1FU,CD2FV,kBAAA,CAMF,0sBACE,iBAAA,CACA,kBAAA,CACA,kCErQQ,CFwQV,sgBACE,gBAAA,CAKJ,kNACE,WA/QoB,CAgRpB,cAAA,CACA,gBAAA,CAGF,kNACE,WApRkB,CAqRlB,cAAA,CACA,gBAAA,CAGF,kNACE,WAzRmB,CA0RnB,cAAA,CACA,gBAAA,CAGF,kNACE,WA9RkB,CA+RlB,aAAA,CACA,gBAAA,CACA,iBAAA,CAEA,4WACE,cAAA,CACA,KAAA,CAKJ,kNACE,gBAAA,CAGF,kNACE,gBAAA,CAGF,kNACE,aCnSG,CDoSH,cAAA,CACA,sBAAA,CACA,kCAAA,CACA,eAAA,CACA,SAAA,CACA,QAAA,CAEA,4PACE,sBAAA,CAIJ,kNACE,aCpLsB,CDqLtB,cAAA,CACA,iBAAA,CAEA,4PACE,aCxLiB,CD2LnB,oTAtUF,yBAAA,CACA,kBAAA,CAuUI,oBAAA",sourcesContent:["@import 'color.scss';\n@import 'font.scss';\n\n// Note: Keep these constants in sync with Button.jsx.\n$button-height-default: 34px;\n$button-height-large: 40px;\n$button-height-narrow: 40px;\n$button-height-small: 20px;\n\n@mixin focus-outline {\n outline: $brand_primary_default solid 2px;\n outline-offset: 2px;\n}\n\n/* stylelint-disable selector-pseudo-class-no-unknown */\ndiv,\nbutton,\na,\na:link,\na:visited,\n// Global .header a styles override application.scss.\n:global(.header) a:link,\n:global(.header) a:visited {\n /* stylelint-enable selector-pseudo-class-no-unknown */\n &.main {\n display: inline-block;\n font-size: 12px;\n font-family: 'Gotham 4r', sans-serif;\n border: 1px solid $border_gray;\n border-radius: 3px;\n text-decoration: none;\n box-sizing: border-box;\n overflow: hidden;\n white-space: nowrap;\n\n &:hover {\n background-color: $white;\n cursor: pointer;\n }\n\n &:disabled,\n &[disabled] {\n // Override the cursor:pointer on disabled elements.\n cursor: auto;\n }\n }\n\n // Note no \"&\" on these two, since they'll be on child elements.\n .icon {\n margin-right: 2.5px;\n margin-left: 2.5px;\n }\n\n .textSpan {\n margin-right: 2.5px;\n margin-left: 2.5px;\n }\n\n // Button colors.\n &.orange {\n color: $white;\n background-color: $orange;\n font-weight: bold;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.63);\n\n &:hover {\n color: $orange;\n border-color: $orange;\n }\n\n &:disabled,\n &[disabled] {\n // This color is in Mikes styleguide, but we dont use it anywhere else;\n // and it might be changed by Mark soon - so just hard-coding the string.\n background-color: #ffd27f;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.gray {\n color: $charcoal;\n background-color: $lightest_gray;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.73);\n\n &:disabled,\n &[disabled] {\n background-color: $lighter_gray;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.blue {\n color: $white;\n background-color: $cyan;\n font-weight: bold;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.4);\n\n &:hover {\n box-shadow: none;\n color: $cyan;\n border-color: $cyan;\n background-color: $lightest_cyan;\n }\n\n &:disabled,\n &[disabled] {\n color: $lighter_cyan;\n background-color: $lightest_cyan;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.teal {\n color: $white;\n background-color: $teal;\n font-weight: bold;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.4);\n\n &:hover {\n box-shadow: none;\n color: $teal;\n border-color: $teal;\n background-color: $lightest_teal;\n }\n\n &:disabled,\n &[disabled] {\n color: $lighter_cyan;\n background-color: $lightest_cyan;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.white {\n color: $charcoal;\n background-color: $white;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.06);\n\n &:hover {\n box-shadow: none;\n background-color: $lightest_gray;\n }\n\n &:disabled,\n &[disabled] {\n background-color: $lightest_gray;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.red {\n color: $white;\n background-color: $red;\n font-weight: bold;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.4);\n\n &:hover {\n box-shadow: none;\n color: $red;\n border-color: $red;\n }\n\n &:disabled,\n &[disabled] {\n background-color: $lightest_red;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.purple {\n color: $white;\n background-color: $purple;\n font-weight: bold;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.4);\n\n &:hover {\n box-shadow: none;\n color: $purple;\n border-color: $purple;\n background-color: $lightest_purple;\n }\n\n &:disabled,\n &[disabled] {\n color: $lighter_purple;\n background-color: $lightest_purple;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n &.green {\n color: $white;\n background-color: $level_perfect;\n font-weight: bold;\n box-shadow: inset 0 2px 0 0 rgba(255 255 255 / 0.4);\n\n &:hover {\n box-shadow: none;\n color: $charcoal;\n border-color: $lightest_gray;\n background-color: $lightest_gray;\n }\n\n &:disabled,\n &[disabled] {\n background-color: $lightest_gray;\n box-shadow: inset 0 2px 0 0 rgba(0 0 0 / 0.1);\n }\n }\n\n // Phase 1 of Code.org Redesign - Colors\n &.brandSecondaryDefault {\n color: $neutral_white;\n background-color: $brand_secondary_default;\n border-color: $brand_secondary_default;\n border-radius: 4px;\n border-width: 1px;\n line-height: 30px;\n\n &:hover {\n box-shadow: none;\n color: $white;\n border-color: $brand_secondary_dark;\n background-color: $brand_secondary_dark;\n }\n\n &:focus-visible {\n @include focus-outline;\n }\n\n &:disabled,\n &[disabled] {\n background-color: $brand_secondary_light;\n border: none;\n }\n }\n\n &.neutralDark {\n color: $neutral_dark;\n background-color: $neutral_white;\n border: 1px solid $neutral_dark;\n border-radius: 4px;\n line-height: 30px;\n\n &:hover {\n background-color: $neutral_dark10;\n }\n\n &:focus-visible {\n @include focus-outline;\n }\n\n &:disabled {\n color: $neutral_dark20;\n border-color: $neutral_dark20;\n background-color: $neutral_white;\n cursor: not-allowed;\n }\n }\n\n &.neutralDark,\n &.brandSecondaryDefault {\n &.default {\n padding-left: 16px;\n padding-right: 16px;\n font-family: $gotham-bold;\n }\n\n &:active {\n border-width: 2px;\n }\n }\n\n // Button sizes.\n &.default {\n height: $button-height-default;\n padding: 0 24px;\n line-height: 34px;\n }\n\n &.large {\n height: $button-height-large;\n padding: 0 30px;\n line-height: 40px;\n }\n\n &.narrow {\n height: $button-height-narrow;\n padding: 0 10px;\n line-height: 40px;\n }\n\n &.small {\n height: $button-height-small;\n padding: 0 5px;\n line-height: 20px;\n position: relative;\n\n .icon {\n font-size: 12px;\n top: 0;\n }\n }\n\n // Must be below sizes, since we want it to have precedence for line-height.\n &.updated {\n line-height: 12px;\n }\n\n &.phase1Updated {\n line-height: 30px;\n }\n\n &.textButton {\n color: $teal;\n border-width: 0;\n background-color: unset;\n font-family: 'Gotham 5r', sans-serif;\n box-shadow: none;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: unset;\n }\n }\n\n &.rebrandedTextButton {\n color: $brand_secondary_default;\n font-size: 16px;\n padding: 12px 16px;\n\n &:hover {\n color: $brand_secondary_dark;\n }\n\n &:focus-visible {\n @include focus-outline;\n outline-offset: unset;\n }\n }\n}\n","// colors from https://www.dropbox.com/s/ycjiwt8vxlmv2ih/Code.org_stylesheet_v2_09.05.13.pdf\n\n// Please keep this file simple; it should only contain color definitions\n// and aliases. Variables defined in this file are exported to\n// apps/src/color.js during the apps build process.\n\n$black: #000;\n$background_black: #121416;\n$dark_gray: #2D3139;\n$darkest_gray: #292F36;\n$dark_slate_gray: #282c34;\n$darkest_slate_gray: #25292d;\n$dark_charcoal: #4d575f;\n$charcoal: #5b6770;\n$light_gray: #949ca2;\n$lighter_gray: #c6cacd;\n$lightest_gray: #e7e8ea;\n$background_gray: #f2f2f2;\n$dimgray: #696969;\n$white: #fff;\n$default_blue: #3670b3;\n\n$dark_teal: #0094a3;\n$teal: #00adbc;\n$applab_button_teal: #1abc9c;\n$light_teal: #59cad3;\n$lightish_teal: #80d6de;\n$lighter_teal: #a6e3e8;\n$lightest_teal: #d9f3f5;\n\n$purple: #7665a0;\n$light_purple: #a69bc1;\n$lighter_purple: #cfc9de;\n$lightest_purple: #ebe8f1;\n\n$cyan: #0094ca;\n$light_cyan: #59b9dc;\n$lighter_cyan: #a6daed;\n$lightest_cyan: #d9eff7;\n$almost_white_cyan: #f5fcff;\n\n$orange: #ffa400;\n$light_orange: #ffc459;\n$lighter_orange: #ffe0a6;\n$lightest_orange: #fff2d9;\n$dark_orange: #ff8600;\n\n$green: #b9bf15;\n$light_green: #d1d567;\n$lighter_green: #e7e9ad;\n$lightest_green: #f5f5dc;\n$highlight_green: #8afc9b;\n\n$yellow: #ffb81d;\n$light_yellow: #ffdb74;\n$lighter_yellow: #ffebb5;\n$lightest_yellow: #fff7df;\n\n$goldenrod: #daa520;\n\n$header_text: $white;\n$bkgnd_color: $teal;\n$inset_color: $lighter_gray;\n$dark_color: $purple;\n$hdr_color: $purple;\n\n// Some extra colors.\n$red: #c00;\n$lightest_red: #fcc;\n$dark_red: #d62911;\n$realgreen: #008000;\n$realyellow: #ff0;\n$mustardyellow: #efcd1c;\n$twitter_blue: #00aced;\n$facebook_blue: #3b5998;\n$dark_blue: #00647f;\n$blockly_flyout_gray: #ddd;\n$default_text: #333;\n$border_gray: #bbb;\n$border_light_gray: #d8d8d8;\n$table_header: #ececec;\n$table_light_row: #fcfcfc;\n$table_dark_row: #f4f4f4;\n\n// Progress colors.\n$level_submitted: $purple;\n$level_perfect: rgb(14, 190, 14);\n$level_passed: rgb(159, 212, 159);\n$level_attempted: $realyellow;\n$level_not_tried: #fefefe;\n$level_current: $orange;\n$level_review_rejected: $red;\n$level_review_accepted: rgb(11, 142, 11); // TODO: $level_passed;\n$assessment: $cyan;\n$workspace_running_background: #e5e5e5;\n\n// Experimental Sprite Lab validation colors.\n$dark_purple: #682A77;\n$bright_green: #0ebe0e;\n$neon_pink: #e9118f;\n\n// Links (used in apps).\n$link_color: #0596ce;\n\n// Shadow.\n$shadow: rgba(0, 0, 0, 0.3);\n\n// Colors that are taken from bootstrap, and not necessarily part of our core theme.\n$bootstrap_button_blue: #337ab7;\n$bootstrap_button_red: #d9534f;\n$bootstrap_error_background: #f2dede;\n$bootstrap_error_text: #b94a48;\n$bootstrap_v3_error_text: #a94442;\n$bootstrap_error_border: #ebccd1;\n$bootstrap_warning_background: #fcf8e3;\n$bootstrap_warning_text: #c09853;\n$bootstrap_warning_border: #faebcc;\n$bootstrap_border_color: #cccccc;\n$bootstrap_success_background: #dff0d8;\n$bootstrap_success_text: #468847;\n$bootstrap_success_border: #d6e9c6;\n\n// Colors taken from droplet, not part of our core theme.\n$droplet_light_green: #d3e965;\n$droplet_blue: #64b5f6;\n$droplet_bright_blue: #19c3e1;\n$droplet_yellow: #fff176;\n$droplet_orange: #ffb74d;\n$droplet_red: #f78183;\n$droplet_cyan: #4dd0e1;\n$droplet_pink: #f57ac6;\n$droplet_purple: #bb77c7;\n$droplet_green: #68d995;\n$droplet_white: $white;\n\n// Oceans: deep blue background.\n$oceans_deep_blue: rgb(2, 0, 28);\n\n// Dark theme background (used by default in Music Lab)\n$dark_black: #121212;\n\n// ===----===----===---- Phase 1 Colors: ----===----===----===\n// Brand\n$brand_primary_light: #ABDFE5;\n$brand_primary_default: #009EB0;\n$brand_primary_dark: #008291;\n\n$brand_secondary_light: #E0D1EC;\n$brand_secondary_default: #9660BF;\n$brand_secondary_dark: #6F488E;\n\n$brand_accent_default: #ED6060;\n\n//Product\n$product_affirmative_default: #3EA33E;\n\n$product_negative_light: #FDEBE9;\n$product_negative_default: #E5311A;\n$product_negative_dark: #AA2513;\n\n$product_caution_default: #F9CB28;\n\n$product_information_default: #007ACC;\n\n// Neutral\n$neutral_white: #FFFFFF;\n$neutral_light: #F7F8FA;\n$neutral_dark10: #EAEBEB;\n$neutral_dark20: #D4D5D7;\n$neutral_dark30: #BFC1C3;\n$neutral_dark40: #A9ACAF;\n$neutral_dark50: #94979B;\n$neutral_dark60: #7F8286;\n$neutral_dark70: #6A6E73;\n$neutral_dark80: #54595E;\n$neutral_dark90: #3F444B;\n$neutral_dark: #292F36;\n\n//Brands\n$google_brand_color: #0F9D58;\n$microsoft_brand_color: #FFB900;\n$facebook_brand_color: #3B5998;\n\n// ===----===----===---- Design system colors: ----===----===----===\n\n$light_primary_100: #ABDFE5;\n$light_primary_500: #0093A4;\n$light_primary_700: #008291;\n\n$light_secondary_100: #E2D4EE;\n$light_secondary_500: #8C52BA;\n$light_secondary_700: #6F488E;\n\n$light_gray_200: #D4D5D7;\n$light_gray_300: #BFC1C3;\n$light_gray_500: #94979B;\n$light_gray_700: #6A6E73;\n\n$light_affirmative_100: #E2F1E2;\n\n$light_black: #292F36;",'// Common site-wide fonts, put here for easy access from all scss files\n\n$gotham-regular: "Gotham 4r", sans-serif;\n$gotham-italics: "Gotham 4i", sans-serif;\n$gotham-bold: "Gotham 5r", sans-serif;\n$gotham-bold-italics: "Gotham 5i", sans-serif;\n$gotham-extra-bold: "Gotham 7r", sans-serif;\n$gotham-extra-bold-italics: "Gotham 7i";\n\n$barlowSemiCondensed-semibold: \'Barlow Semi Condensed Semibold\', sans-serif;\n$barlowSemiCondensed-medium: \'Barlow Semi Condensed Medium\', sans-serif;\n\n$code-font: \'Source Code Pro\', Monaco, \'Bitstream Vera Sans Mono\', \'Lucida Console\', Terminal, monospace;\n\n/*\n If you are changing the location of these files,\n see the readme in this directory for more detail on manual steps to take when uploading new files.\n */\n$font-awesome-core-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/fontawesome.min.css";\n$font-awesome-brands-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/brands.min.css";\n$font-awesome-solid-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/solid.min.css";\n$font-awesome-regular-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/regular.min.css";\n$font-awesome-v4-fonts-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/v4-font-face.min.css";\n$font-awesome-v4-shims-url: "https://dsco.code.org/assets/font-awesome-pro/1684178876/css/v4-shims.min.css";\n'],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={main:"RgEAWGSURVHXgsym55ZC",icon:"WXbyAByPFDIxOlQjhjRA",textSpan:"C9TrlUErKq7GDcQxySiL",orange:"UXXxyfgzjsl53vaXMLzA",gray:"Fw6lzpqy3BhOLIEOJd4Q",blue:"SogDtJ8Sr4CHsI4oRqoJ",teal:"thn9Ds5ihZL991wq4hjF",white:"SfFcj2dNRCSSkdsG0JWm",red:"oroutysfFuyrHT44d9O6",purple:"CleFRArPgxlGFWnGt9jX",green:"y1VYRnECR1w8hEpep3vF",brandSecondaryDefault:"qW47iNnhv1vfNqsF8sJq",neutralDark:"HQMxS6q4VCbKRv45lt8t",default:"SpnpMKQTi1rIE2H6S2st",large:"RZjpqeKsBXOFJve7iNR5",narrow:"XtN8qpA6DyEcHb1YIz2d",small:"Yq5AYtW7_as0WLuoLhnb",updated:"pUlkLwlwitRrefPiTBSj",phase1Updated:"JANSAq67ZC5Qgd8W00pI",textButton:"C7_DF6o_uvgjGmTBmAdX",rebrandedTextButton:"PLetILmmzWj3aH7jMGug"};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/templates/collapser-icon.module.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".KXmxTRHUYjJ6sgjwbnUy{color:inherit;margin:0;padding:0;border:none;border-radius:0;background-color:rgba(0,0,0,0)}.KXmxTRHUYjJ6sgjwbnUy:hover{box-shadow:none}.KXmxTRHUYjJ6sgjwbnUy:active{border:none !important}","",{version:3,sources:["webpack://./src/templates/collapser-icon.module.scss","webpack://./src/mixins.scss"],names:[],mappings:"AAEA,sBCMI,aDL4B,CCgB9B,QAAA,CACA,SAAA,CACA,WAAA,CACA,eAAA,CACA,8BAAA,CAEA,4BACE,eAAA,CAGF,6BACE,sBAAA",sourcesContent:['@import "../mixins.scss";\n\n.collapserIcon {\n @include remove-button-styles(inherit);\n}\n',"// Removes (most) default button styling. Useful for retaining a clickable component's\n// original presentation when converting it to a \n <% if (options.downloadReplayVideo) { %>\n \x3c!-- Mount point for DownloadReplayVideoButton component. --\x3e\n \n <% } %>\n
\n
\n <% if (options.facebookUrl) { -%>\n \' target="_blank" class="popup-window" style="display: none">\n \n \n <% } -%>\n <% if (options.twitterUrl) { -%>\n \' target="_blank" class="popup-window" style="display: none">\n \n \n <% } -%>\n <% if (!options.onMainPage && options.enablePrinting) { %>\n \n <% } %>\n <% if (options.alreadySaved) { %>\n \n <% } else if (options.saveToProjectGallery && !options.disableSaveToGallery) { %>\n \n \n <% } %>\n \n \n
\n\n<% } %>\n\n
\n\n<% /* Always show the "Send to phone" button, and when it\'s clicked to toggle\n * the section below into view, the QR Code, but only show the phone number\n * in that section below when options.isUS is true, which is done\n * for US users. */ %>\n\n',__filename="src/templates/sharing.html.ejs";try{var __output=[],__append=__output.push.bind(__output);with(locals||{}){var msg=__webpack_require__("./src/util/locale-do-not-import.js");__append("\n"),__line=2,options.feedbackImage?(__append('\n \n