From 01d643c0e6f71cb8964fb86d1ed6d8a18c52e31d Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 24 Jul 2019 14:11:23 -0700 Subject: [PATCH] use compatibility mode in playgrounds, and rebuild --- blockly_compressed.js | 152 +++++++++++++++++++++++---- blockly_uncompressed.js | 24 ++++- blocks_compressed.js | 6 +- tests/playground.html | 1 + tests/screenshot/playground_new.html | 7 ++ 5 files changed, 163 insertions(+), 27 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index a5f2b1aec..50bcd9c86 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1045,6 +1045,7 @@ Blockly.Icon.prototype.dispose=function(){Blockly.utils.dom.removeNode(this.icon Blockly.Icon.prototype.updateColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.getColour())}; Blockly.Icon.prototype.renderIcon=function(a){if(this.collapseHidden&&this.block_.isCollapsed()||this.block_.isInsertionMarker())return this.iconGroup_.setAttribute("display","none"),a;this.iconGroup_.setAttribute("display","block");var b=this.SIZE;this.block_.RTL&&(a-=b);this.iconGroup_.setAttribute("transform","translate("+a+",5)");this.computeIconLocation();return a=this.block_.RTL?a-Blockly.BlockSvg.SEP_SPACE_X:a+(b+Blockly.BlockSvg.SEP_SPACE_X)}; Blockly.Icon.prototype.setIconLocation=function(a){this.iconXY_=a;this.isVisible()&&this.bubble_.setAnchorLocation(a)};Blockly.Icon.prototype.computeIconLocation=function(){var a=this.block_.getRelativeToSurfaceXY(),b=Blockly.utils.getRelativeXY(this.iconGroup_);a=new Blockly.utils.Coordinate(a.x+b.x+this.SIZE/2,a.y+b.y+this.SIZE/2);Blockly.utils.Coordinate.equals(this.getIconLocation(),a)||this.setIconLocation(a)};Blockly.Icon.prototype.getIconLocation=function(){return this.iconXY_}; +Blockly.Icon.prototype.getCorrectedSize=function(){return new goog.math.Size(Blockly.Icon.prototype.SIZE,Blockly.Icon.prototype.SIZE-2)}; Blockly.Comment=function(a){Blockly.Comment.superClass_.constructor.call(this,a);this.createIcon()};goog.inherits(Blockly.Comment,Blockly.Icon);Blockly.Comment.prototype.text_="";Blockly.Comment.prototype.width_=160;Blockly.Comment.prototype.height_=80; Blockly.Comment.prototype.drawIcon_=function(a){Blockly.utils.dom.createSvgElement("circle",{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},a);Blockly.utils.dom.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"},a);Blockly.utils.dom.createSvgElement("rect",{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},a)}; Blockly.Comment.prototype.createEditor_=function(){this.foreignObject_=Blockly.utils.dom.createSvgElement("foreignObject",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);var a=document.createElementNS(Blockly.utils.dom.HTML_NS,"body");a.setAttribute("xmlns",Blockly.utils.dom.HTML_NS);a.className="blocklyMinimalBody";var b=document.createElementNS(Blockly.utils.dom.HTML_NS,"textarea");b.className="blocklyCommentTextarea";b.setAttribute("dir",this.block_.RTL?"RTL":"LTR");a.appendChild(b); @@ -1393,13 +1394,13 @@ Blockly.Extensions.getMutatorProperties_=function(a){var b=[];void 0!==a.domToMu Blockly.Extensions.buildTooltipForDropdown=function(a,b){var c=[];"object"==typeof document&&Blockly.utils.runAfterPageLoad(function(){for(var a in b)Blockly.utils.checkMessageReferences(b[a])});return function(){this.type&&-1===c.indexOf(this.type)&&(Blockly.Extensions.checkDropdownOptionsInTable_(this,a,b),c.push(this.type));this.setTooltip(function(){var d=this.getFieldValue(a),e=b[d];null==e?-1===c.indexOf(this.type)&&(d="No tooltip mapping for value "+d+" of field "+a,null!=this.type&&(d+=" of block type "+ this.type),console.warn(d+".")):e=Blockly.utils.replaceMessageReferences(e);return e}.bind(this))}};Blockly.Extensions.checkDropdownOptionsInTable_=function(a,b,c){var d=a.getField(b);if(!d.isOptionListDynamic()){d=d.getOptions();for(var e=0;ethis.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_.RTL&&(a+="\u200f");return a};Blockly.Field.prototype.getText=function(){return this.text_};Blockly.Field.prototype.setText=function(a){null!==a&&(a=String(a),a!==this.text_&&(this.text_=a,this.forceRerender()))}; Blockly.Field.prototype.forceRerender=function(){this.isDirty_=!0;this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_())}; @@ -1416,7 +1417,7 @@ Blockly.Field.prototype.setValue=function(a){if(null!==a){var b=this.doClassVali Blockly.Field.prototype.processValidation_=function(a,b){if(null===b)return this.doValueInvalid_(a),this.isDirty_&&this.forceRerender(),Error();void 0!==b&&(a=b);return a};Blockly.Field.prototype.getValue=function(){return this.value_};Blockly.Field.prototype.doClassValidation_=function(a){return a=this.classValidator(a)};Blockly.Field.prototype.doValueUpdate_=function(a){this.value_=a;this.isDirty_=!0;this.text_=String(a)};Blockly.Field.prototype.doValueInvalid_=function(a){}; Blockly.Field.prototype.onMouseDown_=function(a){this.sourceBlock_&&this.sourceBlock_.workspace&&(a=this.sourceBlock_.workspace.getGesture(a))&&a.setStartField(this)};Blockly.Field.prototype.setTooltip=function(a){var b=this.getClickTarget_();b?b.tooltip=a||""===a?a:this.sourceBlock_:this.tooltip_=a};Blockly.Field.prototype.getClickTarget_=function(){return this.clickTarget_||this.getSvgRoot()};Blockly.Field.prototype.getAbsoluteXY_=function(){return goog.style.getPageOffset(this.borderRect_)}; Blockly.Field.prototype.referencesVariables=function(){return!1};Blockly.FieldLabel=function(a,b){this.size_=new goog.math.Size(0,17.5);this.class_=b;a=this.doClassValidation_(a);null===a&&(a="");this.setValue(a)};goog.inherits(Blockly.FieldLabel,Blockly.Field);Blockly.FieldLabel.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldLabel(b,a["class"])};Blockly.FieldLabel.prototype.EDITABLE=!1; -Blockly.FieldLabel.prototype.initView=function(){this.createTextElement_();this.textElement_.setAttribute("y",this.size_.height-5);this.class_&&Blockly.utils.dom.addClass(this.textElement_,this.class_)};Blockly.FieldLabel.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:String(a)};Blockly.Field.register("field_label",Blockly.FieldLabel);Blockly.Input=function(a,b,c,d){if(a!=Blockly.DUMMY_INPUT&&!b)throw Error("Value inputs and statement inputs must have non-empty name.");this.type=a;this.name=b;this.sourceBlock_=c;this.connection=d;this.fieldRow=[]};Blockly.Input.prototype.align=Blockly.ALIGN_LEFT;Blockly.Input.prototype.visible_=!0;Blockly.Input.prototype.appendField=function(a,b){this.insertFieldAt(this.fieldRow.length,a,b);return this}; +Blockly.FieldLabel.prototype.initView=function(){this.createTextElement_();this.textElement_.setAttribute("y",this.size_.height-5);this.class_&&Blockly.utils.dom.addClass(this.textElement_,this.class_)};Blockly.FieldLabel.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:String(a)};Blockly.FieldLabel.prototype.getCorrectedSize=function(){this.getSize();return new goog.math.Size(this.size_.width,this.size_.height-5)};Blockly.Field.register("field_label",Blockly.FieldLabel);Blockly.Input=function(a,b,c,d){if(a!=Blockly.DUMMY_INPUT&&!b)throw Error("Value inputs and statement inputs must have non-empty name.");this.type=a;this.name=b;this.sourceBlock_=c;this.connection=d;this.fieldRow=[]};Blockly.Input.prototype.align=Blockly.ALIGN_LEFT;Blockly.Input.prototype.visible_=!0;Blockly.Input.prototype.appendField=function(a,b){this.insertFieldAt(this.fieldRow.length,a,b);return this}; Blockly.Input.prototype.insertFieldAt=function(a,b,c){if(0>a||a>this.fieldRow.length)throw Error("index "+a+" out of bounds.");if(!b&&!c)return a;"string"==typeof b&&(b=new Blockly.FieldLabel(b));b.setSourceBlock(this.sourceBlock_);this.sourceBlock_.rendered&&b.init();b.name=c;b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);++a;b.suffixField&&(a=this.insertFieldAt(a,b.suffixField));this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_()); return a};Blockly.Input.prototype.removeField=function(a){for(var b=0,c;c=this.fieldRow[b];b++)if(c.name===a){c.dispose();this.fieldRow.splice(b,1);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_());return}throw Error('Field "%s" not found.',a);};Blockly.Input.prototype.isVisible=function(){return this.visible_}; Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.setCheck=function(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this}; @@ -1480,7 +1481,110 @@ Blockly.BlockDragSurfaceSvg.prototype.createDom=function(){this.SVG_||(this.SVG_ Blockly.BlockDragSurfaceSvg.prototype.setBlocksAndShow=function(a){if(this.dragGroup_.childNodes.length)throw Error("Already dragging a block.");this.dragGroup_.appendChild(a);this.SVG_.style.display="block";this.surfaceXY_=new Blockly.utils.Coordinate(0,0)};Blockly.BlockDragSurfaceSvg.prototype.translateAndScaleGroup=function(a,b,c){this.scale_=c;a=a.toFixed(0);b=b.toFixed(0);this.dragGroup_.setAttribute("transform","translate("+a+","+b+") scale("+c+")")}; Blockly.BlockDragSurfaceSvg.prototype.translateSurfaceInternal_=function(){var a=this.surfaceXY_.x,b=this.surfaceXY_.y;a=a.toFixed(0);b=b.toFixed(0);this.SVG_.style.display="block";Blockly.utils.dom.setCssTransform(this.SVG_,"translate3d("+a+"px, "+b+"px, 0px)")};Blockly.BlockDragSurfaceSvg.prototype.translateSurface=function(a,b){this.surfaceXY_=new Blockly.utils.Coordinate(a*this.scale_,b*this.scale_);this.translateSurfaceInternal_()}; Blockly.BlockDragSurfaceSvg.prototype.getSurfaceTranslation=function(){var a=Blockly.utils.getRelativeXY(this.SVG_);return new Blockly.utils.Coordinate(a.x/this.scale_,a.y/this.scale_)};Blockly.BlockDragSurfaceSvg.prototype.getGroup=function(){return this.dragGroup_};Blockly.BlockDragSurfaceSvg.prototype.getCurrentBlock=function(){return this.dragGroup_.firstChild}; -Blockly.BlockDragSurfaceSvg.prototype.clearAndHide=function(a){a?a.appendChild(this.getCurrentBlock()):this.dragGroup_.removeChild(this.getCurrentBlock());this.SVG_.style.display="none";if(this.dragGroup_.childNodes.length)throw Error("Drag group was not cleared.");this.surfaceXY_=null};Blockly.utils.uiMenu={};Blockly.utils.uiMenu.getSize=function(a){a=a.getElement();var b=goog.style.getSize(a);b.height=a.scrollHeight;return b};Blockly.utils.uiMenu.adjustBBoxesForRTL=function(a,b,c){b.left+=c.width;b.right+=c.width;a.left+=c.width;a.right+=c.width};Blockly.ContextMenu={};Blockly.ContextMenu.currentBlock=null;Blockly.ContextMenu.eventWrapper_=null;Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=Blockly.ContextMenu.populate_(b,c);goog.events.listen(d,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide);Blockly.ContextMenu.position_(d,a,c);setTimeout(function(){d.getElement().focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()}; +Blockly.BlockDragSurfaceSvg.prototype.clearAndHide=function(a){a?a.appendChild(this.getCurrentBlock()):this.dragGroup_.removeChild(this.getCurrentBlock());this.SVG_.style.display="none";if(this.dragGroup_.childNodes.length)throw Error("Drag group was not cleared.");this.surfaceXY_=null};Blockly.utils.svgPaths={};Blockly.utils.svgPaths.point=function(a,b){return" "+a+","+b+" "};Blockly.utils.svgPaths.curve=function(a,b){return" "+a+b.join("")};Blockly.utils.svgPaths.moveTo=function(a,b){return" M "+a+","+b+" "};Blockly.utils.svgPaths.moveBy=function(a,b){return" m "+a+","+b+" "};Blockly.utils.svgPaths.lineTo=function(a,b){return" l "+a+","+b+" "};Blockly.utils.svgPaths.line=function(a){return" l"+a.join("")};Blockly.utils.svgPaths.lineOnAxis=function(a,b){return" "+a+" "+b+" "}; +Blockly.utils.svgPaths.arc=function(a,b,c,d){return a+" "+c+" "+c+" "+b+d};Blockly.blockRendering={};Blockly.blockRendering.constants={};Blockly.blockRendering.constants.NO_PADDING=0;Blockly.blockRendering.constants.SMALL_PADDING=3;Blockly.blockRendering.constants.MEDIUM_PADDING=5;Blockly.blockRendering.constants.MEDIUM_LARGE_PADDING=8;Blockly.blockRendering.constants.LARGE_PADDING=10;Blockly.blockRendering.constants.TALL_INPUT_FIELD_OFFSET_Y=Blockly.blockRendering.constants.MEDIUM_PADDING;Blockly.blockRendering.constants.HIGHLIGHT_OFFSET=.5; +Blockly.blockRendering.constants.DARK_PATH_OFFSET=1;Blockly.blockRendering.constants.TAB_HEIGHT=15;Blockly.blockRendering.constants.TAB_OFFSET_FROM_TOP=5;Blockly.blockRendering.constants.TAB_VERTICAL_OVERLAP=2.5;Blockly.blockRendering.constants.TAB_WIDTH=8;Blockly.blockRendering.constants.NOTCH_WIDTH=15;Blockly.blockRendering.constants.NOTCH_HEIGHT=4;Blockly.blockRendering.constants.MIN_BLOCK_WIDTH=12;Blockly.blockRendering.constants.EMPTY_BLOCK_SPACER_HEIGHT=16; +Blockly.blockRendering.constants.NOTCH_OFFSET_LEFT=Blockly.blockRendering.constants.NOTCH_WIDTH;Blockly.blockRendering.constants.NOTCH_OFFSET_ROUNDED_CORNER_PREV=7;Blockly.blockRendering.constants.NOTCH_OFFSET_RIGHT=Blockly.blockRendering.constants.NOTCH_OFFSET_LEFT+Blockly.blockRendering.constants.NOTCH_WIDTH;Blockly.blockRendering.constants.STATEMENT_BOTTOM_SPACER=5;Blockly.blockRendering.constants.STATEMENT_INPUT_PADDING_LEFT=20;Blockly.blockRendering.constants.BETWEEN_STATEMENT_PADDING_Y=4; +Blockly.blockRendering.constants.MAX_BOTTOM_WIDTH=66.5;Blockly.blockRendering.constants.CORNER_RADIUS=8;Blockly.blockRendering.constants.START_HAT_HEIGHT=15;Blockly.blockRendering.constants.START_HAT_WIDTH=100;Blockly.blockRendering.constants.SPACER_DEFAULT_HEIGHT=15;Blockly.blockRendering.constants.MIN_BLOCK_HEIGHT=24;Blockly.blockRendering.constants.EMPTY_INLINE_INPUT_WIDTH=22.5;Blockly.blockRendering.constants.EMPTY_INLINE_INPUT_HEIGHT=26; +Blockly.blockRendering.constants.EXTERNAL_VALUE_INPUT_WIDTH=10;Blockly.blockRendering.constants.EMPTY_STATEMENT_INPUT_HEIGHT=Blockly.blockRendering.constants.MIN_BLOCK_HEIGHT;Blockly.blockRendering.constants.EMPTY_STATEMENT_INPUT_WIDTH=32;Blockly.blockRendering.constants.POPULATED_STATEMENT_INPUT_WIDTH=25;Blockly.blockRendering.constants.START_POINT=Blockly.utils.svgPaths.moveBy(0,0); +Blockly.blockRendering.constants.START_POINT_HIGHLIGHT=Blockly.utils.svgPaths.moveBy(Blockly.blockRendering.constants.HIGHLIGHT_OFFSET,Blockly.blockRendering.constants.HIGHLIGHT_OFFSET);Blockly.blockRendering.constants.DISTANCE_45_INSIDE=(1-Math.SQRT1_2)*(Blockly.blockRendering.constants.CORNER_RADIUS-Blockly.blockRendering.constants.HIGHLIGHT_OFFSET)+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET; +Blockly.blockRendering.constants.DISTANCE_45_OUTSIDE=(1-Math.SQRT1_2)*(Blockly.blockRendering.constants.CORNER_RADIUS+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET)-Blockly.blockRendering.constants.HIGHLIGHT_OFFSET;Blockly.blockRendering.constants.TAB_PATH_DOWN="c 0,10 -"+Blockly.blockRendering.constants.TAB_WIDTH+",-8 -"+Blockly.blockRendering.constants.TAB_WIDTH+",7.5 s "+Blockly.blockRendering.constants.TAB_WIDTH+",-2.5 "+Blockly.blockRendering.constants.TAB_WIDTH+",7.5"; +Blockly.blockRendering.constants.TAB_PATH_DOWN_HIGHLIGHT_RTL="m -"+.97*Blockly.blockRendering.constants.TAB_WIDTH+",2.5 q -"+.05*Blockly.blockRendering.constants.TAB_WIDTH+",10 "+.3*Blockly.blockRendering.constants.TAB_WIDTH+",9.5 m "+.67*Blockly.blockRendering.constants.TAB_WIDTH+",-1.9"; +Blockly.blockRendering.constants.TAB_PATH_UP="c 0,-10 -"+Blockly.blockRendering.constants.TAB_WIDTH+",8 -"+Blockly.blockRendering.constants.TAB_WIDTH+",-7.5 s "+Blockly.blockRendering.constants.TAB_WIDTH+",2.5 "+Blockly.blockRendering.constants.TAB_WIDTH+",-7.5"; +Blockly.blockRendering.constants.START_HAT_PATH=Blockly.utils.svgPaths.curve("c",[Blockly.utils.svgPaths.point(30,-Blockly.blockRendering.constants.START_HAT_HEIGHT),Blockly.utils.svgPaths.point(70,-Blockly.blockRendering.constants.START_HAT_HEIGHT),Blockly.utils.svgPaths.point(Blockly.blockRendering.constants.START_HAT_WIDTH,0)]);Blockly.blockRendering.constants.NOTCH_PATH_LEFT="l 6,4 3,0 6,-4"; +Blockly.blockRendering.constants.NOTCH_PATH_LEFT_HIGHLIGHT="h "+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET+" "+Blockly.blockRendering.constants.NOTCH_PATH_LEFT;Blockly.blockRendering.constants.NOTCH_PATH_RIGHT="l -6,4 -3,0 -6,-4"; +Blockly.blockRendering.constants.INNER_TOP_LEFT_CORNER=Blockly.blockRendering.constants.NOTCH_PATH_RIGHT+" h -"+(Blockly.blockRendering.constants.NOTCH_WIDTH-Blockly.blockRendering.constants.CORNER_RADIUS)+" a "+Blockly.blockRendering.constants.CORNER_RADIUS+","+Blockly.blockRendering.constants.CORNER_RADIUS+" 0 0,0 -"+Blockly.blockRendering.constants.CORNER_RADIUS+","+Blockly.blockRendering.constants.CORNER_RADIUS; +Blockly.blockRendering.constants.INNER_BOTTOM_LEFT_CORNER=Blockly.utils.svgPaths.arc("a","0 0,0",Blockly.blockRendering.constants.CORNER_RADIUS,Blockly.utils.svgPaths.point(Blockly.blockRendering.constants.CORNER_RADIUS,Blockly.blockRendering.constants.CORNER_RADIUS)); +Blockly.blockRendering.constants.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL=Blockly.utils.svgPaths.arc("a","0 0,0",Blockly.blockRendering.constants.CORNER_RADIUS,Blockly.utils.svgPaths.point(-Blockly.blockRendering.constants.DISTANCE_45_OUTSIDE-Blockly.blockRendering.constants.HIGHLIGHT_OFFSET,Blockly.blockRendering.constants.CORNER_RADIUS-Blockly.blockRendering.constants.DISTANCE_45_OUTSIDE)); +Blockly.blockRendering.constants.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL=Blockly.utils.svgPaths.arc("a","0 0,0",Blockly.blockRendering.constants.CORNER_RADIUS+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET,Blockly.utils.svgPaths.point(Blockly.blockRendering.constants.CORNER_RADIUS+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET,Blockly.blockRendering.constants.CORNER_RADIUS+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET)); +Blockly.blockRendering.constants.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR=Blockly.utils.svgPaths.arc("a","0 0,0",Blockly.blockRendering.constants.CORNER_RADIUS+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET,Blockly.utils.svgPaths.point(Blockly.blockRendering.constants.CORNER_RADIUS-Blockly.blockRendering.constants.DISTANCE_45_OUTSIDE,Blockly.blockRendering.constants.DISTANCE_45_OUTSIDE+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET)); +Blockly.blockRendering.constants.TOP_LEFT_CORNER_START="m 0,"+Blockly.blockRendering.constants.CORNER_RADIUS;Blockly.blockRendering.constants.TOP_LEFT_CORNER="A "+Blockly.blockRendering.constants.CORNER_RADIUS+","+Blockly.blockRendering.constants.CORNER_RADIUS+" 0 0,1 "+Blockly.blockRendering.constants.CORNER_RADIUS+",0"; +Blockly.blockRendering.constants.BOTTOM_LEFT_CORNER="a"+Blockly.blockRendering.constants.CORNER_RADIUS+","+Blockly.blockRendering.constants.CORNER_RADIUS+" 0 0,1 -"+Blockly.blockRendering.constants.CORNER_RADIUS+",-"+Blockly.blockRendering.constants.CORNER_RADIUS;Blockly.blockRendering.constants.BOTTOM_LEFT_CORNER_HIGHLIGHT_START="M "+Blockly.blockRendering.constants.DISTANCE_45_INSIDE+", "; +Blockly.blockRendering.constants.BOTTOM_LEFT_CORNER_HIGHLIGHT_MID="A "+(Blockly.blockRendering.constants.CORNER_RADIUS-Blockly.blockRendering.constants.HIGHLIGHT_OFFSET)+","+(Blockly.blockRendering.constants.CORNER_RADIUS-Blockly.blockRendering.constants.HIGHLIGHT_OFFSET)+" 0 0,1 "+Blockly.blockRendering.constants.HIGHLIGHT_OFFSET+","; +Blockly.blockRendering.constants.OUTPUT_CONNECTION_HIGHLIGHT_LTR="V "+(Blockly.blockRendering.constants.TAB_HEIGHT+Blockly.blockRendering.constants.TAB_OFFSET_FROM_TOP-1.5)+" m "+-.92*Blockly.blockRendering.constants.TAB_WIDTH+",-0.5 q "+-.19*Blockly.blockRendering.constants.TAB_WIDTH+",-5.5 0,-11 m "+.92*Blockly.blockRendering.constants.TAB_WIDTH+",1 V 0.5 H 1"; +Blockly.blockRendering.constants.OUTPUT_CONNECTION_HIGHLIGHT_RTL="M "+-.25*Blockly.blockRendering.constants.TAB_WIDTH+",8.4 l "+-.45*Blockly.blockRendering.constants.TAB_WIDTH+",-2.1";Blockly.blockRendering.constants.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL="m "+Blockly.blockRendering.constants.DISTANCE_45_INSIDE+","+Blockly.blockRendering.constants.DISTANCE_45_INSIDE;Blockly.blockRendering.constants.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR="m 0.5,"+(Blockly.blockRendering.constants.CORNER_RADIUS-.5); +Blockly.blockRendering.constants.TOP_LEFT_CORNER_HIGHLIGHT="A "+(Blockly.blockRendering.constants.CORNER_RADIUS-.5)+","+(Blockly.blockRendering.constants.CORNER_RADIUS-.5)+" 0 0,1 "+Blockly.blockRendering.constants.CORNER_RADIUS+",0.5";Blockly.blockRendering.constants.START_HAT_HIGHLIGHT_LTR=Blockly.utils.svgPaths.curve("c",[Blockly.utils.svgPaths.point(17.8,-9.2),Blockly.utils.svgPaths.point(45.3,-14.9),Blockly.utils.svgPaths.point(75,-8.7)])+Blockly.utils.svgPaths.moveTo(100.5,.5); +Blockly.blockRendering.constants.START_HAT_HIGHLIGHT_RTL=Blockly.utils.svgPaths.moveBy(25,-8.7)+Blockly.utils.svgPaths.curve("c",[Blockly.utils.svgPaths.point(29.7,-6.2),Blockly.utils.svgPaths.point(57.2,-.5),Blockly.utils.svgPaths.point(75,8.7)]);Blockly.blockRendering.Measurable=function(){this.isInput=!1;this.height=this.width=0;this.type=null;this.centerline=this.xPos=0};Blockly.blockRendering.Measurable.prototype.isField=function(){return"field"==this.type};Blockly.blockRendering.Measurable.prototype.isHat=function(){return"hat"==this.type};Blockly.blockRendering.Measurable.prototype.isIcon=function(){return"icon"==this.type}; +Blockly.blockRendering.Measurable.prototype.isSpacer=function(){return"between-row spacer"==this.type||"in-row spacer"==this.type};Blockly.blockRendering.Measurable.prototype.isExternalInput=function(){return"external value input"==this.type};Blockly.blockRendering.Measurable.prototype.isInlineInput=function(){return"inline input"==this.type};Blockly.blockRendering.Measurable.prototype.isStatementInput=function(){return"statement input"==this.type}; +Blockly.blockRendering.Measurable.prototype.isPreviousConnection=function(){return"previous connection"==this.type};Blockly.blockRendering.Measurable.prototype.isNextConnection=function(){return"next connection"==this.type};Blockly.blockRendering.Measurable.prototype.isRoundedCorner=function(){return"round corner"==this.type};Blockly.blockRendering.Measurable.prototype.isSquareCorner=function(){return"square corner"==this.type}; +Blockly.blockRendering.Input=function(a){Blockly.blockRendering.Input.superClass_.constructor.call(this);this.isInput=!0;this.input=a;this.align=a.align;if(this.connectedBlock=a.connection&&a.connection.targetBlock()?a.connection.targetBlock():null){var b=this.connectedBlock.getHeightWidth();this.connectedBlockWidth=b.width;this.connectedBlockHeight=b.height}else this.connectedBlockHeight=this.connectedBlockWidth=0;this.connection=a.connection;this.connectionOffsetY=this.connectionOffsetX=0}; +goog.inherits(Blockly.blockRendering.Input,Blockly.blockRendering.Measurable);Blockly.blockRendering.Icon=function(a){Blockly.blockRendering.Icon.superClass_.constructor.call(this);this.icon=a;this.isVisible=a.isVisible();this.type="icon";a=a.getCorrectedSize();this.height=a.height;this.width=a.width};goog.inherits(Blockly.blockRendering.Icon,Blockly.blockRendering.Measurable); +Blockly.blockRendering.Field=function(a,b){Blockly.blockRendering.Field.superClass_.constructor.call(this);this.field=a;this.isEditable=a.isCurrentlyEditable();this.type="field";var c=this.field.getCorrectedSize();this.height=c.height;this.width=c.width;this.parentInput=b};goog.inherits(Blockly.blockRendering.Field,Blockly.blockRendering.Measurable); +Blockly.blockRendering.InlineInput=function(a){Blockly.blockRendering.InlineInput.superClass_.constructor.call(this,a);this.type="inline input";this.connectedBlock?(this.width=this.connectedBlockWidth+Blockly.blockRendering.constants.TAB_WIDTH+Blockly.blockRendering.constants.DARK_PATH_OFFSET,this.height=this.connectedBlockHeight+Blockly.blockRendering.constants.DARK_PATH_OFFSET):(this.height=Blockly.blockRendering.constants.EMPTY_INLINE_INPUT_HEIGHT,this.width=Blockly.blockRendering.constants.EMPTY_INLINE_INPUT_WIDTH)}; +goog.inherits(Blockly.blockRendering.InlineInput,Blockly.blockRendering.Input); +Blockly.blockRendering.StatementInput=function(a){Blockly.blockRendering.StatementInput.superClass_.constructor.call(this,a);this.type="statement input";this.connectedBlock?(this.width=Blockly.blockRendering.constants.POPULATED_STATEMENT_INPUT_WIDTH,this.height=this.connectedBlockHeight+Blockly.blockRendering.constants.STATEMENT_BOTTOM_SPACER,this.connectedBlock.nextConnection&&(this.height-=Blockly.blockRendering.constants.NOTCH_HEIGHT)):(this.height=Blockly.blockRendering.constants.EMPTY_STATEMENT_INPUT_HEIGHT, +this.width=Blockly.blockRendering.constants.EMPTY_STATEMENT_INPUT_WIDTH)};goog.inherits(Blockly.blockRendering.StatementInput,Blockly.blockRendering.Input);Blockly.blockRendering.ExternalValueInput=function(a){Blockly.blockRendering.ExternalValueInput.superClass_.constructor.call(this,a);this.type="external value input";this.height=this.connectedBlock?this.connectedBlockHeight-2*Blockly.blockRendering.constants.TAB_OFFSET_FROM_TOP:Blockly.blockRendering.constants.TAB_HEIGHT;this.width=Blockly.blockRendering.constants.EXTERNAL_VALUE_INPUT_WIDTH}; +goog.inherits(Blockly.blockRendering.ExternalValueInput,Blockly.blockRendering.Input);Blockly.blockRendering.PreviousConnection=function(){Blockly.blockRendering.PreviousConnection.superClass_.constructor.call(this);this.type="previous connection";this.height=Blockly.blockRendering.constants.NOTCH_HEIGHT;this.width=Blockly.blockRendering.constants.NOTCH_WIDTH};goog.inherits(Blockly.blockRendering.PreviousConnection,Blockly.blockRendering.Measurable); +Blockly.blockRendering.NextConnection=function(){Blockly.blockRendering.NextConnection.superClass_.constructor.call(this);this.type="next connection";this.height=Blockly.blockRendering.constants.NOTCH_HEIGHT;this.width=Blockly.blockRendering.constants.NOTCH_WIDTH};goog.inherits(Blockly.blockRendering.NextConnection,Blockly.blockRendering.Measurable); +Blockly.blockRendering.Hat=function(){Blockly.blockRendering.Hat.superClass_.constructor.call(this);this.type="hat";this.height=Blockly.blockRendering.constants.NO_PADDING;this.width=Blockly.blockRendering.constants.START_HAT_WIDTH};goog.inherits(Blockly.blockRendering.Hat,Blockly.blockRendering.Measurable); +Blockly.blockRendering.SquareCorner=function(){Blockly.blockRendering.SquareCorner.superClass_.constructor.call(this);this.type="square corner";this.height=Blockly.blockRendering.constants.NOTCH_HEIGHT;this.width=Blockly.blockRendering.constants.NO_PADDING};goog.inherits(Blockly.blockRendering.SquareCorner,Blockly.blockRendering.Measurable); +Blockly.blockRendering.RoundCorner=function(){Blockly.blockRendering.RoundCorner.superClass_.constructor.call(this);this.type="round corner";this.width=Blockly.blockRendering.constants.CORNER_RADIUS;this.height=Blockly.blockRendering.constants.NOTCH_HEIGHT};goog.inherits(Blockly.blockRendering.RoundCorner,Blockly.blockRendering.Measurable); +Blockly.blockRendering.Row=function(){this.type="row";this.yPos=0;this.elements=[];this.height=this.width=0;this.hasDummyInput=this.hasInlineInput=this.hasStatement=this.hasExternalInput=!1};Blockly.blockRendering.Row.prototype.isSpacer=function(){return!1}; +Blockly.blockRendering.Row.prototype.measure=function(){for(var a=0,b=0;ba&&0<=b&&256>b&&0<=c&&256>c)?Blockly.utils.colour.rgbToHex(a,b,c):null}; +Blockly.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};Blockly.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))};Blockly.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"==typeof a?"TRUE"==a:!!a};Blockly.FieldCheckbox.prototype.getCorrectedSize=function(){this.getSize();return new goog.math.Size(this.size_.width+Blockly.BlockSvg.SEP_SPACE_X,Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT)}; +Blockly.Field.register("field_checkbox",Blockly.FieldCheckbox);Blockly.utils.colour={};Blockly.utils.colour.parse=function(a){a=String(a).toLowerCase().trim();var b=Blockly.utils.colour.names[a];if(b)return b;b="#"==a[0]?a:"#"+a;if(/^#[0-9a-f]{6}$/.test(b))return b;if(/^#[0-9a-f]{3}$/.test(b))return["#",b[1],b[1],b[2],b[2],b[3],b[3]].join("");var c=a.match(/^(?:rgb)?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return c&&(a=Number(c[1]),b=Number(c[2]),c=Number(c[3]),0<=a&&256>a&&0<=b&&256>b&&0<=c&&256>c)?Blockly.utils.colour.rgbToHex(a,b,c):null}; Blockly.utils.colour.rgbToHex=function(a,b,c){b=a<<16|b<<8|c;return 16>a?"#"+(16777216|b).toString(16).substr(1):"#"+b.toString(16)};Blockly.utils.colour.hexToRgb=function(a){a=parseInt(a.substr(1),16);return[a>>16,a>>8&255,a&255]}; Blockly.utils.colour.hsvToHex=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=c;else{var g=Math.floor(a/60),h=a/60-g;a=c*(1-b);var k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return Blockly.utils.colour.rgbToHex(Math.floor(d),Math.floor(e),Math.floor(f))}; Blockly.utils.colour.blend=function(a,b,c){a=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(a));b=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(b));return Blockly.utils.colour.rgbToHex(Math.round(b[0]+c*(a[0]-b[0])),Math.round(b[1]+c*(a[1]-b[1])),Math.round(b[2]+c*(a[2]-b[2])))}; -Blockly.utils.colour.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"};Blockly.FieldColour=function(a,b){a=this.doClassValidation_(a);null===a&&(a=Blockly.FieldColour.COLOURS[0]);Blockly.FieldColour.superClass_.constructor.call(this,a,b)};goog.inherits(Blockly.FieldColour,Blockly.Field);Blockly.FieldColour.fromJson=function(a){return new Blockly.FieldColour(a.colour)};Blockly.FieldColour.DEFAULT_WIDTH=16;Blockly.FieldColour.DEFAULT_HEIGHT=12;Blockly.FieldColour.prototype.SERIALIZABLE=!0;Blockly.FieldColour.prototype.CURSOR="default"; -Blockly.FieldColour.prototype.isDirty_=!1;Blockly.FieldColour.prototype.colours_=null;Blockly.FieldColour.prototype.titles_=null;Blockly.FieldColour.prototype.columns_=0;Blockly.FieldColour.prototype.DROPDOWN_BORDER_COLOUR="silver";Blockly.FieldColour.prototype.DROPDOWN_BACKGROUND_COLOUR="white"; +Blockly.utils.colour.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"};Blockly.FieldColour=function(a,b){a=this.doClassValidation_(a);null===a&&(a=Blockly.FieldColour.COLOURS[0]);Blockly.FieldColour.superClass_.constructor.call(this,a,b)};goog.inherits(Blockly.FieldColour,Blockly.Field);Blockly.FieldColour.fromJson=function(a){var b=new Blockly.FieldColour(a.colour);a.colourOptions&&b.setColours(a.colourOptions,a.colourTitles);a.columns&&b.setColumns(a.columns);return b};Blockly.FieldColour.DEFAULT_WIDTH=16;Blockly.FieldColour.DEFAULT_HEIGHT=12; +Blockly.FieldColour.prototype.SERIALIZABLE=!0;Blockly.FieldColour.prototype.CURSOR="default";Blockly.FieldColour.prototype.isDirty_=!1;Blockly.FieldColour.prototype.colours_=null;Blockly.FieldColour.prototype.titles_=null;Blockly.FieldColour.prototype.columns_=0;Blockly.FieldColour.prototype.DROPDOWN_BORDER_COLOUR="silver";Blockly.FieldColour.prototype.DROPDOWN_BACKGROUND_COLOUR="white"; Blockly.FieldColour.prototype.initView=function(){this.size_=new goog.math.Size(Blockly.FieldColour.DEFAULT_WIDTH,Blockly.FieldColour.DEFAULT_HEIGHT);this.createBorderRect_();this.borderRect_.style.fillOpacity=1;this.borderRect_.style.fill=this.value_};Blockly.FieldColour.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:Blockly.utils.colour.parse(a)};Blockly.FieldColour.prototype.doValueUpdate_=function(a){this.value_=a;this.borderRect_&&(this.borderRect_.style.fill=a)}; Blockly.FieldColour.prototype.getText=function(){var a=this.value_;/^#(.)\1(.)\2(.)\3$/.test(a)&&(a="#"+a[1]+a[3]+a[5]);return a};Blockly.FieldColour.COLOURS="#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" "); Blockly.FieldColour.TITLES=[];Blockly.FieldColour.COLUMNS=7;Blockly.FieldColour.prototype.setColours=function(a,b){this.colours_=a;void 0!==b&&(this.titles_=b);return this};Blockly.FieldColour.prototype.setColumns=function(a){this.columns_=a;return this}; Blockly.FieldColour.prototype.showEditor_=function(){var a=this.dropdownCreate_();Blockly.DropDownDiv.getContentDiv().appendChild(a);Blockly.DropDownDiv.setColour(this.DROPDOWN_BACKGROUND_COLOUR,this.DROPDOWN_BORDER_COLOUR);Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this))};Blockly.FieldColour.prototype.onClick_=function(a){(a=a.target)&&!a.label&&(a=a.parentNode);a=a&&a.label;null!==a&&(this.setValue(a),Blockly.DropDownDiv.hideIfOwner(this))}; Blockly.FieldColour.prototype.dropdownCreate_=function(){var a=this.columns_||Blockly.FieldColour.COLUMNS,b=this.colours_||Blockly.FieldColour.COLOURS,c=this.titles_||Blockly.FieldColour.TITLES,d=this.getValue(),e=document.createElement("table");e.className="blocklyColourTable";for(var f,g=0;g=this.height_||0>=this.width_)throw Error("Height and width values of an image field must be greater than 0.");this.size_=new goog.math.Size(this.width_,this.height_+2*Blockly.BlockSvg.INLINE_PADDING_Y);this.flipRtl_=f;this.text_=d||"";this.setValue(a||"");"function"==typeof e&&(this.clickHandler_= e)};goog.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.src),c=Number(Blockly.utils.replaceMessageReferences(a.width)),d=Number(Blockly.utils.replaceMessageReferences(a.height)),e=Blockly.utils.replaceMessageReferences(a.alt);return new Blockly.FieldImage(b,c,d,e,null,!!a.flipRtl)};Blockly.FieldImage.prototype.EDITABLE=!1;Blockly.FieldImage.prototype.isDirty_=!1; Blockly.FieldImage.prototype.initView=function(){this.imageElement_=Blockly.utils.dom.createSvgElement("image",{height:this.height_+"px",width:this.width_+"px",alt:this.text_},this.fieldGroup_);this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_)};Blockly.FieldImage.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:a}; Blockly.FieldImage.prototype.doValueUpdate_=function(a){this.value_=a;this.imageElement_&&this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_||"")};Blockly.FieldImage.prototype.getFlipRtl=function(){return this.flipRtl_};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a,this.imageElement_&&this.imageElement_.setAttribute("alt",a||""))};Blockly.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)}; -Blockly.Field.register("field_image",Blockly.FieldImage);Blockly.FieldNumber=function(a,b,c,d,e){this.setConstraints(b,c,d);a=this.doClassValidation_(a);null===a&&(a=0);Blockly.FieldNumber.superClass_.constructor.call(this,a,e)};goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.fromJson=function(a){return new Blockly.FieldNumber(a.value,a.min,a.max,a.precision)};Blockly.FieldNumber.prototype.SERIALIZABLE=!0; +Blockly.FieldImage.prototype.getCorrectedSize=function(){this.getSize();return new goog.math.Size(this.size_.width,this.height_+1)};Blockly.Field.register("field_image",Blockly.FieldImage);Blockly.FieldNumber=function(a,b,c,d,e){this.setConstraints(b,c,d);a=this.doClassValidation_(a);null===a&&(a=0);Blockly.FieldNumber.superClass_.constructor.call(this,a,e)};goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.fromJson=function(a){return new Blockly.FieldNumber(a.value,a.min,a.max,a.precision)};Blockly.FieldNumber.prototype.SERIALIZABLE=!0; Blockly.FieldNumber.prototype.setConstraints=function(a,b,c){c=parseFloat(c);this.precision_=isNaN(c)?0:c;c=this.precision_.toString();var d=c.indexOf(".");this.fractionalDigits_=-1==d?-1:c.length-(d+1);a=parseFloat(a);this.min_=isNaN(a)?-Infinity:a;b=parseFloat(b);this.max_=isNaN(b)?Infinity:b;this.setValue(this.getValue())}; Blockly.FieldNumber.prototype.doClassValidation_=function(a){if(null===a||void 0===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=parseFloat(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);return a=-1==this.fractionalDigits_?a:Number(a.toFixed(this.fractionalDigits_))};Blockly.Field.register("field_number",Blockly.FieldNumber);Blockly.FieldVariable=function(a,b,c,d){this.menuGenerator_=Blockly.FieldVariable.dropdownCreate;this.size_=new goog.math.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);this.setValidator(b);this.defaultVariableName=a||"";this.setTypes_(c,d);this.value_=null};goog.inherits(Blockly.FieldVariable,Blockly.FieldDropdown);Blockly.FieldVariable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.variable);return new Blockly.FieldVariable(b,null,a.variableTypes,a.defaultType)}; Blockly.FieldVariable.prototype.workspace_=null;Blockly.FieldVariable.prototype.SERIALIZABLE=!0;Blockly.FieldVariable.prototype.initModel=function(){if(!this.variable_){var a=Blockly.Variables.getOrCreateVariablePackage(this.workspace_,null,this.defaultVariableName,this.defaultType_);Blockly.Events.disable();this.setValue(a.getId());Blockly.Events.enable()}}; @@ -1673,10 +1779,10 @@ Blockly.Generator.prototype.provideFunction_=function(a,b){if(!this.definitions_ Blockly.Generator.prototype.finish=function(a){return a};Blockly.Generator.prototype.scrubNakedValue=function(a){return a};Blockly.Names=function(a,b){this.variablePrefix_=b||"";this.reservedDict_=Object.create(null);if(a)for(var c=a.split(","),d=0;d + +