blockly
Version:
Blockly is a library for building visual programming editors.
102 lines (100 loc) • 1.09 MB
JavaScript
// Do not edit this file; automatically generated.
/* eslint-disable */
;(function(root, factory) {
if (typeof define === 'function' && define.amd) { // AMD
define([], factory);
} else if (typeof exports === 'object') { // Node.js
module.exports = factory();
} else { // Browser
root.Blockly = factory();
}
}(this, function() {
const $={};
/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,b){a.raw=b;return a};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};
$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};$jscomp.arrayFromIterable=function(a){return a instanceof Array?a:$jscomp.arrayFromIterator($jscomp.makeIterator(a))};$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};$jscomp.polyfill=function(a,b,c,d){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,d):$jscomp.polyfillUnisolated(a,b,c,d))};
$jscomp.polyfillUnisolated=function(a,b,c,d){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
$jscomp.polyfillIsolated=function(a,b,c,d){var e=a.split(".");a=1===e.length;d=e[0];d=!a&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<e.length-1;f++){var g=e[f];if(!(g in d))return;d=d[g]}e=e[e.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?d[e]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:b}):b!==c&&(void 0===$jscomp.propertyToPolyfillSymbol[e]&&(c=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+c+"$"+e),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[e],{configurable:!0,writable:!0,value:b})))};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)$jscomp.owns(d,e)&&(a[e]=d[e])}return a};$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");
$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b};
$jscomp.getConstructImplementation=function(){function a(){function c(){}new c;Reflect.construct(c,[],function(){});return new c instanceof c}if($jscomp.TRUST_ES6_POLYFILLS&&"undefined"!=typeof Reflect&&Reflect.construct){if(a())return Reflect.construct;var b=Reflect.construct;return function(c,d,e){c=b(c,d);e&&Reflect.setPrototypeOf(c,e.prototype);return c}}return function(c,d,e){void 0===e&&(e=c);e=$jscomp.objectCreate(e.prototype||Object.prototype);return Function.prototype.apply.call(c,e,d)||
e}};$jscomp.construct={valueOf:$jscomp.getConstructImplementation}.valueOf();$jscomp.underscoreProtoCanBeSet=function(){var a={a:!0},b={};try{return b.__proto__=a,b.a}catch(c){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null;
$jscomp.inherits=function(a,b){a.prototype=$jscomp.objectCreate(b.prototype);a.prototype.constructor=a;if($jscomp.setPrototypeOf){var c=$jscomp.setPrototypeOf;c(a,b)}else for(c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.superClass_=b.prototype};$jscomp.polyfill("Reflect",function(a){return a?a:{}},"es6","es3");$jscomp.polyfill("Reflect.construct",function(a){return $jscomp.construct},"es6","es3");
$jscomp.polyfill("Reflect.setPrototypeOf",function(a){if(a)return a;if($jscomp.setPrototypeOf){var b=$jscomp.setPrototypeOf;return function(c,d){try{return b(c,d),!0}catch(e){return!1}}}return null},"es6","es5");$jscomp.polyfill("globalThis",function(a){return a||$jscomp.global},"es_2020","es3");
$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
$jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=$jscomp.checkStringArgs(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}},"es6","es3");$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(a){if(a)return a;var b=function(f,g){this.$jscomp$symbol$id_=f;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:g})};b.prototype.toString=function(){return this.$jscomp$symbol$id_};var c="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",d=0,e=function(f){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(f||"")+"_"+d++,f)};return e},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=$jscomp.global[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&$jscomp.defineProperty(d.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return a},"es6",
"es3");$jscomp.iteratorPrototype=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a};$jscomp.iteratorFromArray=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(b){return b})}},"es6","es3");
$jscomp.polyfill("Object.setPrototypeOf",function(a){return a||$jscomp.setPrototypeOf},"es6","es5");$jscomp.polyfill("Array.prototype.values",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(b,c){return c})}},"es8","es3");$jscomp.polyfill("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)$jscomp.owns(b,d)&&c.push([d,b[d]]);return c}},"es8","es3");
$jscomp.polyfill("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}},"es6","es5");$jscomp.polyfill("Reflect.ownKeys",function(a){return a?a:function(b){var c=[],d=Object.getOwnPropertyNames(b);b=Object.getOwnPropertySymbols(b);for(var e=0;e<d.length;e++)("jscomp_symbol_"==d[e].substring(0,14)?b:c).push(d[e]);return c.concat(b)}},"es6","es5");
$jscomp.polyfill("Object.getOwnPropertyDescriptors",function(a){return a?a:function(b){for(var c={},d=Reflect.ownKeys(b),e=0;e<d.length;e++)c[d[e]]=Object.getOwnPropertyDescriptor(b,d[e]);return c}},"es8","es5");$jscomp.polyfill("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;0>c&&(c=Math.max(0,e+c));if(null==d||d>e)d=e;d=Number(d);0>d&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}},"es6","es3");
$jscomp.typedArrayFill=function(a){return a?a:Array.prototype.fill};$jscomp.polyfill("Int8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");
$jscomp.polyfill("Int32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float64Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==$jscomp.checkStringArgs(this,b,"includes").indexOf(b,c||0)}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=globalThis||root;
goog.define=function(a,b){return b};goog.DEBUG=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.provide=function(a){};goog.module=function(a){};goog.module.get=function(a){};goog.module.declareLegacyNamespace=function(){};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.require=function(a){};goog.requireType=function(a){};var module$exports$Blockly$utils$deprecation={warn:function(a,b,c,d){a=a+" was deprecated on "+b+" and will be deleted on "+c+".";d&&(a+="\nUse "+d+" instead.");console.warn(a)}};var module$exports$Blockly$Css={},module$contents$Blockly$Css_injected=!1;module$exports$Blockly$Css.register=function(a){if(module$contents$Blockly$Css_injected)throw Error("CSS already injected");Array.isArray(a)?((0,module$exports$Blockly$utils$deprecation.warn)("Registering CSS by passing an array of strings","September 2021","September 2022","css.register passing a multiline string"),module$exports$Blockly$Css.content+="\n"+a.join("\n")):module$exports$Blockly$Css.content+="\n"+a};
module$exports$Blockly$Css.inject=function(a,b){module$contents$Blockly$Css_injected||(module$contents$Blockly$Css_injected=!0,a&&(a=b.replace(/[\\/]$/,""),b=module$exports$Blockly$Css.content.replace(/<<<PATH>>>/g,a),module$exports$Blockly$Css.content="",a=document.createElement("style"),a.id="blockly-common-style",b=document.createTextNode(b),a.appendChild(b),document.head.insertBefore(a,document.head.firstChild)))};module$exports$Blockly$Css.content='\n .blocklySvg {\n background-color: #fff;\n outline: none;\n overflow: hidden; /* IE overflows by default. */\n position: absolute;\n display: block;\n }\n\n .blocklyWidgetDiv {\n display: none;\n position: absolute;\n z-index: 99999; /* big value for bootstrap3 compatibility */\n }\n\n .injectionDiv {\n height: 100%;\n position: relative;\n overflow: hidden; /* So blocks in drag surface disappear at edges */\n touch-action: none;\n }\n\n .blocklyNonSelectable {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n\n .blocklyWsDragSurface {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n /* Added as a separate rule with multiple classes to make it more specific\n than a bootstrap rule that selects svg:root. See issue #1275 for context.\n */\n .blocklyWsDragSurface.blocklyOverflowVisible {\n overflow: visible;\n }\n\n .blocklyBlockDragSurface {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: visible !important;\n z-index: 50; /* Display below toolbox, but above everything else. */\n }\n\n .blocklyBlockCanvas.blocklyCanvasTransitioning,\n .blocklyBubbleCanvas.blocklyCanvasTransitioning {\n transition: transform .5s;\n }\n\n .blocklyTooltipDiv {\n background-color: #ffffc7;\n border: 1px solid #ddc;\n box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);\n color: #000;\n display: none;\n font: 9pt sans-serif;\n opacity: .9;\n padding: 2px;\n position: absolute;\n z-index: 100000; /* big value for bootstrap3 compatibility */\n }\n\n .blocklyDropDownDiv {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1000;\n display: none;\n border: 1px solid;\n border-color: #dadce0;\n background-color: #fff;\n border-radius: 2px;\n padding: 4px;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n }\n\n .blocklyDropDownDiv.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n }\n\n .blocklyDropDownContent {\n max-height: 300px; // @todo: spec for maximum height.\n overflow: auto;\n overflow-x: hidden;\n position: relative;\n }\n\n .blocklyDropDownArrow {\n position: absolute;\n left: 0;\n top: 0;\n width: 16px;\n height: 16px;\n z-index: -1;\n background-color: inherit;\n border-color: inherit;\n }\n\n .blocklyDropDownButton {\n display: inline-block;\n float: left;\n padding: 0;\n margin: 4px;\n border-radius: 4px;\n outline: none;\n border: 1px solid;\n transition: box-shadow .1s;\n cursor: pointer;\n }\n\n .blocklyArrowTop {\n border-top: 1px solid;\n border-left: 1px solid;\n border-top-left-radius: 4px;\n border-color: inherit;\n }\n\n .blocklyArrowBottom {\n border-bottom: 1px solid;\n border-right: 1px solid;\n border-bottom-right-radius: 4px;\n border-color: inherit;\n }\n\n .blocklyResizeSE {\n cursor: se-resize;\n fill: #aaa;\n }\n\n .blocklyResizeSW {\n cursor: sw-resize;\n fill: #aaa;\n }\n\n .blocklyResizeLine {\n stroke: #515A5A;\n stroke-width: 1;\n }\n\n .blocklyHighlightedConnectionPath {\n fill: none;\n stroke: #fc3;\n stroke-width: 4px;\n }\n\n .blocklyPathLight {\n fill: none;\n stroke-linecap: round;\n stroke-width: 1;\n }\n\n .blocklySelected>.blocklyPathLight {\n display: none;\n }\n\n .blocklyDraggable {\n /* backup for browsers (e.g. IE11) that don\'t support grab */\n cursor: url("<<<PATH>>>/handopen.cur"), auto;\n cursor: grab;\n cursor: -webkit-grab;\n }\n\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n .blocklyDragging {\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n /* Changes cursor on mouse down. Not effective in Firefox because of\n https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */\n .blocklyDraggable:active {\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n /* Change the cursor on the whole drag surface in case the mouse gets\n ahead of block during a drag. This way the cursor is still a closed hand.\n */\n .blocklyBlockDragSurface .blocklyDraggable {\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .blocklyDragging.blocklyDraggingDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n }\n\n .blocklyDragging>.blocklyPath,\n .blocklyDragging>.blocklyPathLight {\n fill-opacity: .8;\n stroke-opacity: .8;\n }\n\n .blocklyDragging>.blocklyPathDark {\n display: none;\n }\n\n .blocklyDisabled>.blocklyPath {\n fill-opacity: .5;\n stroke-opacity: .5;\n }\n\n .blocklyDisabled>.blocklyPathLight,\n .blocklyDisabled>.blocklyPathDark {\n display: none;\n }\n\n .blocklyInsertionMarker>.blocklyPath,\n .blocklyInsertionMarker>.blocklyPathLight,\n .blocklyInsertionMarker>.blocklyPathDark {\n fill-opacity: .2;\n stroke: none;\n }\n\n .blocklyMultilineText {\n font-family: monospace;\n }\n\n .blocklyNonEditableText>text {\n pointer-events: none;\n }\n\n .blocklyFlyout {\n position: absolute;\n z-index: 20;\n }\n\n .blocklyText text {\n cursor: default;\n }\n\n /*\n Don\'t allow users to select text. It gets annoying when trying to\n drag a block and selected text moves instead.\n */\n .blocklySvg text,\n .blocklyBlockDragSurface text {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n cursor: inherit;\n }\n\n .blocklyHidden {\n display: none;\n }\n\n .blocklyFieldDropdown:not(.blocklyHidden) {\n display: block;\n }\n\n .blocklyIconGroup {\n cursor: default;\n }\n\n .blocklyIconGroup:not(:hover),\n .blocklyIconGroupReadonly {\n opacity: .6;\n }\n\n .blocklyIconShape {\n fill: #00f;\n stroke: #fff;\n stroke-width: 1px;\n }\n\n .blocklyIconSymbol {\n fill: #fff;\n }\n\n .blocklyMinimalBody {\n margin: 0;\n padding: 0;\n }\n\n .blocklyHtmlInput {\n border: none;\n border-radius: 4px;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0;\n width: 100%;\n text-align: center;\n display: block;\n box-sizing: border-box;\n }\n\n /* Edge and IE introduce a close icon when the input value is longer than a\n certain length. This affects our sizing calculations of the text input.\n Hiding the close icon to avoid that. */\n .blocklyHtmlInput::-ms-clear {\n display: none;\n }\n\n .blocklyMainBackground {\n stroke-width: 1;\n stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */\n }\n\n .blocklyMutatorBackground {\n fill: #fff;\n stroke: #ddd;\n stroke-width: 1;\n }\n\n .blocklyFlyoutBackground {\n fill: #ddd;\n fill-opacity: .8;\n }\n\n .blocklyMainWorkspaceScrollbar {\n z-index: 20;\n }\n\n .blocklyFlyoutScrollbar {\n z-index: 30;\n }\n\n .blocklyScrollbarHorizontal,\n .blocklyScrollbarVertical {\n position: absolute;\n outline: none;\n }\n\n .blocklyScrollbarBackground {\n opacity: 0;\n }\n\n .blocklyScrollbarHandle {\n fill: #ccc;\n }\n\n .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n .blocklyScrollbarHandle:hover {\n fill: #bbb;\n }\n\n /* Darken flyout scrollbars due to being on a grey background. */\n /* By contrast, workspace scrollbars are on a white background. */\n .blocklyFlyout .blocklyScrollbarHandle {\n fill: #bbb;\n }\n\n .blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n .blocklyFlyout .blocklyScrollbarHandle:hover {\n fill: #aaa;\n }\n\n .blocklyInvalidInput {\n background: #faa;\n }\n\n .blocklyVerticalMarker {\n stroke-width: 3px;\n fill: rgba(255,255,255,.5);\n pointer-events: none;\n }\n\n .blocklyComputeCanvas {\n position: absolute;\n width: 0;\n height: 0;\n }\n\n .blocklyNoPointerEvents {\n pointer-events: none;\n }\n\n .blocklyContextMenu {\n border-radius: 4px;\n max-height: 100%;\n }\n\n .blocklyDropdownMenu {\n border-radius: 2px;\n padding: 0 !important;\n }\n\n .blocklyDropdownMenu .blocklyMenuItem {\n /* 28px on the left for icon or checkbox. */\n padding-left: 28px;\n }\n\n /* BiDi override for the resting state. */\n .blocklyDropdownMenu .blocklyMenuItemRtl {\n /* Flip left/right padding for BiDi. */\n padding-left: 5px;\n padding-right: 28px;\n }\n\n .blocklyWidgetDiv .blocklyMenu {\n background: #fff;\n border: 1px solid transparent;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n font: normal 13px Arial, sans-serif;\n margin: 0;\n outline: none;\n padding: 4px 0;\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 100%;\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n }\n\n .blocklyWidgetDiv .blocklyMenu.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n }\n\n .blocklyDropDownDiv .blocklyMenu {\n background: inherit; /* Compatibility with gapi, reset from goog-menu */\n border: inherit; /* Compatibility with gapi, reset from goog-menu */\n font: normal 13px "Helvetica Neue", Helvetica, sans-serif;\n outline: none;\n position: relative; /* Compatibility with gapi, reset from goog-menu */\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n }\n\n /* State: resting. */\n .blocklyMenuItem {\n border: none;\n color: #000;\n cursor: pointer;\n list-style: none;\n margin: 0;\n /* 7em on the right for shortcut. */\n min-width: 7em;\n padding: 6px 15px;\n white-space: nowrap;\n }\n\n /* State: disabled. */\n .blocklyMenuItemDisabled {\n color: #ccc;\n cursor: inherit;\n }\n\n /* State: hover. */\n .blocklyMenuItemHighlight {\n background-color: rgba(0,0,0,.1);\n }\n\n /* State: selected/checked. */\n .blocklyMenuItemCheckbox {\n height: 16px;\n position: absolute;\n width: 16px;\n }\n\n .blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n position: static; /* Scroll with the menu. */\n }\n\n .blocklyMenuItemRtl .blocklyMenuItemCheckbox {\n float: right;\n margin-right: -24px;\n }\n';var module$contents$Blockly$utils$string_wrapLine,module$contents$Blockly$utils$string_wrapScore,module$contents$Blockly$utils$string_wrapMutate,module$contents$Blockly$utils$string_wrapToText;
$.module$exports$Blockly$utils$string={startsWith:function(a,b){return 0===a.lastIndexOf(b,0)},shortestStringLength:function(a){return a.length?a.reduce(function(b,c){return b.length<c.length?b:c}).length:0},commonWordPrefix:function(a,b){if(!a.length)return 0;if(1===a.length)return a[0].length;var c=0;b=b||(0,$.module$exports$Blockly$utils$string.shortestStringLength)(a);var d;for(d=0;d<b;d++){for(var e=a[0][d],f=1;f<a.length;f++)if(e!==a[f][d])return c;" "===e&&(c=d+1)}for(e=1;e<a.length;e++)if((f=
a[e][d])&&" "!==f)return c;return b},commonWordSuffix:function(a,b){if(!a.length)return 0;if(1===a.length)return a[0].length;var c=0;b=b||(0,$.module$exports$Blockly$utils$string.shortestStringLength)(a);var d;for(d=0;d<b;d++){for(var e=a[0].substr(-d-1,1),f=1;f<a.length;f++)if(e!==a[f].substr(-d-1,1))return c;" "===e&&(c=d+1)}for(e=1;e<a.length;e++)if((f=a[e].charAt(a[e].length-d-1))&&" "!==f)return c;return b},wrap:function(a,b){a=a.split("\n");for(var c=0;c<a.length;c++)a[c]=module$contents$Blockly$utils$string_wrapLine(a[c],
b);return a.join("\n")}};module$contents$Blockly$utils$string_wrapLine=function(a,b){if(a.length<=b)return a;for(var c=a.trim().split(/\s+/),d=0;d<c.length;d++)c[d].length>b&&(b=c[d].length);var e=-Infinity,f=1;do{d=e;var g=a;a=[];e=c.length/f;for(var h=1,k=0;k<c.length-1;k++)h<(k+1.5)/e?(h++,a[k]=!0):a[k]=!1;a=module$contents$Blockly$utils$string_wrapMutate(c,a,b);e=module$contents$Blockly$utils$string_wrapScore(c,a,b);a=module$contents$Blockly$utils$string_wrapToText(c,a);f++}while(e>d);return g};
module$contents$Blockly$utils$string_wrapScore=function(a,b,c){for(var d=[0],e=[],f=0;f<a.length;f++)d[d.length-1]+=a[f].length,!0===b[f]?(d.push(0),e.push(a[f].charAt(a[f].length-1))):!1===b[f]&&d[d.length-1]++;a=Math.max.apply(Math,d);for(f=b=0;f<d.length;f++)b-=2*Math.pow(Math.abs(c-d[f]),1.5),b-=Math.pow(a-d[f],1.5),-1!==".?!".indexOf(e[f])?b+=c/3:-1!==",;)]}".indexOf(e[f])&&(b+=c/4);1<d.length&&d[d.length-1]<=d[d.length-2]&&(b+=.5);return b};
module$contents$Blockly$utils$string_wrapMutate=function(a,b,c){for(var d=module$contents$Blockly$utils$string_wrapScore(a,b,c),e,f=0;f<b.length-1;f++)if(b[f]!==b[f+1]){var g=[].concat(b);g[f]=!g[f];g[f+1]=!g[f+1];var h=module$contents$Blockly$utils$string_wrapScore(a,g,c);h>d&&(d=h,e=g)}return e?module$contents$Blockly$utils$string_wrapMutate(a,e,c):b};module$contents$Blockly$utils$string_wrapToText=function(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),void 0!==b[d]&&c.push(b[d]?"\n":" ");return c.join("")};
$.module$exports$Blockly$utils$string.isNumber=function(a){return/^\s*-?\d+(\.\d+)?\s*$/.test(a)};$.module$exports$Blockly$ConnectionType={ConnectionType:{INPUT_VALUE:1,OUTPUT_VALUE:2,NEXT_STATEMENT:3,PREVIOUS_STATEMENT:4}};$.module$exports$Blockly$internalConstants={LINE_MODE_MULTIPLIER:40,PAGE_MODE_MULTIPLIER:125,DRAG_RADIUS:5,FLYOUT_DRAG_RADIUS:10,SNAP_RADIUS:28};$.module$exports$Blockly$internalConstants.CONNECTING_SNAP_RADIUS=$.module$exports$Blockly$internalConstants.SNAP_RADIUS;$.module$exports$Blockly$internalConstants.CURRENT_CONNECTION_PREFERENCE=8;$.module$exports$Blockly$internalConstants.BUMP_DELAY=250;$.module$exports$Blockly$internalConstants.BUMP_RANDOMNESS=10;
$.module$exports$Blockly$internalConstants.COLLAPSE_CHARS=30;$.module$exports$Blockly$internalConstants.LONGPRESS=750;$.module$exports$Blockly$internalConstants.SOUND_LIMIT=100;$.module$exports$Blockly$internalConstants.DRAG_STACK=!0;$.module$exports$Blockly$internalConstants.HSV_SATURATION=.45;$.module$exports$Blockly$internalConstants.HSV_VALUE=.65;$.module$exports$Blockly$internalConstants.SPRITE={width:96,height:124,url:"sprites.png"};$.module$exports$Blockly$internalConstants.DRAG_NONE=0;
$.module$exports$Blockly$internalConstants.DRAG_STICKY=1;$.module$exports$Blockly$internalConstants.DRAG_BEGIN=1;$.module$exports$Blockly$internalConstants.DRAG_FREE=2;$.module$exports$Blockly$internalConstants.OPPOSITE_TYPE=[];$.module$exports$Blockly$internalConstants.OPPOSITE_TYPE[$.module$exports$Blockly$ConnectionType.ConnectionType.INPUT_VALUE]=$.module$exports$Blockly$ConnectionType.ConnectionType.OUTPUT_VALUE;
$.module$exports$Blockly$internalConstants.OPPOSITE_TYPE[$.module$exports$Blockly$ConnectionType.ConnectionType.OUTPUT_VALUE]=$.module$exports$Blockly$ConnectionType.ConnectionType.INPUT_VALUE;$.module$exports$Blockly$internalConstants.OPPOSITE_TYPE[$.module$exports$Blockly$ConnectionType.ConnectionType.NEXT_STATEMENT]=$.module$exports$Blockly$ConnectionType.ConnectionType.PREVIOUS_STATEMENT;
$.module$exports$Blockly$internalConstants.OPPOSITE_TYPE[$.module$exports$Blockly$ConnectionType.ConnectionType.PREVIOUS_STATEMENT]=$.module$exports$Blockly$ConnectionType.ConnectionType.NEXT_STATEMENT;$.module$exports$Blockly$internalConstants.RENAME_VARIABLE_ID="RENAME_VARIABLE_ID";$.module$exports$Blockly$internalConstants.DELETE_VARIABLE_ID="DELETE_VARIABLE_ID";$.module$exports$Blockly$utils$global={};$.module$exports$Blockly$utils$global.globalThis=function(){return"object"===typeof globalThis?globalThis:"object"===typeof self?self:"object"===typeof window?window:"object"===typeof global?global:this}();var module$exports$Blockly$Touch={};module$exports$Blockly$Touch.TOUCH_ENABLED="ontouchstart"in $.module$exports$Blockly$utils$global.globalThis||!!($.module$exports$Blockly$utils$global.globalThis.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!$.module$exports$Blockly$utils$global.globalThis.navigator||!$.module$exports$Blockly$utils$global.globalThis.navigator.maxTouchPoints&&!$.module$exports$Blockly$utils$global.globalThis.navigator.msMaxTouchPoints);
var module$contents$Blockly$Touch_touchIdentifier_=null;module$exports$Blockly$Touch.TOUCH_MAP={};
$.module$exports$Blockly$utils$global.globalThis.PointerEvent?module$exports$Blockly$Touch.TOUCH_MAP={mousedown:["pointerdown"],mouseenter:["pointerenter"],mouseleave:["pointerleave"],mousemove:["pointermove"],mouseout:["pointerout"],mouseover:["pointerover"],mouseup:["pointerup","pointercancel"],touchend:["pointerup"],touchcancel:["pointercancel"]}:module$exports$Blockly$Touch.TOUCH_ENABLED&&(module$exports$Blockly$Touch.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend",
"touchcancel"]});var module$contents$Blockly$Touch_longPid_=0;module$exports$Blockly$Touch.longStart=function(a,b){(0,module$exports$Blockly$Touch.longStop)();a.changedTouches&&1!==a.changedTouches.length||(module$contents$Blockly$Touch_longPid_=setTimeout(function(){a.changedTouches&&(a.button=2,a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY);b&&b.handleRightClick(a)},$.module$exports$Blockly$internalConstants.LONGPRESS))};
module$exports$Blockly$Touch.longStop=function(){module$contents$Blockly$Touch_longPid_&&(clearTimeout(module$contents$Blockly$Touch_longPid_),module$contents$Blockly$Touch_longPid_=0)};module$exports$Blockly$Touch.clearTouchIdentifier=function(){module$contents$Blockly$Touch_touchIdentifier_=null};module$exports$Blockly$Touch.shouldHandleEvent=function(a){return!(0,module$exports$Blockly$Touch.isMouseOrTouchEvent)(a)||(0,module$exports$Blockly$Touch.checkTouchIdentifier)(a)};
module$exports$Blockly$Touch.getTouchIdentifierFromEvent=function(a){return void 0!==a.pointerId?a.pointerId:a.changedTouches&&a.changedTouches[0]&&void 0!==a.changedTouches[0].identifier&&null!==a.changedTouches[0].identifier?a.changedTouches[0].identifier:"mouse"};
module$exports$Blockly$Touch.checkTouchIdentifier=function(a){var b=(0,module$exports$Blockly$Touch.getTouchIdentifierFromEvent)(a);return void 0!==module$contents$Blockly$Touch_touchIdentifier_&&null!==module$contents$Blockly$Touch_touchIdentifier_?module$contents$Blockly$Touch_touchIdentifier_===b:"mousedown"===a.type||"touchstart"===a.type||"pointerdown"===a.type?(module$contents$Blockly$Touch_touchIdentifier_=b,!0):!1};
module$exports$Blockly$Touch.setClientFromTouch=function(a){if((0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"touch")){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}};module$exports$Blockly$Touch.isMouseOrTouchEvent=function(a){return(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"touch")||(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"mouse")||(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"pointer")};
module$exports$Blockly$Touch.isTouchEvent=function(a){return(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"touch")||(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"pointer")};
module$exports$Blockly$Touch.splitEventByTouches=function(a){var b=[];if(a.changedTouches)for(var c=0;c<a.changedTouches.length;c++)b[c]={type:a.type,changedTouches:[a.changedTouches[c]],target:a.target,stopPropagation:function(){a.stopPropagation()},preventDefault:function(){a.preventDefault()}};else b.push(a);return b};var module$exports$Blockly$utils$userAgent={};
(function(a){function b(d){return-1!==c.indexOf(d.toUpperCase())}module$exports$Blockly$utils$userAgent.raw=a;var c=module$exports$Blockly$utils$userAgent.raw.toUpperCase();module$exports$Blockly$utils$userAgent.IE=b("Trident")||b("MSIE");module$exports$Blockly$utils$userAgent.EDGE=b("Edge");module$exports$Blockly$utils$userAgent.JavaFx=b("JavaFX");module$exports$Blockly$utils$userAgent.CHROME=(b("Chrome")||b("CriOS"))&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.WEBKIT=
b("WebKit")&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.GECKO=b("Gecko")&&!module$exports$Blockly$utils$userAgent.WEBKIT&&!module$exports$Blockly$utils$userAgent.IE&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.ANDROID=b("Android");a=$.module$exports$Blockly$utils$global.globalThis.navigator&&$.module$exports$Blockly$utils$global.globalThis.navigator.maxTouchPoints;module$exports$Blockly$utils$userAgent.IPAD=b("iPad")||
b("Macintosh")&&0<a;module$exports$Blockly$utils$userAgent.IPOD=b("iPod");module$exports$Blockly$utils$userAgent.IPHONE=b("iPhone")&&!module$exports$Blockly$utils$userAgent.IPAD&&!module$exports$Blockly$utils$userAgent.IPOD;module$exports$Blockly$utils$userAgent.MAC=b("Macintosh");module$exports$Blockly$utils$userAgent.TABLET=module$exports$Blockly$utils$userAgent.IPAD||module$exports$Blockly$utils$userAgent.ANDROID&&!b("Mobile")||b("Silk");module$exports$Blockly$utils$userAgent.MOBILE=!module$exports$Blockly$utils$userAgent.TABLET&&
(module$exports$Blockly$utils$userAgent.IPOD||module$exports$Blockly$utils$userAgent.IPHONE||module$exports$Blockly$utils$userAgent.ANDROID||b("IEMobile"))})($.module$exports$Blockly$utils$global.globalThis.navigator&&$.module$exports$Blockly$utils$global.globalThis.navigator.userAgent||"");var module$exports$Blockly$browserEvents={conditionalBind:function(a,b,c,d,e,f){var g=!1,h=function(p){var q=!e;p=(0,module$exports$Blockly$Touch.splitEventByTouches)(p);for(var r=0;r<p.length;r++){var t=p[r];if(!q||(0,module$exports$Blockly$Touch.shouldHandleEvent)(t))(0,module$exports$Blockly$Touch.setClientFromTouch)(t),c?d.call(c,t):d(t),g=!0}},k=[];if($.module$exports$Blockly$utils$global.globalThis.PointerEvent&&b in module$exports$Blockly$Touch.TOUCH_MAP)for(var l=0;l<module$exports$Blockly$Touch.TOUCH_MAP[b].length;l++){var m=
module$exports$Blockly$Touch.TOUCH_MAP[b][l];a.addEventListener(m,h,!1);k.push([a,m,h])}else if(a.addEventListener(b,h,!1),k.push([a,b,h]),b in module$exports$Blockly$Touch.TOUCH_MAP)for(l=function(p){h(p);var q=!f;g&&q&&p.preventDefault()},m=0;m<module$exports$Blockly$Touch.TOUCH_MAP[b].length;m++){var n=module$exports$Blockly$Touch.TOUCH_MAP[b][m];a.addEventListener(n,l,!1);k.push([a,n,l])}return k},bind:function(a,b,c,d){var e=function(l){c?d.call(c,l):d(l)},f=[];if($.module$exports$Blockly$utils$global.globalThis.PointerEvent&&
b in module$exports$Blockly$Touch.TOUCH_MAP)for(var g=0;g<module$exports$Blockly$Touch.TOUCH_MAP[b].length;g++){var h=module$exports$Blockly$Touch.TOUCH_MAP[b][g];a.addEventListener(h,e,!1);f.push([a,h,e])}else if(a.addEventListener(b,e,!1),f.push([a,b,e]),b in module$exports$Blockly$Touch.TOUCH_MAP)for(g=function(l){if(l.changedTouches&&1===l.changedTouches.length){var m=l.changedTouches[0];l.clientX=m.clientX;l.clientY=m.clientY}e(l);l.preventDefault()},h=0;h<module$exports$Blockly$Touch.TOUCH_MAP[b].length;h++){var k=
module$exports$Blockly$Touch.TOUCH_MAP[b][h];a.addEventListener(k,g,!1);f.push([a,k,g])}return f},unbind:function(a){for(var b;a.length;){b=a.pop();var c=b[0],d=b[1];b=b[2];c.removeEventListener(d,b,!1)}return b},isTargetInput:function(a){return"textarea"===a.target.type||"text"===a.target.type||"number"===a.target.type||"email"===a.target.type||"password"===a.target.type||"search"===a.target.type||"tel"===a.target.type||"url"===a.target.type||a.target.isContentEditable||a.target.dataset&&"true"===
a.target.dataset.isTextInput},isRightButton:function(a){return a.ctrlKey&&module$exports$Blockly$utils$userAgent.MAC?!0:2===a.button},mouseToSvg:function(a,b,c){var d=b.createSVGPoint();d.x=a.clientX;d.y=a.clientY;c||(c=b.getScreenCTM().inverse());return d.matrixTransform(c)},getScrollDeltaPixels:function(a){switch(a.deltaMode){default:return{x:a.deltaX,y:a.deltaY};case 1:return{x:a.deltaX*$.module$exports$Blockly$internalConstants.LINE_MODE_MULTIPLIER,y:a.deltaY*$.module$exports$Blockly$internalConstants.LINE_MODE_MULTIPLIER};
case 2:return{x:a.deltaX*$.module$exports$Blockly$internalConstants.PAGE_MODE_MULTIPLIER,y:a.deltaY*$.module$exports$Blockly$internalConstants.PAGE_MODE_MULTIPLIER}}}};$.module$exports$Blockly$blocks={};$.module$exports$Blockly$blocks.Blocks=Object.create(null);var module$contents$Blockly$common_mainWorkspace;$.module$exports$Blockly$common={};$.module$exports$Blockly$common.getMainWorkspace=function(){return module$contents$Blockly$common_mainWorkspace};$.module$exports$Blockly$common.setMainWorkspace=function(a){module$contents$Blockly$common_mainWorkspace=a};var module$contents$Blockly$common_selected=null;$.module$exports$Blockly$common.getSelected=function(){return module$contents$Blockly$common_selected};
$.module$exports$Blockly$common.setSelected=function(a){module$contents$Blockly$common_selected=a};var module$contents$Blockly$common_parentContainer;$.module$exports$Blockly$common.getParentContainer=function(){return module$contents$Blockly$common_parentContainer};$.module$exports$Blockly$common.setParentContainer=function(a){module$contents$Blockly$common_parentContainer=a};
$.module$exports$Blockly$common.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=a.getCachedParentSvgSize(),d=b.parentNode;if(d){var e=d.offsetWidth;d=d.offsetHeight;c.width!==e&&(b.setAttribute("width",e+"px"),a.setCachedParentSvgSize(e,null));c.height!==d&&(b.setAttribute("height",d+"px"),a.setCachedParentSvgSize(null,d));a.resize()}};$.module$exports$Blockly$common.draggingConnections=[];
$.module$exports$Blockly$common.getBlockTypeCounts=function(a,b){var c=Object.create(null),d=a.getDescendants(!0);b&&(a=a.getNextBlock())&&(a=d.indexOf(a),d.splice(a,d.length-a));for(a=0;b=d[a];a++)c[b.type]?c[b.type]++:c[b.type]=1;return c};var module$contents$Blockly$common_jsonInitFactory=function(a){return function(){this.jsonInit(a)}};
$.module$exports$Blockly$common.defineBlocksWithJsonArray=function(a){for(var b=0;b<a.length;b++){var c=a[b];if(c){var d=c.type;d?($.module$exports$Blockly$blocks.Blocks[d]&&console.warn("Block definition #"+b+' in JSON array overwrites prior definition of "'+d+'".'),$.module$exports$Blockly$blocks.Blocks[d]={init:module$contents$Blockly$common_jsonInitFactory(c)}):console.warn("Block definition #"+b+" in JSON array is missing a type attribute. Skipping.")}else console.warn("Block definition #"+b+
" in JSON array is "+c+". Skipping.")}};var module$exports$Blockly$Tooltip={},module$contents$Blockly$Tooltip_visible=!1;module$exports$Blockly$Tooltip.isVisible=function(){return module$contents$Blockly$Tooltip_visible};Object.defineProperties(module$exports$Blockly$Tooltip,{visible:{get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.Tooltip.visible","September 2021","September 2022","Blockly.Tooltip.isVisible()");return(0,module$exports$Blockly$Tooltip.isVisible)()}}});
var module$contents$Blockly$Tooltip_blocked=!1;module$exports$Blockly$Tooltip.LIMIT=50;var module$contents$Blockly$Tooltip_mouseOutPid=0,module$contents$Blockly$Tooltip_showPid=0,module$contents$Blockly$Tooltip_lastX=0,module$contents$Blockly$Tooltip_lastY=0,module$contents$Blockly$Tooltip_element=null,module$contents$Blockly$Tooltip_poisonedElement=null;module$exports$Blockly$Tooltip.OFFSET_X=0;module$exports$Blockly$Tooltip.OFFSET_Y=10;module$exports$Blockly$Tooltip.RADIUS_OK=10;
module$exports$Blockly$Tooltip.HOVER_MS=750;module$exports$Blockly$Tooltip.MARGINS=5;var module$contents$Blockly$Tooltip_DIV=null;module$exports$Blockly$Tooltip.getDiv=function(){return module$contents$Blockly$Tooltip_DIV};Object.defineProperties(module$exports$Blockly$Tooltip,{DIV:{get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.Tooltip.DIV","September 2021","September 2022","Blockly.Tooltip.getDiv()");return(0,module$exports$Blockly$Tooltip.getDiv)()}}});
module$exports$Blockly$Tooltip.getTooltipOfObject=function(a){if(a=module$contents$Blockly$Tooltip_getTargetObject(a)){for(a=a.tooltip;"function"===typeof a;)a=a();if("string"!==typeof a)throw Error("Tooltip function must return a string.");return a}return""};var module$contents$Blockly$Tooltip_getTargetObject=function(a){for(;a&&a.tooltip;){if("string"===typeof a.tooltip||"function"===typeof a.tooltip)return a;a=a.tooltip}return null};
module$exports$Blockly$Tooltip.createDom=function(){module$contents$Blockly$Tooltip_DIV||(module$contents$Blockly$Tooltip_DIV=document.createElement("div"),module$contents$Blockly$Tooltip_DIV.className="blocklyTooltipDiv",((0,$.module$exports$Blockly$common.getParentContainer)()||document.body).appendChild(module$contents$Blockly$Tooltip_DIV))};
module$exports$Blockly$Tooltip.bindMouseEvents=function(a){a.mouseOverWrapper_=(0,module$exports$Blockly$browserEvents.bind)(a,"mouseover",null,module$contents$Blockly$Tooltip_onMouseOver);a.mouseOutWrapper_=(0,module$exports$Blockly$browserEvents.bind)(a,"mouseout",null,module$contents$Blockly$Tooltip_onMouseOut);a.addEventListener("mousemove",module$contents$Blockly$Tooltip_onMouseMove,!1)};
module$exports$Blockly$Tooltip.unbindMouseEvents=function(a){a&&((0,module$exports$Blockly$browserEvents.unbind)(a.mouseOverWrapper_),(0,module$exports$Blockly$browserEvents.unbind)(a.mouseOutWrapper_),a.removeEventListener("mousemove",module$contents$Blockly$Tooltip_onMouseMove))};
var module$contents$Blockly$Tooltip_onMouseOver=function(a){module$contents$Blockly$Tooltip_blocked||(a=module$contents$Blockly$Tooltip_getTargetObject(a.currentTarget),module$contents$Blockly$Tooltip_element!==a&&((0,module$exports$Blockly$Tooltip.hide)(),module$contents$Blockly$Tooltip_poisonedElement=null,module$contents$Blockly$Tooltip_element=a),clearTimeout(module$contents$Blockly$Tooltip_mouseOutPid))},module$contents$Blockly$Tooltip_onMouseOut=function(a){module$contents$Blockly$Tooltip_blocked||
(module$contents$Blockly$Tooltip_mouseOutPid=setTimeout(function(){module$contents$Blockly$Tooltip_poisonedElement=module$contents$Blockly$Tooltip_element=null;(0,module$exports$Blockly$Tooltip.hide)()},1),clearTimeout(module$contents$Blockly$Tooltip_showPid))},module$contents$Blockly$Tooltip_onMouseMove=function(a){if(module$contents$Blockly$Tooltip_element&&module$contents$Blockly$Tooltip_element.tooltip&&!module$contents$Blockly$Tooltip_blocked)if(module$contents$Blockly$Tooltip_visible){var b=
module$contents$Blockly$Tooltip_lastX-a.pageX;a=module$contents$Blockly$Tooltip_lastY-a.pageY;Math.sqrt(b*b+a*a)>module$exports$Blockly$Tooltip.RADIUS_OK&&(0,module$exports$Blockly$Tooltip.hide)()}else module$contents$Blockly$Tooltip_poisonedElement!==module$contents$Blockly$Tooltip_element&&(clearTimeout(module$contents$Blockly$Tooltip_showPid),module$contents$Blockly$Tooltip_lastX=a.pageX,module$contents$Blockly$Tooltip_lastY=a.pageY,module$contents$Blockly$Tooltip_showPid=setTimeout(module$contents$Blockly$Tooltip_show,
module$exports$Blockly$Tooltip.HOVER_MS))};module$exports$Blockly$Tooltip.dispose=function(){module$contents$Blockly$Tooltip_poisonedElement=module$contents$Blockly$Tooltip_element=null;(0,module$exports$Blockly$Tooltip.hide)()};module$exports$Blockly$Tooltip.hide=function(){module$contents$Blockly$Tooltip_visible&&(module$contents$Blockly$Tooltip_visible=!1,module$contents$Blockly$Tooltip_DIV&&(module$contents$Blockly$Tooltip_DIV.style.display="none"));module$contents$Blockly$Tooltip_showPid&&clearTimeout(module$contents$Blockly$Tooltip_showPid)};
module$exports$Blockly$Tooltip.block=function(){(0,module$exports$Blockly$Tooltip.hide)();module$contents$Blockly$Tooltip_blocked=!0};module$exports$Blockly$Tooltip.unblock=function(){module$contents$Blockly$Tooltip_blocked=!1};
var module$contents$Blockly$Tooltip_show=function(){if(!module$contents$Blockly$Tooltip_blocked&&(module$contents$Blockly$Tooltip_poisonedElement=module$contents$Blockly$Tooltip_element,module$contents$Blockly$Tooltip_DIV)){module$contents$Blockly$Tooltip_DIV.textContent="";var a=(0,module$exports$Blockly$Tooltip.getTooltipOfObject)(module$contents$Blockly$Tooltip_element);a=(0,$.module$exports$Blockly$utils$string.wrap)(a,module$exports$Blockly$Tooltip.LIMIT);a=a.split("\n");for(var b=0;b<a.length;b++){var c=
document.createElement("div");c.appendChild(document.createTextNode(a[b]));module$contents$Blockly$Tooltip_DIV.appendChild(c)}a=module$contents$Blockly$Tooltip_element.RTL;b=document.documentElement.clientWidth;c=document.documentElement.clientHeight;module$contents$Blockly$Tooltip_DIV.style.direction=a?"rtl":"ltr";module$contents$Blockly$Tooltip_DIV.style.display="block";module$contents$Blockly$Tooltip_visible=!0;var d=module$contents$Blockly$Tooltip_lastX;d=a?d-(module$exports$Blockly$Tooltip.OFFSET_X+
module$contents$Blockly$Tooltip_DIV.offsetWidth):d+module$exports$Blockly$Tooltip.OFFSET_X;var e=module$contents$Blockly$Tooltip_lastY+module$exports$Blockly$Tooltip.OFFSET_Y;e+module$contents$Blockly$Tooltip_DIV.offsetHeight>c+window.scrollY&&(e-=module$contents$Blockly$Tooltip_DIV.offsetHeight+2*module$exports$Blockly$Tooltip.OFFSET_Y);a?d=Math.max(module$exports$Blockly$Tooltip.MARGINS-window.scrollX,d):d+module$contents$Blockly$Tooltip_DIV.offsetWidth>b+window.scrollX-2*module$exports$Blockly$Tooltip.MARGINS&&
(d=b-module$contents$Blockly$Tooltip_DIV.offsetWidth-2*module$exports$Blockly$Tooltip.MARGINS);module$contents$Blockly$Tooltip_DIV.style.top=e+"px";module$contents$Blockly$Tooltip_DIV.style.left=d+"px"}};var module$exports$Blockly$utils$dom={SVG_NS:"http://www.w3.org/2000/svg",HTML_NS:"http://www.w3.org/1999/xhtml",XLINK_NS:"http://www.w3.org/1999/xlink",NodeType:{ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_POSITION_CONTAINED_BY:16}},module$contents$Blockly$utils$dom_cacheWidths=null,module$contents$Blockly$utils$dom_cacheReference=0,module$contents$Blockly$utils$dom_canvasContext=null;
module$exports$Blockly$utils$dom.createSvgElement=function(a,b,c){a=document.createElementNS(module$exports$Blockly$utils$dom.SVG_NS,String(a));for(var d in b)a.setAttribute(d,b[d]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};module$exports$Blockly$utils$dom.addClass=function(a,b){var c=a.getAttribute("class")||"";if(-1!==(" "+c+" ").indexOf(" "+b+" "))return!1;c&&(c+=" ");a.setAttribute("class",c+b);return!0};
module$exports$Blockly$utils$dom.removeClasses=function(a,b){b=b.split(" ");for(var c=0;c<b.length;c++)(0,module$exports$Blockly$utils$dom.removeClass)(a,b[c])};module$exports$Blockly$utils$dom.removeClass=function(a,b){var c=a.getAttribute("class");if(-1===(" "+c+" ").indexOf(" "+b+" "))return!1;c=c.split(/\s+/);for(var d=0;d<c.length;d++)c[d]&&c[d]!==b||(c.splice(d,1),d--);c.length?a.setAttribute("class",c.join(" ")):a.removeAttribute("class");return!0};
module$exports$Blockly$utils$dom.hasClass=function(a,b){return-1!==(" "+a.getAttribute("class")+" ").indexOf(" "+b+" ")};module$exports$Blockly$utils$dom.removeNode=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};module$exports$Blockly$utils$dom.insertAfter=function(a,b){var c=b.nextSibling;b=b.parentNode;if(!b)throw Error("Reference node has no parent.");c?b.insertBefore(a,c):b.appendChild(a)};
module$exports$Blockly$utils$dom.containsNode=function(a,b){return!!(a.compareDocumentPosition(b)&module$exports$Blockly$utils$dom.NodeType.DOCUMENT_POSITION_CONTAINED_BY)};module$exports$Blockly$utils$dom.setCssTransform=function(a,b){a.style.transform=b;a.style["-webkit-transform"]=b};module$exports$Blockly$utils$dom.startTextWidthCache=function(){module$contents$Blockly$utils$dom_cacheReference++;module$contents$Blockly$utils$dom_cacheWidths||(module$contents$Blockly$utils$dom_cacheWidths=Object.create(null))};
module$exports$Blockly$utils$dom.stopTextWidthCache=function(){module$contents$Blockly$utils$dom_cacheReference--;module$contents$Blockly$utils$dom_cacheReference||(module$contents$Blockly$utils$dom_cacheWidths=null)};
module$exports$Blockly$utils$dom.getTextWidth=function(a){var b=a.textContent+"\n"+a.className.baseVal,c;if(module$contents$Blockly$utils$dom_cacheWidths&&(c=module$contents$Blockly$utils$dom_cacheWidths[b]))return c;try{c=module$exports$Blockly$utils$userAgent.IE||module$exports$Blockly$utils$userAgent.EDGE?a.getBBox().width:a.getComputedTextLength()}catch(d){return 8*a.textContent.length}module$contents$Blockly$utils$dom_cacheWidths&&(module$contents$Blockly$utils$dom_cacheWidths[b]=c);return c};
module$exports$Blockly$utils$dom.getFastTextWidth=function(a,b,c,d){return(0,module$exports$Blockly$utils$dom.getFastTextWidthWithSizeString)(a,b+"pt",c,d)};
module$exports$Blockly$utils$dom.getFastTextWidthWithSizeString=function(a,b,c,d){var e=a.textContent;a=e+"\n"+a.className.baseVal;var f;if(module$contents$Blockly$utils$dom_cacheWidths&&(f=module$contents$Blockly$utils$dom_cacheWidths[a]))return f;module$contents$Blockly$utils$dom_canvasContext||(f=document.createElement("canvas"),f.className="blocklyComputeCanvas",document.body.appendChild(f),module$contents$Blockly$utils$dom_canvasContext=f.getContext("2d"));module$contents$Blockly$utils$dom_canvasContext.font=
c+" "+b+" "+d;f=module$contents$Blockly$utils$dom_canvasContext.measureText(e).width;module$contents$Blockly$utils$dom_cacheWidths&&(module$contents$Blockly$utils$dom_cacheWidths[a]=f);return f};
module$exports$Blockly$utils$dom.measureFontMetrics=function(a,b,c,d){var e=document.createElement("span");e.style.font=c+" "+b+" "+d;e.textContent=a;a=document.createElement("div");a.style.width="1px";a.style.height=0;b=document.createElement("div");b.setAttribute("style","position: fixed; top: 0; left: 0; display: flex;");b.appendChild(e);b.appendChild(a);document.body.appendChild(b);c={height:0,baseline:0};try{b