\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],38:[function(a,b,c){{var d=a("./lodash");a("./xml")}c.shallowCopy=function(a){var b={};for(var c in a)b[c]=a[c];return b},c.cloneWithoutFunctions=function(a){return JSON.parse(JSON.stringify(a))},c.extend=function(a,b){var d=c.shallowCopy(a);for(var e in b)d[e]=b[e];return d},c.escapeHtml=function(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},c.mod=function(a,b){return(a%b+b)%b},c.range=function(a,b){for(var c=[],d=a;b>=d;d++)c.push(d);return c},c.executeIfConditional=function(a,b){return function(){return a()?b.apply(this,arguments):void 0}},c.stripQuotes=function(a){return a.replace(/["']/g,"")},Function.prototype.inherits=function(a){this.prototype=d.create(a.prototype,{constructor:a})},c.wrapNumberValidatorsForLevelBuilder=function(){var a=Blockly.FieldTextInput.nonnegativeIntegerValidator,b=Blockly.FieldTextInput.numberValidator;Blockly.FieldTextInput.nonnegativeIntegerValidator=function(b){return"???"===b?b:a(b)},Blockly.FieldTextInput.numberValidator=function(a){return"???"===a?a:b(a)}}},{"./lodash":11,"./xml":39}],39:[function(a,b,c){c.serialize=function(a){var b=new XMLSerializer;return b.serializeToString(a)},c.parseElement=function(a){var b=new DOMParser;a=a.trim();var d=0===a.indexOf(""+a+"","text/xml"),e=d.getElementsByTagName("parsererror"),f=d.firstChild;if(!f)throw new Error("Nothing parsed");if(e.length>0)throw new Error(c.serialize(e[0]));if(f!==d.lastChild)throw new Error("Parsed multiple elements");return f}},{}],40:[function(a,b,c){var d=a("messageformat");d.locale.en=function(a){return 1===a?"one":"other"},c.and=function(){return"!!-and-!!"},c.blocklyMessage=function(){return"!!-Blockly-!!"},c.catActions=function(){return"!!-Actions-!!"},c.catColour=function(){return"!!-Colour-!!"},c.catLogic=function(){return"!!-Logic-!!"},c.catLists=function(){return"!!-Lists-!!"},c.catLoops=function(){return"!!-Loops-!!"},c.catMath=function(){return"!!-Math-!!"},c.catProcedures=function(){return"!!-Functions-!!"},c.catText=function(){return"!!-Text-!!"},c.catVariables=function(){return"!!-Variables-!!"},c.codeTooltip=function(){return"!!-See generated JavaScript code.-!!"},c.continue=function(){return"!!-Continue-!!"},c.dialogCancel=function(){return"!!-Cancel-!!"},c.dialogOK=function(){return"!!-OK-!!"},c.directionNorthLetter=function(){return"!!-N-!!"},c.directionSouthLetter=function(){return"!!-S-!!"},c.directionEastLetter=function(){return"!!-E-!!"},c.directionWestLetter=function(){return"!!-W-!!"},c.end=function(){return"!!-end-!!"},c.emptyBlocksErrorMsg=function(){return'!!-The "Repeat" or "If" block needs to have other blocks inside it to work. Make sure the inner block fits properly inside the containing block.-!!'},c.emptyFunctionBlocksErrorMsg=function(){return"!!-The function block needs to have other blocks inside it to work.-!!"},c.extraTopBlocks=function(){return'!!-You have unattached blocks. Did you mean to attach these to the "when run" block?-!!'},c.finalStage=function(){return"!!-Congratulations! You have completed the final stage.-!!"},c.finalStageTrophies=function(a){return"!!-Congratulations! You have completed the final stage and won "+p(a,"numTrophies",0,"en",{one:"a trophy",other:n(a,"numTrophies")+" trophies"})+".-!!"},c.finish=function(){return"!!-Finish-!!"},c.generatedCodeInfo=function(a){return"!!-Even top universities teach block-based coding (e.g., "+v(a,"berkeleyLink")+", "+v(a,"harvardLink")+"). But under the hood, the blocks you have assembled can also be shown in JavaScript, the world's most widely used coding language:-!!"},c.hashError=function(){return"!!-Sorry, '%1' doesn't correspond with any saved program.-!!"},c.help=function(){return"!!-Help-!!"},c.hintTitle=function(){return"!!-Hint:-!!"},c.jump=function(){return"!!-jump-!!"},c.levelIncompleteError=function(){return"!!-You are using all of the necessary types of blocks but not in the right way.-!!"},c.listVariable=function(){return"!!-list-!!"},c.makeYourOwnFlappy=function(){return"!!-Make Your Own Flappy Game-!!"},c.missingBlocksErrorMsg=function(){return"!!-Try one or more of the blocks below to solve this puzzle.-!!"},c.nextLevel=function(a){return"!!-Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+".-!!"},c.nextLevelTrophies=function(a){return"!!-Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+" and won "+p(a,"numTrophies",0,"en",{one:"a trophy",other:n(a,"numTrophies")+" trophies"})+".-!!"
-},c.nextStage=function(a){return"!!-Congratulations! You completed "+v(a,"stageName")+".-!!"},c.nextStageTrophies=function(a){return"!!-Congratulations! You completed "+v(a,"stageName")+" and won "+p(a,"numTrophies",0,"en",{one:"a trophy",other:n(a,"numTrophies")+" trophies"})+".-!!"},c.numBlocksNeeded=function(a){return"!!-Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+". (However, you could have used only "+p(a,"numBlocks",0,"en",{one:"1 block",other:n(a,"numBlocks")+" blocks"})+".)-!!"},c.numLinesOfCodeWritten=function(a){return"!!-You just wrote "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code!-!!"},c.play=function(){return"!!-play-!!"},c.puzzleTitle=function(a){return"!!-Puzzle "+v(a,"puzzle_number")+" of "+v(a,"stage_total")+"-!!"},c.repeat=function(){return"!!-repeat-!!"},c.resetProgram=function(){return"!!-Reset-!!"},c.runProgram=function(){return"!!-Run-!!"},c.runTooltip=function(){return"!!-Run the program defined by the blocks in the workspace.-!!"},c.score=function(){return"!!-score-!!"},c.showCodeHeader=function(){return"!!-Show Code-!!"},c.showGeneratedCode=function(){return"!!-Show code-!!"},c.subtitle=function(){return"!!-a visual programming environment-!!"},c.textVariable=function(){return"!!-text-!!"},c.tooFewBlocksMsg=function(){return"!!-You are using all of the necessary types of blocks, but try using more of these types of blocks to complete this puzzle.-!!"},c.tooManyBlocksMsg=function(){return"!!-This puzzle can be solved with blocks.-!!"},c.tooMuchWork=function(){return"!!-You made me do a lot of work! Could you try repeating fewer times?-!!"},c.toolboxHeader=function(){return"!!-Blocks-!!"},c.openWorkspace=function(){return"!!-How It Works-!!"},c.totalNumLinesOfCodeWritten=function(a){return"!!-All-time total: "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code.-!!"},c.tryAgain=function(){return"!!-Try again-!!"},c.hintRequest=function(){return"!!-See hint-!!"},c.backToPreviousLevel=function(){return"!!-Back to previous level-!!"},c.saveToGallery=function(){return"!!-Save to your gallery-!!"},c.savedToGallery=function(){return"!!-Saved to your gallery!-!!"},c.typeCode=function(){return"!!-Type your JavaScript code below these instructions.-!!"},c.typeFuncs=function(){return"!!-Available functions:%1-!!"},c.typeHint=function(){return"!!-Note that the parentheses and semicolons are required.-!!"},c.workspaceHeader=function(){return"!!-Assemble your blocks here: -!!"},c.infinity=function(){return"!!-Infinity-!!"},c.rotateText=function(){return"!!-Rotate your device.-!!"},c.orientationLock=function(){return"!!-Turn off orientation lock in device settings.-!!"},c.wantToLearn=function(){return"!!-Want to learn to code?-!!"},c.watchVideo=function(){return"!!-Watch the Video-!!"},c.when=function(){return"!!-when-!!"},c.whenRun=function(){return"!!-when run-!!"},c.tryHOC=function(){return"!!-Try the Hour of Code-!!"},c.signup=function(){return"!!-Sign up for the intro course-!!"},c.hintHeader=function(){return"!!-Here's a tip:-!!"},c.genericFeedback=function(){return"!!-See how you ended up, and try to fix your program.-!!"}},{messageformat:53}],41:[function(a,b,c){var d=a("messageformat");d.locale.en=function(a){return 1===a?"one":"other"},c.actor=function(){return"!!-actor-!!"},c.catActions=function(){return"!!-Actions-!!"},c.catControl=function(){return"!!-Loops-!!"},c.catEvents=function(){return"!!-Events-!!"},c.catLogic=function(){return"!!-Logic-!!"},c.catMath=function(){return"!!-Math-!!"},c.catProcedures=function(){return"!!-Functions-!!"},c.catText=function(){return"!!-Text-!!"},c.catVariables=function(){return"!!-Variables-!!"},c.changeScoreTooltip=function(){return"!!-Add or remove a point to the score.-!!"},c.changeScoreTooltipK1=function(){return"!!-Add a point to the score.-!!"},c.continue=function(){return"!!-Continue-!!"},c.decrementPlayerScore=function(){return"!!-remove point-!!"},c.defaultSayText=function(){return"!!-type here-!!"},c.emotion=function(){return"!!-mood-!!"},c.finalLevel=function(){return"!!-Congratulations! You have solved the final puzzle.-!!"},c.hello=function(){return"!!-hello-!!"},c.helloWorld=function(){return"!!-Hello World!-!!"},c.incrementPlayerScore=function(){return"!!-score point-!!"},c.makeProjectileDisappear=function(){return"!!-disappear-!!"},c.makeProjectileBounce=function(){return"!!-bounce-!!"},c.makeProjectileBlueFireball=function(){return"!!-make blue fireball-!!"},c.makeProjectilePurpleFireball=function(){return"!!-make purple fireball-!!"},c.makeProjectileRedFireball=function(){return"!!-make red fireball-!!"},c.makeProjectileYellowHearts=function(){return"!!-make yellow hearts-!!"},c.makeProjectilePurpleHearts=function(){return"!!-make purple hearts-!!"},c.makeProjectileRedHearts=function(){return"!!-make red hearts-!!"},c.makeProjectileTooltip=function(){return"!!-Make the projectile that just collided disappear or bounce.-!!"},c.makeYourOwn=function(){return"!!-Make Your Own Story-!!"},c.moveDirectionDown=function(){return"!!-down-!!"},c.moveDirectionLeft=function(){return"!!-left-!!"},c.moveDirectionRight=function(){return"!!-right-!!"},c.moveDirectionUp=function(){return"!!-up-!!"},c.moveDirectionRandom=function(){return"!!-random-!!"},c.moveDistance25=function(){return"!!-25 pixels-!!"},c.moveDistance50=function(){return"!!-50 pixels-!!"},c.moveDistance100=function(){return"!!-100 pixels-!!"},c.moveDistance200=function(){return"!!-200 pixels-!!"},c.moveDistance400=function(){return"!!-400 pixels-!!"},c.moveDistancePixels=function(){return"!!-pixels-!!"},c.moveDistanceRandom=function(){return"!!-random pixels-!!"},c.moveDistanceTooltip=function(){return"!!-Move an actor a specific distance in the specified direction.-!!"},c.moveSprite=function(){return"!!-move-!!"},c.moveSpriteN=function(a){return"!!-move actor "+v(a,"spriteIndex")+"-!!"},c.moveDown=function(){return"!!-move down-!!"},c.moveDownTooltip=function(){return"!!-Move an actor down.-!!"},c.moveLeft=function(){return"!!-move left-!!"},c.moveLeftTooltip=function(){return"!!-Move an actor to the left.-!!"},c.moveRight=function(){return"!!-move right-!!"},c.moveRightTooltip=function(){return"!!-Move an actor to the right.-!!"},c.moveUp=function(){return"!!-move up-!!"},c.moveUpTooltip=function(){return"!!-Move an actor up.-!!"},c.moveTooltip=function(){return"!!-Move an actor.-!!"},c.nextLevel=function(){return"!!-Congratulations! You have completed this puzzle.-!!"},c.no=function(){return"!!-No-!!"},c.numBlocksNeeded=function(){return"!!-This puzzle can be solved with %1 blocks.-!!"},c.ouchExclamation=function(){return"!!-Ouch!-!!"},c.playSoundCrunch=function(){return"!!-play crunch sound-!!"},c.playSoundGoal1=function(){return"!!-play goal 1 sound-!!"},c.playSoundGoal2=function(){return"!!-play goal 2 sound-!!"},c.playSoundHit=function(){return"!!-play hit sound-!!"},c.playSoundLosePoint=function(){return"!!-play lose point sound-!!"},c.playSoundLosePoint2=function(){return"!!-play lose point 2 sound-!!"},c.playSoundRetro=function(){return"!!-play retro sound-!!"},c.playSoundRubber=function(){return"!!-play rubber sound-!!"},c.playSoundSlap=function(){return"!!-play slap sound-!!"},c.playSoundTooltip=function(){return"!!-Play the chosen sound.-!!"},c.playSoundWinPoint=function(){return"!!-play win point sound-!!"},c.playSoundWinPoint2=function(){return"!!-play win point 2 sound-!!"},c.playSoundWood=function(){return"!!-play wood sound-!!"},c.positionOutTopLeft=function(){return"!!-to the above top left position-!!"},c.positionOutTopRight=function(){return"!!-to the above top right position-!!"},c.positionTopOutLeft=function(){return"!!-to the top outside left position-!!"},c.positionTopLeft=function(){return"!!-to the top left position-!!"},c.positionTopCenter=function(){return"!!-to the top center position-!!"},c.positionTopRight=function(){return"!!-to the top right position-!!"},c.positionTopOutRight=function(){return"!!-to the top outside right position-!!"},c.positionMiddleLeft=function(){return"!!-to the middle left position-!!"},c.positionMiddleCenter=function(){return"!!-to the middle center position-!!"},c.positionMiddleRight=function(){return"!!-to the middle right position-!!"},c.positionBottomOutLeft=function(){return"!!-to the bottom outside left position-!!"},c.positionBottomLeft=function(){return"!!-to the bottom left position-!!"},c.positionBottomCenter=function(){return"!!-to the bottom center position-!!"},c.positionBottomRight=function(){return"!!-to the bottom right position-!!"},c.positionBottomOutRight=function(){return"!!-to the bottom outside right position-!!"},c.positionOutBottomLeft=function(){return"!!-to the below bottom left position-!!"},c.positionOutBottomRight=function(){return"!!-to the below bottom right position-!!"},c.positionRandom=function(){return"!!-to the random position-!!"},c.projectileBlueFireball=function(){return"!!-blue fireball-!!"},c.projectilePurpleFireball=function(){return"!!-purple fireball-!!"},c.projectileRedFireball=function(){return"!!-red fireball-!!"},c.projectileYellowHearts=function(){return"!!-yellow hearts-!!"},c.projectilePurpleHearts=function(){return"!!-purple hearts-!!"},c.projectileRedHearts=function(){return"!!-red hearts-!!"},c.projectileRandom=function(){return"!!-random-!!"},c.reinfFeedbackMsg=function(){return'!!-You can press the "Try again" button to go back to playing your story.-!!'},c.repeatForever=function(){return"!!-repeat forever-!!"},c.repeatDo=function(){return"!!-do-!!"},c.repeatForeverTooltip=function(){return"!!-Execute the actions in this block repeatedly while the story is running.-!!"},c.saySprite=function(){return"!!-say-!!"},c.saySpriteN=function(a){return"!!-actor "+v(a,"spriteIndex")+" say-!!"},c.saySpriteTooltip=function(){return"!!-Pop up a speech bubble with the associated text from the specified actor.-!!"},c.scoreText=function(a){return"!!-Score: "+v(a,"playerScore")+"-!!"},c.setBackground=function(){return"!!-set background-!!"},c.setBackgroundRandom=function(){return"!!-set random background-!!"},c.setBackgroundBlack=function(){return"!!-set black background-!!"},c.setBackgroundCave=function(){return"!!-set cave background-!!"},c.setBackgroundCloudy=function(){return"!!-set cloudy background-!!"},c.setBackgroundHardcourt=function(){return"!!-set hardcourt background-!!"},c.setBackgroundNight=function(){return"!!-set night background-!!"},c.setBackgroundUnderwater=function(){return"!!-set underwater background-!!"},c.setBackgroundCity=function(){return"!!-set city background-!!"},c.setBackgroundDesert=function(){return"!!-set desert background-!!"},c.setBackgroundRainbow=function(){return"!!-set rainbow background-!!"},c.setBackgroundSoccer=function(){return"!!-set soccer background-!!"},c.setBackgroundSpace=function(){return"!!-set space background-!!"},c.setBackgroundTennis=function(){return"!!-set tennis background-!!"},c.setBackgroundWinter=function(){return"!!-set winter background-!!"},c.setBackgroundTooltip=function(){return"!!-Sets the background image-!!"},c.setScoreText=function(){return"!!-set score-!!"},c.setScoreTextTooltip=function(){return"!!-Sets the text to be displayed in the score area.-!!"},c.setSpriteEmotionAngry=function(){return"!!-to a angry mood-!!"},c.setSpriteEmotionHappy=function(){return"!!-to a happy mood-!!"},c.setSpriteEmotionNormal=function(){return"!!-to a normal mood-!!"},c.setSpriteEmotionRandom=function(){return"!!-to a random mood-!!"},c.setSpriteEmotionSad=function(){return"!!-to a sad mood-!!"},c.setSpriteEmotionTooltip=function(){return"!!-Sets the actor mood-!!"},c.setSpriteAlien=function(){return"!!-to an alien image-!!"},c.setSpriteBat=function(){return"!!-to a bat image-!!"},c.setSpriteBird=function(){return"!!-to a bird image-!!"},c.setSpriteCat=function(){return"!!-to a cat image-!!"},c.setSpriteCaveBoy=function(){return"!!-to a cave boy image-!!"},c.setSpriteCaveGirl=function(){return"!!-to a cave girl image-!!"},c.setSpriteDinosaur=function(){return"!!-to a dinosaur image-!!"},c.setSpriteDog=function(){return"!!-to a dog image-!!"},c.setSpriteDragon=function(){return"!!-to a dragon image-!!"},c.setSpriteGhost=function(){return"!!-to a ghost image-!!"},c.setSpriteHidden=function(){return"!!-to a hidden image-!!"},c.setSpriteHideK1=function(){return"!!-hide-!!"},c.setSpriteKnight=function(){return"!!-to a knight image-!!"},c.setSpriteMonster=function(){return"!!-to a monster image-!!"},c.setSpriteNinja=function(){return"!!-to a masked ninja image-!!"},c.setSpriteOctopus=function(){return"!!-to an octopus image-!!"},c.setSpritePenguin=function(){return"!!-to a penguin image-!!"},c.setSpritePirate=function(){return"!!-to a pirate image-!!"},c.setSpritePrincess=function(){return"!!-to a princess image-!!"},c.setSpriteRandom=function(){return"!!-to a random image-!!"},c.setSpriteRobot=function(){return"!!-to a robot image-!!"},c.setSpriteShowK1=function(){return"!!-show-!!"},c.setSpriteSpacebot=function(){return"!!-to a spacebot image-!!"},c.setSpriteSoccerGirl=function(){return"!!-to a soccer girl image-!!"},c.setSpriteSoccerBoy=function(){return"!!-to a soccer boy image-!!"},c.setSpriteSquirrel=function(){return"!!-to a squirrel image-!!"},c.setSpriteTennisGirl=function(){return"!!-to a tennis girl image-!!"},c.setSpriteTennisBoy=function(){return"!!-to a tennis boy image-!!"},c.setSpriteUnicorn=function(){return"!!-to a unicorn image-!!"},c.setSpriteWitch=function(){return"!!-to a witch image-!!"},c.setSpriteWizard=function(){return"!!-to a wizard image-!!"},c.setSpritePositionTooltip=function(){return"!!-Instantly moves an actor to the specified location.-!!"},c.setSpriteK1Tooltip=function(){return"!!-Shows or hides the specified actor.-!!"},c.setSpriteTooltip=function(){return"!!-Sets the actor image-!!"},c.setSpriteSizeRandom=function(){return"!!-to a random size-!!"},c.setSpriteSizeVerySmall=function(){return"!!-to a very small size-!!"},c.setSpriteSizeSmall=function(){return"!!-to a small size-!!"},c.setSpriteSizeNormal=function(){return"!!-to a normal size-!!"},c.setSpriteSizeLarge=function(){return"!!-to a large size-!!"},c.setSpriteSizeVeryLarge=function(){return"!!-to a very large size-!!"},c.setSpriteSizeTooltip=function(){return"!!-Sets the size of an actor-!!"},c.setSpriteSpeedRandom=function(){return"!!-to a random speed-!!"},c.setSpriteSpeedVerySlow=function(){return"!!-to a very slow speed-!!"},c.setSpriteSpeedSlow=function(){return"!!-to a slow speed-!!"},c.setSpriteSpeedNormal=function(){return"!!-to a normal speed-!!"},c.setSpriteSpeedFast=function(){return"!!-to a fast speed-!!"},c.setSpriteSpeedVeryFast=function(){return"!!-to a very fast speed-!!"},c.setSpriteSpeedTooltip=function(){return"!!-Sets the speed of an actor-!!"},c.setSpriteZombie=function(){return"!!-to a zombie image-!!"},c.shareStudioTwitter=function(){return"!!-Check out the story I made. I wrote it myself with @codeorg-!!"},c.shareGame=function(){return"!!-Share your story:-!!"},c.showTitleScreen=function(){return"!!-show title screen-!!"},c.showTitleScreenTitle=function(){return"!!-title-!!"},c.showTitleScreenText=function(){return"!!-text-!!"},c.showTSDefTitle=function(){return"!!-type title here-!!"},c.showTSDefText=function(){return"!!-type text here-!!"},c.showTitleScreenTooltip=function(){return"!!-Show a title screen with the associated title and text.-!!"},c.setSprite=function(){return"!!-set-!!"},c.setSpriteN=function(a){return"!!-set actor "+v(a,"spriteIndex")+"-!!"},c.soundCrunch=function(){return"!!-crunch-!!"},c.soundGoal1=function(){return"!!-goal 1-!!"},c.soundGoal2=function(){return"!!-goal 2-!!"},c.soundHit=function(){return"!!-hit-!!"},c.soundLosePoint=function(){return"!!-lose point-!!"},c.soundLosePoint2=function(){return"!!-lose point 2-!!"},c.soundRetro=function(){return"!!-retro-!!"},c.soundRubber=function(){return"!!-rubber-!!"},c.soundSlap=function(){return"!!-slap-!!"},c.soundWinPoint=function(){return"!!-win point-!!"},c.soundWinPoint2=function(){return"!!-win point 2-!!"},c.soundWood=function(){return"!!-wood-!!"},c.speed=function(){return"!!-speed-!!"},c.stopSprite=function(){return"!!-stop-!!"},c.stopSpriteN=function(a){return"!!-stop actor "+v(a,"spriteIndex")+"-!!"},c.stopTooltip=function(){return"!!-Stops an actor's movement.-!!"},c.throwSprite=function(){return"!!-throw-!!"},c.throwSpriteN=function(a){return"!!-actor "+v(a,"spriteIndex")+" throw-!!"},c.throwTooltip=function(){return"!!-Throws a projectile from the specified actor.-!!"},c.vanish=function(){return"!!-vanish-!!"},c.vanishActorN=function(a){return"!!-vanish actor "+v(a,"spriteIndex")+"-!!"},c.vanishTooltip=function(){return"!!-Vanishes the actor.-!!"},c.waitFor=function(){return"!!-wait for-!!"},c.waitSeconds=function(){return"!!-seconds-!!"},c.waitForClick=function(){return"!!-wait for click-!!"},c.waitForRandom=function(){return"!!-wait for random-!!"},c.waitForHalfSecond=function(){return"!!-wait for a half second-!!"},c.waitFor1Second=function(){return"!!-wait for 1 second-!!"},c.waitFor2Seconds=function(){return"!!-wait for 2 seconds-!!"},c.waitFor5Seconds=function(){return"!!-wait for 5 seconds-!!"},c.waitFor10Seconds=function(){return"!!-wait for 10 seconds-!!"},c.waitParamsTooltip=function(){return"!!-Waits for a specified number of seconds or use zero to wait until a click occurs.-!!"},c.waitTooltip=function(){return"!!-Waits for a specified amount of time or until a click occurs.-!!"},c.whenArrowDown=function(){return"!!-down arrow-!!"},c.whenArrowLeft=function(){return"!!-left arrow-!!"},c.whenArrowRight=function(){return"!!-right arrow-!!"},c.whenArrowUp=function(){return"!!-up arrow-!!"},c.whenArrowTooltip=function(){return"!!-Execute the actions below when the specified arrow key is pressed.-!!"},c.whenDown=function(){return"!!-when down arrow-!!"},c.whenDownTooltip=function(){return"!!-Execute the actions below when the down arrow key is pressed.-!!"},c.whenGameStarts=function(){return"!!-when story starts-!!"},c.whenGameStartsTooltip=function(){return"!!-Execute the actions below when the story starts.-!!"},c.whenLeft=function(){return"!!-when left arrow-!!"},c.whenLeftTooltip=function(){return"!!-Execute the actions below when the left arrow key is pressed.-!!"},c.whenRight=function(){return"!!-when right arrow-!!"},c.whenRightTooltip=function(){return"!!-Execute the actions below when the right arrow key is pressed.-!!"},c.whenSpriteClicked=function(){return"!!-when actor clicked-!!"},c.whenSpriteClickedN=function(a){return"!!-when actor "+v(a,"spriteIndex")+" clicked-!!"},c.whenSpriteClickedTooltip=function(){return"!!-Execute the actions below when an actor is clicked.-!!"},c.whenSpriteCollidedN=function(a){return"!!-when actor "+v(a,"spriteIndex")+"-!!"},c.whenSpriteCollidedTooltip=function(){return"!!-Execute the actions below when an actor touches another actor.-!!"},c.whenSpriteCollidedWith=function(){return"!!-touches-!!"},c.whenSpriteCollidedWithN=function(a){return"!!-touches actor "+v(a,"spriteIndex")+"-!!"},c.whenSpriteCollidedWithBlueFireball=function(){return"!!-touches blue fireball-!!"},c.whenSpriteCollidedWithPurpleFireball=function(){return"!!-touches purple fireball-!!"},c.whenSpriteCollidedWithRedFireball=function(){return"!!-touches red fireball-!!"},c.whenSpriteCollidedWithYellowHearts=function(){return"!!-touches yellow hearts-!!"},c.whenSpriteCollidedWithPurpleHearts=function(){return"!!-touches purple hearts-!!"},c.whenSpriteCollidedWithRedHearts=function(){return"!!-touches red hearts-!!"},c.whenSpriteCollidedWithBottomEdge=function(){return"!!-touches bottom edge-!!"},c.whenSpriteCollidedWithLeftEdge=function(){return"!!-touches left edge-!!"},c.whenSpriteCollidedWithRightEdge=function(){return"!!-touches right edge-!!"},c.whenSpriteCollidedWithTopEdge=function(){return"!!-touches top edge-!!"},c.whenUp=function(){return"!!-when up arrow-!!"},c.whenUpTooltip=function(){return"!!-Execute the actions below when the up arrow key is pressed.-!!"},c.yes=function(){return"!!-Yes-!!"}},{messageformat:53}],42:[function(a,b,c){function d(a){return a.substr(1).split("|").reduce(function(a,b){var c=b.split(":"),d=c.shift(),e=c.join(":")||"";return e&&(e=", "+e),"filters."+d+"("+a+e+")"})}function e(a,b,c,d){var e=b.split("\n"),f=Math.max(d-3,0),g=Math.min(e.length,d+3),h=e.slice(f,g).map(function(a,b){var c=b+f+1;return(c==d?" >> ":" ")+c+"| "+a}).join("\n");throw a.path=c,a.message=(c||"ejs")+":"+d+"\n"+h+"\n\n"+a.message,a}function f(a,b){var c=k(i(b),a),d=j(a);return d||(c+=".ejs"),c}var g=a("./utils"),h=a("path"),i=h.dirname,j=h.extname,k=h.join,l=a("fs"),m=l.readFileSync,n=c.filters=a("./filters"),o={};c.clearCache=function(){o={}};var p=(c.parse=function(a,b){var b=b||{},e=b.open||c.open||"<%",g=b.close||c.close||"%>",h=b.filename,i=b.compileDebug!==!1,j="";j+="var buf = [];",!1!==b._with&&(j+="\nwith (locals || {}) { (function(){ "),j+="\n buf.push('";for(var k=1,l=!1,n=0,o=a.length;o>n;++n){var p=a[n];if(a.slice(n,e.length+n)==e){n+=e.length;var q,r,s=(i?"__stack.lineno=":"")+k;switch(a[n]){case"=":q="', escape(("+s+", ",r=")), '",++n;break;case"-":q="', ("+s+", ",r="), '",++n;break;default:q="');"+s+";",r="; buf.push('"}var t=a.indexOf(g,n),u=a.substring(n,t),v=n,w=null,x=0;if("-"==u[u.length-1]&&(u=u.substring(0,u.length-2),l=!0),0==u.trim().indexOf("include")){var y=u.trim().slice(7).trim();if(!h)throw new Error("filename option is required for includes");var z=f(y,h);w=m(z,"utf8"),w=c.parse(w,{filename:z,_with:!1,open:e,close:g,compileDebug:i}),j+="' + (function(){"+w+"})() + '",u=""}for(;~(x=u.indexOf("\n",x));)x++,k++;":"==u.substr(0,1)&&(u=d(u)),u&&(u.lastIndexOf("//")>u.lastIndexOf("\n")&&(u+="\n"),j+=q,j+=u,j+=r),n+=t-v+g.length-1}else"\\"==p?j+="\\\\":"'"==p?j+="\\'":"\r"==p||("\n"==p?l?l=!1:(j+="\\n",k++):j+=p)}return j+=!1!==b._with?"'); })();\n} \nreturn buf.join('');":"');\nreturn buf.join('');"},c.compile=function(a,b){b=b||{};var d=b.escape||g.escape,f=JSON.stringify(a),h=b.compileDebug!==!1,i=b.client,j=b.filename?JSON.stringify(b.filename):"undefined";a=h?["var __stack = { lineno: 1, input: "+f+", filename: "+j+" };",e.toString(),"try {",c.parse(a,b),"} catch (err) {"," rethrow(err, __stack.input, __stack.filename, __stack.lineno);","}"].join("\n"):c.parse(a,b),b.debug&&console.log(a),i&&(a="escape = escape || "+d.toString()+";\n"+a);try{var k=new Function("locals, filters, escape, rethrow",a)}catch(l){throw"SyntaxError"==l.name&&(l.message+=b.filename?" in "+j:" while compiling ejs"),l}return i?k:function(a){return k.call(this,a,n,d,e)}});c.render=function(a,b){var c,b=b||{};if(b.cache){if(!b.filename)throw new Error('"cache" option requires "filename".');c=o[b.filename]||(o[b.filename]=p(a,b))}else c=p(a,b);return b.__proto__=b.locals,c.call(b.scope,b)},c.renderFile=function(a,b,d){var e=a+":string";"function"==typeof b&&(d=b,b={}),b.filename=a;var f;try{f=b.cache?o[e]||(o[e]=m(a,"utf8")):m(a,"utf8")}catch(g){return void d(g)}d(null,c.render(f,b))},c.__express=c.renderFile,a.extensions?a.extensions[".ejs"]=function(a,b){b=b||a.filename;var c={filename:b,client:!0},d=l.readFileSync(b).toString(),e=p(d,c);a._compile("module.exports = "+e.toString()+";",b)}:a.registerExtension&&a.registerExtension(".ejs",function(a){return p(a,{})})},{"./filters":43,"./utils":44,fs:45,path:46}],43:[function(a,b,c){c.first=function(a){return a[0]},c.last=function(a){return a[a.length-1]},c.capitalize=function(a){return a=String(a),a[0].toUpperCase()+a.substr(1,a.length)},c.downcase=function(a){return String(a).toLowerCase()},c.upcase=function(a){return String(a).toUpperCase()},c.sort=function(a){return Object.create(a).sort()},c.sort_by=function(a,b){return Object.create(a).sort(function(a,c){return a=a[b],c=c[b],a>c?1:c>a?-1:0})},c.size=c.length=function(a){return a.length},c.plus=function(a,b){return Number(a)+Number(b)},c.minus=function(a,b){return Number(a)-Number(b)},c.times=function(a,b){return Number(a)*Number(b)},c.divided_by=function(a,b){return Number(a)/Number(b)},c.join=function(a,b){return a.join(b||", ")},c.truncate=function(a,b,c){return a=String(a),a.length>b&&(a=a.slice(0,b),c&&(a+=c)),a},c.truncate_words=function(a,b){var a=String(a),c=a.split(/ +/);return c.slice(0,b).join(" ")},c.replace=function(a,b,c){return String(a).replace(b,c||"")},c.prepend=function(a,b){return Array.isArray(a)?[b].concat(a):b+a},c.append=function(a,b){return Array.isArray(a)?a.concat(b):a+b},c.map=function(a,b){return a.map(function(a){return a[b]})},c.reverse=function(a){return Array.isArray(a)?a.reverse():String(a).split("").reverse().join("")},c.get=function(a,b){return a[b]},c.json=function(a){return JSON.stringify(a)}},{}],44:[function(a,b,c){c.escape=function(a){return String(a).replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}},{}],45:[function(){},{}],46:[function(a,b,c){(function(a){function b(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function d(a,b){if(a.filter)return a.filter(b);for(var c=[],d=0;d=-1&&!e;f--){var g=f>=0?arguments[f]:a.cwd();if("string"!=typeof g)throw new TypeError("Arguments to path.resolve must be strings");g&&(c=g+"/"+c,e="/"===g.charAt(0))}return c=b(d(c.split("/"),function(a){return!!a}),!e).join("/"),(e?"/":"")+c||"."},c.normalize=function(a){var e=c.isAbsolute(a),f="/"===g(a,-1);return a=b(d(a.split("/"),function(a){return!!a}),!e).join("/"),a||e||(a="."),a&&f&&(a+="/"),(e?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(d(a,function(a){if("string"!=typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;ib&&(b=a.length+b),a.substr(b,c)}}).call(this,a("JkpR2F"))},{JkpR2F:47}],47:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],48:[function(a,b,c){(function(a){!function(d){function e(a){throw RangeError(H[a])}function f(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function g(a,b){return f(a.split(G),b).join(".")}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function i(a){return f(a,function(a){var b="";return a>65535&&(a-=65536,b+=K(a>>>10&1023|55296),a=56320|1023&a),b+=K(a)}).join("")}function j(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:w}function k(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;for(a=c?J(a/A):a>>1,a+=J(a/b);a>I*y>>1;d+=w)a=J(a/I);return J(d+(I+1)*a/(a+z))}function m(a){var b,c,d,f,g,h,k,m,n,o,p=[],q=a.length,r=0,s=C,t=B;for(c=a.lastIndexOf(D),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&e("not-basic"),p.push(a.charCodeAt(d));for(f=c>0?c+1:0;q>f;){for(g=r,h=1,k=w;f>=q&&e("invalid-input"),m=j(a.charCodeAt(f++)),(m>=w||m>J((v-r)/h))&&e("overflow"),r+=m*h,n=t>=k?x:k>=t+y?y:k-t,!(n>m);k+=w)o=w-n,h>J(v/o)&&e("overflow"),h*=o;b=p.length+1,t=l(r-g,b,0==g),J(r/b)>v-s&&e("overflow"),s+=J(r/b),r%=b,p.splice(r++,0,s)}return i(p)}function n(a){var b,c,d,f,g,i,j,m,n,o,p,q,r,s,t,u=[];for(a=h(a),q=a.length,b=C,c=0,g=B,i=0;q>i;++i)p=a[i],128>p&&u.push(K(p));for(d=f=u.length,f&&u.push(D);q>d;){for(j=v,i=0;q>i;++i)p=a[i],p>=b&&j>p&&(j=p);for(r=d+1,j-b>J((v-c)/r)&&e("overflow"),c+=(j-b)*r,b=j,i=0;q>i;++i)if(p=a[i],b>p&&++c>v&&e("overflow"),p==b){for(m=c,n=w;o=g>=n?x:n>=g+y?y:n-g,!(o>m);n+=w)t=m-o,s=w-o,u.push(K(k(o+t%s,0))),m=J(t/s);u.push(K(k(m,0))),g=l(c,r,d==f),c=0,++d}++c,++b}return u.join("")}function o(a){return g(a,function(a){return E.test(a)?m(a.slice(4).toLowerCase()):a})}function p(a){return g(a,function(a){return F.test(a)?"xn--"+n(a):a})}var q="object"==typeof c&&c,r="object"==typeof b&&b&&b.exports==q&&b,s="object"==typeof a&&a;(s.global===s||s.window===s)&&(d=s);var t,u,v=2147483647,w=36,x=1,y=26,z=38,A=700,B=72,C=128,D="-",E=/^xn--/,F=/[^ -~]/,G=/\x2E|\u3002|\uFF0E|\uFF61/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=w-x,J=Math.floor,K=String.fromCharCode;if(t={version:"1.2.4",ucs2:{decode:h,encode:i},decode:m,encode:n,toASCII:p,toUnicode:o},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return t});else if(q&&!q.nodeType)if(r)r.exports=t;else for(u in t)t.hasOwnProperty(u)&&(q[u]=t[u]);else d.punycode=t}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],50:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d blocks.-!!"},c.tooMuchWork=function(){return"!!-You made me do a lot of work! Could you try repeating fewer times?-!!"},c.toolboxHeader=function(){return"!!-Blocks-!!"},c.openWorkspace=function(){return"!!-How It Works-!!"},c.totalNumLinesOfCodeWritten=function(a){return"!!-All-time total: "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code.-!!"},c.tryAgain=function(){return"!!-Try again-!!"},c.hintRequest=function(){return"!!-See hint-!!"},c.backToPreviousLevel=function(){return"!!-Back to previous level-!!"},c.saveToGallery=function(){return"!!-Save to your gallery-!!"},c.savedToGallery=function(){return"!!-Saved to your gallery!-!!"},c.typeCode=function(){return"!!-Type your JavaScript code below these instructions.-!!"},c.typeFuncs=function(){return"!!-Available functions:%1-!!"},c.typeHint=function(){return"!!-Note that the parentheses and semicolons are required.-!!"},c.workspaceHeader=function(){return"!!-Assemble your blocks here: -!!"},c.infinity=function(){return"!!-Infinity-!!"},c.rotateText=function(){return"!!-Rotate your device.-!!"},c.orientationLock=function(){return"!!-Turn off orientation lock in device settings.-!!"},c.wantToLearn=function(){return"!!-Want to learn to code?-!!"},c.watchVideo=function(){return"!!-Watch the Video-!!"},c.when=function(){return"!!-when-!!"},c.whenRun=function(){return"!!-when run-!!"},c.tryHOC=function(){return"!!-Try the Hour of Code-!!"},c.signup=function(){return"!!-Sign up for the intro course-!!"},c.hintHeader=function(){return"!!-Here's a tip:-!!"},c.genericFeedback=function(){return"!!-See how you ended up, and try to fix your program.-!!"}},{messageformat:53}],41:[function(a,b,c){var d=a("messageformat");d.locale.en=function(a){return 1===a?"one":"other"},c.actor=function(){return"!!-actor-!!"},c.catActions=function(){return"!!-Actions-!!"},c.catControl=function(){return"!!-Loops-!!"},c.catEvents=function(){return"!!-Events-!!"},c.catLogic=function(){return"!!-Logic-!!"},c.catMath=function(){return"!!-Math-!!"},c.catProcedures=function(){return"!!-Functions-!!"},c.catText=function(){return"!!-Text-!!"},c.catVariables=function(){return"!!-Variables-!!"},c.changeScoreTooltip=function(){return"!!-Add or remove a point to the score.-!!"},c.changeScoreTooltipK1=function(){return"!!-Add a point to the score.-!!"},c.continue=function(){return"!!-Continue-!!"},c.decrementPlayerScore=function(){return"!!-remove point-!!"},c.defaultSayText=function(){return"!!-type here-!!"},c.emotion=function(){return"!!-mood-!!"},c.finalLevel=function(){return"!!-Congratulations! You have solved the final puzzle.-!!"},c.hello=function(){return"!!-hello-!!"},c.helloWorld=function(){return"!!-Hello World!-!!"},c.incrementPlayerScore=function(){return"!!-score point-!!"},c.makeProjectileDisappear=function(){return"!!-disappear-!!"},c.makeProjectileBounce=function(){return"!!-bounce-!!"},c.makeProjectileBlueFireball=function(){return"!!-make blue fireball-!!"},c.makeProjectilePurpleFireball=function(){return"!!-make purple fireball-!!"},c.makeProjectileRedFireball=function(){return"!!-make red fireball-!!"},c.makeProjectileYellowHearts=function(){return"!!-make yellow hearts-!!"},c.makeProjectilePurpleHearts=function(){return"!!-make purple hearts-!!"},c.makeProjectileRedHearts=function(){return"!!-make red hearts-!!"},c.makeProjectileTooltip=function(){return"!!-Make the projectile that just collided disappear or bounce.-!!"},c.makeYourOwn=function(){return"!!-Make Your Own Play Lab App-!!"},c.moveDirectionDown=function(){return"!!-down-!!"},c.moveDirectionLeft=function(){return"!!-left-!!"},c.moveDirectionRight=function(){return"!!-right-!!"},c.moveDirectionUp=function(){return"!!-up-!!"},c.moveDirectionRandom=function(){return"!!-random-!!"},c.moveDistance25=function(){return"!!-25 pixels-!!"},c.moveDistance50=function(){return"!!-50 pixels-!!"},c.moveDistance100=function(){return"!!-100 pixels-!!"},c.moveDistance200=function(){return"!!-200 pixels-!!"},c.moveDistance400=function(){return"!!-400 pixels-!!"},c.moveDistancePixels=function(){return"!!-pixels-!!"},c.moveDistanceRandom=function(){return"!!-random pixels-!!"},c.moveDistanceTooltip=function(){return"!!-Move an actor a specific distance in the specified direction.-!!"},c.moveSprite=function(){return"!!-move-!!"},c.moveSpriteN=function(a){return"!!-move actor "+v(a,"spriteIndex")+"-!!"},c.moveDown=function(){return"!!-move down-!!"},c.moveDownTooltip=function(){return"!!-Move an actor down.-!!"},c.moveLeft=function(){return"!!-move left-!!"},c.moveLeftTooltip=function(){return"!!-Move an actor to the left.-!!"},c.moveRight=function(){return"!!-move right-!!"},c.moveRightTooltip=function(){return"!!-Move an actor to the right.-!!"},c.moveUp=function(){return"!!-move up-!!"},c.moveUpTooltip=function(){return"!!-Move an actor up.-!!"},c.moveTooltip=function(){return"!!-Move an actor.-!!"},c.nextLevel=function(){return"!!-Congratulations! You have completed this puzzle.-!!"},c.no=function(){return"!!-No-!!"},c.numBlocksNeeded=function(){return"!!-This puzzle can be solved with %1 blocks.-!!"},c.ouchExclamation=function(){return"!!-Ouch!-!!"},c.playSoundCrunch=function(){return"!!-play crunch sound-!!"},c.playSoundGoal1=function(){return"!!-play goal 1 sound-!!"},c.playSoundGoal2=function(){return"!!-play goal 2 sound-!!"},c.playSoundHit=function(){return"!!-play hit sound-!!"},c.playSoundLosePoint=function(){return"!!-play lose point sound-!!"},c.playSoundLosePoint2=function(){return"!!-play lose point 2 sound-!!"},c.playSoundRetro=function(){return"!!-play retro sound-!!"},c.playSoundRubber=function(){return"!!-play rubber sound-!!"},c.playSoundSlap=function(){return"!!-play slap sound-!!"},c.playSoundTooltip=function(){return"!!-Play the chosen sound.-!!"},c.playSoundWinPoint=function(){return"!!-play win point sound-!!"},c.playSoundWinPoint2=function(){return"!!-play win point 2 sound-!!"},c.playSoundWood=function(){return"!!-play wood sound-!!"},c.positionOutTopLeft=function(){return"!!-to the above top left position-!!"},c.positionOutTopRight=function(){return"!!-to the above top right position-!!"},c.positionTopOutLeft=function(){return"!!-to the top outside left position-!!"},c.positionTopLeft=function(){return"!!-to the top left position-!!"},c.positionTopCenter=function(){return"!!-to the top center position-!!"},c.positionTopRight=function(){return"!!-to the top right position-!!"},c.positionTopOutRight=function(){return"!!-to the top outside right position-!!"},c.positionMiddleLeft=function(){return"!!-to the middle left position-!!"},c.positionMiddleCenter=function(){return"!!-to the middle center position-!!"},c.positionMiddleRight=function(){return"!!-to the middle right position-!!"},c.positionBottomOutLeft=function(){return"!!-to the bottom outside left position-!!"},c.positionBottomLeft=function(){return"!!-to the bottom left position-!!"},c.positionBottomCenter=function(){return"!!-to the bottom center position-!!"},c.positionBottomRight=function(){return"!!-to the bottom right position-!!"},c.positionBottomOutRight=function(){return"!!-to the bottom outside right position-!!"},c.positionOutBottomLeft=function(){return"!!-to the below bottom left position-!!"},c.positionOutBottomRight=function(){return"!!-to the below bottom right position-!!"},c.positionRandom=function(){return"!!-to the random position-!!"},c.projectileBlueFireball=function(){return"!!-blue fireball-!!"},c.projectilePurpleFireball=function(){return"!!-purple fireball-!!"},c.projectileRedFireball=function(){return"!!-red fireball-!!"},c.projectileYellowHearts=function(){return"!!-yellow hearts-!!"},c.projectilePurpleHearts=function(){return"!!-purple hearts-!!"},c.projectileRedHearts=function(){return"!!-red hearts-!!"},c.projectileRandom=function(){return"!!-random-!!"},c.reinfFeedbackMsg=function(){return'!!-You can press the "Try again" button to go back to playing your story.-!!'},c.repeatForever=function(){return"!!-repeat forever-!!"},c.repeatDo=function(){return"!!-do-!!"},c.repeatForeverTooltip=function(){return"!!-Execute the actions in this block repeatedly while the story is running.-!!"},c.saySprite=function(){return"!!-say-!!"},c.saySpriteN=function(a){return"!!-actor "+v(a,"spriteIndex")+" say-!!"},c.saySpriteTooltip=function(){return"!!-Pop up a speech bubble with the associated text from the specified actor.-!!"},c.scoreText=function(a){return"!!-Score: "+v(a,"playerScore")+"-!!"},c.setBackground=function(){return"!!-set background-!!"},c.setBackgroundRandom=function(){return"!!-set random background-!!"},c.setBackgroundBlack=function(){return"!!-set black background-!!"},c.setBackgroundCave=function(){return"!!-set cave background-!!"},c.setBackgroundCloudy=function(){return"!!-set cloudy background-!!"},c.setBackgroundHardcourt=function(){return"!!-set hardcourt background-!!"},c.setBackgroundNight=function(){return"!!-set night background-!!"},c.setBackgroundUnderwater=function(){return"!!-set underwater background-!!"},c.setBackgroundCity=function(){return"!!-set city background-!!"},c.setBackgroundDesert=function(){return"!!-set desert background-!!"},c.setBackgroundRainbow=function(){return"!!-set rainbow background-!!"},c.setBackgroundSoccer=function(){return"!!-set soccer background-!!"},c.setBackgroundSpace=function(){return"!!-set space background-!!"},c.setBackgroundTennis=function(){return"!!-set tennis background-!!"},c.setBackgroundWinter=function(){return"!!-set winter background-!!"},c.setBackgroundTooltip=function(){return"!!-Sets the background image-!!"},c.setScoreText=function(){return"!!-set score-!!"},c.setScoreTextTooltip=function(){return"!!-Sets the text to be displayed in the score area.-!!"},c.setSpriteEmotionAngry=function(){return"!!-to a angry mood-!!"},c.setSpriteEmotionHappy=function(){return"!!-to a happy mood-!!"},c.setSpriteEmotionNormal=function(){return"!!-to a normal mood-!!"},c.setSpriteEmotionRandom=function(){return"!!-to a random mood-!!"},c.setSpriteEmotionSad=function(){return"!!-to a sad mood-!!"},c.setSpriteEmotionTooltip=function(){return"!!-Sets the actor mood-!!"},c.setSpriteAlien=function(){return"!!-to an alien image-!!"},c.setSpriteBat=function(){return"!!-to a bat image-!!"},c.setSpriteBird=function(){return"!!-to a bird image-!!"},c.setSpriteCat=function(){return"!!-to a cat image-!!"},c.setSpriteCaveBoy=function(){return"!!-to a cave boy image-!!"},c.setSpriteCaveGirl=function(){return"!!-to a cave girl image-!!"},c.setSpriteDinosaur=function(){return"!!-to a dinosaur image-!!"},c.setSpriteDog=function(){return"!!-to a dog image-!!"},c.setSpriteDragon=function(){return"!!-to a dragon image-!!"},c.setSpriteGhost=function(){return"!!-to a ghost image-!!"},c.setSpriteHidden=function(){return"!!-to a hidden image-!!"},c.setSpriteHideK1=function(){return"!!-hide-!!"},c.setSpriteKnight=function(){return"!!-to a knight image-!!"},c.setSpriteMonster=function(){return"!!-to a monster image-!!"},c.setSpriteNinja=function(){return"!!-to a masked ninja image-!!"},c.setSpriteOctopus=function(){return"!!-to an octopus image-!!"},c.setSpritePenguin=function(){return"!!-to a penguin image-!!"},c.setSpritePirate=function(){return"!!-to a pirate image-!!"},c.setSpritePrincess=function(){return"!!-to a princess image-!!"},c.setSpriteRandom=function(){return"!!-to a random image-!!"},c.setSpriteRobot=function(){return"!!-to a robot image-!!"},c.setSpriteShowK1=function(){return"!!-show-!!"},c.setSpriteSpacebot=function(){return"!!-to a spacebot image-!!"},c.setSpriteSoccerGirl=function(){return"!!-to a soccer girl image-!!"},c.setSpriteSoccerBoy=function(){return"!!-to a soccer boy image-!!"},c.setSpriteSquirrel=function(){return"!!-to a squirrel image-!!"},c.setSpriteTennisGirl=function(){return"!!-to a tennis girl image-!!"},c.setSpriteTennisBoy=function(){return"!!-to a tennis boy image-!!"},c.setSpriteUnicorn=function(){return"!!-to a unicorn image-!!"},c.setSpriteWitch=function(){return"!!-to a witch image-!!"},c.setSpriteWizard=function(){return"!!-to a wizard image-!!"},c.setSpritePositionTooltip=function(){return"!!-Instantly moves an actor to the specified location.-!!"},c.setSpriteK1Tooltip=function(){return"!!-Shows or hides the specified actor.-!!"},c.setSpriteTooltip=function(){return"!!-Sets the actor image-!!"},c.setSpriteSizeRandom=function(){return"!!-to a random size-!!"},c.setSpriteSizeVerySmall=function(){return"!!-to a very small size-!!"},c.setSpriteSizeSmall=function(){return"!!-to a small size-!!"},c.setSpriteSizeNormal=function(){return"!!-to a normal size-!!"},c.setSpriteSizeLarge=function(){return"!!-to a large size-!!"},c.setSpriteSizeVeryLarge=function(){return"!!-to a very large size-!!"},c.setSpriteSizeTooltip=function(){return"!!-Sets the size of an actor-!!"},c.setSpriteSpeedRandom=function(){return"!!-to a random speed-!!"},c.setSpriteSpeedVerySlow=function(){return"!!-to a very slow speed-!!"},c.setSpriteSpeedSlow=function(){return"!!-to a slow speed-!!"},c.setSpriteSpeedNormal=function(){return"!!-to a normal speed-!!"},c.setSpriteSpeedFast=function(){return"!!-to a fast speed-!!"},c.setSpriteSpeedVeryFast=function(){return"!!-to a very fast speed-!!"},c.setSpriteSpeedTooltip=function(){return"!!-Sets the speed of an actor-!!"},c.setSpriteZombie=function(){return"!!-to a zombie image-!!"},c.shareStudioTwitter=function(){return"!!-Check out the story I made. I wrote it myself with @codeorg-!!"},c.shareGame=function(){return"!!-Share your story:-!!"},c.showTitleScreen=function(){return"!!-show title screen-!!"},c.showTitleScreenTitle=function(){return"!!-title-!!"},c.showTitleScreenText=function(){return"!!-text-!!"},c.showTSDefTitle=function(){return"!!-type title here-!!"},c.showTSDefText=function(){return"!!-type text here-!!"},c.showTitleScreenTooltip=function(){return"!!-Show a title screen with the associated title and text.-!!"},c.setSprite=function(){return"!!-set-!!"},c.setSpriteN=function(a){return"!!-set actor "+v(a,"spriteIndex")+"-!!"},c.soundCrunch=function(){return"!!-crunch-!!"},c.soundGoal1=function(){return"!!-goal 1-!!"},c.soundGoal2=function(){return"!!-goal 2-!!"},c.soundHit=function(){return"!!-hit-!!"},c.soundLosePoint=function(){return"!!-lose point-!!"},c.soundLosePoint2=function(){return"!!-lose point 2-!!"},c.soundRetro=function(){return"!!-retro-!!"},c.soundRubber=function(){return"!!-rubber-!!"},c.soundSlap=function(){return"!!-slap-!!"},c.soundWinPoint=function(){return"!!-win point-!!"},c.soundWinPoint2=function(){return"!!-win point 2-!!"},c.soundWood=function(){return"!!-wood-!!"},c.speed=function(){return"!!-speed-!!"},c.stopSprite=function(){return"!!-stop-!!"},c.stopSpriteN=function(a){return"!!-stop actor "+v(a,"spriteIndex")+"-!!"},c.stopTooltip=function(){return"!!-Stops an actor's movement.-!!"},c.throwSprite=function(){return"!!-throw-!!"},c.throwSpriteN=function(a){return"!!-actor "+v(a,"spriteIndex")+" throw-!!"},c.throwTooltip=function(){return"!!-Throws a projectile from the specified actor.-!!"},c.vanish=function(){return"!!-vanish-!!"},c.vanishActorN=function(a){return"!!-vanish actor "+v(a,"spriteIndex")+"-!!"},c.vanishTooltip=function(){return"!!-Vanishes the actor.-!!"},c.waitFor=function(){return"!!-wait for-!!"},c.waitSeconds=function(){return"!!-seconds-!!"},c.waitForClick=function(){return"!!-wait for click-!!"},c.waitForRandom=function(){return"!!-wait for random-!!"},c.waitForHalfSecond=function(){return"!!-wait for a half second-!!"},c.waitFor1Second=function(){return"!!-wait for 1 second-!!"},c.waitFor2Seconds=function(){return"!!-wait for 2 seconds-!!"},c.waitFor5Seconds=function(){return"!!-wait for 5 seconds-!!"},c.waitFor10Seconds=function(){return"!!-wait for 10 seconds-!!"},c.waitParamsTooltip=function(){return"!!-Waits for a specified number of seconds or use zero to wait until a click occurs.-!!"},c.waitTooltip=function(){return"!!-Waits for a specified amount of time or until a click occurs.-!!"},c.whenArrowDown=function(){return"!!-down arrow-!!"},c.whenArrowLeft=function(){return"!!-left arrow-!!"},c.whenArrowRight=function(){return"!!-right arrow-!!"},c.whenArrowUp=function(){return"!!-up arrow-!!"},c.whenArrowTooltip=function(){return"!!-Execute the actions below when the specified arrow key is pressed.-!!"},c.whenDown=function(){return"!!-when down arrow-!!"},c.whenDownTooltip=function(){return"!!-Execute the actions below when the down arrow key is pressed.-!!"},c.whenGameStarts=function(){return"!!-when story starts-!!"},c.whenGameStartsTooltip=function(){return"!!-Execute the actions below when the story starts.-!!"},c.whenLeft=function(){return"!!-when left arrow-!!"},c.whenLeftTooltip=function(){return"!!-Execute the actions below when the left arrow key is pressed.-!!"},c.whenRight=function(){return"!!-when right arrow-!!"},c.whenRightTooltip=function(){return"!!-Execute the actions below when the right arrow key is pressed.-!!"},c.whenSpriteClicked=function(){return"!!-when actor clicked-!!"},c.whenSpriteClickedN=function(a){return"!!-when actor "+v(a,"spriteIndex")+" clicked-!!"},c.whenSpriteClickedTooltip=function(){return"!!-Execute the actions below when an actor is clicked.-!!"},c.whenSpriteCollidedN=function(a){return"!!-when actor "+v(a,"spriteIndex")+"-!!"},c.whenSpriteCollidedTooltip=function(){return"!!-Execute the actions below when an actor touches another actor.-!!"},c.whenSpriteCollidedWith=function(){return"!!-touches-!!"},c.whenSpriteCollidedWithN=function(a){return"!!-touches actor "+v(a,"spriteIndex")+"-!!"},c.whenSpriteCollidedWithBlueFireball=function(){return"!!-touches blue fireball-!!"},c.whenSpriteCollidedWithPurpleFireball=function(){return"!!-touches purple fireball-!!"},c.whenSpriteCollidedWithRedFireball=function(){return"!!-touches red fireball-!!"},c.whenSpriteCollidedWithYellowHearts=function(){return"!!-touches yellow hearts-!!"},c.whenSpriteCollidedWithPurpleHearts=function(){return"!!-touches purple hearts-!!"},c.whenSpriteCollidedWithRedHearts=function(){return"!!-touches red hearts-!!"},c.whenSpriteCollidedWithBottomEdge=function(){return"!!-touches bottom edge-!!"},c.whenSpriteCollidedWithLeftEdge=function(){return"!!-touches left edge-!!"},c.whenSpriteCollidedWithRightEdge=function(){return"!!-touches right edge-!!"},c.whenSpriteCollidedWithTopEdge=function(){return"!!-touches top edge-!!"},c.whenUp=function(){return"!!-when up arrow-!!"},c.whenUpTooltip=function(){return"!!-Execute the actions below when the up arrow key is pressed.-!!"},c.yes=function(){return"!!-Yes-!!"}},{messageformat:53}],42:[function(a,b,c){function d(a){return a.substr(1).split("|").reduce(function(a,b){var c=b.split(":"),d=c.shift(),e=c.join(":")||"";return e&&(e=", "+e),"filters."+d+"("+a+e+")"})}function e(a,b,c,d){var e=b.split("\n"),f=Math.max(d-3,0),g=Math.min(e.length,d+3),h=e.slice(f,g).map(function(a,b){var c=b+f+1;return(c==d?" >> ":" ")+c+"| "+a}).join("\n");throw a.path=c,a.message=(c||"ejs")+":"+d+"\n"+h+"\n\n"+a.message,a}function f(a,b){var c=k(i(b),a),d=j(a);return d||(c+=".ejs"),c}var g=a("./utils"),h=a("path"),i=h.dirname,j=h.extname,k=h.join,l=a("fs"),m=l.readFileSync,n=c.filters=a("./filters"),o={};c.clearCache=function(){o={}};var p=(c.parse=function(a,b){var b=b||{},e=b.open||c.open||"<%",g=b.close||c.close||"%>",h=b.filename,i=b.compileDebug!==!1,j="";j+="var buf = [];",!1!==b._with&&(j+="\nwith (locals || {}) { (function(){ "),j+="\n buf.push('";for(var k=1,l=!1,n=0,o=a.length;o>n;++n){var p=a[n];if(a.slice(n,e.length+n)==e){n+=e.length;var q,r,s=(i?"__stack.lineno=":"")+k;switch(a[n]){case"=":q="', escape(("+s+", ",r=")), '",++n;break;case"-":q="', ("+s+", ",r="), '",++n;break;default:q="');"+s+";",r="; buf.push('"}var t=a.indexOf(g,n),u=a.substring(n,t),v=n,w=null,x=0;if("-"==u[u.length-1]&&(u=u.substring(0,u.length-2),l=!0),0==u.trim().indexOf("include")){var y=u.trim().slice(7).trim();if(!h)throw new Error("filename option is required for includes");var z=f(y,h);w=m(z,"utf8"),w=c.parse(w,{filename:z,_with:!1,open:e,close:g,compileDebug:i}),j+="' + (function(){"+w+"})() + '",u=""}for(;~(x=u.indexOf("\n",x));)x++,k++;":"==u.substr(0,1)&&(u=d(u)),u&&(u.lastIndexOf("//")>u.lastIndexOf("\n")&&(u+="\n"),j+=q,j+=u,j+=r),n+=t-v+g.length-1}else"\\"==p?j+="\\\\":"'"==p?j+="\\'":"\r"==p||("\n"==p?l?l=!1:(j+="\\n",k++):j+=p)}return j+=!1!==b._with?"'); })();\n} \nreturn buf.join('');":"');\nreturn buf.join('');"},c.compile=function(a,b){b=b||{};var d=b.escape||g.escape,f=JSON.stringify(a),h=b.compileDebug!==!1,i=b.client,j=b.filename?JSON.stringify(b.filename):"undefined";a=h?["var __stack = { lineno: 1, input: "+f+", filename: "+j+" };",e.toString(),"try {",c.parse(a,b),"} catch (err) {"," rethrow(err, __stack.input, __stack.filename, __stack.lineno);","}"].join("\n"):c.parse(a,b),b.debug&&console.log(a),i&&(a="escape = escape || "+d.toString()+";\n"+a);try{var k=new Function("locals, filters, escape, rethrow",a)}catch(l){throw"SyntaxError"==l.name&&(l.message+=b.filename?" in "+j:" while compiling ejs"),l}return i?k:function(a){return k.call(this,a,n,d,e)}});c.render=function(a,b){var c,b=b||{};if(b.cache){if(!b.filename)throw new Error('"cache" option requires "filename".');c=o[b.filename]||(o[b.filename]=p(a,b))}else c=p(a,b);return b.__proto__=b.locals,c.call(b.scope,b)},c.renderFile=function(a,b,d){var e=a+":string";"function"==typeof b&&(d=b,b={}),b.filename=a;var f;try{f=b.cache?o[e]||(o[e]=m(a,"utf8")):m(a,"utf8")}catch(g){return void d(g)}d(null,c.render(f,b))},c.__express=c.renderFile,a.extensions?a.extensions[".ejs"]=function(a,b){b=b||a.filename;var c={filename:b,client:!0},d=l.readFileSync(b).toString(),e=p(d,c);a._compile("module.exports = "+e.toString()+";",b)}:a.registerExtension&&a.registerExtension(".ejs",function(a){return p(a,{})})},{"./filters":43,"./utils":44,fs:45,path:46}],43:[function(a,b,c){c.first=function(a){return a[0]},c.last=function(a){return a[a.length-1]},c.capitalize=function(a){return a=String(a),a[0].toUpperCase()+a.substr(1,a.length)},c.downcase=function(a){return String(a).toLowerCase()},c.upcase=function(a){return String(a).toUpperCase()},c.sort=function(a){return Object.create(a).sort()},c.sort_by=function(a,b){return Object.create(a).sort(function(a,c){return a=a[b],c=c[b],a>c?1:c>a?-1:0})},c.size=c.length=function(a){return a.length},c.plus=function(a,b){return Number(a)+Number(b)},c.minus=function(a,b){return Number(a)-Number(b)},c.times=function(a,b){return Number(a)*Number(b)},c.divided_by=function(a,b){return Number(a)/Number(b)},c.join=function(a,b){return a.join(b||", ")},c.truncate=function(a,b,c){return a=String(a),a.length>b&&(a=a.slice(0,b),c&&(a+=c)),a},c.truncate_words=function(a,b){var a=String(a),c=a.split(/ +/);return c.slice(0,b).join(" ")},c.replace=function(a,b,c){return String(a).replace(b,c||"")},c.prepend=function(a,b){return Array.isArray(a)?[b].concat(a):b+a},c.append=function(a,b){return Array.isArray(a)?a.concat(b):a+b},c.map=function(a,b){return a.map(function(a){return a[b]})},c.reverse=function(a){return Array.isArray(a)?a.reverse():String(a).split("").reverse().join("")},c.get=function(a,b){return a[b]},c.json=function(a){return JSON.stringify(a)}},{}],44:[function(a,b,c){c.escape=function(a){return String(a).replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}},{}],45:[function(){},{}],46:[function(a,b,c){(function(a){function b(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function d(a,b){if(a.filter)return a.filter(b);for(var c=[],d=0;d=-1&&!e;f--){var g=f>=0?arguments[f]:a.cwd();if("string"!=typeof g)throw new TypeError("Arguments to path.resolve must be strings");g&&(c=g+"/"+c,e="/"===g.charAt(0))}return c=b(d(c.split("/"),function(a){return!!a}),!e).join("/"),(e?"/":"")+c||"."},c.normalize=function(a){var e=c.isAbsolute(a),f="/"===g(a,-1);return a=b(d(a.split("/"),function(a){return!!a}),!e).join("/"),a||e||(a="."),a&&f&&(a+="/"),(e?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(d(a,function(a){if("string"!=typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;ib&&(b=a.length+b),a.substr(b,c)}}).call(this,a("JkpR2F"))},{JkpR2F:47}],47:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],48:[function(a,b,c){(function(a){!function(d){function e(a){throw RangeError(H[a])}function f(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function g(a,b){return f(a.split(G),b).join(".")}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function i(a){return f(a,function(a){var b="";return a>65535&&(a-=65536,b+=K(a>>>10&1023|55296),a=56320|1023&a),b+=K(a)}).join("")}function j(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:w}function k(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;for(a=c?J(a/A):a>>1,a+=J(a/b);a>I*y>>1;d+=w)a=J(a/I);return J(d+(I+1)*a/(a+z))}function m(a){var b,c,d,f,g,h,k,m,n,o,p=[],q=a.length,r=0,s=C,t=B;for(c=a.lastIndexOf(D),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&e("not-basic"),p.push(a.charCodeAt(d));for(f=c>0?c+1:0;q>f;){for(g=r,h=1,k=w;f>=q&&e("invalid-input"),m=j(a.charCodeAt(f++)),(m>=w||m>J((v-r)/h))&&e("overflow"),r+=m*h,n=t>=k?x:k>=t+y?y:k-t,!(n>m);k+=w)o=w-n,h>J(v/o)&&e("overflow"),h*=o;b=p.length+1,t=l(r-g,b,0==g),J(r/b)>v-s&&e("overflow"),s+=J(r/b),r%=b,p.splice(r++,0,s)}return i(p)}function n(a){var b,c,d,f,g,i,j,m,n,o,p,q,r,s,t,u=[];for(a=h(a),q=a.length,b=C,c=0,g=B,i=0;q>i;++i)p=a[i],128>p&&u.push(K(p));for(d=f=u.length,f&&u.push(D);q>d;){for(j=v,i=0;q>i;++i)p=a[i],p>=b&&j>p&&(j=p);for(r=d+1,j-b>J((v-c)/r)&&e("overflow"),c+=(j-b)*r,b=j,i=0;q>i;++i)if(p=a[i],b>p&&++c>v&&e("overflow"),p==b){for(m=c,n=w;o=g>=n?x:n>=g+y?y:n-g,!(o>m);n+=w)t=m-o,s=w-o,u.push(K(k(o+t%s,0))),m=J(t/s);u.push(K(k(m,0))),g=l(c,r,d==f),c=0,++d}++c,++b}return u.join("")}function o(a){return g(a,function(a){return E.test(a)?m(a.slice(4).toLowerCase()):a})}function p(a){return g(a,function(a){return F.test(a)?"xn--"+n(a):a})}var q="object"==typeof c&&c,r="object"==typeof b&&b&&b.exports==q&&b,s="object"==typeof a&&a;(s.global===s||s.window===s)&&(d=s);var t,u,v=2147483647,w=36,x=1,y=26,z=38,A=700,B=72,C=128,D="-",E=/^xn--/,F=/[^ -~]/,G=/\x2E|\u3002|\uFF0E|\uFF61/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=w-x,J=Math.floor,K=String.fromCharCode;if(t={version:"1.2.4",ucs2:{decode:h,encode:i},decode:m,encode:n,toASCII:p,toUnicode:o},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return t});else if(q&&!q.nodeType)if(r)r.exports=t;else for(u in t)t.hasOwnProperty(u)&&(q[u]=t[u]);else d.punycode=t}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],50:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var q=this.hostname.split(/\./),j=0,B=q.length;B>j;j++){var C=q[j];if(C&&!C.match(v)){for(var D="",E=0,F=C.length;F>E;E++)D+=C.charCodeAt(E)>127?"x":C[E];if(!D.match(v)){var G=q.slice(0,j),H=q.slice(j+1),I=C.match(w);I&&(G.push(I[1]),H.unshift(I[2])),H.length&&(d="/"+H.join(".")+d),this.hostname=G.join(".");break}}}if(this.hostname=this.hostname.length>u?"":this.hostname.toLowerCase(),!p){for(var J=this.hostname.split("."),K=[],j=0;jj;j++){var O=r[j],P=encodeURIComponent(O);P===O&&(P=escape(O)),d=d.split(O).join(P)}var Q=d.indexOf("#");-1!==Q&&(this.hash=d.substr(Q),d=d.slice(0,Q));var R=d.indexOf("?");if(-1!==R?(this.search=d.substr(R),this.query=d.substr(R+1),b&&(this.query=A.parse(this.query)),d=d.slice(0,R)):b&&(this.search="",this.query={}),d&&(this.pathname=d),z[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j(this.query)&&Object.keys(this.query).length&&(f=A.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==b.substr(-1)&&(b+=":"),this.slashes||(!b||z[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(i(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(Object.keys(this).forEach(function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return Object.keys(a).forEach(function(b){"protocol"!==b&&(c[b]=a[b])}),z[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!z[a.protocol])return Object.keys(a).forEach(function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||y[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),j=a.host||a.pathname&&"/"===a.pathname.charAt(0),m=j||h||c.host&&a.pathname,n=m,o=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],p=c.protocol&&!z[c.protocol];if(p&&(c.hostname="",c.port=null,c.host&&(""===o[0]?o[0]=c.host:o.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),m=m&&(""===e[0]||""===o[0])),j)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,o=e;else if(e.length)o||(o=[]),o.pop(),o=o.concat(e),c.search=a.search,c.query=a.query;else if(!l(a.search)){if(p){c.hostname=c.host=o.shift();var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return c.search=a.search,c.query=a.query,k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!o.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var r=o.slice(-1)[0],s=(c.host||a.host)&&("."===r||".."===r)||""===r,t=0,u=o.length;u>=0;u--)r=o[u],"."==r?o.splice(u,1):".."===r?(o.splice(u,1),t++):t&&(o.splice(u,1),t--);if(!m&&!n)for(;t--;t)o.unshift("..");!m||""===o[0]||o[0]&&"/"===o[0].charAt(0)||o.unshift(""),s&&"/"!==o.join("/").substr(-1)&&o.push("");var v=""===o[0]||o[0]&&"/"===o[0].charAt(0);if(p){c.hostname=c.host=v?"":o.length?o.shift():"";var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return m=m||c.host&&o.length,m&&!v&&o.unshift(""),o.length?c.pathname=o.join("/"):(c.pathname=null,c.path=null),k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=o.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{punycode:48,querystring:51}],53:[function(a,b,d){!function(a){function e(a,b){var c;if(a&&b&&(e.locale[a]=b),c=a=a||"en",b=b||e.locale[c=e.Utils.getFallbackLocale(a)],!b)throw new Error("Plural Function not found for locale: "+a);this.pluralFunc=b,this.locale=a,this.fallbackLocale=c}c=function(a){if(!a)throw new Error("MessageFormat: No data passed to function.")},n=function(a,b,c){if(isNaN(a[b]))throw new Error("MessageFormat: `"+b+"` isnt a number.");return a[b]-(c||0)},v=function(a,b){return c(a),a[b]},p=function(a,b,d,f,g){return c(a),a[b]in g?g[a[b]]:(b=e.locale[f](a[b]-d),b in g?g[b]:g.other)},s=function(a,b,d){return c(a),a[b]in d?d[a[b]]:d.other},e.locale={en:function(a){return 1===a?"one":"other"}},e.SafeString=function(a){this.string=a},e.SafeString.prototype.toString=function(){return this.string.toString()},e.Utils={numSub:function(a,b,c,d){var e=a.replace(/(^|[^\\])#/g,'$1"+n('+b+","+c+(d?","+d:"")+')+"');return e.replace(/^""\+/,"").replace(/\+""$/,"")},escapeExpression:function(a){var b={"\n":"\\n",'"':'\\"'},c=/[\n"]/g,d=/[\n"]/,f=function(a){return b[a]||"&"};return a instanceof e.SafeString?a.toString():null===a||a===!1?"":d.test(a)?a.replace(c,f):a},getFallbackLocale:function(a){for(var b=a.indexOf("-")>=0?"-":"_";!e.locale.hasOwnProperty(a);)if(a=a.substring(0,a.lastIndexOf(b)),0===a.length)return null;return a}};var f=function(){function a(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var b={parse:function(b,c){function d(a){D>B||(B>D&&(D=B,E=[]),E.push(a))}function e(){var a,b;return b=B,a=f(),null!==a&&(a=function(a,b){return{type:"program",program:b}}(b,a)),null===a&&(B=b),a}function f(){var a,b,c,d,e;if(d=B,e=B,a=q(),null!==a){for(b=[],c=g();null!==c;)b.push(c),c=g();null!==b?a=[a,b]:(a=null,B=e)}else a=null,B=e;return null!==a&&(a=function(a,b,c){var d=[];b&&b.val&&d.push(b);for(var e in c)c.hasOwnProperty(e)&&d.push(c[e]);return{type:"messageFormatPattern",statements:d}}(d,a[0],a[1])),null===a&&(B=d),a}function g(){var a,c,e,f,g,i,j,k;return j=B,k=B,123===b.charCodeAt(B)?(a="{",B++):(a=null,0===C&&d('"{"')),null!==a?(c=w(),null!==c?(e=h(),null!==e?(f=w(),null!==f?(125===b.charCodeAt(B)?(g="}",B++):(g=null,0===C&&d('"}"')),null!==g?(i=q(),null!==i?a=[a,c,e,f,g,i]:(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k),null!==a&&(a=function(a,b,c){var d=[];return b&&d.push(b),c&&c.val&&d.push(c),{type:"messageFormatPatternRight",statements:d}}(j,a[2],a[5])),null===a&&(B=j),a}function h(){var a,c,e,f,g,h;return f=B,g=B,a=r(),null!==a?(h=B,44===b.charCodeAt(B)?(c=",",B++):(c=null,0===C&&d('","')),null!==c?(e=i(),null!==e?c=[c,e]:(c=null,B=h)):(c=null,B=h),c=null!==c?c:"",null!==c?a=[a,c]:(a=null,B=g)):(a=null,B=g),null!==a&&(a=function(a,b,c){var d={type:"messageFormatElement",argumentIndex:b};return c&&c.length?d.elementFormat=c[1]:d.output=!0,d}(f,a[0],a[1])),null===a&&(B=f),a}function i(){var a,c,e,f,g,h,i,l,m;return l=B,m=B,a=w(),null!==a?("plural"===b.substr(B,6)?(c="plural",B+=6):(c=null,0===C&&d('"plural"')),null!==c?(e=w(),null!==e?(44===b.charCodeAt(B)?(f=",",B++):(f=null,0===C&&d('","')),null!==f?(g=w(),null!==g?(h=j(),null!==h?(i=w(),null!==i?a=[a,c,e,f,g,h,i]:(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m),null!==a&&(a=function(a,b,c){return{type:"elementFormat",key:b,val:c.val}}(l,a[1],a[5])),null===a&&(B=l),null===a&&(l=B,m=B,a=w(),null!==a?("select"===b.substr(B,6)?(c="select",B+=6):(c=null,0===C&&d('"select"')),null!==c?(e=w(),null!==e?(44===b.charCodeAt(B)?(f=",",B++):(f=null,0===C&&d('","')),null!==f?(g=w(),null!==g?(h=k(),null!==h?(i=w(),null!==i?a=[a,c,e,f,g,h,i]:(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m),null!==a&&(a=function(a,b,c){return{type:"elementFormat",key:b,val:c.val}}(l,a[1],a[5])),null===a&&(B=l)),a}function j(){var a,b;return b=B,a=l(),null!==a&&(a=function(a,b){return{type:"pluralStyle",val:b}}(b,a)),null===a&&(B=b),a}function k(){var a,b;return b=B,a=n(),null!==a&&(a=function(a,b){return{type:"selectStyle",val:b}}(b,a)),null===a&&(B=b),a}function l(){var a,b,c,d,e;if(d=B,e=B,a=m(),a=null!==a?a:"",null!==a){for(b=[],c=o();null!==c;)b.push(c),c=o();null!==b?a=[a,b]:(a=null,B=e)}else a=null,B=e;return null!==a&&(a=function(a,b,c){var d={type:"pluralFormatPattern",pluralForms:c};return d.offset=b?b:0,d}(d,a[0],a[1])),null===a&&(B=d),a}function m(){var a,c,e,f,g,h,i,j,k;return j=B,k=B,a=w(),null!==a?("offset"===b.substr(B,6)?(c="offset",B+=6):(c=null,0===C&&d('"offset"')),null!==c?(e=w(),null!==e?(58===b.charCodeAt(B)?(f=":",B++):(f=null,0===C&&d('":"')),null!==f?(g=w(),null!==g?(h=u(),null!==h?(i=w(),null!==i?a=[a,c,e,f,g,h,i]:(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k),null!==a&&(a=function(a,b){return b}(j,a[5])),null===a&&(B=j),a}function n(){var a,b,c;for(c=B,a=[],b=o();null!==b;)a.push(b),b=o();return null!==a&&(a=function(a,b){return{type:"selectFormatPattern",pluralForms:b}}(c,a)),null===a&&(B=c),a}function o(){var a,c,e,g,h,i,j,k,l,m;return l=B,m=B,a=w(),null!==a?(c=p(),null!==c?(e=w(),null!==e?(123===b.charCodeAt(B)?(g="{",B++):(g=null,0===C&&d('"{"')),null!==g?(h=w(),null!==h?(i=f(),null!==i?(j=w(),null!==j?(125===b.charCodeAt(B)?(k="}",B++):(k=null,0===C&&d('"}"')),null!==k?a=[a,c,e,g,h,i,j,k]:(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m),null!==a&&(a=function(a,b,c){return{type:"pluralForms",key:b,val:c}}(l,a[1],a[5])),null===a&&(B=l),a}function p(){var a,c,e,f;return e=B,a=r(),null!==a&&(a=function(a,b){return b}(e,a)),null===a&&(B=e),null===a&&(e=B,f=B,61===b.charCodeAt(B)?(a="=",B++):(a=null,0===C&&d('"="')),null!==a?(c=u(),null!==c?a=[a,c]:(a=null,B=f)):(a=null,B=f),null!==a&&(a=function(a,b){return b}(e,a[1])),null===a&&(B=e)),a}function q(){var a,b,c,d,e,f,g,h;if(f=B,g=B,a=w(),null!==a){for(b=[],h=B,c=w(),null!==c?(d=s(),null!==d?(e=w(),null!==e?c=[c,d,e]:(c=null,B=h)):(c=null,B=h)):(c=null,B=h);null!==c;)b.push(c),h=B,c=w(),null!==c?(d=s(),null!==d?(e=w(),null!==e?c=[c,d,e]:(c=null,B=h)):(c=null,B=h)):(c=null,B=h);null!==b?a=[a,b]:(a=null,B=g)}else a=null,B=g;return null!==a&&(a=function(a,b,c){for(var d=[],e=0;e1&&this.appendDummyInput().appendTitle(h(),"SPRITE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(f.setSpriteK1Tooltip())}},a.Blocks.studio_setSprite.VALUES=[[f.setSpriteHideK1(),o],[f.setSpriteShowK1(),q]]):(a.Blocks.studio_setSprite={helpUrl:"",init:function(){var b=new a.FieldDropdown(this.VALUES);b.setValue(this.VALUES[2][1]),this.setHSV(312,.32,.62),t>1?this.appendDummyInput().appendTitle(c(f.setSpriteN),"SPRITE"):this.appendDummyInput().appendTitle(f.setSprite()),this.appendDummyInput().appendTitle(b,"VALUE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(f.setSpriteTooltip())}},a.Blocks.studio_setSprite.VALUES=[[f.setSpriteHidden(),o],[f.setSpriteRandom(),n],[f.setSpriteWitch(),'"witch"'],[f.setSpriteCat(),'"cat"'],[f.setSpriteDinosaur(),'"dinosaur"'],[f.setSpriteDog(),'"dog"'],[f.setSpriteOctopus(),'"octopus"'],[f.setSpritePenguin(),'"penguin"'],[f.setSpriteBat(),'"bat"'],[f.setSpriteBird(),'"bird"'],[f.setSpriteDragon(),'"dragon"'],[f.setSpriteSquirrel(),'"squirrel"'],[f.setSpriteWizard(),'"wizard"'],[f.setSpriteAlien(),'"alien"'],[f.setSpriteGhost(),'"ghost"'],[f.setSpriteMonster(),'"monster"'],[f.setSpriteRobot(),'"robot"'],[f.setSpriteUnicorn(),'"unicorn"'],[f.setSpriteZombie(),'"zombie"'],[f.setSpriteKnight(),'"knight"'],[f.setSpriteNinja(),'"ninja"'],[f.setSpritePirate(),'"pirate"'],[f.setSpriteCaveBoy(),'"caveboy"'],[f.setSpriteCaveGirl(),'"cavegirl"'],[f.setSpritePrincess(),'"princess"'],[f.setSpriteSpacebot(),'"spacebot"'],[f.setSpriteSoccerGirl(),'"soccergirl"'],[f.setSpriteSoccerBoy(),'"soccerboy"'],[f.setSpriteTennisGirl(),'"tennisgirl"'],[f.setSpriteTennisBoy(),'"tennisboy"']]),A.studio_setSprite=function(){var a=(this.getTitleValue("VALUE"),this.getTitleValue("SPRITE")||"0");return s({ctx:this,extraParams:a,name:"setSprite"})},a.Blocks.studio_setSpriteEmotion={helpUrl:"",init:function(){if(this.setHSV(184,1,.74),t>1?z?this.appendDummyInput().appendTitle(f.setSprite()).appendTitle(h(),"SPRITE"):this.appendDummyInput().appendTitle(c(f.setSpriteN),"SPRITE"):this.appendDummyInput().appendTitle(f.setSprite()),z){var b=new a.FieldImageDropdown(this.K1_VALUES,34,34);b.setValue(this.K1_VALUES[0][1]),this.appendDummyInput().appendTitle(f.emotion()).appendTitle(b,"VALUE")}else{var d=new a.FieldDropdown(this.VALUES);d.setValue(this.VALUES[1][1]),this.appendDummyInput().appendTitle(d,"VALUE")}this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(f.setSpriteEmotionTooltip())}},a.Blocks.studio_setSpriteEmotion.VALUES=[[f.setSpriteEmotionRandom(),n],[f.setSpriteEmotionNormal(),m.NORMAL.toString()],[f.setSpriteEmotionHappy(),m.HAPPY.toString()],[f.setSpriteEmotionAngry(),m.ANGRY.toString()],[f.setSpriteEmotionSad(),m.SAD.toString()]],a.Blocks.studio_setSpriteEmotion.K1_VALUES=[[y.emotionNormal,m.NORMAL.toString()],[y.emotionHappy,m.HAPPY.toString()],[y.emotionAngry,m.ANGRY.toString()],[y.emotionSad,m.SAD.toString()],[y.randomPurpleIcon,n]],A.studio_setSpriteEmotion=function(){return s({ctx:this,extraParams:this.getTitleValue("SPRITE")||"0",name:"setSpriteEmotion"})};var E=function(a){a.helpUrl="",a.init=function(){if(this.setHSV(184,1,.74),t>1?z?this.appendDummyInput().appendTitle(f.saySprite()).appendTitle(h(),"SPRITE"):this.appendDummyInput().appendTitle(c(f.saySpriteN),"SPRITE"):this.appendDummyInput().appendTitle(f.saySprite()),a.params)this.appendValueInput("TEXT").setCheck("String");else{var b=this.appendDummyInput();z&&b.appendTitle(new Blockly.FieldImage(y.speechBubble)),b.appendTitle(new Blockly.FieldImage(Blockly.assetUrl("media/quote0.png"),12,12)).appendTitle(new Blockly.FieldTextInput(f.defaultSayText()),"TEXT").appendTitle(new Blockly.FieldImage(Blockly.assetUrl("media/quote1.png"),12,12))}this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(f.saySpriteTooltip())}};a.Blocks.studio_saySprite={},E(a.Blocks.studio_saySprite),a.Blocks.studio_saySpriteParams={params:!0},E(a.Blocks.studio_saySpriteParams),A.studio_saySprite=function(){return"Studio.saySprite('block_id_"+this.id+"', "+(this.getTitleValue("SPRITE")||"0")+", "+a.JavaScript.quote_(this.getTitleValue("TEXT"))+");\n"},A.studio_saySpriteParams=function(){var a=Blockly.JavaScript.valueToCode(this,"TEXT",Blockly.JavaScript.ORDER_NONE)||"";return"Studio.saySprite('block_id_"+this.id+"', "+(this.getTitleValue("SPRITE")||"0")+", "+a+");\n"};var F=function(b){b.helpUrl="",b.init=function(){if(this.setHSV(184,1,.74),b.params)this.appendDummyInput().appendTitle(f.waitFor()),this.appendValueInput("VALUE").setCheck("Number"),this.appendDummyInput().appendTitle(f.waitSeconds());else{var c=new a.FieldDropdown(this.VALUES);c.setValue(this.VALUES[2][1]),this.appendDummyInput().appendTitle(c,"VALUE")}this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(b.params?f.waitParamsTooltip():f.waitTooltip())},b.params||(b.VALUES=[[f.waitForClick(),'"click"'],[f.waitForRandom(),"random"],[f.waitForHalfSecond(),"500"],[f.waitFor1Second(),"1000"],[f.waitFor2Seconds(),"2000"],[f.waitFor5Seconds(),"5000"],[f.waitFor10Seconds(),"10000"]])};a.Blocks.studio_wait={},F(a.Blocks.studio_wait),a.Blocks.studio_waitParams={params:!0},F(a.Blocks.studio_waitParams),A.studio_wait=function(){return s({ctx:this,name:"wait"})},A.studio_waitParams=function(){var a=Blockly.JavaScript.valueToCode(this,"VALUE",Blockly.JavaScript.ORDER_NONE)||"0";return"Studio.wait('block_id_"+this.id+"', ("+a+" * 1000));\n"}}},{"../../locale/en_us/common":40,"../../locale/en_us/studio":41,"../codegen":6,"../lodash":11,"../utils":38,"./tiles":25}],17:[function(a,b){"use strict";var c=a("./studio"),d=a("./tiles").Direction,e=function(a){for(var b in a)this[b]=a[b];this.visible=this.visible||!0,this.flags=0,this.collidingWith_={},this.frames=this.frames||1};b.exports=e,e.prototype.clearCollisions=function(){this.collidingWith_={}},e.prototype.startCollision=function(a){return this.isCollidingWith(a)?!1:(this.collidingWith_[a]=!0,!0)},e.prototype.endCollision=function(a){this.collidingWith_[a]=!1},e.prototype.isCollidingWith=function(a){return this.collidingWith_[a]===!0},e.prototype.bounce=function(){switch(this.dir){case d.NORTH:this.dir=d.SOUTH;break;case d.WEST:this.dir=d.EAST;break;case d.SOUTH:this.dir=d.NORTH;break;case d.EAST:this.dir=d.WEST}},e.prototype.outOfBounds=function(){return this.x<-(this.width/2)||this.x>c.MAZE_WIDTH+this.width/2||this.y<-(this.height/2)||this.y>c.MAZE_HEIGHT+this.height/2}},{"./studio":24,"./tiles":25}],18:[function(require,module,exports){module.exports=function(){var t=function anonymous(locals,filters,escape,rethrow){escape=escape||function(a){return String(a).replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var buf=[];with(locals||{})!function(){buf.push("");var a=require("../../locale/en_us/common");buf.push('\n\n
\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],38:[function(a,b,c){{var d=a("./lodash");a("./xml")}c.shallowCopy=function(a){var b={};for(var c in a)b[c]=a[c];return b},c.cloneWithoutFunctions=function(a){return JSON.parse(JSON.stringify(a))},c.extend=function(a,b){var d=c.shallowCopy(a);for(var e in b)d[e]=b[e];return d},c.escapeHtml=function(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},c.mod=function(a,b){return(a%b+b)%b},c.range=function(a,b){for(var c=[],d=a;b>=d;d++)c.push(d);return c},c.executeIfConditional=function(a,b){return function(){return a()?b.apply(this,arguments):void 0}},c.stripQuotes=function(a){return a.replace(/["']/g,"")},Function.prototype.inherits=function(a){this.prototype=d.create(a.prototype,{constructor:a})},c.wrapNumberValidatorsForLevelBuilder=function(){var a=Blockly.FieldTextInput.nonnegativeIntegerValidator,b=Blockly.FieldTextInput.numberValidator;Blockly.FieldTextInput.nonnegativeIntegerValidator=function(b){return"???"===b?b:a(b)},Blockly.FieldTextInput.numberValidator=function(a){return"???"===a?a:b(a)}}},{"./lodash":11,"./xml":39}],39:[function(a,b,c){c.serialize=function(a){var b=new XMLSerializer;return b.serializeToString(a)},c.parseElement=function(a){var b=new DOMParser;a=a.trim();var d=0===a.indexOf(""+a+"","text/xml"),e=d.getElementsByTagName("parsererror"),f=d.firstChild;if(!f)throw new Error("Nothing parsed");if(e.length>0)throw new Error(c.serialize(e[0]));if(f!==d.lastChild)throw new Error("Parsed multiple elements");return f}},{}],40:[function(a,b,c){var d=a("messageformat");d.locale.en=function(a){return 1===a?"one":"other"},c.and=function(){return"and"},c.blocklyMessage=function(){return"Blockly"},c.catActions=function(){return"Actions"},c.catColour=function(){return"Colour"},c.catLogic=function(){return"Logic"},c.catLists=function(){return"Lists"},c.catLoops=function(){return"Loops"},c.catMath=function(){return"Math"},c.catProcedures=function(){return"Functions"},c.catText=function(){return"Text"},c.catVariables=function(){return"Variables"},c.codeTooltip=function(){return"See generated JavaScript code."},c.continue=function(){return"Continue"},c.dialogCancel=function(){return"Cancel"},c.dialogOK=function(){return"OK"},c.directionNorthLetter=function(){return"N"},c.directionSouthLetter=function(){return"S"},c.directionEastLetter=function(){return"E"},c.directionWestLetter=function(){return"W"},c.end=function(){return"end"},c.emptyBlocksErrorMsg=function(){return'The "Repeat" or "If" block needs to have other blocks inside it to work. Make sure the inner block fits properly inside the containing block.'},c.emptyFunctionBlocksErrorMsg=function(){return"The function block needs to have other blocks inside it to work."},c.extraTopBlocks=function(){return'You have unattached blocks. Did you mean to attach these to the "when run" block?'},c.finalStage=function(){return"Congratulations! You have completed the final stage."},c.finalStageTrophies=function(a){return"Congratulations! You have completed the final stage and won "+p(a,"numTrophies",0,"en",{one:"a trophy",other:n(a,"numTrophies")+" trophies"})+"."},c.finish=function(){return"Finish"},c.generatedCodeInfo=function(a){return"Even top universities teach block-based coding (e.g., "+v(a,"berkeleyLink")+", "+v(a,"harvardLink")+"). But under the hood, the blocks you have assembled can also be shown in JavaScript, the world's most widely used coding language:"},c.hashError=function(){return"Sorry, '%1' doesn't correspond with any saved program."},c.help=function(){return"Help"},c.hintTitle=function(){return"Hint:"},c.jump=function(){return"jump"},c.levelIncompleteError=function(){return"You are using all of the necessary types of blocks but not in the right way."},c.listVariable=function(){return"list"},c.makeYourOwnFlappy=function(){return"Make Your Own Flappy Game"},c.missingBlocksErrorMsg=function(){return"Try one or more of the blocks below to solve this puzzle."},c.nextLevel=function(a){return"Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+"."},c.nextLevelTrophies=function(a){return"Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+" and won "+p(a,"numTrophies",0,"en",{one:"a trophy",other:n(a,"numTrophies")+" trophies"})+"."},c.nextStage=function(a){return"Congratulations! You completed "+v(a,"stageName")+"."},c.nextStageTrophies=function(a){return"Congratulations! You completed "+v(a,"stageName")+" and won "+p(a,"numTrophies",0,"en",{one:"a trophy",other:n(a,"numTrophies")+" trophies"})+"."
-},c.numBlocksNeeded=function(a){return"Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+". (However, you could have used only "+p(a,"numBlocks",0,"en",{one:"1 block",other:n(a,"numBlocks")+" blocks"})+".)"},c.numLinesOfCodeWritten=function(a){return"You just wrote "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code!"},c.play=function(){return"play"},c.puzzleTitle=function(a){return"Puzzle "+v(a,"puzzle_number")+" of "+v(a,"stage_total")},c.repeat=function(){return"repeat"},c.resetProgram=function(){return"Reset"},c.runProgram=function(){return"Run"},c.runTooltip=function(){return"Run the program defined by the blocks in the workspace."},c.score=function(){return"score"},c.showCodeHeader=function(){return"Show Code"},c.showGeneratedCode=function(){return"Show code"},c.subtitle=function(){return"a visual programming environment"},c.textVariable=function(){return"text"},c.tooFewBlocksMsg=function(){return"You are using all of the necessary types of blocks, but try using more of these types of blocks to complete this puzzle."},c.tooManyBlocksMsg=function(){return"This puzzle can be solved with blocks."},c.tooMuchWork=function(){return"You made me do a lot of work! Could you try repeating fewer times?"},c.toolboxHeader=function(){return"Blocks"},c.openWorkspace=function(){return"How It Works"},c.totalNumLinesOfCodeWritten=function(a){return"All-time total: "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code."},c.tryAgain=function(){return"Try again"},c.hintRequest=function(){return"See hint"},c.backToPreviousLevel=function(){return"Back to previous level"},c.saveToGallery=function(){return"Save to your gallery"},c.savedToGallery=function(){return"Saved to your gallery!"},c.typeCode=function(){return"Type your JavaScript code below these instructions."},c.typeFuncs=function(){return"Available functions:%1"},c.typeHint=function(){return"Note that the parentheses and semicolons are required."},c.workspaceHeader=function(){return"Assemble your blocks here: "},c.infinity=function(){return"Infinity"},c.rotateText=function(){return"Rotate your device."},c.orientationLock=function(){return"Turn off orientation lock in device settings."},c.wantToLearn=function(){return"Want to learn to code?"},c.watchVideo=function(){return"Watch the Video"},c.when=function(){return"when"},c.whenRun=function(){return"when run"},c.tryHOC=function(){return"Try the Hour of Code"},c.signup=function(){return"Sign up for the intro course"},c.hintHeader=function(){return"Here's a tip:"},c.genericFeedback=function(){return"See how you ended up, and try to fix your program."}},{messageformat:53}],41:[function(a,b,c){var d=a("messageformat");d.locale.en=function(a){return 1===a?"one":"other"},c.actor=function(){return"actor"},c.catActions=function(){return"Actions"},c.catControl=function(){return"Loops"},c.catEvents=function(){return"Events"},c.catLogic=function(){return"Logic"},c.catMath=function(){return"Math"},c.catProcedures=function(){return"Functions"},c.catText=function(){return"Text"},c.catVariables=function(){return"Variables"},c.changeScoreTooltip=function(){return"Add or remove a point to the score."},c.changeScoreTooltipK1=function(){return"Add a point to the score."},c.continue=function(){return"Continue"},c.decrementPlayerScore=function(){return"remove point"},c.defaultSayText=function(){return"type here"},c.emotion=function(){return"mood"},c.finalLevel=function(){return"Congratulations! You have solved the final puzzle."},c.hello=function(){return"hello"},c.helloWorld=function(){return"Hello World!"},c.incrementPlayerScore=function(){return"score point"},c.makeProjectileDisappear=function(){return"disappear"},c.makeProjectileBounce=function(){return"bounce"},c.makeProjectileBlueFireball=function(){return"make blue fireball"},c.makeProjectilePurpleFireball=function(){return"make purple fireball"},c.makeProjectileRedFireball=function(){return"make red fireball"},c.makeProjectileYellowHearts=function(){return"make yellow hearts"},c.makeProjectilePurpleHearts=function(){return"make purple hearts"},c.makeProjectileRedHearts=function(){return"make red hearts"},c.makeProjectileTooltip=function(){return"Make the projectile that just collided disappear or bounce."},c.makeYourOwn=function(){return"Make Your Own Story"},c.moveDirectionDown=function(){return"down"},c.moveDirectionLeft=function(){return"left"},c.moveDirectionRight=function(){return"right"},c.moveDirectionUp=function(){return"up"},c.moveDirectionRandom=function(){return"random"},c.moveDistance25=function(){return"25 pixels"},c.moveDistance50=function(){return"50 pixels"},c.moveDistance100=function(){return"100 pixels"},c.moveDistance200=function(){return"200 pixels"},c.moveDistance400=function(){return"400 pixels"},c.moveDistancePixels=function(){return"pixels"},c.moveDistanceRandom=function(){return"random pixels"},c.moveDistanceTooltip=function(){return"Move an actor a specific distance in the specified direction."},c.moveSprite=function(){return"move"},c.moveSpriteN=function(a){return"move actor "+v(a,"spriteIndex")},c.moveDown=function(){return"move down"},c.moveDownTooltip=function(){return"Move an actor down."},c.moveLeft=function(){return"move left"},c.moveLeftTooltip=function(){return"Move an actor to the left."},c.moveRight=function(){return"move right"},c.moveRightTooltip=function(){return"Move an actor to the right."},c.moveUp=function(){return"move up"},c.moveUpTooltip=function(){return"Move an actor up."},c.moveTooltip=function(){return"Move an actor."},c.nextLevel=function(){return"Congratulations! You have completed this puzzle."},c.no=function(){return"No"},c.numBlocksNeeded=function(){return"This puzzle can be solved with %1 blocks."},c.ouchExclamation=function(){return"Ouch!"},c.playSoundCrunch=function(){return"play crunch sound"},c.playSoundGoal1=function(){return"play goal 1 sound"},c.playSoundGoal2=function(){return"play goal 2 sound"},c.playSoundHit=function(){return"play hit sound"},c.playSoundLosePoint=function(){return"play lose point sound"},c.playSoundLosePoint2=function(){return"play lose point 2 sound"},c.playSoundRetro=function(){return"play retro sound"},c.playSoundRubber=function(){return"play rubber sound"},c.playSoundSlap=function(){return"play slap sound"},c.playSoundTooltip=function(){return"Play the chosen sound."},c.playSoundWinPoint=function(){return"play win point sound"},c.playSoundWinPoint2=function(){return"play win point 2 sound"},c.playSoundWood=function(){return"play wood sound"},c.positionOutTopLeft=function(){return"to the above top left position"},c.positionOutTopRight=function(){return"to the above top right position"},c.positionTopOutLeft=function(){return"to the top outside left position"},c.positionTopLeft=function(){return"to the top left position"},c.positionTopCenter=function(){return"to the top center position"},c.positionTopRight=function(){return"to the top right position"},c.positionTopOutRight=function(){return"to the top outside right position"},c.positionMiddleLeft=function(){return"to the middle left position"},c.positionMiddleCenter=function(){return"to the middle center position"},c.positionMiddleRight=function(){return"to the middle right position"},c.positionBottomOutLeft=function(){return"to the bottom outside left position"},c.positionBottomLeft=function(){return"to the bottom left position"},c.positionBottomCenter=function(){return"to the bottom center position"},c.positionBottomRight=function(){return"to the bottom right position"},c.positionBottomOutRight=function(){return"to the bottom outside right position"},c.positionOutBottomLeft=function(){return"to the below bottom left position"},c.positionOutBottomRight=function(){return"to the below bottom right position"},c.positionRandom=function(){return"to the random position"},c.projectileBlueFireball=function(){return"blue fireball"},c.projectilePurpleFireball=function(){return"purple fireball"},c.projectileRedFireball=function(){return"red fireball"},c.projectileYellowHearts=function(){return"yellow hearts"},c.projectilePurpleHearts=function(){return"purple hearts"},c.projectileRedHearts=function(){return"red hearts"},c.projectileRandom=function(){return"random"},c.reinfFeedbackMsg=function(){return'You can press the "Try again" button to go back to playing your story.'},c.repeatForever=function(){return"repeat forever"},c.repeatDo=function(){return"do"},c.repeatForeverTooltip=function(){return"Execute the actions in this block repeatedly while the story is running."},c.saySprite=function(){return"say"},c.saySpriteN=function(a){return"actor "+v(a,"spriteIndex")+" say"},c.saySpriteTooltip=function(){return"Pop up a speech bubble with the associated text from the specified actor."},c.scoreText=function(a){return"Score: "+v(a,"playerScore")},c.setBackground=function(){return"set background"},c.setBackgroundRandom=function(){return"set random background"},c.setBackgroundBlack=function(){return"set black background"},c.setBackgroundCave=function(){return"set cave background"},c.setBackgroundCloudy=function(){return"set cloudy background"},c.setBackgroundHardcourt=function(){return"set hardcourt background"},c.setBackgroundNight=function(){return"set night background"},c.setBackgroundUnderwater=function(){return"set underwater background"},c.setBackgroundCity=function(){return"set city background"},c.setBackgroundDesert=function(){return"set desert background"},c.setBackgroundRainbow=function(){return"set rainbow background"},c.setBackgroundSoccer=function(){return"set soccer background"},c.setBackgroundSpace=function(){return"set space background"},c.setBackgroundTennis=function(){return"set tennis background"},c.setBackgroundWinter=function(){return"set winter background"},c.setBackgroundTooltip=function(){return"Sets the background image"},c.setScoreText=function(){return"set score"},c.setScoreTextTooltip=function(){return"Sets the text to be displayed in the score area."},c.setSpriteEmotionAngry=function(){return"to a angry mood"},c.setSpriteEmotionHappy=function(){return"to a happy mood"},c.setSpriteEmotionNormal=function(){return"to a normal mood"},c.setSpriteEmotionRandom=function(){return"to a random mood"},c.setSpriteEmotionSad=function(){return"to a sad mood"},c.setSpriteEmotionTooltip=function(){return"Sets the actor mood"},c.setSpriteAlien=function(){return"to an alien image"},c.setSpriteBat=function(){return"to a bat image"},c.setSpriteBird=function(){return"to a bird image"},c.setSpriteCat=function(){return"to a cat image"},c.setSpriteCaveBoy=function(){return"to a cave boy image"},c.setSpriteCaveGirl=function(){return"to a cave girl image"},c.setSpriteDinosaur=function(){return"to a dinosaur image"},c.setSpriteDog=function(){return"to a dog image"},c.setSpriteDragon=function(){return"to a dragon image"},c.setSpriteGhost=function(){return"to a ghost image"},c.setSpriteHidden=function(){return"to a hidden image"},c.setSpriteHideK1=function(){return"hide"},c.setSpriteKnight=function(){return"to a knight image"},c.setSpriteMonster=function(){return"to a monster image"},c.setSpriteNinja=function(){return"to a masked ninja image"},c.setSpriteOctopus=function(){return"to an octopus image"},c.setSpritePenguin=function(){return"to a penguin image"},c.setSpritePirate=function(){return"to a pirate image"},c.setSpritePrincess=function(){return"to a princess image"},c.setSpriteRandom=function(){return"to a random image"},c.setSpriteRobot=function(){return"to a robot image"},c.setSpriteShowK1=function(){return"show"},c.setSpriteSpacebot=function(){return"to a spacebot image"},c.setSpriteSoccerGirl=function(){return"to a soccer girl image"},c.setSpriteSoccerBoy=function(){return"to a soccer boy image"},c.setSpriteSquirrel=function(){return"to a squirrel image"},c.setSpriteTennisGirl=function(){return"to a tennis girl image"},c.setSpriteTennisBoy=function(){return"to a tennis boy image"},c.setSpriteUnicorn=function(){return"to a unicorn image"},c.setSpriteWitch=function(){return"to a witch image"},c.setSpriteWizard=function(){return"to a wizard image"},c.setSpritePositionTooltip=function(){return"Instantly moves an actor to the specified location."},c.setSpriteK1Tooltip=function(){return"Shows or hides the specified actor."},c.setSpriteTooltip=function(){return"Sets the actor image"},c.setSpriteSizeRandom=function(){return"to a random size"},c.setSpriteSizeVerySmall=function(){return"to a very small size"},c.setSpriteSizeSmall=function(){return"to a small size"},c.setSpriteSizeNormal=function(){return"to a normal size"},c.setSpriteSizeLarge=function(){return"to a large size"},c.setSpriteSizeVeryLarge=function(){return"to a very large size"},c.setSpriteSizeTooltip=function(){return"Sets the size of an actor"},c.setSpriteSpeedRandom=function(){return"to a random speed"},c.setSpriteSpeedVerySlow=function(){return"to a very slow speed"},c.setSpriteSpeedSlow=function(){return"to a slow speed"},c.setSpriteSpeedNormal=function(){return"to a normal speed"},c.setSpriteSpeedFast=function(){return"to a fast speed"},c.setSpriteSpeedVeryFast=function(){return"to a very fast speed"},c.setSpriteSpeedTooltip=function(){return"Sets the speed of an actor"},c.setSpriteZombie=function(){return"to a zombie image"},c.shareStudioTwitter=function(){return"Check out the story I made. I wrote it myself with @codeorg"},c.shareGame=function(){return"Share your story:"},c.showTitleScreen=function(){return"show title screen"},c.showTitleScreenTitle=function(){return"title"},c.showTitleScreenText=function(){return"text"},c.showTSDefTitle=function(){return"type title here"},c.showTSDefText=function(){return"type text here"},c.showTitleScreenTooltip=function(){return"Show a title screen with the associated title and text."},c.setSprite=function(){return"set"},c.setSpriteN=function(a){return"set actor "+v(a,"spriteIndex")},c.soundCrunch=function(){return"crunch"},c.soundGoal1=function(){return"goal 1"},c.soundGoal2=function(){return"goal 2"},c.soundHit=function(){return"hit"},c.soundLosePoint=function(){return"lose point"},c.soundLosePoint2=function(){return"lose point 2"},c.soundRetro=function(){return"retro"},c.soundRubber=function(){return"rubber"},c.soundSlap=function(){return"slap"},c.soundWinPoint=function(){return"win point"},c.soundWinPoint2=function(){return"win point 2"},c.soundWood=function(){return"wood"},c.speed=function(){return"speed"},c.stopSprite=function(){return"stop"},c.stopSpriteN=function(a){return"stop actor "+v(a,"spriteIndex")},c.stopTooltip=function(){return"Stops an actor's movement."},c.throwSprite=function(){return"throw"},c.throwSpriteN=function(a){return"actor "+v(a,"spriteIndex")+" throw"},c.throwTooltip=function(){return"Throws a projectile from the specified actor."},c.vanish=function(){return"vanish"},c.vanishActorN=function(a){return"vanish actor "+v(a,"spriteIndex")},c.vanishTooltip=function(){return"Vanishes the actor."},c.waitFor=function(){return"wait for"},c.waitSeconds=function(){return"seconds"},c.waitForClick=function(){return"wait for click"},c.waitForRandom=function(){return"wait for random"},c.waitForHalfSecond=function(){return"wait for a half second"},c.waitFor1Second=function(){return"wait for 1 second"},c.waitFor2Seconds=function(){return"wait for 2 seconds"},c.waitFor5Seconds=function(){return"wait for 5 seconds"},c.waitFor10Seconds=function(){return"wait for 10 seconds"},c.waitParamsTooltip=function(){return"Waits for a specified number of seconds or use zero to wait until a click occurs."},c.waitTooltip=function(){return"Waits for a specified amount of time or until a click occurs."},c.whenArrowDown=function(){return"down arrow"},c.whenArrowLeft=function(){return"left arrow"},c.whenArrowRight=function(){return"right arrow"},c.whenArrowUp=function(){return"up arrow"},c.whenArrowTooltip=function(){return"Execute the actions below when the specified arrow key is pressed."},c.whenDown=function(){return"when down arrow"},c.whenDownTooltip=function(){return"Execute the actions below when the down arrow key is pressed."},c.whenGameStarts=function(){return"when story starts"},c.whenGameStartsTooltip=function(){return"Execute the actions below when the story starts."},c.whenLeft=function(){return"when left arrow"},c.whenLeftTooltip=function(){return"Execute the actions below when the left arrow key is pressed."},c.whenRight=function(){return"when right arrow"},c.whenRightTooltip=function(){return"Execute the actions below when the right arrow key is pressed."},c.whenSpriteClicked=function(){return"when actor clicked"},c.whenSpriteClickedN=function(a){return"when actor "+v(a,"spriteIndex")+" clicked"},c.whenSpriteClickedTooltip=function(){return"Execute the actions below when an actor is clicked."},c.whenSpriteCollidedN=function(a){return"when actor "+v(a,"spriteIndex")},c.whenSpriteCollidedTooltip=function(){return"Execute the actions below when an actor touches another actor."},c.whenSpriteCollidedWith=function(){return"touches"},c.whenSpriteCollidedWithN=function(a){return"touches actor "+v(a,"spriteIndex")},c.whenSpriteCollidedWithBlueFireball=function(){return"touches blue fireball"},c.whenSpriteCollidedWithPurpleFireball=function(){return"touches purple fireball"},c.whenSpriteCollidedWithRedFireball=function(){return"touches red fireball"},c.whenSpriteCollidedWithYellowHearts=function(){return"touches yellow hearts"},c.whenSpriteCollidedWithPurpleHearts=function(){return"touches purple hearts"},c.whenSpriteCollidedWithRedHearts=function(){return"touches red hearts"},c.whenSpriteCollidedWithBottomEdge=function(){return"touches bottom edge"},c.whenSpriteCollidedWithLeftEdge=function(){return"touches left edge"},c.whenSpriteCollidedWithRightEdge=function(){return"touches right edge"},c.whenSpriteCollidedWithTopEdge=function(){return"touches top edge"},c.whenUp=function(){return"when up arrow"},c.whenUpTooltip=function(){return"Execute the actions below when the up arrow key is pressed."},c.yes=function(){return"Yes"}},{messageformat:53}],42:[function(a,b,c){function d(a){return a.substr(1).split("|").reduce(function(a,b){var c=b.split(":"),d=c.shift(),e=c.join(":")||"";return e&&(e=", "+e),"filters."+d+"("+a+e+")"})}function e(a,b,c,d){var e=b.split("\n"),f=Math.max(d-3,0),g=Math.min(e.length,d+3),h=e.slice(f,g).map(function(a,b){var c=b+f+1;return(c==d?" >> ":" ")+c+"| "+a}).join("\n");throw a.path=c,a.message=(c||"ejs")+":"+d+"\n"+h+"\n\n"+a.message,a}function f(a,b){var c=k(i(b),a),d=j(a);return d||(c+=".ejs"),c}var g=a("./utils"),h=a("path"),i=h.dirname,j=h.extname,k=h.join,l=a("fs"),m=l.readFileSync,n=c.filters=a("./filters"),o={};c.clearCache=function(){o={}};var p=(c.parse=function(a,b){var b=b||{},e=b.open||c.open||"<%",g=b.close||c.close||"%>",h=b.filename,i=b.compileDebug!==!1,j="";j+="var buf = [];",!1!==b._with&&(j+="\nwith (locals || {}) { (function(){ "),j+="\n buf.push('";for(var k=1,l=!1,n=0,o=a.length;o>n;++n){var p=a[n];if(a.slice(n,e.length+n)==e){n+=e.length;var q,r,s=(i?"__stack.lineno=":"")+k;switch(a[n]){case"=":q="', escape(("+s+", ",r=")), '",++n;break;case"-":q="', ("+s+", ",r="), '",++n;break;default:q="');"+s+";",r="; buf.push('"}var t=a.indexOf(g,n),u=a.substring(n,t),v=n,w=null,x=0;if("-"==u[u.length-1]&&(u=u.substring(0,u.length-2),l=!0),0==u.trim().indexOf("include")){var y=u.trim().slice(7).trim();if(!h)throw new Error("filename option is required for includes");var z=f(y,h);w=m(z,"utf8"),w=c.parse(w,{filename:z,_with:!1,open:e,close:g,compileDebug:i}),j+="' + (function(){"+w+"})() + '",u=""}for(;~(x=u.indexOf("\n",x));)x++,k++;":"==u.substr(0,1)&&(u=d(u)),u&&(u.lastIndexOf("//")>u.lastIndexOf("\n")&&(u+="\n"),j+=q,j+=u,j+=r),n+=t-v+g.length-1}else"\\"==p?j+="\\\\":"'"==p?j+="\\'":"\r"==p||("\n"==p?l?l=!1:(j+="\\n",k++):j+=p)}return j+=!1!==b._with?"'); })();\n} \nreturn buf.join('');":"');\nreturn buf.join('');"},c.compile=function(a,b){b=b||{};var d=b.escape||g.escape,f=JSON.stringify(a),h=b.compileDebug!==!1,i=b.client,j=b.filename?JSON.stringify(b.filename):"undefined";a=h?["var __stack = { lineno: 1, input: "+f+", filename: "+j+" };",e.toString(),"try {",c.parse(a,b),"} catch (err) {"," rethrow(err, __stack.input, __stack.filename, __stack.lineno);","}"].join("\n"):c.parse(a,b),b.debug&&console.log(a),i&&(a="escape = escape || "+d.toString()+";\n"+a);try{var k=new Function("locals, filters, escape, rethrow",a)}catch(l){throw"SyntaxError"==l.name&&(l.message+=b.filename?" in "+j:" while compiling ejs"),l}return i?k:function(a){return k.call(this,a,n,d,e)}});c.render=function(a,b){var c,b=b||{};if(b.cache){if(!b.filename)throw new Error('"cache" option requires "filename".');c=o[b.filename]||(o[b.filename]=p(a,b))}else c=p(a,b);return b.__proto__=b.locals,c.call(b.scope,b)},c.renderFile=function(a,b,d){var e=a+":string";"function"==typeof b&&(d=b,b={}),b.filename=a;var f;try{f=b.cache?o[e]||(o[e]=m(a,"utf8")):m(a,"utf8")}catch(g){return void d(g)}d(null,c.render(f,b))},c.__express=c.renderFile,a.extensions?a.extensions[".ejs"]=function(a,b){b=b||a.filename;var c={filename:b,client:!0},d=l.readFileSync(b).toString(),e=p(d,c);a._compile("module.exports = "+e.toString()+";",b)}:a.registerExtension&&a.registerExtension(".ejs",function(a){return p(a,{})})},{"./filters":43,"./utils":44,fs:45,path:46}],43:[function(a,b,c){c.first=function(a){return a[0]},c.last=function(a){return a[a.length-1]},c.capitalize=function(a){return a=String(a),a[0].toUpperCase()+a.substr(1,a.length)},c.downcase=function(a){return String(a).toLowerCase()},c.upcase=function(a){return String(a).toUpperCase()},c.sort=function(a){return Object.create(a).sort()},c.sort_by=function(a,b){return Object.create(a).sort(function(a,c){return a=a[b],c=c[b],a>c?1:c>a?-1:0})},c.size=c.length=function(a){return a.length},c.plus=function(a,b){return Number(a)+Number(b)},c.minus=function(a,b){return Number(a)-Number(b)},c.times=function(a,b){return Number(a)*Number(b)},c.divided_by=function(a,b){return Number(a)/Number(b)},c.join=function(a,b){return a.join(b||", ")},c.truncate=function(a,b,c){return a=String(a),a.length>b&&(a=a.slice(0,b),c&&(a+=c)),a},c.truncate_words=function(a,b){var a=String(a),c=a.split(/ +/);return c.slice(0,b).join(" ")},c.replace=function(a,b,c){return String(a).replace(b,c||"")},c.prepend=function(a,b){return Array.isArray(a)?[b].concat(a):b+a},c.append=function(a,b){return Array.isArray(a)?a.concat(b):a+b},c.map=function(a,b){return a.map(function(a){return a[b]})},c.reverse=function(a){return Array.isArray(a)?a.reverse():String(a).split("").reverse().join("")},c.get=function(a,b){return a[b]},c.json=function(a){return JSON.stringify(a)}},{}],44:[function(a,b,c){c.escape=function(a){return String(a).replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}},{}],45:[function(){},{}],46:[function(a,b,c){(function(a){function b(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function d(a,b){if(a.filter)return a.filter(b);for(var c=[],d=0;d=-1&&!e;f--){var g=f>=0?arguments[f]:a.cwd();if("string"!=typeof g)throw new TypeError("Arguments to path.resolve must be strings");g&&(c=g+"/"+c,e="/"===g.charAt(0))}return c=b(d(c.split("/"),function(a){return!!a}),!e).join("/"),(e?"/":"")+c||"."},c.normalize=function(a){var e=c.isAbsolute(a),f="/"===g(a,-1);return a=b(d(a.split("/"),function(a){return!!a}),!e).join("/"),a||e||(a="."),a&&f&&(a+="/"),(e?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(d(a,function(a){if("string"!=typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;ib&&(b=a.length+b),a.substr(b,c)}}).call(this,a("JkpR2F"))},{JkpR2F:47}],47:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],48:[function(a,b,c){(function(a){!function(d){function e(a){throw RangeError(H[a])}function f(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function g(a,b){return f(a.split(G),b).join(".")}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function i(a){return f(a,function(a){var b="";return a>65535&&(a-=65536,b+=K(a>>>10&1023|55296),a=56320|1023&a),b+=K(a)}).join("")}function j(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:w}function k(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;for(a=c?J(a/A):a>>1,a+=J(a/b);a>I*y>>1;d+=w)a=J(a/I);return J(d+(I+1)*a/(a+z))}function m(a){var b,c,d,f,g,h,k,m,n,o,p=[],q=a.length,r=0,s=C,t=B;for(c=a.lastIndexOf(D),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&e("not-basic"),p.push(a.charCodeAt(d));for(f=c>0?c+1:0;q>f;){for(g=r,h=1,k=w;f>=q&&e("invalid-input"),m=j(a.charCodeAt(f++)),(m>=w||m>J((v-r)/h))&&e("overflow"),r+=m*h,n=t>=k?x:k>=t+y?y:k-t,!(n>m);k+=w)o=w-n,h>J(v/o)&&e("overflow"),h*=o;b=p.length+1,t=l(r-g,b,0==g),J(r/b)>v-s&&e("overflow"),s+=J(r/b),r%=b,p.splice(r++,0,s)}return i(p)}function n(a){var b,c,d,f,g,i,j,m,n,o,p,q,r,s,t,u=[];for(a=h(a),q=a.length,b=C,c=0,g=B,i=0;q>i;++i)p=a[i],128>p&&u.push(K(p));for(d=f=u.length,f&&u.push(D);q>d;){for(j=v,i=0;q>i;++i)p=a[i],p>=b&&j>p&&(j=p);for(r=d+1,j-b>J((v-c)/r)&&e("overflow"),c+=(j-b)*r,b=j,i=0;q>i;++i)if(p=a[i],b>p&&++c>v&&e("overflow"),p==b){for(m=c,n=w;o=g>=n?x:n>=g+y?y:n-g,!(o>m);n+=w)t=m-o,s=w-o,u.push(K(k(o+t%s,0))),m=J(t/s);u.push(K(k(m,0))),g=l(c,r,d==f),c=0,++d}++c,++b}return u.join("")}function o(a){return g(a,function(a){return E.test(a)?m(a.slice(4).toLowerCase()):a})}function p(a){return g(a,function(a){return F.test(a)?"xn--"+n(a):a})}var q="object"==typeof c&&c,r="object"==typeof b&&b&&b.exports==q&&b,s="object"==typeof a&&a;(s.global===s||s.window===s)&&(d=s);var t,u,v=2147483647,w=36,x=1,y=26,z=38,A=700,B=72,C=128,D="-",E=/^xn--/,F=/[^ -~]/,G=/\x2E|\u3002|\uFF0E|\uFF61/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=w-x,J=Math.floor,K=String.fromCharCode;if(t={version:"1.2.4",ucs2:{decode:h,encode:i},decode:m,encode:n,toASCII:p,toUnicode:o},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return t});else if(q&&!q.nodeType)if(r)r.exports=t;else for(u in t)t.hasOwnProperty(u)&&(q[u]=t[u]);else d.punycode=t}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],50:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];
+},c.numBlocksNeeded=function(a){return"Congratulations! You completed Puzzle "+v(a,"puzzleNumber")+". (However, you could have used only "+p(a,"numBlocks",0,"en",{one:"1 block",other:n(a,"numBlocks")+" blocks"})+".)"},c.numLinesOfCodeWritten=function(a){return"You just wrote "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code!"},c.play=function(){return"play"},c.puzzleTitle=function(a){return"Puzzle "+v(a,"puzzle_number")+" of "+v(a,"stage_total")},c.repeat=function(){return"repeat"},c.resetProgram=function(){return"Reset"},c.runProgram=function(){return"Run"},c.runTooltip=function(){return"Run the program defined by the blocks in the workspace."},c.score=function(){return"score"},c.showCodeHeader=function(){return"Show Code"},c.showGeneratedCode=function(){return"Show code"},c.subtitle=function(){return"a visual programming environment"},c.textVariable=function(){return"text"},c.tooFewBlocksMsg=function(){return"You are using all of the necessary types of blocks, but try using more of these types of blocks to complete this puzzle."},c.tooManyBlocksMsg=function(){return"This puzzle can be solved with blocks."},c.tooMuchWork=function(){return"You made me do a lot of work! Could you try repeating fewer times?"},c.toolboxHeader=function(){return"Blocks"},c.openWorkspace=function(){return"How It Works"},c.totalNumLinesOfCodeWritten=function(a){return"All-time total: "+p(a,"numLines",0,"en",{one:"1 line",other:n(a,"numLines")+" lines"})+" of code."},c.tryAgain=function(){return"Try again"},c.hintRequest=function(){return"See hint"},c.backToPreviousLevel=function(){return"Back to previous level"},c.saveToGallery=function(){return"Save to your gallery"},c.savedToGallery=function(){return"Saved to your gallery!"},c.typeCode=function(){return"Type your JavaScript code below these instructions."},c.typeFuncs=function(){return"Available functions:%1"},c.typeHint=function(){return"Note that the parentheses and semicolons are required."},c.workspaceHeader=function(){return"Assemble your blocks here: "},c.infinity=function(){return"Infinity"},c.rotateText=function(){return"Rotate your device."},c.orientationLock=function(){return"Turn off orientation lock in device settings."},c.wantToLearn=function(){return"Want to learn to code?"},c.watchVideo=function(){return"Watch the Video"},c.when=function(){return"when"},c.whenRun=function(){return"when run"},c.tryHOC=function(){return"Try the Hour of Code"},c.signup=function(){return"Sign up for the intro course"},c.hintHeader=function(){return"Here's a tip:"},c.genericFeedback=function(){return"See how you ended up, and try to fix your program."}},{messageformat:53}],41:[function(a,b,c){var d=a("messageformat");d.locale.en=function(a){return 1===a?"one":"other"},c.actor=function(){return"actor"},c.catActions=function(){return"Actions"},c.catControl=function(){return"Loops"},c.catEvents=function(){return"Events"},c.catLogic=function(){return"Logic"},c.catMath=function(){return"Math"},c.catProcedures=function(){return"Functions"},c.catText=function(){return"Text"},c.catVariables=function(){return"Variables"},c.changeScoreTooltip=function(){return"Add or remove a point to the score."},c.changeScoreTooltipK1=function(){return"Add a point to the score."},c.continue=function(){return"Continue"},c.decrementPlayerScore=function(){return"remove point"},c.defaultSayText=function(){return"type here"},c.emotion=function(){return"mood"},c.finalLevel=function(){return"Congratulations! You have solved the final puzzle."},c.hello=function(){return"hello"},c.helloWorld=function(){return"Hello World!"},c.incrementPlayerScore=function(){return"score point"},c.makeProjectileDisappear=function(){return"disappear"},c.makeProjectileBounce=function(){return"bounce"},c.makeProjectileBlueFireball=function(){return"make blue fireball"},c.makeProjectilePurpleFireball=function(){return"make purple fireball"},c.makeProjectileRedFireball=function(){return"make red fireball"},c.makeProjectileYellowHearts=function(){return"make yellow hearts"},c.makeProjectilePurpleHearts=function(){return"make purple hearts"},c.makeProjectileRedHearts=function(){return"make red hearts"},c.makeProjectileTooltip=function(){return"Make the projectile that just collided disappear or bounce."},c.makeYourOwn=function(){return"Make Your Own Play Lab App"},c.moveDirectionDown=function(){return"down"},c.moveDirectionLeft=function(){return"left"},c.moveDirectionRight=function(){return"right"},c.moveDirectionUp=function(){return"up"},c.moveDirectionRandom=function(){return"random"},c.moveDistance25=function(){return"25 pixels"},c.moveDistance50=function(){return"50 pixels"},c.moveDistance100=function(){return"100 pixels"},c.moveDistance200=function(){return"200 pixels"},c.moveDistance400=function(){return"400 pixels"},c.moveDistancePixels=function(){return"pixels"},c.moveDistanceRandom=function(){return"random pixels"},c.moveDistanceTooltip=function(){return"Move an actor a specific distance in the specified direction."},c.moveSprite=function(){return"move"},c.moveSpriteN=function(a){return"move actor "+v(a,"spriteIndex")},c.moveDown=function(){return"move down"},c.moveDownTooltip=function(){return"Move an actor down."},c.moveLeft=function(){return"move left"},c.moveLeftTooltip=function(){return"Move an actor to the left."},c.moveRight=function(){return"move right"},c.moveRightTooltip=function(){return"Move an actor to the right."},c.moveUp=function(){return"move up"},c.moveUpTooltip=function(){return"Move an actor up."},c.moveTooltip=function(){return"Move an actor."},c.nextLevel=function(){return"Congratulations! You have completed this puzzle."},c.no=function(){return"No"},c.numBlocksNeeded=function(){return"This puzzle can be solved with %1 blocks."},c.ouchExclamation=function(){return"Ouch!"},c.playSoundCrunch=function(){return"play crunch sound"},c.playSoundGoal1=function(){return"play goal 1 sound"},c.playSoundGoal2=function(){return"play goal 2 sound"},c.playSoundHit=function(){return"play hit sound"},c.playSoundLosePoint=function(){return"play lose point sound"},c.playSoundLosePoint2=function(){return"play lose point 2 sound"},c.playSoundRetro=function(){return"play retro sound"},c.playSoundRubber=function(){return"play rubber sound"},c.playSoundSlap=function(){return"play slap sound"},c.playSoundTooltip=function(){return"Play the chosen sound."},c.playSoundWinPoint=function(){return"play win point sound"},c.playSoundWinPoint2=function(){return"play win point 2 sound"},c.playSoundWood=function(){return"play wood sound"},c.positionOutTopLeft=function(){return"to the above top left position"},c.positionOutTopRight=function(){return"to the above top right position"},c.positionTopOutLeft=function(){return"to the top outside left position"},c.positionTopLeft=function(){return"to the top left position"},c.positionTopCenter=function(){return"to the top center position"},c.positionTopRight=function(){return"to the top right position"},c.positionTopOutRight=function(){return"to the top outside right position"},c.positionMiddleLeft=function(){return"to the middle left position"},c.positionMiddleCenter=function(){return"to the middle center position"},c.positionMiddleRight=function(){return"to the middle right position"},c.positionBottomOutLeft=function(){return"to the bottom outside left position"},c.positionBottomLeft=function(){return"to the bottom left position"},c.positionBottomCenter=function(){return"to the bottom center position"},c.positionBottomRight=function(){return"to the bottom right position"},c.positionBottomOutRight=function(){return"to the bottom outside right position"},c.positionOutBottomLeft=function(){return"to the below bottom left position"},c.positionOutBottomRight=function(){return"to the below bottom right position"},c.positionRandom=function(){return"to the random position"},c.projectileBlueFireball=function(){return"blue fireball"},c.projectilePurpleFireball=function(){return"purple fireball"},c.projectileRedFireball=function(){return"red fireball"},c.projectileYellowHearts=function(){return"yellow hearts"},c.projectilePurpleHearts=function(){return"purple hearts"},c.projectileRedHearts=function(){return"red hearts"},c.projectileRandom=function(){return"random"},c.reinfFeedbackMsg=function(){return'You can press the "Try again" button to go back to playing your story.'},c.repeatForever=function(){return"repeat forever"},c.repeatDo=function(){return"do"},c.repeatForeverTooltip=function(){return"Execute the actions in this block repeatedly while the story is running."},c.saySprite=function(){return"say"},c.saySpriteN=function(a){return"actor "+v(a,"spriteIndex")+" say"},c.saySpriteTooltip=function(){return"Pop up a speech bubble with the associated text from the specified actor."},c.scoreText=function(a){return"Score: "+v(a,"playerScore")},c.setBackground=function(){return"set background"},c.setBackgroundRandom=function(){return"set random background"},c.setBackgroundBlack=function(){return"set black background"},c.setBackgroundCave=function(){return"set cave background"},c.setBackgroundCloudy=function(){return"set cloudy background"},c.setBackgroundHardcourt=function(){return"set hardcourt background"},c.setBackgroundNight=function(){return"set night background"},c.setBackgroundUnderwater=function(){return"set underwater background"},c.setBackgroundCity=function(){return"set city background"},c.setBackgroundDesert=function(){return"set desert background"},c.setBackgroundRainbow=function(){return"set rainbow background"},c.setBackgroundSoccer=function(){return"set soccer background"},c.setBackgroundSpace=function(){return"set space background"},c.setBackgroundTennis=function(){return"set tennis background"},c.setBackgroundWinter=function(){return"set winter background"},c.setBackgroundTooltip=function(){return"Sets the background image"},c.setScoreText=function(){return"set score"},c.setScoreTextTooltip=function(){return"Sets the text to be displayed in the score area."},c.setSpriteEmotionAngry=function(){return"to a angry mood"},c.setSpriteEmotionHappy=function(){return"to a happy mood"},c.setSpriteEmotionNormal=function(){return"to a normal mood"},c.setSpriteEmotionRandom=function(){return"to a random mood"},c.setSpriteEmotionSad=function(){return"to a sad mood"},c.setSpriteEmotionTooltip=function(){return"Sets the actor mood"},c.setSpriteAlien=function(){return"to an alien image"},c.setSpriteBat=function(){return"to a bat image"},c.setSpriteBird=function(){return"to a bird image"},c.setSpriteCat=function(){return"to a cat image"},c.setSpriteCaveBoy=function(){return"to a cave boy image"},c.setSpriteCaveGirl=function(){return"to a cave girl image"},c.setSpriteDinosaur=function(){return"to a dinosaur image"},c.setSpriteDog=function(){return"to a dog image"},c.setSpriteDragon=function(){return"to a dragon image"},c.setSpriteGhost=function(){return"to a ghost image"},c.setSpriteHidden=function(){return"to a hidden image"},c.setSpriteHideK1=function(){return"hide"},c.setSpriteKnight=function(){return"to a knight image"},c.setSpriteMonster=function(){return"to a monster image"},c.setSpriteNinja=function(){return"to a masked ninja image"},c.setSpriteOctopus=function(){return"to an octopus image"},c.setSpritePenguin=function(){return"to a penguin image"},c.setSpritePirate=function(){return"to a pirate image"},c.setSpritePrincess=function(){return"to a princess image"},c.setSpriteRandom=function(){return"to a random image"},c.setSpriteRobot=function(){return"to a robot image"},c.setSpriteShowK1=function(){return"show"},c.setSpriteSpacebot=function(){return"to a spacebot image"},c.setSpriteSoccerGirl=function(){return"to a soccer girl image"},c.setSpriteSoccerBoy=function(){return"to a soccer boy image"},c.setSpriteSquirrel=function(){return"to a squirrel image"},c.setSpriteTennisGirl=function(){return"to a tennis girl image"},c.setSpriteTennisBoy=function(){return"to a tennis boy image"},c.setSpriteUnicorn=function(){return"to a unicorn image"},c.setSpriteWitch=function(){return"to a witch image"},c.setSpriteWizard=function(){return"to a wizard image"},c.setSpritePositionTooltip=function(){return"Instantly moves an actor to the specified location."},c.setSpriteK1Tooltip=function(){return"Shows or hides the specified actor."},c.setSpriteTooltip=function(){return"Sets the actor image"},c.setSpriteSizeRandom=function(){return"to a random size"},c.setSpriteSizeVerySmall=function(){return"to a very small size"},c.setSpriteSizeSmall=function(){return"to a small size"},c.setSpriteSizeNormal=function(){return"to a normal size"},c.setSpriteSizeLarge=function(){return"to a large size"},c.setSpriteSizeVeryLarge=function(){return"to a very large size"},c.setSpriteSizeTooltip=function(){return"Sets the size of an actor"},c.setSpriteSpeedRandom=function(){return"to a random speed"},c.setSpriteSpeedVerySlow=function(){return"to a very slow speed"},c.setSpriteSpeedSlow=function(){return"to a slow speed"},c.setSpriteSpeedNormal=function(){return"to a normal speed"},c.setSpriteSpeedFast=function(){return"to a fast speed"},c.setSpriteSpeedVeryFast=function(){return"to a very fast speed"},c.setSpriteSpeedTooltip=function(){return"Sets the speed of an actor"},c.setSpriteZombie=function(){return"to a zombie image"},c.shareStudioTwitter=function(){return"Check out the story I made. I wrote it myself with @codeorg"},c.shareGame=function(){return"Share your story:"},c.showTitleScreen=function(){return"show title screen"},c.showTitleScreenTitle=function(){return"title"},c.showTitleScreenText=function(){return"text"},c.showTSDefTitle=function(){return"type title here"},c.showTSDefText=function(){return"type text here"},c.showTitleScreenTooltip=function(){return"Show a title screen with the associated title and text."},c.setSprite=function(){return"set"},c.setSpriteN=function(a){return"set actor "+v(a,"spriteIndex")},c.soundCrunch=function(){return"crunch"},c.soundGoal1=function(){return"goal 1"},c.soundGoal2=function(){return"goal 2"},c.soundHit=function(){return"hit"},c.soundLosePoint=function(){return"lose point"},c.soundLosePoint2=function(){return"lose point 2"},c.soundRetro=function(){return"retro"},c.soundRubber=function(){return"rubber"},c.soundSlap=function(){return"slap"},c.soundWinPoint=function(){return"win point"},c.soundWinPoint2=function(){return"win point 2"},c.soundWood=function(){return"wood"},c.speed=function(){return"speed"},c.stopSprite=function(){return"stop"},c.stopSpriteN=function(a){return"stop actor "+v(a,"spriteIndex")},c.stopTooltip=function(){return"Stops an actor's movement."},c.throwSprite=function(){return"throw"},c.throwSpriteN=function(a){return"actor "+v(a,"spriteIndex")+" throw"},c.throwTooltip=function(){return"Throws a projectile from the specified actor."},c.vanish=function(){return"vanish"},c.vanishActorN=function(a){return"vanish actor "+v(a,"spriteIndex")},c.vanishTooltip=function(){return"Vanishes the actor."},c.waitFor=function(){return"wait for"},c.waitSeconds=function(){return"seconds"},c.waitForClick=function(){return"wait for click"},c.waitForRandom=function(){return"wait for random"},c.waitForHalfSecond=function(){return"wait for a half second"},c.waitFor1Second=function(){return"wait for 1 second"},c.waitFor2Seconds=function(){return"wait for 2 seconds"},c.waitFor5Seconds=function(){return"wait for 5 seconds"},c.waitFor10Seconds=function(){return"wait for 10 seconds"},c.waitParamsTooltip=function(){return"Waits for a specified number of seconds or use zero to wait until a click occurs."},c.waitTooltip=function(){return"Waits for a specified amount of time or until a click occurs."},c.whenArrowDown=function(){return"down arrow"},c.whenArrowLeft=function(){return"left arrow"},c.whenArrowRight=function(){return"right arrow"},c.whenArrowUp=function(){return"up arrow"},c.whenArrowTooltip=function(){return"Execute the actions below when the specified arrow key is pressed."},c.whenDown=function(){return"when down arrow"},c.whenDownTooltip=function(){return"Execute the actions below when the down arrow key is pressed."},c.whenGameStarts=function(){return"when story starts"},c.whenGameStartsTooltip=function(){return"Execute the actions below when the story starts."},c.whenLeft=function(){return"when left arrow"},c.whenLeftTooltip=function(){return"Execute the actions below when the left arrow key is pressed."},c.whenRight=function(){return"when right arrow"},c.whenRightTooltip=function(){return"Execute the actions below when the right arrow key is pressed."},c.whenSpriteClicked=function(){return"when actor clicked"},c.whenSpriteClickedN=function(a){return"when actor "+v(a,"spriteIndex")+" clicked"},c.whenSpriteClickedTooltip=function(){return"Execute the actions below when an actor is clicked."},c.whenSpriteCollidedN=function(a){return"when actor "+v(a,"spriteIndex")},c.whenSpriteCollidedTooltip=function(){return"Execute the actions below when an actor touches another actor."},c.whenSpriteCollidedWith=function(){return"touches"},c.whenSpriteCollidedWithN=function(a){return"touches actor "+v(a,"spriteIndex")},c.whenSpriteCollidedWithBlueFireball=function(){return"touches blue fireball"},c.whenSpriteCollidedWithPurpleFireball=function(){return"touches purple fireball"},c.whenSpriteCollidedWithRedFireball=function(){return"touches red fireball"},c.whenSpriteCollidedWithYellowHearts=function(){return"touches yellow hearts"},c.whenSpriteCollidedWithPurpleHearts=function(){return"touches purple hearts"},c.whenSpriteCollidedWithRedHearts=function(){return"touches red hearts"},c.whenSpriteCollidedWithBottomEdge=function(){return"touches bottom edge"},c.whenSpriteCollidedWithLeftEdge=function(){return"touches left edge"},c.whenSpriteCollidedWithRightEdge=function(){return"touches right edge"},c.whenSpriteCollidedWithTopEdge=function(){return"touches top edge"},c.whenUp=function(){return"when up arrow"},c.whenUpTooltip=function(){return"Execute the actions below when the up arrow key is pressed."},c.yes=function(){return"Yes"}},{messageformat:53}],42:[function(a,b,c){function d(a){return a.substr(1).split("|").reduce(function(a,b){var c=b.split(":"),d=c.shift(),e=c.join(":")||"";return e&&(e=", "+e),"filters."+d+"("+a+e+")"})}function e(a,b,c,d){var e=b.split("\n"),f=Math.max(d-3,0),g=Math.min(e.length,d+3),h=e.slice(f,g).map(function(a,b){var c=b+f+1;return(c==d?" >> ":" ")+c+"| "+a}).join("\n");throw a.path=c,a.message=(c||"ejs")+":"+d+"\n"+h+"\n\n"+a.message,a}function f(a,b){var c=k(i(b),a),d=j(a);return d||(c+=".ejs"),c}var g=a("./utils"),h=a("path"),i=h.dirname,j=h.extname,k=h.join,l=a("fs"),m=l.readFileSync,n=c.filters=a("./filters"),o={};c.clearCache=function(){o={}};var p=(c.parse=function(a,b){var b=b||{},e=b.open||c.open||"<%",g=b.close||c.close||"%>",h=b.filename,i=b.compileDebug!==!1,j="";j+="var buf = [];",!1!==b._with&&(j+="\nwith (locals || {}) { (function(){ "),j+="\n buf.push('";for(var k=1,l=!1,n=0,o=a.length;o>n;++n){var p=a[n];if(a.slice(n,e.length+n)==e){n+=e.length;var q,r,s=(i?"__stack.lineno=":"")+k;switch(a[n]){case"=":q="', escape(("+s+", ",r=")), '",++n;break;case"-":q="', ("+s+", ",r="), '",++n;break;default:q="');"+s+";",r="; buf.push('"}var t=a.indexOf(g,n),u=a.substring(n,t),v=n,w=null,x=0;if("-"==u[u.length-1]&&(u=u.substring(0,u.length-2),l=!0),0==u.trim().indexOf("include")){var y=u.trim().slice(7).trim();if(!h)throw new Error("filename option is required for includes");var z=f(y,h);w=m(z,"utf8"),w=c.parse(w,{filename:z,_with:!1,open:e,close:g,compileDebug:i}),j+="' + (function(){"+w+"})() + '",u=""}for(;~(x=u.indexOf("\n",x));)x++,k++;":"==u.substr(0,1)&&(u=d(u)),u&&(u.lastIndexOf("//")>u.lastIndexOf("\n")&&(u+="\n"),j+=q,j+=u,j+=r),n+=t-v+g.length-1}else"\\"==p?j+="\\\\":"'"==p?j+="\\'":"\r"==p||("\n"==p?l?l=!1:(j+="\\n",k++):j+=p)}return j+=!1!==b._with?"'); })();\n} \nreturn buf.join('');":"');\nreturn buf.join('');"},c.compile=function(a,b){b=b||{};var d=b.escape||g.escape,f=JSON.stringify(a),h=b.compileDebug!==!1,i=b.client,j=b.filename?JSON.stringify(b.filename):"undefined";a=h?["var __stack = { lineno: 1, input: "+f+", filename: "+j+" };",e.toString(),"try {",c.parse(a,b),"} catch (err) {"," rethrow(err, __stack.input, __stack.filename, __stack.lineno);","}"].join("\n"):c.parse(a,b),b.debug&&console.log(a),i&&(a="escape = escape || "+d.toString()+";\n"+a);try{var k=new Function("locals, filters, escape, rethrow",a)}catch(l){throw"SyntaxError"==l.name&&(l.message+=b.filename?" in "+j:" while compiling ejs"),l}return i?k:function(a){return k.call(this,a,n,d,e)}});c.render=function(a,b){var c,b=b||{};if(b.cache){if(!b.filename)throw new Error('"cache" option requires "filename".');c=o[b.filename]||(o[b.filename]=p(a,b))}else c=p(a,b);return b.__proto__=b.locals,c.call(b.scope,b)},c.renderFile=function(a,b,d){var e=a+":string";"function"==typeof b&&(d=b,b={}),b.filename=a;var f;try{f=b.cache?o[e]||(o[e]=m(a,"utf8")):m(a,"utf8")}catch(g){return void d(g)}d(null,c.render(f,b))},c.__express=c.renderFile,a.extensions?a.extensions[".ejs"]=function(a,b){b=b||a.filename;var c={filename:b,client:!0},d=l.readFileSync(b).toString(),e=p(d,c);a._compile("module.exports = "+e.toString()+";",b)}:a.registerExtension&&a.registerExtension(".ejs",function(a){return p(a,{})})},{"./filters":43,"./utils":44,fs:45,path:46}],43:[function(a,b,c){c.first=function(a){return a[0]},c.last=function(a){return a[a.length-1]},c.capitalize=function(a){return a=String(a),a[0].toUpperCase()+a.substr(1,a.length)},c.downcase=function(a){return String(a).toLowerCase()},c.upcase=function(a){return String(a).toUpperCase()},c.sort=function(a){return Object.create(a).sort()},c.sort_by=function(a,b){return Object.create(a).sort(function(a,c){return a=a[b],c=c[b],a>c?1:c>a?-1:0})},c.size=c.length=function(a){return a.length},c.plus=function(a,b){return Number(a)+Number(b)},c.minus=function(a,b){return Number(a)-Number(b)},c.times=function(a,b){return Number(a)*Number(b)},c.divided_by=function(a,b){return Number(a)/Number(b)},c.join=function(a,b){return a.join(b||", ")},c.truncate=function(a,b,c){return a=String(a),a.length>b&&(a=a.slice(0,b),c&&(a+=c)),a},c.truncate_words=function(a,b){var a=String(a),c=a.split(/ +/);return c.slice(0,b).join(" ")},c.replace=function(a,b,c){return String(a).replace(b,c||"")},c.prepend=function(a,b){return Array.isArray(a)?[b].concat(a):b+a},c.append=function(a,b){return Array.isArray(a)?a.concat(b):a+b},c.map=function(a,b){return a.map(function(a){return a[b]})},c.reverse=function(a){return Array.isArray(a)?a.reverse():String(a).split("").reverse().join("")},c.get=function(a,b){return a[b]},c.json=function(a){return JSON.stringify(a)}},{}],44:[function(a,b,c){c.escape=function(a){return String(a).replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}},{}],45:[function(){},{}],46:[function(a,b,c){(function(a){function b(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function d(a,b){if(a.filter)return a.filter(b);for(var c=[],d=0;d=-1&&!e;f--){var g=f>=0?arguments[f]:a.cwd();if("string"!=typeof g)throw new TypeError("Arguments to path.resolve must be strings");g&&(c=g+"/"+c,e="/"===g.charAt(0))}return c=b(d(c.split("/"),function(a){return!!a}),!e).join("/"),(e?"/":"")+c||"."},c.normalize=function(a){var e=c.isAbsolute(a),f="/"===g(a,-1);return a=b(d(a.split("/"),function(a){return!!a}),!e).join("/"),a||e||(a="."),a&&f&&(a+="/"),(e?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(d(a,function(a){if("string"!=typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;ib&&(b=a.length+b),a.substr(b,c)}}).call(this,a("JkpR2F"))},{JkpR2F:47}],47:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],48:[function(a,b,c){(function(a){!function(d){function e(a){throw RangeError(H[a])}function f(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function g(a,b){return f(a.split(G),b).join(".")}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function i(a){return f(a,function(a){var b="";return a>65535&&(a-=65536,b+=K(a>>>10&1023|55296),a=56320|1023&a),b+=K(a)}).join("")}function j(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:w}function k(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;for(a=c?J(a/A):a>>1,a+=J(a/b);a>I*y>>1;d+=w)a=J(a/I);return J(d+(I+1)*a/(a+z))}function m(a){var b,c,d,f,g,h,k,m,n,o,p=[],q=a.length,r=0,s=C,t=B;for(c=a.lastIndexOf(D),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&e("not-basic"),p.push(a.charCodeAt(d));for(f=c>0?c+1:0;q>f;){for(g=r,h=1,k=w;f>=q&&e("invalid-input"),m=j(a.charCodeAt(f++)),(m>=w||m>J((v-r)/h))&&e("overflow"),r+=m*h,n=t>=k?x:k>=t+y?y:k-t,!(n>m);k+=w)o=w-n,h>J(v/o)&&e("overflow"),h*=o;b=p.length+1,t=l(r-g,b,0==g),J(r/b)>v-s&&e("overflow"),s+=J(r/b),r%=b,p.splice(r++,0,s)}return i(p)}function n(a){var b,c,d,f,g,i,j,m,n,o,p,q,r,s,t,u=[];for(a=h(a),q=a.length,b=C,c=0,g=B,i=0;q>i;++i)p=a[i],128>p&&u.push(K(p));for(d=f=u.length,f&&u.push(D);q>d;){for(j=v,i=0;q>i;++i)p=a[i],p>=b&&j>p&&(j=p);for(r=d+1,j-b>J((v-c)/r)&&e("overflow"),c+=(j-b)*r,b=j,i=0;q>i;++i)if(p=a[i],b>p&&++c>v&&e("overflow"),p==b){for(m=c,n=w;o=g>=n?x:n>=g+y?y:n-g,!(o>m);n+=w)t=m-o,s=w-o,u.push(K(k(o+t%s,0))),m=J(t/s);u.push(K(k(m,0))),g=l(c,r,d==f),c=0,++d}++c,++b}return u.join("")}function o(a){return g(a,function(a){return E.test(a)?m(a.slice(4).toLowerCase()):a})}function p(a){return g(a,function(a){return F.test(a)?"xn--"+n(a):a})}var q="object"==typeof c&&c,r="object"==typeof b&&b&&b.exports==q&&b,s="object"==typeof a&&a;(s.global===s||s.window===s)&&(d=s);var t,u,v=2147483647,w=36,x=1,y=26,z=38,A=700,B=72,C=128,D="-",E=/^xn--/,F=/[^ -~]/,G=/\x2E|\u3002|\uFF0E|\uFF61/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=w-x,J=Math.floor,K=String.fromCharCode;if(t={version:"1.2.4",ucs2:{decode:h,encode:i},decode:m,encode:n,toASCII:p,toUnicode:o},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return t});else if(q&&!q.nodeType)if(r)r.exports=t;else for(u in t)t.hasOwnProperty(u)&&(q[u]=t[u]);else d.punycode=t}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],50:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];
if(!p)for(var q=this.hostname.split(/\./),j=0,B=q.length;B>j;j++){var C=q[j];if(C&&!C.match(v)){for(var D="",E=0,F=C.length;F>E;E++)D+=C.charCodeAt(E)>127?"x":C[E];if(!D.match(v)){var G=q.slice(0,j),H=q.slice(j+1),I=C.match(w);I&&(G.push(I[1]),H.unshift(I[2])),H.length&&(d="/"+H.join(".")+d),this.hostname=G.join(".");break}}}if(this.hostname=this.hostname.length>u?"":this.hostname.toLowerCase(),!p){for(var J=this.hostname.split("."),K=[],j=0;jj;j++){var O=r[j],P=encodeURIComponent(O);P===O&&(P=escape(O)),d=d.split(O).join(P)}var Q=d.indexOf("#");-1!==Q&&(this.hash=d.substr(Q),d=d.slice(0,Q));var R=d.indexOf("?");if(-1!==R?(this.search=d.substr(R),this.query=d.substr(R+1),b&&(this.query=A.parse(this.query)),d=d.slice(0,R)):b&&(this.search="",this.query={}),d&&(this.pathname=d),z[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j(this.query)&&Object.keys(this.query).length&&(f=A.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==b.substr(-1)&&(b+=":"),this.slashes||(!b||z[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(i(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(Object.keys(this).forEach(function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return Object.keys(a).forEach(function(b){"protocol"!==b&&(c[b]=a[b])}),z[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!z[a.protocol])return Object.keys(a).forEach(function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||y[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),j=a.host||a.pathname&&"/"===a.pathname.charAt(0),m=j||h||c.host&&a.pathname,n=m,o=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],p=c.protocol&&!z[c.protocol];if(p&&(c.hostname="",c.port=null,c.host&&(""===o[0]?o[0]=c.host:o.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),m=m&&(""===e[0]||""===o[0])),j)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,o=e;else if(e.length)o||(o=[]),o.pop(),o=o.concat(e),c.search=a.search,c.query=a.query;else if(!l(a.search)){if(p){c.hostname=c.host=o.shift();var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return c.search=a.search,c.query=a.query,k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!o.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var r=o.slice(-1)[0],s=(c.host||a.host)&&("."===r||".."===r)||""===r,t=0,u=o.length;u>=0;u--)r=o[u],"."==r?o.splice(u,1):".."===r?(o.splice(u,1),t++):t&&(o.splice(u,1),t--);if(!m&&!n)for(;t--;t)o.unshift("..");!m||""===o[0]||o[0]&&"/"===o[0].charAt(0)||o.unshift(""),s&&"/"!==o.join("/").substr(-1)&&o.push("");var v=""===o[0]||o[0]&&"/"===o[0].charAt(0);if(p){c.hostname=c.host=v?"":o.length?o.shift():"";var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return m=m||c.host&&o.length,m&&!v&&o.unshift(""),o.length?c.pathname=o.join("/"):(c.pathname=null,c.path=null),k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=o.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{punycode:48,querystring:51}],53:[function(a,b,d){!function(a){function e(a,b){var c;if(a&&b&&(e.locale[a]=b),c=a=a||"en",b=b||e.locale[c=e.Utils.getFallbackLocale(a)],!b)throw new Error("Plural Function not found for locale: "+a);this.pluralFunc=b,this.locale=a,this.fallbackLocale=c}c=function(a){if(!a)throw new Error("MessageFormat: No data passed to function.")},n=function(a,b,c){if(isNaN(a[b]))throw new Error("MessageFormat: `"+b+"` isnt a number.");return a[b]-(c||0)},v=function(a,b){return c(a),a[b]},p=function(a,b,d,f,g){return c(a),a[b]in g?g[a[b]]:(b=e.locale[f](a[b]-d),b in g?g[b]:g.other)},s=function(a,b,d){return c(a),a[b]in d?d[a[b]]:d.other},e.locale={en:function(a){return 1===a?"one":"other"}},e.SafeString=function(a){this.string=a},e.SafeString.prototype.toString=function(){return this.string.toString()},e.Utils={numSub:function(a,b,c,d){var e=a.replace(/(^|[^\\])#/g,'$1"+n('+b+","+c+(d?","+d:"")+')+"');return e.replace(/^""\+/,"").replace(/\+""$/,"")},escapeExpression:function(a){var b={"\n":"\\n",'"':'\\"'},c=/[\n"]/g,d=/[\n"]/,f=function(a){return b[a]||"&"};return a instanceof e.SafeString?a.toString():null===a||a===!1?"":d.test(a)?a.replace(c,f):a},getFallbackLocale:function(a){for(var b=a.indexOf("-")>=0?"-":"_";!e.locale.hasOwnProperty(a);)if(a=a.substring(0,a.lastIndexOf(b)),0===a.length)return null;return a}};var f=function(){function a(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var b={parse:function(b,c){function d(a){D>B||(B>D&&(D=B,E=[]),E.push(a))}function e(){var a,b;return b=B,a=f(),null!==a&&(a=function(a,b){return{type:"program",program:b}}(b,a)),null===a&&(B=b),a}function f(){var a,b,c,d,e;if(d=B,e=B,a=q(),null!==a){for(b=[],c=g();null!==c;)b.push(c),c=g();null!==b?a=[a,b]:(a=null,B=e)}else a=null,B=e;return null!==a&&(a=function(a,b,c){var d=[];b&&b.val&&d.push(b);for(var e in c)c.hasOwnProperty(e)&&d.push(c[e]);return{type:"messageFormatPattern",statements:d}}(d,a[0],a[1])),null===a&&(B=d),a}function g(){var a,c,e,f,g,i,j,k;return j=B,k=B,123===b.charCodeAt(B)?(a="{",B++):(a=null,0===C&&d('"{"')),null!==a?(c=w(),null!==c?(e=h(),null!==e?(f=w(),null!==f?(125===b.charCodeAt(B)?(g="}",B++):(g=null,0===C&&d('"}"')),null!==g?(i=q(),null!==i?a=[a,c,e,f,g,i]:(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k),null!==a&&(a=function(a,b,c){var d=[];return b&&d.push(b),c&&c.val&&d.push(c),{type:"messageFormatPatternRight",statements:d}}(j,a[2],a[5])),null===a&&(B=j),a}function h(){var a,c,e,f,g,h;return f=B,g=B,a=r(),null!==a?(h=B,44===b.charCodeAt(B)?(c=",",B++):(c=null,0===C&&d('","')),null!==c?(e=i(),null!==e?c=[c,e]:(c=null,B=h)):(c=null,B=h),c=null!==c?c:"",null!==c?a=[a,c]:(a=null,B=g)):(a=null,B=g),null!==a&&(a=function(a,b,c){var d={type:"messageFormatElement",argumentIndex:b};return c&&c.length?d.elementFormat=c[1]:d.output=!0,d}(f,a[0],a[1])),null===a&&(B=f),a}function i(){var a,c,e,f,g,h,i,l,m;return l=B,m=B,a=w(),null!==a?("plural"===b.substr(B,6)?(c="plural",B+=6):(c=null,0===C&&d('"plural"')),null!==c?(e=w(),null!==e?(44===b.charCodeAt(B)?(f=",",B++):(f=null,0===C&&d('","')),null!==f?(g=w(),null!==g?(h=j(),null!==h?(i=w(),null!==i?a=[a,c,e,f,g,h,i]:(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m),null!==a&&(a=function(a,b,c){return{type:"elementFormat",key:b,val:c.val}}(l,a[1],a[5])),null===a&&(B=l),null===a&&(l=B,m=B,a=w(),null!==a?("select"===b.substr(B,6)?(c="select",B+=6):(c=null,0===C&&d('"select"')),null!==c?(e=w(),null!==e?(44===b.charCodeAt(B)?(f=",",B++):(f=null,0===C&&d('","')),null!==f?(g=w(),null!==g?(h=k(),null!==h?(i=w(),null!==i?a=[a,c,e,f,g,h,i]:(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m),null!==a&&(a=function(a,b,c){return{type:"elementFormat",key:b,val:c.val}}(l,a[1],a[5])),null===a&&(B=l)),a}function j(){var a,b;return b=B,a=l(),null!==a&&(a=function(a,b){return{type:"pluralStyle",val:b}}(b,a)),null===a&&(B=b),a}function k(){var a,b;return b=B,a=n(),null!==a&&(a=function(a,b){return{type:"selectStyle",val:b}}(b,a)),null===a&&(B=b),a}function l(){var a,b,c,d,e;if(d=B,e=B,a=m(),a=null!==a?a:"",null!==a){for(b=[],c=o();null!==c;)b.push(c),c=o();null!==b?a=[a,b]:(a=null,B=e)}else a=null,B=e;return null!==a&&(a=function(a,b,c){var d={type:"pluralFormatPattern",pluralForms:c};return d.offset=b?b:0,d}(d,a[0],a[1])),null===a&&(B=d),a}function m(){var a,c,e,f,g,h,i,j,k;return j=B,k=B,a=w(),null!==a?("offset"===b.substr(B,6)?(c="offset",B+=6):(c=null,0===C&&d('"offset"')),null!==c?(e=w(),null!==e?(58===b.charCodeAt(B)?(f=":",B++):(f=null,0===C&&d('":"')),null!==f?(g=w(),null!==g?(h=u(),null!==h?(i=w(),null!==i?a=[a,c,e,f,g,h,i]:(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k)):(a=null,B=k),null!==a&&(a=function(a,b){return b}(j,a[5])),null===a&&(B=j),a}function n(){var a,b,c;for(c=B,a=[],b=o();null!==b;)a.push(b),b=o();return null!==a&&(a=function(a,b){return{type:"selectFormatPattern",pluralForms:b}}(c,a)),null===a&&(B=c),a}function o(){var a,c,e,g,h,i,j,k,l,m;return l=B,m=B,a=w(),null!==a?(c=p(),null!==c?(e=w(),null!==e?(123===b.charCodeAt(B)?(g="{",B++):(g=null,0===C&&d('"{"')),null!==g?(h=w(),null!==h?(i=f(),null!==i?(j=w(),null!==j?(125===b.charCodeAt(B)?(k="}",B++):(k=null,0===C&&d('"}"')),null!==k?a=[a,c,e,g,h,i,j,k]:(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m)):(a=null,B=m),null!==a&&(a=function(a,b,c){return{type:"pluralForms",key:b,val:c}}(l,a[1],a[5])),null===a&&(B=l),a}function p(){var a,c,e,f;return e=B,a=r(),null!==a&&(a=function(a,b){return b}(e,a)),null===a&&(B=e),null===a&&(e=B,f=B,61===b.charCodeAt(B)?(a="=",B++):(a=null,0===C&&d('"="')),null!==a?(c=u(),null!==c?a=[a,c]:(a=null,B=f)):(a=null,B=f),null!==a&&(a=function(a,b){return b}(e,a[1])),null===a&&(B=e)),a}function q(){var a,b,c,d,e,f,g,h;if(f=B,g=B,a=w(),null!==a){for(b=[],h=B,c=w(),null!==c?(d=s(),null!==d?(e=w(),null!==e?c=[c,d,e]:(c=null,B=h)):(c=null,B=h)):(c=null,B=h);null!==c;)b.push(c),h=B,c=w(),null!==c?(d=s(),null!==d?(e=w(),null!==e?c=[c,d,e]:(c=null,B=h)):(c=null,B=h)):(c=null,B=h);null!==b?a=[a,b]:(a=null,B=g)}else a=null,B=g;return null!==a&&(a=function(a,b,c){for(var d=[],e=0;e, 2014
+ * @author Ubilabs http://ubilabs.net, 2014
+ * @license MIT License
+ */
+(function($,window,document,undefined){var defaults={bounds:true,country:null,map:false,details:false,detailsAttribute:"name",autoselect:true,location:false,mapOptions:{zoom:14,scrollwheel:false,mapTypeId:"roadmap"},markerOptions:{draggable:false},maxZoom:16,types:["geocode"],blur:false};var componentTypes=("street_address route intersection political "+"country administrative_area_level_1 administrative_area_level_2 "+"administrative_area_level_3 colloquial_area locality sublocality "+"neighborhood premise subpremise postal_code natural_feature airport "+"park point_of_interest post_box street_number floor room "+"lat lng viewport location "+"formatted_address location_type bounds").split(" ");var placesDetails=("id place_id url website vicinity reference name rating "+"international_phone_number icon formatted_phone_number").split(" ");function GeoComplete(input,options){this.options=$.extend(true,{},defaults,options);this.input=input;this.$input=$(input);this._defaults=defaults;this._name="geocomplete";this.init()}$.extend(GeoComplete.prototype,{init:function(){this.initMap();this.initMarker();this.initGeocoder();this.initDetails();this.initLocation()},initMap:function(){if(!this.options.map){return}if(typeof this.options.map.setCenter=="function"){this.map=this.options.map;return}this.map=new google.maps.Map($(this.options.map)[0],this.options.mapOptions);google.maps.event.addListener(this.map,"click",$.proxy(this.mapClicked,this));google.maps.event.addListener(this.map,"zoom_changed",$.proxy(this.mapZoomed,this))},initMarker:function(){if(!this.map){return}var options=$.extend(this.options.markerOptions,{map:this.map});if(options.disabled){return}this.marker=new google.maps.Marker(options);google.maps.event.addListener(this.marker,"dragend",$.proxy(this.markerDragged,this))},initGeocoder:function(){var options={types:this.options.types,bounds:this.options.bounds===true?null:this.options.bounds,componentRestrictions:this.options.componentRestrictions};if(this.options.country){options.componentRestrictions={country:this.options.country}}this.autocomplete=new google.maps.places.Autocomplete(this.input,options);this.geocoder=new google.maps.Geocoder;if(this.map&&this.options.bounds===true){this.autocomplete.bindTo("bounds",this.map)}google.maps.event.addListener(this.autocomplete,"place_changed",$.proxy(this.placeChanged,this));this.$input.keypress(function(event){if(event.keyCode===13){return false}});this.$input.bind("geocode",$.proxy(function(){this.find()},this));if(this.options.blur===true){this.$input.blur($.proxy(function(){this.find()},this))}},initDetails:function(){if(!this.options.details){return}var $details=$(this.options.details),attribute=this.options.detailsAttribute,details={};function setDetail(value){details[value]=$details.find("["+attribute+"="+value+"]")}$.each(componentTypes,function(index,key){setDetail(key);setDetail(key+"_short")});$.each(placesDetails,function(index,key){setDetail(key)});this.$details=$details;this.details=details},initLocation:function(){var location=this.options.location,latLng;if(!location){return}if(typeof location=="string"){this.find(location);return}if(location instanceof Array){latLng=new google.maps.LatLng(location[0],location[1])}if(location instanceof google.maps.LatLng){latLng=location}if(latLng){if(this.map){this.map.setCenter(latLng)}if(this.marker){this.marker.setPosition(latLng)}}},find:function(address){this.geocode({address:address||this.$input.val()})},geocode:function(request){if(this.options.bounds&&!request.bounds){if(this.options.bounds===true){request.bounds=this.map&&this.map.getBounds()}else{request.bounds=this.options.bounds}}if(this.options.country){request.region=this.options.country}this.geocoder.geocode(request,$.proxy(this.handleGeocode,this))},selectFirstResult:function(){var selected="";if($(".pac-item-selected")["0"]){selected="-selected"}var $span1=$(".pac-container .pac-item"+selected+":first span:nth-child(2)").text();var $span2=$(".pac-container .pac-item"+selected+":first span:nth-child(3)").text();var firstResult=$span1;if($span2){firstResult+=" - "+$span2}this.$input.val(firstResult);return firstResult},handleGeocode:function(results,status){if(status===google.maps.GeocoderStatus.OK){var result=results[0];this.$input.val(result.formatted_address);this.update(result);if(results.length>1){this.trigger("geocode:multiple",results)}}else{this.trigger("geocode:error",status)}},trigger:function(event,argument){this.$input.trigger(event,[argument])},center:function(geometry){if(geometry.viewport){this.map.fitBounds(geometry.viewport);if(this.map.getZoom()>this.options.maxZoom){this.map.setZoom(this.options.maxZoom)}}else{this.map.setZoom(this.options.maxZoom);this.map.setCenter(geometry.location)}if(this.marker){this.marker.setPosition(geometry.location);this.marker.setAnimation(this.options.markerOptions.animation)}},update:function(result){if(this.map){this.center(result.geometry)}if(this.$details){this.fillDetails(result)}this.trigger("geocode:result",result)},fillDetails:function(result){var data={},geometry=result.geometry,viewport=geometry.viewport,bounds=geometry.bounds;$.each(result.address_components,function(index,object){var name=object.types[0];$.each(object.types,function(index,name){data[name]=object.long_name;data[name+"_short"]=object.short_name})});$.each(placesDetails,function(index,key){data[key]=result[key]});$.extend(data,{formatted_address:result.formatted_address,location_type:geometry.location_type||"PLACES",viewport:viewport,bounds:bounds,location:geometry.location,lat:geometry.location.lat(),lng:geometry.location.lng()});$.each(this.details,$.proxy(function(key,$detail){var value=data[key];this.setDetail($detail,value)},this));this.data=data},setDetail:function($element,value){if(value===undefined){value=""}else if(typeof value.toUrlValue=="function"){value=value.toUrlValue()}if($element.is(":input")){$element.val(value)}else{$element.text(value)}},markerDragged:function(event){this.trigger("geocode:dragged",event.latLng)},mapClicked:function(event){this.trigger("geocode:click",event.latLng)},mapZoomed:function(event){this.trigger("geocode:zoom",this.map.getZoom())},resetMarker:function(){this.marker.setPosition(this.data.location);this.setDetail(this.details.lat,this.data.location.lat());this.setDetail(this.details.lng,this.data.location.lng())},placeChanged:function(){var place=this.autocomplete.getPlace();if(!place||!place.geometry){if(this.options.autoselect){var autoSelection=this.selectFirstResult();this.find(autoSelection)}}else{this.update(place)}}});$.fn.geocomplete=function(options){var attribute="plugin_geocomplete";if(typeof options=="string"){var instance=$(this).data(attribute)||$(this).geocomplete().data(attribute),prop=instance[options];if(typeof prop=="function"){prop.apply(instance,Array.prototype.slice.call(arguments,1));return $(this)}else{if(arguments.length==2){prop=arguments[1]}return prop}}else{return this.each(function(){var instance=$.data(this,attribute);if(!instance){instance=new GeoComplete(this,options);$.data(this,attribute,instance)}})}}})(jQuery,window,document);
\ No newline at end of file
diff --git a/pegasus/sites.v3/code.org/public/js/workshop-search.js b/pegasus/sites.v3/code.org/public/js/workshop-search.js
index 2a7eabbd148ec..64271d008c378 100644
--- a/pegasus/sites.v3/code.org/public/js/workshop-search.js
+++ b/pegasus/sites.v3/code.org/public/js/workshop-search.js
@@ -5,6 +5,7 @@ var gmap,
$(document).ready(function() {
initializeMap();
loadWorkshops();
+ addGeocomplete();
});
function initializeMap() {
@@ -88,5 +89,21 @@ function compileHtml(workshop, first) {
return html;
}
+function addGeocomplete() {
+ var geocomplete_options = {
+ map: '#gmap',
+ country: 'us',
+ markerOptions: {
+ visible: false
+ }
+ };
+
+ $("#geocomplete").geocomplete(geocomplete_options);
+
+ $("#btn-submit").click(function(){
+ $("#geocomplete").trigger("geocode");
+ });
+}
+
function displayQueryError() {
}
diff --git a/pegasus/sites.v3/code.org/public/private/workshop-signups.haml b/pegasus/sites.v3/code.org/public/private/workshop-signups.haml
new file mode 100644
index 0000000000000..c3970ed8d163a
--- /dev/null
+++ b/pegasus/sites.v3/code.org/public/private/workshop-signups.haml
@@ -0,0 +1,29 @@
+---
+title: Workshop signups
+---
+-workshop_rows = DB[:forms].where(kind:'ProfessionalDevelopmentWorkshop')
+
+%h1 Workshop signups
+
+%table
+ %tr
+ %th Affiliate
+ %th Date
+ %th Location
+ %th Type
+ %th Signups
+
+ -total_signups = 0
+ -workshop_rows.each do |workshop_row|
+ -workshop = JSON.parse(workshop_row[:data]).merge(JSON.parse(workshop_row[:processed_data]))
+ -signup_count = DB[:forms].where(kind:'ProfessionalDevelopmentWorkshopSignup').and(parent_id:workshop_row[:id]).count
+ -total_signups = total_signups + signup_count
+ %tr
+ %td #{workshop_row[:name]} (#{workshop_row[:email]})
+ %td #{workshop['dates'].map{|i| i['date_s']}.join(' ')}
+ %td #{workshop['location_name_s']} (#{workshop['location_address_s']})
+ %td #{workshop['type_s']}
+ %td #{signup_count} / #{workshop['capacity_s']}
+
+%div{style: "margin-top: 2em;"}
+ %strong Total signups: #{total_signups}
diff --git a/pegasus/sites.v3/code.org/views/company_profile_form.haml b/pegasus/sites.v3/code.org/views/company_profile_form.haml
index 30fa041821c46..ce6a32ddcf921 100644
--- a/pegasus/sites.v3/code.org/views/company_profile_form.haml
+++ b/pegasus/sites.v3/code.org/views/company_profile_form.haml
@@ -50,12 +50,14 @@
%input{name:'logo_file', type:'file'}
%tr
%th{colspan:2}
- 3.
+ -if secret
+ 3.
%button Submit
- %tr
- %th{colspan:2}
- 4.
- %a{href: "/company-profiles/#{data['name_s']}"}
+ -if secret
+ %tr
+ %th{colspan:2}
+ 4.
+ %a{href: "/company-profiles/#{data['name_s']}"}
View #{data['display_name_s']}'s landing page
diff --git a/pegasus/sites.v3/code.org/views/workshop_search.haml b/pegasus/sites.v3/code.org/views/workshop_search.haml
index f22d6a5a22b30..2d2add9efe995 100644
--- a/pegasus/sites.v3/code.org/views/workshop_search.haml
+++ b/pegasus/sites.v3/code.org/views/workshop_search.haml
@@ -1,4 +1,5 @@
%script{type: "text/javascript", src: "https://maps.googleapis.com/maps/api/js?client=#{CDO.google_maps_client_id}&sensor=true&libraries=places,geometry&v=3.7"}
+%script{type: "text/javascript", src: "/js/jquery.geocomplete.min.js"}
%script{type: "text/javascript", src: "/js/workshop-search.js"}
:css
@@ -14,16 +15,16 @@
border-top: 0;
}
--#.row
--# %form#workshop-search-form{role: "form", onsubmit: "event.preventDefault();"}
--# .form-section
--# .col-xs-4
--# .form-group
--# %div
--# %input#location.form-control{name: "location", placeholder: "Search for workshops", type: "text"}/
--# .col-xs-8
--# .form-group.submit-btn
--# %button#btn-submit.btn.btn-default{type: "submit"} Search
+.row
+ %form#workshop-search-form{role: "form", onsubmit: "event.preventDefault();"}
+ .form-section
+ .col-xs-4
+ .form-group
+ %div
+ %input#geocomplete.form-control{name: "geocomplete", placeholder: "Search for workshops", type: "text"}/
+ .col-xs-8
+ .form-group.submit-btn
+ %button#btn-submit.btn.btn-default{type: "submit"} Search
.row
.col-xs-12
#gmap{style: 'height: 500px; padding: 3px; border: 3px solid #ddd;'}