diff --git a/aws/varnish.vcl.erb b/aws/varnish.vcl.erb index 9d1eae0212381..94ec528e06bbc 100644 --- a/aws/varnish.vcl.erb +++ b/aws/varnish.vcl.erb @@ -442,7 +442,7 @@ end set req.http.Cookie = regsuball(req.http.Cookie, ";(cdo-private|hour_of_code|NO_CACHE)=", "; \1="); } else if (req.http.host == "<%= CDO.canonical_hostname('learn.code.org') %>" || req.http.host == "<%= CDO.canonical_hostname('studio.code.org') %>") { set req.http.Cookie = regsuball(req.http.Cookie, ";(language_|<%= session_cookie %>|hour_of_code|NO_CACHE)=", "; \1="); - } else if (req.url ~ "^/dashboardapi/" || req.url ~ "^/v2/" || req.url ~ "^/api/" || req.url == "/private" || req.url ~ "^/private/" || req.url ~ "^/teacher-dashboard" || req.url ~ "^/manage-professional-development-workshops") { + } else if (req.url ~ "^/dashboardapi/" || req.url ~ "^/v2/" || req.url ~ "^/api/" || req.url == "/private" || req.url ~ "^/private/" || req.url ~ "^/create-company-profile" || req.url ~ "^/edit-company-profile" || req.url ~ "^/teacher-dashboard" || req.url ~ "^/manage-professional-development-workshops") { set req.http.Cookie = regsuball(req.http.Cookie, ";(<%= session_cookie %>|hour_of_code|NO_CACHE)=", "; \1="); } else { set req.http.Cookie = regsuball(req.http.Cookie, ";(NO_CACHE)=", "; \1="); diff --git a/blockly/i18n/studio/en_us.json b/blockly/i18n/studio/en_us.json index 410cc250d3c1d..a9f4527b31514 100644 --- a/blockly/i18n/studio/en_us.json +++ b/blockly/i18n/studio/en_us.json @@ -27,7 +27,7 @@ "makeProjectilePurpleHearts": "make purple hearts", "makeProjectileRedHearts": "make red hearts", "makeProjectileTooltip": "Make the projectile that just collided disappear or bounce.", - "makeYourOwn": "Make Your Own Story", + "makeYourOwn": "Make Your Own Play Lab App", "moveDirectionDown": "down", "moveDirectionLeft": "left", "moveDirectionRight": "right", diff --git a/dashboard/app/assets/images/logo_noalpha.png b/dashboard/app/assets/images/logo_noalpha.png new file mode 100644 index 0000000000000..eac232ef9fc5a Binary files /dev/null and b/dashboard/app/assets/images/logo_noalpha.png differ diff --git a/dashboard/app/controllers/level_sources_controller.rb b/dashboard/app/controllers/level_sources_controller.rb index 0f0d937314cbc..741b050ca257b 100644 --- a/dashboard/app/controllers/level_sources_controller.rb +++ b/dashboard/app/controllers/level_sources_controller.rb @@ -2,7 +2,6 @@ class LevelSourcesController < ApplicationController include LevelsHelper - helper_method :show_image def show common(true) diff --git a/dashboard/app/helpers/application_helper.rb b/dashboard/app/helpers/application_helper.rb index e0acd32b6134e..12dffd12061be 100644 --- a/dashboard/app/helpers/application_helper.rb +++ b/dashboard/app/helpers/application_helper.rb @@ -106,6 +106,30 @@ def external_oauth_sign_out_url(provider) end end + def show_image(params) + if params[:id] + level_source = LevelSource.find(params[:id]) + app = level_source.level.game.app + else + app = params[:app] + end + + if app == 'flappy' + asset_url 'flappy_sharing_drawing.png' + elsif app == 'bounce' + asset_url 'bounce_sharing_drawing.png' + elsif app == 'studio' + asset_url 'studio_sharing_drawing.png' + else + level_source_image = LevelSourceImage.find_by_level_source_id(level_source.id) + if !level_source_image.nil? && !level_source_image.image.nil? + url_for(:controller => "level_sources", :action => "generate_image", :id => params[:id], only_path: false) + else + asset_url 'sharing_drawing.png' + end + end + end + def signup_error_messages! # See also https://github.com/plataformatec/devise/blob/master/app/helpers/devise_helper.rb return "" if resource.errors.empty? diff --git a/dashboard/app/helpers/levels_helper.rb b/dashboard/app/helpers/levels_helper.rb index 6fe6703619e3a..c8a68c5d9a151 100644 --- a/dashboard/app/helpers/levels_helper.rb +++ b/dashboard/app/helpers/levels_helper.rb @@ -1,5 +1,4 @@ module LevelsHelper - include ActionView::Helpers::AssetUrlHelper def build_script_level_path(script_level) case script_level.script_id @@ -118,31 +117,6 @@ def blockly_cache_bust end end - - def show_image(params) - if params[:id] - level_source = LevelSource.find(params[:id]) - app = level_source.level.game.app - else - app = params[:app] - end - - if app == 'flappy' - asset_url 'flappy_sharing_drawing.png' - elsif app == 'bounce' - asset_url 'bounce_sharing_drawing.png' - elsif app == 'studio' - asset_url 'studio_sharing_drawing.png' - else - level_source_image = LevelSourceImage.find_by_level_source_id(level_source.id) - if !level_source_image.nil? && !level_source_image.image.nil? - url_for(:controller => "level_sources", :action => "generate_image", :id => params[:id], only_path: false) - else - asset_url 'sharing_drawing.png' - end - end - end - def numeric?(val) Float(val) != nil rescue false end diff --git a/dashboard/app/views/level_sources/show.html.haml b/dashboard/app/views/level_sources/show.html.haml index a5d83c285a555..c5a5cd0318cc0 100644 --- a/dashboard/app/views/level_sources/show.html.haml +++ b/dashboard/app/views/level_sources/show.html.haml @@ -34,7 +34,7 @@ fjs.parentNode.insertBefore(js, fjs); - if @game.flappy? = tag :link, rel: 'apple-touch-icon', href: asset_url('flappy_icon.png') - else - = tag :link, rel: 'apple-touch-icon', href: asset_url('logo.png') + = tag :link, rel: 'apple-touch-icon', href: asset_url('logo_noalpha.png') - if !@game.share_mobile_fullscreen? - @page_title = t('share_code.title') diff --git a/dashboard/config/locales/en.yml b/dashboard/config/locales/en.yml index 65feb665119be..50d529e632d48 100644 --- a/dashboard/config/locales/en.yml +++ b/dashboard/config/locales/en.yml @@ -415,7 +415,7 @@ en: title: "Click 'Run' to see my program in action" bounce_og_title: "Check out my Bounce Game" flappy_og_title: "Check out my Flappy Game" - studio_og_title: "Check out my story" + studio_og_title: "Check out my Play Lab App" og_description: "I wrote the code myself with Code.org" builder: created: "You created a new script." diff --git a/dashboard/public/blockly-package/js/en_ploc/studio.js b/dashboard/public/blockly-package/js/en_ploc/studio.js index 0752954a53588..7e34f15e75f36 100644 --- a/dashboard/public/blockly-package/js/en_ploc/studio.js +++ b/dashboard/public/blockly-package/js/en_ploc/studio.js @@ -14359,7 +14359,7 @@ exports.makeProjectileRedHearts = function(d){return "!!-make red hearts-!!"}; exports.makeProjectileTooltip = function(d){return "!!-Make the projectile that just collided disappear or bounce.-!!"}; -exports.makeYourOwn = function(d){return "!!-Make Your Own Story-!!"}; +exports.makeYourOwn = function(d){return "!!-Make Your Own Play Lab App-!!"}; exports.moveDirectionDown = function(d){return "!!-down-!!"}; diff --git a/dashboard/public/blockly-package/js/en_ploc/studio.min.js b/dashboard/public/blockly-package/js/en_ploc/studio.min.js index c2b1b8a8b7559..3c288dcc315db 100644 --- a/dashboard/public/blockly-package/js/en_ploc/studio.min.js +++ b/dashboard/public/blockly-package/js/en_ploc/studio.min.js @@ -4,5 +4,5 @@ return lc(n,function(b,c){n.prototype[c]||(a[c]=b)}),a}(),!1),n.sample=N,lc(n,fu };var D=function(a){a.helpUrl="",a.init=function(){this.setHSV(184,1,.74),this.appendDummyInput().appendTitle(f.showTitleScreen()),a.params?(this.appendValueInput("TITLE").setCheck("String").setAlign(Blockly.ALIGN_RIGHT).appendTitle(f.showTitleScreenTitle()),this.appendValueInput("TEXT").setCheck("String").setAlign(Blockly.ALIGN_RIGHT).appendTitle(f.showTitleScreenText())):(this.appendDummyInput().appendTitle(f.showTitleScreenTitle()).appendTitle(new Blockly.FieldImage(Blockly.assetUrl("media/quote0.png"),12,12)).appendTitle(new Blockly.FieldTextInput(f.showTSDefTitle()),"TITLE").appendTitle(new Blockly.FieldImage(Blockly.assetUrl("media/quote1.png"),12,12)),this.appendDummyInput().appendTitle(f.showTitleScreenText()).appendTitle(new Blockly.FieldImage(Blockly.assetUrl("media/quote0.png"),12,12)).appendTitle(new Blockly.FieldTextInput(f.showTSDefText()),"TEXT").appendTitle(new Blockly.FieldImage(Blockly.assetUrl("media/quote1.png"),12,12))),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(f.showTitleScreenTooltip())}};a.Blocks.studio_showTitleScreen={},D(a.Blocks.studio_showTitleScreen),a.Blocks.studio_showTitleScreenParams={params:!0},D(a.Blocks.studio_showTitleScreenParams),A.studio_showTitleScreen=function(){return"Studio.showTitleScreen('block_id_"+this.id+"', "+a.JavaScript.quote_(this.getTitleValue("TITLE"))+", "+a.JavaScript.quote_(this.getTitleValue("TEXT"))+");\n"},A.studio_showTitleScreenParams=function(){var a=Blockly.JavaScript.valueToCode(this,"TITLE",Blockly.JavaScript.ORDER_NONE)||"",b=Blockly.JavaScript.valueToCode(this,"TEXT",Blockly.JavaScript.ORDER_NONE)||"";return"Studio.showTitleScreen('block_id_"+this.id+"', "+a+", "+b+");\n"},z?(a.Blocks.studio_setSprite={helpUrl:"",init:function(){this.setHSV(312,.32,.62);var b=new a.FieldDropdown(this.VALUES);b.setValue(q),this.appendDummyInput().appendTitle(b,"VALUE"),t>1&&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_ploc/common":40,"../../locale/en_ploc/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_ploc/common");buf.push('\n\n
\n
\n\n'),finishButton&&buf.push('\n
\n \n
\n"),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],19:[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_ploc/common");buf.push("\n\n"),finishButton&&buf.push('\n
\n \n
\n"),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],20:[function(a,b){function c(a){var b={};return a.sprite&&(b.SPRITE=a.sprite),a.requiredText&&(b.TEXT=a.requiredText),a.notDefaultText&&(b.TEXT=d.helloWorld()),[{test:function(b){return"studio_saySprite"!==b.type?!1:a.sprite&&b.getTitleValue("SPRITE")!==a.sprite?!1:(a.notDefaultText||a.requiredText)&&b.getTitleValue("TEXT")===d.defaultSayText()?!1:!0},type:"studio_saySprite",titles:b}]}var d=a("../../locale/en_ploc/studio"),e=a("../utils"),f=a("../block_utils"),g=a("./tiles"),h=(g.Direction,g.Emotions),i=f.createToolbox,j=f.blockOfType,k=f.createCategory,l=j("studio_moveNorthDistance")+j("studio_moveEastDistance")+j("studio_moveSouthDistance")+j("studio_moveWestDistance"),m=(j("studio_moveNorth")+j("studio_moveEast")+j("studio_moveSouth")+j("studio_moveWest"),b.exports={});m.dog_hello={ideal:2,requiredBlocks:[[{test:function(a){return"studio_saySprite"==a.type&&a.getTitleValue("TEXT")!==d.defaultSayText()},type:"studio_saySprite",titles:{TEXT:d.helloWorld()}}]],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sayComplete>0}},timeoutFailureTick:100,toolbox:i(j("studio_saySprite")),startBlocks:''},m.k1_1=e.extend(m.dog_hello,{isK1:!0,toolbox:i(j("studio_saySprite"))}),m.c2_1=e.extend(m.dog_hello),m.c3_story_1=e.extend(m.dog_hello),m.playlab_1=e.extend(m.dog_hello),m.dog_and_cat_hello={ideal:3,requiredBlocks:[c({sprite:"0",notDefaultText:!0}),c({sprite:"1",notDefaultText:!0})],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sayComplete>1}},timeoutFailureTick:200,toolbox:i(j("studio_saySprite")),startBlocks:''},m.k1_2=e.extend(m.dog_and_cat_hello,{isK1:!0,toolbox:i(j("studio_saySprite"))}),m.c2_2=e.extend(m.dog_and_cat_hello,{}),m.c3_story_2=e.extend(m.dog_and_cat_hello,{}),m.playlab_2=e.extend(m.dog_and_cat_hello,{}),m.dog_move_cat={ideal:2,requiredBlocks:[[{test:"moveDistance",type:"studio_moveDistance",titles:{DIR:"2"}}]],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(1)}},timeoutFailureTick:100,toolbox:i('2'+j("studio_saySprite")),startBlocks:''},m.k1_3=e.extend(m.dog_move_cat,{isK1:!0,requiredBlocks:[[{test:function(a){return"studio_moveEastDistance"==a.type},type:"studio_moveEastDistance"}]],toolbox:i(l+j("studio_saySprite"))}),m.c2_3=e.extend(m.dog_move_cat,{}),m.c3_story_3=e.extend(m.dog_move_cat,{}),m.playlab_3=e.extend(m.dog_move_cat,{}),m.dog_move_cat_hello={ideal:4,requiredBlocks:[[{test:"moveDistance",type:"studio_moveDistance",titles:{DIR:"2",DISTANCE:"100"}}],c({sprite:"1",requiredText:d.hello()})],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sayComplete>0&&Studio.sprite[0].isCollidingWith(1)}},timeoutFailureTick:200,toolbox:i('2'+j("studio_saySprite")),startBlocks:' '},m.k1_4=e.extend(m.dog_move_cat_hello,{isK1:!0,requiredBlocks:[[{test:function(a){return"studio_moveEastDistance"==a.type},type:"studio_moveEastDistance"}],[{test:function(a){return"studio_saySprite"==a.type&&"1"===a.getTitleValue("SPRITE")&&a.getTitleValue("TEXT")!==d.defaultSayText()},type:"studio_saySprite",titles:{TEXT:d.hello(),SPRITE:"1"}}]],toolbox:i(l+j("studio_saySprite")),startBlocks:' '}),m.c2_4=e.extend(m.dog_move_cat_hello,{}),m.c3_story_4=e.extend(m.dog_move_cat_hello,{}),m.playlab_4=e.extend(m.dog_move_cat_hello,{}),m.click_hello={ideal:3,requiredBlocks:[c({requiredText:d.hello()})],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:4,goal:{successCondition:function(){return this.successState.seenCmd||(this.successState.seenCmd=Studio.isCmdCurrentInQueue("saySprite","whenSpriteClicked-0")),Studio.sayComplete>0&&this.successState.seenCmd}},timeoutFailureTick:300,toolbox:i('2'+j("studio_saySprite")),startBlocks:' '},m.c2_5=e.extend(m.click_hello,{}),m.c3_game_1=e.extend(m.click_hello,{}),m.playlab_5=e.extend(m.click_hello,{}),m.octopus_happy={ideal:2,requiredBlocks:[[{test:"setSpriteEmotion",type:"studio_setSpriteEmotion"}]],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:4,goal:{successCondition:function(){return Studio.sprite[0].emotion===h.HAPPY&&Studio.tickCount>=50}},timeoutFailureTick:100,toolbox:i('2'+j("studio_setSpriteEmotion")),startBlocks:''},m.k1_5=e.extend(m.octopus_happy,{isK1:!0,toolbox:i(l+j("studio_setSpriteEmotion"))}),m.c3_story_5=e.extend(m.octopus_happy,{}),m.c3_story_6={ideal:1/0,requiredBlocks:[],scale:{snapRadius:2},minWorkspaceHeight:1400,edgeCollisions:!0,projectileCollisions:!0,allowSpritesOutsidePlayspace:!1,spritesHiddenToStart:!0,freePlay:!0,map:[[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0]],toolbox:i(j("studio_setSprite")+j("studio_setBackground")+j("studio_whenSpriteCollided")+j("studio_repeatForever")+j("studio_showTitleScreen")+j("studio_move")+j("studio_moveDistance")+j("studio_stop")+j("studio_wait")+j("studio_playSound")+j("studio_changeScore")+j("studio_saySprite")+j("studio_setSpritePosition")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")),startBlocks:''},m.move_penguin={ideal:8,requiredBlocks:[[{test:"move",type:"studio_move"}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[1,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,1,0,0,0,0,1,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,toolbox:i(j("studio_move")+j("studio_saySprite")),startBlocks:' '},m.c2_6=e.extend(m.move_penguin,{}),m.c3_game_2=e.extend(m.move_penguin,{}),m.playlab_6=e.extend(m.move_penguin,{}),m.dino_up_and_down={ideal:11,requiredBlocks:[[{test:"moveDistance",type:"studio_moveDistance",titles:{SPRITE:"1",DISTANCE:"400"}}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,protaganistSpriteIndex:1,timeoutFailureTick:150,minWorkspaceHeight:800,toolbox:i(' 400 1 1'),startBlocks:' 8 2 1 4 '},m.c2_7=e.extend(m.dino_up_and_down,{}),m.c3_game_3=e.extend(m.dino_up_and_down,{}),m.playlab_7=e.extend(m.dino_up_and_down,{}),m.penguin_ouch={ideal:14,requiredBlocks:[c({sprite:"0",requiredText:d.ouchExclamation()}),[{test:"playSound",type:"studio_playSound"}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,minWorkspaceHeight:900,goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(1)}},timeoutFailureTick:300,toolbox:i(' 400 1'+j("studio_saySprite")+j("studio_playSound")),startBlocks:' 8 2 1 4 1 400 1 400 4 '},m.c2_8=e.extend(m.penguin_ouch,{}),m.c3_game_4=e.extend(m.penguin_ouch,{}),m.penguin_touch_octopus={ideal:16,requiredBlocks:[[{test:"changeScore",type:"studio_changeScore"}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,16,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,minWorkspaceHeight:1050,goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(2)}},timeoutFailureTick:600,toolbox:i(' 400 1'+j("studio_saySprite")+j("studio_playSound")+j("studio_changeScore")),startBlocks:' 8 2 1 4 1 400 1 400 4 Ouch! 2'},m.c2_9=e.extend(m.penguin_touch_octopus,{}),m.c3_game_5=e.extend(m.penguin_touch_octopus,{}),m.playlab_8=e.extend(m.penguin_touch_octopus,{}),m.change_background_and_speed={ideal:19,requiredBlocks:[[{test:"setBackground",type:"studio_setBackground",titles:{VALUE:'"night"'}}],[{test:"setSpriteSpeed",type:"studio_setSpriteSpeed",titles:{VALUE:"Studio.SpriteSpeed.FAST"}}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,16,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,minWorkspaceHeight:1250,goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(2)}},timeoutFailureTick:600,toolbox:i(' "night" 400 1'+j("studio_saySprite")+j("studio_playSound")+j("studio_changeScore")+' Studio.SpriteSpeed.FAST'),startBlocks:' 8 2 1 4 1 400 1 400 4 Ouch! 2 '},m.c2_10=e.extend(m.change_background_and_speed,{}),m.c3_game_6=e.extend(m.change_background_and_speed,{}),m.playlab_9=e.extend(m.change_background_and_speed,{}),m.sandbox={ideal:1/0,requiredBlocks:[],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],minWorkspaceHeight:1400,edgeCollisions:!0,projectileCollisions:!0,allowSpritesOutsidePlayspace:!1,spritesHiddenToStart:!0,freePlay:!0,map:[[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0]],toolbox:i(j("studio_setSprite")+j("studio_setBackground")+j("studio_whenArrow")+j("studio_whenSpriteClicked")+j("studio_whenSpriteCollided")+j("studio_repeatForever")+j("studio_showTitleScreen")+j("studio_move")+j("studio_moveDistance")+j("studio_stop")+j("studio_wait")+j("studio_playSound")+j("studio_changeScore")+j("studio_saySprite")+j("studio_setSpritePosition")+j("studio_throw")+j("studio_makeProjectile")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")+j("studio_vanish")),startBlocks:''},m.c2_11=e.extend(m.sandbox,{}),m.c3_game_7=e.extend(m.sandbox,{}),m.playlab_10=e.extend(m.sandbox,{}),m.k1_6={ideal:1/0,requiredBlocks:[],scale:{snapRadius:2},minWorkspaceHeight:1500,spritesHiddenToStart:!0,freePlay:!0,map:[[16,0,16,0,16,0,16,0],[0,16,0,16,0,16,0,0],[16,0,16,0,16,0,16,0],[0,16,0,16,0,16,0,0],[16,0,16,0,16,0,16,0],[0,16,0,16,0,16,0,0],[16,16,16,16,16,16,16,0],[0,0,0,0,0,0,0,0]],isK1:!0,softButtons:[],toolbox:i(j("studio_setSprite")+j("studio_saySprite")+l+j("studio_whenSpriteCollided")+j("studio_setBackground")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")+j("studio_playSound")+j("studio_vanish")),startBlocks:' 0 '},m.k1_block_test=e.extend(m[99],{toolbox:i(j("studio_setSprite")+j("studio_moveNorth")+j("studio_moveSouth")+j("studio_moveEast")+j("studio_moveWest")+j("studio_moveNorth_length")+j("studio_moveSouth_length")+j("studio_moveEast_length")+j("studio_moveWest_length")),isK1:!0}),m.full_sandbox={scrollbars:!0,requiredBlocks:[],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],minWorkspaceHeight:1400,edgeCollisions:!0,projectileCollisions:!0,allowSpritesOutsidePlayspace:!0,spritesHiddenToStart:!0,freePlay:!0,map:[[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0]],toolbox:i(k(d.catActions(),j("studio_setSprite")+j("studio_setBackground")+' '+j("studio_move")+' 25 '+j("studio_stop")+' 1 '+j("studio_playSound")+' '+j("studio_setSpritePosition")+j("studio_throw")+j("studio_makeProjectile")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")+j("studio_vanish")+j("studio_setSpriteSize"))+k(d.catEvents(),j("studio_whenArrow")+j("studio_whenSpriteClicked")+j("studio_whenSpriteCollided"))+k(d.catControl(),j("studio_repeatForever")+' 10 '+j("controls_whileUntil")+' 1 10 1 '+j("controls_flow_statements"))+k(d.catLogic(),j("controls_if")+j("logic_compare")+j("logic_operation")+j("logic_negate")+j("logic_boolean"))+k(d.catMath(),j("math_number")+' 1 1 100 '+j("math_arithmetic"))+k(d.catText(),j("text")+j("text_join")+' ')+k(d.catVariables(),"","VARIABLE")+k(d.catProcedures(),"","PROCEDURE")),startBlocks:''} },{"../../locale/en_ploc/studio":41,"../block_utils":3,"../utils":38,"./tiles":25}],21:[function(a){(function(b){var c=a("../appMain");window.Studio=a("./studio"),"undefined"!=typeof b&&(b.Studio=window.Studio);var d=a("./blocks"),e=a("./levels"),f=a("./skins");window.studioMain=function(a){a.skinsModule=f,a.blocksModule=d,c(window.Studio,e,a)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../appMain":1,"./blocks":16,"./levels":20,"./skins":23,"./studio":24}],22:[function(a,b){var c=a("./collidable"),d=a("./tiles").Direction,e=a("./tiles"),f=0,g={};g[d.EAST]=0,g[d.SOUTH]=90,g[d.WEST]=180,g[d.NORTH]=270;var h={};h[d.NORTH]={x:.5,y:0},h[d.EAST]={x:1,y:.5},h[d.SOUTH]={x:.5,y:1},h[d.WEST]={x:0,y:.5};var i={};i[d.NORTH]={x:0,y:-25},i[d.EAST]={x:25,y:0},i[d.SOUTH]={x:0,y:25},i[d.WEST]={x:-25,y:0};var j=function(a){c.apply(this,arguments),this.height=a.height||50,this.width=a.width||50,this.speed=a.speed||e.DEFAULT_SPRITE_SPEED/2,this.isFireball_=-1!==this.className.indexOf("fireball"),this.frames=this.isFireball_?8:1,this.currentFrame_=0;var b=this;this.animator_=window.setInterval(function(){b.currentFrame_=(b.currentFrame_+1)%b.frames},50),this.x=a.spriteX+i[a.dir].x+a.spriteWidth*h[a.dir].x,this.y=a.spriteY+i[a.dir].y+a.spriteHeight*h[a.dir].y};j.prototype=new c,b.exports=j,j.prototype.createElement=function(a){this.clipPath=document.createElementNS(Blockly.SVG_NS,"clipPath");var b="projectile_clippath_"+f++;this.clipPath.setAttribute("id",b);var c=document.createElementNS(Blockly.SVG_NS,"rect");c.setAttribute("width",this.width),c.setAttribute("height",this.height),this.clipPath.appendChild(c),a.appendChild(this.clipPath),this.element=document.createElementNS(Blockly.SVG_NS,"image"),this.element.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.image),this.element.setAttribute("height",this.height),this.element.setAttribute("width",this.width*this.frames),a.appendChild(this.element),this.element.setAttribute("clip-path","url(#"+b+")")},j.prototype.removeElement=function(){this.element&&(this.element.parentNode.removeChild(this.element),this.element=null),this.clipPath&&(this.clipPath.parentNode.removeChild(this.clipPath),this.clipPath=null),this.animator_&&(window.clearInterval(this.animator_),this.animator_=null)},j.prototype.display=function(){var a={x:this.x-this.width/2,y:this.y-this.height/2};this.element.setAttribute("x",a.x-this.width*this.currentFrame_),this.element.setAttribute("y",a.y);var b=this.clipPath.childNodes[0];b.setAttribute("x",a.x),b.setAttribute("y",a.y),this.isFireball_&&this.element.setAttribute("transform","rotate("+g[this.dir]+", "+this.x+", "+this.y+")")},j.prototype.getNextPosition=function(){var a=d.getUnitVector(this.dir);return{x:this.x+this.speed*a.x,y:this.y+this.speed*a.y}},j.prototype.moveToNextPosition=function(){var a=this.getNextPosition();this.x=a.x,this.y=a.y}},{"./collidable":17,"./tiles":25}],23:[function(a,b,c){var d=a("../skins"),e={studio:{}};c.load=function(a,b){var c=d.load(a,b),f=e[c.id];if(c.hardcourt={background:c.assetUrl("background.png")},c.black={background:c.assetUrl("retro_background.png")},c.cave={background:c.assetUrl("background_cave.png")},c.night={background:c.assetUrl("background_santa.png")},c.cloudy={background:c.assetUrl("background_scifi.png")},c.underwater={background:c.assetUrl("background_underwater.png")},c.city={background:c.assetUrl("background_city.png")},c.desert={background:c.assetUrl("background_desert.png")},c.rainbow={background:c.assetUrl("background_rainbow.png")},c.soccer={background:c.assetUrl("background_soccer.png")},c.space={background:c.assetUrl("background_space.png")},c.tennis={background:c.assetUrl("background_tennis.png")},c.winter={background:c.assetUrl("background_winter.png")},c.avatarList=["dog","cat","penguin","dinosaur","octopus","witch","bat","bird","dragon","squirrel","wizard","alien","ghost","monster","robot","unicorn","zombie","knight","ninja","pirate","caveboy","cavegirl","princess","spacebot","soccergirl","soccerboy","tennisgirl","tennisboy"],c.avatarList.forEach(function(a){c[a]={sprite:c.assetUrl(a+"_spritesheet_200px.png"),dropdownThumbnail:c.assetUrl(a+"_thumb.png"),spriteFlags:28}}),c.yellow_hearts=c.assetUrl("yellow_hearts.gif"),c.purple_hearts=c.assetUrl("purple_hearts.gif"),c.red_hearts=c.assetUrl("red_hearts.gif"),c.blue_fireball=c.assetUrl("blue_fireball.png"),c.purple_fireball=c.assetUrl("purple_fireball.png"),c.red_fireball=c.assetUrl("red_fireball.png"),c.explosion=c.assetUrl("explosion.gif"),c.explosionThumbnail=c.assetUrl("explosion_thumb.png"),c.whenUp=c.assetUrl("when-up.png"),c.whenDown=c.assetUrl("when-down.png"),c.whenLeft=c.assetUrl("when-left.png"),c.whenRight=c.assetUrl("when-right.png"),c.collide=c.assetUrl("when-sprite-collide.png"),c.emotionAngry=c.assetUrl("emotion-angry.png"),c.emotionNormal=c.assetUrl("emotion-nothing.png"),c.emotionSad=c.assetUrl("emotion-sad.png"),c.emotionHappy=c.assetUrl("emotion-happy.png"),c.speechBubble=c.assetUrl("say-sprite.png"),c.goal=c.assetUrl("goal.png"),c.goalSuccess=c.assetUrl("goal_success.png"),c.approachingGoalAnimation=c.assetUrl(f.approachingGoalAnimation),c.rubberSound=[c.assetUrl("wall.mp3"),c.assetUrl("wall.ogg")],c.flagSound=[c.assetUrl("win_goal.mp3"),c.assetUrl("win_goal.ogg")],c.crunchSound=[c.assetUrl("wall0.mp3"),c.assetUrl("wall0.ogg")],c.winPointSound=[c.assetUrl("1_we_win.mp3"),c.assetUrl("1_we_win.ogg")],c.winPoint2Sound=[c.assetUrl("2_we_win.mp3"),c.assetUrl("2_we_win.ogg")],c.losePointSound=[c.assetUrl("1_we_lose.mp3"),c.assetUrl("1_we_lose.ogg")],c.losePoint2Sound=[c.assetUrl("2_we_lose.mp3"),c.assetUrl("2_we_lose.ogg")],c.goal1Sound=[c.assetUrl("1_goal.mp3"),c.assetUrl("1_goal.ogg")],c.goal2Sound=[c.assetUrl("2_goal.mp3"),c.assetUrl("2_goal.ogg")],c.woodSound=[c.assetUrl("1_paddle_bounce.mp3"),c.assetUrl("1_paddle_bounce.ogg")],c.retroSound=[c.assetUrl("2_paddle_bounce.mp3"),c.assetUrl("2_paddle_bounce.ogg")],c.slapSound=[c.assetUrl("1_wall_bounce.mp3"),c.assetUrl("1_wall_bounce.ogg")],c.hitSound=[c.assetUrl("2_wall_bounce.mp3"),c.assetUrl("2_wall_bounce.ogg")],void 0!==f.background){var g=Math.floor(Math.random()*f.background);c.background=c.assetUrl("background"+g+".png")}else c.background=c.assetUrl("background.png");return c.spriteHeight=f.spriteHeight||100,c.spriteWidth=f.spriteWidth||100,c.dropdownThumbnailWidth=50,c.dropdownThumbnailHeight=50,c}},{"../skins":13}],24:[function(a,b){"use strict";function c(){y.map=z.map,y.timeoutFailureTick=z.timeoutFailureTick||1/0,y.minWorkspaceHeight=z.minWorkspaceHeight,y.softButtons_=z.softButtons||{},y.protaganistSpriteIndex=z.protaganistSpriteIndex||0,y.startAvatars=d(A.avatarList,z.firstSpriteIndex);for(var a in z.scale)y.scale[a]=z.scale[a];y.ROWS=y.map.length,y.COLS=y.map[0].length,y.SQUARE_SIZE=50,y.DEFAULT_SPRITE_HEIGHT=A.spriteHeight,y.DEFAULT_SPRITE_WIDTH=A.spriteWidth,y.MARKER_HEIGHT=100,y.MARKER_WIDTH=100,y.MAZE_WIDTH=y.SQUARE_SIZE*y.COLS,y.MAZE_HEIGHT=y.SQUARE_SIZE*y.ROWS}function d(a,b){return b=b||0,t.flatten([a.slice(b),a.slice(0,b)])}function e(a,b,c,d,e,f){return Math.abs(a-b)<=c&&Math.abs(d-e)<=f}function f(){for(var a=function(a){y.executeQueue("whenSpriteCollided-"+f+"-"+a)},b=function(a,b,c){var d=c?y.sprite[a].height:y.sprite[a].width,e=c?y.sprite[b].height:y.sprite[b].width;return j.SPRITE_COLLIDE_DISTANCE_SCALING*(d+e)/2},c=function(a,b,c){var d=c?y.sprite[a].height:y.sprite[a].width,e=c?y.projectiles[b].height:y.projectiles[b].width;return j.SPRITE_COLLIDE_DISTANCE_SCALING*(d+e)/2},d=function(a,b,c){var d,e=c?y.sprite[a].height:y.sprite[a].width;return d="left"===b||"right"===b?c?y.MAZE_HEIGHT:0:c?0:y.MAZE_WIDTH,(e+d)/2},f=0;fa.width-2*a.sideMargin){if(c.firstChild.data=c.firstChild.data.slice(0,g),a.maxLines===e)return a.fullHeight;c=document.createElementNS("http://www.w3.org/2000/svg","tspan"),c.setAttribute("x",a.width/2),c.setAttribute("dy",a.lineHeight),d=document.createTextNode(b[f]),c.appendChild(d),a.svgText.appendChild(c),e++}}var h=a.maxLines-Math.max(1,e);return a.fullHeight-h*a.lineHeight},mb=function(a,b){y.eventHandlers.forEach(function(c){if(c.name===a&&(b||!c.cmdQueue||0===c.cmdQueue.length)){c.cmdQueue||(c.cmdQueue=[]),y.currentCmdQueue=c.cmdQueue;try{c.func(h,l,y.Globals)}catch(d){}y.currentCmdQueue=null}})};y.onTick=function(){y.tickCount++,1===y.tickCount&&mb("whenGameStarts"),y.executeQueue("whenGameStarts"),mb("repeatForever"),y.executeQueue("repeatForever");for(var a=0;aDb&&(y.sprite[a].dir=u.SOUTH),y.displaySprite(a);for(a=0;a=G.LEFT&&a.keyCode<=G.DOWN&&a.preventDefault()},y.onArrowButtonDown=function(a,b){y.btnState[b]=B.DOWN,a.preventDefault()},y.onSpriteClicked=function(a,b){y.intervalId&&mb("whenSpriteClicked-"+b),a.preventDefault()},y.onSvgClicked=function(a){y.intervalId&&y.eventHandlers.forEach(function(a){var b=a.cmdQueue?a.cmdQueue[0]:null;b&&b.opts.waitForClick&&!b.opts.complete&&(b.opts.waitCallback&&b.opts.waitCallback(),b.opts.complete=!0)}),a.preventDefault()},y.onArrowButtonUp=function(a,b){y.btnState[b]=B.UP},y.onMouseUp=function(){y.btnState={}},y.initSprites=function(){y.spriteCount=0,y.sprite=[],y.projectiles=[],y.spriteGoals_=[];for(var a=0;a=h.TestResults.FREE_PLAY?"win":"failure"),z.editCode&&(y.testResults=a?h.TestResults.ALL_PASS:h.TestResults.TOO_FEW_BLOCKS_FAIL);var b=Blockly.Xml.workspaceToDom(Blockly.mainWorkspace),c=Blockly.Xml.domToText(b);y.waitingForReport=!0,h.report({app:"studio",level:z.id,result:y.result===h.ResultType.SUCCESS,testResult:y.testResults,program:encodeURIComponent(c),onComplete:y.onReportComplete})};var zb={};zb[u.SOUTHEAST]=0,zb[u.EAST]=1,zb[u.NORTHEAST]=2,zb[u.NORTH]=3,zb[u.NORTHWEST]=4,zb[u.WEST]=5,zb[u.SOUTHWEST]=6;var Ab=6,Bb=7,Cb=8,Db=5,Eb=function(a){var b=y.sprite[a],c=0;return b.flags&C.TURNS&&b.displayDir!==u.SOUTH?b.firstTurnFrameNum+zb[b.displayDir]:(b.flags&C.ANIMATION&&y.tickCount&&1===Math.round((y.tickCount+a*Bb)/Ab)%Cb&&(c=b.firstAnimFrameNum),b.emotion!==x.NORMAL&&b.flags&C.EMOTIONS?c?c:b.firstEmotionFrameNum+(b.emotion-1):c)},Fb=function(a){var b=E.NORMAL;return y.sprite[a].flags&C.ANIMATION&&(b+=E.ANIMATION),y.sprite[a].flags&C.TURNS&&(b+=E.TURNS),y.sprite[a].flags&C.EMOTIONS&&(b+=E.EMOTIONS),b},Gb=function(a){var b=+a.getAttribute("height"),c="true"===a.getAttribute("onTop"),d="true"===a.getAttribute("onRight");a.setAttribute("d",Mb(0,0,ab,b,V,c,d))};y.displaySprite=function(a){var b=y.sprite[a],c=b.width*Eb(a),d=document.getElementById("sprite"+a),e=document.getElementById("spriteClipRect"+a),f=e.getAttribute("x"),g=e.getAttribute("y"),h=b.dir;h===u.NONE?b.dir=u.SOUTH:(b.x!=f||b.y!=g)&&(b.dir=u.NONE,b.xf&&(b.dir|=u.EAST),b.yg&&(b.dir|=u.SOUTH)),b.dir!==b.displayDir&&y.tickCount&&0===y.tickCount%2&&(b.displayDir=v[b.displayDir][b.dir]),d.setAttribute("x",b.x-c),d.setAttribute("y",b.y),e.setAttribute("x",b.x),e.setAttribute("y",b.y);var i=document.getElementById("speechBubble"+a),j=document.getElementById("speechBubblePath"+a),k=+j.getAttribute("height"),l="true"===j.getAttribute("onTop"),m="true"===j.getAttribute("onRight"),n=!0,o=!0,p=b.y-(k+X);0>p&&(p=b.y+b.height+X,n=!1);var q=b.x+W;q>y.MAZE_WIDTH-ab&&(q=b.x+b.width-(ab+W),o=!1),j.setAttribute("onTop",n),j.setAttribute("onRight",o),(l!==n||m!==o)&&Gb(j),i.setAttribute("transform","translate("+q+","+p+")")},y.displayScore=function(){var a=document.getElementById("score");a.textContent=y.scoreText?y.scoreText:i.scoreText({playerScore:y.playerScore}),a.setAttribute("visibility","visible")},y.queueCmd=function(a,b,c){var d={id:a,name:b,opts:c};if(y.currentEventParams)for(var e in y.currentEventParams)d.opts[e]=y.currentEventParams[e];y.currentCmdQueue.push(d)},y.executeQueue=function(a){y.eventHandlers.forEach(function(b){if(b.name===a&&b.cmdQueue)for(var c=b.cmdQueue[0];c&&y.callCmd(c);c=b.cmdQueue[0])b.cmdQueue.shift()})},y.callCmd=function(a){switch(a.name){case"setBackground":h.highlight(a.id),y.setBackground(a.opts);break;case"setSprite":h.highlight(a.id),y.setSprite(a.opts);break;case"saySprite":return a.opts.started||h.highlight(a.id),y.saySprite(a.opts);case"setSpriteEmotion":h.highlight(a.id),y.setSpriteEmotion(a.opts);break;case"setSpriteSpeed":h.highlight(a.id),y.setSpriteSpeed(a.opts);break;case"setSpriteSize":h.highlight(a.id),y.setSpriteSize(a.opts);break;case"setSpritePosition":h.highlight(a.id),y.setSpritePosition(a.opts);break;case"playSound":h.highlight(a.id),h.playAudio(a.opts.soundName,{volume:1}),y.playSoundCount++;break;case"showTitleScreen":return a.opts.started||h.highlight(a.id),y.showTitleScreen(a.opts);case"move":h.highlight(a.id),y.moveSingle(a.opts);break;case"moveDistance":return a.opts.started||h.highlight(a.id),y.moveDistance(a.opts);case"stop":h.highlight(a.id),y.stop(a.opts);break;case"throwProjectile":return a.opts.started||h.highlight(a.id),y.throwProjectile(a.opts);case"makeProjectile":h.highlight(a.id),y.makeProjectile(a.opts);break;case"changeScore":h.highlight(a.id),y.changeScore(a.opts);break;case"setScoreText":h.highlight(a.id),y.setScoreText(a.opts);break;case"wait":return a.opts.started||h.highlight(a.id),y.wait(a.opts);case"vanish":h.highlight(a.id),y.vanishActor(a.opts)}return!0},y.vanishActor=function(a){var b=document.getElementById("svgStudio"),c=document.getElementById("sprite"+a.spriteIndex);if(c&&"hidden"!==c.getAttribute("visibility")){var d=document.getElementById("explosion"+a.spriteIndex);d||(d=document.createElementNS(Blockly.SVG_NS,"image"),d.setAttribute("id","explosion"+a.spriteIndex),d.setAttribute("visibility","hidden"),b.appendChild(d,c));var e=document.getElementById("spriteClipRect"+a.spriteIndex);d.setAttribute("height",y.sprite[a.spriteIndex].height),d.setAttribute("width",y.sprite[a.spriteIndex].width),d.setAttribute("x",e.getAttribute("x")),d.setAttribute("y",e.getAttribute("y")),d.setAttribute("visibility","visible"),y.setSprite({spriteIndex:a.spriteIndex,value:"hidden"}),d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A.explosion+"?spriteIndex="+a.spriteIndex)}},y.setSpriteEmotion=function(a){y.sprite[a.spriteIndex].emotion=a.value},y.setSpriteSpeed=function(a){y.sprite[a.spriteIndex].speed=a.value},y.setSpriteSize=function(a){y.sprite[a.spriteIndex].size=a.value;var b=y.sprite[a.spriteIndex].value;"hidden"!==b&&y.setSprite({spriteIndex:a.spriteIndex,value:b})},y.changeScore=function(a){y.playerScore+=Number(a.value),y.displayScore()},y.setScoreText=function(a){y.scoreText=a.text,y.displayScore()},y.setBackground=function(a){var b=document.getElementById("background");b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A[a.value].background)};var Hb=function(a){var b=y.sprite[a].flags;y.sprite[a].firstAnimFrameNum=E.NORMAL,y.sprite[a].firstTurnFrameNum=E.NORMAL+(b&C.ANIMATION?E.ANIMATION:0),y.sprite[a].firstEmotionFrameNum=y.sprite[a].firstTurnFrameNum+(b&C.TURNS?E.TURNS:0)};y.setSprite=function(a){var b=a.spriteIndex,c=y.sprite[b],d=a.value,e=document.getElementById("sprite"+b);if(c.visible="hidden"!==d&&!a.forceHidden,e.setAttribute("visibility",c.visible?"visible":"hidden"),"hidden"!==d&&"visible"!==d){c.flags&=~D,c.flags|=A[d].spriteFlags,c.height=c.size*(A[d].spriteHeight||y.DEFAULT_SPRITE_HEIGHT),c.width=c.size*(A[d].spriteWidth||y.DEFAULT_SPRITE_WIDTH),c.value=a.forceHidden?"hidden":a.value; var f=document.getElementById("spriteClipRect"+b);f.setAttribute("width",c.width),f.setAttribute("height",c.height),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A[d].sprite),e.setAttribute("width",c.width*Fb(b)),e.setAttribute("height",c.height),Hb(b),y.displaySprite(b)}};var Ib=function(a,b){return a+" "+b+" "},Jb=15,Kb=25,Lb=10,Mb=function(a,b,c,d,e,f,g){var h="M"+Ib(a+e,b);return f||(h+=g?"L"+Ib(a+e-Lb,b-Jb)+"L"+Ib(a+e+Kb,b):"L"+Ib(a+c-e-Kb,b)+"L"+Ib(a+c-Lb,b-Jb)),h+="L"+Ib(a+c-e,b),h+="Q"+Ib(a+c,b)+Ib(a+c,b+e),h+="L"+Ib(a+c,b+d-e)+"Q"+Ib(a+c,b+d)+Ib(a+c-e,b+d),f&&(h+=g?"L"+Ib(a+e+Kb,b+d)+"L"+Ib(a+e-Lb,b+d+Jb):"L"+Ib(a+c-Lb,b+d+Jb)+"L"+Ib(a+c-e-Kb,b+d)),h+="L"+Ib(a+e,b+d),h+="Q"+Ib(a,b+d)+Ib(a,b+d-e),h+="L"+Ib(a,b+e)+"Q"+Ib(a,b)+Ib(a+e,b),h+="Z"},Nb=function(a){a.complete||(a.waitCallback&&a.waitCallback(),a.complete=!0)};y.wait=function(a){return a.started||(a.started=!0,"click"===a.value?a.waitForClick=!0:a.waitTimeout=window.setTimeout(gb(this,Nb,a),a.value)),a.complete},y.hideTitleScreen=function(a){var b=document.getElementById("titleScreenTitle"),c=document.getElementById("titleScreenTextGroup");b.setAttribute("visibility","hidden"),c.setAttribute("visibility","hidden"),a.complete=!0},y.showTitleScreen=function(a){if(!a.started){a.started=!0;var b=document.getElementById("titleScreenTitle"),c=document.getElementById("titleScreenTextGroup"),d=document.getElementById("titleScreenText"),e=document.getElementById("titleScreenTextRect");b.textContent=a.title;var f={svgText:d,text:a.text,width:S,lineHeight:O,topMargin:Q,sideMargin:N,maxLines:P,fullHeight:T},g=lb(f);e.setAttribute("height",g),b.setAttribute("visibility","visible"),c.setAttribute("visibility","visible"),a.waitForClick=!0,a.waitCallback=gb(this,y.hideTitleScreen,a),a.waitTimeout=window.setTimeout(gb(this,Nb,a),K)}return a.complete},y.isCmdCurrentInQueue=function(a,b){var c=!1;return y.eventHandlers.forEach(function(d){if(d.name===b){var e=d.cmdQueue?d.cmdQueue[0]:null;e&&e.name===a&&(c=!0)}}),c},y.hideSpeechBubble=function(a){var b=document.getElementById("speechBubble"+a.spriteIndex);b.setAttribute("visibility","hidden"),b.removeAttribute("onTop"),b.removeAttribute("onRight"),b.removeAttribute("height"),a.complete=!0,delete y.sprite[a.spriteIndex].bubbleTimeoutFunc,y.sayComplete++},y.saySprite=function(a){if(a.started)return a.complete;var b=a.spriteIndex,c=y.sprite[b];if(a.started=!0,c.bubbleTimeoutFunc&&c.bubbleTimeoutFunc(),window.clearTimeout(c.bubbleTimeout),!c.visible)return a.complete=!0,a.complete;var d=document.getElementById("speechBubbleText"+b),e={svgText:d,text:a.text,width:ab,lineHeight:Z,topMargin:_,sideMargin:Y,maxLines:$,fullHeight:bb},f=lb(e),g=document.getElementById("speechBubblePath"+b),h=document.getElementById("speechBubble"+b);return g.setAttribute("height",f),Gb(g),y.displaySprite(a.spriteIndex),h.setAttribute("visibility","visible"),c.bubbleTimeoutFunc=gb(this,y.hideSpeechBubble,a),c.bubbleTimeout=window.setTimeout(c.bubbleTimeoutFunc,U),a.complete},y.stop=function(a){if(ib(a.spriteIndex,!0),ib(a.spriteIndex,!1),!a.dontResetCollisions){y.sprite[a.spriteIndex].clearCollisions();for(var b=0;bc&&!z.allowSpritesOutsidePlayspace&&(b.x=c);break;case u.SOUTH:b.y+=b.speed;var d=y.MAZE_HEIGHT-b.height;b.y>d&&!z.allowSpritesOutsidePlayspace&&(b.y=d);break;case u.WEST:b.x-=b.speed,b.x<0&&!z.allowSpritesOutsidePlayspace&&(b.x=0)}},y.moveDistance=function(a){return a.started||(a.started=!0,a.queuedDistance=a.distance),0===a.queuedDistance},y.timedOut=function(){return y.tickCount>y.timeoutFailureTick},y.allGoalsVisited=function(){var a,b,c=y.sprite[y.protaganistSpriteIndex],d=0;if(0===y.spriteGoals_.length)return!1;for(a=0;a/g,">").replace(/'/g,"'").replace(/"/g,""")};var buf=[];with(locals||{})!function(){buf.push('\n\n
\n
\n
\n')}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],27:[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('
Instructions:
\n
Level Name:
\n\n
\n')}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],28:[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_ploc/common");buf.push("\n\n"),data.ok&&buf.push('
\n \n
\n"),buf.push("\n"),data.previousLevel&&buf.push(' \n"),buf.push("\n"),data.tryAgain&&(buf.push(" "),data.isK1&&!data.freePlay?buf.push('
\n
Arrowhead
\n
',escape(a.tryAgain()),"
\n
\n "):(buf.push(" "),"left"===data.hintRequestExperiment?buf.push(' \n \n "):"right"==data.hintRequestExperiment?buf.push(' \n \n "):buf.push(' \n "),buf.push(" ")),buf.push("")),buf.push("\n"),data.nextLevel&&(buf.push(" "),data.isK1&&!data.freePlay?buf.push('
\n
Arrowhead
\n
',escape(a.continue()),"
\n
\n "):buf.push(' \n "),buf.push("")),buf.push("")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],29:[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('
\n

',message,'

\n
',escape(code),"
\n
\n\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],30:[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_ploc/common");buf.push("\n\n

",escape(a.puzzleTitle(locals)),"

\n"),locals.instructions&&buf.push("

",escape(locals.instructions),"

\n"),buf.push(""),locals.aniGifURL&&buf.push(' \n"),buf.push("")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],31:[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_ploc/common");buf.push("\n\n");var b=location.protocol+"//"+location.host.replace("learn.","");buf.push('\n\n\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],32:[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("");require("../../locale/en_ploc/common");buf.push('\n\n\n\n");var c=function(){buf.push('
\n \n \n \n \n \n
\n \n \n

\n

\n
\n
\n
\n \n
\n
\n
\n')};buf.push("\n");var d=function(a){buf.push(" "),a&&buf.push('
\n ',a,"\n
\n "),buf.push("")};buf.push("\n");var e=function(){buf.push('
\n // ',escape(a.typeCode()),"\n
\n // ",escape(a.typeHint()),"\n
\n
\n")};buf.push('\n\n
\n
\n ',data.visualization,'\n
\n\n
\n\n
\n \n \n '),data.controls&&buf.push("\n ",data.controls,"\n "),buf.push("\n "),data.extraControlRows&&buf.push("\n ",data.extraControlRows,"\n "),buf.push("\n
\n\n "),c(),buf.push("\n "),d(data.helpHtml),buf.push('\n\n
\n
\n\n
\n
\n
',escape(a.toolboxHeader()),'
\n
\n ',escape(a.workspaceHeader()),' \n
\n
\n  /\n ',escape(data.idealBlockNumber),'\n
\n
\n
',escape(a.showCodeHeader()),'
\n
\n
\n\n
\n\n'),e(),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],34:[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('\n\n\n \n Blockly\n \n \n \n\n\n
\n \n\n\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],35:[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_ploc/common");buf.push("\n"),options.feedbackImage&&buf.push('\n \n'),buf.push('\n\n
\n\n')}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],36:[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_ploc/common");buf.push('\n\n

\n ',escape(a.numLinesOfCodeWritten({numLines:numLinesWritten})),'\n \n

\n\n"),0!==totalNumLinesWritten&&buf.push('\n

\n ',escape(a.totalNumLinesOfCodeWritten({numLines:totalNumLinesWritten})),"\n

\n"),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_ploc/common":40,ejs:42}],37:[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("

",escape(concept_name),"
\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
\n\n'),finishButton&&buf.push('\n \n"),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],19:[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"),finishButton&&buf.push('\n \n"),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],20:[function(a,b){function c(a){var b={};return a.sprite&&(b.SPRITE=a.sprite),a.requiredText&&(b.TEXT=a.requiredText),a.notDefaultText&&(b.TEXT=d.helloWorld()),[{test:function(b){return"studio_saySprite"!==b.type?!1:a.sprite&&b.getTitleValue("SPRITE")!==a.sprite?!1:(a.notDefaultText||a.requiredText)&&b.getTitleValue("TEXT")===d.defaultSayText()?!1:!0},type:"studio_saySprite",titles:b}]}var d=a("../../locale/en_us/studio"),e=a("../utils"),f=a("../block_utils"),g=a("./tiles"),h=(g.Direction,g.Emotions),i=f.createToolbox,j=f.blockOfType,k=f.createCategory,l=j("studio_moveNorthDistance")+j("studio_moveEastDistance")+j("studio_moveSouthDistance")+j("studio_moveWestDistance"),m=(j("studio_moveNorth")+j("studio_moveEast")+j("studio_moveSouth")+j("studio_moveWest"),b.exports={});m.dog_hello={ideal:2,requiredBlocks:[[{test:function(a){return"studio_saySprite"==a.type&&a.getTitleValue("TEXT")!==d.defaultSayText()},type:"studio_saySprite",titles:{TEXT:d.helloWorld()}}]],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sayComplete>0}},timeoutFailureTick:100,toolbox:i(j("studio_saySprite")),startBlocks:''},m.k1_1=e.extend(m.dog_hello,{isK1:!0,toolbox:i(j("studio_saySprite"))}),m.c2_1=e.extend(m.dog_hello),m.c3_story_1=e.extend(m.dog_hello),m.playlab_1=e.extend(m.dog_hello),m.dog_and_cat_hello={ideal:3,requiredBlocks:[c({sprite:"0",notDefaultText:!0}),c({sprite:"1",notDefaultText:!0})],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sayComplete>1}},timeoutFailureTick:200,toolbox:i(j("studio_saySprite")),startBlocks:''},m.k1_2=e.extend(m.dog_and_cat_hello,{isK1:!0,toolbox:i(j("studio_saySprite"))}),m.c2_2=e.extend(m.dog_and_cat_hello,{}),m.c3_story_2=e.extend(m.dog_and_cat_hello,{}),m.playlab_2=e.extend(m.dog_and_cat_hello,{}),m.dog_move_cat={ideal:2,requiredBlocks:[[{test:"moveDistance",type:"studio_moveDistance",titles:{DIR:"2"}}]],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(1)}},timeoutFailureTick:100,toolbox:i('2'+j("studio_saySprite")),startBlocks:''},m.k1_3=e.extend(m.dog_move_cat,{isK1:!0,requiredBlocks:[[{test:function(a){return"studio_moveEastDistance"==a.type},type:"studio_moveEastDistance"}]],toolbox:i(l+j("studio_saySprite"))}),m.c2_3=e.extend(m.dog_move_cat,{}),m.c3_story_3=e.extend(m.dog_move_cat,{}),m.playlab_3=e.extend(m.dog_move_cat,{}),m.dog_move_cat_hello={ideal:4,requiredBlocks:[[{test:"moveDistance",type:"studio_moveDistance",titles:{DIR:"2",DISTANCE:"100"}}],c({sprite:"1",requiredText:d.hello()})],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],goal:{successCondition:function(){return Studio.sayComplete>0&&Studio.sprite[0].isCollidingWith(1)}},timeoutFailureTick:200,toolbox:i('2'+j("studio_saySprite")),startBlocks:' '},m.k1_4=e.extend(m.dog_move_cat_hello,{isK1:!0,requiredBlocks:[[{test:function(a){return"studio_moveEastDistance"==a.type},type:"studio_moveEastDistance"}],[{test:function(a){return"studio_saySprite"==a.type&&"1"===a.getTitleValue("SPRITE")&&a.getTitleValue("TEXT")!==d.defaultSayText()},type:"studio_saySprite",titles:{TEXT:d.hello(),SPRITE:"1"}}]],toolbox:i(l+j("studio_saySprite")),startBlocks:' '}),m.c2_4=e.extend(m.dog_move_cat_hello,{}),m.c3_story_4=e.extend(m.dog_move_cat_hello,{}),m.playlab_4=e.extend(m.dog_move_cat_hello,{}),m.click_hello={ideal:3,requiredBlocks:[c({requiredText:d.hello()})],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:4,goal:{successCondition:function(){return this.successState.seenCmd||(this.successState.seenCmd=Studio.isCmdCurrentInQueue("saySprite","whenSpriteClicked-0")),Studio.sayComplete>0&&this.successState.seenCmd}},timeoutFailureTick:300,toolbox:i('2'+j("studio_saySprite")),startBlocks:' '},m.c2_5=e.extend(m.click_hello,{}),m.c3_game_1=e.extend(m.click_hello,{}),m.playlab_5=e.extend(m.click_hello,{}),m.octopus_happy={ideal:2,requiredBlocks:[[{test:"setSpriteEmotion",type:"studio_setSpriteEmotion"}]],scale:{snapRadius:2},map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,16,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:4,goal:{successCondition:function(){return Studio.sprite[0].emotion===h.HAPPY&&Studio.tickCount>=50}},timeoutFailureTick:100,toolbox:i('2'+j("studio_setSpriteEmotion")),startBlocks:''},m.k1_5=e.extend(m.octopus_happy,{isK1:!0,toolbox:i(l+j("studio_setSpriteEmotion"))}),m.c3_story_5=e.extend(m.octopus_happy,{}),m.c3_story_6={ideal:1/0,requiredBlocks:[],scale:{snapRadius:2},minWorkspaceHeight:1400,edgeCollisions:!0,projectileCollisions:!0,allowSpritesOutsidePlayspace:!1,spritesHiddenToStart:!0,freePlay:!0,map:[[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0]],toolbox:i(j("studio_setSprite")+j("studio_setBackground")+j("studio_whenSpriteCollided")+j("studio_repeatForever")+j("studio_showTitleScreen")+j("studio_move")+j("studio_moveDistance")+j("studio_stop")+j("studio_wait")+j("studio_playSound")+j("studio_changeScore")+j("studio_saySprite")+j("studio_setSpritePosition")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")),startBlocks:''},m.move_penguin={ideal:8,requiredBlocks:[[{test:"move",type:"studio_move"}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[1,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,0],[0,0,16,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,1,0,0,0,0,1,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,toolbox:i(j("studio_move")+j("studio_saySprite")),startBlocks:' '},m.c2_6=e.extend(m.move_penguin,{}),m.c3_game_2=e.extend(m.move_penguin,{}),m.playlab_6=e.extend(m.move_penguin,{}),m.dino_up_and_down={ideal:11,requiredBlocks:[[{test:"moveDistance",type:"studio_moveDistance",titles:{SPRITE:"1",DISTANCE:"400"}}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,protaganistSpriteIndex:1,timeoutFailureTick:150,minWorkspaceHeight:800,toolbox:i(' 400 1 1'),startBlocks:' 8 2 1 4 '},m.c2_7=e.extend(m.dino_up_and_down,{}),m.c3_game_3=e.extend(m.dino_up_and_down,{}),m.playlab_7=e.extend(m.dino_up_and_down,{}),m.penguin_ouch={ideal:14,requiredBlocks:[c({sprite:"0",requiredText:d.ouchExclamation()}),[{test:"playSound",type:"studio_playSound"}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,minWorkspaceHeight:900,goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(1)}},timeoutFailureTick:300,toolbox:i(' 400 1'+j("studio_saySprite")+j("studio_playSound")),startBlocks:' 8 2 1 4 1 400 1 400 4 '},m.c2_8=e.extend(m.penguin_ouch,{}),m.c3_game_4=e.extend(m.penguin_ouch,{}),m.penguin_touch_octopus={ideal:16,requiredBlocks:[[{test:"changeScore",type:"studio_changeScore"}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,16,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,minWorkspaceHeight:1050,goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(2)}},timeoutFailureTick:600,toolbox:i(' 400 1'+j("studio_saySprite")+j("studio_playSound")+j("studio_changeScore")),startBlocks:' 8 2 1 4 1 400 1 400 4 Ouch! 2'},m.c2_9=e.extend(m.penguin_touch_octopus,{}),m.c3_game_5=e.extend(m.penguin_touch_octopus,{}),m.playlab_8=e.extend(m.penguin_touch_octopus,{}),m.change_background_and_speed={ideal:19,requiredBlocks:[[{test:"setBackground",type:"studio_setBackground",titles:{VALUE:'"night"'}}],[{test:"setSpriteSpeed",type:"studio_setSpriteSpeed",titles:{VALUE:"Studio.SpriteSpeed.FAST"}}]],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],map:[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[16,0,0,0,16,0,16,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]],firstSpriteIndex:2,minWorkspaceHeight:1250,goal:{successCondition:function(){return Studio.sprite[0].isCollidingWith(2)}},timeoutFailureTick:600,toolbox:i(' "night" 400 1'+j("studio_saySprite")+j("studio_playSound")+j("studio_changeScore")+' Studio.SpriteSpeed.FAST'),startBlocks:' 8 2 1 4 1 400 1 400 4 Ouch! 2 '},m.c2_10=e.extend(m.change_background_and_speed,{}),m.c3_game_6=e.extend(m.change_background_and_speed,{}),m.playlab_9=e.extend(m.change_background_and_speed,{}),m.sandbox={ideal:1/0,requiredBlocks:[],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],minWorkspaceHeight:1400,edgeCollisions:!0,projectileCollisions:!0,allowSpritesOutsidePlayspace:!1,spritesHiddenToStart:!0,freePlay:!0,map:[[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0]],toolbox:i(j("studio_setSprite")+j("studio_setBackground")+j("studio_whenArrow")+j("studio_whenSpriteClicked")+j("studio_whenSpriteCollided")+j("studio_repeatForever")+j("studio_showTitleScreen")+j("studio_move")+j("studio_moveDistance")+j("studio_stop")+j("studio_wait")+j("studio_playSound")+j("studio_changeScore")+j("studio_saySprite")+j("studio_setSpritePosition")+j("studio_throw")+j("studio_makeProjectile")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")+j("studio_vanish")),startBlocks:''},m.c2_11=e.extend(m.sandbox,{}),m.c3_game_7=e.extend(m.sandbox,{}),m.playlab_10=e.extend(m.sandbox,{}),m.k1_6={ideal:1/0,requiredBlocks:[],scale:{snapRadius:2},minWorkspaceHeight:1500,spritesHiddenToStart:!0,freePlay:!0,map:[[16,0,16,0,16,0,16,0],[0,16,0,16,0,16,0,0],[16,0,16,0,16,0,16,0],[0,16,0,16,0,16,0,0],[16,0,16,0,16,0,16,0],[0,16,0,16,0,16,0,0],[16,16,16,16,16,16,16,0],[0,0,0,0,0,0,0,0]],isK1:!0,softButtons:[],toolbox:i(j("studio_setSprite")+j("studio_saySprite")+l+j("studio_whenSpriteCollided")+j("studio_setBackground")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")+j("studio_playSound")+j("studio_vanish")),startBlocks:' 0 '},m.k1_block_test=e.extend(m[99],{toolbox:i(j("studio_setSprite")+j("studio_moveNorth")+j("studio_moveSouth")+j("studio_moveEast")+j("studio_moveWest")+j("studio_moveNorth_length")+j("studio_moveSouth_length")+j("studio_moveEast_length")+j("studio_moveWest_length")),isK1:!0}),m.full_sandbox={scrollbars:!0,requiredBlocks:[],scale:{snapRadius:2},softButtons:["leftButton","rightButton","downButton","upButton"],minWorkspaceHeight:1400,edgeCollisions:!0,projectileCollisions:!0,allowSpritesOutsidePlayspace:!0,spritesHiddenToStart:!0,freePlay:!0,map:[[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,16,0,0,0,16,0,0],[0,0,0,0,0,0,0,0]],toolbox:i(k(d.catActions(),j("studio_setSprite")+j("studio_setBackground")+' '+j("studio_move")+' 25 '+j("studio_stop")+' 1 '+j("studio_playSound")+' '+j("studio_setSpritePosition")+j("studio_throw")+j("studio_makeProjectile")+j("studio_setSpriteSpeed")+j("studio_setSpriteEmotion")+j("studio_vanish")+j("studio_setSpriteSize"))+k(d.catEvents(),j("studio_whenArrow")+j("studio_whenSpriteClicked")+j("studio_whenSpriteCollided"))+k(d.catControl(),j("studio_repeatForever")+' 10 '+j("controls_whileUntil")+' 1 10 1 '+j("controls_flow_statements"))+k(d.catLogic(),j("controls_if")+j("logic_compare")+j("logic_operation")+j("logic_negate")+j("logic_boolean"))+k(d.catMath(),j("math_number")+' 1 1 100 '+j("math_arithmetic"))+k(d.catText(),j("text")+j("text_join")+' ')+k(d.catVariables(),"","VARIABLE")+k(d.catProcedures(),"","PROCEDURE")),startBlocks:''} },{"../../locale/en_us/studio":41,"../block_utils":3,"../utils":38,"./tiles":25}],21:[function(a){(function(b){var c=a("../appMain");window.Studio=a("./studio"),"undefined"!=typeof b&&(b.Studio=window.Studio);var d=a("./blocks"),e=a("./levels"),f=a("./skins");window.studioMain=function(a){a.skinsModule=f,a.blocksModule=d,c(window.Studio,e,a)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../appMain":1,"./blocks":16,"./levels":20,"./skins":23,"./studio":24}],22:[function(a,b){var c=a("./collidable"),d=a("./tiles").Direction,e=a("./tiles"),f=0,g={};g[d.EAST]=0,g[d.SOUTH]=90,g[d.WEST]=180,g[d.NORTH]=270;var h={};h[d.NORTH]={x:.5,y:0},h[d.EAST]={x:1,y:.5},h[d.SOUTH]={x:.5,y:1},h[d.WEST]={x:0,y:.5};var i={};i[d.NORTH]={x:0,y:-25},i[d.EAST]={x:25,y:0},i[d.SOUTH]={x:0,y:25},i[d.WEST]={x:-25,y:0};var j=function(a){c.apply(this,arguments),this.height=a.height||50,this.width=a.width||50,this.speed=a.speed||e.DEFAULT_SPRITE_SPEED/2,this.isFireball_=-1!==this.className.indexOf("fireball"),this.frames=this.isFireball_?8:1,this.currentFrame_=0;var b=this;this.animator_=window.setInterval(function(){b.currentFrame_=(b.currentFrame_+1)%b.frames},50),this.x=a.spriteX+i[a.dir].x+a.spriteWidth*h[a.dir].x,this.y=a.spriteY+i[a.dir].y+a.spriteHeight*h[a.dir].y};j.prototype=new c,b.exports=j,j.prototype.createElement=function(a){this.clipPath=document.createElementNS(Blockly.SVG_NS,"clipPath");var b="projectile_clippath_"+f++;this.clipPath.setAttribute("id",b);var c=document.createElementNS(Blockly.SVG_NS,"rect");c.setAttribute("width",this.width),c.setAttribute("height",this.height),this.clipPath.appendChild(c),a.appendChild(this.clipPath),this.element=document.createElementNS(Blockly.SVG_NS,"image"),this.element.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.image),this.element.setAttribute("height",this.height),this.element.setAttribute("width",this.width*this.frames),a.appendChild(this.element),this.element.setAttribute("clip-path","url(#"+b+")")},j.prototype.removeElement=function(){this.element&&(this.element.parentNode.removeChild(this.element),this.element=null),this.clipPath&&(this.clipPath.parentNode.removeChild(this.clipPath),this.clipPath=null),this.animator_&&(window.clearInterval(this.animator_),this.animator_=null)},j.prototype.display=function(){var a={x:this.x-this.width/2,y:this.y-this.height/2};this.element.setAttribute("x",a.x-this.width*this.currentFrame_),this.element.setAttribute("y",a.y);var b=this.clipPath.childNodes[0];b.setAttribute("x",a.x),b.setAttribute("y",a.y),this.isFireball_&&this.element.setAttribute("transform","rotate("+g[this.dir]+", "+this.x+", "+this.y+")")},j.prototype.getNextPosition=function(){var a=d.getUnitVector(this.dir);return{x:this.x+this.speed*a.x,y:this.y+this.speed*a.y}},j.prototype.moveToNextPosition=function(){var a=this.getNextPosition();this.x=a.x,this.y=a.y}},{"./collidable":17,"./tiles":25}],23:[function(a,b,c){var d=a("../skins"),e={studio:{}};c.load=function(a,b){var c=d.load(a,b),f=e[c.id];if(c.hardcourt={background:c.assetUrl("background.png")},c.black={background:c.assetUrl("retro_background.png")},c.cave={background:c.assetUrl("background_cave.png")},c.night={background:c.assetUrl("background_santa.png")},c.cloudy={background:c.assetUrl("background_scifi.png")},c.underwater={background:c.assetUrl("background_underwater.png")},c.city={background:c.assetUrl("background_city.png")},c.desert={background:c.assetUrl("background_desert.png")},c.rainbow={background:c.assetUrl("background_rainbow.png")},c.soccer={background:c.assetUrl("background_soccer.png")},c.space={background:c.assetUrl("background_space.png")},c.tennis={background:c.assetUrl("background_tennis.png")},c.winter={background:c.assetUrl("background_winter.png")},c.avatarList=["dog","cat","penguin","dinosaur","octopus","witch","bat","bird","dragon","squirrel","wizard","alien","ghost","monster","robot","unicorn","zombie","knight","ninja","pirate","caveboy","cavegirl","princess","spacebot","soccergirl","soccerboy","tennisgirl","tennisboy"],c.avatarList.forEach(function(a){c[a]={sprite:c.assetUrl(a+"_spritesheet_200px.png"),dropdownThumbnail:c.assetUrl(a+"_thumb.png"),spriteFlags:28}}),c.yellow_hearts=c.assetUrl("yellow_hearts.gif"),c.purple_hearts=c.assetUrl("purple_hearts.gif"),c.red_hearts=c.assetUrl("red_hearts.gif"),c.blue_fireball=c.assetUrl("blue_fireball.png"),c.purple_fireball=c.assetUrl("purple_fireball.png"),c.red_fireball=c.assetUrl("red_fireball.png"),c.explosion=c.assetUrl("explosion.gif"),c.explosionThumbnail=c.assetUrl("explosion_thumb.png"),c.whenUp=c.assetUrl("when-up.png"),c.whenDown=c.assetUrl("when-down.png"),c.whenLeft=c.assetUrl("when-left.png"),c.whenRight=c.assetUrl("when-right.png"),c.collide=c.assetUrl("when-sprite-collide.png"),c.emotionAngry=c.assetUrl("emotion-angry.png"),c.emotionNormal=c.assetUrl("emotion-nothing.png"),c.emotionSad=c.assetUrl("emotion-sad.png"),c.emotionHappy=c.assetUrl("emotion-happy.png"),c.speechBubble=c.assetUrl("say-sprite.png"),c.goal=c.assetUrl("goal.png"),c.goalSuccess=c.assetUrl("goal_success.png"),c.approachingGoalAnimation=c.assetUrl(f.approachingGoalAnimation),c.rubberSound=[c.assetUrl("wall.mp3"),c.assetUrl("wall.ogg")],c.flagSound=[c.assetUrl("win_goal.mp3"),c.assetUrl("win_goal.ogg")],c.crunchSound=[c.assetUrl("wall0.mp3"),c.assetUrl("wall0.ogg")],c.winPointSound=[c.assetUrl("1_we_win.mp3"),c.assetUrl("1_we_win.ogg")],c.winPoint2Sound=[c.assetUrl("2_we_win.mp3"),c.assetUrl("2_we_win.ogg")],c.losePointSound=[c.assetUrl("1_we_lose.mp3"),c.assetUrl("1_we_lose.ogg")],c.losePoint2Sound=[c.assetUrl("2_we_lose.mp3"),c.assetUrl("2_we_lose.ogg")],c.goal1Sound=[c.assetUrl("1_goal.mp3"),c.assetUrl("1_goal.ogg")],c.goal2Sound=[c.assetUrl("2_goal.mp3"),c.assetUrl("2_goal.ogg")],c.woodSound=[c.assetUrl("1_paddle_bounce.mp3"),c.assetUrl("1_paddle_bounce.ogg")],c.retroSound=[c.assetUrl("2_paddle_bounce.mp3"),c.assetUrl("2_paddle_bounce.ogg")],c.slapSound=[c.assetUrl("1_wall_bounce.mp3"),c.assetUrl("1_wall_bounce.ogg")],c.hitSound=[c.assetUrl("2_wall_bounce.mp3"),c.assetUrl("2_wall_bounce.ogg")],void 0!==f.background){var g=Math.floor(Math.random()*f.background);c.background=c.assetUrl("background"+g+".png")}else c.background=c.assetUrl("background.png");return c.spriteHeight=f.spriteHeight||100,c.spriteWidth=f.spriteWidth||100,c.dropdownThumbnailWidth=50,c.dropdownThumbnailHeight=50,c}},{"../skins":13}],24:[function(a,b){"use strict";function c(){y.map=z.map,y.timeoutFailureTick=z.timeoutFailureTick||1/0,y.minWorkspaceHeight=z.minWorkspaceHeight,y.softButtons_=z.softButtons||{},y.protaganistSpriteIndex=z.protaganistSpriteIndex||0,y.startAvatars=d(A.avatarList,z.firstSpriteIndex);for(var a in z.scale)y.scale[a]=z.scale[a];y.ROWS=y.map.length,y.COLS=y.map[0].length,y.SQUARE_SIZE=50,y.DEFAULT_SPRITE_HEIGHT=A.spriteHeight,y.DEFAULT_SPRITE_WIDTH=A.spriteWidth,y.MARKER_HEIGHT=100,y.MARKER_WIDTH=100,y.MAZE_WIDTH=y.SQUARE_SIZE*y.COLS,y.MAZE_HEIGHT=y.SQUARE_SIZE*y.ROWS}function d(a,b){return b=b||0,t.flatten([a.slice(b),a.slice(0,b)])}function e(a,b,c,d,e,f){return Math.abs(a-b)<=c&&Math.abs(d-e)<=f}function f(){for(var a=function(a){y.executeQueue("whenSpriteCollided-"+f+"-"+a)},b=function(a,b,c){var d=c?y.sprite[a].height:y.sprite[a].width,e=c?y.sprite[b].height:y.sprite[b].width;return j.SPRITE_COLLIDE_DISTANCE_SCALING*(d+e)/2},c=function(a,b,c){var d=c?y.sprite[a].height:y.sprite[a].width,e=c?y.projectiles[b].height:y.projectiles[b].width;return j.SPRITE_COLLIDE_DISTANCE_SCALING*(d+e)/2},d=function(a,b,c){var d,e=c?y.sprite[a].height:y.sprite[a].width;return d="left"===b||"right"===b?c?y.MAZE_HEIGHT:0:c?0:y.MAZE_WIDTH,(e+d)/2},f=0;fa.width-2*a.sideMargin){if(c.firstChild.data=c.firstChild.data.slice(0,g),a.maxLines===e)return a.fullHeight;c=document.createElementNS("http://www.w3.org/2000/svg","tspan"),c.setAttribute("x",a.width/2),c.setAttribute("dy",a.lineHeight),d=document.createTextNode(b[f]),c.appendChild(d),a.svgText.appendChild(c),e++}}var h=a.maxLines-Math.max(1,e);return a.fullHeight-h*a.lineHeight},mb=function(a,b){y.eventHandlers.forEach(function(c){if(c.name===a&&(b||!c.cmdQueue||0===c.cmdQueue.length)){c.cmdQueue||(c.cmdQueue=[]),y.currentCmdQueue=c.cmdQueue;try{c.func(h,l,y.Globals)}catch(d){}y.currentCmdQueue=null}})};y.onTick=function(){y.tickCount++,1===y.tickCount&&mb("whenGameStarts"),y.executeQueue("whenGameStarts"),mb("repeatForever"),y.executeQueue("repeatForever");for(var a=0;aDb&&(y.sprite[a].dir=u.SOUTH),y.displaySprite(a);for(a=0;a=G.LEFT&&a.keyCode<=G.DOWN&&a.preventDefault()},y.onArrowButtonDown=function(a,b){y.btnState[b]=B.DOWN,a.preventDefault()},y.onSpriteClicked=function(a,b){y.intervalId&&mb("whenSpriteClicked-"+b),a.preventDefault()},y.onSvgClicked=function(a){y.intervalId&&y.eventHandlers.forEach(function(a){var b=a.cmdQueue?a.cmdQueue[0]:null;b&&b.opts.waitForClick&&!b.opts.complete&&(b.opts.waitCallback&&b.opts.waitCallback(),b.opts.complete=!0)}),a.preventDefault()},y.onArrowButtonUp=function(a,b){y.btnState[b]=B.UP},y.onMouseUp=function(){y.btnState={}},y.initSprites=function(){y.spriteCount=0,y.sprite=[],y.projectiles=[],y.spriteGoals_=[];for(var a=0;a=h.TestResults.FREE_PLAY?"win":"failure"),z.editCode&&(y.testResults=a?h.TestResults.ALL_PASS:h.TestResults.TOO_FEW_BLOCKS_FAIL);var b=Blockly.Xml.workspaceToDom(Blockly.mainWorkspace),c=Blockly.Xml.domToText(b);y.waitingForReport=!0,h.report({app:"studio",level:z.id,result:y.result===h.ResultType.SUCCESS,testResult:y.testResults,program:encodeURIComponent(c),onComplete:y.onReportComplete})};var zb={};zb[u.SOUTHEAST]=0,zb[u.EAST]=1,zb[u.NORTHEAST]=2,zb[u.NORTH]=3,zb[u.NORTHWEST]=4,zb[u.WEST]=5,zb[u.SOUTHWEST]=6;var Ab=6,Bb=7,Cb=8,Db=5,Eb=function(a){var b=y.sprite[a],c=0;return b.flags&C.TURNS&&b.displayDir!==u.SOUTH?b.firstTurnFrameNum+zb[b.displayDir]:(b.flags&C.ANIMATION&&y.tickCount&&1===Math.round((y.tickCount+a*Bb)/Ab)%Cb&&(c=b.firstAnimFrameNum),b.emotion!==x.NORMAL&&b.flags&C.EMOTIONS?c?c:b.firstEmotionFrameNum+(b.emotion-1):c)},Fb=function(a){var b=E.NORMAL;return y.sprite[a].flags&C.ANIMATION&&(b+=E.ANIMATION),y.sprite[a].flags&C.TURNS&&(b+=E.TURNS),y.sprite[a].flags&C.EMOTIONS&&(b+=E.EMOTIONS),b},Gb=function(a){var b=+a.getAttribute("height"),c="true"===a.getAttribute("onTop"),d="true"===a.getAttribute("onRight");a.setAttribute("d",Mb(0,0,ab,b,V,c,d))};y.displaySprite=function(a){var b=y.sprite[a],c=b.width*Eb(a),d=document.getElementById("sprite"+a),e=document.getElementById("spriteClipRect"+a),f=e.getAttribute("x"),g=e.getAttribute("y"),h=b.dir;h===u.NONE?b.dir=u.SOUTH:(b.x!=f||b.y!=g)&&(b.dir=u.NONE,b.xf&&(b.dir|=u.EAST),b.yg&&(b.dir|=u.SOUTH)),b.dir!==b.displayDir&&y.tickCount&&0===y.tickCount%2&&(b.displayDir=v[b.displayDir][b.dir]),d.setAttribute("x",b.x-c),d.setAttribute("y",b.y),e.setAttribute("x",b.x),e.setAttribute("y",b.y);var i=document.getElementById("speechBubble"+a),j=document.getElementById("speechBubblePath"+a),k=+j.getAttribute("height"),l="true"===j.getAttribute("onTop"),m="true"===j.getAttribute("onRight"),n=!0,o=!0,p=b.y-(k+X);0>p&&(p=b.y+b.height+X,n=!1);var q=b.x+W;q>y.MAZE_WIDTH-ab&&(q=b.x+b.width-(ab+W),o=!1),j.setAttribute("onTop",n),j.setAttribute("onRight",o),(l!==n||m!==o)&&Gb(j),i.setAttribute("transform","translate("+q+","+p+")")},y.displayScore=function(){var a=document.getElementById("score");a.textContent=y.scoreText?y.scoreText:i.scoreText({playerScore:y.playerScore}),a.setAttribute("visibility","visible")},y.queueCmd=function(a,b,c){var d={id:a,name:b,opts:c};if(y.currentEventParams)for(var e in y.currentEventParams)d.opts[e]=y.currentEventParams[e];y.currentCmdQueue.push(d)},y.executeQueue=function(a){y.eventHandlers.forEach(function(b){if(b.name===a&&b.cmdQueue)for(var c=b.cmdQueue[0];c&&y.callCmd(c);c=b.cmdQueue[0])b.cmdQueue.shift()})},y.callCmd=function(a){switch(a.name){case"setBackground":h.highlight(a.id),y.setBackground(a.opts);break;case"setSprite":h.highlight(a.id),y.setSprite(a.opts);break;case"saySprite":return a.opts.started||h.highlight(a.id),y.saySprite(a.opts);case"setSpriteEmotion":h.highlight(a.id),y.setSpriteEmotion(a.opts);break;case"setSpriteSpeed":h.highlight(a.id),y.setSpriteSpeed(a.opts);break;case"setSpriteSize":h.highlight(a.id),y.setSpriteSize(a.opts);break;case"setSpritePosition":h.highlight(a.id),y.setSpritePosition(a.opts);break;case"playSound":h.highlight(a.id),h.playAudio(a.opts.soundName,{volume:1}),y.playSoundCount++;break;case"showTitleScreen":return a.opts.started||h.highlight(a.id),y.showTitleScreen(a.opts);case"move":h.highlight(a.id),y.moveSingle(a.opts);break;case"moveDistance":return a.opts.started||h.highlight(a.id),y.moveDistance(a.opts);case"stop":h.highlight(a.id),y.stop(a.opts);break;case"throwProjectile":return a.opts.started||h.highlight(a.id),y.throwProjectile(a.opts);case"makeProjectile":h.highlight(a.id),y.makeProjectile(a.opts);break;case"changeScore":h.highlight(a.id),y.changeScore(a.opts);break;case"setScoreText":h.highlight(a.id),y.setScoreText(a.opts);break;case"wait":return a.opts.started||h.highlight(a.id),y.wait(a.opts);case"vanish":h.highlight(a.id),y.vanishActor(a.opts)}return!0},y.vanishActor=function(a){var b=document.getElementById("svgStudio"),c=document.getElementById("sprite"+a.spriteIndex);if(c&&"hidden"!==c.getAttribute("visibility")){var d=document.getElementById("explosion"+a.spriteIndex);d||(d=document.createElementNS(Blockly.SVG_NS,"image"),d.setAttribute("id","explosion"+a.spriteIndex),d.setAttribute("visibility","hidden"),b.appendChild(d,c));var e=document.getElementById("spriteClipRect"+a.spriteIndex);d.setAttribute("height",y.sprite[a.spriteIndex].height),d.setAttribute("width",y.sprite[a.spriteIndex].width),d.setAttribute("x",e.getAttribute("x")),d.setAttribute("y",e.getAttribute("y")),d.setAttribute("visibility","visible"),y.setSprite({spriteIndex:a.spriteIndex,value:"hidden"}),d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A.explosion+"?spriteIndex="+a.spriteIndex)}},y.setSpriteEmotion=function(a){y.sprite[a.spriteIndex].emotion=a.value},y.setSpriteSpeed=function(a){y.sprite[a.spriteIndex].speed=a.value},y.setSpriteSize=function(a){y.sprite[a.spriteIndex].size=a.value;var b=y.sprite[a.spriteIndex].value;"hidden"!==b&&y.setSprite({spriteIndex:a.spriteIndex,value:b})},y.changeScore=function(a){y.playerScore+=Number(a.value),y.displayScore()},y.setScoreText=function(a){y.scoreText=a.text,y.displayScore()},y.setBackground=function(a){var b=document.getElementById("background");b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A[a.value].background)};var Hb=function(a){var b=y.sprite[a].flags;y.sprite[a].firstAnimFrameNum=E.NORMAL,y.sprite[a].firstTurnFrameNum=E.NORMAL+(b&C.ANIMATION?E.ANIMATION:0),y.sprite[a].firstEmotionFrameNum=y.sprite[a].firstTurnFrameNum+(b&C.TURNS?E.TURNS:0)};y.setSprite=function(a){var b=a.spriteIndex,c=y.sprite[b],d=a.value,e=document.getElementById("sprite"+b);if(c.visible="hidden"!==d&&!a.forceHidden,e.setAttribute("visibility",c.visible?"visible":"hidden"),"hidden"!==d&&"visible"!==d){c.flags&=~D,c.flags|=A[d].spriteFlags,c.height=c.size*(A[d].spriteHeight||y.DEFAULT_SPRITE_HEIGHT),c.width=c.size*(A[d].spriteWidth||y.DEFAULT_SPRITE_WIDTH),c.value=a.forceHidden?"hidden":a.value; var f=document.getElementById("spriteClipRect"+b);f.setAttribute("width",c.width),f.setAttribute("height",c.height),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A[d].sprite),e.setAttribute("width",c.width*Fb(b)),e.setAttribute("height",c.height),Hb(b),y.displaySprite(b)}};var Ib=function(a,b){return a+" "+b+" "},Jb=15,Kb=25,Lb=10,Mb=function(a,b,c,d,e,f,g){var h="M"+Ib(a+e,b);return f||(h+=g?"L"+Ib(a+e-Lb,b-Jb)+"L"+Ib(a+e+Kb,b):"L"+Ib(a+c-e-Kb,b)+"L"+Ib(a+c-Lb,b-Jb)),h+="L"+Ib(a+c-e,b),h+="Q"+Ib(a+c,b)+Ib(a+c,b+e),h+="L"+Ib(a+c,b+d-e)+"Q"+Ib(a+c,b+d)+Ib(a+c-e,b+d),f&&(h+=g?"L"+Ib(a+e+Kb,b+d)+"L"+Ib(a+e-Lb,b+d+Jb):"L"+Ib(a+c-Lb,b+d+Jb)+"L"+Ib(a+c-e-Kb,b+d)),h+="L"+Ib(a+e,b+d),h+="Q"+Ib(a,b+d)+Ib(a,b+d-e),h+="L"+Ib(a,b+e)+"Q"+Ib(a,b)+Ib(a+e,b),h+="Z"},Nb=function(a){a.complete||(a.waitCallback&&a.waitCallback(),a.complete=!0)};y.wait=function(a){return a.started||(a.started=!0,"click"===a.value?a.waitForClick=!0:a.waitTimeout=window.setTimeout(gb(this,Nb,a),a.value)),a.complete},y.hideTitleScreen=function(a){var b=document.getElementById("titleScreenTitle"),c=document.getElementById("titleScreenTextGroup");b.setAttribute("visibility","hidden"),c.setAttribute("visibility","hidden"),a.complete=!0},y.showTitleScreen=function(a){if(!a.started){a.started=!0;var b=document.getElementById("titleScreenTitle"),c=document.getElementById("titleScreenTextGroup"),d=document.getElementById("titleScreenText"),e=document.getElementById("titleScreenTextRect");b.textContent=a.title;var f={svgText:d,text:a.text,width:S,lineHeight:O,topMargin:Q,sideMargin:N,maxLines:P,fullHeight:T},g=lb(f);e.setAttribute("height",g),b.setAttribute("visibility","visible"),c.setAttribute("visibility","visible"),a.waitForClick=!0,a.waitCallback=gb(this,y.hideTitleScreen,a),a.waitTimeout=window.setTimeout(gb(this,Nb,a),K)}return a.complete},y.isCmdCurrentInQueue=function(a,b){var c=!1;return y.eventHandlers.forEach(function(d){if(d.name===b){var e=d.cmdQueue?d.cmdQueue[0]:null;e&&e.name===a&&(c=!0)}}),c},y.hideSpeechBubble=function(a){var b=document.getElementById("speechBubble"+a.spriteIndex);b.setAttribute("visibility","hidden"),b.removeAttribute("onTop"),b.removeAttribute("onRight"),b.removeAttribute("height"),a.complete=!0,delete y.sprite[a.spriteIndex].bubbleTimeoutFunc,y.sayComplete++},y.saySprite=function(a){if(a.started)return a.complete;var b=a.spriteIndex,c=y.sprite[b];if(a.started=!0,c.bubbleTimeoutFunc&&c.bubbleTimeoutFunc(),window.clearTimeout(c.bubbleTimeout),!c.visible)return a.complete=!0,a.complete;var d=document.getElementById("speechBubbleText"+b),e={svgText:d,text:a.text,width:ab,lineHeight:Z,topMargin:_,sideMargin:Y,maxLines:$,fullHeight:bb},f=lb(e),g=document.getElementById("speechBubblePath"+b),h=document.getElementById("speechBubble"+b);return g.setAttribute("height",f),Gb(g),y.displaySprite(a.spriteIndex),h.setAttribute("visibility","visible"),c.bubbleTimeoutFunc=gb(this,y.hideSpeechBubble,a),c.bubbleTimeout=window.setTimeout(c.bubbleTimeoutFunc,U),a.complete},y.stop=function(a){if(ib(a.spriteIndex,!0),ib(a.spriteIndex,!1),!a.dontResetCollisions){y.sprite[a.spriteIndex].clearCollisions();for(var b=0;bc&&!z.allowSpritesOutsidePlayspace&&(b.x=c);break;case u.SOUTH:b.y+=b.speed;var d=y.MAZE_HEIGHT-b.height;b.y>d&&!z.allowSpritesOutsidePlayspace&&(b.y=d);break;case u.WEST:b.x-=b.speed,b.x<0&&!z.allowSpritesOutsidePlayspace&&(b.x=0)}},y.moveDistance=function(a){return a.started||(a.started=!0,a.queuedDistance=a.distance),0===a.queuedDistance},y.timedOut=function(){return y.tickCount>y.timeoutFailureTick},y.allGoalsVisited=function(){var a,b,c=y.sprite[y.protaganistSpriteIndex],d=0;if(0===y.spriteGoals_.length)return!1;for(a=0;a/g,">").replace(/'/g,"'").replace(/"/g,""")};var buf=[];with(locals||{})!function(){buf.push('\n\n
\n
\n
\n')}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],27:[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('
Instructions:
\n
Level Name:
\n\n
\n')}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],28:[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"),data.ok&&buf.push('
\n \n
\n"),buf.push("\n"),data.previousLevel&&buf.push(' \n"),buf.push("\n"),data.tryAgain&&(buf.push(" "),data.isK1&&!data.freePlay?buf.push('
\n
Arrowhead
\n
',escape(a.tryAgain()),"
\n
\n "):(buf.push(" "),"left"===data.hintRequestExperiment?buf.push(' \n \n "):"right"==data.hintRequestExperiment?buf.push(' \n \n "):buf.push(' \n "),buf.push(" ")),buf.push("")),buf.push("\n"),data.nextLevel&&(buf.push(" "),data.isK1&&!data.freePlay?buf.push('
\n
Arrowhead
\n
',escape(a.continue()),"
\n
\n "):buf.push(' \n "),buf.push("")),buf.push("")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],29:[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('
\n

',message,'

\n
',escape(code),"
\n
\n\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],30:[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

",escape(a.puzzleTitle(locals)),"

\n"),locals.instructions&&buf.push("

",escape(locals.instructions),"

\n"),buf.push(""),locals.aniGifURL&&buf.push(' \n"),buf.push("")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],31:[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");var b=location.protocol+"//"+location.host.replace("learn.","");buf.push('\n\n\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],32:[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("");require("../../locale/en_us/common");buf.push('\n\n\n\n");var c=function(){buf.push('
\n \n \n \n \n \n
\n \n \n

\n

\n
\n
\n
\n \n
\n
\n
\n')};buf.push("\n");var d=function(a){buf.push(" "),a&&buf.push('
\n ',a,"\n
\n "),buf.push("")};buf.push("\n");var e=function(){buf.push('
\n // ',escape(a.typeCode()),"\n
\n // ",escape(a.typeHint()),"\n
\n
\n")};buf.push('\n\n
\n
\n ',data.visualization,'\n
\n\n
\n\n
\n \n \n '),data.controls&&buf.push("\n ",data.controls,"\n "),buf.push("\n "),data.extraControlRows&&buf.push("\n ",data.extraControlRows,"\n "),buf.push("\n
\n\n "),c(),buf.push("\n "),d(data.helpHtml),buf.push('\n\n
\n
\n\n
\n
\n
',escape(a.toolboxHeader()),'
\n
\n ',escape(a.workspaceHeader()),' \n
\n
\n  /\n ',escape(data.idealBlockNumber),'\n
\n
\n
',escape(a.showCodeHeader()),'
\n
\n
\n\n
\n\n'),e(),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],34:[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('\n\n\n \n Blockly\n \n \n \n\n\n
\n \n\n\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{ejs:42}],35:[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"),options.feedbackImage&&buf.push('\n \n'),buf.push('\n\n
\n\n')}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],36:[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 ',escape(a.numLinesOfCodeWritten({numLines:numLinesWritten})),'\n \n

\n\n"),0!==totalNumLinesWritten&&buf.push('\n

\n ',escape(a.totalNumLinesOfCodeWritten({numLines:totalNumLinesWritten})),"\n

\n"),buf.push("\n")}();return buf.join("")};return function(a){return t(a,require("ejs").filters)}}()},{"../../locale/en_us/common":40,ejs:42}],37:[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("

",escape(concept_name),"
\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;'}