{"code":"(window.webpackJsonpGUI=window.webpackJsonpGUI||[]).push([[24],{1483:function(t,e,o){(t.exports=o(9)(!1)).push([t.i,'.sa-contextmenu-colored .blocklyContextMenu {\\n background-color: var(--sa-contextmenu-bg);\\n border-color: var(--sa-contextmenu-border);\\n}\\n.sa-contextmenu-colored .blocklyContextMenu .goog-menuitem-highlight,\\n.sa-contextmenu-colored .s3dev-mi:hover {\\n background-color: #0001;\\n border-color: transparent !important;\\n}\\n.sa-contextmenu-colored .blocklyContextMenu .goog-menuitem[style*=\"border-top\"] {\\n border-top-color: var(--sa-contextmenu-border) !important;\\n}\\n.sa-contextmenu-colored .blocklyContextMenu .goog-menuitem .goog-menuitem-content {\\n color: var(--sa-contextmenu-text);\\n}\\n',\"\"])},1559:function(t,e,o){\"use strict\";o.r(e),o.d(e,\"resources\",(function(){return c}));var n=o(1385),r=o(1483);const c={\"userscript.js\":async function(t){let{addon:e,console:o}=t;const r=await e.tab.traps.getBlockly(),c=r.Gesture.prototype.handleRightClick;r.Gesture.prototype.handleRightClick=function(){const t=this.targetBlock_;for(var e=arguments.length,o=new Array(e),s=0;s{const e=r.WidgetDiv.DIV;if(!e)return;const o=t.svgPath_;if(!o)return;const c=Object(n.g)(o.getAttribute(\"fill\")),s=o.getAttribute(\"stroke\")||\"#0003\",i=r.Colours.text;e.classList.add(\"sa-contextmenu-colored\"),e.style.setProperty(\"--sa-contextmenu-bg\",c),e.style.setProperty(\"--sa-contextmenu-border\",s),e.style.setProperty(\"--sa-contextmenu-text\",i)})(t),i};const s=r.WidgetDiv.hide;r.WidgetDiv.hide=function(){r.WidgetDiv.DIV&&r.WidgetDiv.DIV.classList.remove(\"sa-contextmenu-colored\");for(var t=arguments.length,e=new Array(t),o=0;o {\n const widgetDiv = ScratchBlocks.WidgetDiv.DIV;\n if (!widgetDiv) {\n return;\n }\n const background = block.svgPath_;\n if (!background) {\n return;\n }\n const fill = Object(text_color_esm[\"g\" /* removeAlpha */])(background.getAttribute(\"fill\"));\n const border = background.getAttribute(\"stroke\") || \"#0003\";\n const text = ScratchBlocks.Colours.text;\n widgetDiv.classList.add(\"sa-contextmenu-colored\");\n widgetDiv.style.setProperty(\"--sa-contextmenu-bg\", fill);\n widgetDiv.style.setProperty(\"--sa-contextmenu-border\", border);\n widgetDiv.style.setProperty(\"--sa-contextmenu-text\", text);\n };\n const originalHandleRightClick = ScratchBlocks.Gesture.prototype.handleRightClick;\n ScratchBlocks.Gesture.prototype.handleRightClick = function () {\n const block = this.targetBlock_;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const ret = originalHandleRightClick.call(this, ...args);\n if (block) {\n applyContextMenuColor(block);\n }\n return ret;\n };\n const originalHide = ScratchBlocks.WidgetDiv.hide;\n ScratchBlocks.WidgetDiv.hide = function () {\n if (ScratchBlocks.WidgetDiv.DIV) {\n ScratchBlocks.WidgetDiv.DIV.classList.remove(\"sa-contextmenu-colored\");\n }\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return originalHide.call(this, ...args);\n };\n});\n// EXTERNAL MODULE: ./node_modules/css-loader!./src/addons/addons/editor-colored-context-menus/userscript.css\nvar editor_colored_context_menus_userscript = __webpack_require__(1483);\nvar userscript_default = /*#__PURE__*/__webpack_require__.n(editor_colored_context_menus_userscript);\n\n// CONCATENATED MODULE: ./src/addons/addons/editor-colored-context-menus/_runtime_entry.js\n/* generated by pull.js */\n\n\nconst resources = {\n \"userscript.js\": userscript,\n \"userscript.css\": userscript_default.a\n};\n\n/***/ })\n\n}]);","inputSourceMap":null}