Scenery Debug Snapshot'+this.getDebugHTML()+"";window.open("data:text/html;charset=utf-8,"+encodeURIComponent(t))},getAccessibleDebugHTML:function(){function t(i,r){e+=r+s((i.isRootInstance?"":i.node.tagName)+" "+i.toString())+"
",i.children.forEach(function(e){t(e,r+n)})}var e="",i="font-weight: bold; font-size: 120%; margin-top: 5px;",n="    ";e+='
Accessible Instances

',t(this._rootAccessibleInstance,""),e+='
Parallel DOM

';for(var r=this._rootAccessibleInstance.peer.primarySibling.outerHTML,a=(r=r.replace(/\>\\n<")).split("\n"),o="",l=0;l",u||(o+=n)}return e},foreignObjectRasterization:function(t){function i(t){t.id||(t.id="unknown-canvas-"+s++),r[t.id]=t.toDataURL()}function n(t){if(t.blocks)_.each(t.blocks,function(t){n(t)});else if(t.firstDrawable&&t.lastDrawable){for(var e=t.firstDrawable;e!==t.lastDrawable;e=e.nextDrawable)n(e);n(t.lastDrawable),t.canvas&&t.canvas instanceof window.HTMLCanvasElement&&i(t.canvas)}E.DOMDrawable&&t instanceof E.DOMDrawable&&(t.domElement instanceof window.HTMLCanvasElement&&i(t.domElement),Array.prototype.forEach.call(t.domElement.getElementsByTagName("canvas"),function(t){i(t)}))}var r={},s=0;n(this._rootBackbone);var a=document.implementation.createHTMLDocument("");a.documentElement.innerHTML=this.domElement.outerHTML,a.documentElement.setAttribute("xmlns",a.documentElement.namespaceURI);var o=a.documentElement.getElementsByTagName("canvas");o=Array.prototype.slice.call(o);for(var l=0;l
'+(new window.XMLSerializer).serializeToString(t)+"
",o=new window.Image;o.onload=function(){s.drawImage(o,0,0),n(r.toDataURL())},o.onerror=function(){n(null)};var l=new window.TextEncoderLite("utf-8").encode(a),h=window.fromByteArray(l);o.src="data:image/svg+xml;base64,"+h},set focus(t){if(window.phet&&phet.phetio&&phet.chipper.accessibility&&t)t.trail.lastNode();var e;this.focusProperty.value&&(e=this.focusedNode).focusChangedEmitter.emit(!1),this.focusProperty.value=t,t?t.trail.lastNode().focusChangedEmitter.emit(!0):e&&e.blur()},get focus(){return this.focusProperty.value},getFocusedNode:function(){var t=null,e=this.focusProperty.get();return e&&(t=e.trail.lastNode()),t},get focusedNode(){return this.getFocusedNode()}}),e.prototype.dispose=function(){this._input&&this.detachEvents(),this._rootNode.removeRootedDisplay(this),this._accessible&&this._rootAccessibleInstance.dispose()},e.customCursors={"scenery-grab-pointer":["grab","-moz-grab","-webkit-grab","pointer"],"scenery-grabbing-pointer":["grabbing","-moz-grabbing","-webkit-grabbing","pointer"]},e.focusProperty=new c(null,{tandem:p.generalTandem.createTandem("focusProperty"),phetioDocumentation:"Stores the current focus for the simulation, null if there is not focus. This is not updated based on mouse or touch input, only keyboard and other alternative inputs.",phetioType:d(O(A)),phetioState:!1,phetioReadOnly:!0}),e.userGestureEmitter=new r,e.keyStateTracker=new h,e.assertSubtreeDisposed=function(t){},e}),i("JOIST/Heartbeat",["require","JOIST/joist"],function(t){"use strict";var e=!1,i={start:function(t){e=!0;var i=document.createElement("div");i.style.opacity=0,i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width="0",i.style.height="0",i.style.clip="rect(0,0,0,0)",i.setAttribute("aria-hidden",!0),t.display.domElement.appendChild(i),t.frameStartedEmitter.addListener(function(){t.frameCounter%1e3==0&&(i.innerHTML=phet.joist.random.nextDouble())})}};return t("JOIST/joist").register("Heartbeat",i),i}),i("JOIST/Frame",["require","DOT/Bounds2","PHET_CORE/inherit","JOIST/joist","SCENERY/util/LinearGradient","SCENERY/nodes/Node","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t,e){e=_.extend({xMargin1:6,yMargin1:6,cornerRadius:0},e),a.call(this);var n=t.width+2*e.xMargin1,r=t.height+2*e.yMargin1;this.gradient=new s(0,0,n,0).addColorStop(0,"#fbff41").addColorStop(.1475,"#fef98b").addColorStop(.465,"#feff40").addColorStop(.77,"#fffccd").addColorStop(1,"#fbff41"),this.rectangle=new o(0,0,n,r,e.cornerRadius,e.cornerRadius,{stroke:this.gradient,lineWidth:3,x:t.x-e.xMargin1,y:t.y-e.yMargin1}),this.addChild(this.rectangle),this.mutate(e),this.frameWidth=n,this.frameHeight=r;var l=i.rect(this.rectangle.x,this.rectangle.y,this.frameWidth,this.frameHeight);this.highlightRectangle=o.bounds(l.dilated(.75),{stroke:"transparent",lineWidth:4.5}),this.addChild(this.highlightRectangle)}var i=t("DOT/Bounds2"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("SCENERY/util/LinearGradient"),a=t("SCENERY/nodes/Node"),o=t("SCENERY/nodes/Rectangle");return r.register("Frame",e),n(a,e,{setHighlighted:function(t){this.highlightRectangle.stroke=t?this.gradient:"transparent"}}),e}),i("JOIST/ScreenButton",["require","SCENERY/listeners/FireListener","JOIST/Frame","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","SCENERY_PHET/PhetColorScheme","SCENERY_PHET/PhetFont","TANDEM/PhetioObject","SCENERY/nodes/Rectangle","KITE/Shape","SCENERY/nodes/Text","SCENERY/input/Touch","DOT/Util","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,e,r,s,E,y){y=_.extend({showUnselectedHomeScreenIconFrame:!1,opacity:1,tandem:E,phetioEventType:h.EventType.USER,phetioDocumentation:"A pressable button in the simulation, in the home screen"},y);var v=e.screens[r],b=m.linear(2,4,.875,.5,e.screens.length);e.screens.length>=5&&(b=.4);var C=t?g:b*g,S=new a({opacity:y.opacity,children:[v.homeScreenIcon],scale:C/v.homeScreenIcon.height}),A=t?new n(S):new u(0,0,S.width,S.height,{stroke:y.showUnselectedHomeScreenIconFrame?o.SCREEN_ICON_FRAME:null,lineWidth:.7}),T=new a({opacity:y.opacity,children:[A,S]}),O=new d(v.name,{font:new l(t?42:18),fill:t?o.BUTTON_YELLOW:"gray",tandem:E.createTandem("text")});O.maxWidth=T.width,s.link(function(e){var i=e===r;A.setHighlighted&&A.setHighlighted(i),S.opacity=t||i?1:.5,O.fill=t||i?"white":"gray"}),f.call(this,{children:[T,O]});var N=new i({fireOnDown:!0,fire:t?function(){e.showHomeScreenProperty.value=!1,s.value=-1}:function(){e.screenIndexProperty.value=r},tandem:y.tandem.createTandem("inputListener")});this.addInputListener(N),this.addInputListener({click:function(){t&&N.fire()}}),this.addInputListener({focus:function(){!t&&N.fire()}}),this.addInputListener({focus:function(){s.value=r},blur:function(){s.value=-1}}),t||(this.highlightListener={over:function(t){s.value=r},out:function(t){s.value=-1}},this.addInputListener({over:function(t){t.pointer instanceof p&&(e.screenIndexProperty.value=r)}})),this.mouseArea=this.touchArea=c.bounds(this.bounds),this.disposeScreenButton=function(){s.unlink()},this.mutate(y)}var i=t("SCENERY/listeners/FireListener"),n=t("JOIST/Frame"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),a=t("SCENERY/nodes/Node"),o=t("SCENERY_PHET/PhetColorScheme"),l=t("SCENERY_PHET/PhetFont"),h=t("TANDEM/PhetioObject"),u=t("SCENERY/nodes/Rectangle"),c=t("KITE/Shape"),d=t("SCENERY/nodes/Text"),p=t("SCENERY/input/Touch"),m=t("DOT/Util"),f=t("SCENERY/nodes/VBox"),g=140;return s.register("ScreenButton",e),r(f,e,{dispose:function(){this.disposeScreenButton(),f.prototype.dispose.call(this)}})}),i("JOIST/HomeScreenView",["require","DOT/Bounds2","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","AXON/Property","JOIST/ScreenButton","JOIST/ScreenView","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e,i){var r=this;i=_.extend({warningNode:null},i),c.call(this,{layoutBounds:E,tandem:e,labelContent:t.name,descriptionContent:d.fillIn(g,{name:t.name,screens:t.screens.length})});var s=new p(t.name,{font:new l({size:52,family:y}),fill:"white",y:130,tandem:e.createTandem("title")});this.addChild(s),s.scale(Math.min(1,.9*this.layoutBounds.width/s.width)),s.centerX=this.layoutBounds.centerX;var a=new h(-1),v=_.map(t.screens,function(i,n){var r=e.createTandem(i.screenTandem.tail+"LargeButton"),s={tagName:"button",innerContent:i.name,descriptionContent:i.descriptionContent,appendDescription:!0,containerTagName:"li"},o=new u(!0,t,n,a,r,_.extend(s,{resize:!1,cursor:"pointer"})),l=e.createTandem(i.screenTandem.tail+"SmallButton"),h=new u(!1,t,n,a,l,_.extend(s,{spacing:3,cursor:"pointer",showUnselectedHomeScreenIconFrame:i.showUnselectedHomeScreenIconFrame}));h.addInputListener(h.highlightListener),o.addInputListener(h.highlightListener);var c=function(){h.visible&&h.focus(),o.visible&&o.focus()};return h.addInputListener({focus:c}),o.addInputListener({click:c}),h.setAccessibleAttribute("aria-roledescription",f),o.setAccessibleAttribute("aria-roledescription",f),{screen:i,small:h,large:o,index:n}}),b=new o({tagName:"nav",ariaLabel:m}),C=new o({tagName:"ol"});b.addChild(C),this.addChild(b);var S=60;4===t.screens.length&&(S=33),t.screens.length>=5&&(S=20);var A=null;if(this.highlightedScreenButton=null,t.screenIndexProperty.link(function(t){A&&(A.removeAllChildren(),C.removeChild(A));var e=_.map(v,function(e){return e.index===t&&(r.highlightedScreenButton=e.large),e.index===t?e.large:e.small});A=new n({spacing:S,children:e,align:"top",resize:!1,maxWidth:r.layoutBounds.width-118}),C.addChild(A),C.centerX=r.layoutBounds.width/2,C.top=r.layoutBounds.height/3+20}),i.warningNode){var T=i.warningNode;this.addChild(T),T.centerX=this.layoutBounds.centerX,T.bottom=this.layoutBounds.maxY-2}}var i=t("DOT/Bounds2"),n=t("SCENERY/nodes/HBox"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),a=t("JOIST/JoistA11yStrings"),o=t("SCENERY/nodes/Node"),l=t("SCENERY_PHET/PhetFont"),h=t("AXON/Property"),u=t("JOIST/ScreenButton"),c=t("JOIST/ScreenView"),d=t("PHETCOMMON/util/StringUtils"),p=t("SCENERY/nodes/Text"),m=a.simScreens.value,f=a.simScreen.value,g=a.homeScreenDescriptionPattern.value,E=new i(0,0,768,504),y="Century Gothic, Futura";return s.register("HomeScreenView",e),r(c,e,{focusHighlightedScreenButton:function(){this.highlightedScreenButton.focus()}},{TITLE_FONT_FAMILY:y,LAYOUT_BOUNDS:E})}),i("JOIST/HomeScreen",["require","JOIST/HomeScreenView","PHET_CORE/inherit","JOIST/joist","AXON/Property","JOIST/Screen"],function(t){"use strict";function e(t,e,n){(n=_.extend({backgroundColorProperty:new s(o)},n)).tandem=e,a.call(this,function(){return{}},function(){return new i(t,e.createTandem("view"),_.pick(n,["warningNode"]))},n)}var i=t("JOIST/HomeScreenView"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("AXON/Property"),a=t("JOIST/Screen"),o="black";return r.register("HomeScreen",e),n(a,e,{},{BACKGROUND_COLOR:o})}),i("SCENERY/input/InputFuzzer",["require","PHET_CORE/inherit","DOT/Random","SCENERY/scenery","DOT/Vector2"],function(t){"use strict";function e(t,e){var i=this;this.display=t,this.touches=[],this.nextTouchID=1,this.isMouseDown=!1,this.mousePosition=new s(0,0),this.random=new n({seed:e}),this.mouseToggleAction=function(){i.mouseToggle()},this.mouseMoveAction=function(){i.mouseMove()},this.touchStartAction=function(){var t=i.createTouch(i.getRandomPosition());i.touchStart(t)},this.touchMoveAction=function(){var t=i.random.sample(i.touches);i.touchMove(t)},this.touchEndAction=function(){var t=i.random.sample(i.touches);i.touchEnd(t),i.removeTouch(t)},this.touchCancelAction=function(){var t=i.random.sample(i.touches);i.touchCancel(t),i.removeTouch(t)}}var i=t("PHET_CORE/inherit"),n=t("DOT/Random"),r=t("SCENERY/scenery"),s=t("DOT/Vector2");return r.register("InputFuzzer",e),i(Object,e,{fuzzEvents:function(t,e,i,n){for(;this.random.nextDouble()<1-1/(t+1);){var r=this.touches.length+(this.isMouseDown?1:0)=this.windowSize},updateRunningAverage:function(t){return this.numSamples=Math.min(this.windowSize,this.numSamples+1),this.total-=this.samples[this.sampleIndex],this.total+=t,this.samples[this.sampleIndex]=t,this.sampleIndex=(this.sampleIndex+1)%this.windowSize,this.getRunningAverage()}})}),i("JOIST/MemoryMonitor",["require","JOIST/joist","DOT/RunningAverage"],function(t){"use strict";var e=t("JOIST/joist"),i=t("DOT/RunningAverage"),n=1048576,r=!1,s=function(){function t(e){_classCallCheck(this,t),e=_.extend({windowSize:2e3,memoryLimit:phet.chipper.queryParameters.memoryLimit},e),this.memoryLimit=e.memoryLimit*n,this.runningAverage=new i(e.windowSize),this.lastMemory=0}return _createClass(t,[{key:"measure",value:function(){if(window.performance&&window.performance.memory&&window.performance.memory.usedJSHeapSize){var e=window.performance.memory.usedJSHeapSize;this.lastMemory=e;var i=this.runningAverage.updateRunningAverage(e);if(this.memoryLimit&&this.runningAverage.isSaturated()&&!r&&i>this.memoryLimit&&e>.5*this.memoryLimit)throw r=!0,new Error("Average memory used ("+t.memoryString(i)+") is above our memoryLimit ("+t.memoryString(this.memoryLimit)+"). Current memory: "+t.memoryString(e)+".")}}}],[{key:"memoryString",value:function(t){return Math.ceil(t/n)+"MB"}}]),t}();return e.register("MemoryMonitor",s)}),i("JOIST/HighlightNode",["require","SCENERY/util/Color","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","SCENERY/util/LinearGradient","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t,e,r){var s=(r=_.extend({fill:"white",highlightWidth:1,pickable:!1},r)).fill,l=i.toColor(s).withAlpha(0),h={fill:new a(0,0,0,e).addColorStop(0,l).addColorStop(.5,s).addColorStop(1,l)},u=new o(0,0,r.highlightWidth,e,h),c=new o(0,0,r.highlightWidth,e,h);r.children=[u,c],r.spacing=t,n.call(this,r)}var i=t("SCENERY/util/Color"),n=t("SCENERY/nodes/HBox"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),a=t("SCENERY/util/LinearGradient"),o=t("SCENERY/nodes/Rectangle");return s.register("HighlightNode",e),r(n,e)}),i("JOIST/JoistButton",["require","SUN/buttons/ButtonInteractionState","SCENERY/accessibility/FocusHighlightPath","JOIST/HighlightNode","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","AXON/Property","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","KITE/Shape"],function(t){"use strict";function e(t,e,s,a){(a=_.extend({cursor:"pointer",listener:null,highlightExtensionWidth:0,highlightExtensionHeight:0,highlightCenterOffsetX:0,highlightCenterOffsetY:0},a)).tandem=s,this.buttonModel=new u(a);var d=function(e){return new r(t.width+a.highlightExtensionWidth,t.height+a.highlightExtensionHeight,{centerX:t.centerX+a.highlightCenterOffsetX,centerY:t.centerY+a.highlightCenterOffsetY,fill:e,pickable:!1})},p=d("white"),m=d("black");o.call(this,_.extend({children:[t,p,m]}));var f=new h(this.buttonModel);this.interactionStateProperty=f,l.multilink([f,e],function(t,e){var n="black"!==e;p.visible=!n&&(t===i.OVER||t===i.PRESSED),m.visible=n&&(t===i.OVER||t===i.PRESSED)});var g=this.buttonModel.createListener({tandem:s.createTandem("pressListener")});this.addInputListener(g),this.mouseArea=this.touchArea=c.bounds(this.bounds),this.mutate(a);var E=n.getOuterLineWidthFromNode(this);this.focusHighlight=c.bounds(this.bounds.shiftedY(-E))}var i=t("SUN/buttons/ButtonInteractionState"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),a=t("JOIST/joist"),o=t("SCENERY/nodes/Node"),l=t("AXON/Property"),h=t("SUN/buttons/PushButtonInteractionStateProperty"),u=t("SUN/buttons/PushButtonModel"),c=t("KITE/Shape");return a.register("JoistButton",e),s(o,e)}),i("SUN/DialogIO",["require","SCENERY/nodes/NodeIO","TANDEM/phetioInherit","SUN/sun"],function(t){"use strict";function e(t,e){i.call(this,t,e)}var i=t("SCENERY/nodes/NodeIO"),n=t("TANDEM/phetioInherit"),r=t("SUN/sun");return n(i,"DialogIO",e,{},{documentation:"A dialog panel",validator:{isValidValue:function(t){return t instanceof phet.sun.Dialog}}}),r.register("DialogIO",e),e}),i("SUN/SunA11yStrings",["require","SUN/sun"],function(t){"use strict";var e=t("SUN/sun"),i={accordionBoxCollapse:{value:"Collapse"},accordionBoxExpand:{value:"Expand"},close:{value:"Close"}};if("xss"===phet.chipper.queryParameters.stringTest)for(var n in i)i[n].value+='';return e.register("SunA11yStrings",i),i}),i("SUN/Dialog",["require","SCENERY/accessibility/AccessibilityUtil","SCENERY/accessibility/AccessiblePeer","SCENERY/nodes/AlignBox","AXON/BooleanProperty","SUN/DialogIO","SCENERY/display/Display","SCENERY/util/FullScreen","SCENERY/nodes/HBox","PHET_CORE/inherit","SCENERY/accessibility/KeyboardUtil","SUN/Panel","SCENERY/nodes/Path","AXON/Property","SUN/buttons/RectangularButtonView","SUN/buttons/RectangularPushButton","KITE/Shape","SUN/sun","SUN/SunA11yStrings","TANDEM/Tandem","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,c){var m=this;(c=_.extend({xSpacing:10,ySpacing:10,topMargin:15,bottomMargin:15,leftMargin:null,closeButtonTopMargin:10,closeButtonRightMargin:10,modal:!0,title:null,titleAlign:"center",layoutStrategy:e.DEFAULT_LAYOUT_STRATEGY,closeButtonListener:function(){return m.hide()},closeButtonTouchAreaXDilation:0,closeButtonTouchAreaYDilation:0,closeButtonMouseAreaXDilation:0,closeButtonMouseAreaYDilation:0,showCallback:null,hideCallback:null,cornerRadius:10,resize:!0,fill:"white",stroke:"black",backgroundPickable:!0,tandem:C.optional,phetioType:o,phetioReadOnly:!1,phetioState:!1,tagName:"div",ariaRole:"dialog",focusOnCloseNode:null,addAriaLabelledByFromTitle:!0},c)).tandem=C.optional,c.xMargin=0,c.yMargin=0,null===c.leftMargin&&(c.leftMargin=c.xSpacing+T+c.closeButtonRightMargin),this.isModal=c.modal,this.showCallback=c.showCallback,this.hideCallback=c.hideCallback,this.isShowingProperty=new a(!1,{tandem:c.tandem.createTandem("isShowingProperty"),phetioReadOnly:!0,phetioState:c.phetioState});var g=new i({iconLength:T,listener:function(){c.closeButtonListener(),g.buttonModel.isA11yClicking()&&m.focusActiveElement()},tandem:c.tandem.createTandem("closeButton"),phetioReadOnly:c.phetioReadOnly,phetioState:c.phetioState,tagName:"button",innerContent:A});g.touchArea=g.bounds.dilatedXY(c.closeButtonTouchAreaXDilation,c.closeButtonTouchAreaYDilation),g.mouseArea=g.bounds.dilatedXY(c.closeButtonMouseAreaXDilation,c.closeButtonMouseAreaYDilation),this.closeButton=g;var E=new S({children:c.title?[c.title,t]:[t],spacing:c.ySpacing,align:c.titleAlign}),y=new s(E,{topMargin:c.topMargin,bottomMargin:c.bottomMargin,leftMargin:c.leftMargin}),v=new s(g,{topMargin:c.closeButtonTopMargin,rightMargin:c.closeButtonRightMargin}),b=new u({children:[y,v],spacing:c.xSpacing,align:"top"});p.call(this,b,c);var O=window.phet.joist.sim;this.updateLayoutMultilink=f.multilink([O.boundsProperty,O.screenBoundsProperty,O.scaleProperty],function(t,e,i){t&&e&&i&&c.layoutStrategy(m,t,e,i)}),this.sim=O,this.accessibleOrder=[g,c.title,t].filter(function(t){return void 0!==t}),c.title&&c.title.tagName&&c.addAriaLabelledByFromTitle&&this.addAriaLabelledbyAssociation({thisElementName:r.PRIMARY_SIBLING,otherNode:c.title,otherElementName:r.PRIMARY_SIBLING}),this.activeElement=c.focusOnCloseNode||null;var N={keydown:function(t){var e=t.domEvent;if(e.keyCode===d.KEY_ESCAPE)e.preventDefault(),m.hide(),m.focusActiveElement();else if(e.keyCode===d.KEY_TAB&&h.isFullScreen()){var i=l.focus.trail.getUniqueId(),r=n.getNextFocusable().id===i,s=n.getPreviousFocusable().id===i;r&&s&&e.preventDefault()}}};this.addInputListener(N),this.disposeDialog=function(){m.updateLayoutMultilink.dispose(),m.removeInputListener(N),m.isShowingProperty.dispose(),g.dispose(),b.removeAllChildren(),b.detach()}}function i(t){t=_.extend({iconLength:7,baseColor:"transparent",buttonAppearanceStrategy:g.FlatAppearanceStrategy,xMargin:0,yMargin:0,listener:null},t);var e=(new y).moveTo(-t.iconLength/2,-t.iconLength/2).lineTo(t.iconLength/2,t.iconLength/2).moveTo(t.iconLength/2,-t.iconLength/2).lineTo(-t.iconLength/2,t.iconLength/2);t.content=new m(e,{stroke:"black",lineCap:"round",lineWidth:2}),E.call(this,t)}var n=t("SCENERY/accessibility/AccessibilityUtil"),r=t("SCENERY/accessibility/AccessiblePeer"),s=t("SCENERY/nodes/AlignBox"),a=t("AXON/BooleanProperty"),o=t("SUN/DialogIO"),l=t("SCENERY/display/Display"),h=t("SCENERY/util/FullScreen"),u=t("SCENERY/nodes/HBox"),c=t("PHET_CORE/inherit"),d=t("SCENERY/accessibility/KeyboardUtil"),p=t("SUN/Panel"),m=t("SCENERY/nodes/Path"),f=t("AXON/Property"),g=t("SUN/buttons/RectangularButtonView"),E=t("SUN/buttons/RectangularPushButton"),y=t("KITE/Shape"),v=t("SUN/sun"),b=t("SUN/SunA11yStrings"),C=t("TANDEM/Tandem"),S=t("SCENERY/nodes/VBox"),A=b.close.value,T=14;return v.register("Dialog",e),e.DEFAULT_LAYOUT_STRATEGY=function(t,e,i,n){t.center=e.center.times(1/n)},c(p,e,{show:function(){this.isShowingProperty.value||(window.phet.joist.sim.showPopup(this,this.isModal),this.isShowingProperty.value=!0,this.activeElement=this.activeElement||l.focusedNode,this.sim.setAccessibleViewsVisible(!1),this.showCallback&&this.showCallback())},hide:function(){this.isShowingProperty.value&&(window.phet.joist.sim.hidePopup(this,this.isModal),this.isShowingProperty.value=!1,this.sim.setAccessibleViewsVisible(!0),this.hideCallback&&this.hideCallback())},dispose:function(){this.hide(),this.disposeDialog(),p.prototype.dispose.call(this)},focusActiveElement:function(){this.activeElement&&this.activeElement.focus()},focusCloseButton:function(){this.closeButton.focus()}}),c(E,i),e}),i("SCENERY_PHET/keyboard/KeyNode",["require","SCENERY/nodes/AlignBox","DOT/Bounds2","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){var r=1,l=(e=_.extend({},o,e)).keyHeight-e.yPadding;t.height>l&&(r=l/t.height);var h=new s({children:[t],scale:r}),u=Math.max(e.minKeyWidth,h.width+e.xPadding);if(e.forceSquareKey){var c=e.minKeyWidth-e.xPadding,d=1;t.width>c&&(d=c/t.width),h=new s({children:[h],scale:d}),u=e.keyHeight}var p=new i(h,{alignBounds:new n(0,0,u,e.keyHeight),xAlign:e.xAlign,yAlign:e.yAlign,xMargin:e.xMargin,yMargin:e.yMargin});e.children=[a.roundedBounds(p.bounds.shifted(e.xShadowOffset,e.yShadowOffset),e.cornerRadius,e.cornerRadius,{fill:e.keyShadowFill}),a.roundedBounds(p.bounds,e.cornerRadius,e.cornerRadius,{fill:e.keyFill,stroke:"black",lineWidth:e.lineWidth}),p],s.call(this,e)}var i=t("SCENERY/nodes/AlignBox"),n=t("DOT/Bounds2"),r=t("PHET_CORE/inherit"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Rectangle"),o={keyFill:"white",keyShadowFill:"black",lineWidth:1,cornerRadius:2,xShadowOffset:1.3,yShadowOffset:1.3,xMargin:0,yMargin:0,xAlign:"center",yAlign:"center",xPadding:3,yPadding:3,minKeyWidth:17,keyHeight:17,forceSquareKey:!1};return t("SCENERY_PHET/sceneryPhet").register("KeyNode",e),r(s,e)}),i("SCENERY_PHET/keyboard/ArrowKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/keyboard/KeyNode","SCENERY/nodes/Path","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t,e){var i=(e=_.extend({arrowFill:"black",arrowStroke:"black",arrowLineJoin:"round",arrowLineWidth:3,arrowHeight:o,arrowWidth:l,yPadding:10,forceSquareKey:!0},e)).arrowHeight,s=e.arrowWidth,u=e.arrowLineJoin,c=e.arrowLineWidth,d=e.arrowFill,p=e.arrowStroke,m=new a;m.moveTo(i/2,0).lineTo(i,s+0).lineTo(0,s+0).close();var f=new r(m,{fill:d,stroke:p,lineJoin:u,lineWidth:c,rotation:h[t]});n.call(this,f,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/keyboard/KeyNode"),r=t("SCENERY/nodes/Path"),s=t("SCENERY_PHET/sceneryPhet"),a=t("KITE/Shape"),o=10,l=.6*Math.sqrt(3)*o,h={up:0,down:Math.PI,left:-Math.PI/2,right:Math.PI/2};return s.register("ArrowKeyNode",e),i(n,e)}),i("SCENERY_PHET/keyboard/TextKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/keyboard/KeyNode","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){e=_.extend({font:new r({size:12}),fill:"black",textMaxWidth:35,xPadding:8},e);var i=new s(t,{font:e.font,fill:e.fill,maxWidth:e.textMaxWidth});n.call(this,i,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/keyboard/KeyNode"),r=t("SCENERY_PHET/PhetFont"),s=t("SCENERY/nodes/RichText");return t("SCENERY_PHET/sceneryPhet").register("TextKeyNode",e),i(n,e)}),i("string!SCENERY_PHET/key.enter",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.enter")}),i("SCENERY_PHET/keyboard/EnterKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.enter"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.enter");return n.register("EnterKeyNode",e),i(r,e)}),i("SCENERY_PHET/keyboard/LetterKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode"],function(t){"use strict";function e(t,e){e=_.extend({xPadding:5,forceSquareKey:!0},e),r.call(this,t,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode");return n.register("LetterKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/key.pageDown",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.pageDown")}),i("SCENERY_PHET/keyboard/PageDownKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.pageDown"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.pageDown");return n.register("PageDownKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/key.pageUp",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.pageUp")}),i("SCENERY_PHET/keyboard/PageUpKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.pageUp"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.pageUp");return n.register("PageUpKeyNode",e),i(r,e)}),i("SCENERY_PHET/PlusNode",["require","DOT/Dimension2","PHET_CORE/inherit","SCENERY/nodes/Path","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t){var e=(t=_.extend({size:new i(20,5),fill:"black"},t)).size.width/2-t.size.height/2,n=t.size.width/2+t.size.height/2,s=(new a).moveTo(e,0).lineTo(n,0).lineTo(n,e).lineTo(t.size.width,e).lineTo(t.size.width,n).lineTo(n,n).lineTo(n,t.size.width).lineTo(e,t.size.width).lineTo(e,n).lineTo(0,n).lineTo(0,e).lineTo(e,e).close();r.call(this,s,t)}var i=t("DOT/Dimension2"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Path"),s=t("SCENERY_PHET/sceneryPhet"),a=t("KITE/Shape");return s.register("PlusNode",e),n(r,e)}),i("string!SCENERY_PHET/key.shift",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.shift")}),i("SCENERY_PHET/keyboard/ShiftKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.shift"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.shift");return n.register("ShiftKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/key.space",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.space")}),i("SCENERY_PHET/keyboard/SpaceKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.space"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.space");return n.register("SpaceKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseHeadingPattern",function(){return window.phet.chipper.strings.get("SCENERY_PHET/keyboardHelpDialog.grabOrReleaseHeadingPattern")}),i("string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseLabelPattern",function(){return window.phet.chipper.strings.get("SCENERY_PHET/keyboardHelpDialog.grabOrReleaseLabelPattern")}),i("string!SCENERY_PHET/keyboardHelpDialog.or",function(){return window.phet.chipper.strings.get("SCENERY_PHET/keyboardHelpDialog.or")}),i("SCENERY_PHET/keyboard/help/KeyboardHelpSection",["require","SCENERY/nodes/AlignGroup","SCENERY_PHET/keyboard/ArrowKeyNode","DOT/Dimension2","SCENERY_PHET/keyboard/EnterKeyNode","SCENERY/nodes/HBox","PHET_CORE/inherit","SCENERY_PHET/keyboard/LetterKeyNode","SCENERY_PHET/keyboard/PageDownKeyNode","SCENERY_PHET/keyboard/PageUpKeyNode","SCENERY_PHET/PhetFont","SCENERY_PHET/PlusNode","SCENERY_PHET/sceneryPhet","SCENERY_PHET/SceneryPhetA11yStrings","SCENERY_PHET/keyboard/ShiftKeyNode","SCENERY_PHET/keyboard/SpaceKeyNode","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","SCENERY/nodes/RichText","SCENERY/nodes/VBox","string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseHeadingPattern","string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseLabelPattern","string!SCENERY_PHET/keyboardHelpDialog.or"],function(t){"use strict";function e(t,e,i){i=_.extend({headingContentSpacing:O,headingFont:N,headingMaxWidth:x,labelMaxWidth:M,align:P,a11yContentTagName:"ul"},i);for(var n=new y(t,{font:i.headingFont,maxWidth:i.headingMaxWidth,tagName:"h2",innerContent:t}),r=[],s=[],o=0;o0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("mipmap!JOIST/keyboard-icon-on-white.png",function(){var t=window.phet.chipper.mipmaps["JOIST/keyboard-icon-on-white.png"];return window.phetImages=window.phetImages||[],t.forEach(function(t){t.img=new Image,window.phetImages.push(t.img),t.img.src=t.url,t.canvas=document.createElement("canvas"),t.canvas.width=t.width,t.canvas.height=t.height;var e=t.canvas.getContext("2d");t.updateCanvas=function(){t.img.complete&&(void 0===t.img.naturalWidth||t.img.naturalWidth>0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("JOIST/KeyboardHelpButton",["require","SCENERY/nodes/Image","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","JOIST/KeyboardHelpDialog","mipmap!JOIST/keyboard-icon.png","mipmap!JOIST/keyboard-icon-on-white.png"],function(t){"use strict";function e(t,e,n,r){var s=this,d=null;(r=_.extend({highlightExtensionWidth:5,highlightExtensionHeight:10,highlightCenterOffsetY:2,tagName:"button",innerContent:u},r)).listener=function(){d||(d=new o(t,{focusOnCloseNode:s,tandem:n.createTandem("keyboardHelpDialog")})),d.show(),s.buttonModel.isA11yClicking()&&d.focusCloseButton()};var p=new i(l,{scale:c,pickable:!1});a.call(this,p,e,n,r),e.link(function(t){p.image="black"===t?l:h})}var i=t("SCENERY/nodes/Image"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),a=t("JOIST/JoistButton"),o=t("JOIST/KeyboardHelpDialog"),l=t("mipmap!JOIST/keyboard-icon.png"),h=t("mipmap!JOIST/keyboard-icon-on-white.png"),u=s.hotKeysAndHelp.value,c=.3/l[0].height*67;return r.register("KeyboardHelpButton",e),n(a,e)}),i("JOIST/NavigationBarSoundToggleButton",["require","SCENERY_PHET/accessibility/ActivationUtterance","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY/nodes/Rectangle","KITE/Shape","SUN/ToggleNode","SCENERY_PHET/accessibility/utteranceQueue","DOT/Vector2"],function(t){"use strict";function e(t,e,n,r){var s=this;r=_.extend({highlightExtensionWidth:5,highlightExtensionHeight:10,highlightCenterOffsetY:0,listener:function(){t.set(!t.get())},tagName:"button",innerContent:m},r);var P=new o,x=new o,I=new h(0,0,y,E,{fill:"transparent"});P.addChild(I),x.addChild(I);var L=new l((new u).moveTo(b,0).lineTo(C,A).lineTo(T,A).arc(T,A+T,T,1.5*Math.PI,Math.PI,!0).lineToRelative(0,S-2*T).arc(T,A+S-T,T,Math.PI,.5*Math.PI,!0).lineToRelative(C-T,0).lineTo(b,v).lineTo(b,0).close(),{stroke:"black",lineWidth:1.5,lineJoin:"round",centerY:x.centerY,left:0});P.addChild(L),x.addChild(L);var k=new l((new u).moveTo(0,0).lineTo(O,O).moveTo(0,O).lineTo(O,0),{stroke:"black",lineWidth:1.7,lineCap:"round",right:x.width,centerY:x.centerY});x.addChild(k);var Y=new l((new u).arc(0,0,N,D,M,!0).moveToPoint(new p(w,0).rotated(D)).arc(0,0,w,D,M,!0).moveToPoint(new p(R,0).rotated(D)).arc(0,0,R,D,M,!0),{stroke:"black",lineWidth:1.7,lineCap:"round",right:P.width,centerY:P.centerY});P.addChild(Y);var B=new c(t,[{value:!0,node:P},{value:!1,node:x}],{maxHeight:E});a.call(this,B,e,n,r);var H=new i;t.lazyLink(function(t){s.setAccessibleAttribute("aria-pressed",!t),H.alert=t?f:g,d.addToBack(H)}),this.setAccessibleAttribute("aria-pressed",!t.get()),e.link(function(t){var e="black"===t?"white":"black";L.stroke=e,k.stroke=e,Y.stroke=e})}var i=t("SCENERY_PHET/accessibility/ActivationUtterance"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),a=t("JOIST/JoistButton"),o=t("SCENERY/nodes/Node"),l=t("SCENERY/nodes/Path"),h=t("SCENERY/nodes/Rectangle"),u=t("KITE/Shape"),c=t("SUN/ToggleNode"),d=t("SCENERY_PHET/accessibility/utteranceQueue"),p=t("DOT/Vector2"),m=s.soundOnOffButton.value,f=s.simSoundOnString.value,g=s.simSoundOffString.value,E=22,y=1.13*E,v=.77*E,b=.58*v,C=.46*b,S=.35*v,A=(v-S)/2,T=1,O=.52*v,N=.63*v,P=.23*v,w=N-P,R=w-P,D=Math.PI/2.7,M=-1*D;return r.register("NavigationBarSoundToggleButton",e),n(a,e)}),i("TAMBO/tambo",["require","PHET_CORE/Namespace"],function(t){"use strict";return new(t("PHET_CORE/Namespace"))("tambo")}),i("TAMBO/audioContextStateChangeMonitor",["require","TAMBO/tambo"],function(t){"use strict";var e=[],i=[],n={addStateChangeListener:function(t,n){var r=e.indexOf(t),s=void 0;-1===r?(e.push(t),r=e.length-1,s=[],i.push(s),t.onstatechange=function(){_.clone(s).forEach(function(e){e(t.state)})}):s=i[r],s.push(n)},removeStateChangeListener:function(t,n){var r=e.indexOf(t),s=i[r],a=s.indexOf(n);s.splice(a,1)},hasListener:function(t,n){var r=!1,s=e.indexOf(t);if(s>=0){var a=i[s];a&&(r=a.indexOf(n)>=0)}return r}};return t("TAMBO/tambo").register("audioContextStateChangeMonitor",n),n}),i("SCENERY/util/DisplayedProperty",["require","AXON/BooleanProperty","SCENERY/scenery"],function(t){"use strict";var e=t("AXON/BooleanProperty"),i=t("SCENERY/scenery"),n=function(t){function i(t,e,n){_classCallCheck(this,i);var r=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,!1,n));r.node=t,r.display=e,r.updateListener=r.updateValue.bind(r),r.addedInstancelistener=r.addedInstance.bind(r),r.removedInstancelistener=r.removedInstance.bind(r),t.onStatic("addedInstance",r.addedInstancelistener),t.onStatic("removedInstance",r.removedInstancelistener);for(var s=t.instances,a=0;a=0?t.url.lastIndexOf("?"):t.url.length):t.base64.slice(t.base64.indexOf(":")+1,t.base64.indexOf(";")),i.canPlayType&&i.canPlayType(s))if(t.url){var a=new XMLHttpRequest;a.open("GET",t.url,!0),a.responseType="arraybuffer",a.onload=function(){e.decodeAudioData(a.response,n,r)},a.onerror=function(e){console.error("unable to obtain sound data, url = "+t.url+", err = "+e)},a.send()}else{for(var o=t.base64.replace(new RegExp("^.*,"),""),l=atob(o),h=new Uint8Array(l.length),u=0;uS.maxButtonWidth?(R.maxWidth=T.maxWidth=S.maxButtonWidth-(this.width-D.width),M.setRect(0,0,D.width,M.height),M.center=D.center,I.spacing=L.spacing=M.width+2*v,I.center=L.center=D.center):R.maxWidth=this.width,this.setAccessibleAttribute("aria-roledescription",b);var k=n.getOuterLineWidthFromNode(this);this.focusHighlight=m.bounds(this.bounds.setMinY(this.bounds.minY-k/2)),this.mutate(S)}var i=t("AXON/DerivedProperty"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),a=t("JOIST/joist"),o=t("JOIST/JoistA11yStrings"),l=t("SCENERY/nodes/Node"),h=t("SCENERY_PHET/PhetColorScheme"),u=t("SCENERY_PHET/PhetFont"),c=t("AXON/Property"),d=t("SUN/buttons/PushButtonModel"),p=t("SCENERY/nodes/Rectangle"),m=t("KITE/Shape"),f=t("PHETCOMMON/util/StringUtils"),g=t("TANDEM/Tandem"),E=t("SCENERY/nodes/Text"),y=(t("DOT/Util"),t("SCENERY/nodes/VBox")),v=4,b=o.simScreen.value,C=o.screenNumberPattern.value;return a.register("NavigationBarScreenButton",e),s(l,e)}),i("JOIST/KebabMenuIcon",["require","JOIST/joist","SCENERY/nodes/Path","KITE/Shape"],function(t){"use strict";var e=t("JOIST/joist"),i=t("SCENERY/nodes/Path"),n=t("KITE/Shape"),r=2.5,s=function(t){function e(t){_classCallCheck(this,e);for(var i=new n,s=0;s<3;s++)i.circle(0,3.543*s*r,r);return _possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,i,t))}return _inherits(e,i),e}();return e.register("KebabMenuIcon",s)}),i("JOIST/PhetButtonIO",["require","TANDEM/types/BooleanIO","JOIST/joist","SCENERY/util/NodeProperty","TANDEM/types/NullableIO","TANDEM/types/ObjectIO","TANDEM/phetioInherit","AXON/PropertyIO"],function(t){"use strict";function e(t,e){a.call(this,t,e);var n=new r(t,"pickability","pickable",{phetioReadOnly:t.phetioReadOnly,tandem:t.tandem.createTandem("pickableProperty"),phetioType:l(s(i)),phetioDocumentation:"Set whether the phetButton will be pickable (and hence interactive), see the NodeIO documentation for more details"});this.disposePhetButtonIO=function(){n.dispose()}}var i=t("TANDEM/types/BooleanIO"),n=t("JOIST/joist"),r=t("SCENERY/util/NodeProperty"),s=t("TANDEM/types/NullableIO"),a=t("TANDEM/types/ObjectIO"),o=t("TANDEM/phetioInherit"),l=t("AXON/PropertyIO");o(a,"PhetButtonIO",e,{dispose:function(){this.disposePhetButtonIO()}},{documentation:"The PhET Button in the bottom right of the screen",validator:{isValidValue:function(t){return t instanceof phet.joist.PhetButton}},toStateObject:function(){},fromStateObject:function(t){return t}}),n.register("PhetButtonIO",e);return function t(){_classCallCheck(this,t)}.hello="true",e}),i("string!JOIST/credits.contributors",function(){return window.phet.chipper.strings.get("JOIST/credits.contributors")}),i("string!JOIST/credits.graphicArts",function(){return window.phet.chipper.strings.get("JOIST/credits.graphicArts")}),i("string!JOIST/credits.leadDesign",function(){return window.phet.chipper.strings.get("JOIST/credits.leadDesign")}),i("string!JOIST/credits.qualityAssurance",function(){return window.phet.chipper.strings.get("JOIST/credits.qualityAssurance")}),i("string!JOIST/credits.softwareDevelopment",function(){return window.phet.chipper.strings.get("JOIST/credits.softwareDevelopment")}),i("string!JOIST/credits.soundDesign",function(){return window.phet.chipper.strings.get("JOIST/credits.soundDesign")}),i("string!JOIST/credits.team",function(){return window.phet.chipper.strings.get("JOIST/credits.team")}),i("string!JOIST/credits.thanks",function(){return window.phet.chipper.strings.get("JOIST/credits.thanks")}),i("string!JOIST/credits.title",function(){return window.phet.chipper.strings.get("JOIST/credits.title")}),i("string!JOIST/credits.translation",function(){return window.phet.chipper.strings.get("JOIST/credits.translation")}),i("JOIST/CreditsNode",["require","PHET_CORE/inherit","JOIST/joist","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","SCENERY/nodes/VBox","SCENERY/nodes/VStrut","string!JOIST/credits.contributors","string!JOIST/credits.graphicArts","string!JOIST/credits.leadDesign","string!JOIST/credits.qualityAssurance","string!JOIST/credits.softwareDevelopment","string!JOIST/credits.soundDesign","string!JOIST/credits.team","string!JOIST/credits.thanks","string!JOIST/credits.title","string!JOIST/credits.translation"],function(t){"use strict";function e(t,e){e=_.extend({align:"left",spacing:1,maxWidth:550},e);var i=new r({size:14,weight:"bold"}),n={font:new r(12),align:"left",lineWrap:e.maxWidth,tagName:"p"},b=[];if(b.push(new o(y,{font:i,tagName:"h2",innerContent:y})),t.leadDesign){var C=a.format(d,"‪"+t.leadDesign+"‬");b.push(new s(C,_.extend({innerContent:C},n)))}if(t.softwareDevelopment){var S=a.format(m,"‪"+t.softwareDevelopment+"‬");b.push(new s(S,_.extend({innerContent:S},n)))}if(t.team){var A=a.format(g,"‪"+t.team+"‬");b.push(new s(A,_.extend({innerContent:A},n)))}if(t.contributors){var T=a.format(u,"‪"+t.contributors+"‬");b.push(new s(T,_.extend({innerContent:T},n)))}if(t.qualityAssurance){var O=a.format(p,"‪"+t.qualityAssurance+"‬");b.push(new s(O,_.extend({innerContent:O},n)))}if(t.graphicArts){var N=a.format(c,"‪"+t.graphicArts+"‬");b.push(new s(N,_.extend({innerContent:N},n)))}if(t.soundDesign){var P=a.format(f,"‪"+t.soundDesign+"‬");b.push(new s(P,_.extend({innerContent:P},n)))}if(t.translation&&(b.length>0&&b.push(new h(10)),b.push(new o(v,{font:i,tagName:"h2",innerContent:v})),b.push(new s(t.translation,n))),t.thanks){b.length>0&&b.push(new h(10)),b.push(new o(E,{font:i,tagName:"h2",innerContent:E}));var w=new s(t.thanks,n);w.innerContent=t.thanks,b.push(w)}e.children=b,l.call(this,e),this.disposeCreditsNode=function(){b.forEach(function(t){t.dispose&&t.dispose()})}}var i=t("PHET_CORE/inherit"),n=t("JOIST/joist"),r=t("SCENERY_PHET/PhetFont"),s=t("SCENERY/nodes/RichText"),a=t("PHETCOMMON/util/StringUtils"),o=t("SCENERY/nodes/Text"),l=t("SCENERY/nodes/VBox"),h=t("SCENERY/nodes/VStrut"),u=t("string!JOIST/credits.contributors"),c=t("string!JOIST/credits.graphicArts"),d=t("string!JOIST/credits.leadDesign"),p=t("string!JOIST/credits.qualityAssurance"),m=t("string!JOIST/credits.softwareDevelopment"),f=t("string!JOIST/credits.soundDesign"),g=t("string!JOIST/credits.team"),E=t("string!JOIST/credits.thanks"),y=t("string!JOIST/credits.title"),v=t("string!JOIST/credits.translation");return n.register("CreditsNode",e),i(l,e,{dispose:function(){this.disposeCreditsNode(),l.prototype.dispose.call(this)}})}),i("JOIST/packageJSON",["require","JOIST/joist","text!REPOSITORY/package.json"],function(t){"use strict";var e=t("JOIST/joist"),i=t("text!REPOSITORY/package.json"),n=JSON.parse(i);return e.register("packageJSON",n),n}),i("JOIST/SimVersion",["require","PHET_CORE/inherit","JOIST/joist"],function(t){"use strict";function e(t){this.major=t.major,this.minor=t.minor,this.maintenance=t.maintenance,this.suffix=t.suffix,this.buildTimestamp=t.buildTimestamp}var i=t("PHET_CORE/inherit");return t("JOIST/joist").register("SimVersion",e),i(Object,e,{compare:function(t){return this.majort.major?1:this.minort.minor?1:this.maintenancet.maintenance?1:0},get isSimNotPublished(){return this.major<1||1===this.major&&0===this.minor&&0===this.maintenance&&this.suffix},toString:function(){return this.major+"."+this.minor+"."+this.maintenance+(this.suffix?"-"+this.suffix:"")}},{parse:function(t,i){var n=t.match(/(\d+)\.(\d+)\.(\d+)(-(.+))?/);if(!n)throw new Error("could not parse version: "+t);return new e({major:parseInt(n[1],10),minor:parseInt(n[2],10),maintenance:parseInt(n[3],10),suffix:n[5],buildTimestamp:i})}})}),i("JOIST/UpdateCheck",["require","BRAND/Brand","PHET_CORE/inherit","JOIST/joist","JOIST/packageJSON","AXON/Property","JOIST/SimVersion"],function(t){"use strict";function e(){this.stateProperty=new a("unchecked",{validValues:["up-to-date","out-of-date","checking","offline","unchecked"]}),this.latestVersionProperty=new a(null),this.ourVersion=h,this.timeoutCallback=this.timeout.bind(this)}var i=t("BRAND/Brand"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/packageJSON"),a=t("AXON/Property"),o=t("JOIST/SimVersion"),l=s.name,h=o.parse(s.version,phet.chipper.buildTimestamp),u="https:"===document.location.protocol?"https:":"http:";n(Object,e,{areUpdatesChecked:"phet"===i.id&&!i.isPhetApp,updateURL:"http://phet.colorado.edu/html-sim-update?simulation="+encodeURIComponent(l)+"&version="+encodeURIComponent(h.toString())+"&buildTimestamp="+encodeURIComponent(""+phet.chipper.buildTimestamp),timeoutId:-1,timeoutMilliseconds:15e3,clearTimeout:function(){window.clearTimeout(this.timeoutId)},setTimeout:function(){this.timeoutId=window.setTimeout(this.timeoutCallback,this.timeoutMilliseconds)},resetTimeout:function(){"checking"===this.stateProperty.value&&(this.clearTimeout(),this.setTimeout())},timeout:function(){this.stateProperty.value="offline"},check:function(){var t=this;if(this.areUpdatesChecked&&("unchecked"===t.stateProperty.value||"offline"===t.stateProperty.value))if(this.ourVersion.isSimNotPublished)t.stateProperty.value="up-to-date";else{var e=new XMLHttpRequest;"withCredentials"in e&&(t.stateProperty.value="checking",t.setTimeout(),e.onload=function(){t.clearTimeout();try{var i=JSON.parse(e.responseText);i.error?(console.log("Update check failure: "+i.error),t.stateProperty.value="offline"):(t.updateURL&&(t.updateURL=i.updateURL),t.latestVersion=o.parse(i.latestVersion,i.buildTimestamp),"out-of-date"===i.state||"up-to-date"===i.state?t.stateProperty.value=i.state:(console.log("Failed to get proper state: "+i.state),t.stateProperty.value="offline"))}catch(e){t.stateProperty.value="offline"}},e.onerror=function(){t.clearTimeout(),t.stateProperty.value="offline"},e.open("post",u+"//phet.colorado.edu/services/check-html-updates",!0),e.send(JSON.stringify({api:"1.0",simulation:l,locale:phet.joist.sim.locale,currentVersion:t.ourVersion.toString(),buildTimestamp:phet.chipper.buildTimestamp})))}}});var c=new e;return r.register("UpdateCheck",c),c}),i("SCENERY_PHET/SpinningIndicatorNode",["require","SCENERY/nodes/Circle","SCENERY/util/Color","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/util/PaintColorProperty","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet","TANDEM/Tandem"],function(t){"use strict";function e(t){h.indicateUninstrumentedCode(),t=_.extend({indicatorSize:15,indicatorSpeed:1,elementFactory:e.rectangleFactory,elementQuantity:16,activeColor:"rgba(0,0,0,1)",inactiveColor:"rgba(0,0,0,0.15)"},t),this.options=t,s.call(this,t),this.indicatorRotation=2*Math.PI,this.activeColorProperty=new a(t.activeColor),this.inactiveColorProperty=new a(t.inactiveColor),this.angleDelta=2*Math.PI/t.elementQuantity,this.elements=[];for(var i=0,n=0;n'+v+"",{links:{url:c.updateURL},font:S})],tagName:"div"},t))},createOutOfDateDialogNode:function(t,e,n,s){return new d(_.extend({spacing:15,maxWidth:550,children:[new d({spacing:5,align:"left",children:[new h(l.format(g,n),{font:new r(16),fontWeight:"bold"}),new h(l.format(C,e),{font:S})]}),new i({spacing:25,children:[new u(f,{baseColor:"#6f6",font:S,listener:function(){var t=window.open(c.updateURL,"_blank");t&&t.focus()}}),new u(E,{baseColor:"#ddd",font:S,listener:function(){t.hide()}})]})]},s))},createOfflineNode:function(t){return new i(_.extend({spacing:0,maxWidth:550,children:[new p(20),new h(y,{font:new r(t.big?16:14),fontWeight:t.big?"bold":"normal"})],tagName:"p",innerContent:y},t))}};return n.register("UpdateNodes",A),A}),i("string!JOIST/versionPattern",function(){return window.phet.chipper.strings.get("JOIST/versionPattern")}),i("JOIST/AboutDialog",["require","SCENERY/accessibility/AccessiblePeer","JOIST/CreditsNode","SUN/Dialog","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","JOIST/packageJSON","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","AXON/timer","JOIST/UpdateCheck","JOIST/UpdateNodes","SCENERY/nodes/VBox","SCENERY/nodes/VStrut","string!JOIST/versionPattern"],function(t){"use strict";function e(t,e,s,a,p,_,C){var S=[],A=new d(t,{font:new h(28),maxWidth:v,tagName:"h1",innerContent:t});S.push(A);var T=c.format(y,e);if(S.push(new d(T,{font:new h(20),maxWidth:v,tagName:"p",innerContent:T})),phet.chipper.buildTimestamp&&S.push(new d(phet.chipper.buildTimestamp,{font:new h(13),maxWidth:v,tagName:"p",innerContent:phet.chipper.buildTimestamp})),m.areUpdatesChecked){var O={left:0,top:0},N=f.createCheckingNode(O),P=f.createUpToDateNode(O),w=f.createOutOfDateAboutNode(O),R=f.createOfflineNode(O);this.updateStepListener=N.stepListener,this.updateVisibilityListener=function(t){N.visible="checking"===t,P.visible="up-to-date"===t,w.visible="out-of-date"===t,R.visible="offline"===t,N.accessibleContentDisplayed=N.visible,P.accessibleContentDisplayed=P.visible,w.accessibleContentDisplayed=w.visible,R.accessibleContentDisplayed=R.visible},S.push(new o({children:[N,P,w,R],maxWidth:v}))}var D=[];if(a.name&&D.push(new u(a.name,{font:new h(16),supScale:.5,supYOffset:2,maxWidth:v,tagName:"h2",innerContent:a.name})),a.copyright){var M=phet.chipper.buildTimestamp?phet.chipper.buildTimestamp.split("-")[0]:(new Date).getFullYear(),x=c.fillIn(a.copyright,{year:M});D.push(new d(x,{font:new h(12),maxWidth:v,tagName:"p",innerContent:x}))}a.additionalLicenseStatement&&(this.additionalLicenseStatement=new u(a.additionalLicenseStatement,{font:new h(10),fill:"gray",align:"left",maxWidth:v,tagName:"p",innerContent:a.additionalLicenseStatement}),D.push(this.additionalLicenseStatement)),D.length>0&&(S.push(new E(15)),S=S.concat(D)),!s||"phet"!==a.id&&"phet-io"!==a.id||(S.push(new E(15)),this.creditsNode=new n(s,{maxWidth:v}),S.push(this.creditsNode));var I=a.getLinks(l.name,p);if(I&&I.length>0){S.push(new E(15));for(var L=C.createGroupTandem("link"),k=0;k'+Y.text+"",{links:{url:Y.url},font:new h(14),maxWidth:v,tandem:L.createNextTandem(),phetioReadOnly:!0,phetioState:!1,phetioComponentOptions:{phetioState:!1}}))}}var B=new g({align:"left",spacing:5,children:S,tagName:"div"});r.call(this,B,{focusOnCloseNode:_,tandem:C,phetioReadOnly:!0,phetioState:!1,xSpacing:20,topMargin:20,bottomMargin:20,leftMargin:20,rightMargin:20,maxHeight:464-2*b,layoutStrategy:function(t,e,i,n){t.center=i.center.times(1/n)}}),this.addAriaLabelledbyAssociation({thisElementName:i.PRIMARY_SIBLING,otherNode:A,otherElementName:i.PRIMARY_SIBLING}),this.disposeAboutDialog=function(){this.creditsNode&&this.creditsNode.dispose(),this.additionalLicenseStatement&&this.additionalLicenseStatement.dispose()}}var i=t("SCENERY/accessibility/AccessiblePeer"),n=t("JOIST/CreditsNode"),r=t("SUN/Dialog"),s=t("PHET_CORE/inherit"),a=t("JOIST/joist"),o=t("SCENERY/nodes/Node"),l=t("JOIST/packageJSON"),h=t("SCENERY_PHET/PhetFont"),u=t("SCENERY/nodes/RichText"),c=t("PHETCOMMON/util/StringUtils"),d=t("SCENERY/nodes/Text"),p=t("AXON/timer"),m=t("JOIST/UpdateCheck"),f=t("JOIST/UpdateNodes"),g=t("SCENERY/nodes/VBox"),E=t("SCENERY/nodes/VStrut"),y=t("string!JOIST/versionPattern"),v=550,b=12;return a.register("AboutDialog",e),s(r,e,{show:function(){m.areUpdatesChecked&&!this.isShowingProperty.value&&(m.resetTimeout(),"offline"!==m.stateProperty.value&&"unchecked"!==m.stateProperty.value||m.check(),p.addListener(this.updateStepListener),m.stateProperty.link(this.updateVisibilityListener)),r.prototype.show.call(this)},hide:function(){this.isShowingProperty.value&&(r.prototype.hide.call(this),m.areUpdatesChecked&&(m.stateProperty.unlink(this.updateVisibilityListener),p.removeListener(this.updateStepListener)))},dispose:function(){this.disposeAboutDialog(),r.prototype.dispose.call(this)}})}),i("SUN/MenuItem",["require","SCENERY/accessibility/AccessibilityUtil","SCENERY/listeners/FireListener","SUN/FontAwesomeNode","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","TANDEM/PhetioObject","SCENERY/nodes/Rectangle","SUN/sun","TANDEM/Tandem","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e,r,s,u,A){var T=this;A=_.extend({cursor:"pointer",tandem:c.optional,textFill:"black",phetioDocumentation:"Item buttons shown in a popup menu",phetioEventType:l.EventType.USER,tagName:"button",focusAfterCallback:!1,containerTagName:"li",containerAriaRole:"none",innerContent:s,ariaRole:"menuitem"},A),a.call(this);var O=new d(s,{font:new o(m),fill:A.textFill,maxWidth:g}),N=new h(0,0,t+v+b+y,e+C+C,S,S);this.addChild(N),this.addChild(O),O.left=N.left+v+y,O.centerY=N.centerY,this.addInputListener({enter:function(){N.fill=f},exit:function(){N.fill=null}});var P=function(t){r(t),u(t)};this.addInputListener(new n({tandem:A.tandem.createTandem("inputListener"),fire:P})),this.separatorBefore=A.separatorBefore;var w;if(A.checkedProperty){var R=new a({children:[p],right:O.left-E,centerY:O.centerY});w=function(t){R.visible=t},A.checkedProperty.link(w),this.addChild(R)}var D={click:function(t){P();var e=phet.joist.display.accessibleDOMElement;A.focusAfterCallback&&i.getNextFocusable(e).focus()}};this.addInputListener(D),this.mutate(A),this.disposeMenuItem=function(){A.checkedProperty&&A.checkedProperty.unlink(w),T.removeInputListener(D)}}var i=t("SCENERY/accessibility/AccessibilityUtil"),n=t("SCENERY/listeners/FireListener"),r=t("SUN/FontAwesomeNode"),s=t("PHET_CORE/inherit"),a=t("SCENERY/nodes/Node"),o=t("SCENERY_PHET/PhetFont"),l=t("TANDEM/PhetioObject"),h=t("SCENERY/nodes/Rectangle"),u=t("SUN/sun"),c=t("TANDEM/Tandem"),d=t("SCENERY/nodes/Text"),p=new r("check",{fill:"rgba(0,0,0,0.7)",scale:.4}),m=18,f="#a6d2f4",g=400,E=2,y=p.width+E,v=2,b=5,C=3,S=5;return u.register("MenuItem",e),s(a,e,{dispose:function(){this.disposeMenuItem(),a.prototype.dispose.call(this)}})}),i("JOIST/OptionsDialogIO",["require","SUN/DialogIO","JOIST/joist","TANDEM/phetioInherit"],function(t){"use strict";function e(t,e){i.call(this,t,e)}var i=t("SUN/DialogIO"),n=t("JOIST/joist");return t("TANDEM/phetioInherit")(i,"OptionsDialogIO",e,{},{documentation:"A dialog panel",validator:{isValidValue:function(t){return t instanceof phet.joist.OptionsDialog}}}),n.register("OptionsDialogIO",e),e}),i("string!JOIST/options.title",function(){return window.phet.chipper.strings.get("JOIST/options.title")}),i("JOIST/OptionsDialog",["require","SUN/Dialog","PHET_CORE/inherit","JOIST/joist","JOIST/OptionsDialogIO","SCENERY_PHET/PhetFont","TANDEM/Tandem","SCENERY/nodes/Text","string!JOIST/options.title"],function(t){"use strict";function e(t,e){(e=_.extend({titleAlign:"center",bottomMargin:20,ySpacing:20,tandem:o.required,phetioType:s},e)).title||(e.title=new l(h,{font:new a(30),maxWidth:400})),i.call(this,t,e),this.disposeOptionsDialog=function(){e.title&&e.title.dispose()}}var i=t("SUN/Dialog"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/OptionsDialogIO"),a=t("SCENERY_PHET/PhetFont"),o=t("TANDEM/Tandem"),l=t("SCENERY/nodes/Text"),h=t("string!JOIST/options.title");return r.register("OptionsDialog",e),n(i,e,{dispose:function(){this.disposeOptionsDialog(),i.prototype.dispose.call(this)}},{DEFAULT_FONT:new a(15),DEFAULT_SPACING:10})}),i("JOIST/PhetMenuIO",["require","JOIST/joist","TANDEM/types/ObjectIO","TANDEM/phetioInherit"],function(t){"use strict";function e(t,e){n.call(this,t,e)}var i=t("JOIST/joist"),n=t("TANDEM/types/ObjectIO");return t("TANDEM/phetioInherit")(n,"PhetMenuIO",e,{},{documentation:"The PhET Menu in the bottom right of the screen",validator:{isValidValue:function(t){return t instanceof phet.joist.PhetMenu}}}),i.register("PhetMenuIO",e),e}),i("JOIST/ScreenshotGenerator",["require","SCENERY/util/CanvasContextWrapper","PHET_CORE/inherit","JOIST/joist"],function(t){"use strict";function e(){}var i=t("SCENERY/util/CanvasContextWrapper"),n=t("PHET_CORE/inherit");return t("JOIST/joist").register("ScreenshotGenerator",e),n(Object,e,{},{generateScreenshot:function(t,e){e=e||"image/png";var n=document.createElement("canvas");n.width=t.display.width,n.height=t.display.height;var r=n.getContext("2d");r.fillStyle=t.display.domElement.style.backgroundColor,r.fillRect(0,0,n.width,n.height);var s=new i(n,r);t.rootNode.renderToCanvasSubtree(s);return n.toDataURL(e)}})}),i("JOIST/UpdateDialog",["require","SUN/Dialog","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","AXON/timer","JOIST/UpdateCheck","JOIST/UpdateNodes"],function(t){"use strict";function e(t){function e(){var t=o.latestVersion?o.latestVersion.toString():"x.x.xx",e=o.ourVersion.toString();u.children=[l.createOutOfDateDialogNode(n,e,t,r)]}var n=this,r={centerX:0,centerY:0,big:!0},a=l.createCheckingNode(r),h=l.createUpToDateNode(r),u=new s({tagName:"div"}),c=l.createOfflineNode(r);e(),this.updateStepListener=a.stepListener,this.updateVisibilityListener=function(t){"out-of-date"===t&&e(),a.visible="checking"===t,h.visible="up-to-date"===t,u.visible="out-of-date"===t,c.visible="offline"===t,a.accessibleContentDisplayed=a.visible,h.accessibleContentDisplayed=h.visible,u.accessibleContentDisplayed=u.visible,c.accessibleContentDisplayed=c.visible};var d=new s({children:[a,h,u,c],tagName:"div"});i.call(this,d,{focusOnCloseNode:t})}var i=t("SUN/Dialog"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("SCENERY/nodes/Node"),a=t("AXON/timer"),o=t("JOIST/UpdateCheck"),l=t("JOIST/UpdateNodes");return r.register("UpdateDialog",e),n(i,e,{show:function(){o.areUpdatesChecked&&!this.isShowingProperty.value&&(o.resetTimeout(),"offline"!==o.stateProperty.value&&"unchecked"!==o.stateProperty||o.check(),a.addListener(this.updateStepListener),o.stateProperty.link(this.updateVisibilityListener)),i.prototype.show.call(this)},hide:function(){this.isShowingProperty.value&&(i.prototype.hide.call(this),o.areUpdatesChecked&&(o.stateProperty.unlink(this.updateVisibilityListener),a.removeListener(this.updateStepListener)))}})}),i("string!JOIST/menuItem.about",function(){return window.phet.chipper.strings.get("JOIST/menuItem.about")}),i("string!JOIST/menuItem.enhancedSound",function(){return window.phet.chipper.strings.get("JOIST/menuItem.enhancedSound")}),i("string!JOIST/menuItem.fullscreen",function(){return window.phet.chipper.strings.get("JOIST/menuItem.fullscreen")}),i("string!JOIST/menuItem.getUpdate",function(){return window.phet.chipper.strings.get("JOIST/menuItem.getUpdate")}),i("string!JOIST/menuItem.mailInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.mailInputEventsLog")}),i("string!JOIST/menuItem.options",function(){return window.phet.chipper.strings.get("JOIST/menuItem.options")}),i("string!JOIST/menuItem.outputInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.outputInputEventsLog")}),i("string!JOIST/menuItem.phetWebsite",function(){return window.phet.chipper.strings.get("JOIST/menuItem.phetWebsite")}),i("string!JOIST/menuItem.reportAProblem",function(){return window.phet.chipper.strings.get("JOIST/menuItem.reportAProblem")}),i("string!JOIST/menuItem.screenshot",function(){return window.phet.chipper.strings.get("JOIST/menuItem.screenshot")}),i("string!JOIST/menuItem.submitInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.submitInputEventsLog")}),i("JOIST/PhetMenu",["require","JOIST/AboutDialog","SCENERY/accessibility/AccessibilityUtil","BRAND/Brand","AXON/DerivedProperty","SCENERY/display/Display","SCENERY/util/FullScreen","PHET_CORE/inherit","JOIST/joist","SCENERY/accessibility/KeyboardUtil","SUN/MenuItem","SCENERY/nodes/Node","JOIST/OptionsDialog","SCENERY/nodes/Path","SCENERY_PHET/PhetFont","JOIST/PhetMenuIO","PHET_CORE/platform","SCENERY/nodes/Rectangle","JOIST/ScreenshotGenerator","KITE/Shape","TAMBO/soundManager","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","JOIST/UpdateCheck","JOIST/UpdateDialog","string!JOIST/menuItem.about","string!JOIST/menuItem.enhancedSound","string!JOIST/menuItem.fullscreen","string!JOIST/menuItem.getUpdate","string!JOIST/menuItem.mailInputEventsLog","string!JOIST/menuItem.options","string!JOIST/menuItem.outputInputEventsLog","string!JOIST/menuItem.phetWebsite","string!JOIST/menuItem.reportAProblem","string!JOIST/menuItem.screenshot","string!JOIST/menuItem.submitInputEventsLog"],function(t){"use strict";function e(t,e,l,h){var y="phet"===r.id,V=r.isPhetApp;(h=_.extend({showSaveAndLoad:!1,phetioType:g,phetioState:!1,phetioDocumentation:"This menu is displayed when the PhET button is pressed.",tagName:"ul",ariaRole:"menu"},h)).tandem=l;var z=this;d.call(this);var X,U=null,G=null,W=null,K=[{text:M,present:!!t.options.optionsNode,callback:function(){G||(G=new p(t.options.optionsNode,{tandem:l.createTandem("optionsDialog")})),G.show()},tandem:l.createTandem("optionsMenuItem"),phetioDocumentation:"This menu item shows an options dialog.",phetioState:!1,tagName:"button",focusAfterCallback:!0},{text:I,present:y,callback:function(){if(!F){var e=window.open("http://phet.colorado.edu/"+t.locale,"_blank");e&&e.focus()}},tagName:"button"},{text:x,present:!!t.options.recordInputEventLog,callback:function(){console.log(t.getRecordedInputEventLogString())},tagName:"button"},{text:Y,present:!!t.options.recordInputEventLog,callback:function(){t.submitEventLog()},tagName:"button"},{text:D,present:!!t.options.recordInputEventLog,callback:function(){t.mailEventLog()},tagName:"button"},{text:L,present:y&&!V,callback:function(){var e="http://phet.colorado.edu/files/troubleshooting/?sim="+encodeURIComponent(t.name)+"&version="+encodeURIComponent(t.version+" "+(phet.chipper.buildTimestamp?phet.chipper.buildTimestamp:"(require.js)"))+"&url="+encodeURIComponent(window.location.href)+"&dependencies="+encodeURIComponent(JSON.stringify({}));if(!F){var i=window.open(e,"_blank");i&&i.focus()}},tagName:"button"},{text:"QR code",present:phet.chipper.queryParameters.qrCode,callback:function(){if(!F){var t=window.open("http://api.qrserver.com/v1/create-qr-code/?data="+encodeURIComponent(window.location.href)+"&size=220x220&margin=0","_blank");t&&t.focus()}},tagName:"button"},{text:R,present:T.areUpdatesChecked,textFill:new s([T.stateProperty],function(t){return"out-of-date"===t?"#0a0":"#000"}),callback:function(){W||(W=new O(e)),W.show()},tagName:"button",focusAfterCallback:!0},{text:k,present:!E.ie9&&!V,callback:function(){var e=v.generateScreenshot(t);if(window.Blob&&new window.Blob){for(var i=e.slice("data:image/png;base64,".length),n=window.atob(i),r=new window.Uint8Array(n.length),s=0;s0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("mipmap!BRAND/logo-on-white.png",function(){var t=window.phet.chipper.mipmaps["BRAND/logo-on-white.png"];return window.phetImages=window.phetImages||[],t.forEach(function(t){t.img=new Image,window.phetImages.push(t.img),t.img.src=t.url,t.canvas=document.createElement("canvas"),t.canvas.width=t.width,t.canvas.height=t.height;var e=t.canvas.getContext("2d");t.updateCanvas=function(){t.img.complete&&(void 0===t.img.naturalWidth||t.img.naturalWidth>0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("JOIST/PhetButton",["require","SCENERY/nodes/Image","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","JOIST/KebabMenuIcon","SCENERY/nodes/Node","JOIST/PhetButtonIO","JOIST/PhetMenu","AXON/Property","JOIST/UpdateCheck","mipmap!BRAND/logo.png","mipmap!BRAND/logo-on-white.png"],function(t){"use strict";function e(t,e,n){var r=this,s=new u(t,this,n.createTandem("phetMenu"),{showSaveAndLoad:t.options.showSaveAndLoad,closeCallback:function(){s.hide()}});c.multilink([t.boundsProperty,t.screenBoundsProperty,t.scaleProperty],function(t,e,i){if(t&&e&&i){s.right=t.right/i-2/i;var n=t.height-e.height;s.bottom=e.bottom/i+n/2/i}});var E={highlightExtensionWidth:6,highlightExtensionHeight:5,highlightCenterOffsetY:4,listener:function(){s.show()},phetioType:h,phetioDocumentation:"The button that appears at the right side of the navigation bar, which shows a menu when pressed",tagName:"button",innerContent:p},y=new i(m,{scale:g,pickable:!1}),v=new o({left:y.width+8,bottom:y.bottom-.5,pickable:!1}),b=new l({children:[y,v]});a.call(this,b,e,n,E),c.multilink([e,t.showHomeScreenProperty,d.stateProperty],function(t,e,i){var n="black"!==t&&!e,r="out-of-date"===i;v.fill=n?r?"#0a0":"#222":r?"#3F3":"white",y.image=n?f:m}),this.on("pickability",function(){v.visible=!1!==r.pickable}),this.addInputListener({click:function(){s.show(),s.items[0].focus()}}),this.setAccessibleAttribute("aria-haspopup",!0)}var i=t("SCENERY/nodes/Image"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),a=t("JOIST/JoistButton"),o=t("JOIST/KebabMenuIcon"),l=t("SCENERY/nodes/Node"),h=t("JOIST/PhetButtonIO"),u=t("JOIST/PhetMenu"),c=t("AXON/Property"),d=t("JOIST/UpdateCheck"),p=s.phet.value,m=t("mipmap!BRAND/logo.png"),f=t("mipmap!BRAND/logo-on-white.png"),g=.28/m[0].height*108;return r.register("PhetButton",e),n(a,e)}),i("string!JOIST/simTitleWithScreenNamePattern",function(){return window.phet.chipper.strings.get("JOIST/simTitleWithScreenNamePattern")}),i("JOIST/NavigationBar",["require","JOIST/A11yButtonsHBox","SCENERY/accessibility/AccessiblePeer","AXON/DerivedProperty","DOT/Dimension2","JOIST/HomeButton","JOIST/HomeScreen","JOIST/HomeScreenView","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/NavigationBarScreenButton","SCENERY/nodes/Node","JOIST/PhetButton","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","string!JOIST/simTitleWithScreenNamePattern"],function(t){"use strict";function e(t,e,s,h){var u=this;this.screens=e,p.call(this,{tagName:"div",ariaRole:"region",labelTagName:"h2",labelContent:1===e.length?C:b}),this.navigationBarFillProperty=new r([s,t.lookAndFeel.navigationBarFillProperty],function(t,e){return t?o.BACKGROUND_COLOR:e}),this.background=new g(0,0,A.width,A.height,{pickable:!0,fill:this.navigationBarFillProperty}),this.addChild(this.background),this.barContents=new p,this.addChild(this.barContents);var c=t.name;if(phet.chipper.queryParameters.screens&&1===phet.chipper.queryParameters.screens.length&&e[0].name&&(c=E.fillIn(v,{simName:t.name,screenName:e[0].name})),this.titleTextNode=new y(c,{font:new f(16),fill:t.lookAndFeel.navigationBarTextFillProperty,tandem:h.createTandem("titleTextNode"),phetioDocumentation:"Displays the title of the simulation in the navigation bar (bottom left)"}),this.titleTextNode.setVisible(!1),this.barContents.addChild(this.titleTextNode),this.phetButton=new m(t,this.navigationBarFillProperty,h.createTandem("phetButton")),this.barContents.addChild(this.phetButton),this.a11yButtonsHBox=new i(t,this.navigationBarFillProperty,h.createTandem("a11yButtonsHBox")),this.barContents.addChild(this.a11yButtonsHBox),this.addAriaLabelledbyAssociation({thisElementName:n.PRIMARY_SIBLING,otherNode:this,otherElementName:n.LABEL_SIBLING}),1===e.length)this.titleTextNode.maxWidth=l.LAYOUT_BOUNDS.width-T-O-N-this.a11yButtonsHBox.width-N-this.phetButton.width-P;else{var I=Math.min(this.titleTextNode.width,.2*l.LAYOUT_BOUNDS.width),L=new p({tagName:"nav",ariaLabel:S}),k=new p({tagName:"ol"});L.addChild(k),L.setVisible(!1),this.barContents.addChild(L),this.homeButton=new a(A.height,t.lookAndFeel.navigationBarFillProperty,h.createTandem("homeButton"),{listener:function(){t.showHomeScreenProperty.value=!0,u.homeButton.buttonModel.isA11yClicking()&&t.homeScreen.view.focusHighlightedScreenButton()}}),phet.chipper.queryParameters.homeScreen&&k.addChild(this.homeButton);for(var Y=l.LAYOUT_BOUNDS.width/2-T-I-O-R-this.homeButton.width-D,B=l.LAYOUT_BOUNDS.width/2-N-this.a11yButtonsHBox.width-N-this.phetButton.width-P,H=2*Math.min(Y,B),F=(H-(e.length-1)*M)/e.length,q=_.map(e,function(e){return new d(t.lookAndFeel.navigationBarFillProperty,t.screenIndexProperty,t.screens,e,A.height,{maxButtonWidth:F,tandem:h.createTandem(e.screenTandem.tail+"Button")})}),V=Math.max(x,_.maxBy(q,function(t){return t.width}).width)+M,z=0;z0&&(this.a11yButtonsHBox.centerY=this.phetButton.centerY),1!==this.screens.length&&(this.screenButtonsContainer.centerY=A.height/2,this.homeButton.centerY=A.height/2),this.layout(1,A.width,A.height),this.accessibleOrder=[L,this.a11yButtonsHBox,this.phetButton].filter(function(t){return void 0!==t}),s.link(function(t){u.titleTextNode.setVisible(!t),L&&L.setVisible(!t)})}var i=t("JOIST/A11yButtonsHBox"),n=t("SCENERY/accessibility/AccessiblePeer"),r=t("AXON/DerivedProperty"),s=t("DOT/Dimension2"),a=t("JOIST/HomeButton"),o=t("JOIST/HomeScreen"),l=t("JOIST/HomeScreenView"),h=t("PHET_CORE/inherit"),u=t("JOIST/joist"),c=t("JOIST/JoistA11yStrings"),d=t("JOIST/NavigationBarScreenButton"),p=t("SCENERY/nodes/Node"),m=t("JOIST/PhetButton"),f=t("SCENERY_PHET/PhetFont"),g=t("SCENERY/nodes/Rectangle"),E=t("PHETCOMMON/util/StringUtils"),y=t("SCENERY/nodes/Text"),v=t("string!JOIST/simTitleWithScreenNamePattern"),b=c.simScreensResourcesAndTools.value,C=c.simResourcesAndTools.value,S=c.simScreens.value,A=new s(l.LAYOUT_BOUNDS.width,40),T=10,O=25,N=6,P=10,w=0,R=5,D=R,M=0,x=60;return u.register("NavigationBar",e),h(p,e,{layout:function(t,e,i){this.background.rectWidth=e,this.background.rectHeight=i,this.barContents.setScaleMagnitude(t);var n;n=A.width*t0&&(this.a11yButtonsHBox.right=this.phetButton.left-N),1!==this.screens.length&&(this.screenButtonsContainer.x=n/2,this.homeButton.right=this.screenButtonsContainer.left-D,this.titleTextNode.maxWidth=this.homeButton.left-T-O)}},{NAVIGATION_BAR_SIZE:A})}),i("JOIST/Profiler",["require","PHET_CORE/inherit","JOIST/joist","DOT/Util"],function(t){"use strict";function e(){this.allTimes=[],this.histogram=[],this.longTimes=[],this.frameStartTime=0,this.previousFrameStartTime=0;for(var t=0;t')}var i=t("PHET_CORE/inherit"),n=t("JOIST/joist"),r=t("DOT/Util"),s=30;return n.register("Profiler",e),i(Object,e,{frameStarted:function(){this.frameStartTime=Date.now()},frameEnded:function(){if(this.allTimes.length>0&&this.allTimes.length%60==0){for(var t=0,e=0;e0&&(this.longTimes.sort(function(t,e){return e-t}),i=i+" — "+this.longTimes),$("#phetProfiler").html(i),e=0;ee.length-1)throw new Error("invalid screen index: "+t);R.push(e[i])}),0!==y){var x=_.indexOf(R,e[y-1]);y=x+1}e=R}a=_.extend({showHomeScreen:e.length>1&&b&&0===y,screenIndex:0===y?0:y-1,credits:{},optionsNode:null,homeScreenWarningNode:null,recordInputEventLog:!1,inputEventLogName:void 0,showSaveAndLoad:!1,accessibility:!1,keyboardHelpNode:null,supportsSound:!1,supportsEnhancedSound:!1,rootRenderer:"svg",allowBackingScaleAntialiasing:!0},a),this.options=a,a.rootRenderer=phet.chipper.queryParameters.rootRenderer||a.rootRenderer,this.showHomeScreenProperty=new o(a.showHomeScreen,e.length>1?{tandem:Y.generalTandem.createTandem("showHomeScreenProperty"),phetioFeatured:!0}:{}),this.screenIndexProperty=new w(a.screenIndex,{tandem:Y.generalTandem.createTandem("screenIndexProperty"),phetioFeatured:!0,phetioDocumentation:"Indicates which screen is selected (0-indexed)",validValues:_.range(0,e.length),numberType:"Integer"}),this.activeProperty=new o(!phet.joist.playbackModeEnabledProperty.value,{tandem:Y.generalTandem.createTandem("activeProperty"),phetioFeatured:!0,phetioDocumentation:"Determines whether the entire simulation is running and processing user input. Setting this property to false pauses the simulation, and prevents user interaction."}),this.browserTabVisibleProperty=new o(!0,{tandem:Y.generalTandem.createTandem("browserTabVisibleProperty"),phetioDocumentation:"Indicates whether the browser tab containing the simulation is currently visible",phetioReadOnly:!0}),document.addEventListener("visibilitychange",function(){d.browserTabVisibleProperty.set("visible"===document.visibilityState)},!1),this.scaleProperty=new I(1),this.boundsProperty=new I(null),this.screenBoundsProperty=new I(null),this.currentScreenProperty=new I(null),this.lookAndFeel=new A,this.destroyed=!1,this.memoryMonitor=new T,phet.chipper.accessibility=phet.chipper.accessibility||a.accessibility,phet.chipper.accessibility&&(s.initialize(),q.initialize()),this.keyboardHelpNode=a.keyboardHelpNode,this.supportsSound=(phet.chipper.queryParameters.supportsSound||a.supportsSound)&&("enabled"===phet.chipper.queryParameters.sound||"muted"===phet.chipper.queryParameters.sound)&&!M.ie,this.supportsEnhancedSound=this.supportsSound&&(phet.chipper.queryParameters.supportsEnhancedSound||a.supportsEnhancedSound),this.supportsSound&&k.initialize(this.browserTabVisibleProperty,this.activeProperty),window.phet.joist.sim=this,window.phet.joist.ScreenshotGenerator=L,this.name=t,this.version=D.version,this.credits=a.credits,this.frameCounter=0,this.resizePending=!0,this.locale=phet.chipper.locale||"en",QueryStringMachine.containsKey("locale")&&$("title").html(t),phet.chipper.queryParameters.recordInputEventLog&&(a.recordInputEventLog=!0,a.inputEventLogName=phet.chipper.queryParameters.recordInputEventLog),phet.chipper.queryParameters.playbackInputEventLog&&(a.playbackInputEventLog=!0,a.inputEventLogName=phet.chipper.queryParameters.playbackInputEventLog),(phet.chipper.queryParameters.fuzz||phet.chipper.queryParameters.fuzzMouse||phet.chipper.queryParameters.fuzzTouch||phet.chipper.queryParameters.fuzzBoard)&&(window.open=function(){return{focus:function(){},blur:function(){}}});$("body").css("padding","0").css("margin","0").css("overflow","hidden");var H=document.getElementById("aria-live-elements");H&&(H.style[m.userSelect]="none"),document.getElementById("sim")&&document.getElementById("sim").parentNode===document.body&&document.body.removeChild(document.getElementById("sim")),document.onselectstart=function(){return!1},this.rootNode=new N({renderer:a.rootRenderer}),this.display=new c(d.rootNode,{allowSceneOverflow:!1,allowWebGL:phet.chipper.queryParameters.webgl,accessibility:phet.chipper.accessibility,isApplication:!1,assumeFullWindow:!0,allowBackingScaleAntialiasing:a.allowBackingScaleAntialiasing});var z=phet.chipper.queryParameters.randomSeed*Math.PI;this.inputFuzzer=new v(this.display,z),this.keyboardFuzzer=new C(this.display,z),this.activeProperty.link(function(t){d.display.interactive=t}),d.display.domElement.id="sim",document.body.appendChild(d.display.domElement),f.start(this),phet.chipper.queryParameters.sceneryLog&&this.display.scenery.enableLogging(phet.chipper.queryParameters.sceneryLog),phet.chipper.queryParameters.sceneryStringLog&&this.display.scenery.switchLogToString(),this.display.initializeEvents({tandem:Y.generalTandem.createTandem("controller").createTandem("input")}),window.phet.joist.rootNode=this.rootNode,window.phet.joist.display=this.display,d.display.setPointerDisplayVisible(phet.chipper.queryParameters.showPointers),d.display.setPointerAreaDisplayVisible(phet.chipper.queryParameters.showPointerAreas),d.display.setCanvasNodeBoundsVisible(phet.chipper.queryParameters.showCanvasNodeBounds),d.display.setFittedBlockBoundsVisible(phet.chipper.queryParameters.showFittedBlockBounds),this.screens=e,e.length>1?(this.homeScreen=new g(this,Y.rootTandem.createTandem("homeScreen"),{warningNode:a.homeScreenWarningNode}),this.homeScreen.initializeModelAndView()):this.homeScreen=null,this.navigationBar=new O(this,e,this.showHomeScreenProperty,Y.rootTandem.createTandem("navigationBar")),this.updateBackground=function(){d.lookAndFeel.backgroundColorProperty.value=d.currentScreenProperty.value?d.currentScreenProperty.value.backgroundColorProperty.value:d.homeScreen.backgroundColorProperty.value},this.lookAndFeel.backgroundColorProperty.link(function(t){d.display.backgroundColor=t}),phet.phetio&&V.initializeSim(),this.activityMonitor=new r(this.screens,this.screenIndexProperty,this.showHomeScreenProperty,Y.rootTandem.createTandem("activityMonitor")),I.multilink([this.showHomeScreenProperty,this.screenIndexProperty],function(t,i){d.currentScreenProperty.value=t&&d.homeScreen?null:e[i],d.updateBackground()}),this.currentScreenProperty.lazyLink(function(t,e){null===e?d.homeScreen.view.interruptSubtreeInput():e.view.interruptSubtreeInput()}),window.addEventListener("pageshow",function(t){t.persisted&&window.location.reload()}),phet.chipper.queryParameters.legendsOfLearning&&new S(this).start()}var i=t("AXON/Action"),n=t("AXON/ActionIO"),r=t("JOIST/ActivityMonitor"),s=t("SCENERY_PHET/accessibility/ariaHerald"),a=t("SCENERY_PHET/BarrierRectangle"),o=t("AXON/BooleanProperty"),l=t("DOT/Bounds2"),h=t("BRAND/Brand"),u=t("DOT/Dimension2"),c=t("SCENERY/display/Display"),d=t("DOT/Util"),p=t("AXON/Emitter"),m=t("SCENERY/util/Features"),f=t("JOIST/Heartbeat"),g=t("JOIST/HomeScreen"),E=t("JOIST/HomeScreenView"),y=t("PHET_CORE/inherit"),v=t("SCENERY/input/InputFuzzer"),b=t("JOIST/joist"),C=t("SCENERY/accessibility/KeyboardFuzzer"),S=t("JOIST/thirdPartySupport/LegendsOfLearningSupport"),A=t("JOIST/LookAndFeel"),T=t("JOIST/MemoryMonitor"),O=t("JOIST/NavigationBar"),N=t("SCENERY/nodes/Node"),P=t("TANDEM/types/NumberIO"),w=t("AXON/NumberProperty"),R=t("AXON/ObservableArray"),D=t("JOIST/packageJSON"),M=t("PHET_CORE/platform"),x=t("JOIST/Profiler"),I=t("AXON/Property"),L=t("JOIST/ScreenshotGenerator"),k=t("TAMBO/soundManager"),Y=t("TANDEM/Tandem"),B=t("AXON/timer"),H=t("JOIST/UpdateCheck"),F=t("SCENERY/util/Util"),q=t("SCENERY_PHET/accessibility/utteranceQueue"),V=t("ifphetio!PHET_IO/phetioEngine");return phet.joist.elapsedTime=0,phet.joist.playbackModeEnabledProperty=new o(phet.chipper.queryParameters.playbackMode),b.register("Sim",e),y(Object,e,{finishInit:function(t){var e=this;this.homeScreen&&this.rootNode.addChild(this.homeScreen.view),_.each(t,function(t){t.view.layerSplit=!0,e.rootNode.addChild(t.view)}),this.rootNode.addChild(this.navigationBar),I.multilink([this.showHomeScreenProperty,this.screenIndexProperty],function(i,n){e.homeScreen&&(i?(e.homeScreen.activeProperty.set(!0),e.homeScreen.view.setVisible(!0)):(e.homeScreen.view.setVisible(!1),e.homeScreen.activeProperty.set(!1)));for(var r=0;r=0&&this.stepSimulation(i)},getSelectedScreen:function(){return this.showHomeScreenProperty.value?null:this.screens[this.screenIndexProperty.value]},stepSimulation:function(t){this.stepSimulationAction.execute(t),this.frameEndedEmitter.emit()},setAccessibleViewsVisible:function(t){for(var e=0;e=0||i.indexOf("/")<0||i.indexOf("..")>=0)){var n=i.slice(0,i.indexOf("/")),r=i.slice(i.lastIndexOf("/")+1),s=n.toLowerCase().split("_"),a=[s[0]].concat(s.slice(1).map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join("");if(r!==a&&r!==a+"Namespace"){var o=phet[a]&&phet[a][r];o||e("not namespaced: "+a+"."+r),o&&o!==t[i]&&e(a+"."+r+" is different than the expected namespaced object")}}};e(function(t){console.log(t)}),e(function(t){})};return t("JOIST/joist").register("checkNamespaces",e),e}),i("PHET_IO/phetioCommandProcessor",function(){return function(){return function(){}}}),i("JOIST/SimLauncher",["require","TANDEM/Tandem","JOIST/checkNamespaces","JOIST/joist","DOT/Random","ifphetio!PHET_IO/dataStream","ifphetio!PHET_IO/phetioCommandProcessor"],function(t){"use strict";var e=t("TANDEM/Tandem"),i=(t("JOIST/checkNamespaces"),t("JOIST/joist")),n=t("DOT/Random"),r=t("ifphetio!PHET_IO/dataStream"),s=t("ifphetio!PHET_IO/phetioCommandProcessor"),a={launch:function(t){function i(){window.phet.joist.launchSimulation=function(){e.launch(),r.launch&&r.launch(),phet.joist.random=new n({staticSeed:!0}),t()},phet.phetio&&s.initialize(),phet.chipper.queryParameters.postMessageOnReady&&window.parent!==window&&window.parent.postMessage(JSON.stringify({type:"ready",url:window.location.href}),"*"),phet.phetio&&!phet.phetio.queryParameters.phetioStandalone||phet.chipper.queryParameters.playbackMode||window.phet.joist.launchSimulation()}function a(t){return!!t.complete&&(void 0===t.naturalWidth||0!==t.naturalWidth)}window.phet.joist.launchCalled=!0;var o=[],l=0;if(window.phetImages)for(var h=0;h