diff --git a/README.md b/README.md index 6f8031f3..0bcc7736 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ Executes Javascript, Typescript Scripts. --> ## Changelog +### **WORK IN PROGRESS** +* (@krobipd) Fixed saving of Blockly scripts under Blockly 13: a script containing a named timeout, interval or schedule could not be saved anymore - the save button did not appear (#2349) +* (@krobipd) Fixed saving of Blockly scripts containing a function with a return value and no statements (#1958) +* (@krobipd) The Blockly regression tests now also cover saving: every block is serialized the way the editor does it and reloaded to the same code + ### 10.1.0 (2026-08-16) * (@GermanBluefox) Turned `strict` off again for the scripts, as TypeScript 6 enables it by default * (@GermanBluefox) Added the tab "TypeScript" to the settings, where the compiler options for the scripts can be configured diff --git a/admin/assets/BlocklyEditor-BB77aFJI.js b/admin/assets/BlocklyEditor-fPxUbzlK.js similarity index 98% rename from admin/assets/BlocklyEditor-BB77aFJI.js rename to admin/assets/BlocklyEditor-fPxUbzlK.js index 80d119f1..08963078 100644 --- a/admin/assets/BlocklyEditor-BB77aFJI.js +++ b/admin/assets/BlocklyEditor-fPxUbzlK.js @@ -1,7 +1,7 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./blocks_action-CvnOHXwt.js","./blockly-C4zJerWL.js","./rolldown-runtime-C0FnF6B9.js","./javascript-DVIhlTDr.js","./helpers-Crmcgphg.js","./blocks_convert-BZlKcd02.js","./blocks_logic-B33Pypxr.js","./blocks_number-k2IjE7OH.js","./blocks_procedures-BpvNI5dO.js","./field_script-CdzYBCe6.js","./blocks_sendto-pwZchfe0.js","./blocks_system-BZZcGqTJ.js","./field_oid-BGIMv9gw.js","./field_cron-BMQWPb61.js","./blocks_object-B64vSfel.js","./blocks_switch-DViYCmQd.js","./blocks_text-BOvtHN2r.js","./blocks_time-BH2F-ylT.js","./blocks_trigger-gwXvuAHV.js","./blocks_timeout-C3BoW4XJ.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./blocks_action-6Ej9xU2i.js","./blockly-C4zJerWL.js","./rolldown-runtime-C0FnF6B9.js","./javascript-DVIhlTDr.js","./helpers-C_OEphYI.js","./blocks_convert-DQ9x0Ysp.js","./blocks_logic-D2zQ9KId.js","./blocks_number-k2IjE7OH.js","./blocks_procedures-8BHrspJl.js","./field_script-CdzYBCe6.js","./blocks_sendto-BR7ZFKj1.js","./blocks_system-LUOqNSJG.js","./field_oid-BGIMv9gw.js","./field_cron-BMQWPb61.js","./blocks_object-DCnwv5kv.js","./blocks_switch-DViYCmQd.js","./blocks_text-BOvtHN2r.js","./blocks_time-ugS4GvIN.js","./blocks_trigger-15cJjBQj.js","./blocks_timeout-CiwKK28I.js"])))=>i.map(i=>d[i]); import{o as e,r as t,t as n}from"./rolldown-runtime-C0FnF6B9.js";import{t as r}from"./vite-preload-helper-B7qeedMF.js";import{$t as i,Cr as a,Ht as o,In as s,It as c,Jn as l,St as u,en as d,f,o as p,qn as m,rn as h,tn as g,tr as _,xt as v}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js";import{n as y,t as b}from"./Import-B-F9IhZ-.js";import{t as x}from"./Error-CBC2oZzb.js";import{d as S,g as C,m as w}from"./blockly-C4zJerWL.js";import{n as T}from"./javascript-DVIhlTDr.js";import{t as E}from"./blocklyDarkTheme-DEiAX5DT.js";var D=n(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=r(C()):n.Blockly.libraryBlocks=r(n.Blockly)})(e,function(e){var t=e.__namespace__,n=function(e){return function(){var n=e.workspace,r=e.getField(`VAR`).getVariable();t.Rd(n,r)}},r=function(e){return function(){var n=e.getField(`VAR`).getVariable();n&&t.$d(n.getWorkspace(),n,e)}},i=function(e){return function(){var n=e.workspace,r=e.getField(`VAR`).getVariable();t.Rd(n,r)}},a=function(e){return function(){var n=e.getField(`VAR`).getVariable();n&&t.$d(n.getWorkspace(),n,e)}},o=t.yb([{type:`variables_get_dynamic`,message0:`%1`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_VARIABLES_DEFAULT_NAME}`}],output:null,style:`variable_dynamic_blocks`,helpUrl:`%{BKY_VARIABLES_GET_HELPURL}`,tooltip:`%{BKY_VARIABLES_GET_TOOLTIP}`,extensions:[`contextMenu_variableDynamicSetterGetter`]},{type:`variables_set_dynamic`,message0:`%{BKY_VARIABLES_SET}`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_VARIABLES_DEFAULT_NAME}`},{type:`input_value`,name:`VALUE`}],previousStatement:null,nextStatement:null,style:`variable_dynamic_blocks`,tooltip:`%{BKY_VARIABLES_SET_TOOLTIP}`,helpUrl:`%{BKY_VARIABLES_SET_HELPURL}`,extensions:[`contextMenu_variableDynamicSetterGetter`]}]);t.ph(`contextMenu_variableDynamicSetterGetter`,{customContextMenu:function(e){if(this.isInFlyout)(this.type===`variables_get_dynamic`||this.type===`variables_get_reporter_dynamic`)&&(o=this.getField(`VAR`).getText(),a={text:t.C.RENAME_VARIABLE.replace(`%1`,o),enabled:!0,callback:n(this)},o={text:t.C.DELETE_VARIABLE.replace(`%1`,o),enabled:!0,callback:r(this)},e.unshift(a),e.unshift(o));else{if(this.type===`variables_get_dynamic`)var i=`variables_set_dynamic`,a=t.C.VARIABLES_GET_CREATE_SET;else i=`variables_get_dynamic`,a=t.C.VARIABLES_SET_CREATE_GET;var o=this.getField(`VAR`);i={type:i,fields:{VAR:o.saveState(!0)}},e.push({enabled:this.workspace.remainingCapacity()>0,text:a.replace(`%1`,o.getText()),callback:t.Pg(this,i)})}},onchange:function(){var e=this.getFieldValue(`VAR`);e=t.Vd(this.workspace,e),this.type===`variables_get_dynamic`?this.outputConnection.setCheck(e.getType()):this.getInput(`VALUE`).connection.setCheck(e.getType())}}),t.Ab(o);var s={blocks:o},c=t.yb([{type:`variables_get`,message0:`%1`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_VARIABLES_DEFAULT_NAME}`}],output:null,style:`variable_blocks`,helpUrl:`%{BKY_VARIABLES_GET_HELPURL}`,tooltip:`%{BKY_VARIABLES_GET_TOOLTIP}`,extensions:[`contextMenu_variableSetterGetter`]},{type:`variables_set`,message0:`%{BKY_VARIABLES_SET}`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_VARIABLES_DEFAULT_NAME}`},{type:`input_value`,name:`VALUE`,ariaLabelText:`%{BKY_INPUT_LABEL_VARIABLES_SET}`}],previousStatement:null,nextStatement:null,style:`variable_blocks`,tooltip:`%{BKY_VARIABLES_SET_TOOLTIP}`,helpUrl:`%{BKY_VARIABLES_SET_HELPURL}`,extensions:[`contextMenu_variableSetterGetter`]}]);t.ph(`contextMenu_variableSetterGetter`,{customContextMenu:function(e){if(this.isInFlyout)(this.type===`variables_get`||this.type===`variables_get_reporter`)&&(o=this.getField(`VAR`).getText(),r={text:t.C.RENAME_VARIABLE.replace(`%1`,o),enabled:!0,callback:i(this)},o={text:t.C.DELETE_VARIABLE.replace(`%1`,o),enabled:!0,callback:a(this)},e.unshift(r),e.unshift(o));else{if(this.type===`variables_get`)var n=`variables_set`,r=t.C.VARIABLES_GET_CREATE_SET;else n=`variables_get`,r=t.C.VARIABLES_SET_CREATE_GET;var o=this.getField(`VAR`);n={type:n,fields:{VAR:o.saveState(!0)}},e.push({enabled:this.workspace.remainingCapacity()>0,text:r.replace(`%1`,o.getText()),callback:t.Pg(this,n)})}}}),t.Ab(c);var l={blocks:c},u=t.yb([{type:`text`,message0:`%1`,args0:[{type:`field_input`,name:`TEXT`,text:``}],output:`String`,style:`text_blocks`,helpUrl:`%{BKY_TEXT_TEXT_HELPURL}`,tooltip:`%{BKY_TEXT_TEXT_TOOLTIP}`,extensions:[`text_quotes`,`parent_tooltip_when_inline`]},{type:`text_join`,message0:``,output:`String`,style:`text_blocks`,helpUrl:`%{BKY_TEXT_JOIN_HELPURL}`,tooltip:`%{BKY_TEXT_JOIN_TOOLTIP}`,mutator:`text_join_mutator`},{type:`text_create_join_container`,message0:`%{BKY_TEXT_CREATE_JOIN_TITLE_JOIN} %1 %2`,args0:[{type:`input_dummy`},{type:`input_statement`,name:`STACK`}],style:`text_blocks`,tooltip:`%{BKY_TEXT_CREATE_JOIN_TOOLTIP}`,enableContextMenu:!1},{type:`text_create_join_item`,message0:`%{BKY_TEXT_CREATE_JOIN_ITEM_TITLE_ITEM}`,previousStatement:null,nextStatement:null,style:`text_blocks`,tooltip:`%{BKY_TEXT_CREATE_JOIN_ITEM_TOOLTIP}`,enableContextMenu:!1},{type:`text_append`,message0:`%{BKY_TEXT_APPEND_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_TEXT_APPEND_VARIABLE}`},{type:`input_value`,name:`TEXT`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_APPEND}`}],previousStatement:null,nextStatement:null,style:`text_blocks`,extensions:[`text_append_tooltip`]},{type:`text_length`,message0:`%{BKY_TEXT_LENGTH_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:[`String`,`Array`],ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHECK}`}],output:`Number`,style:`text_blocks`,tooltip:`%{BKY_TEXT_LENGTH_TOOLTIP}`,helpUrl:`%{BKY_TEXT_LENGTH_HELPURL}`},{type:`text_isEmpty`,message0:`%{BKY_TEXT_ISEMPTY_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:[`String`,`Array`],ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHECK}`}],output:`Boolean`,style:`text_blocks`,tooltip:`%{BKY_TEXT_ISEMPTY_TOOLTIP}`,helpUrl:`%{BKY_TEXT_ISEMPTY_HELPURL}`},{type:`text_indexOf`,message0:`%{BKY_TEXT_INDEXOF_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHECK}`},{type:`field_dropdown`,name:`END`,options:[[`%{BKY_TEXT_INDEXOF_OPERATOR_FIRST}`,`FIRST`],[`%{BKY_TEXT_INDEXOF_OPERATOR_LAST}`,`LAST`]]},{type:`input_value`,name:`FIND`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_FIND}`}],output:`Number`,style:`text_blocks`,helpUrl:`%{BKY_TEXT_INDEXOF_HELPURL}`,inputsInline:!0,extensions:[`text_indexOf_tooltip`]},{type:`text_charAt`,message0:`%{BKY_TEXT_CHARAT_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHECK}`},{type:`field_dropdown`,name:`WHERE`,options:[[`%{BKY_TEXT_CHARAT_FROM_START}`,`FROM_START`,`%{BKY_TEXT_FROM_START_ARIA}`],[`%{BKY_TEXT_CHARAT_FROM_END}`,`FROM_END`,`%{BKY_TEXT_FROM_END_ARIA}`],[`%{BKY_TEXT_CHARAT_FIRST}`,`FIRST`],[`%{BKY_TEXT_CHARAT_LAST}`,`LAST`],[`%{BKY_TEXT_CHARAT_RANDOM}`,`RANDOM`]]}],output:`String`,style:`text_blocks`,helpUrl:`%{BKY_TEXT_CHARAT_HELPURL}`,inputsInline:!0,mutator:`text_charAt_mutator`}]);u.text_getSubstring={init:function(){this.WHERE_OPTIONS_1=[[t.C.TEXT_GET_SUBSTRING_START_FROM_START,`FROM_START`,t.C.TEXT_FROM_START_ARIA],[t.C.TEXT_GET_SUBSTRING_START_FROM_END,`FROM_END`,t.C.TEXT_FROM_END_ARIA],[t.C.TEXT_GET_SUBSTRING_START_FIRST,`FIRST`]],this.WHERE_OPTIONS_2=[[t.C.TEXT_GET_SUBSTRING_END_FROM_START,`FROM_START`,t.C.TEXT_FROM_START_ARIA],[t.C.TEXT_GET_SUBSTRING_END_FROM_END,`FROM_END`,t.C.TEXT_FROM_END_ARIA],[t.C.TEXT_GET_SUBSTRING_END_LAST,`LAST`]],this.setHelpUrl(t.C.TEXT_GET_SUBSTRING_HELPURL),this.setStyle(`text_blocks`),this.appendValueInput(`STRING`).setCheck(`String`).appendField(t.C.TEXT_GET_SUBSTRING_INPUT_IN_TEXT).setAriaLabelProvider(t.C.INPUT_LABEL_TEXT_TO_CHECK);var e=e=>{var n=t.lh({type:`field_dropdown`,options:this[`WHERE_OPTIONS_`+e]});return n.setValidator(function(t){var n=this.getValue();t=t===`FROM_START`||t===`FROM_END`,t!==(n===`FROM_START`||n===`FROM_END`)&&this.getSourceBlock().updateAt_(e,t)}),n};this.appendDummyInput(`WHERE1_INPUT`).appendField(e(1),`WHERE1`),this.appendDummyInput(`AT1`),this.appendDummyInput(`WHERE2_INPUT`).appendField(e(2),`WHERE2`),this.appendDummyInput(`AT2`),t.C.TEXT_GET_SUBSTRING_TAIL&&this.appendDummyInput(`TAIL`).appendField(t.C.TEXT_GET_SUBSTRING_TAIL),this.setInputsInline(!0),this.setOutput(!0,`String`),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(t.C.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){var e=t.rc(`mutation`),n=this.getInput(`AT1`)instanceof t.Nn;return e.setAttribute(`at1`,`${n}`),n=this.getInput(`AT2`)instanceof t.Nn,e.setAttribute(`at2`,`${n}`),e},domToMutation:function(e){var t=e.getAttribute(`at1`)===`true`;e=e.getAttribute(`at2`)===`true`,this.updateAt_(1,t),this.updateAt_(2,e)},updateAt_:function(e,n){this.removeInput(`AT`+e),this.removeInput(`ORDINAL`+e,!0),n?(this.appendValueInput(`AT`+e).setCheck(`Number`).setAriaLabelProvider(e===1?t.C.INPUT_LABEL_TEXT_START_POSITION:t.C.INPUT_LABEL_TEXT_END_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`+e).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`+e),e===2&&t.C.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput(`TAIL`,!0),this.appendDummyInput(`TAIL`).appendField(t.C.TEXT_GET_SUBSTRING_TAIL)),e===1&&(this.moveInputBefore(`AT1`,`WHERE2_INPUT`),this.getInput(`ORDINAL1`)&&this.moveInputBefore(`ORDINAL1`,`WHERE2_INPUT`))}},u.text_changeCase={init:function(){var e=[[t.C.TEXT_CHANGECASE_OPERATOR_UPPERCASE,`UPPERCASE`],[t.C.TEXT_CHANGECASE_OPERATOR_LOWERCASE,`LOWERCASE`],[t.C.TEXT_CHANGECASE_OPERATOR_TITLECASE,`TITLECASE`]];this.setHelpUrl(t.C.TEXT_CHANGECASE_HELPURL),this.setStyle(`text_blocks`),this.appendValueInput(`TEXT`).setCheck(`String`).appendField(t.lh({type:`field_dropdown`,options:e}),`CASE`).setAriaLabelProvider(t.C.INPUT_LABEL_TEXT_TO_CHANGE),this.setOutput(!0,`String`),this.setTooltip(t.C.TEXT_CHANGECASE_TOOLTIP)}},u.text_trim={init:function(){var e=[[t.C.TEXT_TRIM_OPERATOR_BOTH,`BOTH`],[t.C.TEXT_TRIM_OPERATOR_LEFT,`LEFT`],[t.C.TEXT_TRIM_OPERATOR_RIGHT,`RIGHT`]];this.setHelpUrl(t.C.TEXT_TRIM_HELPURL),this.setStyle(`text_blocks`),this.appendValueInput(`TEXT`).setCheck(`String`).appendField(t.lh({type:`field_dropdown`,options:e}),`MODE`).setAriaLabelProvider(t.C.INPUT_LABEL_TEXT_TO_CHANGE),this.setOutput(!0,`String`),this.setTooltip(t.C.TEXT_TRIM_TOOLTIP)}},u.text_print={init:function(){this.jsonInit({message0:t.C.TEXT_PRINT_TITLE,args0:[{type:`input_value`,name:`TEXT`}],previousStatement:null,nextStatement:null,style:`text_blocks`,tooltip:t.C.TEXT_PRINT_TOOLTIP,helpUrl:t.C.TEXT_PRINT_HELPURL})}};var d={updateType_:function(e){this.outputConnection.setCheck(e===`NUMBER`?`Number`:`String`)},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`type`,this.getFieldValue(`TYPE`)),e},domToMutation:function(e){this.updateType_(e.getAttribute(`type`))}};u.text_prompt_ext=Object.assign({},d,{init:function(){var e=[[t.C.TEXT_PROMPT_TYPE_TEXT,`TEXT`],[t.C.TEXT_PROMPT_TYPE_NUMBER,`NUMBER`]];this.setHelpUrl(t.C.TEXT_PROMPT_HELPURL),this.setStyle(`text_blocks`),e=t.lh({type:`field_dropdown`,options:e}),e.setValidator(e=>{this.updateType_(e)}),this.appendValueInput(`TEXT`).appendField(e,`TYPE`).setAriaLabelProvider(t.C.INPUT_LABEL_TEXT_PROMPT_MESSAGE),this.setOutput(!0,`String`),this.setTooltip(()=>this.getFieldValue(`TYPE`)===`TEXT`?t.C.TEXT_PROMPT_TOOLTIP_TEXT:t.C.TEXT_PROMPT_TOOLTIP_NUMBER)}}),u.text_prompt=Object.assign({},d,{init:function(){this.mixin(f);var e=[[t.C.TEXT_PROMPT_TYPE_TEXT,`TEXT`],[t.C.TEXT_PROMPT_TYPE_NUMBER,`NUMBER`]];this.setHelpUrl(t.C.TEXT_PROMPT_HELPURL),this.setStyle(`text_blocks`),e=t.lh({type:`field_dropdown`,options:e}),e.setValidator(e=>{this.updateType_(e)}),this.appendDummyInput().appendField(e,`TYPE`).appendField(this.newQuote_(!0)).appendField(t.lh({type:`field_input`,text:``}),`TEXT`).appendField(this.newQuote_(!1)),this.setOutput(!0,`String`),this.setTooltip(()=>this.getFieldValue(`TYPE`)===`TEXT`?t.C.TEXT_PROMPT_TOOLTIP_TEXT:t.C.TEXT_PROMPT_TOOLTIP_NUMBER)}}),u.text_count={init:function(){this.jsonInit({message0:t.C.TEXT_COUNT_MESSAGE0,args0:[{type:`input_value`,name:`SUB`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_FIND}`},{type:`input_value`,name:`TEXT`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHECK}`}],output:`Number`,inputsInline:!0,style:`text_blocks`,tooltip:t.C.TEXT_COUNT_TOOLTIP,helpUrl:t.C.TEXT_COUNT_HELPURL})}},u.text_replace={init:function(){this.jsonInit({message0:t.C.TEXT_REPLACE_MESSAGE0,args0:[{type:`input_value`,name:`FROM`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_FIND}`},{type:`input_value`,name:`TO`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_REPLACE}`},{type:`input_value`,name:`TEXT`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHECK}`}],output:`String`,inputsInline:!0,style:`text_blocks`,tooltip:t.C.TEXT_REPLACE_TOOLTIP,helpUrl:t.C.TEXT_REPLACE_HELPURL})}},u.text_reverse={init:function(){this.jsonInit({message0:t.C.TEXT_REVERSE_MESSAGE0,args0:[{type:`input_value`,name:`TEXT`,check:`String`,ariaLabelText:`%{BKY_INPUT_LABEL_TEXT_TO_CHANGE}`}],output:`String`,inputsInline:!0,style:`text_blocks`,tooltip:t.C.TEXT_REVERSE_TOOLTIP,helpUrl:t.C.TEXT_REVERSE_HELPURL})}};var f={QUOTE_IMAGE_LEFT_DATAURI:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC`,QUOTE_IMAGE_RIGHT_DATAURI:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==`,QUOTE_IMAGE_WIDTH:12,QUOTE_IMAGE_HEIGHT:12,quoteField_:function(e){for(let t=0,n;n=this.inputList[t];t++)for(let t=0,r;r=n.fieldRow[t];t++)if(e===r.name){n.insertFieldAt(t,this.newQuote_(!0)),n.insertFieldAt(t+2,this.newQuote_(!1));return}console.warn(`field named "`+e+`" not found in `+this.toDevString())},newQuote_:function(e){return e=this.RTL?!e:e,t.lh({type:`field_image`,src:e?this.QUOTE_IMAGE_LEFT_DATAURI:this.QUOTE_IMAGE_RIGHT_DATAURI,width:this.QUOTE_IMAGE_WIDTH,height:this.QUOTE_IMAGE_HEIGHT,alt:e?`“`:`”`})}};t.oh(`text_append_tooltip`,t.Ah(`%{BKY_TEXT_APPEND_TOOLTIP}`,`VAR`)),t.oh(`text_indexOf_tooltip`,function(){this.setTooltip(()=>t.C.TEXT_INDEXOF_TOOLTIP.replace(`%1`,this.workspace.options.oneBasedIndex?`0`:`-1`))}),t.oh(`text_quotes`,function(){this.mixin(f),this.quoteField_(`TEXT`)}),t.ph(`quote_image_mixin`,f),t.th(`text_join_mutator`,{itemCount_:0,mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`items`,`${this.itemCount_}`),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute(`items`),10),this.updateShape_()},saveExtraState:function(){return{itemCount:this.itemCount_}},loadExtraState:function(e){this.itemCount_=e.itemCount,this.updateShape_()},decompose:function(e){var t=e.newBlock(`text_create_join_container`);t.initSvg();var n,r=(n=t.getInput(`STACK`))==null?void 0:n.connection;for(n=0;n{var e=this.getFieldValue(`WHERE`),n=t.C.TEXT_CHARAT_TOOLTIP;return(e===`FROM_START`||e===`FROM_END`)&&(e=e===`FROM_START`?t.C.LISTS_INDEX_FROM_START_TOOLTIP:t.C.LISTS_INDEX_FROM_END_TOOLTIP)&&(n+=` `+e.replace(`%1`,this.workspace.options.oneBasedIndex?`#1`:`#0`)),n})}),t.Ab(u);var p={blocks:u},m={},h={setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput(`STACK`).appendField(t.C.PROCEDURES_DEFNORETURN_DO),this.getInput(`RETURN`)&&this.moveInputBefore(`STACK`,`RETURN`)):this.removeInput(`STACK`,!0),this.hasStatements_=e)},updateParams_:function(){var e=``;this.arguments_.length&&(e=t.C.PROCEDURES_BEFORE_PARAMS+` `+this.arguments_.join(`, `)),t.Ub++;try{this.setFieldValue(e,`PARAMS`)}finally{t.Ub--}},mutationToDom:function(e){var n=t.rc(`mutation`);e&&n.setAttribute(`name`,this.getFieldValue(`NAME`));for(let r=0;re.getName()))===JSON.stringify(this.arguments_)||(r=null),r)r.isEnabled()||(this.setDisabledReason(!0,`DISABLED_PROCEDURE_DEFINITION`),this.setWarningText(t.C.PROCEDURES_CALL_DISABLED_DEF_WARNING.replace(`%1`,n)));else{t.B(e.group),e=t.rc(`xml`),n=t.rc(`block`),n.setAttribute(`type`,this.defType_),r=this.getRelativeToSurfaceXY();var i=r.y+t.Og.snapRadius*2;n.setAttribute(`x`,`${r.x+t.Og.snapRadius*(this.RTL?-1:1)}`),n.setAttribute(`y`,`${i}`),r=this.mutationToDom(),n.appendChild(r),r=t.rc(`field`),r.setAttribute(`name`,`NAME`),i=this.getProcedureCall();let a=t.jj(i,this);i!==a&&this.renameProcedure(i,a),r.appendChild(t.sc(i)),n.appendChild(r),e.appendChild(n),t.ch(e,this.workspace),t.B(!1)}}else e.type===t.lm?(n=this.getProcedureCall(),t.tj(n,this.workspace)||(t.B(e.group),this.dispose(!0),t.B(!1))):e.type===t.km&&e.element===`disabled`&&(n=this.getProcedureCall(),(i=t.tj(n,this.workspace))&&i.id===e.blockId&&((r=t.gd)&&console.log(`Saw an existing group while responding to a definition change`),t.B(e.group),e=i.isEnabled(),this.setDisabledReason(!e,`DISABLED_PROCEDURE_DEFINITION`),this.setWarningText(e?null:t.C.PROCEDURES_CALL_DISABLED_DEF_WARNING.replace(`%1`,n)),t.B(r)))},customContextMenu:function(e){if(this.workspace.isMovable()){var n=this.getProcedureCall(),r=this.workspace;e.push({enabled:!0,text:t.C.PROCEDURES_HIGHLIGHT_DEF,callback:function(){var e=t.tj(n,r);e&&(r.centerOnBlock(e.id),t.t().focusNode(e))}})}}};m.procedures_callnoreturn=Object.assign({},_,{init:function(){this.appendDummyInput(`TOPROW`).appendField(``,`NAME`),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle(`procedure_blocks`),this.setHelpUrl(t.C.PROCEDURES_CALLNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null},defType_:`procedures_defnoreturn`}),m.procedures_callreturn=Object.assign({},_,{init:function(){this.appendDummyInput(`TOPROW`).appendField(``,`NAME`),this.setOutput(!0),this.setStyle(`procedure_blocks`),this.setHelpUrl(t.C.PROCEDURES_CALLRETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null},defType_:`procedures_defreturn`}),m.procedures_ifreturn={init:function(){this.appendValueInput(`CONDITION`).setCheck(`Boolean`).appendField(t.C.CONTROLS_IF_MSG_IF),this.appendValueInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle(`procedure_blocks`),this.setTooltip(t.C.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(t.C.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`value`,String(Number(this.hasReturnValue_))),e},domToMutation:function(e){this.hasReturnValue_=e.getAttribute(`value`)===`1`,this.hasReturnValue_||(this.removeInput(`VALUE`),this.appendDummyInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN))},onchange:function(e){if(!(this.workspace.isDragging&&this.workspace.isDragging()||e.type!==t.nm&&e.type!==t.Od)){e=!1;var n=this;do{if(this.FUNCTION_TYPES.includes(n.type)){e=!0;break}n=n.getSurroundParent()}while(n);if(e?(n.type===`procedures_defnoreturn`&&this.hasReturnValue_?(this.removeInput(`VALUE`),this.appendDummyInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):n.type!==`procedures_defreturn`||this.hasReturnValue_||(this.removeInput(`VALUE`),this.appendValueInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(t.C.PROCEDURES_IFRETURN_WARNING),!this.isInFlyout)try{t.Qc=!1,this.setDisabledReason(!e,`UNPARENTED_IFRETURN`)}finally{t.Qc=!0}}},FUNCTION_TYPES:[`procedures_defnoreturn`,`procedures_defreturn`]},t.Ab(m);var v={blocks:m},y=t.yb([{type:`math_number`,message0:`%1`,args0:[{type:`field_number`,name:`NUM`,value:0}],output:`Number`,helpUrl:`%{BKY_MATH_NUMBER_HELPURL}`,style:`math_blocks`,tooltip:`%{BKY_MATH_NUMBER_TOOLTIP}`,extensions:[`parent_tooltip_when_inline`]},{type:`math_arithmetic`,message0:`%1 %2 %3`,args0:[{type:`input_value`,name:`A`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_A}`},{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_ADDITION_SYMBOL}`,`ADD`,`%{BKY_MATH_ADDITION_SYMBOL_ARIA}`],[`%{BKY_MATH_SUBTRACTION_SYMBOL}`,`MINUS`,`%{BKY_MATH_SUBTRACTION_SYMBOL_ARIA}`],[`%{BKY_MATH_MULTIPLICATION_SYMBOL}`,`MULTIPLY`,`%{BKY_MATH_MULTIPLICATION_SYMBOL_ARIA}`],[`%{BKY_MATH_DIVISION_SYMBOL}`,`DIVIDE`,`%{BKY_MATH_DIVISION_SYMBOL_ARIA}`],[`%{BKY_MATH_POWER_SYMBOL}`,`POWER`,`%{BKY_MATH_POWER_SYMBOL_ARIA}`]]},{type:`input_value`,name:`B`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_B}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_ARITHMETIC_HELPURL}`,extensions:[`math_op_tooltip`]},{type:`math_single`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_SINGLE_OP_ROOT}`,`ROOT`],[`%{BKY_MATH_SINGLE_OP_ABSOLUTE}`,`ABS`,`%{BKY_MATH_SINGLE_OP_ABSOLUTE_ARIA}`],[`-`,`NEG`,`%{BKY_MATH_SINGLE_OP_NEG_ARIA}`],[`ln`,`LN`,`%{BKY_MATH_SINGLE_OP_LN_ARIA}`],[`log10`,`LOG10`,`%{BKY_MATH_SINGLE_OP_LOG10_ARIA}`],[`e^`,`EXP`,`%{BKY_MATH_SINGLE_OP_EXP_ARIA}`],[`10^`,`POW10`,`%{BKY_MATH_SINGLE_OP_POW10_ARIA}`]]},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_SINGLE_HELPURL}`,extensions:[`math_op_tooltip`]},{type:`math_trig`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_TRIG_SIN}`,`SIN`,`%{BKY_MATH_TRIG_SIN_ARIA}`],[`%{BKY_MATH_TRIG_COS}`,`COS`,`%{BKY_MATH_TRIG_COS_ARIA}`],[`%{BKY_MATH_TRIG_TAN}`,`TAN`,`%{BKY_MATH_TRIG_TAN_ARIA}`],[`%{BKY_MATH_TRIG_ASIN}`,`ASIN`,`%{BKY_MATH_TRIG_ASIN_ARIA}`],[`%{BKY_MATH_TRIG_ACOS}`,`ACOS`,`%{BKY_MATH_TRIG_ACOS_ARIA}`],[`%{BKY_MATH_TRIG_ATAN}`,`ATAN`,`%{BKY_MATH_TRIG_ATAN_ARIA}`]]},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_TRIG_HELPURL}`,extensions:[`math_op_tooltip`]},{type:`math_constant`,message0:`%1`,args0:[{type:`field_dropdown`,name:`CONSTANT`,options:[[`π`,`PI`,`%{BKY_MATH_CONSTANT_PI_ARIA}`],[`e`,`E`,`%{BKY_MATH_CONSTANT_E_ARIA}`],[`φ`,`GOLDEN_RATIO`,`%{BKY_MATH_CONSTANT_GOLDEN_RATIO_ARIA}`],[`sqrt(2)`,`SQRT2`,`%{BKY_MATH_CONSTANT_SQRT2_ARIA}`],[`sqrt(½)`,`SQRT1_2`,`%{BKY_MATH_CONSTANT_SQRT1_2_ARIA}`],[`∞`,`INFINITY`,`%{BKY_MATH_CONSTANT_INFINITY_ARIA}`]]}],output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_CONSTANT_TOOLTIP}`,helpUrl:`%{BKY_MATH_CONSTANT_HELPURL}`},{type:`math_number_property`,message0:`%1 %2`,args0:[{type:`input_value`,name:`NUMBER_TO_CHECK`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_TO_CHECK}`},{type:`field_dropdown`,name:`PROPERTY`,options:[[`%{BKY_MATH_IS_EVEN}`,`EVEN`],[`%{BKY_MATH_IS_ODD}`,`ODD`],[`%{BKY_MATH_IS_PRIME}`,`PRIME`],[`%{BKY_MATH_IS_WHOLE}`,`WHOLE`],[`%{BKY_MATH_IS_POSITIVE}`,`POSITIVE`],[`%{BKY_MATH_IS_NEGATIVE}`,`NEGATIVE`],[`%{BKY_MATH_IS_DIVISIBLE_BY}`,`DIVISIBLE_BY`]]}],inputsInline:!0,output:`Boolean`,style:`math_blocks`,tooltip:`%{BKY_MATH_IS_TOOLTIP}`,mutator:`math_is_divisibleby_mutator`},{type:`math_change`,message0:`%{BKY_MATH_CHANGE_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_MATH_CHANGE_TITLE_ITEM}`},{type:`input_value`,name:`DELTA`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_CHANGE_BY}`}],previousStatement:null,nextStatement:null,style:`variable_blocks`,helpUrl:`%{BKY_MATH_CHANGE_HELPURL}`,extensions:[`math_change_tooltip`]},{type:`math_round`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_ROUND_OPERATOR_ROUND}`,`ROUND`],[`%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}`,`ROUNDUP`],[`%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}`,`ROUNDDOWN`]]},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_ROUND_HELPURL}`,tooltip:`%{BKY_MATH_ROUND_TOOLTIP}`},{type:`math_on_list`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_ONLIST_OPERATOR_SUM}`,`SUM`],[`%{BKY_MATH_ONLIST_OPERATOR_MIN}`,`MIN`,`%{BKY_MATH_ONLIST_OPERATOR_MIN_ARIA}`],[`%{BKY_MATH_ONLIST_OPERATOR_MAX}`,`MAX`,`%{BKY_MATH_ONLIST_OPERATOR_MAX_ARIA}`],[`%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}`,`AVERAGE`],[`%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}`,`MEDIAN`],[`%{BKY_MATH_ONLIST_OPERATOR_MODE}`,`MODE`],[`%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}`,`STD_DEV`],[`%{BKY_MATH_ONLIST_OPERATOR_RANDOM}`,`RANDOM`]]},{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_LIST}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_ONLIST_HELPURL}`,mutator:`math_modes_of_list_mutator`,extensions:[`math_op_tooltip`]},{type:`math_modulo`,message0:`%{BKY_MATH_MODULO_TITLE}`,args0:[{type:`input_value`,name:`DIVIDEND`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_DIVIDEND}`},{type:`input_value`,name:`DIVISOR`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_DIVISOR}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_MODULO_TOOLTIP}`,helpUrl:`%{BKY_MATH_MODULO_HELPURL}`},{type:`math_constrain`,message0:`%{BKY_MATH_CONSTRAIN_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_CONSTRAIN_VALUE}`},{type:`input_value`,name:`LOW`,check:`Number`},{type:`input_value`,name:`HIGH`,check:`Number`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_CONSTRAIN_TOOLTIP}`,helpUrl:`%{BKY_MATH_CONSTRAIN_HELPURL}`},{type:`math_random_int`,message0:`%{BKY_MATH_RANDOM_INT_TITLE}`,args0:[{type:`input_value`,name:`FROM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_MIN}`},{type:`input_value`,name:`TO`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_MAX}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_RANDOM_INT_TOOLTIP}`,helpUrl:`%{BKY_MATH_RANDOM_INT_HELPURL}`},{type:`math_random_float`,message0:`%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}`,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}`,helpUrl:`%{BKY_MATH_RANDOM_FLOAT_HELPURL}`},{type:`math_atan2`,message0:`%{BKY_MATH_ATAN2_TITLE}`,args0:[{type:`input_value`,name:`X`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_ATAN2_X}`},{type:`input_value`,name:`Y`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_ATAN2_Y}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_ATAN2_TOOLTIP}`,helpUrl:`%{BKY_MATH_ATAN2_HELPURL}`}]);t.oh(`math_op_tooltip`,t.yh(`OP`,{ADD:`%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}`,MINUS:`%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}`,MULTIPLY:`%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}`,DIVIDE:`%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}`,POWER:`%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}`,ROOT:`%{BKY_MATH_SINGLE_TOOLTIP_ROOT}`,ABS:`%{BKY_MATH_SINGLE_TOOLTIP_ABS}`,NEG:`%{BKY_MATH_SINGLE_TOOLTIP_NEG}`,LN:`%{BKY_MATH_SINGLE_TOOLTIP_LN}`,LOG10:`%{BKY_MATH_SINGLE_TOOLTIP_LOG10}`,EXP:`%{BKY_MATH_SINGLE_TOOLTIP_EXP}`,POW10:`%{BKY_MATH_SINGLE_TOOLTIP_POW10}`,SIN:`%{BKY_MATH_TRIG_TOOLTIP_SIN}`,COS:`%{BKY_MATH_TRIG_TOOLTIP_COS}`,TAN:`%{BKY_MATH_TRIG_TOOLTIP_TAN}`,ASIN:`%{BKY_MATH_TRIG_TOOLTIP_ASIN}`,ACOS:`%{BKY_MATH_TRIG_TOOLTIP_ACOS}`,ATAN:`%{BKY_MATH_TRIG_TOOLTIP_ATAN}`,SUM:`%{BKY_MATH_ONLIST_TOOLTIP_SUM}`,MIN:`%{BKY_MATH_ONLIST_TOOLTIP_MIN}`,MAX:`%{BKY_MATH_ONLIST_TOOLTIP_MAX}`,AVERAGE:`%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}`,MEDIAN:`%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}`,MODE:`%{BKY_MATH_ONLIST_TOOLTIP_MODE}`,STD_DEV:`%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}`,RANDOM:`%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}`})),t.th(`math_is_divisibleby_mutator`,{mutationToDom:function(){var e=t.rc(`mutation`),n=this.getFieldValue(`PROPERTY`)===`DIVISIBLE_BY`;return e.setAttribute(`divisor_input`,String(n)),e},domToMutation:function(e){e=e.getAttribute(`divisor_input`)===`true`,this.updateShape_(e)},updateShape_:function(e){var t=this.getInput(`DIVISOR`);e?t||this.appendValueInput(`DIVISOR`).setCheck(`Number`):t&&this.removeInput(`DIVISOR`)}},function(){this.getField(`PROPERTY`).setValidator(function(e){e=e===`DIVISIBLE_BY`,this.getSourceBlock().updateShape_(e)})}),t.oh(`math_change_tooltip`,t.Ah(`%{BKY_MATH_CHANGE_TOOLTIP}`,`VAR`)),t.th(`math_modes_of_list_mutator`,{updateType_:function(e){e===`MODE`?this.outputConnection.setCheck(`Array`):this.outputConnection.setCheck(`Number`)},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`op`,this.getFieldValue(`OP`)),e},domToMutation:function(e){if(e=e.getAttribute(`op`),e===null)throw TypeError(`xmlElement had no op attribute`);this.updateType_(e)}},function(){this.getField(`OP`).setValidator(function(e){this.updateType_(e)}.bind(this))}),t.Ab(y);var b={blocks:y},x=t.yb([{type:`controls_repeat_ext`,message0:`%{BKY_CONTROLS_REPEAT_TITLE}`,args0:[{type:`input_value`,name:`TIMES`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_TIMES}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,tooltip:`%{BKY_CONTROLS_REPEAT_TOOLTIP}`,helpUrl:`%{BKY_CONTROLS_REPEAT_HELPURL}`},{type:`controls_repeat`,message0:`%{BKY_CONTROLS_REPEAT_TITLE}`,args0:[{type:`field_number`,name:`TIMES`,value:10,min:0,precision:1,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_TIMES}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,tooltip:`%{BKY_CONTROLS_REPEAT_TOOLTIP}`,helpUrl:`%{BKY_CONTROLS_REPEAT_HELPURL}`},{type:`controls_whileUntil`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`MODE`,options:[[`%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}`,`WHILE`],[`%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}`,`UNTIL`]]},{type:`input_value`,name:`BOOL`,check:`Boolean`,ariaLabelText:`%{BKY_INPUT_LABEL_CONDITION}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_WHILEUNTIL_HELPURL}`,extensions:[`controls_whileUntil_tooltip`]},{type:`controls_for`,message0:`%{BKY_CONTROLS_FOR_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:null},{type:`input_value`,name:`FROM`,check:`Number`,align:`RIGHT`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_FROM}`},{type:`input_value`,name:`TO`,check:`Number`,align:`RIGHT`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_TO}`},{type:`input_value`,name:`BY`,check:`Number`,align:`RIGHT`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_BY}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],inputsInline:!0,previousStatement:null,nextStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_FOR_HELPURL}`,extensions:[`contextMenu_newGetVariableBlock`,`controls_for_tooltip`]},{type:`controls_forEach`,message0:`%{BKY_CONTROLS_FOREACH_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:null},{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_LIST}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_FOREACH_HELPURL}`,extensions:[`contextMenu_newGetVariableBlock`,`controls_forEach_tooltip`]},{type:`controls_flow_statements`,message0:`%1`,args0:[{type:`field_dropdown`,name:`FLOW`,options:[[`%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK}`,`BREAK`],[`%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE}`,`CONTINUE`]]}],previousStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_FLOW_STATEMENTS_HELPURL}`,suppressPrefixSuffix:!0,extensions:[`controls_flow_tooltip`,`controls_flow_in_loop_check`]}]);t.oh(`controls_whileUntil_tooltip`,t.yh(`MODE`,{WHILE:`%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_WHILE}`,UNTIL:`%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}`})),t.oh(`controls_flow_tooltip`,t.yh(`FLOW`,{BREAK:`%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK}`,CONTINUE:`%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}`})),t.ph(`contextMenu_newGetVariableBlock`,{customContextMenu:function(e){if(!this.isInFlyout){var n=this.getField(`VAR`),r=n.getVariable().getName();this.isCollapsed()||r===null||(n={type:`variables_get`,fields:{VAR:n.saveState(!0)}},e.push({enabled:!0,text:t.C.VARIABLES_SET_CREATE_GET.replace(`%1`,r),callback:t.Pg(this,n)}))}}}),t.oh(`controls_for_tooltip`,t.Ah(`%{BKY_CONTROLS_FOR_TOOLTIP}`,`VAR`)),t.oh(`controls_forEach_tooltip`,t.Ah(`%{BKY_CONTROLS_FOREACH_TOOLTIP}`,`VAR`));var S=new Set([`controls_repeat`,`controls_repeat_ext`,`controls_forEach`,`controls_for`,`controls_whileUntil`]);t.ph(`controls_flow_in_loop_check`,{getSurroundLoop:function(){var e=this;do{if(S.has(e.type))return e;e=e.getSurroundParent()}while(e);return null},onchange:function(e){var n=this.workspace;if(n.isDragging&&!n.isDragging()&&(e.type===t.nm||e.type===t.Od)&&(e=!!this.getSurroundLoop(),this.setWarningText(e?null:t.C.CONTROLS_FLOW_STATEMENTS_WARNING),!this.isInFlyout))try{t.Qc=!1,this.setDisabledReason(!e,`CONTROL_FLOW_NOT_IN_LOOP`)}finally{t.Qc=!0}}}),t.Ab(x);var C={blocks:x,loopTypes:S},w=t.yb([{type:`logic_boolean`,message0:`%1`,args0:[{type:`field_dropdown`,name:`BOOL`,options:[[`%{BKY_LOGIC_BOOLEAN_TRUE}`,`TRUE`],[`%{BKY_LOGIC_BOOLEAN_FALSE}`,`FALSE`]]}],output:`Boolean`,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_BOOLEAN_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_BOOLEAN_HELPURL}`},{type:`controls_if`,message0:`%{BKY_CONTROLS_IF_MSG_IF} %1`,args0:[{type:`input_value`,name:`IF0`,check:`Boolean`}],message1:`%{BKY_CONTROLS_IF_MSG_THEN} %1`,args1:[{type:`input_statement`,name:`DO0`}],previousStatement:null,nextStatement:null,style:`logic_blocks`,helpUrl:`%{BKY_CONTROLS_IF_HELPURL}`,suppressPrefixSuffix:!0,mutator:`controls_if_mutator`,extensions:[`controls_if_tooltip`]},{type:`controls_ifelse`,message0:`%{BKY_CONTROLS_IF_MSG_IF} %1`,args0:[{type:`input_value`,name:`IF0`,check:`Boolean`}],message1:`%{BKY_CONTROLS_IF_MSG_THEN} %1`,args1:[{type:`input_statement`,name:`DO0`}],message2:`%{BKY_CONTROLS_IF_MSG_ELSE} %1`,args2:[{type:`input_statement`,name:`ELSE`}],previousStatement:null,nextStatement:null,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_TOOLTIP_2}`,helpUrl:`%{BKY_CONTROLS_IF_HELPURL}`,suppressPrefixSuffix:!0},{type:`logic_compare`,message0:`%1 %2 %3`,args0:[{type:`input_value`,name:`A`,ariaLabelText:`%{BKY_INPUT_LABEL_VALUE_A}`},{type:`field_dropdown`,name:`OP`,options:[[`=`,`EQ`,`%{BKY_LOGIC_COMPARE_EQ_ARIA}`],[`≠`,`NEQ`,`%{BKY_LOGIC_COMPARE_NEQ_ARIA}`],[`‏<`,`LT`,`%{BKY_LOGIC_COMPARE_LT_ARIA}`],[`‏≤`,`LTE`,`%{BKY_LOGIC_COMPARE_LTE_ARIA}`],[`‏>`,`GT`,`%{BKY_LOGIC_COMPARE_GT_ARIA}`],[`‏≥`,`GTE`,`%{BKY_LOGIC_COMPARE_GTE_ARIA}`]]},{type:`input_value`,name:`B`,ariaLabelText:`%{BKY_INPUT_LABEL_VALUE_B}`}],inputsInline:!0,output:`Boolean`,style:`logic_blocks`,helpUrl:`%{BKY_LOGIC_COMPARE_HELPURL}`,extensions:[`logic_compare`,`logic_op_tooltip`]},{type:`logic_operation`,message0:`%1 %2 %3`,args0:[{type:`input_value`,name:`A`,check:`Boolean`,ariaLabelText:`%{BKY_INPUT_LABEL_CONDITION_A}`},{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_LOGIC_OPERATION_AND}`,`AND`],[`%{BKY_LOGIC_OPERATION_OR}`,`OR`]]},{type:`input_value`,name:`B`,check:`Boolean`,ariaLabelText:`%{BKY_INPUT_LABEL_CONDITION_B}`}],inputsInline:!0,output:`Boolean`,style:`logic_blocks`,helpUrl:`%{BKY_LOGIC_OPERATION_HELPURL}`,extensions:[`logic_op_tooltip`]},{type:`logic_negate`,message0:`%{BKY_LOGIC_NEGATE_TITLE}`,args0:[{type:`input_value`,name:`BOOL`,check:`Boolean`}],output:`Boolean`,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_NEGATE_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_NEGATE_HELPURL}`},{type:`logic_null`,message0:`%{BKY_LOGIC_NULL}`,output:null,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_NULL_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_NULL_HELPURL}`},{type:`logic_ternary`,message0:`%{BKY_LOGIC_TERNARY_CONDITION} %1`,args0:[{type:`input_value`,name:`IF`,check:`Boolean`}],message1:`%{BKY_LOGIC_TERNARY_IF_TRUE} %1`,args1:[{type:`input_value`,name:`THEN`}],message2:`%{BKY_LOGIC_TERNARY_IF_FALSE} %1`,args2:[{type:`input_value`,name:`ELSE`}],output:null,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_TERNARY_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_TERNARY_HELPURL}`,extensions:[`logic_ternary`]},{type:`controls_if_if`,message0:`%{BKY_CONTROLS_IF_IF_TITLE_IF}`,nextStatement:null,enableContextMenu:!1,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_IF_TOOLTIP}`},{type:`controls_if_elseif`,message0:`%{BKY_CONTROLS_IF_ELSEIF_TITLE_ELSEIF}`,previousStatement:null,nextStatement:null,enableContextMenu:!1,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}`},{type:`controls_if_else`,message0:`%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}`,previousStatement:null,enableContextMenu:!1,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_ELSE_TOOLTIP}`}]);t.oh(`logic_op_tooltip`,t.yh(`OP`,{EQ:`%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}`,NEQ:`%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}`,LT:`%{BKY_LOGIC_COMPARE_TOOLTIP_LT}`,LTE:`%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}`,GT:`%{BKY_LOGIC_COMPARE_TOOLTIP_GT}`,GTE:`%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}`,AND:`%{BKY_LOGIC_OPERATION_TOOLTIP_AND}`,OR:`%{BKY_LOGIC_OPERATION_TOOLTIP_OR}`})),t.th(`controls_if_mutator`,{elseifCount_:0,elseCount_:0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=t.rc(`mutation`);return this.elseifCount_&&e.setAttribute(`elseif`,String(this.elseifCount_)),this.elseCount_&&e.setAttribute(`else`,`1`),e},domToMutation:function(e){this.elseifCount_=parseInt(e.getAttribute(`elseif`),10)||0,this.elseCount_=parseInt(e.getAttribute(`else`),10)||0,this.rebuildShape_()},saveExtraState:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=Object.create(null);return this.elseifCount_&&(e.elseIfCount=this.elseifCount_),this.elseCount_&&(e.hasElse=!0),e},loadExtraState:function(e){this.elseifCount_=e.elseIfCount||0,this.elseCount_=+!!e.hasElse,this.updateShape_()},decompose:function(e){var t=e.newBlock(`controls_if_if`);t.initSvg();var n=t.nextConnection;for(let t=1;t<=this.elseifCount_;t++){let t=e.newBlock(`controls_if_elseif`);t.initSvg(),n.connect(t.previousConnection),n=t.nextConnection}return this.elseCount_&&(e=e.newBlock(`controls_if_else`),e.initSvg(),n.connect(e.previousConnection)),t},compose:function(e){e=e.nextConnection.targetBlock(),this.elseCount_=this.elseifCount_=0;for(var t=[null],n=[null],r=null;e;){if(!e.isInsertionMarker())switch(e.type){case`controls_if_elseif`:this.elseifCount_++,t.push(e.valueConnection_),n.push(e.statementConnection_);break;case`controls_if_else`:this.elseCount_++,r=e.statementConnection_;break;default:throw TypeError(`Unknown block type: `+e.type)}e=e.getNextBlock()}this.updateShape_(),this.reconnectChildBlocks_(t,n,r)},saveConnections:function(e){e=e.nextConnection.targetBlock();for(var t=1;e;){if(!e.isInsertionMarker())switch(e.type){case`controls_if_elseif`:var n=this.getInput(`IF`+t);let r=this.getInput(`DO`+t);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=r&&r.connection.targetConnection,t++;break;case`controls_if_else`:n=this.getInput(`ELSE`),e.statementConnection_=n&&n.connection.targetConnection;break;default:throw TypeError(`Unknown block type: `+e.type)}e=e.getNextBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput(`ELSE`)&&(n=this.getInput(`ELSE`).connection.targetConnection);for(let n=1;this.getInput(`IF`+n);n++){let r=this.getInput(`IF`+n),i=this.getInput(`DO`+n);e.push(r.connection.targetConnection),t.push(i.connection.targetConnection)}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput(`ELSE`)&&this.removeInput(`ELSE`);for(var e=1;this.getInput(`IF`+e);e++)this.removeInput(`IF`+e),this.removeInput(`DO`+e);for(e=1;e<=this.elseifCount_;e++)this.appendValueInput(`IF`+e).setCheck(`Boolean`).appendField(t.C.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput(`DO`+e).appendField(t.C.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput(`ELSE`).appendField(t.C.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,n){for(let n=1;n<=this.elseifCount_;n++){let r;(r=e[n])==null||r.reconnect(this,`IF`+n);let i;(i=t[n])==null||i.reconnect(this,`DO`+n)}n==null||n.reconnect(this,`ELSE`)}},null,[`controls_if_elseif`,`controls_if_else`]),t.oh(`controls_if_tooltip`,function(){this.setTooltip(function(){if(this.elseifCount_||this.elseCount_){if(!this.elseifCount_&&this.elseCount_)return t.C.CONTROLS_IF_TOOLTIP_2;if(this.elseifCount_&&!this.elseCount_)return t.C.CONTROLS_IF_TOOLTIP_3;if(this.elseifCount_&&this.elseCount_)return t.C.CONTROLS_IF_TOOLTIP_4}else return t.C.CONTROLS_IF_TOOLTIP_1;return``}.bind(this))});var T={onchange:function(e){this.prevBlocks_||=[null,null];var n=this.getInputTargetBlock(`A`),r=this.getInputTargetBlock(`B`);n&&r&&!this.workspace.connectionChecker.doTypeChecks(n.outputConnection,r.outputConnection)&&(t.B(e.group),e=this.prevBlocks_[0],e!==n&&(n.unplug(),!e||e.isDisposed()||e.isShadow()||this.getInput(`A`).connection.connect(e.outputConnection)),n=this.prevBlocks_[1],n!==r&&(r.unplug(),!n||n.isDisposed()||n.isShadow()||this.getInput(`B`).connection.connect(n.outputConnection)),this.bumpNeighbours(),t.B(!1)),this.prevBlocks_[0]=this.getInputTargetBlock(`A`),this.prevBlocks_[1]=this.getInputTargetBlock(`B`)}};t.oh(`logic_compare`,function(){this.mixin(T)}),t.ph(`logic_ternary`,{prevParentConnection_:null,onchange:function(e){var n=this.getInputTargetBlock(`THEN`),r=this.getInputTargetBlock(`ELSE`),i=this.outputConnection.targetConnection;if((n||r)&&i)for(let a=0;a<2;a++){let o=a===1?n:r;o&&!o.workspace.connectionChecker.doTypeChecks(o.outputConnection,i)&&(t.B(e.group),i===this.prevParentConnection_?(this.unplug(),i.getSourceBlock().bumpNeighbours()):(o.unplug(),o.bumpNeighbours()),t.B(!1))}this.prevParentConnection_=i}}),t.Ab(w);var E={blocks:w},D=t.yb([{type:`lists_create_empty`,message0:`%{BKY_LISTS_CREATE_EMPTY_TITLE}`,output:`Array`,style:`list_blocks`,tooltip:`%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}`,helpUrl:`%{BKY_LISTS_CREATE_EMPTY_HELPURL}`},{type:`lists_repeat`,message0:`%{BKY_LISTS_REPEAT_TITLE}`,args0:[{type:`input_value`,name:`ITEM`,ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_REPEAT_ITEM}`},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_REPEAT_NUM}`}],output:`Array`,style:`list_blocks`,tooltip:`%{BKY_LISTS_REPEAT_TOOLTIP}`,helpUrl:`%{BKY_LISTS_REPEAT_HELPURL}`},{type:`lists_reverse`,message0:`%{BKY_LISTS_REVERSE_MESSAGE0}`,args0:[{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_TO_CHANGE}`}],output:`Array`,inputsInline:!0,style:`list_blocks`,tooltip:`%{BKY_LISTS_REVERSE_TOOLTIP}`,helpUrl:`%{BKY_LISTS_REVERSE_HELPURL}`},{type:`lists_isEmpty`,message0:`%{BKY_LISTS_ISEMPTY_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:[`String`,`Array`],ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_TO_CHECK}`}],output:`Boolean`,style:`list_blocks`,tooltip:`%{BKY_LISTS_ISEMPTY_TOOLTIP}`,helpUrl:`%{BKY_LISTS_ISEMPTY_HELPURL}`},{type:`lists_length`,message0:`%{BKY_LISTS_LENGTH_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:[`String`,`Array`],ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_TO_CHECK}`}],output:`Number`,style:`list_blocks`,tooltip:`%{BKY_LISTS_LENGTH_TOOLTIP}`,helpUrl:`%{BKY_LISTS_LENGTH_HELPURL}`}]);D.lists_create_with={init:function(){this.setHelpUrl(t.C.LISTS_CREATE_WITH_HELPURL),this.setStyle(`list_blocks`),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,`Array`),this.setMutator(new t.sh([`lists_create_with_item`],this)),this.setTooltip(t.C.LISTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){if(e=e.getAttribute(`items`),!e)throw TypeError(`element did not have items`);this.itemCount_=parseInt(e,10),this.updateShape_()},saveExtraState:function(){return{itemCount:this.itemCount_}},loadExtraState:function(e){this.itemCount_=e.itemCount,this.updateShape_()},decompose:function(e){var t=e.newBlock(`lists_create_with_container`);t.initSvg();var n=t.getInput(`STACK`).connection;for(let t=0;tt.C.LISTS_INDEX_OF_TOOLTIP.replace(`%1`,this.workspace.options.oneBasedIndex?`0`:`-1`))}},D.lists_getIndex={init:function(){var e=[[t.C.LISTS_GET_INDEX_GET,`GET`],[t.C.LISTS_GET_INDEX_GET_REMOVE,`GET_REMOVE`],[t.C.LISTS_GET_INDEX_REMOVE,`REMOVE`]];this.WHERE_OPTIONS=[[t.C.LISTS_GET_INDEX_FROM_START,`FROM_START`],[t.C.LISTS_GET_INDEX_FROM_END,`FROM_END`],[t.C.LISTS_GET_INDEX_FIRST,`FIRST`],[t.C.LISTS_GET_INDEX_LAST,`LAST`],[t.C.LISTS_GET_INDEX_RANDOM,`RANDOM`]],this.setHelpUrl(t.C.LISTS_GET_INDEX_HELPURL),this.setStyle(`list_blocks`),e=t.lh({type:`field_dropdown`,options:e}),e.setValidator(function(e){e=e===`REMOVE`,this.getSourceBlock().updateStatement_(e)}),this.appendValueInput(`VALUE`).setCheck(`Array`).appendField(t.C.LISTS_GET_INDEX_INPUT_IN_LIST).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_TO_CHECK),this.appendDummyInput().appendField(e,`MODE`).appendField(``,`SPACE`),e=t.lh({type:`field_dropdown`,options:this.WHERE_OPTIONS}),e.setValidator(function(e){var t=this.getValue();e=e===`FROM_START`||e===`FROM_END`,e!==(t===`FROM_START`||t===`FROM_END`)&&this.getSourceBlock().updateAt_(e)}),this.appendDummyInput().appendField(e,`WHERE`),this.appendDummyInput(`AT`),t.C.LISTS_GET_INDEX_TAIL&&this.appendDummyInput(`TAIL`).appendField(t.C.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0),this.setTooltip(()=>{var e=this.getFieldValue(`MODE`),n=this.getFieldValue(`WHERE`),r=``;switch(e+` `+n){case`GET FROM_START`:case`GET FROM_END`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case`GET FIRST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_FIRST;break;case`GET LAST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_LAST;break;case`GET RANDOM`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case`GET_REMOVE FROM_START`:case`GET_REMOVE FROM_END`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case`GET_REMOVE FIRST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST;break;case`GET_REMOVE LAST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST;break;case`GET_REMOVE RANDOM`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;break;case`REMOVE FROM_START`:case`REMOVE FROM_END`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM;break;case`REMOVE FIRST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST;break;case`REMOVE LAST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST;break;case`REMOVE RANDOM`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM}return(n===`FROM_START`||n===`FROM_END`)&&(r+=` `+(n===`FROM_START`?t.C.LISTS_INDEX_FROM_START_TOOLTIP:t.C.LISTS_INDEX_FROM_END_TOOLTIP).replace(`%1`,this.workspace.options.oneBasedIndex?`#1`:`#0`)),r})},mutationToDom:function(){var e=t.rc(`mutation`);e.setAttribute(`statement`,String(!this.outputConnection));var n=this.getInput(`AT`)instanceof t.Nn;return e.setAttribute(`at`,String(n)),e},domToMutation:function(e){var t=e.getAttribute(`statement`)===`true`;this.updateStatement_(t),e=e.getAttribute(`at`)!==`false`,this.updateAt_(e)},saveExtraState:function(){return this.outputConnection?null:{isStatement:!0}},loadExtraState:function(e){e.isStatement?this.updateStatement_(!0):typeof e==`string`&&this.domToMutation(t.uc(e))},updateStatement_:function(e){e!==!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput(`AT`),this.removeInput(`ORDINAL`,!0),e?(this.appendValueInput(`AT`).setCheck(`Number`).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`),t.C.LISTS_GET_INDEX_TAIL&&this.moveInputBefore(`TAIL`,null)}},D.lists_setIndex={init:function(){var e=[[t.C.LISTS_SET_INDEX_SET,`SET`],[t.C.LISTS_SET_INDEX_INSERT,`INSERT`]];this.WHERE_OPTIONS=[[t.C.LISTS_GET_INDEX_FROM_START,`FROM_START`],[t.C.LISTS_GET_INDEX_FROM_END,`FROM_END`],[t.C.LISTS_GET_INDEX_FIRST,`FIRST`],[t.C.LISTS_GET_INDEX_LAST,`LAST`],[t.C.LISTS_GET_INDEX_RANDOM,`RANDOM`]],this.setHelpUrl(t.C.LISTS_SET_INDEX_HELPURL),this.setStyle(`list_blocks`),this.appendValueInput(`LIST`).setCheck(`Array`).appendField(t.C.LISTS_SET_INDEX_INPUT_IN_LIST).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_TO_CHECK),e=t.lh({type:`field_dropdown`,options:e}),this.appendDummyInput().appendField(e,`MODE`).appendField(``,`SPACE`),e=t.lh({type:`field_dropdown`,options:this.WHERE_OPTIONS}),e.setValidator(function(e){var t=this.getValue();e=e===`FROM_START`||e===`FROM_END`,e!==(t===`FROM_START`||t===`FROM_END`)&&this.getSourceBlock().updateAt_(e)}),this.appendDummyInput().appendField(e,`WHERE`),this.appendDummyInput(`AT`),this.appendValueInput(`TO`).appendField(t.C.LISTS_SET_INDEX_INPUT_TO).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_VALUE_TO_SET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(t.C.LISTS_SET_INDEX_TOOLTIP),this.updateAt_(!0),this.setTooltip(()=>{var e=this.getFieldValue(`MODE`),n=this.getFieldValue(`WHERE`),r=``;switch(e+` `+n){case`SET FROM_START`:case`SET FROM_END`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_FROM;break;case`SET FIRST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_FIRST;break;case`SET LAST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_LAST;break;case`SET RANDOM`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM;break;case`INSERT FROM_START`:case`INSERT FROM_END`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM;break;case`INSERT FIRST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST;break;case`INSERT LAST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST;break;case`INSERT RANDOM`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM}return(n===`FROM_START`||n===`FROM_END`)&&(r+=` `+t.C.LISTS_INDEX_FROM_START_TOOLTIP.replace(`%1`,this.workspace.options.oneBasedIndex?`#1`:`#0`)),r})},mutationToDom:function(){var e=t.rc(`mutation`),n=this.getInput(`AT`)instanceof t.Nn;return e.setAttribute(`at`,String(n)),e},domToMutation:function(e){e=e.getAttribute(`at`)!==`false`,this.updateAt_(e)},saveExtraState:function(){return null},loadExtraState:function(){},updateAt_:function(e){this.removeInput(`AT`),this.removeInput(`ORDINAL`,!0),e?(this.appendValueInput(`AT`).setCheck(`Number`).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`),this.moveInputBefore(`AT`,`TO`),this.getInput(`ORDINAL`)&&this.moveInputBefore(`ORDINAL`,`TO`)}},D.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[t.C.LISTS_GET_SUBLIST_START_FROM_START,`FROM_START`],[t.C.LISTS_GET_SUBLIST_START_FROM_END,`FROM_END`],[t.C.LISTS_GET_SUBLIST_START_FIRST,`FIRST`]],this.WHERE_OPTIONS_2=[[t.C.LISTS_GET_SUBLIST_END_FROM_START,`FROM_START`],[t.C.LISTS_GET_SUBLIST_END_FROM_END,`FROM_END`],[t.C.LISTS_GET_SUBLIST_END_LAST,`LAST`]],this.setHelpUrl(t.C.LISTS_GET_SUBLIST_HELPURL),this.setStyle(`list_blocks`),this.appendValueInput(`LIST`).setCheck(`Array`).appendField(t.C.LISTS_GET_SUBLIST_INPUT_IN_LIST).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_TO_CHECK);var e=e=>{var n=t.lh({type:`field_dropdown`,options:this[`WHERE_OPTIONS_`+e]});return n.setValidator(function(t){var n=this.getValue();t=t===`FROM_START`||t===`FROM_END`,t!==(n===`FROM_START`||n===`FROM_END`)&&this.getSourceBlock().updateAt_(e,t)}),n};this.appendDummyInput(`WHERE1_INPUT`).appendField(e(1),`WHERE1`),this.appendDummyInput(`AT1`),this.appendDummyInput(`WHERE2_INPUT`).appendField(e(2),`WHERE2`),this.appendDummyInput(`AT2`),t.C.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput(`TAIL`).appendField(t.C.LISTS_GET_SUBLIST_TAIL),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(t.C.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=t.rc(`mutation`),n=this.getInput(`AT1`)instanceof t.Nn;return e.setAttribute(`at1`,String(n)),n=this.getInput(`AT2`)instanceof t.Nn,e.setAttribute(`at2`,String(n)),e},domToMutation:function(e){var t=e.getAttribute(`at1`)===`true`;e=e.getAttribute(`at2`)===`true`,this.updateAt_(1,t),this.updateAt_(2,e)},saveExtraState:function(){return null},loadExtraState:function(){},updateAt_:function(e,n){this.removeInput(`AT`+e),this.removeInput(`ORDINAL`+e,!0),n?(this.appendValueInput(`AT`+e).setCheck(`Number`).setAriaLabelProvider(e===1?t.C.INPUT_LABEL_LISTS_START_POSITION:t.C.INPUT_LABEL_LISTS_END_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`+e).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`+e),e===1&&(this.moveInputBefore(`AT1`,`WHERE2_INPUT`),this.getInput(`ORDINAL1`)&&this.moveInputBefore(`ORDINAL1`,`WHERE2_INPUT`)),t.C.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore(`TAIL`,null)}},D.lists_sort={init:function(){this.jsonInit({message0:`%{BKY_LISTS_SORT_TITLE}`,args0:[{type:`field_dropdown`,name:`TYPE`,options:[[`%{BKY_LISTS_SORT_TYPE_NUMERIC}`,`NUMERIC`],[`%{BKY_LISTS_SORT_TYPE_TEXT}`,`TEXT`],[`%{BKY_LISTS_SORT_TYPE_IGNORECASE}`,`IGNORE_CASE`]]},{type:`field_dropdown`,name:`DIRECTION`,options:[[`%{BKY_LISTS_SORT_ORDER_ASCENDING}`,`1`],[`%{BKY_LISTS_SORT_ORDER_DESCENDING}`,`-1`]]},{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:t.C.INPUT_LABEL_LISTS_TO_CHANGE}],output:`Array`,style:`list_blocks`,tooltip:`%{BKY_LISTS_SORT_TOOLTIP}`,helpUrl:`%{BKY_LISTS_SORT_HELPURL}`})}},D.lists_split={init:function(){var e=t.lh({type:`field_dropdown`,options:[[t.C.LISTS_SPLIT_LIST_FROM_TEXT,`SPLIT`],[t.C.LISTS_SPLIT_TEXT_FROM_LIST,`JOIN`]]});if(!e)throw Error(`field_dropdown not found`);e.setValidator(e=>{this.updateType_(e)}),this.setHelpUrl(t.C.LISTS_SPLIT_HELPURL),this.setStyle(`list_blocks`),this.appendValueInput(`INPUT`).setCheck(`String`).appendField(e,`MODE`).setAriaLabelProvider(()=>{var e=this.getFieldValue(`MODE`);if(e===`SPLIT`)return t.C.INPUT_LABEL_LISTS_LIST_FROM_TEXT;if(e===`JOIN`)return t.C.INPUT_LABEL_LISTS_TEXT_FROM_LIST}),this.appendValueInput(`DELIM`).setCheck(`String`).appendField(t.C.INPUT_LABEL_LISTS_DELIMITER).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_SPLIT_WITH_DELIMITER),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setTooltip(()=>{var e=this.getFieldValue(`MODE`);if(e===`SPLIT`)return t.C.LISTS_SPLIT_TOOLTIP_SPLIT;if(e===`JOIN`)return t.C.LISTS_SPLIT_TOOLTIP_JOIN;throw Error(`Unknown mode: `+e)})},updateType_:function(e){if(this.getFieldValue(`MODE`)!==e){let e=this.getInput(`INPUT`).connection;e.setShadowDom(null);let t=e.targetBlock();t&&(e.disconnect(),t.isShadow()?t.dispose(!1):this.bumpNeighbours())}e===`SPLIT`?(this.outputConnection.setCheck(`Array`),this.getInput(`INPUT`).setCheck(`String`)):(this.outputConnection.setCheck(`String`),this.getInput(`INPUT`).setCheck(`Array`))},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`mode`,this.getFieldValue(`MODE`)),e},domToMutation:function(e){this.updateType_(e.getAttribute(`mode`))},saveExtraState:function(){return{mode:this.getFieldValue(`MODE`)}},loadExtraState:function(e){this.updateType_(e.mode)}},t.Ab(D);var ee={blocks:D};return t.__chunk_blocks={blocks:Object.assign({},D,w,x,y,m,u,c,o),lists:ee,logic:E,loops:C,math:b,procedures:v,texts:p,variables:l,variablesDynamic:s},t.__chunk_blocks.__namespace__=t,t.__chunk_blocks})}));a();var{blocks:ee,lists:te,logic:ne,loops:re,math:ie,procedures:ae,texts:oe,variables:se,variablesDynamic:ce}=e(D(),1).default,le=n(((e,t)=>{(function(n,r){if(typeof e==`object`)t.exports=r();else{var i=r();for(var a in i)n.Blockly.Msg[a]=i[a]}})(e,function(){var e=e||{Msg:Object.create(null)};return e.Msg.ADD_COMMENT=`Add Comment`,e.Msg.ALT_KEY=`Alt`,e.Msg.ANNOUNCE_MOVE_AFTER=`Moving %1 after %2.`,e.Msg.ANNOUNCE_MOVE_AROUND=`Moving %1 around %2.`,e.Msg.ANNOUNCE_MOVE_BEFORE=`Moving %1 before %2.`,e.Msg.ANNOUNCE_MOVE_CANCELED=`Canceled movement.`,e.Msg.ANNOUNCE_MOVE_INSIDE=`Moving %1 inside %2.`,e.Msg.ANNOUNCE_MOVE_OF=`%1 of %2`,e.Msg.ANNOUNCE_MOVE_TO=`Moving %1 to %2.`,e.Msg.ANNOUNCE_MOVE_WORKSPACE=`Moving %1 on workspace.`,e.Msg.ARIA_LABEL_ADD_ELSE_IF=`Add else if`,e.Msg.ARIA_LABEL_ADD_INPUT=`Add input`,e.Msg.ARIA_LABEL_ADD_LIST_ITEM=`Add list item`,e.Msg.ARIA_LABEL_ADD_TEXT=`Add text`,e.Msg.ARIA_LABEL_BUTTON=`button`,e.Msg.ARIA_LABEL_COMMENT=`Comment`,e.Msg.ARIA_LABEL_COMMENT_COLLAPSE=`Collapse Comment`,e.Msg.ARIA_LABEL_COMMENT_EXPAND=`Expand Comment`,e.Msg.ARIA_LABEL_FIELD_ANGLE=`%1 degrees`,e.Msg.ARIA_LABEL_HEADING=`heading`,e.Msg.ARIA_LABEL_REMOVE_ELSE_IF=`Remove else if`,e.Msg.ARIA_LABEL_REMOVE_INPUT=`Remove input`,e.Msg.ARIA_LABEL_REMOVE_LIST_ITEM=`Remove list item`,e.Msg.ARIA_LABEL_REMOVE_TEXT=`Remove text`,e.Msg.ARIA_LABEL_TRASH_EMPTY=`Trash, currently empty`,e.Msg.ARIA_TYPE_FIELD_ANGLE=`angle`,e.Msg.ARIA_TYPE_FIELD_BITMAP=`pixel image`,e.Msg.ARIA_TYPE_FIELD_CHECKBOX=`checkbox`,e.Msg.ARIA_TYPE_FIELD_COLOUR=`color`,e.Msg.ARIA_TYPE_FIELD_DATE=`date`,e.Msg.ARIA_TYPE_FIELD_DROPDOWN=`dropdown`,e.Msg.ARIA_TYPE_FIELD_GRID=`grid dropdown`,e.Msg.ARIA_TYPE_FIELD_IMAGE=`image`,e.Msg.ARIA_TYPE_FIELD_INPUT=`input`,e.Msg.ARIA_TYPE_FIELD_NUMBER=`number`,e.Msg.ARIA_TYPE_FIELD_TEXT_INPUT=`text`,e.Msg.ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT=`input name`,e.Msg.ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE=`function name`,e.Msg.BACKSPACE_KEY=`Backspace`,e.Msg.BLOCK_LABEL_BEGIN_PREFIX=`Begin %1`,e.Msg.BLOCK_LABEL_BEGIN_STACK=`Begin stack`,e.Msg.BLOCK_LABEL_COLLAPSED=`collapsed`,e.Msg.BLOCK_LABEL_CONTAINER=`container`,e.Msg.BLOCK_LABEL_DISABLED=`disabled`,e.Msg.BLOCK_LABEL_HAS_BRANCHES=`has %1 branches`,e.Msg.BLOCK_LABEL_HAS_INPUT=`has input`,e.Msg.BLOCK_LABEL_HAS_INPUTS=`has inputs`,e.Msg.BLOCK_LABEL_REPLACEABLE=`replaceable`,e.Msg.BLOCK_LABEL_STACK_BLOCKS=`%1 stack blocks`,e.Msg.BLOCK_LABEL_STATEMENT=`statement`,e.Msg.BLOCK_LABEL_TOOLBOX_CATEGORY=`%1 category`,e.Msg.BLOCK_LABEL_VALUE=`value`,e.Msg.BUBBLE_LABEL_COMMENT=`Comment: %1`,e.Msg.BUBBLE_LABEL_DEFAULT=`Bubble`,e.Msg.BUBBLE_LABEL_WARNING=`Warning: %1`,e.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE=`Can't delete the variable '%1' because it's part of the definition of the function '%2'`,e.Msg.CAPS_LOCK_KEY=`Caps Lock`,e.Msg.CHANGE_VALUE_TITLE=`Change value:`,e.Msg.CHROME_OS=`ChromeOS`,e.Msg.CLEAN_UP=`Clean up Blocks`,e.Msg.CLOSE=`Close`,e.Msg.CLOSE_BACKPACK=`Close backpack`,e.Msg.COLLAPSED_WARNINGS_WARNING=`Collapsed blocks contain warnings.`,e.Msg.COLLAPSE_ALL=`Collapse Blocks`,e.Msg.COLLAPSE_BLOCK=`Collapse Block`,e.Msg.COLOUR_BLEND_COLOUR1=`colour 1`,e.Msg.COLOUR_BLEND_COLOUR2=`colour 2`,e.Msg.COLOUR_BLEND_HELPURL=`https://meyerweb.com/eric/tools/color-blend/#:::rgbp`,e.Msg.COLOUR_BLEND_RATIO=`ratio`,e.Msg.COLOUR_BLEND_TITLE=`blend`,e.Msg.COLOUR_BLEND_TOOLTIP=`Blends two colours together with a given ratio (0.0 - 1.0).`,e.Msg.COLOUR_PICKER_HELPURL=`https://en.wikipedia.org/wiki/Color`,e.Msg.COLOUR_PICKER_TOOLTIP=`Choose a colour from the palette.`,e.Msg.COLOUR_RANDOM_HELPURL=`http://randomcolour.com`,e.Msg.COLOUR_RANDOM_TITLE=`random colour`,e.Msg.COLOUR_RANDOM_TOOLTIP=`Choose a colour at random.`,e.Msg.COLOUR_RGB_BLUE=`blue`,e.Msg.COLOUR_RGB_GREEN=`green`,e.Msg.COLOUR_RGB_HELPURL=`https://www.december.com/html/spec/colorpercompact.html`,e.Msg.COLOUR_RGB_RED=`red`,e.Msg.COLOUR_RGB_TITLE=`colour with`,e.Msg.COLOUR_RGB_TOOLTIP=`Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.`,e.Msg.COMMAND_KEY=`Command`,e.Msg.CONTEXT_MENU_KEY=`≣ Menu`,e.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#loop-termination-blocks`,e.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK=`break out of loop`,e.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE=`continue with next iteration of loop`,e.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK=`Break out of the containing loop.`,e.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE=`Skip the rest of this loop, and continue with the next iteration.`,e.Msg.CONTROLS_FLOW_STATEMENTS_WARNING=`Warning: This block may only be used within a loop.`,e.Msg.CONTROLS_FOREACH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#for-each`,e.Msg.CONTROLS_FOREACH_TITLE=`for each item %1 in list %2`,e.Msg.CONTROLS_FOREACH_TOOLTIP=`For each item in a list, set the variable '%1' to the item, and then do some statements.`,e.Msg.CONTROLS_FOR_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#count-with`,e.Msg.CONTROLS_FOR_TITLE=`count with %1 from %2 to %3 by %4`,e.Msg.CONTROLS_FOR_TOOLTIP=`Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.`,e.Msg.CONTROLS_IF_ELSEIF_TOOLTIP=`Add a condition to the if block.`,e.Msg.CONTROLS_IF_ELSE_TOOLTIP=`Add a final, catch-all condition to the if block.`,e.Msg.CONTROLS_IF_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/IfElse`,e.Msg.CONTROLS_IF_IF_TOOLTIP=`Add, remove, or reorder sections to reconfigure this if block.`,e.Msg.CONTROLS_IF_MSG_ELSE=`else`,e.Msg.CONTROLS_IF_MSG_ELSEIF=`else if`,e.Msg.CONTROLS_IF_MSG_IF=`if`,e.Msg.CONTROLS_IF_TOOLTIP_1=`If a value is true, then do some statements.`,e.Msg.CONTROLS_IF_TOOLTIP_2=`If a value is true, then do the first block of statements. Otherwise, do the second block of statements.`,e.Msg.CONTROLS_IF_TOOLTIP_3=`If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.`,e.Msg.CONTROLS_IF_TOOLTIP_4=`If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.`,e.Msg.CONTROLS_REPEAT_HELPURL=`https://en.wikipedia.org/wiki/For_loop`,e.Msg.CONTROLS_REPEAT_INPUT_DO=`do`,e.Msg.CONTROLS_REPEAT_TITLE=`repeat %1 times`,e.Msg.CONTROLS_REPEAT_TOOLTIP=`Do some statements several times.`,e.Msg.CONTROLS_WHILEUNTIL_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#repeat`,e.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL=`repeat until`,e.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE=`repeat while`,e.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL=`While a value is false, then do some statements.`,e.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE=`While a value is true, then do some statements.`,e.Msg.CONTROL_KEY=`Control`,e.Msg.COPY_ALL_TO_BACKPACK=`Copy All Blocks to Backpack`,e.Msg.COPY_SHORTCUT=`Copy`,e.Msg.COPY_TO_BACKPACK=`Copy to Backpack`,e.Msg.CURRENT_BLOCK_ANNOUNCEMENT=`Current block: %1`,e.Msg.CUT_SHORTCUT=`Cut`,e.Msg.DELETE_ALL_BLOCKS=`Delete all %1 blocks?`,e.Msg.DELETE_BLOCK=`Delete Block`,e.Msg.DELETE_KEY=`Delete`,e.Msg.DELETE_VARIABLE=`Delete the '%1' variable`,e.Msg.DELETE_VARIABLE_CONFIRMATION=`Delete %1 uses of the '%2' variable?`,e.Msg.DELETE_X_BLOCKS=`Delete %1 Blocks`,e.Msg.DIALOG_CANCEL=`Cancel`,e.Msg.DIALOG_OK=`OK`,e.Msg.DISABLE_BLOCK=`Disable Block`,e.Msg.DUPLICATE_BLOCK=`Duplicate`,e.Msg.DUPLICATE_COMMENT=`Duplicate Comment`,e.Msg.EDIT_BLOCK_CONTENTS=`Edit Block contents`,e.Msg.EMPTY_BACKPACK=`Empty Backpack`,e.Msg.ENABLE_BLOCK=`Enable Block`,e.Msg.END_KEY=`End`,e.Msg.ENTER_KEY=`Enter`,e.Msg.ESCAPE=`Escape`,e.Msg.EXPAND_ALL=`Expand Blocks`,e.Msg.EXPAND_BLOCK=`Expand Block`,e.Msg.EXTERNAL_INPUTS=`External Inputs`,e.Msg.FIELD_BITMAP_ARIA_VALUE=`%1 by %2, %3 pixels on`,e.Msg.FIELD_BITMAP_BUTTON_LABEL_CLEAR=`Clear`,e.Msg.FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE=`Randomize`,e.Msg.FIELD_BITMAP_PIXEL_LABEL=`%1, row %2, column %3`,e.Msg.FIELD_BITMAP_PIXEL_OFF=`off`,e.Msg.FIELD_BITMAP_PIXEL_ON=`on`,e.Msg.FIELD_LABEL_CHECKBOX_CHECKED=`Checked`,e.Msg.FIELD_LABEL_CHECKBOX_UNCHECKED=`Not checked`,e.Msg.FIELD_LABEL_EDIT_PREFIX=`Edit %1`,e.Msg.FIELD_LABEL_EMPTY=`empty`,e.Msg.FIELD_LABEL_OPTION_INDEX=`Option %1`,e.Msg.FIELD_LABEL_VARIABLE=`Variable '%1'`,e.Msg.FIELD_MULTILINEINPUT_FINISH_EDITING=`Finish editing`,e.Msg.FIELD_MULTILINEINPUT_NEW_LINE=`New line`,e.Msg.HELP=`Help`,e.Msg.HELP_PROMPT=`Press %1 for help on keyboard controls.`,e.Msg.HOME_KEY=`Home`,e.Msg.ICON_LABEL_COMMENT_CLOSED=`Open Comment`,e.Msg.ICON_LABEL_COMMENT_OPEN=`Close Comment`,e.Msg.ICON_LABEL_DEFAULT=`Icon`,e.Msg.ICON_LABEL_MUTATOR_CLOSED=`Edit this block`,e.Msg.ICON_LABEL_MUTATOR_OPEN=`Close block editor`,e.Msg.ICON_LABEL_WARNING_CLOSED=`Open Warning`,e.Msg.ICON_LABEL_WARNING_OPEN=`Close Warning`,e.Msg.INLINE_INPUTS=`Inline Inputs`,e.Msg.INPUT_LABEL_CONDITION=`condition`,e.Msg.INPUT_LABEL_CONDITION_A=`first condition`,e.Msg.INPUT_LABEL_CONDITION_B=`second condition`,e.Msg.INPUT_LABEL_EMPTY=`Empty`,e.Msg.INPUT_LABEL_END_STATEMENT=`End %1`,e.Msg.INPUT_LABEL_INDEX=`input %1`,e.Msg.INPUT_LABEL_LISTS_CREATE_WITH_ITEM=`value %1`,e.Msg.INPUT_LABEL_LISTS_DELIMITER=`delimiter`,e.Msg.INPUT_LABEL_LISTS_END_POSITION=`end position`,e.Msg.INPUT_LABEL_LISTS_LIST_FROM_TEXT=`text to split`,e.Msg.INPUT_LABEL_LISTS_POSITION=`position within list`,e.Msg.INPUT_LABEL_LISTS_REPEAT_ITEM=`value to repeat`,e.Msg.INPUT_LABEL_LISTS_REPEAT_NUM=`number of times to repeat`,e.Msg.INPUT_LABEL_LISTS_START_POSITION=`start position`,e.Msg.INPUT_LABEL_LISTS_TEXT_FROM_LIST=`list to join`,e.Msg.INPUT_LABEL_LISTS_TO_CHANGE=`list to change`,e.Msg.INPUT_LABEL_LISTS_TO_CHECK=`list to check`,e.Msg.INPUT_LABEL_LISTS_VALUE_TO_SET=`value to set`,e.Msg.INPUT_LABEL_LOOP_BY=`increment`,e.Msg.INPUT_LABEL_LOOP_FROM=`starting number`,e.Msg.INPUT_LABEL_LOOP_LIST=`list to iterate over`,e.Msg.INPUT_LABEL_LOOP_TIMES=`number of times to repeat`,e.Msg.INPUT_LABEL_LOOP_TO=`ending number`,e.Msg.INPUT_LABEL_MATH_CHANGE_BY=`amount to change by`,e.Msg.INPUT_LABEL_MATH_CONSTRAIN_VALUE=`number to constrain`,e.Msg.INPUT_LABEL_MATH_DIVIDEND=`dividend`,e.Msg.INPUT_LABEL_MATH_DIVISOR=`divisor`,e.Msg.INPUT_LABEL_NUMBER=`number`,e.Msg.INPUT_LABEL_NUMBER_A=`first number`,e.Msg.INPUT_LABEL_NUMBER_ATAN2_X=`x coordinate`,e.Msg.INPUT_LABEL_NUMBER_ATAN2_Y=`y coordinate`,e.Msg.INPUT_LABEL_NUMBER_B=`second number`,e.Msg.INPUT_LABEL_NUMBER_LIST=`list of numbers`,e.Msg.INPUT_LABEL_NUMBER_MAX=`maximum`,e.Msg.INPUT_LABEL_NUMBER_MIN=`minimum`,e.Msg.INPUT_LABEL_NUMBER_TO_CHECK=`number to check`,e.Msg.INPUT_LABEL_STATEMENT=`statement position`,e.Msg.INPUT_LABEL_TEXT_APPEND=`value to append`,e.Msg.INPUT_LABEL_TEXT_END_POSITION=`end position`,e.Msg.INPUT_LABEL_TEXT_JOIN_ITEM=`value %1`,e.Msg.INPUT_LABEL_TEXT_POSITION=`letter position`,e.Msg.INPUT_LABEL_TEXT_PROMPT_MESSAGE=`message`,e.Msg.INPUT_LABEL_TEXT_START_POSITION=`start position`,e.Msg.INPUT_LABEL_TEXT_TO_CHANGE=`text to change`,e.Msg.INPUT_LABEL_TEXT_TO_CHECK=`text to check`,e.Msg.INPUT_LABEL_TEXT_TO_FIND=`text to find`,e.Msg.INPUT_LABEL_TEXT_TO_REPLACE=`text to replace`,e.Msg.INPUT_LABEL_VALUE=`value position`,e.Msg.INPUT_LABEL_VALUE_A=`first value`,e.Msg.INPUT_LABEL_VALUE_B=`second value`,e.Msg.INPUT_LABEL_VARIABLES_SET=`value to set`,e.Msg.INSERT_KEY=`Insert`,e.Msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT=`Use %1 to navigate inside of blocks.`,e.Msg.KEYBOARD_NAV_CONSTRAINED_MOVE_HINT=`Use the arrow keys to move, then %1 to accept the position.`,e.Msg.KEYBOARD_NAV_COPIED_HINT=`Copied. Press %1 to paste.`,e.Msg.KEYBOARD_NAV_CUT_HINT=`Cut. Press %1 to paste.`,e.Msg.KEYBOARD_NAV_FLYOUT_LABEL_HINT=`Use the arrow keys to navigate to a block, or press %1 to go to the next heading.`,e.Msg.KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT=`Hold %1 and use arrow keys to move freely, then %2 to accept the position.`,e.Msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT=`Use the arrow keys to navigate.`,e.Msg.LINUX=`Linux`,e.Msg.LISTS_CREATE_EMPTY_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#create-empty-list`,e.Msg.LISTS_CREATE_EMPTY_TITLE=`create empty list`,e.Msg.LISTS_CREATE_EMPTY_TOOLTIP=`Returns a list, of length 0, containing no data records`,e.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD=`list`,e.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP=`Add, remove, or reorder sections to reconfigure this list block.`,e.Msg.LISTS_CREATE_WITH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#create-list-with`,e.Msg.LISTS_CREATE_WITH_INPUT_WITH=`create list with`,e.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP=`Add an item to the list.`,e.Msg.LISTS_CREATE_WITH_TOOLTIP=`Create a list with any number of items.`,e.Msg.LISTS_GET_INDEX_FIRST=`first`,e.Msg.LISTS_GET_INDEX_FROM_END=`# from end`,e.Msg.LISTS_GET_INDEX_FROM_START=`#`,e.Msg.LISTS_GET_INDEX_GET=`get`,e.Msg.LISTS_GET_INDEX_GET_REMOVE=`get and remove`,e.Msg.LISTS_GET_INDEX_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#getting-items-from-a-list`,e.Msg.LISTS_GET_INDEX_LAST=`last`,e.Msg.LISTS_GET_INDEX_RANDOM=`random`,e.Msg.LISTS_GET_INDEX_REMOVE=`remove`,e.Msg.LISTS_GET_INDEX_TAIL=``,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST=`Returns the first item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM=`Returns the item at the specified position in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST=`Returns the last item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM=`Returns a random item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST=`Removes and returns the first item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM=`Removes and returns the item at the specified position in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST=`Removes and returns the last item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM=`Removes and returns a random item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST=`Removes the first item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM=`Removes the item at the specified position in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST=`Removes the last item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM=`Removes a random item in a list.`,e.Msg.LISTS_GET_SUBLIST_END_FROM_END=`to # from end`,e.Msg.LISTS_GET_SUBLIST_END_FROM_START=`to #`,e.Msg.LISTS_GET_SUBLIST_END_LAST=`to last`,e.Msg.LISTS_GET_SUBLIST_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#getting-a-sublist`,e.Msg.LISTS_GET_SUBLIST_START_FIRST=`get sub-list from first`,e.Msg.LISTS_GET_SUBLIST_START_FROM_END=`get sub-list from # from end`,e.Msg.LISTS_GET_SUBLIST_START_FROM_START=`get sub-list from #`,e.Msg.LISTS_GET_SUBLIST_TAIL=``,e.Msg.LISTS_GET_SUBLIST_TOOLTIP=`Creates a copy of the specified portion of a list.`,e.Msg.LISTS_INDEX_FROM_END_TOOLTIP=`%1 is the last item.`,e.Msg.LISTS_INDEX_FROM_START_TOOLTIP=`%1 is the first item.`,e.Msg.LISTS_INDEX_OF_FIRST=`find first occurrence of item`,e.Msg.LISTS_INDEX_OF_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#finding-items-in-a-list`,e.Msg.LISTS_INDEX_OF_LAST=`find last occurrence of item`,e.Msg.LISTS_INDEX_OF_TOOLTIP=`Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.`,e.Msg.LISTS_INLIST=`in list`,e.Msg.LISTS_ISEMPTY_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#is-empty`,e.Msg.LISTS_ISEMPTY_TITLE=`%1 is empty`,e.Msg.LISTS_ISEMPTY_TOOLTIP=`Returns true if the list is empty.`,e.Msg.LISTS_LENGTH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#length-of`,e.Msg.LISTS_LENGTH_TITLE=`length of %1`,e.Msg.LISTS_LENGTH_TOOLTIP=`Returns the length of a list.`,e.Msg.LISTS_REPEAT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#create-list-with`,e.Msg.LISTS_REPEAT_TITLE=`create list with item %1 repeated %2 times`,e.Msg.LISTS_REPEAT_TOOLTIP=`Creates a list consisting of the given value repeated the specified number of times.`,e.Msg.LISTS_REVERSE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#reversing-a-list`,e.Msg.LISTS_REVERSE_MESSAGE0=`reverse %1`,e.Msg.LISTS_REVERSE_TOOLTIP=`Reverse a copy of a list.`,e.Msg.LISTS_SET_INDEX_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#in-list--set`,e.Msg.LISTS_SET_INDEX_INPUT_TO=`as`,e.Msg.LISTS_SET_INDEX_INSERT=`insert at`,e.Msg.LISTS_SET_INDEX_SET=`set`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST=`Inserts the item at the start of a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM=`Inserts the item at the specified position in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST=`Append the item to the end of a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM=`Inserts the item randomly in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST=`Sets the first item in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM=`Sets the item at the specified position in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST=`Sets the last item in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM=`Sets a random item in a list.`,e.Msg.LISTS_SORT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#sorting-a-list`,e.Msg.LISTS_SORT_ORDER_ASCENDING=`ascending`,e.Msg.LISTS_SORT_ORDER_DESCENDING=`descending`,e.Msg.LISTS_SORT_TITLE=`sort %1 %2 %3`,e.Msg.LISTS_SORT_TOOLTIP=`Sort a copy of a list.`,e.Msg.LISTS_SORT_TYPE_IGNORECASE=`alphabetic, ignore case`,e.Msg.LISTS_SORT_TYPE_NUMERIC=`numeric`,e.Msg.LISTS_SORT_TYPE_TEXT=`alphabetic`,e.Msg.LISTS_SPLIT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#splitting-strings-and-joining-lists`,e.Msg.LISTS_SPLIT_LIST_FROM_TEXT=`make list from text`,e.Msg.LISTS_SPLIT_TEXT_FROM_LIST=`make text from list`,e.Msg.LISTS_SPLIT_TOOLTIP_JOIN=`Join a list of texts into one text, separated by a delimiter.`,e.Msg.LISTS_SPLIT_TOOLTIP_SPLIT=`Split text into a list of texts, breaking at each delimiter.`,e.Msg.LISTS_SPLIT_WITH_DELIMITER=`with delimiter`,e.Msg.LOGIC_BOOLEAN_FALSE=`false`,e.Msg.LOGIC_BOOLEAN_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#values`,e.Msg.LOGIC_BOOLEAN_TOOLTIP=`Returns either true or false.`,e.Msg.LOGIC_BOOLEAN_TRUE=`true`,e.Msg.LOGIC_COMPARE_EQ_ARIA=`equals`,e.Msg.LOGIC_COMPARE_GTE_ARIA=`greater than or equal to`,e.Msg.LOGIC_COMPARE_GT_ARIA=`greater than`,e.Msg.LOGIC_COMPARE_HELPURL=`https://en.wikipedia.org/wiki/Inequality_(mathematics)`,e.Msg.LOGIC_COMPARE_LTE_ARIA=`less than or equal to`,e.Msg.LOGIC_COMPARE_LT_ARIA=`less than`,e.Msg.LOGIC_COMPARE_NEQ_ARIA=`not equals`,e.Msg.LOGIC_COMPARE_TOOLTIP_EQ=`Return true if both inputs equal each other.`,e.Msg.LOGIC_COMPARE_TOOLTIP_GT=`Return true if the first input is greater than the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_GTE=`Return true if the first input is greater than or equal to the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_LT=`Return true if the first input is smaller than the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_LTE=`Return true if the first input is smaller than or equal to the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_NEQ=`Return true if both inputs are not equal to each other.`,e.Msg.LOGIC_NEGATE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#not`,e.Msg.LOGIC_NEGATE_TITLE=`not %1`,e.Msg.LOGIC_NEGATE_TOOLTIP=`Returns true if the input is false. Returns false if the input is true.`,e.Msg.LOGIC_NULL=`null`,e.Msg.LOGIC_NULL_HELPURL=`https://en.wikipedia.org/wiki/Nullable_type`,e.Msg.LOGIC_NULL_TOOLTIP=`Returns null.`,e.Msg.LOGIC_OPERATION_AND=`and`,e.Msg.LOGIC_OPERATION_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#logical-operations`,e.Msg.LOGIC_OPERATION_OR=`or`,e.Msg.LOGIC_OPERATION_TOOLTIP_AND=`Return true if both inputs are true.`,e.Msg.LOGIC_OPERATION_TOOLTIP_OR=`Return true if at least one of the inputs is true.`,e.Msg.LOGIC_TERNARY_CONDITION=`test`,e.Msg.LOGIC_TERNARY_HELPURL=`https://en.wikipedia.org/wiki/%3F:`,e.Msg.LOGIC_TERNARY_IF_FALSE=`if false`,e.Msg.LOGIC_TERNARY_IF_TRUE=`if true`,e.Msg.LOGIC_TERNARY_TOOLTIP=`Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.`,e.Msg.MAC_OS=`macOS`,e.Msg.MATH_ADDITION_SYMBOL=`+`,e.Msg.MATH_ADDITION_SYMBOL_ARIA=`plus`,e.Msg.MATH_ARITHMETIC_HELPURL=`https://en.wikipedia.org/wiki/Arithmetic`,e.Msg.MATH_ARITHMETIC_TOOLTIP_ADD=`Return the sum of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE=`Return the quotient of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS=`Return the difference of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY=`Return the product of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_POWER=`Return the first number raised to the power of the second number.`,e.Msg.MATH_ATAN2_HELPURL=`https://en.wikipedia.org/wiki/Atan2`,e.Msg.MATH_ATAN2_TITLE=`atan2 of X:%1 Y:%2`,e.Msg.MATH_ATAN2_TOOLTIP=`Return the arctangent of point (X, Y) in degrees from -180 to 180.`,e.Msg.MATH_CHANGE_HELPURL=`https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter`,e.Msg.MATH_CHANGE_TITLE=`change %1 by %2`,e.Msg.MATH_CHANGE_TOOLTIP=`Add a number to variable '%1'.`,e.Msg.MATH_CONSTANT_E_ARIA=`e`,e.Msg.MATH_CONSTANT_GOLDEN_RATIO_ARIA=`golden ratio`,e.Msg.MATH_CONSTANT_HELPURL=`https://en.wikipedia.org/wiki/Mathematical_constant`,e.Msg.MATH_CONSTANT_INFINITY_ARIA=`infinity`,e.Msg.MATH_CONSTANT_PI_ARIA=`pi`,e.Msg.MATH_CONSTANT_SQRT1_2_ARIA=`square root of 1 over 2`,e.Msg.MATH_CONSTANT_SQRT2_ARIA=`square root of 2`,e.Msg.MATH_CONSTANT_TOOLTIP=`Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).`,e.Msg.MATH_CONSTRAIN_HELPURL=`https://en.wikipedia.org/wiki/Clamping_(graphics)`,e.Msg.MATH_CONSTRAIN_TITLE=`constrain %1 low %2 high %3`,e.Msg.MATH_CONSTRAIN_TOOLTIP=`Constrain a number to be between the specified limits (inclusive).`,e.Msg.MATH_DIVISION_SYMBOL=`÷`,e.Msg.MATH_DIVISION_SYMBOL_ARIA=`divided by`,e.Msg.MATH_IS_DIVISIBLE_BY=`is divisible by`,e.Msg.MATH_IS_EVEN=`is even`,e.Msg.MATH_IS_NEGATIVE=`is negative`,e.Msg.MATH_IS_ODD=`is odd`,e.Msg.MATH_IS_POSITIVE=`is positive`,e.Msg.MATH_IS_PRIME=`is prime`,e.Msg.MATH_IS_TOOLTIP=`Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.`,e.Msg.MATH_IS_WHOLE=`is whole`,e.Msg.MATH_MODULO_HELPURL=`https://en.wikipedia.org/wiki/Modulo_operation`,e.Msg.MATH_MODULO_TITLE=`remainder of %1 ÷ %2`,e.Msg.MATH_MODULO_TOOLTIP=`Return the remainder from dividing the two numbers.`,e.Msg.MATH_MULTIPLICATION_SYMBOL=`×`,e.Msg.MATH_MULTIPLICATION_SYMBOL_ARIA=`times`,e.Msg.MATH_NUMBER_HELPURL=`https://en.wikipedia.org/wiki/Number`,e.Msg.MATH_NUMBER_TOOLTIP=`A number.`,e.Msg.MATH_ONLIST_HELPURL=``,e.Msg.MATH_ONLIST_OPERATOR_AVERAGE=`average of list`,e.Msg.MATH_ONLIST_OPERATOR_MAX=`max of list`,e.Msg.MATH_ONLIST_OPERATOR_MAX_ARIA=`maximum`,e.Msg.MATH_ONLIST_OPERATOR_MEDIAN=`median of list`,e.Msg.MATH_ONLIST_OPERATOR_MIN=`min of list`,e.Msg.MATH_ONLIST_OPERATOR_MIN_ARIA=`minimum`,e.Msg.MATH_ONLIST_OPERATOR_MODE=`modes of list`,e.Msg.MATH_ONLIST_OPERATOR_RANDOM=`random item of list`,e.Msg.MATH_ONLIST_OPERATOR_STD_DEV=`standard deviation of list`,e.Msg.MATH_ONLIST_OPERATOR_SUM=`sum of list`,e.Msg.MATH_ONLIST_TOOLTIP_AVERAGE=`Return the average (arithmetic mean) of the numeric values in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MAX=`Return the largest number in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MEDIAN=`Return the median number in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MIN=`Return the smallest number in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MODE=`Return a list of the most common item(s) in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_RANDOM=`Return a random element from the list.`,e.Msg.MATH_ONLIST_TOOLTIP_STD_DEV=`Return the standard deviation of the list.`,e.Msg.MATH_ONLIST_TOOLTIP_SUM=`Return the sum of all the numbers in the list.`,e.Msg.MATH_POWER_SYMBOL=`^`,e.Msg.MATH_POWER_SYMBOL_ARIA=`to the power of`,e.Msg.MATH_RANDOM_FLOAT_HELPURL=`https://en.wikipedia.org/wiki/Random_number_generation`,e.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM=`random fraction`,e.Msg.MATH_RANDOM_FLOAT_TOOLTIP=`Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).`,e.Msg.MATH_RANDOM_INT_HELPURL=`https://en.wikipedia.org/wiki/Random_number_generation`,e.Msg.MATH_RANDOM_INT_TITLE=`random integer from %1 to %2`,e.Msg.MATH_RANDOM_INT_TOOLTIP=`Return a random integer between the two specified limits, inclusive.`,e.Msg.MATH_ROUND_HELPURL=`https://en.wikipedia.org/wiki/Rounding`,e.Msg.MATH_ROUND_OPERATOR_ROUND=`round`,e.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN=`round down`,e.Msg.MATH_ROUND_OPERATOR_ROUNDUP=`round up`,e.Msg.MATH_ROUND_TOOLTIP=`Round a number up or down.`,e.Msg.MATH_SINGLE_HELPURL=`https://en.wikipedia.org/wiki/Square_root`,e.Msg.MATH_SINGLE_OP_ABSOLUTE=`absolute`,e.Msg.MATH_SINGLE_OP_ABSOLUTE_ARIA=`absolute value`,e.Msg.MATH_SINGLE_OP_EXP_ARIA=`e to the power of`,e.Msg.MATH_SINGLE_OP_LN_ARIA=`natural logarithm`,e.Msg.MATH_SINGLE_OP_LOG10_ARIA=`base 10 logarithm`,e.Msg.MATH_SINGLE_OP_NEG_ARIA=`negative`,e.Msg.MATH_SINGLE_OP_POW10_ARIA=`10 to the power of`,e.Msg.MATH_SINGLE_OP_ROOT=`square root`,e.Msg.MATH_SINGLE_TOOLTIP_ABS=`Return the absolute value of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_EXP=`Return e to the power of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_LN=`Return the natural logarithm of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_LOG10=`Return the base 10 logarithm of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_NEG=`Return the negation of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_POW10=`Return 10 to the power of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_ROOT=`Return the square root of a number.`,e.Msg.MATH_SUBTRACTION_SYMBOL=`-`,e.Msg.MATH_SUBTRACTION_SYMBOL_ARIA=`minus`,e.Msg.MATH_TRIG_ACOS=`acos`,e.Msg.MATH_TRIG_ACOS_ARIA=`inverse cosine`,e.Msg.MATH_TRIG_ASIN=`asin`,e.Msg.MATH_TRIG_ASIN_ARIA=`inverse sine`,e.Msg.MATH_TRIG_ATAN=`atan`,e.Msg.MATH_TRIG_ATAN_ARIA=`inverse tangent`,e.Msg.MATH_TRIG_COS=`cos`,e.Msg.MATH_TRIG_COS_ARIA=`cosine`,e.Msg.MATH_TRIG_HELPURL=`https://en.wikipedia.org/wiki/Trigonometric_functions`,e.Msg.MATH_TRIG_SIN=`sin`,e.Msg.MATH_TRIG_SIN_ARIA=`sine`,e.Msg.MATH_TRIG_TAN=`tan`,e.Msg.MATH_TRIG_TAN_ARIA=`tangent`,e.Msg.MATH_TRIG_TOOLTIP_ACOS=`Return the arccosine of a number.`,e.Msg.MATH_TRIG_TOOLTIP_ASIN=`Return the arcsine of a number.`,e.Msg.MATH_TRIG_TOOLTIP_ATAN=`Return the arctangent of a number.`,e.Msg.MATH_TRIG_TOOLTIP_COS=`Return the cosine of a degree (not radian).`,e.Msg.MATH_TRIG_TOOLTIP_SIN=`Return the sine of a degree (not radian).`,e.Msg.MATH_TRIG_TOOLTIP_TAN=`Return the tangent of a degree (not radian).`,e.Msg.MINIMAP_ARIA_LABEL=`Workspace minimap. Use the arrow keys to pan the workspace.`,e.Msg.MOVE_BLOCK=`Move Block`,e.Msg.NEW_COLOUR_VARIABLE=`Create colour variable...`,e.Msg.NEW_NUMBER_VARIABLE=`Create number variable...`,e.Msg.NEW_STRING_VARIABLE=`Create string variable...`,e.Msg.NEW_VARIABLE=`Create variable...`,e.Msg.NEW_VARIABLE_TITLE=`New variable name:`,e.Msg.NEW_VARIABLE_TYPE_TITLE=`New variable type:`,e.Msg.NO_PARENT_ANNOUNCEMENT=`Current block has no parent`,e.Msg.OPEN_BACKPACK=`Open backpack`,e.Msg.OPEN_TRASH=`Open trash`,e.Msg.OPTION_KEY=`Option`,e.Msg.ORDINAL_NUMBER_SUFFIX=``,e.Msg.PAGE_DOWN_KEY=`Page Down`,e.Msg.PAGE_UP_KEY=`Page Up`,e.Msg.PARENT_BLOCKS_ANNOUNCEMENT=`Parent blocks: %1`,e.Msg.PASTE_ALL_FROM_BACKPACK=`Paste All Blocks from Backpack`,e.Msg.PASTE_SHORTCUT=`Paste`,e.Msg.PAUSE_KEY=`Pause`,e.Msg.PROCEDURES_ALLOW_STATEMENTS=`allow statements`,e.Msg.PROCEDURES_BEFORE_PARAMS=`with:`,e.Msg.PROCEDURES_CALLNORETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_CALLNORETURN_TOOLTIP=`Run the user-defined function '%1'.`,e.Msg.PROCEDURES_CALLRETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_CALLRETURN_TOOLTIP=`Run the user-defined function '%1' and use its output.`,e.Msg.PROCEDURES_CALL_BEFORE_PARAMS=`with:`,e.Msg.PROCEDURES_CALL_DISABLED_DEF_WARNING=`Can't run the user-defined function '%1' because the definition block is disabled.`,e.Msg.PROCEDURES_CREATE_DO=`Create '%1'`,e.Msg.PROCEDURES_DEFNORETURN_COMMENT=`Describe this function...`,e.Msg.PROCEDURES_DEFNORETURN_DO=``,e.Msg.PROCEDURES_DEFNORETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_DEFNORETURN_PROCEDURE=`do something`,e.Msg.PROCEDURES_DEFNORETURN_TITLE=`to`,e.Msg.PROCEDURES_DEFNORETURN_TOOLTIP=`Creates a function with no output.`,e.Msg.PROCEDURES_DEFRETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_DEFRETURN_RETURN=`return`,e.Msg.PROCEDURES_DEFRETURN_TOOLTIP=`Creates a function with an output.`,e.Msg.PROCEDURES_DEF_DUPLICATE_WARNING=`Warning: This function has duplicate parameters.`,e.Msg.PROCEDURES_HIGHLIGHT_DEF=`Highlight function definition`,e.Msg.PROCEDURES_IFRETURN_HELPURL=`https://c2.com/cgi/wiki?GuardClause`,e.Msg.PROCEDURES_IFRETURN_TOOLTIP=`If a value is true, then return a second value.`,e.Msg.PROCEDURES_IFRETURN_WARNING=`Warning: This block may be used only within a function definition.`,e.Msg.PROCEDURES_MUTATORARG_TITLE=`input name:`,e.Msg.PROCEDURES_MUTATORARG_TOOLTIP=`Add an input to the function.`,e.Msg.PROCEDURES_MUTATORCONTAINER_TITLE=`inputs`,e.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP=`Add, remove, or reorder inputs to this function.`,e.Msg.REDO=`Redo`,e.Msg.REMOVE_COMMENT=`Remove Comment`,e.Msg.REMOVE_FROM_BACKPACK=`Remove from Backpack`,e.Msg.RENAME_VARIABLE=`Rename the '%1' variable`,e.Msg.RENAME_VARIABLE_TITLE=`Rename all '%1' variables to:`,e.Msg.RESET_ZOOM=`Reset zoom`,e.Msg.SCREENREADER_HINT=`Use the arrow keys to navigate. Press %1 to toggle screenreader accessibility mode.`,e.Msg.SCREENREADER_MODE_DISABLED=`Screenreader mode is off, press %1 to turn it on`,e.Msg.SCREENREADER_MODE_ENABLED=`Screenreader mode is on, press %1 to turn it off`,e.Msg.SHIFT_KEY=`Shift`,e.Msg.SHORTCUTS_ABORT_MOVE=`Abort move`,e.Msg.SHORTCUTS_CLEANUP=`Clean up workspace`,e.Msg.SHORTCUTS_CODE_NAVIGATION=`Code navigation`,e.Msg.SHORTCUTS_DELETE=`Delete`,e.Msg.SHORTCUTS_DISCONNECT=`Disconnect block`,e.Msg.SHORTCUTS_DUPLICATE=`Duplicate`,e.Msg.SHORTCUTS_EDITING=`Editing`,e.Msg.SHORTCUTS_ESCAPE=`Exit`,e.Msg.SHORTCUTS_EXTENDED_INFORMATION=`Announce detailed information`,e.Msg.SHORTCUTS_FINISH_MOVE=`Finish move`,e.Msg.SHORTCUTS_FOCUS_TOOLBOX=`Focus toolbox`,e.Msg.SHORTCUTS_FOCUS_WORKSPACE=`Focus workspace`,e.Msg.SHORTCUTS_GENERAL=`General`,e.Msg.SHORTCUTS_INFORMATION=`Announce information`,e.Msg.SHORTCUTS_JUMP_BLOCK_END=`Jump to block end`,e.Msg.SHORTCUTS_JUMP_BLOCK_START=`Jump to block start`,e.Msg.SHORTCUTS_JUMP_BOTTOM_STACK=`Jump to bottom of stack`,e.Msg.SHORTCUTS_JUMP_FIRST_BLOCK=`Jump to first block`,e.Msg.SHORTCUTS_JUMP_LAST_BLOCK=`Jump to last block`,e.Msg.SHORTCUTS_JUMP_TOP_STACK=`Jump to top of stack`,e.Msg.SHORTCUTS_MOVE_DOWN=`Move down`,e.Msg.SHORTCUTS_MOVE_LEFT=`Move left`,e.Msg.SHORTCUTS_MOVE_RIGHT=`Move right`,e.Msg.SHORTCUTS_MOVE_UP=`Move up`,e.Msg.SHORTCUTS_NEXT_HEADING=`Next heading`,e.Msg.SHORTCUTS_NEXT_STACK=`Next stack`,e.Msg.SHORTCUTS_PERFORM_ACTION=`Edit or confirm`,e.Msg.SHORTCUTS_PREVIOUS_HEADING=`Previous heading`,e.Msg.SHORTCUTS_PREVIOUS_STACK=`Previous stack`,e.Msg.SHORTCUTS_SHOW_CONTEXT_MENU=`Show menu`,e.Msg.SHORTCUTS_SHOW_TOOLTIP=`Show tooltip`,e.Msg.SHORTCUTS_START_MOVE=`Start move`,e.Msg.SHORTCUTS_START_MOVE_STACK=`Start move stack`,e.Msg.SHORTCUTS_TOGGLE_SCREENREADER_MODE=`Toggle screenreader mode`,e.Msg.SPACE_KEY=`Space`,e.Msg.TAB_KEY=`Tab`,e.Msg.TEXT_APPEND_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-modification`,e.Msg.TEXT_APPEND_TITLE=`to %1 append text %2`,e.Msg.TEXT_APPEND_TOOLTIP=`Append some text to variable '%1'.`,e.Msg.TEXT_CHANGECASE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#adjusting-text-case`,e.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE=`to lower case`,e.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE=`to Title Case`,e.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE=`to UPPER CASE`,e.Msg.TEXT_CHANGECASE_TOOLTIP=`Return a copy of the text in a different case.`,e.Msg.TEXT_CHARAT_FIRST=`get first letter`,e.Msg.TEXT_CHARAT_FROM_END=`get letter # from end`,e.Msg.TEXT_CHARAT_FROM_START=`get letter #`,e.Msg.TEXT_CHARAT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#extracting-text`,e.Msg.TEXT_CHARAT_LAST=`get last letter`,e.Msg.TEXT_CHARAT_RANDOM=`get random letter`,e.Msg.TEXT_CHARAT_TAIL=``,e.Msg.TEXT_CHARAT_TITLE=`in text %1 %2`,e.Msg.TEXT_CHARAT_TOOLTIP=`Returns the letter at the specified position.`,e.Msg.TEXT_COUNT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#counting-substrings`,e.Msg.TEXT_COUNT_MESSAGE0=`count %1 in %2`,e.Msg.TEXT_COUNT_TOOLTIP=`Count how many times some text occurs within some other text.`,e.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP=`Add an item to the text.`,e.Msg.TEXT_CREATE_JOIN_TITLE_JOIN=`join`,e.Msg.TEXT_CREATE_JOIN_TOOLTIP=`Add, remove, or reorder sections to reconfigure this text block.`,e.Msg.TEXT_FROM_END_ARIA=`letter number from end`,e.Msg.TEXT_FROM_START_ARIA=`letter number`,e.Msg.TEXT_GET_SUBSTRING_END_FROM_END=`to letter # from end`,e.Msg.TEXT_GET_SUBSTRING_END_FROM_START=`to letter #`,e.Msg.TEXT_GET_SUBSTRING_END_LAST=`to last letter`,e.Msg.TEXT_GET_SUBSTRING_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#extracting-a-region-of-text`,e.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT=`in text`,e.Msg.TEXT_GET_SUBSTRING_START_FIRST=`get substring from first letter`,e.Msg.TEXT_GET_SUBSTRING_START_FROM_END=`get substring from letter # from end`,e.Msg.TEXT_GET_SUBSTRING_START_FROM_START=`get substring from letter #`,e.Msg.TEXT_GET_SUBSTRING_TAIL=``,e.Msg.TEXT_GET_SUBSTRING_TOOLTIP=`Returns a specified portion of the text.`,e.Msg.TEXT_INDEXOF_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#finding-text`,e.Msg.TEXT_INDEXOF_OPERATOR_FIRST=`find first occurrence of text`,e.Msg.TEXT_INDEXOF_OPERATOR_LAST=`find last occurrence of text`,e.Msg.TEXT_INDEXOF_TITLE=`in text %1 %2 %3`,e.Msg.TEXT_INDEXOF_TOOLTIP=`Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.`,e.Msg.TEXT_ISEMPTY_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#checking-for-empty-text`,e.Msg.TEXT_ISEMPTY_TITLE=`%1 is empty`,e.Msg.TEXT_ISEMPTY_TOOLTIP=`Returns true if the provided text is empty.`,e.Msg.TEXT_JOIN_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-creation`,e.Msg.TEXT_JOIN_TITLE_CREATEWITH=`create text with`,e.Msg.TEXT_JOIN_TOOLTIP=`Create a piece of text by joining together any number of items.`,e.Msg.TEXT_LENGTH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-modification`,e.Msg.TEXT_LENGTH_TITLE=`length of %1`,e.Msg.TEXT_LENGTH_TOOLTIP=`Returns the number of letters (including spaces) in the provided text.`,e.Msg.TEXT_PRINT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#printing-text`,e.Msg.TEXT_PRINT_TITLE=`print %1`,e.Msg.TEXT_PRINT_TOOLTIP=`Print the specified text, number or other value.`,e.Msg.TEXT_PROMPT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#getting-input-from-the-user`,e.Msg.TEXT_PROMPT_TOOLTIP_NUMBER=`Prompt for user for a number.`,e.Msg.TEXT_PROMPT_TOOLTIP_TEXT=`Prompt for user for some text.`,e.Msg.TEXT_PROMPT_TYPE_NUMBER=`prompt for number with message`,e.Msg.TEXT_PROMPT_TYPE_TEXT=`prompt for text with message`,e.Msg.TEXT_REPLACE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#replacing-substrings`,e.Msg.TEXT_REPLACE_MESSAGE0=`replace %1 with %2 in %3`,e.Msg.TEXT_REPLACE_TOOLTIP=`Replace all occurances of some text within some other text.`,e.Msg.TEXT_REVERSE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#reversing-text`,e.Msg.TEXT_REVERSE_MESSAGE0=`reverse %1`,e.Msg.TEXT_REVERSE_TOOLTIP=`Reverses the order of the characters in the text.`,e.Msg.TEXT_TEXT_HELPURL=`https://en.wikipedia.org/wiki/String_(computer_science)`,e.Msg.TEXT_TEXT_TOOLTIP=`A letter, word, or line of text.`,e.Msg.TEXT_TRIM_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#trimming-removing-spaces`,e.Msg.TEXT_TRIM_OPERATOR_BOTH=`trim spaces from both sides of`,e.Msg.TEXT_TRIM_OPERATOR_LEFT=`trim spaces from left side of`,e.Msg.TEXT_TRIM_OPERATOR_RIGHT=`trim spaces from right side of`,e.Msg.TEXT_TRIM_TOOLTIP=`Return a copy of the text with spaces removed from one or both ends.`,e.Msg.TODAY=`Today`,e.Msg.UNDO=`Undo`,e.Msg.UNKNOWN=`Unknown`,e.Msg.UNNAMED_KEY=`unnamed`,e.Msg.VARIABLES_DEFAULT_NAME=`item`,e.Msg.VARIABLES_GET_CREATE_SET=`Create 'set %1'`,e.Msg.VARIABLES_GET_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Variables#get`,e.Msg.VARIABLES_GET_TOOLTIP=`Returns the value of this variable.`,e.Msg.VARIABLES_SET=`set %1 to %2`,e.Msg.VARIABLES_SET_CREATE_GET=`Create 'get %1'`,e.Msg.VARIABLES_SET_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Variables#set`,e.Msg.VARIABLES_SET_TOOLTIP=`Sets this variable to be equal to the input.`,e.Msg.VARIABLE_ALREADY_EXISTS=`A variable named '%1' already exists.`,e.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE=`A variable named '%1' already exists for another type: '%2'.`,e.Msg.VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER=`A variable named '%1' already exists as a parameter in the procedure '%2'.`,e.Msg.WINDOWS=`Windows`,e.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT=`Say something...`,e.Msg.WORKSPACE_CONTENTS_BLOCKS_MANY=`%1 stacks of blocks%2 in workspace.`,e.Msg.WORKSPACE_CONTENTS_BLOCKS_ONE=`One stack of blocks%2 in workspace.`,e.Msg.WORKSPACE_CONTENTS_BLOCKS_ZERO=`No blocks%2 in workspace.`,e.Msg.WORKSPACE_CONTENTS_COMMENTS_MANY=` and %1 comments`,e.Msg.WORKSPACE_CONTENTS_COMMENTS_ONE=` and one comment`,e.Msg.WORKSPACE_LABEL_1_STACK=`1 stack of blocks`,e.Msg.WORKSPACE_LABEL_FLYOUT_WORKSPACE=`%1 blocks`,e.Msg.WORKSPACE_LABEL_MANY_STACKS=`%1 stacks of blocks`,e.Msg.WORKSPACE_LABEL_MUTATOR_WORKSPACE=`Block editor workspace`,e.Msg.WORKSPACE_LABEL_PLAIN=`Blocks workspace.`,e.Msg.WORKSPACE_ROLEDESCRIPTION=`workspace`,e.Msg.ZOOM_IN=`Zoom in`,e.Msg.ZOOM_OUT=`Zoom out`,e.Msg.ZOOM_TO_FIT_ARIA_LABEL=`Zoom to fit`,e.Msg.CONTROLS_FOREACH_INPUT_DO=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.CONTROLS_FOR_INPUT_DO=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=e.Msg.CONTROLS_IF_MSG_ELSEIF,e.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=e.Msg.CONTROLS_IF_MSG_ELSE,e.Msg.CONTROLS_IF_IF_TITLE_IF=e.Msg.CONTROLS_IF_MSG_IF,e.Msg.CONTROLS_IF_MSG_THEN=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.LISTS_CREATE_WITH_ITEM_TITLE=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.MATH_CHANGE_TITLE_ITEM=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.PROCEDURES_DEFRETURN_COMMENT=e.Msg.PROCEDURES_DEFNORETURN_COMMENT,e.Msg.PROCEDURES_DEFRETURN_DO=e.Msg.PROCEDURES_DEFNORETURN_DO,e.Msg.PROCEDURES_DEFRETURN_PROCEDURE=e.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,e.Msg.PROCEDURES_DEFRETURN_TITLE=e.Msg.PROCEDURES_DEFNORETURN_TITLE,e.Msg.TEXT_APPEND_VARIABLE=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.COLOUR_HUE=`20`,e.Msg.LISTS_HUE=`260`,e.Msg.LOGIC_HUE=`210`,e.Msg.LOOPS_HUE=`120`,e.Msg.MATH_HUE=`230`,e.Msg.PROCEDURES_HUE=`290`,e.Msg.TEXTS_HUE=`160`,e.Msg.VARIABLES_DYNAMIC_HUE=`310`,e.Msg.VARIABLES_HUE=`330`,e.Msg})})),ue=t({ADD_COMMENT:()=>M,ALT_KEY:()=>Ic,ANNOUNCE_MOVE_AFTER:()=>fd,ANNOUNCE_MOVE_AROUND:()=>md,ANNOUNCE_MOVE_BEFORE:()=>dd,ANNOUNCE_MOVE_CANCELED:()=>_d,ANNOUNCE_MOVE_INSIDE:()=>pd,ANNOUNCE_MOVE_OF:()=>gd,ANNOUNCE_MOVE_TO:()=>hd,ANNOUNCE_MOVE_WORKSPACE:()=>ud,ARIA_LABEL_ADD_ELSE_IF:()=>rf,ARIA_LABEL_ADD_INPUT:()=>uf,ARIA_LABEL_ADD_LIST_ITEM:()=>of,ARIA_LABEL_ADD_TEXT:()=>cf,ARIA_LABEL_BUTTON:()=>Id,ARIA_LABEL_COMMENT:()=>Jd,ARIA_LABEL_COMMENT_COLLAPSE:()=>Yd,ARIA_LABEL_COMMENT_EXPAND:()=>Xd,ARIA_LABEL_FIELD_ANGLE:()=>pf,ARIA_LABEL_HEADING:()=>Ld,ARIA_LABEL_REMOVE_ELSE_IF:()=>af,ARIA_LABEL_REMOVE_INPUT:()=>df,ARIA_LABEL_REMOVE_LIST_ITEM:()=>sf,ARIA_LABEL_REMOVE_TEXT:()=>lf,ARIA_LABEL_TRASH_EMPTY:()=>Ff,ARIA_TYPE_FIELD_ANGLE:()=>ff,ARIA_TYPE_FIELD_BITMAP:()=>gf,ARIA_TYPE_FIELD_CHECKBOX:()=>Ed,ARIA_TYPE_FIELD_COLOUR:()=>hf,ARIA_TYPE_FIELD_DATE:()=>mf,ARIA_TYPE_FIELD_DROPDOWN:()=>wd,ARIA_TYPE_FIELD_GRID:()=>_f,ARIA_TYPE_FIELD_IMAGE:()=>Td,ARIA_TYPE_FIELD_INPUT:()=>yd,ARIA_TYPE_FIELD_NUMBER:()=>xd,ARIA_TYPE_FIELD_TEXT_INPUT:()=>bd,ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT:()=>Cd,ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE:()=>Sd,BACKSPACE_KEY:()=>Rc,BLOCK_LABEL_BEGIN_PREFIX:()=>tu,BLOCK_LABEL_BEGIN_STACK:()=>eu,BLOCK_LABEL_COLLAPSED:()=>iu,BLOCK_LABEL_CONTAINER:()=>uu,BLOCK_LABEL_DISABLED:()=>ru,BLOCK_LABEL_HAS_BRANCHES:()=>cu,BLOCK_LABEL_HAS_INPUT:()=>ou,BLOCK_LABEL_HAS_INPUTS:()=>su,BLOCK_LABEL_REPLACEABLE:()=>au,BLOCK_LABEL_STACK_BLOCKS:()=>fu,BLOCK_LABEL_STATEMENT:()=>lu,BLOCK_LABEL_TOOLBOX_CATEGORY:()=>nu,BLOCK_LABEL_VALUE:()=>du,BUBBLE_LABEL_COMMENT:()=>zd,BUBBLE_LABEL_DEFAULT:()=>Rd,BUBBLE_LABEL_WARNING:()=>Bd,CANNOT_DELETE_VARIABLE_PROCEDURE:()=>Ye,CAPS_LOCK_KEY:()=>Uc,CHANGE_VALUE_TITLE:()=>Ie,CHROME_OS:()=>Ac,CLEAN_UP:()=>Te,CLOSE:()=>Ee,CLOSE_BACKPACK:()=>Tf,COLLAPSED_WARNINGS_WARNING:()=>Cc,COLLAPSE_ALL:()=>Oe,COLLAPSE_BLOCK:()=>De,COLOUR_BLEND_COLOUR1:()=>ut,COLOUR_BLEND_COLOUR2:()=>dt,COLOUR_BLEND_HELPURL:()=>ct,COLOUR_BLEND_RATIO:()=>ft,COLOUR_BLEND_TITLE:()=>lt,COLOUR_BLEND_TOOLTIP:()=>pt,COLOUR_HUE:()=>ge,COLOUR_PICKER_HELPURL:()=>Ze,COLOUR_PICKER_TOOLTIP:()=>Qe,COLOUR_RANDOM_HELPURL:()=>$e,COLOUR_RANDOM_TITLE:()=>et,COLOUR_RANDOM_TOOLTIP:()=>tt,COLOUR_RGB_BLUE:()=>ot,COLOUR_RGB_GREEN:()=>at,COLOUR_RGB_HELPURL:()=>nt,COLOUR_RGB_RED:()=>it,COLOUR_RGB_TITLE:()=>rt,COLOUR_RGB_TOOLTIP:()=>st,COMMAND_KEY:()=>Pc,CONTEXT_MENU_KEY:()=>Zc,CONTROLS_FLOW_STATEMENTS_HELPURL:()=>Mt,CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK:()=>Nt,CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE:()=>Pt,CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK:()=>Ft,CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE:()=>It,CONTROLS_FLOW_STATEMENTS_WARNING:()=>Lt,CONTROLS_FOREACH_HELPURL:()=>Ot,CONTROLS_FOREACH_INPUT_DO:()=>At,CONTROLS_FOREACH_TITLE:()=>kt,CONTROLS_FOREACH_TOOLTIP:()=>jt,CONTROLS_FOR_HELPURL:()=>wt,CONTROLS_FOR_INPUT_DO:()=>Dt,CONTROLS_FOR_TITLE:()=>Et,CONTROLS_FOR_TOOLTIP:()=>Tt,CONTROLS_IF_ELSEIF_TITLE_ELSEIF:()=>Yt,CONTROLS_IF_ELSEIF_TOOLTIP:()=>Xt,CONTROLS_IF_ELSE_TITLE_ELSE:()=>Zt,CONTROLS_IF_ELSE_TOOLTIP:()=>Qt,CONTROLS_IF_HELPURL:()=>Rt,CONTROLS_IF_IF_TITLE_IF:()=>qt,CONTROLS_IF_IF_TOOLTIP:()=>Jt,CONTROLS_IF_MSG_ELSE:()=>Gt,CONTROLS_IF_MSG_ELSEIF:()=>Wt,CONTROLS_IF_MSG_IF:()=>Ut,CONTROLS_IF_MSG_THEN:()=>Kt,CONTROLS_IF_TOOLTIP_1:()=>zt,CONTROLS_IF_TOOLTIP_2:()=>Bt,CONTROLS_IF_TOOLTIP_3:()=>Vt,CONTROLS_IF_TOOLTIP_4:()=>Ht,CONTROLS_REPEAT_HELPURL:()=>mt,CONTROLS_REPEAT_INPUT_DO:()=>gt,CONTROLS_REPEAT_TITLE:()=>ht,CONTROLS_REPEAT_TOOLTIP:()=>_t,CONTROLS_WHILEUNTIL_HELPURL:()=>vt,CONTROLS_WHILEUNTIL_INPUT_DO:()=>yt,CONTROLS_WHILEUNTIL_OPERATOR_UNTIL:()=>xt,CONTROLS_WHILEUNTIL_OPERATOR_WHILE:()=>bt,CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL:()=>Ct,CONTROLS_WHILEUNTIL_TOOLTIP_WHILE:()=>St,CONTROL_KEY:()=>Nc,COPY_ALL_TO_BACKPACK:()=>Ef,COPY_SHORTCUT:()=>$c,COPY_TO_BACKPACK:()=>Df,CURRENT_BLOCK_ANNOUNCEMENT:()=>$d,CUT_SHORTCUT:()=>Qc,DELETE_ALL_BLOCKS:()=>we,DELETE_BLOCK:()=>Se,DELETE_KEY:()=>zc,DELETE_VARIABLE:()=>Xe,DELETE_VARIABLE_CONFIRMATION:()=>Je,DELETE_X_BLOCKS:()=>Ce,DIALOG_CANCEL:()=>Tc,DIALOG_OK:()=>wc,DISABLE_BLOCK:()=>je,DUPLICATE_BLOCK:()=>j,DUPLICATE_COMMENT:()=>P,EDIT_BLOCK_CONTENTS:()=>Ec,EMPTY_BACKPACK:()=>Of,ENABLE_BLOCK:()=>Me,END_KEY:()=>qc,ENTER_KEY:()=>Lc,ESCAPE:()=>Bc,EXPAND_ALL:()=>Ae,EXPAND_BLOCK:()=>ke,EXTERNAL_INPUTS:()=>be,FIELD_BITMAP_ARIA_VALUE:()=>Cf,FIELD_BITMAP_BUTTON_LABEL_CLEAR:()=>yf,FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE:()=>vf,FIELD_BITMAP_PIXEL_LABEL:()=>Sf,FIELD_BITMAP_PIXEL_OFF:()=>xf,FIELD_BITMAP_PIXEL_ON:()=>bf,FIELD_LABEL_CHECKBOX_CHECKED:()=>Nd,FIELD_LABEL_CHECKBOX_UNCHECKED:()=>Pd,FIELD_LABEL_EDIT_PREFIX:()=>Dd,FIELD_LABEL_EMPTY:()=>vd,FIELD_LABEL_OPTION_INDEX:()=>Md,FIELD_LABEL_VARIABLE:()=>Fd,FIELD_MULTILINEINPUT_FINISH_EDITING:()=>jf,FIELD_MULTILINEINPUT_NEW_LINE:()=>Mf,HELP:()=>Ne,HELP_PROMPT:()=>tl,HOME_KEY:()=>Jc,ICON_LABEL_COMMENT_CLOSED:()=>Hd,ICON_LABEL_COMMENT_OPEN:()=>Ud,ICON_LABEL_DEFAULT:()=>Vd,ICON_LABEL_MUTATOR_CLOSED:()=>Wd,ICON_LABEL_MUTATOR_OPEN:()=>Gd,ICON_LABEL_WARNING_CLOSED:()=>Kd,ICON_LABEL_WARNING_OPEN:()=>qd,INLINE_INPUTS:()=>xe,INPUT_LABEL_CONDITION:()=>vu,INPUT_LABEL_CONDITION_A:()=>yu,INPUT_LABEL_CONDITION_B:()=>bu,INPUT_LABEL_EMPTY:()=>_u,INPUT_LABEL_END_STATEMENT:()=>gu,INPUT_LABEL_INDEX:()=>pu,INPUT_LABEL_LISTS_CREATE_WITH_ITEM:()=>Qu,INPUT_LABEL_LISTS_DELIMITER:()=>cd,INPUT_LABEL_LISTS_END_POSITION:()=>ad,INPUT_LABEL_LISTS_LIST_FROM_TEXT:()=>od,INPUT_LABEL_LISTS_POSITION:()=>rd,INPUT_LABEL_LISTS_REPEAT_ITEM:()=>$u,INPUT_LABEL_LISTS_REPEAT_NUM:()=>ed,INPUT_LABEL_LISTS_START_POSITION:()=>id,INPUT_LABEL_LISTS_TEXT_FROM_LIST:()=>sd,INPUT_LABEL_LISTS_TO_CHANGE:()=>ld,INPUT_LABEL_LISTS_TO_CHECK:()=>td,INPUT_LABEL_LISTS_VALUE_TO_SET:()=>nd,INPUT_LABEL_LOOP_BY:()=>zu,INPUT_LABEL_LOOP_FROM:()=>Lu,INPUT_LABEL_LOOP_LIST:()=>Bu,INPUT_LABEL_LOOP_TIMES:()=>Iu,INPUT_LABEL_LOOP_TO:()=>Ru,INPUT_LABEL_MATH_CHANGE_BY:()=>Au,INPUT_LABEL_MATH_CONSTRAIN_VALUE:()=>ju,INPUT_LABEL_MATH_DIVIDEND:()=>Ou,INPUT_LABEL_MATH_DIVISOR:()=>ku,INPUT_LABEL_NUMBER:()=>Cu,INPUT_LABEL_NUMBER_A:()=>wu,INPUT_LABEL_NUMBER_ATAN2_X:()=>Pu,INPUT_LABEL_NUMBER_ATAN2_Y:()=>Fu,INPUT_LABEL_NUMBER_B:()=>Tu,INPUT_LABEL_NUMBER_LIST:()=>Du,INPUT_LABEL_NUMBER_MAX:()=>Nu,INPUT_LABEL_NUMBER_MIN:()=>Mu,INPUT_LABEL_NUMBER_TO_CHECK:()=>Eu,INPUT_LABEL_STATEMENT:()=>hu,INPUT_LABEL_TEXT_APPEND:()=>Hu,INPUT_LABEL_TEXT_END_POSITION:()=>Yu,INPUT_LABEL_TEXT_JOIN_ITEM:()=>Vu,INPUT_LABEL_TEXT_POSITION:()=>qu,INPUT_LABEL_TEXT_PROMPT_MESSAGE:()=>Xu,INPUT_LABEL_TEXT_START_POSITION:()=>Ju,INPUT_LABEL_TEXT_TO_CHANGE:()=>Uu,INPUT_LABEL_TEXT_TO_CHECK:()=>Wu,INPUT_LABEL_TEXT_TO_FIND:()=>Gu,INPUT_LABEL_TEXT_TO_REPLACE:()=>Ku,INPUT_LABEL_VALUE:()=>mu,INPUT_LABEL_VALUE_A:()=>xu,INPUT_LABEL_VALUE_B:()=>Su,INPUT_LABEL_VARIABLES_SET:()=>Zu,INSERT_KEY:()=>Yc,KEYBOARD_NAV_BLOCK_NAVIGATION_HINT:()=>Zl,KEYBOARD_NAV_CONSTRAINED_MOVE_HINT:()=>Ll,KEYBOARD_NAV_COPIED_HINT:()=>Rl,KEYBOARD_NAV_CUT_HINT:()=>zl,KEYBOARD_NAV_FLYOUT_LABEL_HINT:()=>$l,KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT:()=>Il,KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT:()=>Ql,LINUX:()=>jc,LISTS_CREATE_EMPTY_HELPURL:()=>to,LISTS_CREATE_EMPTY_TITLE:()=>no,LISTS_CREATE_EMPTY_TOOLTIP:()=>ro,LISTS_CREATE_WITH_CONTAINER_TITLE_ADD:()=>so,LISTS_CREATE_WITH_CONTAINER_TOOLTIP:()=>co,LISTS_CREATE_WITH_HELPURL:()=>io,LISTS_CREATE_WITH_INPUT_WITH:()=>oo,LISTS_CREATE_WITH_ITEM_TITLE:()=>lo,LISTS_CREATE_WITH_ITEM_TOOLTIP:()=>uo,LISTS_CREATE_WITH_TOOLTIP:()=>ao,LISTS_GET_INDEX_FIRST:()=>No,LISTS_GET_INDEX_FROM_END:()=>Mo,LISTS_GET_INDEX_FROM_START:()=>jo,LISTS_GET_INDEX_GET:()=>Oo,LISTS_GET_INDEX_GET_REMOVE:()=>ko,LISTS_GET_INDEX_HELPURL:()=>Do,LISTS_GET_INDEX_INPUT_IN_LIST:()=>Lo,LISTS_GET_INDEX_LAST:()=>Po,LISTS_GET_INDEX_RANDOM:()=>Fo,LISTS_GET_INDEX_REMOVE:()=>Ao,LISTS_GET_INDEX_TAIL:()=>Io,LISTS_GET_INDEX_TOOLTIP_GET_FIRST:()=>Vo,LISTS_GET_INDEX_TOOLTIP_GET_FROM:()=>Bo,LISTS_GET_INDEX_TOOLTIP_GET_LAST:()=>Ho,LISTS_GET_INDEX_TOOLTIP_GET_RANDOM:()=>Uo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST:()=>Go,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM:()=>Wo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST:()=>Ko,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM:()=>qo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST:()=>Yo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM:()=>Jo,LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST:()=>Xo,LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM:()=>Zo,LISTS_GET_SUBLIST_END_FROM_END:()=>gs,LISTS_GET_SUBLIST_END_FROM_START:()=>hs,LISTS_GET_SUBLIST_END_LAST:()=>_s,LISTS_GET_SUBLIST_HELPURL:()=>ds,LISTS_GET_SUBLIST_INPUT_IN_LIST:()=>fs,LISTS_GET_SUBLIST_START_FIRST:()=>ms,LISTS_GET_SUBLIST_START_FROM_END:()=>ps,LISTS_GET_SUBLIST_START_FROM_START:()=>F,LISTS_GET_SUBLIST_TAIL:()=>vs,LISTS_GET_SUBLIST_TOOLTIP:()=>ys,LISTS_HUE:()=>he,LISTS_INDEX_FROM_END_TOOLTIP:()=>zo,LISTS_INDEX_FROM_START_TOOLTIP:()=>Ro,LISTS_INDEX_OF_FIRST:()=>wo,LISTS_INDEX_OF_HELPURL:()=>So,LISTS_INDEX_OF_INPUT_IN_LIST:()=>Co,LISTS_INDEX_OF_LAST:()=>To,LISTS_INDEX_OF_TOOLTIP:()=>Eo,LISTS_INLIST:()=>xo,LISTS_ISEMPTY_HELPURL:()=>vo,LISTS_ISEMPTY_TITLE:()=>yo,LISTS_ISEMPTY_TOOLTIP:()=>bo,LISTS_LENGTH_HELPURL:()=>ho,LISTS_LENGTH_TITLE:()=>go,LISTS_LENGTH_TOOLTIP:()=>_o,LISTS_REPEAT_HELPURL:()=>fo,LISTS_REPEAT_TITLE:()=>mo,LISTS_REPEAT_TOOLTIP:()=>po,LISTS_REVERSE_HELPURL:()=>Ps,LISTS_REVERSE_MESSAGE0:()=>Fs,LISTS_REVERSE_TOOLTIP:()=>Is,LISTS_SET_INDEX_HELPURL:()=>Qo,LISTS_SET_INDEX_INPUT_IN_LIST:()=>$o,LISTS_SET_INDEX_INPUT_TO:()=>ns,LISTS_SET_INDEX_INSERT:()=>ts,LISTS_SET_INDEX_SET:()=>es,LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST:()=>cs,LISTS_SET_INDEX_TOOLTIP_INSERT_FROM:()=>ss,LISTS_SET_INDEX_TOOLTIP_INSERT_LAST:()=>ls,LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM:()=>us,LISTS_SET_INDEX_TOOLTIP_SET_FIRST:()=>is,LISTS_SET_INDEX_TOOLTIP_SET_FROM:()=>rs,LISTS_SET_INDEX_TOOLTIP_SET_LAST:()=>as,LISTS_SET_INDEX_TOOLTIP_SET_RANDOM:()=>os,LISTS_SORT_HELPURL:()=>bs,LISTS_SORT_ORDER_ASCENDING:()=>Cs,LISTS_SORT_ORDER_DESCENDING:()=>ws,LISTS_SORT_TITLE:()=>xs,LISTS_SORT_TOOLTIP:()=>Ss,LISTS_SORT_TYPE_IGNORECASE:()=>Ds,LISTS_SORT_TYPE_NUMERIC:()=>Ts,LISTS_SORT_TYPE_TEXT:()=>Es,LISTS_SPLIT_HELPURL:()=>Os,LISTS_SPLIT_LIST_FROM_TEXT:()=>ks,LISTS_SPLIT_TEXT_FROM_LIST:()=>As,LISTS_SPLIT_TOOLTIP_JOIN:()=>Ns,LISTS_SPLIT_TOOLTIP_SPLIT:()=>Ms,LISTS_SPLIT_WITH_DELIMITER:()=>js,LOGIC_BOOLEAN_FALSE:()=>Cn,LOGIC_BOOLEAN_HELPURL:()=>xn,LOGIC_BOOLEAN_TOOLTIP:()=>wn,LOGIC_BOOLEAN_TRUE:()=>Sn,LOGIC_COMPARE_EQ_ARIA:()=>en,LOGIC_COMPARE_GTE_ARIA:()=>dn,LOGIC_COMPARE_GT_ARIA:()=>ln,LOGIC_COMPARE_HELPURL:()=>$t,LOGIC_COMPARE_LTE_ARIA:()=>sn,LOGIC_COMPARE_LT_ARIA:()=>an,LOGIC_COMPARE_NEQ_ARIA:()=>nn,LOGIC_COMPARE_TOOLTIP_EQ:()=>tn,LOGIC_COMPARE_TOOLTIP_GT:()=>un,LOGIC_COMPARE_TOOLTIP_GTE:()=>fn,LOGIC_COMPARE_TOOLTIP_LT:()=>on,LOGIC_COMPARE_TOOLTIP_LTE:()=>cn,LOGIC_COMPARE_TOOLTIP_NEQ:()=>rn,LOGIC_HUE:()=>de,LOGIC_NEGATE_HELPURL:()=>vn,LOGIC_NEGATE_TITLE:()=>yn,LOGIC_NEGATE_TOOLTIP:()=>bn,LOGIC_NULL:()=>En,LOGIC_NULL_HELPURL:()=>Tn,LOGIC_NULL_TOOLTIP:()=>Dn,LOGIC_OPERATION_AND:()=>hn,LOGIC_OPERATION_HELPURL:()=>pn,LOGIC_OPERATION_OR:()=>_n,LOGIC_OPERATION_TOOLTIP_AND:()=>mn,LOGIC_OPERATION_TOOLTIP_OR:()=>gn,LOGIC_TERNARY_CONDITION:()=>kn,LOGIC_TERNARY_HELPURL:()=>On,LOGIC_TERNARY_IF_FALSE:()=>jn,LOGIC_TERNARY_IF_TRUE:()=>An,LOGIC_TERNARY_TOOLTIP:()=>Mn,LOOPS_HUE:()=>fe,MAC_OS:()=>kc,MATH_ADDITION_SYMBOL:()=>Fn,MATH_ADDITION_SYMBOL_ARIA:()=>In,MATH_ARITHMETIC_HELPURL:()=>lr,MATH_ARITHMETIC_TOOLTIP_ADD:()=>ur,MATH_ARITHMETIC_TOOLTIP_DIVIDE:()=>pr,MATH_ARITHMETIC_TOOLTIP_MINUS:()=>dr,MATH_ARITHMETIC_TOOLTIP_MULTIPLY:()=>fr,MATH_ARITHMETIC_TOOLTIP_POWER:()=>mr,MATH_ATAN2_HELPURL:()=>Pi,MATH_ATAN2_TITLE:()=>Fi,MATH_ATAN2_TOOLTIP:()=>Ii,MATH_CHANGE_HELPURL:()=>Jr,MATH_CHANGE_TITLE:()=>Yr,MATH_CHANGE_TITLE_ITEM:()=>Xr,MATH_CHANGE_TOOLTIP:()=>Zr,MATH_CONSTANT_E_ARIA:()=>ir,MATH_CONSTANT_GOLDEN_RATIO_ARIA:()=>ar,MATH_CONSTANT_HELPURL:()=>Rr,MATH_CONSTANT_INFINITY_ARIA:()=>cr,MATH_CONSTANT_PI_ARIA:()=>rr,MATH_CONSTANT_SQRT1_2_ARIA:()=>sr,MATH_CONSTANT_SQRT2_ARIA:()=>or,MATH_CONSTANT_TOOLTIP:()=>zr,MATH_CONSTRAIN_HELPURL:()=>Ti,MATH_CONSTRAIN_TITLE:()=>Ei,MATH_CONSTRAIN_TOOLTIP:()=>Di,MATH_DIVISION_SYMBOL:()=>zn,MATH_DIVISION_SYMBOL_ARIA:()=>Bn,MATH_HUE:()=>pe,MATH_IS_DIVISIBLE_BY:()=>Kr,MATH_IS_EVEN:()=>Br,MATH_IS_NEGATIVE:()=>Gr,MATH_IS_ODD:()=>Vr,MATH_IS_POSITIVE:()=>Wr,MATH_IS_PRIME:()=>Hr,MATH_IS_TOOLTIP:()=>qr,MATH_IS_WHOLE:()=>Ur,MATH_MODULO_HELPURL:()=>Si,MATH_MODULO_TITLE:()=>Ci,MATH_MODULO_TOOLTIP:()=>wi,MATH_MULTIPLICATION_SYMBOL:()=>Vn,MATH_MULTIPLICATION_SYMBOL_ARIA:()=>Hn,MATH_NUMBER_HELPURL:()=>Nn,MATH_NUMBER_TOOLTIP:()=>Pn,MATH_ONLIST_HELPURL:()=>ri,MATH_ONLIST_OPERATOR_AVERAGE:()=>fi,MATH_ONLIST_OPERATOR_MAX:()=>li,MATH_ONLIST_OPERATOR_MAX_ARIA:()=>ui,MATH_ONLIST_OPERATOR_MEDIAN:()=>mi,MATH_ONLIST_OPERATOR_MIN:()=>oi,MATH_ONLIST_OPERATOR_MIN_ARIA:()=>si,MATH_ONLIST_OPERATOR_MODE:()=>gi,MATH_ONLIST_OPERATOR_RANDOM:()=>bi,MATH_ONLIST_OPERATOR_STD_DEV:()=>vi,MATH_ONLIST_OPERATOR_SUM:()=>ii,MATH_ONLIST_TOOLTIP_AVERAGE:()=>pi,MATH_ONLIST_TOOLTIP_MAX:()=>di,MATH_ONLIST_TOOLTIP_MEDIAN:()=>hi,MATH_ONLIST_TOOLTIP_MIN:()=>ci,MATH_ONLIST_TOOLTIP_MODE:()=>_i,MATH_ONLIST_TOOLTIP_RANDOM:()=>xi,MATH_ONLIST_TOOLTIP_STD_DEV:()=>yi,MATH_ONLIST_TOOLTIP_SUM:()=>ai,MATH_POWER_SYMBOL:()=>Un,MATH_POWER_SYMBOL_ARIA:()=>Wn,MATH_RANDOM_FLOAT_HELPURL:()=>ji,MATH_RANDOM_FLOAT_TITLE_RANDOM:()=>Mi,MATH_RANDOM_FLOAT_TOOLTIP:()=>Ni,MATH_RANDOM_INT_HELPURL:()=>Oi,MATH_RANDOM_INT_TITLE:()=>ki,MATH_RANDOM_INT_TOOLTIP:()=>Ai,MATH_ROUND_HELPURL:()=>Qr,MATH_ROUND_OPERATOR_ROUND:()=>ei,MATH_ROUND_OPERATOR_ROUNDDOWN:()=>ni,MATH_ROUND_OPERATOR_ROUNDUP:()=>ti,MATH_ROUND_TOOLTIP:()=>$r,MATH_SINGLE_HELPURL:()=>hr,MATH_SINGLE_OP_ABSOLUTE:()=>vr,MATH_SINGLE_OP_ABSOLUTE_ARIA:()=>yr,MATH_SINGLE_OP_EXP_ARIA:()=>wr,MATH_SINGLE_OP_LN_ARIA:()=>Sr,MATH_SINGLE_OP_LOG10_ARIA:()=>Cr,MATH_SINGLE_OP_NEG_ARIA:()=>xr,MATH_SINGLE_OP_POW10_ARIA:()=>Tr,MATH_SINGLE_OP_ROOT:()=>gr,MATH_SINGLE_TOOLTIP_ABS:()=>br,MATH_SINGLE_TOOLTIP_EXP:()=>kr,MATH_SINGLE_TOOLTIP_LN:()=>Dr,MATH_SINGLE_TOOLTIP_LOG10:()=>Or,MATH_SINGLE_TOOLTIP_NEG:()=>Er,MATH_SINGLE_TOOLTIP_POW10:()=>Ar,MATH_SINGLE_TOOLTIP_ROOT:()=>_r,MATH_SUBTRACTION_SYMBOL:()=>Ln,MATH_SUBTRACTION_SYMBOL_ARIA:()=>Rn,MATH_TRIG_ACOS:()=>$n,MATH_TRIG_ACOS_ARIA:()=>er,MATH_TRIG_ASIN:()=>Zn,MATH_TRIG_ASIN_ARIA:()=>Qn,MATH_TRIG_ATAN:()=>tr,MATH_TRIG_ATAN_ARIA:()=>nr,MATH_TRIG_COS:()=>qn,MATH_TRIG_COS_ARIA:()=>Jn,MATH_TRIG_HELPURL:()=>jr,MATH_TRIG_SIN:()=>Gn,MATH_TRIG_SIN_ARIA:()=>Kn,MATH_TRIG_TAN:()=>Yn,MATH_TRIG_TAN_ARIA:()=>Xn,MATH_TRIG_TOOLTIP_ACOS:()=>Ir,MATH_TRIG_TOOLTIP_ASIN:()=>Fr,MATH_TRIG_TOOLTIP_ATAN:()=>Lr,MATH_TRIG_TOOLTIP_COS:()=>Nr,MATH_TRIG_TOOLTIP_SIN:()=>Mr,MATH_TRIG_TOOLTIP_TAN:()=>Pr,MINIMAP_ARIA_LABEL:()=>Pf,MOVE_BLOCK:()=>Dc,NEW_COLOUR_VARIABLE:()=>He,NEW_NUMBER_VARIABLE:()=>Ve,NEW_STRING_VARIABLE:()=>Be,NEW_VARIABLE:()=>ze,NEW_VARIABLE_TITLE:()=>We,NEW_VARIABLE_TYPE_TITLE:()=>Ue,NO_PARENT_ANNOUNCEMENT:()=>tf,OPEN_BACKPACK:()=>wf,OPEN_TRASH:()=>Od,OPTION_KEY:()=>Fc,ORDINAL_NUMBER_SUFFIX:()=>Ls,PAGE_DOWN_KEY:()=>Kc,PAGE_UP_KEY:()=>Gc,PARENT_BLOCKS_ANNOUNCEMENT:()=>ef,PASTE_ALL_FROM_BACKPACK:()=>kf,PASTE_SHORTCUT:()=>el,PAUSE_KEY:()=>Xc,PROCEDURES_ALLOW_STATEMENTS:()=>sc,PROCEDURES_BEFORE_PARAMS:()=>Js,PROCEDURES_CALLNORETURN_HELPURL:()=>lc,PROCEDURES_CALLNORETURN_TOOLTIP:()=>uc,PROCEDURES_CALLRETURN_HELPURL:()=>dc,PROCEDURES_CALLRETURN_TOOLTIP:()=>fc,PROCEDURES_CALL_BEFORE_PARAMS:()=>Ys,PROCEDURES_CALL_DISABLED_DEF_WARNING:()=>Xs,PROCEDURES_CREATE_DO:()=>vc,PROCEDURES_DEFNORETURN_COMMENT:()=>$s,PROCEDURES_DEFNORETURN_DO:()=>Zs,PROCEDURES_DEFNORETURN_HELPURL:()=>Gs,PROCEDURES_DEFNORETURN_PROCEDURE:()=>qs,PROCEDURES_DEFNORETURN_TITLE:()=>Ks,PROCEDURES_DEFNORETURN_TOOLTIP:()=>Qs,PROCEDURES_DEFRETURN_COMMENT:()=>ic,PROCEDURES_DEFRETURN_DO:()=>rc,PROCEDURES_DEFRETURN_HELPURL:()=>ec,PROCEDURES_DEFRETURN_PROCEDURE:()=>nc,PROCEDURES_DEFRETURN_RETURN:()=>ac,PROCEDURES_DEFRETURN_TITLE:()=>tc,PROCEDURES_DEFRETURN_TOOLTIP:()=>oc,PROCEDURES_DEF_DUPLICATE_WARNING:()=>cc,PROCEDURES_HIGHLIGHT_DEF:()=>_c,PROCEDURES_HUE:()=>ye,PROCEDURES_IFRETURN_HELPURL:()=>bc,PROCEDURES_IFRETURN_TOOLTIP:()=>yc,PROCEDURES_IFRETURN_WARNING:()=>xc,PROCEDURES_MUTATORARG_TITLE:()=>hc,PROCEDURES_MUTATORARG_TOOLTIP:()=>gc,PROCEDURES_MUTATORCONTAINER_TITLE:()=>pc,PROCEDURES_MUTATORCONTAINER_TOOLTIP:()=>mc,REDO:()=>Fe,REMOVE_COMMENT:()=>N,REMOVE_FROM_BACKPACK:()=>Af,RENAME_VARIABLE:()=>Le,RENAME_VARIABLE_TITLE:()=>Re,RESET_ZOOM:()=>jd,SCREENREADER_HINT:()=>nf,SCREENREADER_MODE_DISABLED:()=>Qd,SCREENREADER_MODE_ENABLED:()=>Zd,SHIFT_KEY:()=>Hc,SHORTCUTS_ABORT_MOVE:()=>ml,SHORTCUTS_CLEANUP:()=>Dl,SHORTCUTS_CODE_NAVIGATION:()=>il,SHORTCUTS_DELETE:()=>ol,SHORTCUTS_DISCONNECT:()=>bl,SHORTCUTS_DUPLICATE:()=>El,SHORTCUTS_EDITING:()=>rl,SHORTCUTS_ESCAPE:()=>al,SHORTCUTS_EXTENDED_INFORMATION:()=>yl,SHORTCUTS_FINISH_MOVE:()=>pl,SHORTCUTS_FOCUS_TOOLBOX:()=>_l,SHORTCUTS_FOCUS_WORKSPACE:()=>gl,SHORTCUTS_GENERAL:()=>nl,SHORTCUTS_INFORMATION:()=>vl,SHORTCUTS_JUMP_BLOCK_END:()=>jl,SHORTCUTS_JUMP_BLOCK_START:()=>Al,SHORTCUTS_JUMP_BOTTOM_STACK:()=>Nl,SHORTCUTS_JUMP_FIRST_BLOCK:()=>Pl,SHORTCUTS_JUMP_LAST_BLOCK:()=>Fl,SHORTCUTS_JUMP_TOP_STACK:()=>Ml,SHORTCUTS_MOVE_DOWN:()=>fl,SHORTCUTS_MOVE_LEFT:()=>ll,SHORTCUTS_MOVE_RIGHT:()=>ul,SHORTCUTS_MOVE_UP:()=>dl,SHORTCUTS_NEXT_HEADING:()=>Cl,SHORTCUTS_NEXT_STACK:()=>xl,SHORTCUTS_PERFORM_ACTION:()=>Tl,SHORTCUTS_PREVIOUS_HEADING:()=>wl,SHORTCUTS_PREVIOUS_STACK:()=>Sl,SHORTCUTS_SHOW_CONTEXT_MENU:()=>hl,SHORTCUTS_SHOW_TOOLTIP:()=>Ol,SHORTCUTS_START_MOVE:()=>sl,SHORTCUTS_START_MOVE_STACK:()=>cl,SHORTCUTS_TOGGLE_SCREENREADER_MODE:()=>kl,SPACE_KEY:()=>Wc,TAB_KEY:()=>Vc,TEXTS_HUE:()=>me,TEXT_APPEND_HELPURL:()=>Ki,TEXT_APPEND_TITLE:()=>qi,TEXT_APPEND_TOOLTIP:()=>Yi,TEXT_APPEND_VARIABLE:()=>Ji,TEXT_CHANGECASE_HELPURL:()=>Oa,TEXT_CHANGECASE_OPERATOR_LOWERCASE:()=>ja,TEXT_CHANGECASE_OPERATOR_TITLECASE:()=>Ma,TEXT_CHANGECASE_OPERATOR_UPPERCASE:()=>Aa,TEXT_CHANGECASE_TOOLTIP:()=>ka,TEXT_CHARAT_FIRST:()=>pa,TEXT_CHARAT_FROM_END:()=>fa,TEXT_CHARAT_FROM_START:()=>da,TEXT_CHARAT_HELPURL:()=>la,TEXT_CHARAT_LAST:()=>ma,TEXT_CHARAT_RANDOM:()=>ha,TEXT_CHARAT_TAIL:()=>ga,TEXT_CHARAT_TITLE:()=>ua,TEXT_CHARAT_TOOLTIP:()=>_a,TEXT_COUNT_HELPURL:()=>qa,TEXT_COUNT_MESSAGE0:()=>Ka,TEXT_COUNT_TOOLTIP:()=>Ja,TEXT_CREATE_JOIN_ITEM_TITLE_ITEM:()=>Wi,TEXT_CREATE_JOIN_ITEM_TOOLTIP:()=>Gi,TEXT_CREATE_JOIN_TITLE_JOIN:()=>Hi,TEXT_CREATE_JOIN_TOOLTIP:()=>Ui,TEXT_FROM_END_ARIA:()=>ca,TEXT_FROM_START_ARIA:()=>sa,TEXT_GET_SUBSTRING_END_FROM_END:()=>Ta,TEXT_GET_SUBSTRING_END_FROM_START:()=>wa,TEXT_GET_SUBSTRING_END_LAST:()=>Ea,TEXT_GET_SUBSTRING_HELPURL:()=>ya,TEXT_GET_SUBSTRING_INPUT_IN_TEXT:()=>ba,TEXT_GET_SUBSTRING_START_FIRST:()=>Ca,TEXT_GET_SUBSTRING_START_FROM_END:()=>Sa,TEXT_GET_SUBSTRING_START_FROM_START:()=>xa,TEXT_GET_SUBSTRING_TAIL:()=>Da,TEXT_GET_SUBSTRING_TOOLTIP:()=>va,TEXT_INDEXOF_HELPURL:()=>na,TEXT_INDEXOF_OPERATOR_FIRST:()=>aa,TEXT_INDEXOF_OPERATOR_LAST:()=>oa,TEXT_INDEXOF_TITLE:()=>ia,TEXT_INDEXOF_TOOLTIP:()=>ra,TEXT_ISEMPTY_HELPURL:()=>$i,TEXT_ISEMPTY_TITLE:()=>ea,TEXT_ISEMPTY_TOOLTIP:()=>ta,TEXT_JOIN_HELPURL:()=>zi,TEXT_JOIN_TITLE_CREATEWITH:()=>Bi,TEXT_JOIN_TOOLTIP:()=>Vi,TEXT_LENGTH_HELPURL:()=>Xi,TEXT_LENGTH_TITLE:()=>Zi,TEXT_LENGTH_TOOLTIP:()=>Qi,TEXT_PRINT_HELPURL:()=>Ra,TEXT_PRINT_TITLE:()=>za,TEXT_PRINT_TOOLTIP:()=>Ba,TEXT_PROMPT_HELPURL:()=>Va,TEXT_PROMPT_TOOLTIP_NUMBER:()=>Wa,TEXT_PROMPT_TOOLTIP_TEXT:()=>Ga,TEXT_PROMPT_TYPE_NUMBER:()=>Ua,TEXT_PROMPT_TYPE_TEXT:()=>Ha,TEXT_REPLACE_HELPURL:()=>Xa,TEXT_REPLACE_MESSAGE0:()=>Ya,TEXT_REPLACE_TOOLTIP:()=>Za,TEXT_REVERSE_HELPURL:()=>$a,TEXT_REVERSE_MESSAGE0:()=>Qa,TEXT_REVERSE_TOOLTIP:()=>eo,TEXT_TEXT_HELPURL:()=>Li,TEXT_TEXT_TOOLTIP:()=>Ri,TEXT_TRIM_HELPURL:()=>Na,TEXT_TRIM_OPERATOR_BOTH:()=>Fa,TEXT_TRIM_OPERATOR_LEFT:()=>Ia,TEXT_TRIM_OPERATOR_RIGHT:()=>La,TEXT_TRIM_TOOLTIP:()=>Pa,TODAY:()=>A,UNDO:()=>Pe,UNKNOWN:()=>Mc,UNNAMED_KEY:()=>k,VARIABLES_DEFAULT_NAME:()=>O,VARIABLES_DYNAMIC_HUE:()=>ve,VARIABLES_GET_CREATE_SET:()=>Bs,VARIABLES_GET_HELPURL:()=>Rs,VARIABLES_GET_TOOLTIP:()=>zs,VARIABLES_HUE:()=>_e,VARIABLES_SET:()=>Hs,VARIABLES_SET_CREATE_GET:()=>Ws,VARIABLES_SET_HELPURL:()=>Vs,VARIABLES_SET_TOOLTIP:()=>Us,VARIABLE_ALREADY_EXISTS:()=>Ge,VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE:()=>Ke,VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER:()=>qe,WINDOWS:()=>Oc,WORKSPACE_COMMENT_DEFAULT_TEXT:()=>Sc,WORKSPACE_CONTENTS_BLOCKS_MANY:()=>Kl,WORKSPACE_CONTENTS_BLOCKS_ONE:()=>ql,WORKSPACE_CONTENTS_BLOCKS_ZERO:()=>Jl,WORKSPACE_CONTENTS_COMMENTS_MANY:()=>Yl,WORKSPACE_CONTENTS_COMMENTS_ONE:()=>Xl,WORKSPACE_LABEL_1_STACK:()=>Hl,WORKSPACE_LABEL_FLYOUT_WORKSPACE:()=>Gl,WORKSPACE_LABEL_MANY_STACKS:()=>Ul,WORKSPACE_LABEL_MUTATOR_WORKSPACE:()=>Wl,WORKSPACE_LABEL_PLAIN:()=>Bl,WORKSPACE_ROLEDESCRIPTION:()=>Vl,ZOOM_IN:()=>kd,ZOOM_OUT:()=>Ad,ZOOM_TO_FIT_ARIA_LABEL:()=>Nf}),{LOGIC_HUE:de,LOOPS_HUE:fe,MATH_HUE:pe,TEXTS_HUE:me,LISTS_HUE:he,COLOUR_HUE:ge,VARIABLES_HUE:_e,VARIABLES_DYNAMIC_HUE:ve,PROCEDURES_HUE:ye,VARIABLES_DEFAULT_NAME:O,UNNAMED_KEY:k,TODAY:A,DUPLICATE_BLOCK:j,ADD_COMMENT:M,REMOVE_COMMENT:N,DUPLICATE_COMMENT:P,EXTERNAL_INPUTS:be,INLINE_INPUTS:xe,DELETE_BLOCK:Se,DELETE_X_BLOCKS:Ce,DELETE_ALL_BLOCKS:we,CLEAN_UP:Te,CLOSE:Ee,COLLAPSE_BLOCK:De,COLLAPSE_ALL:Oe,EXPAND_BLOCK:ke,EXPAND_ALL:Ae,DISABLE_BLOCK:je,ENABLE_BLOCK:Me,HELP:Ne,UNDO:Pe,REDO:Fe,CHANGE_VALUE_TITLE:Ie,RENAME_VARIABLE:Le,RENAME_VARIABLE_TITLE:Re,NEW_VARIABLE:ze,NEW_STRING_VARIABLE:Be,NEW_NUMBER_VARIABLE:Ve,NEW_COLOUR_VARIABLE:He,NEW_VARIABLE_TYPE_TITLE:Ue,NEW_VARIABLE_TITLE:We,VARIABLE_ALREADY_EXISTS:Ge,VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE:Ke,VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER:qe,DELETE_VARIABLE_CONFIRMATION:Je,CANNOT_DELETE_VARIABLE_PROCEDURE:Ye,DELETE_VARIABLE:Xe,COLOUR_PICKER_HELPURL:Ze,COLOUR_PICKER_TOOLTIP:Qe,COLOUR_RANDOM_HELPURL:$e,COLOUR_RANDOM_TITLE:et,COLOUR_RANDOM_TOOLTIP:tt,COLOUR_RGB_HELPURL:nt,COLOUR_RGB_TITLE:rt,COLOUR_RGB_RED:it,COLOUR_RGB_GREEN:at,COLOUR_RGB_BLUE:ot,COLOUR_RGB_TOOLTIP:st,COLOUR_BLEND_HELPURL:ct,COLOUR_BLEND_TITLE:lt,COLOUR_BLEND_COLOUR1:ut,COLOUR_BLEND_COLOUR2:dt,COLOUR_BLEND_RATIO:ft,COLOUR_BLEND_TOOLTIP:pt,CONTROLS_REPEAT_HELPURL:mt,CONTROLS_REPEAT_TITLE:ht,CONTROLS_REPEAT_INPUT_DO:gt,CONTROLS_REPEAT_TOOLTIP:_t,CONTROLS_WHILEUNTIL_HELPURL:vt,CONTROLS_WHILEUNTIL_INPUT_DO:yt,CONTROLS_WHILEUNTIL_OPERATOR_WHILE:bt,CONTROLS_WHILEUNTIL_OPERATOR_UNTIL:xt,CONTROLS_WHILEUNTIL_TOOLTIP_WHILE:St,CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL:Ct,CONTROLS_FOR_HELPURL:wt,CONTROLS_FOR_TOOLTIP:Tt,CONTROLS_FOR_TITLE:Et,CONTROLS_FOR_INPUT_DO:Dt,CONTROLS_FOREACH_HELPURL:Ot,CONTROLS_FOREACH_TITLE:kt,CONTROLS_FOREACH_INPUT_DO:At,CONTROLS_FOREACH_TOOLTIP:jt,CONTROLS_FLOW_STATEMENTS_HELPURL:Mt,CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK:Nt,CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE:Pt,CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK:Ft,CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE:It,CONTROLS_FLOW_STATEMENTS_WARNING:Lt,CONTROLS_IF_HELPURL:Rt,CONTROLS_IF_TOOLTIP_1:zt,CONTROLS_IF_TOOLTIP_2:Bt,CONTROLS_IF_TOOLTIP_3:Vt,CONTROLS_IF_TOOLTIP_4:Ht,CONTROLS_IF_MSG_IF:Ut,CONTROLS_IF_MSG_ELSEIF:Wt,CONTROLS_IF_MSG_ELSE:Gt,CONTROLS_IF_MSG_THEN:Kt,CONTROLS_IF_IF_TITLE_IF:qt,CONTROLS_IF_IF_TOOLTIP:Jt,CONTROLS_IF_ELSEIF_TITLE_ELSEIF:Yt,CONTROLS_IF_ELSEIF_TOOLTIP:Xt,CONTROLS_IF_ELSE_TITLE_ELSE:Zt,CONTROLS_IF_ELSE_TOOLTIP:Qt,LOGIC_COMPARE_HELPURL:$t,LOGIC_COMPARE_EQ_ARIA:en,LOGIC_COMPARE_TOOLTIP_EQ:tn,LOGIC_COMPARE_NEQ_ARIA:nn,LOGIC_COMPARE_TOOLTIP_NEQ:rn,LOGIC_COMPARE_LT_ARIA:an,LOGIC_COMPARE_TOOLTIP_LT:on,LOGIC_COMPARE_LTE_ARIA:sn,LOGIC_COMPARE_TOOLTIP_LTE:cn,LOGIC_COMPARE_GT_ARIA:ln,LOGIC_COMPARE_TOOLTIP_GT:un,LOGIC_COMPARE_GTE_ARIA:dn,LOGIC_COMPARE_TOOLTIP_GTE:fn,LOGIC_OPERATION_HELPURL:pn,LOGIC_OPERATION_TOOLTIP_AND:mn,LOGIC_OPERATION_AND:hn,LOGIC_OPERATION_TOOLTIP_OR:gn,LOGIC_OPERATION_OR:_n,LOGIC_NEGATE_HELPURL:vn,LOGIC_NEGATE_TITLE:yn,LOGIC_NEGATE_TOOLTIP:bn,LOGIC_BOOLEAN_HELPURL:xn,LOGIC_BOOLEAN_TRUE:Sn,LOGIC_BOOLEAN_FALSE:Cn,LOGIC_BOOLEAN_TOOLTIP:wn,LOGIC_NULL_HELPURL:Tn,LOGIC_NULL:En,LOGIC_NULL_TOOLTIP:Dn,LOGIC_TERNARY_HELPURL:On,LOGIC_TERNARY_CONDITION:kn,LOGIC_TERNARY_IF_TRUE:An,LOGIC_TERNARY_IF_FALSE:jn,LOGIC_TERNARY_TOOLTIP:Mn,MATH_NUMBER_HELPURL:Nn,MATH_NUMBER_TOOLTIP:Pn,MATH_ADDITION_SYMBOL:Fn,MATH_ADDITION_SYMBOL_ARIA:In,MATH_SUBTRACTION_SYMBOL:Ln,MATH_SUBTRACTION_SYMBOL_ARIA:Rn,MATH_DIVISION_SYMBOL:zn,MATH_DIVISION_SYMBOL_ARIA:Bn,MATH_MULTIPLICATION_SYMBOL:Vn,MATH_MULTIPLICATION_SYMBOL_ARIA:Hn,MATH_POWER_SYMBOL:Un,MATH_POWER_SYMBOL_ARIA:Wn,MATH_TRIG_SIN:Gn,MATH_TRIG_SIN_ARIA:Kn,MATH_TRIG_COS:qn,MATH_TRIG_COS_ARIA:Jn,MATH_TRIG_TAN:Yn,MATH_TRIG_TAN_ARIA:Xn,MATH_TRIG_ASIN:Zn,MATH_TRIG_ASIN_ARIA:Qn,MATH_TRIG_ACOS:$n,MATH_TRIG_ACOS_ARIA:er,MATH_TRIG_ATAN:tr,MATH_TRIG_ATAN_ARIA:nr,MATH_CONSTANT_PI_ARIA:rr,MATH_CONSTANT_E_ARIA:ir,MATH_CONSTANT_GOLDEN_RATIO_ARIA:ar,MATH_CONSTANT_SQRT2_ARIA:or,MATH_CONSTANT_SQRT1_2_ARIA:sr,MATH_CONSTANT_INFINITY_ARIA:cr,MATH_ARITHMETIC_HELPURL:lr,MATH_ARITHMETIC_TOOLTIP_ADD:ur,MATH_ARITHMETIC_TOOLTIP_MINUS:dr,MATH_ARITHMETIC_TOOLTIP_MULTIPLY:fr,MATH_ARITHMETIC_TOOLTIP_DIVIDE:pr,MATH_ARITHMETIC_TOOLTIP_POWER:mr,MATH_SINGLE_HELPURL:hr,MATH_SINGLE_OP_ROOT:gr,MATH_SINGLE_TOOLTIP_ROOT:_r,MATH_SINGLE_OP_ABSOLUTE:vr,MATH_SINGLE_OP_ABSOLUTE_ARIA:yr,MATH_SINGLE_TOOLTIP_ABS:br,MATH_SINGLE_OP_NEG_ARIA:xr,MATH_SINGLE_OP_LN_ARIA:Sr,MATH_SINGLE_OP_LOG10_ARIA:Cr,MATH_SINGLE_OP_EXP_ARIA:wr,MATH_SINGLE_OP_POW10_ARIA:Tr,MATH_SINGLE_TOOLTIP_NEG:Er,MATH_SINGLE_TOOLTIP_LN:Dr,MATH_SINGLE_TOOLTIP_LOG10:Or,MATH_SINGLE_TOOLTIP_EXP:kr,MATH_SINGLE_TOOLTIP_POW10:Ar,MATH_TRIG_HELPURL:jr,MATH_TRIG_TOOLTIP_SIN:Mr,MATH_TRIG_TOOLTIP_COS:Nr,MATH_TRIG_TOOLTIP_TAN:Pr,MATH_TRIG_TOOLTIP_ASIN:Fr,MATH_TRIG_TOOLTIP_ACOS:Ir,MATH_TRIG_TOOLTIP_ATAN:Lr,MATH_CONSTANT_HELPURL:Rr,MATH_CONSTANT_TOOLTIP:zr,MATH_IS_EVEN:Br,MATH_IS_ODD:Vr,MATH_IS_PRIME:Hr,MATH_IS_WHOLE:Ur,MATH_IS_POSITIVE:Wr,MATH_IS_NEGATIVE:Gr,MATH_IS_DIVISIBLE_BY:Kr,MATH_IS_TOOLTIP:qr,MATH_CHANGE_HELPURL:Jr,MATH_CHANGE_TITLE:Yr,MATH_CHANGE_TITLE_ITEM:Xr,MATH_CHANGE_TOOLTIP:Zr,MATH_ROUND_HELPURL:Qr,MATH_ROUND_TOOLTIP:$r,MATH_ROUND_OPERATOR_ROUND:ei,MATH_ROUND_OPERATOR_ROUNDUP:ti,MATH_ROUND_OPERATOR_ROUNDDOWN:ni,MATH_ONLIST_HELPURL:ri,MATH_ONLIST_OPERATOR_SUM:ii,MATH_ONLIST_TOOLTIP_SUM:ai,MATH_ONLIST_OPERATOR_MIN:oi,MATH_ONLIST_OPERATOR_MIN_ARIA:si,MATH_ONLIST_TOOLTIP_MIN:ci,MATH_ONLIST_OPERATOR_MAX:li,MATH_ONLIST_OPERATOR_MAX_ARIA:ui,MATH_ONLIST_TOOLTIP_MAX:di,MATH_ONLIST_OPERATOR_AVERAGE:fi,MATH_ONLIST_TOOLTIP_AVERAGE:pi,MATH_ONLIST_OPERATOR_MEDIAN:mi,MATH_ONLIST_TOOLTIP_MEDIAN:hi,MATH_ONLIST_OPERATOR_MODE:gi,MATH_ONLIST_TOOLTIP_MODE:_i,MATH_ONLIST_OPERATOR_STD_DEV:vi,MATH_ONLIST_TOOLTIP_STD_DEV:yi,MATH_ONLIST_OPERATOR_RANDOM:bi,MATH_ONLIST_TOOLTIP_RANDOM:xi,MATH_MODULO_HELPURL:Si,MATH_MODULO_TITLE:Ci,MATH_MODULO_TOOLTIP:wi,MATH_CONSTRAIN_HELPURL:Ti,MATH_CONSTRAIN_TITLE:Ei,MATH_CONSTRAIN_TOOLTIP:Di,MATH_RANDOM_INT_HELPURL:Oi,MATH_RANDOM_INT_TITLE:ki,MATH_RANDOM_INT_TOOLTIP:Ai,MATH_RANDOM_FLOAT_HELPURL:ji,MATH_RANDOM_FLOAT_TITLE_RANDOM:Mi,MATH_RANDOM_FLOAT_TOOLTIP:Ni,MATH_ATAN2_HELPURL:Pi,MATH_ATAN2_TITLE:Fi,MATH_ATAN2_TOOLTIP:Ii,TEXT_TEXT_HELPURL:Li,TEXT_TEXT_TOOLTIP:Ri,TEXT_JOIN_HELPURL:zi,TEXT_JOIN_TITLE_CREATEWITH:Bi,TEXT_JOIN_TOOLTIP:Vi,TEXT_CREATE_JOIN_TITLE_JOIN:Hi,TEXT_CREATE_JOIN_TOOLTIP:Ui,TEXT_CREATE_JOIN_ITEM_TITLE_ITEM:Wi,TEXT_CREATE_JOIN_ITEM_TOOLTIP:Gi,TEXT_APPEND_HELPURL:Ki,TEXT_APPEND_TITLE:qi,TEXT_APPEND_VARIABLE:Ji,TEXT_APPEND_TOOLTIP:Yi,TEXT_LENGTH_HELPURL:Xi,TEXT_LENGTH_TITLE:Zi,TEXT_LENGTH_TOOLTIP:Qi,TEXT_ISEMPTY_HELPURL:$i,TEXT_ISEMPTY_TITLE:ea,TEXT_ISEMPTY_TOOLTIP:ta,TEXT_INDEXOF_HELPURL:na,TEXT_INDEXOF_TOOLTIP:ra,TEXT_INDEXOF_TITLE:ia,TEXT_INDEXOF_OPERATOR_FIRST:aa,TEXT_INDEXOF_OPERATOR_LAST:oa,TEXT_FROM_START_ARIA:sa,TEXT_FROM_END_ARIA:ca,TEXT_CHARAT_HELPURL:la,TEXT_CHARAT_TITLE:ua,TEXT_CHARAT_FROM_START:da,TEXT_CHARAT_FROM_END:fa,TEXT_CHARAT_FIRST:pa,TEXT_CHARAT_LAST:ma,TEXT_CHARAT_RANDOM:ha,TEXT_CHARAT_TAIL:ga,TEXT_CHARAT_TOOLTIP:_a,TEXT_GET_SUBSTRING_TOOLTIP:va,TEXT_GET_SUBSTRING_HELPURL:ya,TEXT_GET_SUBSTRING_INPUT_IN_TEXT:ba,TEXT_GET_SUBSTRING_START_FROM_START:xa,TEXT_GET_SUBSTRING_START_FROM_END:Sa,TEXT_GET_SUBSTRING_START_FIRST:Ca,TEXT_GET_SUBSTRING_END_FROM_START:wa,TEXT_GET_SUBSTRING_END_FROM_END:Ta,TEXT_GET_SUBSTRING_END_LAST:Ea,TEXT_GET_SUBSTRING_TAIL:Da,TEXT_CHANGECASE_HELPURL:Oa,TEXT_CHANGECASE_TOOLTIP:ka,TEXT_CHANGECASE_OPERATOR_UPPERCASE:Aa,TEXT_CHANGECASE_OPERATOR_LOWERCASE:ja,TEXT_CHANGECASE_OPERATOR_TITLECASE:Ma,TEXT_TRIM_HELPURL:Na,TEXT_TRIM_TOOLTIP:Pa,TEXT_TRIM_OPERATOR_BOTH:Fa,TEXT_TRIM_OPERATOR_LEFT:Ia,TEXT_TRIM_OPERATOR_RIGHT:La,TEXT_PRINT_HELPURL:Ra,TEXT_PRINT_TITLE:za,TEXT_PRINT_TOOLTIP:Ba,TEXT_PROMPT_HELPURL:Va,TEXT_PROMPT_TYPE_TEXT:Ha,TEXT_PROMPT_TYPE_NUMBER:Ua,TEXT_PROMPT_TOOLTIP_NUMBER:Wa,TEXT_PROMPT_TOOLTIP_TEXT:Ga,TEXT_COUNT_MESSAGE0:Ka,TEXT_COUNT_HELPURL:qa,TEXT_COUNT_TOOLTIP:Ja,TEXT_REPLACE_MESSAGE0:Ya,TEXT_REPLACE_HELPURL:Xa,TEXT_REPLACE_TOOLTIP:Za,TEXT_REVERSE_MESSAGE0:Qa,TEXT_REVERSE_HELPURL:$a,TEXT_REVERSE_TOOLTIP:eo,LISTS_CREATE_EMPTY_HELPURL:to,LISTS_CREATE_EMPTY_TITLE:no,LISTS_CREATE_EMPTY_TOOLTIP:ro,LISTS_CREATE_WITH_HELPURL:io,LISTS_CREATE_WITH_TOOLTIP:ao,LISTS_CREATE_WITH_INPUT_WITH:oo,LISTS_CREATE_WITH_CONTAINER_TITLE_ADD:so,LISTS_CREATE_WITH_CONTAINER_TOOLTIP:co,LISTS_CREATE_WITH_ITEM_TITLE:lo,LISTS_CREATE_WITH_ITEM_TOOLTIP:uo,LISTS_REPEAT_HELPURL:fo,LISTS_REPEAT_TOOLTIP:po,LISTS_REPEAT_TITLE:mo,LISTS_LENGTH_HELPURL:ho,LISTS_LENGTH_TITLE:go,LISTS_LENGTH_TOOLTIP:_o,LISTS_ISEMPTY_HELPURL:vo,LISTS_ISEMPTY_TITLE:yo,LISTS_ISEMPTY_TOOLTIP:bo,LISTS_INLIST:xo,LISTS_INDEX_OF_HELPURL:So,LISTS_INDEX_OF_INPUT_IN_LIST:Co,LISTS_INDEX_OF_FIRST:wo,LISTS_INDEX_OF_LAST:To,LISTS_INDEX_OF_TOOLTIP:Eo,LISTS_GET_INDEX_HELPURL:Do,LISTS_GET_INDEX_GET:Oo,LISTS_GET_INDEX_GET_REMOVE:ko,LISTS_GET_INDEX_REMOVE:Ao,LISTS_GET_INDEX_FROM_START:jo,LISTS_GET_INDEX_FROM_END:Mo,LISTS_GET_INDEX_FIRST:No,LISTS_GET_INDEX_LAST:Po,LISTS_GET_INDEX_RANDOM:Fo,LISTS_GET_INDEX_TAIL:Io,LISTS_GET_INDEX_INPUT_IN_LIST:Lo,LISTS_INDEX_FROM_START_TOOLTIP:Ro,LISTS_INDEX_FROM_END_TOOLTIP:zo,LISTS_GET_INDEX_TOOLTIP_GET_FROM:Bo,LISTS_GET_INDEX_TOOLTIP_GET_FIRST:Vo,LISTS_GET_INDEX_TOOLTIP_GET_LAST:Ho,LISTS_GET_INDEX_TOOLTIP_GET_RANDOM:Uo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM:Wo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST:Go,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST:Ko,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM:qo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM:Jo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST:Yo,LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST:Xo,LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM:Zo,LISTS_SET_INDEX_HELPURL:Qo,LISTS_SET_INDEX_INPUT_IN_LIST:$o,LISTS_SET_INDEX_SET:es,LISTS_SET_INDEX_INSERT:ts,LISTS_SET_INDEX_INPUT_TO:ns,LISTS_SET_INDEX_TOOLTIP_SET_FROM:rs,LISTS_SET_INDEX_TOOLTIP_SET_FIRST:is,LISTS_SET_INDEX_TOOLTIP_SET_LAST:as,LISTS_SET_INDEX_TOOLTIP_SET_RANDOM:os,LISTS_SET_INDEX_TOOLTIP_INSERT_FROM:ss,LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST:cs,LISTS_SET_INDEX_TOOLTIP_INSERT_LAST:ls,LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM:us,LISTS_GET_SUBLIST_HELPURL:ds,LISTS_GET_SUBLIST_INPUT_IN_LIST:fs,LISTS_GET_SUBLIST_START_FROM_START:F,LISTS_GET_SUBLIST_START_FROM_END:ps,LISTS_GET_SUBLIST_START_FIRST:ms,LISTS_GET_SUBLIST_END_FROM_START:hs,LISTS_GET_SUBLIST_END_FROM_END:gs,LISTS_GET_SUBLIST_END_LAST:_s,LISTS_GET_SUBLIST_TAIL:vs,LISTS_GET_SUBLIST_TOOLTIP:ys,LISTS_SORT_HELPURL:bs,LISTS_SORT_TITLE:xs,LISTS_SORT_TOOLTIP:Ss,LISTS_SORT_ORDER_ASCENDING:Cs,LISTS_SORT_ORDER_DESCENDING:ws,LISTS_SORT_TYPE_NUMERIC:Ts,LISTS_SORT_TYPE_TEXT:Es,LISTS_SORT_TYPE_IGNORECASE:Ds,LISTS_SPLIT_HELPURL:Os,LISTS_SPLIT_LIST_FROM_TEXT:ks,LISTS_SPLIT_TEXT_FROM_LIST:As,LISTS_SPLIT_WITH_DELIMITER:js,LISTS_SPLIT_TOOLTIP_SPLIT:Ms,LISTS_SPLIT_TOOLTIP_JOIN:Ns,LISTS_REVERSE_HELPURL:Ps,LISTS_REVERSE_MESSAGE0:Fs,LISTS_REVERSE_TOOLTIP:Is,ORDINAL_NUMBER_SUFFIX:Ls,VARIABLES_GET_HELPURL:Rs,VARIABLES_GET_TOOLTIP:zs,VARIABLES_GET_CREATE_SET:Bs,VARIABLES_SET_HELPURL:Vs,VARIABLES_SET:Hs,VARIABLES_SET_TOOLTIP:Us,VARIABLES_SET_CREATE_GET:Ws,PROCEDURES_DEFNORETURN_HELPURL:Gs,PROCEDURES_DEFNORETURN_TITLE:Ks,PROCEDURES_DEFNORETURN_PROCEDURE:qs,PROCEDURES_BEFORE_PARAMS:Js,PROCEDURES_CALL_BEFORE_PARAMS:Ys,PROCEDURES_CALL_DISABLED_DEF_WARNING:Xs,PROCEDURES_DEFNORETURN_DO:Zs,PROCEDURES_DEFNORETURN_TOOLTIP:Qs,PROCEDURES_DEFNORETURN_COMMENT:$s,PROCEDURES_DEFRETURN_HELPURL:ec,PROCEDURES_DEFRETURN_TITLE:tc,PROCEDURES_DEFRETURN_PROCEDURE:nc,PROCEDURES_DEFRETURN_DO:rc,PROCEDURES_DEFRETURN_COMMENT:ic,PROCEDURES_DEFRETURN_RETURN:ac,PROCEDURES_DEFRETURN_TOOLTIP:oc,PROCEDURES_ALLOW_STATEMENTS:sc,PROCEDURES_DEF_DUPLICATE_WARNING:cc,PROCEDURES_CALLNORETURN_HELPURL:lc,PROCEDURES_CALLNORETURN_TOOLTIP:uc,PROCEDURES_CALLRETURN_HELPURL:dc,PROCEDURES_CALLRETURN_TOOLTIP:fc,PROCEDURES_MUTATORCONTAINER_TITLE:pc,PROCEDURES_MUTATORCONTAINER_TOOLTIP:mc,PROCEDURES_MUTATORARG_TITLE:hc,PROCEDURES_MUTATORARG_TOOLTIP:gc,PROCEDURES_HIGHLIGHT_DEF:_c,PROCEDURES_CREATE_DO:vc,PROCEDURES_IFRETURN_TOOLTIP:yc,PROCEDURES_IFRETURN_HELPURL:bc,PROCEDURES_IFRETURN_WARNING:xc,WORKSPACE_COMMENT_DEFAULT_TEXT:Sc,COLLAPSED_WARNINGS_WARNING:Cc,DIALOG_OK:wc,DIALOG_CANCEL:Tc,EDIT_BLOCK_CONTENTS:Ec,MOVE_BLOCK:Dc,WINDOWS:Oc,MAC_OS:kc,CHROME_OS:Ac,LINUX:jc,UNKNOWN:Mc,CONTROL_KEY:Nc,COMMAND_KEY:Pc,OPTION_KEY:Fc,ALT_KEY:Ic,ENTER_KEY:Lc,BACKSPACE_KEY:Rc,DELETE_KEY:zc,ESCAPE:Bc,TAB_KEY:Vc,SHIFT_KEY:Hc,CAPS_LOCK_KEY:Uc,SPACE_KEY:Wc,PAGE_UP_KEY:Gc,PAGE_DOWN_KEY:Kc,END_KEY:qc,HOME_KEY:Jc,INSERT_KEY:Yc,PAUSE_KEY:Xc,CONTEXT_MENU_KEY:Zc,CUT_SHORTCUT:Qc,COPY_SHORTCUT:$c,PASTE_SHORTCUT:el,HELP_PROMPT:tl,SHORTCUTS_GENERAL:nl,SHORTCUTS_EDITING:rl,SHORTCUTS_CODE_NAVIGATION:il,SHORTCUTS_ESCAPE:al,SHORTCUTS_DELETE:ol,SHORTCUTS_START_MOVE:sl,SHORTCUTS_START_MOVE_STACK:cl,SHORTCUTS_MOVE_LEFT:ll,SHORTCUTS_MOVE_RIGHT:ul,SHORTCUTS_MOVE_UP:dl,SHORTCUTS_MOVE_DOWN:fl,SHORTCUTS_FINISH_MOVE:pl,SHORTCUTS_ABORT_MOVE:ml,SHORTCUTS_SHOW_CONTEXT_MENU:hl,SHORTCUTS_FOCUS_WORKSPACE:gl,SHORTCUTS_FOCUS_TOOLBOX:_l,SHORTCUTS_INFORMATION:vl,SHORTCUTS_EXTENDED_INFORMATION:yl,SHORTCUTS_DISCONNECT:bl,SHORTCUTS_NEXT_STACK:xl,SHORTCUTS_PREVIOUS_STACK:Sl,SHORTCUTS_NEXT_HEADING:Cl,SHORTCUTS_PREVIOUS_HEADING:wl,SHORTCUTS_PERFORM_ACTION:Tl,SHORTCUTS_DUPLICATE:El,SHORTCUTS_CLEANUP:Dl,SHORTCUTS_SHOW_TOOLTIP:Ol,SHORTCUTS_TOGGLE_SCREENREADER_MODE:kl,SHORTCUTS_JUMP_BLOCK_START:Al,SHORTCUTS_JUMP_BLOCK_END:jl,SHORTCUTS_JUMP_TOP_STACK:Ml,SHORTCUTS_JUMP_BOTTOM_STACK:Nl,SHORTCUTS_JUMP_FIRST_BLOCK:Pl,SHORTCUTS_JUMP_LAST_BLOCK:Fl,KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT:Il,KEYBOARD_NAV_CONSTRAINED_MOVE_HINT:Ll,KEYBOARD_NAV_COPIED_HINT:Rl,KEYBOARD_NAV_CUT_HINT:zl,WORKSPACE_LABEL_PLAIN:Bl,WORKSPACE_ROLEDESCRIPTION:Vl,WORKSPACE_LABEL_1_STACK:Hl,WORKSPACE_LABEL_MANY_STACKS:Ul,WORKSPACE_LABEL_MUTATOR_WORKSPACE:Wl,WORKSPACE_LABEL_FLYOUT_WORKSPACE:Gl,WORKSPACE_CONTENTS_BLOCKS_MANY:Kl,WORKSPACE_CONTENTS_BLOCKS_ONE:ql,WORKSPACE_CONTENTS_BLOCKS_ZERO:Jl,WORKSPACE_CONTENTS_COMMENTS_MANY:Yl,WORKSPACE_CONTENTS_COMMENTS_ONE:Xl,KEYBOARD_NAV_BLOCK_NAVIGATION_HINT:Zl,KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT:Ql,KEYBOARD_NAV_FLYOUT_LABEL_HINT:$l,BLOCK_LABEL_BEGIN_STACK:eu,BLOCK_LABEL_BEGIN_PREFIX:tu,BLOCK_LABEL_TOOLBOX_CATEGORY:nu,BLOCK_LABEL_DISABLED:ru,BLOCK_LABEL_COLLAPSED:iu,BLOCK_LABEL_REPLACEABLE:au,BLOCK_LABEL_HAS_INPUT:ou,BLOCK_LABEL_HAS_INPUTS:su,BLOCK_LABEL_HAS_BRANCHES:cu,BLOCK_LABEL_STATEMENT:lu,BLOCK_LABEL_CONTAINER:uu,BLOCK_LABEL_VALUE:du,BLOCK_LABEL_STACK_BLOCKS:fu,INPUT_LABEL_INDEX:pu,INPUT_LABEL_VALUE:mu,INPUT_LABEL_STATEMENT:hu,INPUT_LABEL_END_STATEMENT:gu,INPUT_LABEL_EMPTY:_u,INPUT_LABEL_CONDITION:vu,INPUT_LABEL_CONDITION_A:yu,INPUT_LABEL_CONDITION_B:bu,INPUT_LABEL_VALUE_A:xu,INPUT_LABEL_VALUE_B:Su,INPUT_LABEL_NUMBER:Cu,INPUT_LABEL_NUMBER_A:wu,INPUT_LABEL_NUMBER_B:Tu,INPUT_LABEL_NUMBER_TO_CHECK:Eu,INPUT_LABEL_NUMBER_LIST:Du,INPUT_LABEL_MATH_DIVIDEND:Ou,INPUT_LABEL_MATH_DIVISOR:ku,INPUT_LABEL_MATH_CHANGE_BY:Au,INPUT_LABEL_MATH_CONSTRAIN_VALUE:ju,INPUT_LABEL_NUMBER_MIN:Mu,INPUT_LABEL_NUMBER_MAX:Nu,INPUT_LABEL_NUMBER_ATAN2_X:Pu,INPUT_LABEL_NUMBER_ATAN2_Y:Fu,INPUT_LABEL_LOOP_TIMES:Iu,INPUT_LABEL_LOOP_FROM:Lu,INPUT_LABEL_LOOP_TO:Ru,INPUT_LABEL_LOOP_BY:zu,INPUT_LABEL_LOOP_LIST:Bu,INPUT_LABEL_TEXT_JOIN_ITEM:Vu,INPUT_LABEL_TEXT_APPEND:Hu,INPUT_LABEL_TEXT_TO_CHANGE:Uu,INPUT_LABEL_TEXT_TO_CHECK:Wu,INPUT_LABEL_TEXT_TO_FIND:Gu,INPUT_LABEL_TEXT_TO_REPLACE:Ku,INPUT_LABEL_TEXT_POSITION:qu,INPUT_LABEL_TEXT_START_POSITION:Ju,INPUT_LABEL_TEXT_END_POSITION:Yu,INPUT_LABEL_TEXT_PROMPT_MESSAGE:Xu,INPUT_LABEL_VARIABLES_SET:Zu,INPUT_LABEL_LISTS_CREATE_WITH_ITEM:Qu,INPUT_LABEL_LISTS_REPEAT_ITEM:$u,INPUT_LABEL_LISTS_REPEAT_NUM:ed,INPUT_LABEL_LISTS_TO_CHECK:td,INPUT_LABEL_LISTS_VALUE_TO_SET:nd,INPUT_LABEL_LISTS_POSITION:rd,INPUT_LABEL_LISTS_START_POSITION:id,INPUT_LABEL_LISTS_END_POSITION:ad,INPUT_LABEL_LISTS_LIST_FROM_TEXT:od,INPUT_LABEL_LISTS_TEXT_FROM_LIST:sd,INPUT_LABEL_LISTS_DELIMITER:cd,INPUT_LABEL_LISTS_TO_CHANGE:ld,ANNOUNCE_MOVE_WORKSPACE:ud,ANNOUNCE_MOVE_BEFORE:dd,ANNOUNCE_MOVE_AFTER:fd,ANNOUNCE_MOVE_INSIDE:pd,ANNOUNCE_MOVE_AROUND:md,ANNOUNCE_MOVE_TO:hd,ANNOUNCE_MOVE_OF:gd,ANNOUNCE_MOVE_CANCELED:_d,FIELD_LABEL_EMPTY:vd,ARIA_TYPE_FIELD_INPUT:yd,ARIA_TYPE_FIELD_TEXT_INPUT:bd,ARIA_TYPE_FIELD_NUMBER:xd,ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE:Sd,ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT:Cd,ARIA_TYPE_FIELD_DROPDOWN:wd,ARIA_TYPE_FIELD_IMAGE:Td,ARIA_TYPE_FIELD_CHECKBOX:Ed,FIELD_LABEL_EDIT_PREFIX:Dd,OPEN_TRASH:Od,ZOOM_IN:kd,ZOOM_OUT:Ad,RESET_ZOOM:jd,FIELD_LABEL_OPTION_INDEX:Md,FIELD_LABEL_CHECKBOX_CHECKED:Nd,FIELD_LABEL_CHECKBOX_UNCHECKED:Pd,FIELD_LABEL_VARIABLE:Fd,ARIA_LABEL_BUTTON:Id,ARIA_LABEL_HEADING:Ld,BUBBLE_LABEL_DEFAULT:Rd,BUBBLE_LABEL_COMMENT:zd,BUBBLE_LABEL_WARNING:Bd,ICON_LABEL_DEFAULT:Vd,ICON_LABEL_COMMENT_CLOSED:Hd,ICON_LABEL_COMMENT_OPEN:Ud,ICON_LABEL_MUTATOR_CLOSED:Wd,ICON_LABEL_MUTATOR_OPEN:Gd,ICON_LABEL_WARNING_CLOSED:Kd,ICON_LABEL_WARNING_OPEN:qd,ARIA_LABEL_COMMENT:Jd,ARIA_LABEL_COMMENT_COLLAPSE:Yd,ARIA_LABEL_COMMENT_EXPAND:Xd,SCREENREADER_MODE_ENABLED:Zd,SCREENREADER_MODE_DISABLED:Qd,CURRENT_BLOCK_ANNOUNCEMENT:$d,PARENT_BLOCKS_ANNOUNCEMENT:ef,NO_PARENT_ANNOUNCEMENT:tf,SCREENREADER_HINT:nf,ARIA_LABEL_ADD_ELSE_IF:rf,ARIA_LABEL_REMOVE_ELSE_IF:af,ARIA_LABEL_ADD_LIST_ITEM:of,ARIA_LABEL_REMOVE_LIST_ITEM:sf,ARIA_LABEL_ADD_TEXT:cf,ARIA_LABEL_REMOVE_TEXT:lf,ARIA_LABEL_ADD_INPUT:uf,ARIA_LABEL_REMOVE_INPUT:df,ARIA_TYPE_FIELD_ANGLE:ff,ARIA_LABEL_FIELD_ANGLE:pf,ARIA_TYPE_FIELD_DATE:mf,ARIA_TYPE_FIELD_COLOUR:hf,ARIA_TYPE_FIELD_BITMAP:gf,ARIA_TYPE_FIELD_GRID:_f,FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE:vf,FIELD_BITMAP_BUTTON_LABEL_CLEAR:yf,FIELD_BITMAP_PIXEL_ON:bf,FIELD_BITMAP_PIXEL_OFF:xf,FIELD_BITMAP_PIXEL_LABEL:Sf,FIELD_BITMAP_ARIA_VALUE:Cf,OPEN_BACKPACK:wf,CLOSE_BACKPACK:Tf,COPY_ALL_TO_BACKPACK:Ef,COPY_TO_BACKPACK:Df,EMPTY_BACKPACK:Of,PASTE_ALL_FROM_BACKPACK:kf,REMOVE_FROM_BACKPACK:Af,FIELD_MULTILINEINPUT_FINISH_EDITING:jf,FIELD_MULTILINEINPUT_NEW_LINE:Mf,ZOOM_TO_FIT_ARIA_LABEL:Nf,MINIMAP_ARIA_LABEL:Pf,ARIA_LABEL_TRASH_EMPTY:Ff}=e(le(),1).default,If=[{id:`blocks_words`,source:`module`},{id:`blocks_procedures`,source:`module`},{id:`blocks_logic`,source:`module`},{id:`blocks_switch`,source:`module`},{id:`blocks_text`,source:`module`},{id:`blocks_number`,source:`module`},{id:`field_oid`,source:`module`},{id:`field_cron`,source:`module`},{id:`field_script`,source:`module`},{id:`blocks_system`,source:`module`},{id:`blocks_action`,source:`module`},{id:`blocks_sendto`,source:`module`},{id:`blocks_time`,source:`module`},{id:`blocks_convert`,source:`module`},{id:`blocks_trigger`,source:`module`},{id:`blocks_timeout`,source:`module`},{id:`blocks_object`,source:`module`}],Lf={blocks_action:()=>r(()=>import(`./blocks_action-CvnOHXwt.js`),__vite__mapDeps([0,1,2,3,4]),import.meta.url),blocks_convert:()=>r(()=>import(`./blocks_convert-BZlKcd02.js`),__vite__mapDeps([5,1,2,3,4]),import.meta.url),blocks_words:()=>r(()=>import(`./blocks_words-D8PL_nSE.js`),[],import.meta.url),blocks_logic:()=>r(()=>import(`./blocks_logic-B33Pypxr.js`),__vite__mapDeps([6,1,2,3,4]),import.meta.url),blocks_number:()=>r(()=>import(`./blocks_number-k2IjE7OH.js`),__vite__mapDeps([7,1,2,3]),import.meta.url),blocks_procedures:()=>r(()=>import(`./blocks_procedures-BpvNI5dO.js`),__vite__mapDeps([8,1,3,9]),import.meta.url),blocks_sendto:()=>r(()=>import(`./blocks_sendto-pwZchfe0.js`),__vite__mapDeps([10,1,2,3,4]),import.meta.url),blocks_system:()=>r(()=>import(`./blocks_system-BZZcGqTJ.js`),__vite__mapDeps([11,1,3,4,12]),import.meta.url),field_cron:()=>r(()=>import(`./field_cron-BMQWPb61.js`),__vite__mapDeps([13,1]),import.meta.url),field_oid:()=>r(()=>import(`./field_oid-BGIMv9gw.js`),__vite__mapDeps([12,1]),import.meta.url),field_script:()=>r(()=>import(`./field_script-CdzYBCe6.js`),__vite__mapDeps([9,1]),import.meta.url),blocks_object:()=>r(()=>import(`./blocks_object-B64vSfel.js`),__vite__mapDeps([14,1,2,3,4]),import.meta.url),blocks_switch:()=>r(()=>import(`./blocks_switch-DViYCmQd.js`),__vite__mapDeps([15,1,2,3]),import.meta.url),blocks_text:()=>r(()=>import(`./blocks_text-BOvtHN2r.js`),__vite__mapDeps([16,1,2,3]),import.meta.url),blocks_time:()=>r(()=>import(`./blocks_time-BH2F-ylT.js`),__vite__mapDeps([17,1,2,3,4]),import.meta.url),blocks_trigger:()=>r(()=>import(`./blocks_trigger-gwXvuAHV.js`),__vite__mapDeps([18,1,3,4,12,13]),import.meta.url),blocks_timeout:()=>r(()=>import(`./blocks_timeout-C3BoW4XJ.js`),__vite__mapDeps([19,1,2,3]),import.meta.url)},Rf={...S,JavaScript:T};w(ue),window.Blockly=Rf,window.goog||={provide:()=>{},require:()=>{}};function zf(e){return new Promise(t=>{let n=window.document.createElement(`script`);n.src=e,n.onload=()=>t(),n.onerror=()=>{console.error(`Cannot load ${e}`),t()},window.document.head.appendChild(n)})}var I=null;function Bf(){return I||=(async()=>{for(let e of If)if(e.source===`module`){let t=Lf[e.id];if(!t){console.error(`No module registered for "${e.id}" - check BLOCK_MODULES in bridge.ts`);continue}(await t()).install()}else await zf(`google-blockly/own/${e.id}.js`)})(),I}var L=window.Blockly,R=class extends Error{constructor(){super(`The field has not yet been attached to its input. Call appendField to attach it.`)}},z=class e extends L.Field{constructor(e,t,n){super(e),s(this,`textGroup`,null),s(this,`borderRect_`,null),s(this,`maxLines_`,1/0),s(this,`isOverflowedY_`,!1),e!==Symbol(`SKIP_SETUP`)&&(n&&this.configure_(n),this.SERIALIZABLE=!0,this.setValue((e==null?void 0:e.toString())||``),t&&this.setValidator(t))}configure_(e){super.configure_(e),e.maxLines&&this.setMaxLines(e.maxLines)}toXml(e){return e.textContent=this.getValue().replace(/\n/g,` `),e}fromXml(e){this.setValue(e.textContent.replace(/ /g,` +`))this.quarkIds_=n;else{if(n.length!==e.length)throw RangeError(`paramNames and paramIds must be the same length.`);this.quarkIds_||=(this.quarkConnections_={},[]);for(let e=0;ee.getName()))===JSON.stringify(this.arguments_)||(r=null),r)r.isEnabled()||(this.setDisabledReason(!0,`DISABLED_PROCEDURE_DEFINITION`),this.setWarningText(t.C.PROCEDURES_CALL_DISABLED_DEF_WARNING.replace(`%1`,n)));else{t.B(e.group),e=t.rc(`xml`),n=t.rc(`block`),n.setAttribute(`type`,this.defType_),r=this.getRelativeToSurfaceXY();var i=r.y+t.Og.snapRadius*2;n.setAttribute(`x`,`${r.x+t.Og.snapRadius*(this.RTL?-1:1)}`),n.setAttribute(`y`,`${i}`),r=this.mutationToDom(),n.appendChild(r),r=t.rc(`field`),r.setAttribute(`name`,`NAME`),i=this.getProcedureCall();let a=t.jj(i,this);i!==a&&this.renameProcedure(i,a),r.appendChild(t.sc(i)),n.appendChild(r),e.appendChild(n),t.ch(e,this.workspace),t.B(!1)}}else e.type===t.lm?(n=this.getProcedureCall(),t.tj(n,this.workspace)||(t.B(e.group),this.dispose(!0),t.B(!1))):e.type===t.km&&e.element===`disabled`&&(n=this.getProcedureCall(),(i=t.tj(n,this.workspace))&&i.id===e.blockId&&((r=t.gd)&&console.log(`Saw an existing group while responding to a definition change`),t.B(e.group),e=i.isEnabled(),this.setDisabledReason(!e,`DISABLED_PROCEDURE_DEFINITION`),this.setWarningText(e?null:t.C.PROCEDURES_CALL_DISABLED_DEF_WARNING.replace(`%1`,n)),t.B(r)))},customContextMenu:function(e){if(this.workspace.isMovable()){var n=this.getProcedureCall(),r=this.workspace;e.push({enabled:!0,text:t.C.PROCEDURES_HIGHLIGHT_DEF,callback:function(){var e=t.tj(n,r);e&&(r.centerOnBlock(e.id),t.t().focusNode(e))}})}}};m.procedures_callnoreturn=Object.assign({},_,{init:function(){this.appendDummyInput(`TOPROW`).appendField(``,`NAME`),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle(`procedure_blocks`),this.setHelpUrl(t.C.PROCEDURES_CALLNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null},defType_:`procedures_defnoreturn`}),m.procedures_callreturn=Object.assign({},_,{init:function(){this.appendDummyInput(`TOPROW`).appendField(``,`NAME`),this.setOutput(!0),this.setStyle(`procedure_blocks`),this.setHelpUrl(t.C.PROCEDURES_CALLRETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null},defType_:`procedures_defreturn`}),m.procedures_ifreturn={init:function(){this.appendValueInput(`CONDITION`).setCheck(`Boolean`).appendField(t.C.CONTROLS_IF_MSG_IF),this.appendValueInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle(`procedure_blocks`),this.setTooltip(t.C.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(t.C.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`value`,String(Number(this.hasReturnValue_))),e},domToMutation:function(e){this.hasReturnValue_=e.getAttribute(`value`)===`1`,this.hasReturnValue_||(this.removeInput(`VALUE`),this.appendDummyInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN))},onchange:function(e){if(!(this.workspace.isDragging&&this.workspace.isDragging()||e.type!==t.nm&&e.type!==t.Od)){e=!1;var n=this;do{if(this.FUNCTION_TYPES.includes(n.type)){e=!0;break}n=n.getSurroundParent()}while(n);if(e?(n.type===`procedures_defnoreturn`&&this.hasReturnValue_?(this.removeInput(`VALUE`),this.appendDummyInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):n.type!==`procedures_defreturn`||this.hasReturnValue_||(this.removeInput(`VALUE`),this.appendValueInput(`VALUE`).appendField(t.C.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(t.C.PROCEDURES_IFRETURN_WARNING),!this.isInFlyout)try{t.Qc=!1,this.setDisabledReason(!e,`UNPARENTED_IFRETURN`)}finally{t.Qc=!0}}},FUNCTION_TYPES:[`procedures_defnoreturn`,`procedures_defreturn`]},t.Ab(m);var v={blocks:m},y=t.yb([{type:`math_number`,message0:`%1`,args0:[{type:`field_number`,name:`NUM`,value:0}],output:`Number`,helpUrl:`%{BKY_MATH_NUMBER_HELPURL}`,style:`math_blocks`,tooltip:`%{BKY_MATH_NUMBER_TOOLTIP}`,extensions:[`parent_tooltip_when_inline`]},{type:`math_arithmetic`,message0:`%1 %2 %3`,args0:[{type:`input_value`,name:`A`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_A}`},{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_ADDITION_SYMBOL}`,`ADD`,`%{BKY_MATH_ADDITION_SYMBOL_ARIA}`],[`%{BKY_MATH_SUBTRACTION_SYMBOL}`,`MINUS`,`%{BKY_MATH_SUBTRACTION_SYMBOL_ARIA}`],[`%{BKY_MATH_MULTIPLICATION_SYMBOL}`,`MULTIPLY`,`%{BKY_MATH_MULTIPLICATION_SYMBOL_ARIA}`],[`%{BKY_MATH_DIVISION_SYMBOL}`,`DIVIDE`,`%{BKY_MATH_DIVISION_SYMBOL_ARIA}`],[`%{BKY_MATH_POWER_SYMBOL}`,`POWER`,`%{BKY_MATH_POWER_SYMBOL_ARIA}`]]},{type:`input_value`,name:`B`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_B}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_ARITHMETIC_HELPURL}`,extensions:[`math_op_tooltip`]},{type:`math_single`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_SINGLE_OP_ROOT}`,`ROOT`],[`%{BKY_MATH_SINGLE_OP_ABSOLUTE}`,`ABS`,`%{BKY_MATH_SINGLE_OP_ABSOLUTE_ARIA}`],[`-`,`NEG`,`%{BKY_MATH_SINGLE_OP_NEG_ARIA}`],[`ln`,`LN`,`%{BKY_MATH_SINGLE_OP_LN_ARIA}`],[`log10`,`LOG10`,`%{BKY_MATH_SINGLE_OP_LOG10_ARIA}`],[`e^`,`EXP`,`%{BKY_MATH_SINGLE_OP_EXP_ARIA}`],[`10^`,`POW10`,`%{BKY_MATH_SINGLE_OP_POW10_ARIA}`]]},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_SINGLE_HELPURL}`,extensions:[`math_op_tooltip`]},{type:`math_trig`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_TRIG_SIN}`,`SIN`,`%{BKY_MATH_TRIG_SIN_ARIA}`],[`%{BKY_MATH_TRIG_COS}`,`COS`,`%{BKY_MATH_TRIG_COS_ARIA}`],[`%{BKY_MATH_TRIG_TAN}`,`TAN`,`%{BKY_MATH_TRIG_TAN_ARIA}`],[`%{BKY_MATH_TRIG_ASIN}`,`ASIN`,`%{BKY_MATH_TRIG_ASIN_ARIA}`],[`%{BKY_MATH_TRIG_ACOS}`,`ACOS`,`%{BKY_MATH_TRIG_ACOS_ARIA}`],[`%{BKY_MATH_TRIG_ATAN}`,`ATAN`,`%{BKY_MATH_TRIG_ATAN_ARIA}`]]},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_TRIG_HELPURL}`,extensions:[`math_op_tooltip`]},{type:`math_constant`,message0:`%1`,args0:[{type:`field_dropdown`,name:`CONSTANT`,options:[[`π`,`PI`,`%{BKY_MATH_CONSTANT_PI_ARIA}`],[`e`,`E`,`%{BKY_MATH_CONSTANT_E_ARIA}`],[`φ`,`GOLDEN_RATIO`,`%{BKY_MATH_CONSTANT_GOLDEN_RATIO_ARIA}`],[`sqrt(2)`,`SQRT2`,`%{BKY_MATH_CONSTANT_SQRT2_ARIA}`],[`sqrt(½)`,`SQRT1_2`,`%{BKY_MATH_CONSTANT_SQRT1_2_ARIA}`],[`∞`,`INFINITY`,`%{BKY_MATH_CONSTANT_INFINITY_ARIA}`]]}],output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_CONSTANT_TOOLTIP}`,helpUrl:`%{BKY_MATH_CONSTANT_HELPURL}`},{type:`math_number_property`,message0:`%1 %2`,args0:[{type:`input_value`,name:`NUMBER_TO_CHECK`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_TO_CHECK}`},{type:`field_dropdown`,name:`PROPERTY`,options:[[`%{BKY_MATH_IS_EVEN}`,`EVEN`],[`%{BKY_MATH_IS_ODD}`,`ODD`],[`%{BKY_MATH_IS_PRIME}`,`PRIME`],[`%{BKY_MATH_IS_WHOLE}`,`WHOLE`],[`%{BKY_MATH_IS_POSITIVE}`,`POSITIVE`],[`%{BKY_MATH_IS_NEGATIVE}`,`NEGATIVE`],[`%{BKY_MATH_IS_DIVISIBLE_BY}`,`DIVISIBLE_BY`]]}],inputsInline:!0,output:`Boolean`,style:`math_blocks`,tooltip:`%{BKY_MATH_IS_TOOLTIP}`,mutator:`math_is_divisibleby_mutator`},{type:`math_change`,message0:`%{BKY_MATH_CHANGE_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:`%{BKY_MATH_CHANGE_TITLE_ITEM}`},{type:`input_value`,name:`DELTA`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_CHANGE_BY}`}],previousStatement:null,nextStatement:null,style:`variable_blocks`,helpUrl:`%{BKY_MATH_CHANGE_HELPURL}`,extensions:[`math_change_tooltip`]},{type:`math_round`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_ROUND_OPERATOR_ROUND}`,`ROUND`],[`%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}`,`ROUNDUP`],[`%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}`,`ROUNDDOWN`]]},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_ROUND_HELPURL}`,tooltip:`%{BKY_MATH_ROUND_TOOLTIP}`},{type:`math_on_list`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_MATH_ONLIST_OPERATOR_SUM}`,`SUM`],[`%{BKY_MATH_ONLIST_OPERATOR_MIN}`,`MIN`,`%{BKY_MATH_ONLIST_OPERATOR_MIN_ARIA}`],[`%{BKY_MATH_ONLIST_OPERATOR_MAX}`,`MAX`,`%{BKY_MATH_ONLIST_OPERATOR_MAX_ARIA}`],[`%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}`,`AVERAGE`],[`%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}`,`MEDIAN`],[`%{BKY_MATH_ONLIST_OPERATOR_MODE}`,`MODE`],[`%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}`,`STD_DEV`],[`%{BKY_MATH_ONLIST_OPERATOR_RANDOM}`,`RANDOM`]]},{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_LIST}`}],output:`Number`,style:`math_blocks`,helpUrl:`%{BKY_MATH_ONLIST_HELPURL}`,mutator:`math_modes_of_list_mutator`,extensions:[`math_op_tooltip`]},{type:`math_modulo`,message0:`%{BKY_MATH_MODULO_TITLE}`,args0:[{type:`input_value`,name:`DIVIDEND`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_DIVIDEND}`},{type:`input_value`,name:`DIVISOR`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_DIVISOR}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_MODULO_TOOLTIP}`,helpUrl:`%{BKY_MATH_MODULO_HELPURL}`},{type:`math_constrain`,message0:`%{BKY_MATH_CONSTRAIN_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_MATH_CONSTRAIN_VALUE}`},{type:`input_value`,name:`LOW`,check:`Number`},{type:`input_value`,name:`HIGH`,check:`Number`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_CONSTRAIN_TOOLTIP}`,helpUrl:`%{BKY_MATH_CONSTRAIN_HELPURL}`},{type:`math_random_int`,message0:`%{BKY_MATH_RANDOM_INT_TITLE}`,args0:[{type:`input_value`,name:`FROM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_MIN}`},{type:`input_value`,name:`TO`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_MAX}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_RANDOM_INT_TOOLTIP}`,helpUrl:`%{BKY_MATH_RANDOM_INT_HELPURL}`},{type:`math_random_float`,message0:`%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}`,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}`,helpUrl:`%{BKY_MATH_RANDOM_FLOAT_HELPURL}`},{type:`math_atan2`,message0:`%{BKY_MATH_ATAN2_TITLE}`,args0:[{type:`input_value`,name:`X`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_ATAN2_X}`},{type:`input_value`,name:`Y`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_NUMBER_ATAN2_Y}`}],inputsInline:!0,output:`Number`,style:`math_blocks`,tooltip:`%{BKY_MATH_ATAN2_TOOLTIP}`,helpUrl:`%{BKY_MATH_ATAN2_HELPURL}`}]);t.oh(`math_op_tooltip`,t.yh(`OP`,{ADD:`%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}`,MINUS:`%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}`,MULTIPLY:`%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}`,DIVIDE:`%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}`,POWER:`%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}`,ROOT:`%{BKY_MATH_SINGLE_TOOLTIP_ROOT}`,ABS:`%{BKY_MATH_SINGLE_TOOLTIP_ABS}`,NEG:`%{BKY_MATH_SINGLE_TOOLTIP_NEG}`,LN:`%{BKY_MATH_SINGLE_TOOLTIP_LN}`,LOG10:`%{BKY_MATH_SINGLE_TOOLTIP_LOG10}`,EXP:`%{BKY_MATH_SINGLE_TOOLTIP_EXP}`,POW10:`%{BKY_MATH_SINGLE_TOOLTIP_POW10}`,SIN:`%{BKY_MATH_TRIG_TOOLTIP_SIN}`,COS:`%{BKY_MATH_TRIG_TOOLTIP_COS}`,TAN:`%{BKY_MATH_TRIG_TOOLTIP_TAN}`,ASIN:`%{BKY_MATH_TRIG_TOOLTIP_ASIN}`,ACOS:`%{BKY_MATH_TRIG_TOOLTIP_ACOS}`,ATAN:`%{BKY_MATH_TRIG_TOOLTIP_ATAN}`,SUM:`%{BKY_MATH_ONLIST_TOOLTIP_SUM}`,MIN:`%{BKY_MATH_ONLIST_TOOLTIP_MIN}`,MAX:`%{BKY_MATH_ONLIST_TOOLTIP_MAX}`,AVERAGE:`%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}`,MEDIAN:`%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}`,MODE:`%{BKY_MATH_ONLIST_TOOLTIP_MODE}`,STD_DEV:`%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}`,RANDOM:`%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}`})),t.th(`math_is_divisibleby_mutator`,{mutationToDom:function(){var e=t.rc(`mutation`),n=this.getFieldValue(`PROPERTY`)===`DIVISIBLE_BY`;return e.setAttribute(`divisor_input`,String(n)),e},domToMutation:function(e){e=e.getAttribute(`divisor_input`)===`true`,this.updateShape_(e)},updateShape_:function(e){var t=this.getInput(`DIVISOR`);e?t||this.appendValueInput(`DIVISOR`).setCheck(`Number`):t&&this.removeInput(`DIVISOR`)}},function(){this.getField(`PROPERTY`).setValidator(function(e){e=e===`DIVISIBLE_BY`,this.getSourceBlock().updateShape_(e)})}),t.oh(`math_change_tooltip`,t.Ah(`%{BKY_MATH_CHANGE_TOOLTIP}`,`VAR`)),t.th(`math_modes_of_list_mutator`,{updateType_:function(e){e===`MODE`?this.outputConnection.setCheck(`Array`):this.outputConnection.setCheck(`Number`)},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`op`,this.getFieldValue(`OP`)),e},domToMutation:function(e){if(e=e.getAttribute(`op`),e===null)throw TypeError(`xmlElement had no op attribute`);this.updateType_(e)}},function(){this.getField(`OP`).setValidator(function(e){this.updateType_(e)}.bind(this))}),t.Ab(y);var b={blocks:y},x=t.yb([{type:`controls_repeat_ext`,message0:`%{BKY_CONTROLS_REPEAT_TITLE}`,args0:[{type:`input_value`,name:`TIMES`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_TIMES}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,tooltip:`%{BKY_CONTROLS_REPEAT_TOOLTIP}`,helpUrl:`%{BKY_CONTROLS_REPEAT_HELPURL}`},{type:`controls_repeat`,message0:`%{BKY_CONTROLS_REPEAT_TITLE}`,args0:[{type:`field_number`,name:`TIMES`,value:10,min:0,precision:1,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_TIMES}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,tooltip:`%{BKY_CONTROLS_REPEAT_TOOLTIP}`,helpUrl:`%{BKY_CONTROLS_REPEAT_HELPURL}`},{type:`controls_whileUntil`,message0:`%1 %2`,args0:[{type:`field_dropdown`,name:`MODE`,options:[[`%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}`,`WHILE`],[`%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}`,`UNTIL`]]},{type:`input_value`,name:`BOOL`,check:`Boolean`,ariaLabelText:`%{BKY_INPUT_LABEL_CONDITION}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_WHILEUNTIL_HELPURL}`,extensions:[`controls_whileUntil_tooltip`]},{type:`controls_for`,message0:`%{BKY_CONTROLS_FOR_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:null},{type:`input_value`,name:`FROM`,check:`Number`,align:`RIGHT`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_FROM}`},{type:`input_value`,name:`TO`,check:`Number`,align:`RIGHT`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_TO}`},{type:`input_value`,name:`BY`,check:`Number`,align:`RIGHT`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_BY}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],inputsInline:!0,previousStatement:null,nextStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_FOR_HELPURL}`,extensions:[`contextMenu_newGetVariableBlock`,`controls_for_tooltip`]},{type:`controls_forEach`,message0:`%{BKY_CONTROLS_FOREACH_TITLE}`,args0:[{type:`field_variable`,name:`VAR`,variable:null},{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:`%{BKY_INPUT_LABEL_LOOP_LIST}`}],message1:`%{BKY_CONTROLS_REPEAT_INPUT_DO} %1`,args1:[{type:`input_statement`,name:`DO`}],previousStatement:null,nextStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_FOREACH_HELPURL}`,extensions:[`contextMenu_newGetVariableBlock`,`controls_forEach_tooltip`]},{type:`controls_flow_statements`,message0:`%1`,args0:[{type:`field_dropdown`,name:`FLOW`,options:[[`%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK}`,`BREAK`],[`%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE}`,`CONTINUE`]]}],previousStatement:null,style:`loop_blocks`,helpUrl:`%{BKY_CONTROLS_FLOW_STATEMENTS_HELPURL}`,suppressPrefixSuffix:!0,extensions:[`controls_flow_tooltip`,`controls_flow_in_loop_check`]}]);t.oh(`controls_whileUntil_tooltip`,t.yh(`MODE`,{WHILE:`%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_WHILE}`,UNTIL:`%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}`})),t.oh(`controls_flow_tooltip`,t.yh(`FLOW`,{BREAK:`%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK}`,CONTINUE:`%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}`})),t.ph(`contextMenu_newGetVariableBlock`,{customContextMenu:function(e){if(!this.isInFlyout){var n=this.getField(`VAR`),r=n.getVariable().getName();this.isCollapsed()||r===null||(n={type:`variables_get`,fields:{VAR:n.saveState(!0)}},e.push({enabled:!0,text:t.C.VARIABLES_SET_CREATE_GET.replace(`%1`,r),callback:t.Pg(this,n)}))}}}),t.oh(`controls_for_tooltip`,t.Ah(`%{BKY_CONTROLS_FOR_TOOLTIP}`,`VAR`)),t.oh(`controls_forEach_tooltip`,t.Ah(`%{BKY_CONTROLS_FOREACH_TOOLTIP}`,`VAR`));var S=new Set([`controls_repeat`,`controls_repeat_ext`,`controls_forEach`,`controls_for`,`controls_whileUntil`]);t.ph(`controls_flow_in_loop_check`,{getSurroundLoop:function(){var e=this;do{if(S.has(e.type))return e;e=e.getSurroundParent()}while(e);return null},onchange:function(e){var n=this.workspace;if(n.isDragging&&!n.isDragging()&&(e.type===t.nm||e.type===t.Od)&&(e=!!this.getSurroundLoop(),this.setWarningText(e?null:t.C.CONTROLS_FLOW_STATEMENTS_WARNING),!this.isInFlyout))try{t.Qc=!1,this.setDisabledReason(!e,`CONTROL_FLOW_NOT_IN_LOOP`)}finally{t.Qc=!0}}}),t.Ab(x);var C={blocks:x,loopTypes:S},w=t.yb([{type:`logic_boolean`,message0:`%1`,args0:[{type:`field_dropdown`,name:`BOOL`,options:[[`%{BKY_LOGIC_BOOLEAN_TRUE}`,`TRUE`],[`%{BKY_LOGIC_BOOLEAN_FALSE}`,`FALSE`]]}],output:`Boolean`,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_BOOLEAN_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_BOOLEAN_HELPURL}`},{type:`controls_if`,message0:`%{BKY_CONTROLS_IF_MSG_IF} %1`,args0:[{type:`input_value`,name:`IF0`,check:`Boolean`}],message1:`%{BKY_CONTROLS_IF_MSG_THEN} %1`,args1:[{type:`input_statement`,name:`DO0`}],previousStatement:null,nextStatement:null,style:`logic_blocks`,helpUrl:`%{BKY_CONTROLS_IF_HELPURL}`,suppressPrefixSuffix:!0,mutator:`controls_if_mutator`,extensions:[`controls_if_tooltip`]},{type:`controls_ifelse`,message0:`%{BKY_CONTROLS_IF_MSG_IF} %1`,args0:[{type:`input_value`,name:`IF0`,check:`Boolean`}],message1:`%{BKY_CONTROLS_IF_MSG_THEN} %1`,args1:[{type:`input_statement`,name:`DO0`}],message2:`%{BKY_CONTROLS_IF_MSG_ELSE} %1`,args2:[{type:`input_statement`,name:`ELSE`}],previousStatement:null,nextStatement:null,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_TOOLTIP_2}`,helpUrl:`%{BKY_CONTROLS_IF_HELPURL}`,suppressPrefixSuffix:!0},{type:`logic_compare`,message0:`%1 %2 %3`,args0:[{type:`input_value`,name:`A`,ariaLabelText:`%{BKY_INPUT_LABEL_VALUE_A}`},{type:`field_dropdown`,name:`OP`,options:[[`=`,`EQ`,`%{BKY_LOGIC_COMPARE_EQ_ARIA}`],[`≠`,`NEQ`,`%{BKY_LOGIC_COMPARE_NEQ_ARIA}`],[`‏<`,`LT`,`%{BKY_LOGIC_COMPARE_LT_ARIA}`],[`‏≤`,`LTE`,`%{BKY_LOGIC_COMPARE_LTE_ARIA}`],[`‏>`,`GT`,`%{BKY_LOGIC_COMPARE_GT_ARIA}`],[`‏≥`,`GTE`,`%{BKY_LOGIC_COMPARE_GTE_ARIA}`]]},{type:`input_value`,name:`B`,ariaLabelText:`%{BKY_INPUT_LABEL_VALUE_B}`}],inputsInline:!0,output:`Boolean`,style:`logic_blocks`,helpUrl:`%{BKY_LOGIC_COMPARE_HELPURL}`,extensions:[`logic_compare`,`logic_op_tooltip`]},{type:`logic_operation`,message0:`%1 %2 %3`,args0:[{type:`input_value`,name:`A`,check:`Boolean`,ariaLabelText:`%{BKY_INPUT_LABEL_CONDITION_A}`},{type:`field_dropdown`,name:`OP`,options:[[`%{BKY_LOGIC_OPERATION_AND}`,`AND`],[`%{BKY_LOGIC_OPERATION_OR}`,`OR`]]},{type:`input_value`,name:`B`,check:`Boolean`,ariaLabelText:`%{BKY_INPUT_LABEL_CONDITION_B}`}],inputsInline:!0,output:`Boolean`,style:`logic_blocks`,helpUrl:`%{BKY_LOGIC_OPERATION_HELPURL}`,extensions:[`logic_op_tooltip`]},{type:`logic_negate`,message0:`%{BKY_LOGIC_NEGATE_TITLE}`,args0:[{type:`input_value`,name:`BOOL`,check:`Boolean`}],output:`Boolean`,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_NEGATE_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_NEGATE_HELPURL}`},{type:`logic_null`,message0:`%{BKY_LOGIC_NULL}`,output:null,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_NULL_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_NULL_HELPURL}`},{type:`logic_ternary`,message0:`%{BKY_LOGIC_TERNARY_CONDITION} %1`,args0:[{type:`input_value`,name:`IF`,check:`Boolean`}],message1:`%{BKY_LOGIC_TERNARY_IF_TRUE} %1`,args1:[{type:`input_value`,name:`THEN`}],message2:`%{BKY_LOGIC_TERNARY_IF_FALSE} %1`,args2:[{type:`input_value`,name:`ELSE`}],output:null,style:`logic_blocks`,tooltip:`%{BKY_LOGIC_TERNARY_TOOLTIP}`,helpUrl:`%{BKY_LOGIC_TERNARY_HELPURL}`,extensions:[`logic_ternary`]},{type:`controls_if_if`,message0:`%{BKY_CONTROLS_IF_IF_TITLE_IF}`,nextStatement:null,enableContextMenu:!1,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_IF_TOOLTIP}`},{type:`controls_if_elseif`,message0:`%{BKY_CONTROLS_IF_ELSEIF_TITLE_ELSEIF}`,previousStatement:null,nextStatement:null,enableContextMenu:!1,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}`},{type:`controls_if_else`,message0:`%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}`,previousStatement:null,enableContextMenu:!1,style:`logic_blocks`,tooltip:`%{BKY_CONTROLS_IF_ELSE_TOOLTIP}`}]);t.oh(`logic_op_tooltip`,t.yh(`OP`,{EQ:`%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}`,NEQ:`%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}`,LT:`%{BKY_LOGIC_COMPARE_TOOLTIP_LT}`,LTE:`%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}`,GT:`%{BKY_LOGIC_COMPARE_TOOLTIP_GT}`,GTE:`%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}`,AND:`%{BKY_LOGIC_OPERATION_TOOLTIP_AND}`,OR:`%{BKY_LOGIC_OPERATION_TOOLTIP_OR}`})),t.th(`controls_if_mutator`,{elseifCount_:0,elseCount_:0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=t.rc(`mutation`);return this.elseifCount_&&e.setAttribute(`elseif`,String(this.elseifCount_)),this.elseCount_&&e.setAttribute(`else`,`1`),e},domToMutation:function(e){this.elseifCount_=parseInt(e.getAttribute(`elseif`),10)||0,this.elseCount_=parseInt(e.getAttribute(`else`),10)||0,this.rebuildShape_()},saveExtraState:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=Object.create(null);return this.elseifCount_&&(e.elseIfCount=this.elseifCount_),this.elseCount_&&(e.hasElse=!0),e},loadExtraState:function(e){this.elseifCount_=e.elseIfCount||0,this.elseCount_=+!!e.hasElse,this.updateShape_()},decompose:function(e){var t=e.newBlock(`controls_if_if`);t.initSvg();var n=t.nextConnection;for(let t=1;t<=this.elseifCount_;t++){let t=e.newBlock(`controls_if_elseif`);t.initSvg(),n.connect(t.previousConnection),n=t.nextConnection}return this.elseCount_&&(e=e.newBlock(`controls_if_else`),e.initSvg(),n.connect(e.previousConnection)),t},compose:function(e){e=e.nextConnection.targetBlock(),this.elseCount_=this.elseifCount_=0;for(var t=[null],n=[null],r=null;e;){if(!e.isInsertionMarker())switch(e.type){case`controls_if_elseif`:this.elseifCount_++,t.push(e.valueConnection_),n.push(e.statementConnection_);break;case`controls_if_else`:this.elseCount_++,r=e.statementConnection_;break;default:throw TypeError(`Unknown block type: `+e.type)}e=e.getNextBlock()}this.updateShape_(),this.reconnectChildBlocks_(t,n,r)},saveConnections:function(e){e=e.nextConnection.targetBlock();for(var t=1;e;){if(!e.isInsertionMarker())switch(e.type){case`controls_if_elseif`:var n=this.getInput(`IF`+t);let r=this.getInput(`DO`+t);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=r&&r.connection.targetConnection,t++;break;case`controls_if_else`:n=this.getInput(`ELSE`),e.statementConnection_=n&&n.connection.targetConnection;break;default:throw TypeError(`Unknown block type: `+e.type)}e=e.getNextBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput(`ELSE`)&&(n=this.getInput(`ELSE`).connection.targetConnection);for(let n=1;this.getInput(`IF`+n);n++){let r=this.getInput(`IF`+n),i=this.getInput(`DO`+n);e.push(r.connection.targetConnection),t.push(i.connection.targetConnection)}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput(`ELSE`)&&this.removeInput(`ELSE`);for(var e=1;this.getInput(`IF`+e);e++)this.removeInput(`IF`+e),this.removeInput(`DO`+e);for(e=1;e<=this.elseifCount_;e++)this.appendValueInput(`IF`+e).setCheck(`Boolean`).appendField(t.C.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput(`DO`+e).appendField(t.C.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput(`ELSE`).appendField(t.C.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,n){for(let n=1;n<=this.elseifCount_;n++){let r;(r=e[n])==null||r.reconnect(this,`IF`+n);let i;(i=t[n])==null||i.reconnect(this,`DO`+n)}n==null||n.reconnect(this,`ELSE`)}},null,[`controls_if_elseif`,`controls_if_else`]),t.oh(`controls_if_tooltip`,function(){this.setTooltip(function(){if(this.elseifCount_||this.elseCount_){if(!this.elseifCount_&&this.elseCount_)return t.C.CONTROLS_IF_TOOLTIP_2;if(this.elseifCount_&&!this.elseCount_)return t.C.CONTROLS_IF_TOOLTIP_3;if(this.elseifCount_&&this.elseCount_)return t.C.CONTROLS_IF_TOOLTIP_4}else return t.C.CONTROLS_IF_TOOLTIP_1;return``}.bind(this))});var T={onchange:function(e){this.prevBlocks_||=[null,null];var n=this.getInputTargetBlock(`A`),r=this.getInputTargetBlock(`B`);n&&r&&!this.workspace.connectionChecker.doTypeChecks(n.outputConnection,r.outputConnection)&&(t.B(e.group),e=this.prevBlocks_[0],e!==n&&(n.unplug(),!e||e.isDisposed()||e.isShadow()||this.getInput(`A`).connection.connect(e.outputConnection)),n=this.prevBlocks_[1],n!==r&&(r.unplug(),!n||n.isDisposed()||n.isShadow()||this.getInput(`B`).connection.connect(n.outputConnection)),this.bumpNeighbours(),t.B(!1)),this.prevBlocks_[0]=this.getInputTargetBlock(`A`),this.prevBlocks_[1]=this.getInputTargetBlock(`B`)}};t.oh(`logic_compare`,function(){this.mixin(T)}),t.ph(`logic_ternary`,{prevParentConnection_:null,onchange:function(e){var n=this.getInputTargetBlock(`THEN`),r=this.getInputTargetBlock(`ELSE`),i=this.outputConnection.targetConnection;if((n||r)&&i)for(let a=0;a<2;a++){let o=a===1?n:r;o&&!o.workspace.connectionChecker.doTypeChecks(o.outputConnection,i)&&(t.B(e.group),i===this.prevParentConnection_?(this.unplug(),i.getSourceBlock().bumpNeighbours()):(o.unplug(),o.bumpNeighbours()),t.B(!1))}this.prevParentConnection_=i}}),t.Ab(w);var E={blocks:w},D=t.yb([{type:`lists_create_empty`,message0:`%{BKY_LISTS_CREATE_EMPTY_TITLE}`,output:`Array`,style:`list_blocks`,tooltip:`%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}`,helpUrl:`%{BKY_LISTS_CREATE_EMPTY_HELPURL}`},{type:`lists_repeat`,message0:`%{BKY_LISTS_REPEAT_TITLE}`,args0:[{type:`input_value`,name:`ITEM`,ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_REPEAT_ITEM}`},{type:`input_value`,name:`NUM`,check:`Number`,ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_REPEAT_NUM}`}],output:`Array`,style:`list_blocks`,tooltip:`%{BKY_LISTS_REPEAT_TOOLTIP}`,helpUrl:`%{BKY_LISTS_REPEAT_HELPURL}`},{type:`lists_reverse`,message0:`%{BKY_LISTS_REVERSE_MESSAGE0}`,args0:[{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_TO_CHANGE}`}],output:`Array`,inputsInline:!0,style:`list_blocks`,tooltip:`%{BKY_LISTS_REVERSE_TOOLTIP}`,helpUrl:`%{BKY_LISTS_REVERSE_HELPURL}`},{type:`lists_isEmpty`,message0:`%{BKY_LISTS_ISEMPTY_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:[`String`,`Array`],ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_TO_CHECK}`}],output:`Boolean`,style:`list_blocks`,tooltip:`%{BKY_LISTS_ISEMPTY_TOOLTIP}`,helpUrl:`%{BKY_LISTS_ISEMPTY_HELPURL}`},{type:`lists_length`,message0:`%{BKY_LISTS_LENGTH_TITLE}`,args0:[{type:`input_value`,name:`VALUE`,check:[`String`,`Array`],ariaLabelText:`%{BKY_INPUT_LABEL_LISTS_TO_CHECK}`}],output:`Number`,style:`list_blocks`,tooltip:`%{BKY_LISTS_LENGTH_TOOLTIP}`,helpUrl:`%{BKY_LISTS_LENGTH_HELPURL}`}]);D.lists_create_with={init:function(){this.setHelpUrl(t.C.LISTS_CREATE_WITH_HELPURL),this.setStyle(`list_blocks`),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,`Array`),this.setMutator(new t.sh([`lists_create_with_item`],this)),this.setTooltip(t.C.LISTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){if(e=e.getAttribute(`items`),!e)throw TypeError(`element did not have items`);this.itemCount_=parseInt(e,10),this.updateShape_()},saveExtraState:function(){return{itemCount:this.itemCount_}},loadExtraState:function(e){this.itemCount_=e.itemCount,this.updateShape_()},decompose:function(e){var t=e.newBlock(`lists_create_with_container`);t.initSvg();var n=t.getInput(`STACK`).connection;for(let t=0;tt.C.LISTS_INDEX_OF_TOOLTIP.replace(`%1`,this.workspace.options.oneBasedIndex?`0`:`-1`))}},D.lists_getIndex={init:function(){var e=[[t.C.LISTS_GET_INDEX_GET,`GET`],[t.C.LISTS_GET_INDEX_GET_REMOVE,`GET_REMOVE`],[t.C.LISTS_GET_INDEX_REMOVE,`REMOVE`]];this.WHERE_OPTIONS=[[t.C.LISTS_GET_INDEX_FROM_START,`FROM_START`],[t.C.LISTS_GET_INDEX_FROM_END,`FROM_END`],[t.C.LISTS_GET_INDEX_FIRST,`FIRST`],[t.C.LISTS_GET_INDEX_LAST,`LAST`],[t.C.LISTS_GET_INDEX_RANDOM,`RANDOM`]],this.setHelpUrl(t.C.LISTS_GET_INDEX_HELPURL),this.setStyle(`list_blocks`),e=t.lh({type:`field_dropdown`,options:e}),e.setValidator(function(e){e=e===`REMOVE`,this.getSourceBlock().updateStatement_(e)}),this.appendValueInput(`VALUE`).setCheck(`Array`).appendField(t.C.LISTS_GET_INDEX_INPUT_IN_LIST).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_TO_CHECK),this.appendDummyInput().appendField(e,`MODE`).appendField(``,`SPACE`),e=t.lh({type:`field_dropdown`,options:this.WHERE_OPTIONS}),e.setValidator(function(e){var t=this.getValue();e=e===`FROM_START`||e===`FROM_END`,e!==(t===`FROM_START`||t===`FROM_END`)&&this.getSourceBlock().updateAt_(e)}),this.appendDummyInput().appendField(e,`WHERE`),this.appendDummyInput(`AT`),t.C.LISTS_GET_INDEX_TAIL&&this.appendDummyInput(`TAIL`).appendField(t.C.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0),this.setTooltip(()=>{var e=this.getFieldValue(`MODE`),n=this.getFieldValue(`WHERE`),r=``;switch(e+` `+n){case`GET FROM_START`:case`GET FROM_END`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case`GET FIRST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_FIRST;break;case`GET LAST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_LAST;break;case`GET RANDOM`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case`GET_REMOVE FROM_START`:case`GET_REMOVE FROM_END`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case`GET_REMOVE FIRST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST;break;case`GET_REMOVE LAST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST;break;case`GET_REMOVE RANDOM`:r=t.C.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;break;case`REMOVE FROM_START`:case`REMOVE FROM_END`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM;break;case`REMOVE FIRST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST;break;case`REMOVE LAST`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST;break;case`REMOVE RANDOM`:r=t.C.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM}return(n===`FROM_START`||n===`FROM_END`)&&(r+=` `+(n===`FROM_START`?t.C.LISTS_INDEX_FROM_START_TOOLTIP:t.C.LISTS_INDEX_FROM_END_TOOLTIP).replace(`%1`,this.workspace.options.oneBasedIndex?`#1`:`#0`)),r})},mutationToDom:function(){var e=t.rc(`mutation`);e.setAttribute(`statement`,String(!this.outputConnection));var n=this.getInput(`AT`)instanceof t.Nn;return e.setAttribute(`at`,String(n)),e},domToMutation:function(e){var t=e.getAttribute(`statement`)===`true`;this.updateStatement_(t),e=e.getAttribute(`at`)!==`false`,this.updateAt_(e)},saveExtraState:function(){return this.outputConnection?null:{isStatement:!0}},loadExtraState:function(e){e.isStatement?this.updateStatement_(!0):typeof e==`string`&&this.domToMutation(t.uc(e))},updateStatement_:function(e){e!==!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput(`AT`),this.removeInput(`ORDINAL`,!0),e?(this.appendValueInput(`AT`).setCheck(`Number`).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`),t.C.LISTS_GET_INDEX_TAIL&&this.moveInputBefore(`TAIL`,null)}},D.lists_setIndex={init:function(){var e=[[t.C.LISTS_SET_INDEX_SET,`SET`],[t.C.LISTS_SET_INDEX_INSERT,`INSERT`]];this.WHERE_OPTIONS=[[t.C.LISTS_GET_INDEX_FROM_START,`FROM_START`],[t.C.LISTS_GET_INDEX_FROM_END,`FROM_END`],[t.C.LISTS_GET_INDEX_FIRST,`FIRST`],[t.C.LISTS_GET_INDEX_LAST,`LAST`],[t.C.LISTS_GET_INDEX_RANDOM,`RANDOM`]],this.setHelpUrl(t.C.LISTS_SET_INDEX_HELPURL),this.setStyle(`list_blocks`),this.appendValueInput(`LIST`).setCheck(`Array`).appendField(t.C.LISTS_SET_INDEX_INPUT_IN_LIST).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_TO_CHECK),e=t.lh({type:`field_dropdown`,options:e}),this.appendDummyInput().appendField(e,`MODE`).appendField(``,`SPACE`),e=t.lh({type:`field_dropdown`,options:this.WHERE_OPTIONS}),e.setValidator(function(e){var t=this.getValue();e=e===`FROM_START`||e===`FROM_END`,e!==(t===`FROM_START`||t===`FROM_END`)&&this.getSourceBlock().updateAt_(e)}),this.appendDummyInput().appendField(e,`WHERE`),this.appendDummyInput(`AT`),this.appendValueInput(`TO`).appendField(t.C.LISTS_SET_INDEX_INPUT_TO).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_VALUE_TO_SET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(t.C.LISTS_SET_INDEX_TOOLTIP),this.updateAt_(!0),this.setTooltip(()=>{var e=this.getFieldValue(`MODE`),n=this.getFieldValue(`WHERE`),r=``;switch(e+` `+n){case`SET FROM_START`:case`SET FROM_END`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_FROM;break;case`SET FIRST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_FIRST;break;case`SET LAST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_LAST;break;case`SET RANDOM`:r=t.C.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM;break;case`INSERT FROM_START`:case`INSERT FROM_END`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM;break;case`INSERT FIRST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST;break;case`INSERT LAST`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST;break;case`INSERT RANDOM`:r=t.C.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM}return(n===`FROM_START`||n===`FROM_END`)&&(r+=` `+t.C.LISTS_INDEX_FROM_START_TOOLTIP.replace(`%1`,this.workspace.options.oneBasedIndex?`#1`:`#0`)),r})},mutationToDom:function(){var e=t.rc(`mutation`),n=this.getInput(`AT`)instanceof t.Nn;return e.setAttribute(`at`,String(n)),e},domToMutation:function(e){e=e.getAttribute(`at`)!==`false`,this.updateAt_(e)},saveExtraState:function(){return null},loadExtraState:function(){},updateAt_:function(e){this.removeInput(`AT`),this.removeInput(`ORDINAL`,!0),e?(this.appendValueInput(`AT`).setCheck(`Number`).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`),this.moveInputBefore(`AT`,`TO`),this.getInput(`ORDINAL`)&&this.moveInputBefore(`ORDINAL`,`TO`)}},D.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[t.C.LISTS_GET_SUBLIST_START_FROM_START,`FROM_START`],[t.C.LISTS_GET_SUBLIST_START_FROM_END,`FROM_END`],[t.C.LISTS_GET_SUBLIST_START_FIRST,`FIRST`]],this.WHERE_OPTIONS_2=[[t.C.LISTS_GET_SUBLIST_END_FROM_START,`FROM_START`],[t.C.LISTS_GET_SUBLIST_END_FROM_END,`FROM_END`],[t.C.LISTS_GET_SUBLIST_END_LAST,`LAST`]],this.setHelpUrl(t.C.LISTS_GET_SUBLIST_HELPURL),this.setStyle(`list_blocks`),this.appendValueInput(`LIST`).setCheck(`Array`).appendField(t.C.LISTS_GET_SUBLIST_INPUT_IN_LIST).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_TO_CHECK);var e=e=>{var n=t.lh({type:`field_dropdown`,options:this[`WHERE_OPTIONS_`+e]});return n.setValidator(function(t){var n=this.getValue();t=t===`FROM_START`||t===`FROM_END`,t!==(n===`FROM_START`||n===`FROM_END`)&&this.getSourceBlock().updateAt_(e,t)}),n};this.appendDummyInput(`WHERE1_INPUT`).appendField(e(1),`WHERE1`),this.appendDummyInput(`AT1`),this.appendDummyInput(`WHERE2_INPUT`).appendField(e(2),`WHERE2`),this.appendDummyInput(`AT2`),t.C.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput(`TAIL`).appendField(t.C.LISTS_GET_SUBLIST_TAIL),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(t.C.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=t.rc(`mutation`),n=this.getInput(`AT1`)instanceof t.Nn;return e.setAttribute(`at1`,String(n)),n=this.getInput(`AT2`)instanceof t.Nn,e.setAttribute(`at2`,String(n)),e},domToMutation:function(e){var t=e.getAttribute(`at1`)===`true`;e=e.getAttribute(`at2`)===`true`,this.updateAt_(1,t),this.updateAt_(2,e)},saveExtraState:function(){return null},loadExtraState:function(){},updateAt_:function(e,n){this.removeInput(`AT`+e),this.removeInput(`ORDINAL`+e,!0),n?(this.appendValueInput(`AT`+e).setCheck(`Number`).setAriaLabelProvider(e===1?t.C.INPUT_LABEL_LISTS_START_POSITION:t.C.INPUT_LABEL_LISTS_END_POSITION),t.C.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput(`ORDINAL`+e).appendField(t.C.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput(`AT`+e),e===1&&(this.moveInputBefore(`AT1`,`WHERE2_INPUT`),this.getInput(`ORDINAL1`)&&this.moveInputBefore(`ORDINAL1`,`WHERE2_INPUT`)),t.C.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore(`TAIL`,null)}},D.lists_sort={init:function(){this.jsonInit({message0:`%{BKY_LISTS_SORT_TITLE}`,args0:[{type:`field_dropdown`,name:`TYPE`,options:[[`%{BKY_LISTS_SORT_TYPE_NUMERIC}`,`NUMERIC`],[`%{BKY_LISTS_SORT_TYPE_TEXT}`,`TEXT`],[`%{BKY_LISTS_SORT_TYPE_IGNORECASE}`,`IGNORE_CASE`]]},{type:`field_dropdown`,name:`DIRECTION`,options:[[`%{BKY_LISTS_SORT_ORDER_ASCENDING}`,`1`],[`%{BKY_LISTS_SORT_ORDER_DESCENDING}`,`-1`]]},{type:`input_value`,name:`LIST`,check:`Array`,ariaLabelText:t.C.INPUT_LABEL_LISTS_TO_CHANGE}],output:`Array`,style:`list_blocks`,tooltip:`%{BKY_LISTS_SORT_TOOLTIP}`,helpUrl:`%{BKY_LISTS_SORT_HELPURL}`})}},D.lists_split={init:function(){var e=t.lh({type:`field_dropdown`,options:[[t.C.LISTS_SPLIT_LIST_FROM_TEXT,`SPLIT`],[t.C.LISTS_SPLIT_TEXT_FROM_LIST,`JOIN`]]});if(!e)throw Error(`field_dropdown not found`);e.setValidator(e=>{this.updateType_(e)}),this.setHelpUrl(t.C.LISTS_SPLIT_HELPURL),this.setStyle(`list_blocks`),this.appendValueInput(`INPUT`).setCheck(`String`).appendField(e,`MODE`).setAriaLabelProvider(()=>{var e=this.getFieldValue(`MODE`);if(e===`SPLIT`)return t.C.INPUT_LABEL_LISTS_LIST_FROM_TEXT;if(e===`JOIN`)return t.C.INPUT_LABEL_LISTS_TEXT_FROM_LIST}),this.appendValueInput(`DELIM`).setCheck(`String`).appendField(t.C.INPUT_LABEL_LISTS_DELIMITER).setAriaLabelProvider(t.C.INPUT_LABEL_LISTS_SPLIT_WITH_DELIMITER),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setTooltip(()=>{var e=this.getFieldValue(`MODE`);if(e===`SPLIT`)return t.C.LISTS_SPLIT_TOOLTIP_SPLIT;if(e===`JOIN`)return t.C.LISTS_SPLIT_TOOLTIP_JOIN;throw Error(`Unknown mode: `+e)})},updateType_:function(e){if(this.getFieldValue(`MODE`)!==e){let e=this.getInput(`INPUT`).connection;e.setShadowDom(null);let t=e.targetBlock();t&&(e.disconnect(),t.isShadow()?t.dispose(!1):this.bumpNeighbours())}e===`SPLIT`?(this.outputConnection.setCheck(`Array`),this.getInput(`INPUT`).setCheck(`String`)):(this.outputConnection.setCheck(`String`),this.getInput(`INPUT`).setCheck(`Array`))},mutationToDom:function(){var e=t.rc(`mutation`);return e.setAttribute(`mode`,this.getFieldValue(`MODE`)),e},domToMutation:function(e){this.updateType_(e.getAttribute(`mode`))},saveExtraState:function(){return{mode:this.getFieldValue(`MODE`)}},loadExtraState:function(e){this.updateType_(e.mode)}},t.Ab(D);var ee={blocks:D};return t.__chunk_blocks={blocks:Object.assign({},D,w,x,y,m,u,c,o),lists:ee,logic:E,loops:C,math:b,procedures:v,texts:p,variables:l,variablesDynamic:s},t.__chunk_blocks.__namespace__=t,t.__chunk_blocks})}));a();var{blocks:ee,lists:te,logic:ne,loops:re,math:ie,procedures:ae,texts:oe,variables:se,variablesDynamic:ce}=e(D(),1).default,le=n(((e,t)=>{(function(n,r){if(typeof e==`object`)t.exports=r();else{var i=r();for(var a in i)n.Blockly.Msg[a]=i[a]}})(e,function(){var e=e||{Msg:Object.create(null)};return e.Msg.ADD_COMMENT=`Add Comment`,e.Msg.ALT_KEY=`Alt`,e.Msg.ANNOUNCE_MOVE_AFTER=`Moving %1 after %2.`,e.Msg.ANNOUNCE_MOVE_AROUND=`Moving %1 around %2.`,e.Msg.ANNOUNCE_MOVE_BEFORE=`Moving %1 before %2.`,e.Msg.ANNOUNCE_MOVE_CANCELED=`Canceled movement.`,e.Msg.ANNOUNCE_MOVE_INSIDE=`Moving %1 inside %2.`,e.Msg.ANNOUNCE_MOVE_OF=`%1 of %2`,e.Msg.ANNOUNCE_MOVE_TO=`Moving %1 to %2.`,e.Msg.ANNOUNCE_MOVE_WORKSPACE=`Moving %1 on workspace.`,e.Msg.ARIA_LABEL_ADD_ELSE_IF=`Add else if`,e.Msg.ARIA_LABEL_ADD_INPUT=`Add input`,e.Msg.ARIA_LABEL_ADD_LIST_ITEM=`Add list item`,e.Msg.ARIA_LABEL_ADD_TEXT=`Add text`,e.Msg.ARIA_LABEL_BUTTON=`button`,e.Msg.ARIA_LABEL_COMMENT=`Comment`,e.Msg.ARIA_LABEL_COMMENT_COLLAPSE=`Collapse Comment`,e.Msg.ARIA_LABEL_COMMENT_EXPAND=`Expand Comment`,e.Msg.ARIA_LABEL_FIELD_ANGLE=`%1 degrees`,e.Msg.ARIA_LABEL_HEADING=`heading`,e.Msg.ARIA_LABEL_REMOVE_ELSE_IF=`Remove else if`,e.Msg.ARIA_LABEL_REMOVE_INPUT=`Remove input`,e.Msg.ARIA_LABEL_REMOVE_LIST_ITEM=`Remove list item`,e.Msg.ARIA_LABEL_REMOVE_TEXT=`Remove text`,e.Msg.ARIA_LABEL_TRASH_EMPTY=`Trash, currently empty`,e.Msg.ARIA_TYPE_FIELD_ANGLE=`angle`,e.Msg.ARIA_TYPE_FIELD_BITMAP=`pixel image`,e.Msg.ARIA_TYPE_FIELD_CHECKBOX=`checkbox`,e.Msg.ARIA_TYPE_FIELD_COLOUR=`color`,e.Msg.ARIA_TYPE_FIELD_DATE=`date`,e.Msg.ARIA_TYPE_FIELD_DROPDOWN=`dropdown`,e.Msg.ARIA_TYPE_FIELD_GRID=`grid dropdown`,e.Msg.ARIA_TYPE_FIELD_IMAGE=`image`,e.Msg.ARIA_TYPE_FIELD_INPUT=`input`,e.Msg.ARIA_TYPE_FIELD_NUMBER=`number`,e.Msg.ARIA_TYPE_FIELD_TEXT_INPUT=`text`,e.Msg.ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT=`input name`,e.Msg.ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE=`function name`,e.Msg.BACKSPACE_KEY=`Backspace`,e.Msg.BLOCK_LABEL_BEGIN_PREFIX=`Begin %1`,e.Msg.BLOCK_LABEL_BEGIN_STACK=`Begin stack`,e.Msg.BLOCK_LABEL_COLLAPSED=`collapsed`,e.Msg.BLOCK_LABEL_CONTAINER=`container`,e.Msg.BLOCK_LABEL_DISABLED=`disabled`,e.Msg.BLOCK_LABEL_HAS_BRANCHES=`has %1 branches`,e.Msg.BLOCK_LABEL_HAS_INPUT=`has input`,e.Msg.BLOCK_LABEL_HAS_INPUTS=`has inputs`,e.Msg.BLOCK_LABEL_REPLACEABLE=`replaceable`,e.Msg.BLOCK_LABEL_STACK_BLOCKS=`%1 stack blocks`,e.Msg.BLOCK_LABEL_STATEMENT=`statement`,e.Msg.BLOCK_LABEL_TOOLBOX_CATEGORY=`%1 category`,e.Msg.BLOCK_LABEL_VALUE=`value`,e.Msg.BUBBLE_LABEL_COMMENT=`Comment: %1`,e.Msg.BUBBLE_LABEL_DEFAULT=`Bubble`,e.Msg.BUBBLE_LABEL_WARNING=`Warning: %1`,e.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE=`Can't delete the variable '%1' because it's part of the definition of the function '%2'`,e.Msg.CAPS_LOCK_KEY=`Caps Lock`,e.Msg.CHANGE_VALUE_TITLE=`Change value:`,e.Msg.CHROME_OS=`ChromeOS`,e.Msg.CLEAN_UP=`Clean up Blocks`,e.Msg.CLOSE=`Close`,e.Msg.CLOSE_BACKPACK=`Close backpack`,e.Msg.COLLAPSED_WARNINGS_WARNING=`Collapsed blocks contain warnings.`,e.Msg.COLLAPSE_ALL=`Collapse Blocks`,e.Msg.COLLAPSE_BLOCK=`Collapse Block`,e.Msg.COLOUR_BLEND_COLOUR1=`colour 1`,e.Msg.COLOUR_BLEND_COLOUR2=`colour 2`,e.Msg.COLOUR_BLEND_HELPURL=`https://meyerweb.com/eric/tools/color-blend/#:::rgbp`,e.Msg.COLOUR_BLEND_RATIO=`ratio`,e.Msg.COLOUR_BLEND_TITLE=`blend`,e.Msg.COLOUR_BLEND_TOOLTIP=`Blends two colours together with a given ratio (0.0 - 1.0).`,e.Msg.COLOUR_PICKER_HELPURL=`https://en.wikipedia.org/wiki/Color`,e.Msg.COLOUR_PICKER_TOOLTIP=`Choose a colour from the palette.`,e.Msg.COLOUR_RANDOM_HELPURL=`http://randomcolour.com`,e.Msg.COLOUR_RANDOM_TITLE=`random colour`,e.Msg.COLOUR_RANDOM_TOOLTIP=`Choose a colour at random.`,e.Msg.COLOUR_RGB_BLUE=`blue`,e.Msg.COLOUR_RGB_GREEN=`green`,e.Msg.COLOUR_RGB_HELPURL=`https://www.december.com/html/spec/colorpercompact.html`,e.Msg.COLOUR_RGB_RED=`red`,e.Msg.COLOUR_RGB_TITLE=`colour with`,e.Msg.COLOUR_RGB_TOOLTIP=`Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.`,e.Msg.COMMAND_KEY=`Command`,e.Msg.CONTEXT_MENU_KEY=`≣ Menu`,e.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#loop-termination-blocks`,e.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK=`break out of loop`,e.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE=`continue with next iteration of loop`,e.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK=`Break out of the containing loop.`,e.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE=`Skip the rest of this loop, and continue with the next iteration.`,e.Msg.CONTROLS_FLOW_STATEMENTS_WARNING=`Warning: This block may only be used within a loop.`,e.Msg.CONTROLS_FOREACH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#for-each`,e.Msg.CONTROLS_FOREACH_TITLE=`for each item %1 in list %2`,e.Msg.CONTROLS_FOREACH_TOOLTIP=`For each item in a list, set the variable '%1' to the item, and then do some statements.`,e.Msg.CONTROLS_FOR_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#count-with`,e.Msg.CONTROLS_FOR_TITLE=`count with %1 from %2 to %3 by %4`,e.Msg.CONTROLS_FOR_TOOLTIP=`Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.`,e.Msg.CONTROLS_IF_ELSEIF_TOOLTIP=`Add a condition to the if block.`,e.Msg.CONTROLS_IF_ELSE_TOOLTIP=`Add a final, catch-all condition to the if block.`,e.Msg.CONTROLS_IF_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/IfElse`,e.Msg.CONTROLS_IF_IF_TOOLTIP=`Add, remove, or reorder sections to reconfigure this if block.`,e.Msg.CONTROLS_IF_MSG_ELSE=`else`,e.Msg.CONTROLS_IF_MSG_ELSEIF=`else if`,e.Msg.CONTROLS_IF_MSG_IF=`if`,e.Msg.CONTROLS_IF_TOOLTIP_1=`If a value is true, then do some statements.`,e.Msg.CONTROLS_IF_TOOLTIP_2=`If a value is true, then do the first block of statements. Otherwise, do the second block of statements.`,e.Msg.CONTROLS_IF_TOOLTIP_3=`If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.`,e.Msg.CONTROLS_IF_TOOLTIP_4=`If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.`,e.Msg.CONTROLS_REPEAT_HELPURL=`https://en.wikipedia.org/wiki/For_loop`,e.Msg.CONTROLS_REPEAT_INPUT_DO=`do`,e.Msg.CONTROLS_REPEAT_TITLE=`repeat %1 times`,e.Msg.CONTROLS_REPEAT_TOOLTIP=`Do some statements several times.`,e.Msg.CONTROLS_WHILEUNTIL_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#repeat`,e.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL=`repeat until`,e.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE=`repeat while`,e.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL=`While a value is false, then do some statements.`,e.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE=`While a value is true, then do some statements.`,e.Msg.CONTROL_KEY=`Control`,e.Msg.COPY_ALL_TO_BACKPACK=`Copy All Blocks to Backpack`,e.Msg.COPY_SHORTCUT=`Copy`,e.Msg.COPY_TO_BACKPACK=`Copy to Backpack`,e.Msg.CURRENT_BLOCK_ANNOUNCEMENT=`Current block: %1`,e.Msg.CUT_SHORTCUT=`Cut`,e.Msg.DELETE_ALL_BLOCKS=`Delete all %1 blocks?`,e.Msg.DELETE_BLOCK=`Delete Block`,e.Msg.DELETE_KEY=`Delete`,e.Msg.DELETE_VARIABLE=`Delete the '%1' variable`,e.Msg.DELETE_VARIABLE_CONFIRMATION=`Delete %1 uses of the '%2' variable?`,e.Msg.DELETE_X_BLOCKS=`Delete %1 Blocks`,e.Msg.DIALOG_CANCEL=`Cancel`,e.Msg.DIALOG_OK=`OK`,e.Msg.DISABLE_BLOCK=`Disable Block`,e.Msg.DUPLICATE_BLOCK=`Duplicate`,e.Msg.DUPLICATE_COMMENT=`Duplicate Comment`,e.Msg.EDIT_BLOCK_CONTENTS=`Edit Block contents`,e.Msg.EMPTY_BACKPACK=`Empty Backpack`,e.Msg.ENABLE_BLOCK=`Enable Block`,e.Msg.END_KEY=`End`,e.Msg.ENTER_KEY=`Enter`,e.Msg.ESCAPE=`Escape`,e.Msg.EXPAND_ALL=`Expand Blocks`,e.Msg.EXPAND_BLOCK=`Expand Block`,e.Msg.EXTERNAL_INPUTS=`External Inputs`,e.Msg.FIELD_BITMAP_ARIA_VALUE=`%1 by %2, %3 pixels on`,e.Msg.FIELD_BITMAP_BUTTON_LABEL_CLEAR=`Clear`,e.Msg.FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE=`Randomize`,e.Msg.FIELD_BITMAP_PIXEL_LABEL=`%1, row %2, column %3`,e.Msg.FIELD_BITMAP_PIXEL_OFF=`off`,e.Msg.FIELD_BITMAP_PIXEL_ON=`on`,e.Msg.FIELD_LABEL_CHECKBOX_CHECKED=`Checked`,e.Msg.FIELD_LABEL_CHECKBOX_UNCHECKED=`Not checked`,e.Msg.FIELD_LABEL_EDIT_PREFIX=`Edit %1`,e.Msg.FIELD_LABEL_EMPTY=`empty`,e.Msg.FIELD_LABEL_OPTION_INDEX=`Option %1`,e.Msg.FIELD_LABEL_VARIABLE=`Variable '%1'`,e.Msg.FIELD_MULTILINEINPUT_FINISH_EDITING=`Finish editing`,e.Msg.FIELD_MULTILINEINPUT_NEW_LINE=`New line`,e.Msg.HELP=`Help`,e.Msg.HELP_PROMPT=`Press %1 for help on keyboard controls.`,e.Msg.HOME_KEY=`Home`,e.Msg.ICON_LABEL_COMMENT_CLOSED=`Open Comment`,e.Msg.ICON_LABEL_COMMENT_OPEN=`Close Comment`,e.Msg.ICON_LABEL_DEFAULT=`Icon`,e.Msg.ICON_LABEL_MUTATOR_CLOSED=`Edit this block`,e.Msg.ICON_LABEL_MUTATOR_OPEN=`Close block editor`,e.Msg.ICON_LABEL_WARNING_CLOSED=`Open Warning`,e.Msg.ICON_LABEL_WARNING_OPEN=`Close Warning`,e.Msg.INLINE_INPUTS=`Inline Inputs`,e.Msg.INPUT_LABEL_CONDITION=`condition`,e.Msg.INPUT_LABEL_CONDITION_A=`first condition`,e.Msg.INPUT_LABEL_CONDITION_B=`second condition`,e.Msg.INPUT_LABEL_EMPTY=`Empty`,e.Msg.INPUT_LABEL_END_STATEMENT=`End %1`,e.Msg.INPUT_LABEL_INDEX=`input %1`,e.Msg.INPUT_LABEL_LISTS_CREATE_WITH_ITEM=`value %1`,e.Msg.INPUT_LABEL_LISTS_DELIMITER=`delimiter`,e.Msg.INPUT_LABEL_LISTS_END_POSITION=`end position`,e.Msg.INPUT_LABEL_LISTS_LIST_FROM_TEXT=`text to split`,e.Msg.INPUT_LABEL_LISTS_POSITION=`position within list`,e.Msg.INPUT_LABEL_LISTS_REPEAT_ITEM=`value to repeat`,e.Msg.INPUT_LABEL_LISTS_REPEAT_NUM=`number of times to repeat`,e.Msg.INPUT_LABEL_LISTS_START_POSITION=`start position`,e.Msg.INPUT_LABEL_LISTS_TEXT_FROM_LIST=`list to join`,e.Msg.INPUT_LABEL_LISTS_TO_CHANGE=`list to change`,e.Msg.INPUT_LABEL_LISTS_TO_CHECK=`list to check`,e.Msg.INPUT_LABEL_LISTS_VALUE_TO_SET=`value to set`,e.Msg.INPUT_LABEL_LOOP_BY=`increment`,e.Msg.INPUT_LABEL_LOOP_FROM=`starting number`,e.Msg.INPUT_LABEL_LOOP_LIST=`list to iterate over`,e.Msg.INPUT_LABEL_LOOP_TIMES=`number of times to repeat`,e.Msg.INPUT_LABEL_LOOP_TO=`ending number`,e.Msg.INPUT_LABEL_MATH_CHANGE_BY=`amount to change by`,e.Msg.INPUT_LABEL_MATH_CONSTRAIN_VALUE=`number to constrain`,e.Msg.INPUT_LABEL_MATH_DIVIDEND=`dividend`,e.Msg.INPUT_LABEL_MATH_DIVISOR=`divisor`,e.Msg.INPUT_LABEL_NUMBER=`number`,e.Msg.INPUT_LABEL_NUMBER_A=`first number`,e.Msg.INPUT_LABEL_NUMBER_ATAN2_X=`x coordinate`,e.Msg.INPUT_LABEL_NUMBER_ATAN2_Y=`y coordinate`,e.Msg.INPUT_LABEL_NUMBER_B=`second number`,e.Msg.INPUT_LABEL_NUMBER_LIST=`list of numbers`,e.Msg.INPUT_LABEL_NUMBER_MAX=`maximum`,e.Msg.INPUT_LABEL_NUMBER_MIN=`minimum`,e.Msg.INPUT_LABEL_NUMBER_TO_CHECK=`number to check`,e.Msg.INPUT_LABEL_STATEMENT=`statement position`,e.Msg.INPUT_LABEL_TEXT_APPEND=`value to append`,e.Msg.INPUT_LABEL_TEXT_END_POSITION=`end position`,e.Msg.INPUT_LABEL_TEXT_JOIN_ITEM=`value %1`,e.Msg.INPUT_LABEL_TEXT_POSITION=`letter position`,e.Msg.INPUT_LABEL_TEXT_PROMPT_MESSAGE=`message`,e.Msg.INPUT_LABEL_TEXT_START_POSITION=`start position`,e.Msg.INPUT_LABEL_TEXT_TO_CHANGE=`text to change`,e.Msg.INPUT_LABEL_TEXT_TO_CHECK=`text to check`,e.Msg.INPUT_LABEL_TEXT_TO_FIND=`text to find`,e.Msg.INPUT_LABEL_TEXT_TO_REPLACE=`text to replace`,e.Msg.INPUT_LABEL_VALUE=`value position`,e.Msg.INPUT_LABEL_VALUE_A=`first value`,e.Msg.INPUT_LABEL_VALUE_B=`second value`,e.Msg.INPUT_LABEL_VARIABLES_SET=`value to set`,e.Msg.INSERT_KEY=`Insert`,e.Msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT=`Use %1 to navigate inside of blocks.`,e.Msg.KEYBOARD_NAV_CONSTRAINED_MOVE_HINT=`Use the arrow keys to move, then %1 to accept the position.`,e.Msg.KEYBOARD_NAV_COPIED_HINT=`Copied. Press %1 to paste.`,e.Msg.KEYBOARD_NAV_CUT_HINT=`Cut. Press %1 to paste.`,e.Msg.KEYBOARD_NAV_FLYOUT_LABEL_HINT=`Use the arrow keys to navigate to a block, or press %1 to go to the next heading.`,e.Msg.KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT=`Hold %1 and use arrow keys to move freely, then %2 to accept the position.`,e.Msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT=`Use the arrow keys to navigate.`,e.Msg.LINUX=`Linux`,e.Msg.LISTS_CREATE_EMPTY_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#create-empty-list`,e.Msg.LISTS_CREATE_EMPTY_TITLE=`create empty list`,e.Msg.LISTS_CREATE_EMPTY_TOOLTIP=`Returns a list, of length 0, containing no data records`,e.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD=`list`,e.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP=`Add, remove, or reorder sections to reconfigure this list block.`,e.Msg.LISTS_CREATE_WITH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#create-list-with`,e.Msg.LISTS_CREATE_WITH_INPUT_WITH=`create list with`,e.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP=`Add an item to the list.`,e.Msg.LISTS_CREATE_WITH_TOOLTIP=`Create a list with any number of items.`,e.Msg.LISTS_GET_INDEX_FIRST=`first`,e.Msg.LISTS_GET_INDEX_FROM_END=`# from end`,e.Msg.LISTS_GET_INDEX_FROM_START=`#`,e.Msg.LISTS_GET_INDEX_GET=`get`,e.Msg.LISTS_GET_INDEX_GET_REMOVE=`get and remove`,e.Msg.LISTS_GET_INDEX_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#getting-items-from-a-list`,e.Msg.LISTS_GET_INDEX_LAST=`last`,e.Msg.LISTS_GET_INDEX_RANDOM=`random`,e.Msg.LISTS_GET_INDEX_REMOVE=`remove`,e.Msg.LISTS_GET_INDEX_TAIL=``,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST=`Returns the first item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM=`Returns the item at the specified position in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST=`Returns the last item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM=`Returns a random item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST=`Removes and returns the first item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM=`Removes and returns the item at the specified position in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST=`Removes and returns the last item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM=`Removes and returns a random item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST=`Removes the first item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM=`Removes the item at the specified position in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST=`Removes the last item in a list.`,e.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM=`Removes a random item in a list.`,e.Msg.LISTS_GET_SUBLIST_END_FROM_END=`to # from end`,e.Msg.LISTS_GET_SUBLIST_END_FROM_START=`to #`,e.Msg.LISTS_GET_SUBLIST_END_LAST=`to last`,e.Msg.LISTS_GET_SUBLIST_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#getting-a-sublist`,e.Msg.LISTS_GET_SUBLIST_START_FIRST=`get sub-list from first`,e.Msg.LISTS_GET_SUBLIST_START_FROM_END=`get sub-list from # from end`,e.Msg.LISTS_GET_SUBLIST_START_FROM_START=`get sub-list from #`,e.Msg.LISTS_GET_SUBLIST_TAIL=``,e.Msg.LISTS_GET_SUBLIST_TOOLTIP=`Creates a copy of the specified portion of a list.`,e.Msg.LISTS_INDEX_FROM_END_TOOLTIP=`%1 is the last item.`,e.Msg.LISTS_INDEX_FROM_START_TOOLTIP=`%1 is the first item.`,e.Msg.LISTS_INDEX_OF_FIRST=`find first occurrence of item`,e.Msg.LISTS_INDEX_OF_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#finding-items-in-a-list`,e.Msg.LISTS_INDEX_OF_LAST=`find last occurrence of item`,e.Msg.LISTS_INDEX_OF_TOOLTIP=`Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.`,e.Msg.LISTS_INLIST=`in list`,e.Msg.LISTS_ISEMPTY_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#is-empty`,e.Msg.LISTS_ISEMPTY_TITLE=`%1 is empty`,e.Msg.LISTS_ISEMPTY_TOOLTIP=`Returns true if the list is empty.`,e.Msg.LISTS_LENGTH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#length-of`,e.Msg.LISTS_LENGTH_TITLE=`length of %1`,e.Msg.LISTS_LENGTH_TOOLTIP=`Returns the length of a list.`,e.Msg.LISTS_REPEAT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#create-list-with`,e.Msg.LISTS_REPEAT_TITLE=`create list with item %1 repeated %2 times`,e.Msg.LISTS_REPEAT_TOOLTIP=`Creates a list consisting of the given value repeated the specified number of times.`,e.Msg.LISTS_REVERSE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#reversing-a-list`,e.Msg.LISTS_REVERSE_MESSAGE0=`reverse %1`,e.Msg.LISTS_REVERSE_TOOLTIP=`Reverse a copy of a list.`,e.Msg.LISTS_SET_INDEX_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#in-list--set`,e.Msg.LISTS_SET_INDEX_INPUT_TO=`as`,e.Msg.LISTS_SET_INDEX_INSERT=`insert at`,e.Msg.LISTS_SET_INDEX_SET=`set`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST=`Inserts the item at the start of a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM=`Inserts the item at the specified position in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST=`Append the item to the end of a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM=`Inserts the item randomly in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST=`Sets the first item in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM=`Sets the item at the specified position in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST=`Sets the last item in a list.`,e.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM=`Sets a random item in a list.`,e.Msg.LISTS_SORT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#sorting-a-list`,e.Msg.LISTS_SORT_ORDER_ASCENDING=`ascending`,e.Msg.LISTS_SORT_ORDER_DESCENDING=`descending`,e.Msg.LISTS_SORT_TITLE=`sort %1 %2 %3`,e.Msg.LISTS_SORT_TOOLTIP=`Sort a copy of a list.`,e.Msg.LISTS_SORT_TYPE_IGNORECASE=`alphabetic, ignore case`,e.Msg.LISTS_SORT_TYPE_NUMERIC=`numeric`,e.Msg.LISTS_SORT_TYPE_TEXT=`alphabetic`,e.Msg.LISTS_SPLIT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Lists#splitting-strings-and-joining-lists`,e.Msg.LISTS_SPLIT_LIST_FROM_TEXT=`make list from text`,e.Msg.LISTS_SPLIT_TEXT_FROM_LIST=`make text from list`,e.Msg.LISTS_SPLIT_TOOLTIP_JOIN=`Join a list of texts into one text, separated by a delimiter.`,e.Msg.LISTS_SPLIT_TOOLTIP_SPLIT=`Split text into a list of texts, breaking at each delimiter.`,e.Msg.LISTS_SPLIT_WITH_DELIMITER=`with delimiter`,e.Msg.LOGIC_BOOLEAN_FALSE=`false`,e.Msg.LOGIC_BOOLEAN_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#values`,e.Msg.LOGIC_BOOLEAN_TOOLTIP=`Returns either true or false.`,e.Msg.LOGIC_BOOLEAN_TRUE=`true`,e.Msg.LOGIC_COMPARE_EQ_ARIA=`equals`,e.Msg.LOGIC_COMPARE_GTE_ARIA=`greater than or equal to`,e.Msg.LOGIC_COMPARE_GT_ARIA=`greater than`,e.Msg.LOGIC_COMPARE_HELPURL=`https://en.wikipedia.org/wiki/Inequality_(mathematics)`,e.Msg.LOGIC_COMPARE_LTE_ARIA=`less than or equal to`,e.Msg.LOGIC_COMPARE_LT_ARIA=`less than`,e.Msg.LOGIC_COMPARE_NEQ_ARIA=`not equals`,e.Msg.LOGIC_COMPARE_TOOLTIP_EQ=`Return true if both inputs equal each other.`,e.Msg.LOGIC_COMPARE_TOOLTIP_GT=`Return true if the first input is greater than the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_GTE=`Return true if the first input is greater than or equal to the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_LT=`Return true if the first input is smaller than the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_LTE=`Return true if the first input is smaller than or equal to the second input.`,e.Msg.LOGIC_COMPARE_TOOLTIP_NEQ=`Return true if both inputs are not equal to each other.`,e.Msg.LOGIC_NEGATE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#not`,e.Msg.LOGIC_NEGATE_TITLE=`not %1`,e.Msg.LOGIC_NEGATE_TOOLTIP=`Returns true if the input is false. Returns false if the input is true.`,e.Msg.LOGIC_NULL=`null`,e.Msg.LOGIC_NULL_HELPURL=`https://en.wikipedia.org/wiki/Nullable_type`,e.Msg.LOGIC_NULL_TOOLTIP=`Returns null.`,e.Msg.LOGIC_OPERATION_AND=`and`,e.Msg.LOGIC_OPERATION_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#logical-operations`,e.Msg.LOGIC_OPERATION_OR=`or`,e.Msg.LOGIC_OPERATION_TOOLTIP_AND=`Return true if both inputs are true.`,e.Msg.LOGIC_OPERATION_TOOLTIP_OR=`Return true if at least one of the inputs is true.`,e.Msg.LOGIC_TERNARY_CONDITION=`test`,e.Msg.LOGIC_TERNARY_HELPURL=`https://en.wikipedia.org/wiki/%3F:`,e.Msg.LOGIC_TERNARY_IF_FALSE=`if false`,e.Msg.LOGIC_TERNARY_IF_TRUE=`if true`,e.Msg.LOGIC_TERNARY_TOOLTIP=`Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.`,e.Msg.MAC_OS=`macOS`,e.Msg.MATH_ADDITION_SYMBOL=`+`,e.Msg.MATH_ADDITION_SYMBOL_ARIA=`plus`,e.Msg.MATH_ARITHMETIC_HELPURL=`https://en.wikipedia.org/wiki/Arithmetic`,e.Msg.MATH_ARITHMETIC_TOOLTIP_ADD=`Return the sum of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE=`Return the quotient of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS=`Return the difference of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY=`Return the product of the two numbers.`,e.Msg.MATH_ARITHMETIC_TOOLTIP_POWER=`Return the first number raised to the power of the second number.`,e.Msg.MATH_ATAN2_HELPURL=`https://en.wikipedia.org/wiki/Atan2`,e.Msg.MATH_ATAN2_TITLE=`atan2 of X:%1 Y:%2`,e.Msg.MATH_ATAN2_TOOLTIP=`Return the arctangent of point (X, Y) in degrees from -180 to 180.`,e.Msg.MATH_CHANGE_HELPURL=`https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter`,e.Msg.MATH_CHANGE_TITLE=`change %1 by %2`,e.Msg.MATH_CHANGE_TOOLTIP=`Add a number to variable '%1'.`,e.Msg.MATH_CONSTANT_E_ARIA=`e`,e.Msg.MATH_CONSTANT_GOLDEN_RATIO_ARIA=`golden ratio`,e.Msg.MATH_CONSTANT_HELPURL=`https://en.wikipedia.org/wiki/Mathematical_constant`,e.Msg.MATH_CONSTANT_INFINITY_ARIA=`infinity`,e.Msg.MATH_CONSTANT_PI_ARIA=`pi`,e.Msg.MATH_CONSTANT_SQRT1_2_ARIA=`square root of 1 over 2`,e.Msg.MATH_CONSTANT_SQRT2_ARIA=`square root of 2`,e.Msg.MATH_CONSTANT_TOOLTIP=`Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).`,e.Msg.MATH_CONSTRAIN_HELPURL=`https://en.wikipedia.org/wiki/Clamping_(graphics)`,e.Msg.MATH_CONSTRAIN_TITLE=`constrain %1 low %2 high %3`,e.Msg.MATH_CONSTRAIN_TOOLTIP=`Constrain a number to be between the specified limits (inclusive).`,e.Msg.MATH_DIVISION_SYMBOL=`÷`,e.Msg.MATH_DIVISION_SYMBOL_ARIA=`divided by`,e.Msg.MATH_IS_DIVISIBLE_BY=`is divisible by`,e.Msg.MATH_IS_EVEN=`is even`,e.Msg.MATH_IS_NEGATIVE=`is negative`,e.Msg.MATH_IS_ODD=`is odd`,e.Msg.MATH_IS_POSITIVE=`is positive`,e.Msg.MATH_IS_PRIME=`is prime`,e.Msg.MATH_IS_TOOLTIP=`Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.`,e.Msg.MATH_IS_WHOLE=`is whole`,e.Msg.MATH_MODULO_HELPURL=`https://en.wikipedia.org/wiki/Modulo_operation`,e.Msg.MATH_MODULO_TITLE=`remainder of %1 ÷ %2`,e.Msg.MATH_MODULO_TOOLTIP=`Return the remainder from dividing the two numbers.`,e.Msg.MATH_MULTIPLICATION_SYMBOL=`×`,e.Msg.MATH_MULTIPLICATION_SYMBOL_ARIA=`times`,e.Msg.MATH_NUMBER_HELPURL=`https://en.wikipedia.org/wiki/Number`,e.Msg.MATH_NUMBER_TOOLTIP=`A number.`,e.Msg.MATH_ONLIST_HELPURL=``,e.Msg.MATH_ONLIST_OPERATOR_AVERAGE=`average of list`,e.Msg.MATH_ONLIST_OPERATOR_MAX=`max of list`,e.Msg.MATH_ONLIST_OPERATOR_MAX_ARIA=`maximum`,e.Msg.MATH_ONLIST_OPERATOR_MEDIAN=`median of list`,e.Msg.MATH_ONLIST_OPERATOR_MIN=`min of list`,e.Msg.MATH_ONLIST_OPERATOR_MIN_ARIA=`minimum`,e.Msg.MATH_ONLIST_OPERATOR_MODE=`modes of list`,e.Msg.MATH_ONLIST_OPERATOR_RANDOM=`random item of list`,e.Msg.MATH_ONLIST_OPERATOR_STD_DEV=`standard deviation of list`,e.Msg.MATH_ONLIST_OPERATOR_SUM=`sum of list`,e.Msg.MATH_ONLIST_TOOLTIP_AVERAGE=`Return the average (arithmetic mean) of the numeric values in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MAX=`Return the largest number in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MEDIAN=`Return the median number in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MIN=`Return the smallest number in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_MODE=`Return a list of the most common item(s) in the list.`,e.Msg.MATH_ONLIST_TOOLTIP_RANDOM=`Return a random element from the list.`,e.Msg.MATH_ONLIST_TOOLTIP_STD_DEV=`Return the standard deviation of the list.`,e.Msg.MATH_ONLIST_TOOLTIP_SUM=`Return the sum of all the numbers in the list.`,e.Msg.MATH_POWER_SYMBOL=`^`,e.Msg.MATH_POWER_SYMBOL_ARIA=`to the power of`,e.Msg.MATH_RANDOM_FLOAT_HELPURL=`https://en.wikipedia.org/wiki/Random_number_generation`,e.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM=`random fraction`,e.Msg.MATH_RANDOM_FLOAT_TOOLTIP=`Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).`,e.Msg.MATH_RANDOM_INT_HELPURL=`https://en.wikipedia.org/wiki/Random_number_generation`,e.Msg.MATH_RANDOM_INT_TITLE=`random integer from %1 to %2`,e.Msg.MATH_RANDOM_INT_TOOLTIP=`Return a random integer between the two specified limits, inclusive.`,e.Msg.MATH_ROUND_HELPURL=`https://en.wikipedia.org/wiki/Rounding`,e.Msg.MATH_ROUND_OPERATOR_ROUND=`round`,e.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN=`round down`,e.Msg.MATH_ROUND_OPERATOR_ROUNDUP=`round up`,e.Msg.MATH_ROUND_TOOLTIP=`Round a number up or down.`,e.Msg.MATH_SINGLE_HELPURL=`https://en.wikipedia.org/wiki/Square_root`,e.Msg.MATH_SINGLE_OP_ABSOLUTE=`absolute`,e.Msg.MATH_SINGLE_OP_ABSOLUTE_ARIA=`absolute value`,e.Msg.MATH_SINGLE_OP_EXP_ARIA=`e to the power of`,e.Msg.MATH_SINGLE_OP_LN_ARIA=`natural logarithm`,e.Msg.MATH_SINGLE_OP_LOG10_ARIA=`base 10 logarithm`,e.Msg.MATH_SINGLE_OP_NEG_ARIA=`negative`,e.Msg.MATH_SINGLE_OP_POW10_ARIA=`10 to the power of`,e.Msg.MATH_SINGLE_OP_ROOT=`square root`,e.Msg.MATH_SINGLE_TOOLTIP_ABS=`Return the absolute value of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_EXP=`Return e to the power of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_LN=`Return the natural logarithm of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_LOG10=`Return the base 10 logarithm of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_NEG=`Return the negation of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_POW10=`Return 10 to the power of a number.`,e.Msg.MATH_SINGLE_TOOLTIP_ROOT=`Return the square root of a number.`,e.Msg.MATH_SUBTRACTION_SYMBOL=`-`,e.Msg.MATH_SUBTRACTION_SYMBOL_ARIA=`minus`,e.Msg.MATH_TRIG_ACOS=`acos`,e.Msg.MATH_TRIG_ACOS_ARIA=`inverse cosine`,e.Msg.MATH_TRIG_ASIN=`asin`,e.Msg.MATH_TRIG_ASIN_ARIA=`inverse sine`,e.Msg.MATH_TRIG_ATAN=`atan`,e.Msg.MATH_TRIG_ATAN_ARIA=`inverse tangent`,e.Msg.MATH_TRIG_COS=`cos`,e.Msg.MATH_TRIG_COS_ARIA=`cosine`,e.Msg.MATH_TRIG_HELPURL=`https://en.wikipedia.org/wiki/Trigonometric_functions`,e.Msg.MATH_TRIG_SIN=`sin`,e.Msg.MATH_TRIG_SIN_ARIA=`sine`,e.Msg.MATH_TRIG_TAN=`tan`,e.Msg.MATH_TRIG_TAN_ARIA=`tangent`,e.Msg.MATH_TRIG_TOOLTIP_ACOS=`Return the arccosine of a number.`,e.Msg.MATH_TRIG_TOOLTIP_ASIN=`Return the arcsine of a number.`,e.Msg.MATH_TRIG_TOOLTIP_ATAN=`Return the arctangent of a number.`,e.Msg.MATH_TRIG_TOOLTIP_COS=`Return the cosine of a degree (not radian).`,e.Msg.MATH_TRIG_TOOLTIP_SIN=`Return the sine of a degree (not radian).`,e.Msg.MATH_TRIG_TOOLTIP_TAN=`Return the tangent of a degree (not radian).`,e.Msg.MINIMAP_ARIA_LABEL=`Workspace minimap. Use the arrow keys to pan the workspace.`,e.Msg.MOVE_BLOCK=`Move Block`,e.Msg.NEW_COLOUR_VARIABLE=`Create colour variable...`,e.Msg.NEW_NUMBER_VARIABLE=`Create number variable...`,e.Msg.NEW_STRING_VARIABLE=`Create string variable...`,e.Msg.NEW_VARIABLE=`Create variable...`,e.Msg.NEW_VARIABLE_TITLE=`New variable name:`,e.Msg.NEW_VARIABLE_TYPE_TITLE=`New variable type:`,e.Msg.NO_PARENT_ANNOUNCEMENT=`Current block has no parent`,e.Msg.OPEN_BACKPACK=`Open backpack`,e.Msg.OPEN_TRASH=`Open trash`,e.Msg.OPTION_KEY=`Option`,e.Msg.ORDINAL_NUMBER_SUFFIX=``,e.Msg.PAGE_DOWN_KEY=`Page Down`,e.Msg.PAGE_UP_KEY=`Page Up`,e.Msg.PARENT_BLOCKS_ANNOUNCEMENT=`Parent blocks: %1`,e.Msg.PASTE_ALL_FROM_BACKPACK=`Paste All Blocks from Backpack`,e.Msg.PASTE_SHORTCUT=`Paste`,e.Msg.PAUSE_KEY=`Pause`,e.Msg.PROCEDURES_ALLOW_STATEMENTS=`allow statements`,e.Msg.PROCEDURES_BEFORE_PARAMS=`with:`,e.Msg.PROCEDURES_CALLNORETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_CALLNORETURN_TOOLTIP=`Run the user-defined function '%1'.`,e.Msg.PROCEDURES_CALLRETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_CALLRETURN_TOOLTIP=`Run the user-defined function '%1' and use its output.`,e.Msg.PROCEDURES_CALL_BEFORE_PARAMS=`with:`,e.Msg.PROCEDURES_CALL_DISABLED_DEF_WARNING=`Can't run the user-defined function '%1' because the definition block is disabled.`,e.Msg.PROCEDURES_CREATE_DO=`Create '%1'`,e.Msg.PROCEDURES_DEFNORETURN_COMMENT=`Describe this function...`,e.Msg.PROCEDURES_DEFNORETURN_DO=``,e.Msg.PROCEDURES_DEFNORETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_DEFNORETURN_PROCEDURE=`do something`,e.Msg.PROCEDURES_DEFNORETURN_TITLE=`to`,e.Msg.PROCEDURES_DEFNORETURN_TOOLTIP=`Creates a function with no output.`,e.Msg.PROCEDURES_DEFRETURN_HELPURL=`https://en.wikipedia.org/wiki/Subroutine`,e.Msg.PROCEDURES_DEFRETURN_RETURN=`return`,e.Msg.PROCEDURES_DEFRETURN_TOOLTIP=`Creates a function with an output.`,e.Msg.PROCEDURES_DEF_DUPLICATE_WARNING=`Warning: This function has duplicate parameters.`,e.Msg.PROCEDURES_HIGHLIGHT_DEF=`Highlight function definition`,e.Msg.PROCEDURES_IFRETURN_HELPURL=`https://c2.com/cgi/wiki?GuardClause`,e.Msg.PROCEDURES_IFRETURN_TOOLTIP=`If a value is true, then return a second value.`,e.Msg.PROCEDURES_IFRETURN_WARNING=`Warning: This block may be used only within a function definition.`,e.Msg.PROCEDURES_MUTATORARG_TITLE=`input name:`,e.Msg.PROCEDURES_MUTATORARG_TOOLTIP=`Add an input to the function.`,e.Msg.PROCEDURES_MUTATORCONTAINER_TITLE=`inputs`,e.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP=`Add, remove, or reorder inputs to this function.`,e.Msg.REDO=`Redo`,e.Msg.REMOVE_COMMENT=`Remove Comment`,e.Msg.REMOVE_FROM_BACKPACK=`Remove from Backpack`,e.Msg.RENAME_VARIABLE=`Rename the '%1' variable`,e.Msg.RENAME_VARIABLE_TITLE=`Rename all '%1' variables to:`,e.Msg.RESET_ZOOM=`Reset zoom`,e.Msg.SCREENREADER_HINT=`Use the arrow keys to navigate. Press %1 to toggle screenreader accessibility mode.`,e.Msg.SCREENREADER_MODE_DISABLED=`Screenreader mode is off, press %1 to turn it on`,e.Msg.SCREENREADER_MODE_ENABLED=`Screenreader mode is on, press %1 to turn it off`,e.Msg.SHIFT_KEY=`Shift`,e.Msg.SHORTCUTS_ABORT_MOVE=`Abort move`,e.Msg.SHORTCUTS_CLEANUP=`Clean up workspace`,e.Msg.SHORTCUTS_CODE_NAVIGATION=`Code navigation`,e.Msg.SHORTCUTS_DELETE=`Delete`,e.Msg.SHORTCUTS_DISCONNECT=`Disconnect block`,e.Msg.SHORTCUTS_DUPLICATE=`Duplicate`,e.Msg.SHORTCUTS_EDITING=`Editing`,e.Msg.SHORTCUTS_ESCAPE=`Exit`,e.Msg.SHORTCUTS_EXTENDED_INFORMATION=`Announce detailed information`,e.Msg.SHORTCUTS_FINISH_MOVE=`Finish move`,e.Msg.SHORTCUTS_FOCUS_TOOLBOX=`Focus toolbox`,e.Msg.SHORTCUTS_FOCUS_WORKSPACE=`Focus workspace`,e.Msg.SHORTCUTS_GENERAL=`General`,e.Msg.SHORTCUTS_INFORMATION=`Announce information`,e.Msg.SHORTCUTS_JUMP_BLOCK_END=`Jump to block end`,e.Msg.SHORTCUTS_JUMP_BLOCK_START=`Jump to block start`,e.Msg.SHORTCUTS_JUMP_BOTTOM_STACK=`Jump to bottom of stack`,e.Msg.SHORTCUTS_JUMP_FIRST_BLOCK=`Jump to first block`,e.Msg.SHORTCUTS_JUMP_LAST_BLOCK=`Jump to last block`,e.Msg.SHORTCUTS_JUMP_TOP_STACK=`Jump to top of stack`,e.Msg.SHORTCUTS_MOVE_DOWN=`Move down`,e.Msg.SHORTCUTS_MOVE_LEFT=`Move left`,e.Msg.SHORTCUTS_MOVE_RIGHT=`Move right`,e.Msg.SHORTCUTS_MOVE_UP=`Move up`,e.Msg.SHORTCUTS_NEXT_HEADING=`Next heading`,e.Msg.SHORTCUTS_NEXT_STACK=`Next stack`,e.Msg.SHORTCUTS_PERFORM_ACTION=`Edit or confirm`,e.Msg.SHORTCUTS_PREVIOUS_HEADING=`Previous heading`,e.Msg.SHORTCUTS_PREVIOUS_STACK=`Previous stack`,e.Msg.SHORTCUTS_SHOW_CONTEXT_MENU=`Show menu`,e.Msg.SHORTCUTS_SHOW_TOOLTIP=`Show tooltip`,e.Msg.SHORTCUTS_START_MOVE=`Start move`,e.Msg.SHORTCUTS_START_MOVE_STACK=`Start move stack`,e.Msg.SHORTCUTS_TOGGLE_SCREENREADER_MODE=`Toggle screenreader mode`,e.Msg.SPACE_KEY=`Space`,e.Msg.TAB_KEY=`Tab`,e.Msg.TEXT_APPEND_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-modification`,e.Msg.TEXT_APPEND_TITLE=`to %1 append text %2`,e.Msg.TEXT_APPEND_TOOLTIP=`Append some text to variable '%1'.`,e.Msg.TEXT_CHANGECASE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#adjusting-text-case`,e.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE=`to lower case`,e.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE=`to Title Case`,e.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE=`to UPPER CASE`,e.Msg.TEXT_CHANGECASE_TOOLTIP=`Return a copy of the text in a different case.`,e.Msg.TEXT_CHARAT_FIRST=`get first letter`,e.Msg.TEXT_CHARAT_FROM_END=`get letter # from end`,e.Msg.TEXT_CHARAT_FROM_START=`get letter #`,e.Msg.TEXT_CHARAT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#extracting-text`,e.Msg.TEXT_CHARAT_LAST=`get last letter`,e.Msg.TEXT_CHARAT_RANDOM=`get random letter`,e.Msg.TEXT_CHARAT_TAIL=``,e.Msg.TEXT_CHARAT_TITLE=`in text %1 %2`,e.Msg.TEXT_CHARAT_TOOLTIP=`Returns the letter at the specified position.`,e.Msg.TEXT_COUNT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#counting-substrings`,e.Msg.TEXT_COUNT_MESSAGE0=`count %1 in %2`,e.Msg.TEXT_COUNT_TOOLTIP=`Count how many times some text occurs within some other text.`,e.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP=`Add an item to the text.`,e.Msg.TEXT_CREATE_JOIN_TITLE_JOIN=`join`,e.Msg.TEXT_CREATE_JOIN_TOOLTIP=`Add, remove, or reorder sections to reconfigure this text block.`,e.Msg.TEXT_FROM_END_ARIA=`letter number from end`,e.Msg.TEXT_FROM_START_ARIA=`letter number`,e.Msg.TEXT_GET_SUBSTRING_END_FROM_END=`to letter # from end`,e.Msg.TEXT_GET_SUBSTRING_END_FROM_START=`to letter #`,e.Msg.TEXT_GET_SUBSTRING_END_LAST=`to last letter`,e.Msg.TEXT_GET_SUBSTRING_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#extracting-a-region-of-text`,e.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT=`in text`,e.Msg.TEXT_GET_SUBSTRING_START_FIRST=`get substring from first letter`,e.Msg.TEXT_GET_SUBSTRING_START_FROM_END=`get substring from letter # from end`,e.Msg.TEXT_GET_SUBSTRING_START_FROM_START=`get substring from letter #`,e.Msg.TEXT_GET_SUBSTRING_TAIL=``,e.Msg.TEXT_GET_SUBSTRING_TOOLTIP=`Returns a specified portion of the text.`,e.Msg.TEXT_INDEXOF_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#finding-text`,e.Msg.TEXT_INDEXOF_OPERATOR_FIRST=`find first occurrence of text`,e.Msg.TEXT_INDEXOF_OPERATOR_LAST=`find last occurrence of text`,e.Msg.TEXT_INDEXOF_TITLE=`in text %1 %2 %3`,e.Msg.TEXT_INDEXOF_TOOLTIP=`Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.`,e.Msg.TEXT_ISEMPTY_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#checking-for-empty-text`,e.Msg.TEXT_ISEMPTY_TITLE=`%1 is empty`,e.Msg.TEXT_ISEMPTY_TOOLTIP=`Returns true if the provided text is empty.`,e.Msg.TEXT_JOIN_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-creation`,e.Msg.TEXT_JOIN_TITLE_CREATEWITH=`create text with`,e.Msg.TEXT_JOIN_TOOLTIP=`Create a piece of text by joining together any number of items.`,e.Msg.TEXT_LENGTH_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-modification`,e.Msg.TEXT_LENGTH_TITLE=`length of %1`,e.Msg.TEXT_LENGTH_TOOLTIP=`Returns the number of letters (including spaces) in the provided text.`,e.Msg.TEXT_PRINT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#printing-text`,e.Msg.TEXT_PRINT_TITLE=`print %1`,e.Msg.TEXT_PRINT_TOOLTIP=`Print the specified text, number or other value.`,e.Msg.TEXT_PROMPT_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#getting-input-from-the-user`,e.Msg.TEXT_PROMPT_TOOLTIP_NUMBER=`Prompt for user for a number.`,e.Msg.TEXT_PROMPT_TOOLTIP_TEXT=`Prompt for user for some text.`,e.Msg.TEXT_PROMPT_TYPE_NUMBER=`prompt for number with message`,e.Msg.TEXT_PROMPT_TYPE_TEXT=`prompt for text with message`,e.Msg.TEXT_REPLACE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#replacing-substrings`,e.Msg.TEXT_REPLACE_MESSAGE0=`replace %1 with %2 in %3`,e.Msg.TEXT_REPLACE_TOOLTIP=`Replace all occurances of some text within some other text.`,e.Msg.TEXT_REVERSE_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#reversing-text`,e.Msg.TEXT_REVERSE_MESSAGE0=`reverse %1`,e.Msg.TEXT_REVERSE_TOOLTIP=`Reverses the order of the characters in the text.`,e.Msg.TEXT_TEXT_HELPURL=`https://en.wikipedia.org/wiki/String_(computer_science)`,e.Msg.TEXT_TEXT_TOOLTIP=`A letter, word, or line of text.`,e.Msg.TEXT_TRIM_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Text#trimming-removing-spaces`,e.Msg.TEXT_TRIM_OPERATOR_BOTH=`trim spaces from both sides of`,e.Msg.TEXT_TRIM_OPERATOR_LEFT=`trim spaces from left side of`,e.Msg.TEXT_TRIM_OPERATOR_RIGHT=`trim spaces from right side of`,e.Msg.TEXT_TRIM_TOOLTIP=`Return a copy of the text with spaces removed from one or both ends.`,e.Msg.TODAY=`Today`,e.Msg.UNDO=`Undo`,e.Msg.UNKNOWN=`Unknown`,e.Msg.UNNAMED_KEY=`unnamed`,e.Msg.VARIABLES_DEFAULT_NAME=`item`,e.Msg.VARIABLES_GET_CREATE_SET=`Create 'set %1'`,e.Msg.VARIABLES_GET_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Variables#get`,e.Msg.VARIABLES_GET_TOOLTIP=`Returns the value of this variable.`,e.Msg.VARIABLES_SET=`set %1 to %2`,e.Msg.VARIABLES_SET_CREATE_GET=`Create 'get %1'`,e.Msg.VARIABLES_SET_HELPURL=`https://github.com/RaspberryPiFoundation/blockly/wiki/Variables#set`,e.Msg.VARIABLES_SET_TOOLTIP=`Sets this variable to be equal to the input.`,e.Msg.VARIABLE_ALREADY_EXISTS=`A variable named '%1' already exists.`,e.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE=`A variable named '%1' already exists for another type: '%2'.`,e.Msg.VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER=`A variable named '%1' already exists as a parameter in the procedure '%2'.`,e.Msg.WINDOWS=`Windows`,e.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT=`Say something...`,e.Msg.WORKSPACE_CONTENTS_BLOCKS_MANY=`%1 stacks of blocks%2 in workspace.`,e.Msg.WORKSPACE_CONTENTS_BLOCKS_ONE=`One stack of blocks%2 in workspace.`,e.Msg.WORKSPACE_CONTENTS_BLOCKS_ZERO=`No blocks%2 in workspace.`,e.Msg.WORKSPACE_CONTENTS_COMMENTS_MANY=` and %1 comments`,e.Msg.WORKSPACE_CONTENTS_COMMENTS_ONE=` and one comment`,e.Msg.WORKSPACE_LABEL_1_STACK=`1 stack of blocks`,e.Msg.WORKSPACE_LABEL_FLYOUT_WORKSPACE=`%1 blocks`,e.Msg.WORKSPACE_LABEL_MANY_STACKS=`%1 stacks of blocks`,e.Msg.WORKSPACE_LABEL_MUTATOR_WORKSPACE=`Block editor workspace`,e.Msg.WORKSPACE_LABEL_PLAIN=`Blocks workspace.`,e.Msg.WORKSPACE_ROLEDESCRIPTION=`workspace`,e.Msg.ZOOM_IN=`Zoom in`,e.Msg.ZOOM_OUT=`Zoom out`,e.Msg.ZOOM_TO_FIT_ARIA_LABEL=`Zoom to fit`,e.Msg.CONTROLS_FOREACH_INPUT_DO=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.CONTROLS_FOR_INPUT_DO=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=e.Msg.CONTROLS_IF_MSG_ELSEIF,e.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=e.Msg.CONTROLS_IF_MSG_ELSE,e.Msg.CONTROLS_IF_IF_TITLE_IF=e.Msg.CONTROLS_IF_MSG_IF,e.Msg.CONTROLS_IF_MSG_THEN=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=e.Msg.CONTROLS_REPEAT_INPUT_DO,e.Msg.LISTS_CREATE_WITH_ITEM_TITLE=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=e.Msg.LISTS_INLIST,e.Msg.MATH_CHANGE_TITLE_ITEM=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.PROCEDURES_DEFRETURN_COMMENT=e.Msg.PROCEDURES_DEFNORETURN_COMMENT,e.Msg.PROCEDURES_DEFRETURN_DO=e.Msg.PROCEDURES_DEFNORETURN_DO,e.Msg.PROCEDURES_DEFRETURN_PROCEDURE=e.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,e.Msg.PROCEDURES_DEFRETURN_TITLE=e.Msg.PROCEDURES_DEFNORETURN_TITLE,e.Msg.TEXT_APPEND_VARIABLE=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=e.Msg.VARIABLES_DEFAULT_NAME,e.Msg.COLOUR_HUE=`20`,e.Msg.LISTS_HUE=`260`,e.Msg.LOGIC_HUE=`210`,e.Msg.LOOPS_HUE=`120`,e.Msg.MATH_HUE=`230`,e.Msg.PROCEDURES_HUE=`290`,e.Msg.TEXTS_HUE=`160`,e.Msg.VARIABLES_DYNAMIC_HUE=`310`,e.Msg.VARIABLES_HUE=`330`,e.Msg})})),ue=t({ADD_COMMENT:()=>M,ALT_KEY:()=>Ic,ANNOUNCE_MOVE_AFTER:()=>fd,ANNOUNCE_MOVE_AROUND:()=>md,ANNOUNCE_MOVE_BEFORE:()=>dd,ANNOUNCE_MOVE_CANCELED:()=>_d,ANNOUNCE_MOVE_INSIDE:()=>pd,ANNOUNCE_MOVE_OF:()=>gd,ANNOUNCE_MOVE_TO:()=>hd,ANNOUNCE_MOVE_WORKSPACE:()=>ud,ARIA_LABEL_ADD_ELSE_IF:()=>rf,ARIA_LABEL_ADD_INPUT:()=>uf,ARIA_LABEL_ADD_LIST_ITEM:()=>of,ARIA_LABEL_ADD_TEXT:()=>cf,ARIA_LABEL_BUTTON:()=>Id,ARIA_LABEL_COMMENT:()=>Jd,ARIA_LABEL_COMMENT_COLLAPSE:()=>Yd,ARIA_LABEL_COMMENT_EXPAND:()=>Xd,ARIA_LABEL_FIELD_ANGLE:()=>pf,ARIA_LABEL_HEADING:()=>Ld,ARIA_LABEL_REMOVE_ELSE_IF:()=>af,ARIA_LABEL_REMOVE_INPUT:()=>df,ARIA_LABEL_REMOVE_LIST_ITEM:()=>sf,ARIA_LABEL_REMOVE_TEXT:()=>lf,ARIA_LABEL_TRASH_EMPTY:()=>Ff,ARIA_TYPE_FIELD_ANGLE:()=>ff,ARIA_TYPE_FIELD_BITMAP:()=>gf,ARIA_TYPE_FIELD_CHECKBOX:()=>Ed,ARIA_TYPE_FIELD_COLOUR:()=>hf,ARIA_TYPE_FIELD_DATE:()=>mf,ARIA_TYPE_FIELD_DROPDOWN:()=>wd,ARIA_TYPE_FIELD_GRID:()=>_f,ARIA_TYPE_FIELD_IMAGE:()=>Td,ARIA_TYPE_FIELD_INPUT:()=>yd,ARIA_TYPE_FIELD_NUMBER:()=>xd,ARIA_TYPE_FIELD_TEXT_INPUT:()=>bd,ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT:()=>Cd,ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE:()=>Sd,BACKSPACE_KEY:()=>Rc,BLOCK_LABEL_BEGIN_PREFIX:()=>tu,BLOCK_LABEL_BEGIN_STACK:()=>eu,BLOCK_LABEL_COLLAPSED:()=>iu,BLOCK_LABEL_CONTAINER:()=>uu,BLOCK_LABEL_DISABLED:()=>ru,BLOCK_LABEL_HAS_BRANCHES:()=>cu,BLOCK_LABEL_HAS_INPUT:()=>ou,BLOCK_LABEL_HAS_INPUTS:()=>su,BLOCK_LABEL_REPLACEABLE:()=>au,BLOCK_LABEL_STACK_BLOCKS:()=>fu,BLOCK_LABEL_STATEMENT:()=>lu,BLOCK_LABEL_TOOLBOX_CATEGORY:()=>nu,BLOCK_LABEL_VALUE:()=>du,BUBBLE_LABEL_COMMENT:()=>zd,BUBBLE_LABEL_DEFAULT:()=>Rd,BUBBLE_LABEL_WARNING:()=>Bd,CANNOT_DELETE_VARIABLE_PROCEDURE:()=>Ye,CAPS_LOCK_KEY:()=>Uc,CHANGE_VALUE_TITLE:()=>Ie,CHROME_OS:()=>Ac,CLEAN_UP:()=>Te,CLOSE:()=>Ee,CLOSE_BACKPACK:()=>Tf,COLLAPSED_WARNINGS_WARNING:()=>Cc,COLLAPSE_ALL:()=>Oe,COLLAPSE_BLOCK:()=>De,COLOUR_BLEND_COLOUR1:()=>ut,COLOUR_BLEND_COLOUR2:()=>dt,COLOUR_BLEND_HELPURL:()=>ct,COLOUR_BLEND_RATIO:()=>ft,COLOUR_BLEND_TITLE:()=>lt,COLOUR_BLEND_TOOLTIP:()=>pt,COLOUR_HUE:()=>ge,COLOUR_PICKER_HELPURL:()=>Ze,COLOUR_PICKER_TOOLTIP:()=>Qe,COLOUR_RANDOM_HELPURL:()=>$e,COLOUR_RANDOM_TITLE:()=>et,COLOUR_RANDOM_TOOLTIP:()=>tt,COLOUR_RGB_BLUE:()=>ot,COLOUR_RGB_GREEN:()=>at,COLOUR_RGB_HELPURL:()=>nt,COLOUR_RGB_RED:()=>it,COLOUR_RGB_TITLE:()=>rt,COLOUR_RGB_TOOLTIP:()=>st,COMMAND_KEY:()=>Pc,CONTEXT_MENU_KEY:()=>Zc,CONTROLS_FLOW_STATEMENTS_HELPURL:()=>Mt,CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK:()=>Nt,CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE:()=>Pt,CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK:()=>Ft,CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE:()=>It,CONTROLS_FLOW_STATEMENTS_WARNING:()=>Lt,CONTROLS_FOREACH_HELPURL:()=>Ot,CONTROLS_FOREACH_INPUT_DO:()=>At,CONTROLS_FOREACH_TITLE:()=>kt,CONTROLS_FOREACH_TOOLTIP:()=>jt,CONTROLS_FOR_HELPURL:()=>wt,CONTROLS_FOR_INPUT_DO:()=>Dt,CONTROLS_FOR_TITLE:()=>Et,CONTROLS_FOR_TOOLTIP:()=>Tt,CONTROLS_IF_ELSEIF_TITLE_ELSEIF:()=>Yt,CONTROLS_IF_ELSEIF_TOOLTIP:()=>Xt,CONTROLS_IF_ELSE_TITLE_ELSE:()=>Zt,CONTROLS_IF_ELSE_TOOLTIP:()=>Qt,CONTROLS_IF_HELPURL:()=>Rt,CONTROLS_IF_IF_TITLE_IF:()=>qt,CONTROLS_IF_IF_TOOLTIP:()=>Jt,CONTROLS_IF_MSG_ELSE:()=>Gt,CONTROLS_IF_MSG_ELSEIF:()=>Wt,CONTROLS_IF_MSG_IF:()=>Ut,CONTROLS_IF_MSG_THEN:()=>Kt,CONTROLS_IF_TOOLTIP_1:()=>zt,CONTROLS_IF_TOOLTIP_2:()=>Bt,CONTROLS_IF_TOOLTIP_3:()=>Vt,CONTROLS_IF_TOOLTIP_4:()=>Ht,CONTROLS_REPEAT_HELPURL:()=>mt,CONTROLS_REPEAT_INPUT_DO:()=>gt,CONTROLS_REPEAT_TITLE:()=>ht,CONTROLS_REPEAT_TOOLTIP:()=>_t,CONTROLS_WHILEUNTIL_HELPURL:()=>vt,CONTROLS_WHILEUNTIL_INPUT_DO:()=>yt,CONTROLS_WHILEUNTIL_OPERATOR_UNTIL:()=>xt,CONTROLS_WHILEUNTIL_OPERATOR_WHILE:()=>bt,CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL:()=>Ct,CONTROLS_WHILEUNTIL_TOOLTIP_WHILE:()=>St,CONTROL_KEY:()=>Nc,COPY_ALL_TO_BACKPACK:()=>Ef,COPY_SHORTCUT:()=>$c,COPY_TO_BACKPACK:()=>Df,CURRENT_BLOCK_ANNOUNCEMENT:()=>$d,CUT_SHORTCUT:()=>Qc,DELETE_ALL_BLOCKS:()=>we,DELETE_BLOCK:()=>Se,DELETE_KEY:()=>zc,DELETE_VARIABLE:()=>Xe,DELETE_VARIABLE_CONFIRMATION:()=>Je,DELETE_X_BLOCKS:()=>Ce,DIALOG_CANCEL:()=>Tc,DIALOG_OK:()=>wc,DISABLE_BLOCK:()=>je,DUPLICATE_BLOCK:()=>j,DUPLICATE_COMMENT:()=>P,EDIT_BLOCK_CONTENTS:()=>Ec,EMPTY_BACKPACK:()=>Of,ENABLE_BLOCK:()=>Me,END_KEY:()=>qc,ENTER_KEY:()=>Lc,ESCAPE:()=>Bc,EXPAND_ALL:()=>Ae,EXPAND_BLOCK:()=>ke,EXTERNAL_INPUTS:()=>be,FIELD_BITMAP_ARIA_VALUE:()=>Cf,FIELD_BITMAP_BUTTON_LABEL_CLEAR:()=>yf,FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE:()=>vf,FIELD_BITMAP_PIXEL_LABEL:()=>Sf,FIELD_BITMAP_PIXEL_OFF:()=>xf,FIELD_BITMAP_PIXEL_ON:()=>bf,FIELD_LABEL_CHECKBOX_CHECKED:()=>Nd,FIELD_LABEL_CHECKBOX_UNCHECKED:()=>Pd,FIELD_LABEL_EDIT_PREFIX:()=>Dd,FIELD_LABEL_EMPTY:()=>vd,FIELD_LABEL_OPTION_INDEX:()=>Md,FIELD_LABEL_VARIABLE:()=>Fd,FIELD_MULTILINEINPUT_FINISH_EDITING:()=>jf,FIELD_MULTILINEINPUT_NEW_LINE:()=>Mf,HELP:()=>Ne,HELP_PROMPT:()=>tl,HOME_KEY:()=>Jc,ICON_LABEL_COMMENT_CLOSED:()=>Hd,ICON_LABEL_COMMENT_OPEN:()=>Ud,ICON_LABEL_DEFAULT:()=>Vd,ICON_LABEL_MUTATOR_CLOSED:()=>Wd,ICON_LABEL_MUTATOR_OPEN:()=>Gd,ICON_LABEL_WARNING_CLOSED:()=>Kd,ICON_LABEL_WARNING_OPEN:()=>qd,INLINE_INPUTS:()=>xe,INPUT_LABEL_CONDITION:()=>vu,INPUT_LABEL_CONDITION_A:()=>yu,INPUT_LABEL_CONDITION_B:()=>bu,INPUT_LABEL_EMPTY:()=>_u,INPUT_LABEL_END_STATEMENT:()=>gu,INPUT_LABEL_INDEX:()=>pu,INPUT_LABEL_LISTS_CREATE_WITH_ITEM:()=>Qu,INPUT_LABEL_LISTS_DELIMITER:()=>cd,INPUT_LABEL_LISTS_END_POSITION:()=>ad,INPUT_LABEL_LISTS_LIST_FROM_TEXT:()=>od,INPUT_LABEL_LISTS_POSITION:()=>rd,INPUT_LABEL_LISTS_REPEAT_ITEM:()=>$u,INPUT_LABEL_LISTS_REPEAT_NUM:()=>ed,INPUT_LABEL_LISTS_START_POSITION:()=>id,INPUT_LABEL_LISTS_TEXT_FROM_LIST:()=>sd,INPUT_LABEL_LISTS_TO_CHANGE:()=>ld,INPUT_LABEL_LISTS_TO_CHECK:()=>td,INPUT_LABEL_LISTS_VALUE_TO_SET:()=>nd,INPUT_LABEL_LOOP_BY:()=>zu,INPUT_LABEL_LOOP_FROM:()=>Lu,INPUT_LABEL_LOOP_LIST:()=>Bu,INPUT_LABEL_LOOP_TIMES:()=>Iu,INPUT_LABEL_LOOP_TO:()=>Ru,INPUT_LABEL_MATH_CHANGE_BY:()=>Au,INPUT_LABEL_MATH_CONSTRAIN_VALUE:()=>ju,INPUT_LABEL_MATH_DIVIDEND:()=>Ou,INPUT_LABEL_MATH_DIVISOR:()=>ku,INPUT_LABEL_NUMBER:()=>Cu,INPUT_LABEL_NUMBER_A:()=>wu,INPUT_LABEL_NUMBER_ATAN2_X:()=>Pu,INPUT_LABEL_NUMBER_ATAN2_Y:()=>Fu,INPUT_LABEL_NUMBER_B:()=>Tu,INPUT_LABEL_NUMBER_LIST:()=>Du,INPUT_LABEL_NUMBER_MAX:()=>Nu,INPUT_LABEL_NUMBER_MIN:()=>Mu,INPUT_LABEL_NUMBER_TO_CHECK:()=>Eu,INPUT_LABEL_STATEMENT:()=>hu,INPUT_LABEL_TEXT_APPEND:()=>Hu,INPUT_LABEL_TEXT_END_POSITION:()=>Yu,INPUT_LABEL_TEXT_JOIN_ITEM:()=>Vu,INPUT_LABEL_TEXT_POSITION:()=>qu,INPUT_LABEL_TEXT_PROMPT_MESSAGE:()=>Xu,INPUT_LABEL_TEXT_START_POSITION:()=>Ju,INPUT_LABEL_TEXT_TO_CHANGE:()=>Uu,INPUT_LABEL_TEXT_TO_CHECK:()=>Wu,INPUT_LABEL_TEXT_TO_FIND:()=>Gu,INPUT_LABEL_TEXT_TO_REPLACE:()=>Ku,INPUT_LABEL_VALUE:()=>mu,INPUT_LABEL_VALUE_A:()=>xu,INPUT_LABEL_VALUE_B:()=>Su,INPUT_LABEL_VARIABLES_SET:()=>Zu,INSERT_KEY:()=>Yc,KEYBOARD_NAV_BLOCK_NAVIGATION_HINT:()=>Zl,KEYBOARD_NAV_CONSTRAINED_MOVE_HINT:()=>Ll,KEYBOARD_NAV_COPIED_HINT:()=>Rl,KEYBOARD_NAV_CUT_HINT:()=>zl,KEYBOARD_NAV_FLYOUT_LABEL_HINT:()=>$l,KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT:()=>Il,KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT:()=>Ql,LINUX:()=>jc,LISTS_CREATE_EMPTY_HELPURL:()=>to,LISTS_CREATE_EMPTY_TITLE:()=>no,LISTS_CREATE_EMPTY_TOOLTIP:()=>ro,LISTS_CREATE_WITH_CONTAINER_TITLE_ADD:()=>so,LISTS_CREATE_WITH_CONTAINER_TOOLTIP:()=>co,LISTS_CREATE_WITH_HELPURL:()=>io,LISTS_CREATE_WITH_INPUT_WITH:()=>oo,LISTS_CREATE_WITH_ITEM_TITLE:()=>lo,LISTS_CREATE_WITH_ITEM_TOOLTIP:()=>uo,LISTS_CREATE_WITH_TOOLTIP:()=>ao,LISTS_GET_INDEX_FIRST:()=>No,LISTS_GET_INDEX_FROM_END:()=>Mo,LISTS_GET_INDEX_FROM_START:()=>jo,LISTS_GET_INDEX_GET:()=>Oo,LISTS_GET_INDEX_GET_REMOVE:()=>ko,LISTS_GET_INDEX_HELPURL:()=>Do,LISTS_GET_INDEX_INPUT_IN_LIST:()=>Lo,LISTS_GET_INDEX_LAST:()=>Po,LISTS_GET_INDEX_RANDOM:()=>Fo,LISTS_GET_INDEX_REMOVE:()=>Ao,LISTS_GET_INDEX_TAIL:()=>Io,LISTS_GET_INDEX_TOOLTIP_GET_FIRST:()=>Vo,LISTS_GET_INDEX_TOOLTIP_GET_FROM:()=>Bo,LISTS_GET_INDEX_TOOLTIP_GET_LAST:()=>Ho,LISTS_GET_INDEX_TOOLTIP_GET_RANDOM:()=>Uo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST:()=>Go,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM:()=>Wo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST:()=>Ko,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM:()=>qo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST:()=>Yo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM:()=>Jo,LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST:()=>Xo,LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM:()=>Zo,LISTS_GET_SUBLIST_END_FROM_END:()=>gs,LISTS_GET_SUBLIST_END_FROM_START:()=>hs,LISTS_GET_SUBLIST_END_LAST:()=>_s,LISTS_GET_SUBLIST_HELPURL:()=>ds,LISTS_GET_SUBLIST_INPUT_IN_LIST:()=>fs,LISTS_GET_SUBLIST_START_FIRST:()=>ms,LISTS_GET_SUBLIST_START_FROM_END:()=>ps,LISTS_GET_SUBLIST_START_FROM_START:()=>F,LISTS_GET_SUBLIST_TAIL:()=>vs,LISTS_GET_SUBLIST_TOOLTIP:()=>ys,LISTS_HUE:()=>he,LISTS_INDEX_FROM_END_TOOLTIP:()=>zo,LISTS_INDEX_FROM_START_TOOLTIP:()=>Ro,LISTS_INDEX_OF_FIRST:()=>wo,LISTS_INDEX_OF_HELPURL:()=>So,LISTS_INDEX_OF_INPUT_IN_LIST:()=>Co,LISTS_INDEX_OF_LAST:()=>To,LISTS_INDEX_OF_TOOLTIP:()=>Eo,LISTS_INLIST:()=>xo,LISTS_ISEMPTY_HELPURL:()=>vo,LISTS_ISEMPTY_TITLE:()=>yo,LISTS_ISEMPTY_TOOLTIP:()=>bo,LISTS_LENGTH_HELPURL:()=>ho,LISTS_LENGTH_TITLE:()=>go,LISTS_LENGTH_TOOLTIP:()=>_o,LISTS_REPEAT_HELPURL:()=>fo,LISTS_REPEAT_TITLE:()=>mo,LISTS_REPEAT_TOOLTIP:()=>po,LISTS_REVERSE_HELPURL:()=>Ps,LISTS_REVERSE_MESSAGE0:()=>Fs,LISTS_REVERSE_TOOLTIP:()=>Is,LISTS_SET_INDEX_HELPURL:()=>Qo,LISTS_SET_INDEX_INPUT_IN_LIST:()=>$o,LISTS_SET_INDEX_INPUT_TO:()=>ns,LISTS_SET_INDEX_INSERT:()=>ts,LISTS_SET_INDEX_SET:()=>es,LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST:()=>cs,LISTS_SET_INDEX_TOOLTIP_INSERT_FROM:()=>ss,LISTS_SET_INDEX_TOOLTIP_INSERT_LAST:()=>ls,LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM:()=>us,LISTS_SET_INDEX_TOOLTIP_SET_FIRST:()=>is,LISTS_SET_INDEX_TOOLTIP_SET_FROM:()=>rs,LISTS_SET_INDEX_TOOLTIP_SET_LAST:()=>as,LISTS_SET_INDEX_TOOLTIP_SET_RANDOM:()=>os,LISTS_SORT_HELPURL:()=>bs,LISTS_SORT_ORDER_ASCENDING:()=>Cs,LISTS_SORT_ORDER_DESCENDING:()=>ws,LISTS_SORT_TITLE:()=>xs,LISTS_SORT_TOOLTIP:()=>Ss,LISTS_SORT_TYPE_IGNORECASE:()=>Ds,LISTS_SORT_TYPE_NUMERIC:()=>Ts,LISTS_SORT_TYPE_TEXT:()=>Es,LISTS_SPLIT_HELPURL:()=>Os,LISTS_SPLIT_LIST_FROM_TEXT:()=>ks,LISTS_SPLIT_TEXT_FROM_LIST:()=>As,LISTS_SPLIT_TOOLTIP_JOIN:()=>Ns,LISTS_SPLIT_TOOLTIP_SPLIT:()=>Ms,LISTS_SPLIT_WITH_DELIMITER:()=>js,LOGIC_BOOLEAN_FALSE:()=>Cn,LOGIC_BOOLEAN_HELPURL:()=>xn,LOGIC_BOOLEAN_TOOLTIP:()=>wn,LOGIC_BOOLEAN_TRUE:()=>Sn,LOGIC_COMPARE_EQ_ARIA:()=>en,LOGIC_COMPARE_GTE_ARIA:()=>dn,LOGIC_COMPARE_GT_ARIA:()=>ln,LOGIC_COMPARE_HELPURL:()=>$t,LOGIC_COMPARE_LTE_ARIA:()=>sn,LOGIC_COMPARE_LT_ARIA:()=>an,LOGIC_COMPARE_NEQ_ARIA:()=>nn,LOGIC_COMPARE_TOOLTIP_EQ:()=>tn,LOGIC_COMPARE_TOOLTIP_GT:()=>un,LOGIC_COMPARE_TOOLTIP_GTE:()=>fn,LOGIC_COMPARE_TOOLTIP_LT:()=>on,LOGIC_COMPARE_TOOLTIP_LTE:()=>cn,LOGIC_COMPARE_TOOLTIP_NEQ:()=>rn,LOGIC_HUE:()=>de,LOGIC_NEGATE_HELPURL:()=>vn,LOGIC_NEGATE_TITLE:()=>yn,LOGIC_NEGATE_TOOLTIP:()=>bn,LOGIC_NULL:()=>En,LOGIC_NULL_HELPURL:()=>Tn,LOGIC_NULL_TOOLTIP:()=>Dn,LOGIC_OPERATION_AND:()=>hn,LOGIC_OPERATION_HELPURL:()=>pn,LOGIC_OPERATION_OR:()=>_n,LOGIC_OPERATION_TOOLTIP_AND:()=>mn,LOGIC_OPERATION_TOOLTIP_OR:()=>gn,LOGIC_TERNARY_CONDITION:()=>kn,LOGIC_TERNARY_HELPURL:()=>On,LOGIC_TERNARY_IF_FALSE:()=>jn,LOGIC_TERNARY_IF_TRUE:()=>An,LOGIC_TERNARY_TOOLTIP:()=>Mn,LOOPS_HUE:()=>fe,MAC_OS:()=>kc,MATH_ADDITION_SYMBOL:()=>Fn,MATH_ADDITION_SYMBOL_ARIA:()=>In,MATH_ARITHMETIC_HELPURL:()=>lr,MATH_ARITHMETIC_TOOLTIP_ADD:()=>ur,MATH_ARITHMETIC_TOOLTIP_DIVIDE:()=>pr,MATH_ARITHMETIC_TOOLTIP_MINUS:()=>dr,MATH_ARITHMETIC_TOOLTIP_MULTIPLY:()=>fr,MATH_ARITHMETIC_TOOLTIP_POWER:()=>mr,MATH_ATAN2_HELPURL:()=>Pi,MATH_ATAN2_TITLE:()=>Fi,MATH_ATAN2_TOOLTIP:()=>Ii,MATH_CHANGE_HELPURL:()=>Jr,MATH_CHANGE_TITLE:()=>Yr,MATH_CHANGE_TITLE_ITEM:()=>Xr,MATH_CHANGE_TOOLTIP:()=>Zr,MATH_CONSTANT_E_ARIA:()=>ir,MATH_CONSTANT_GOLDEN_RATIO_ARIA:()=>ar,MATH_CONSTANT_HELPURL:()=>Rr,MATH_CONSTANT_INFINITY_ARIA:()=>cr,MATH_CONSTANT_PI_ARIA:()=>rr,MATH_CONSTANT_SQRT1_2_ARIA:()=>sr,MATH_CONSTANT_SQRT2_ARIA:()=>or,MATH_CONSTANT_TOOLTIP:()=>zr,MATH_CONSTRAIN_HELPURL:()=>Ti,MATH_CONSTRAIN_TITLE:()=>Ei,MATH_CONSTRAIN_TOOLTIP:()=>Di,MATH_DIVISION_SYMBOL:()=>zn,MATH_DIVISION_SYMBOL_ARIA:()=>Bn,MATH_HUE:()=>pe,MATH_IS_DIVISIBLE_BY:()=>Kr,MATH_IS_EVEN:()=>Br,MATH_IS_NEGATIVE:()=>Gr,MATH_IS_ODD:()=>Vr,MATH_IS_POSITIVE:()=>Wr,MATH_IS_PRIME:()=>Hr,MATH_IS_TOOLTIP:()=>qr,MATH_IS_WHOLE:()=>Ur,MATH_MODULO_HELPURL:()=>Si,MATH_MODULO_TITLE:()=>Ci,MATH_MODULO_TOOLTIP:()=>wi,MATH_MULTIPLICATION_SYMBOL:()=>Vn,MATH_MULTIPLICATION_SYMBOL_ARIA:()=>Hn,MATH_NUMBER_HELPURL:()=>Nn,MATH_NUMBER_TOOLTIP:()=>Pn,MATH_ONLIST_HELPURL:()=>ri,MATH_ONLIST_OPERATOR_AVERAGE:()=>fi,MATH_ONLIST_OPERATOR_MAX:()=>li,MATH_ONLIST_OPERATOR_MAX_ARIA:()=>ui,MATH_ONLIST_OPERATOR_MEDIAN:()=>mi,MATH_ONLIST_OPERATOR_MIN:()=>oi,MATH_ONLIST_OPERATOR_MIN_ARIA:()=>si,MATH_ONLIST_OPERATOR_MODE:()=>gi,MATH_ONLIST_OPERATOR_RANDOM:()=>bi,MATH_ONLIST_OPERATOR_STD_DEV:()=>vi,MATH_ONLIST_OPERATOR_SUM:()=>ii,MATH_ONLIST_TOOLTIP_AVERAGE:()=>pi,MATH_ONLIST_TOOLTIP_MAX:()=>di,MATH_ONLIST_TOOLTIP_MEDIAN:()=>hi,MATH_ONLIST_TOOLTIP_MIN:()=>ci,MATH_ONLIST_TOOLTIP_MODE:()=>_i,MATH_ONLIST_TOOLTIP_RANDOM:()=>xi,MATH_ONLIST_TOOLTIP_STD_DEV:()=>yi,MATH_ONLIST_TOOLTIP_SUM:()=>ai,MATH_POWER_SYMBOL:()=>Un,MATH_POWER_SYMBOL_ARIA:()=>Wn,MATH_RANDOM_FLOAT_HELPURL:()=>ji,MATH_RANDOM_FLOAT_TITLE_RANDOM:()=>Mi,MATH_RANDOM_FLOAT_TOOLTIP:()=>Ni,MATH_RANDOM_INT_HELPURL:()=>Oi,MATH_RANDOM_INT_TITLE:()=>ki,MATH_RANDOM_INT_TOOLTIP:()=>Ai,MATH_ROUND_HELPURL:()=>Qr,MATH_ROUND_OPERATOR_ROUND:()=>ei,MATH_ROUND_OPERATOR_ROUNDDOWN:()=>ni,MATH_ROUND_OPERATOR_ROUNDUP:()=>ti,MATH_ROUND_TOOLTIP:()=>$r,MATH_SINGLE_HELPURL:()=>hr,MATH_SINGLE_OP_ABSOLUTE:()=>vr,MATH_SINGLE_OP_ABSOLUTE_ARIA:()=>yr,MATH_SINGLE_OP_EXP_ARIA:()=>wr,MATH_SINGLE_OP_LN_ARIA:()=>Sr,MATH_SINGLE_OP_LOG10_ARIA:()=>Cr,MATH_SINGLE_OP_NEG_ARIA:()=>xr,MATH_SINGLE_OP_POW10_ARIA:()=>Tr,MATH_SINGLE_OP_ROOT:()=>gr,MATH_SINGLE_TOOLTIP_ABS:()=>br,MATH_SINGLE_TOOLTIP_EXP:()=>kr,MATH_SINGLE_TOOLTIP_LN:()=>Dr,MATH_SINGLE_TOOLTIP_LOG10:()=>Or,MATH_SINGLE_TOOLTIP_NEG:()=>Er,MATH_SINGLE_TOOLTIP_POW10:()=>Ar,MATH_SINGLE_TOOLTIP_ROOT:()=>_r,MATH_SUBTRACTION_SYMBOL:()=>Ln,MATH_SUBTRACTION_SYMBOL_ARIA:()=>Rn,MATH_TRIG_ACOS:()=>$n,MATH_TRIG_ACOS_ARIA:()=>er,MATH_TRIG_ASIN:()=>Zn,MATH_TRIG_ASIN_ARIA:()=>Qn,MATH_TRIG_ATAN:()=>tr,MATH_TRIG_ATAN_ARIA:()=>nr,MATH_TRIG_COS:()=>qn,MATH_TRIG_COS_ARIA:()=>Jn,MATH_TRIG_HELPURL:()=>jr,MATH_TRIG_SIN:()=>Gn,MATH_TRIG_SIN_ARIA:()=>Kn,MATH_TRIG_TAN:()=>Yn,MATH_TRIG_TAN_ARIA:()=>Xn,MATH_TRIG_TOOLTIP_ACOS:()=>Ir,MATH_TRIG_TOOLTIP_ASIN:()=>Fr,MATH_TRIG_TOOLTIP_ATAN:()=>Lr,MATH_TRIG_TOOLTIP_COS:()=>Nr,MATH_TRIG_TOOLTIP_SIN:()=>Mr,MATH_TRIG_TOOLTIP_TAN:()=>Pr,MINIMAP_ARIA_LABEL:()=>Pf,MOVE_BLOCK:()=>Dc,NEW_COLOUR_VARIABLE:()=>He,NEW_NUMBER_VARIABLE:()=>Ve,NEW_STRING_VARIABLE:()=>Be,NEW_VARIABLE:()=>ze,NEW_VARIABLE_TITLE:()=>We,NEW_VARIABLE_TYPE_TITLE:()=>Ue,NO_PARENT_ANNOUNCEMENT:()=>tf,OPEN_BACKPACK:()=>wf,OPEN_TRASH:()=>Od,OPTION_KEY:()=>Fc,ORDINAL_NUMBER_SUFFIX:()=>Ls,PAGE_DOWN_KEY:()=>Kc,PAGE_UP_KEY:()=>Gc,PARENT_BLOCKS_ANNOUNCEMENT:()=>ef,PASTE_ALL_FROM_BACKPACK:()=>kf,PASTE_SHORTCUT:()=>el,PAUSE_KEY:()=>Xc,PROCEDURES_ALLOW_STATEMENTS:()=>sc,PROCEDURES_BEFORE_PARAMS:()=>Js,PROCEDURES_CALLNORETURN_HELPURL:()=>lc,PROCEDURES_CALLNORETURN_TOOLTIP:()=>uc,PROCEDURES_CALLRETURN_HELPURL:()=>dc,PROCEDURES_CALLRETURN_TOOLTIP:()=>fc,PROCEDURES_CALL_BEFORE_PARAMS:()=>Ys,PROCEDURES_CALL_DISABLED_DEF_WARNING:()=>Xs,PROCEDURES_CREATE_DO:()=>vc,PROCEDURES_DEFNORETURN_COMMENT:()=>$s,PROCEDURES_DEFNORETURN_DO:()=>Zs,PROCEDURES_DEFNORETURN_HELPURL:()=>Gs,PROCEDURES_DEFNORETURN_PROCEDURE:()=>qs,PROCEDURES_DEFNORETURN_TITLE:()=>Ks,PROCEDURES_DEFNORETURN_TOOLTIP:()=>Qs,PROCEDURES_DEFRETURN_COMMENT:()=>ic,PROCEDURES_DEFRETURN_DO:()=>rc,PROCEDURES_DEFRETURN_HELPURL:()=>ec,PROCEDURES_DEFRETURN_PROCEDURE:()=>nc,PROCEDURES_DEFRETURN_RETURN:()=>ac,PROCEDURES_DEFRETURN_TITLE:()=>tc,PROCEDURES_DEFRETURN_TOOLTIP:()=>oc,PROCEDURES_DEF_DUPLICATE_WARNING:()=>cc,PROCEDURES_HIGHLIGHT_DEF:()=>_c,PROCEDURES_HUE:()=>ye,PROCEDURES_IFRETURN_HELPURL:()=>bc,PROCEDURES_IFRETURN_TOOLTIP:()=>yc,PROCEDURES_IFRETURN_WARNING:()=>xc,PROCEDURES_MUTATORARG_TITLE:()=>hc,PROCEDURES_MUTATORARG_TOOLTIP:()=>gc,PROCEDURES_MUTATORCONTAINER_TITLE:()=>pc,PROCEDURES_MUTATORCONTAINER_TOOLTIP:()=>mc,REDO:()=>Fe,REMOVE_COMMENT:()=>N,REMOVE_FROM_BACKPACK:()=>Af,RENAME_VARIABLE:()=>Le,RENAME_VARIABLE_TITLE:()=>Re,RESET_ZOOM:()=>jd,SCREENREADER_HINT:()=>nf,SCREENREADER_MODE_DISABLED:()=>Qd,SCREENREADER_MODE_ENABLED:()=>Zd,SHIFT_KEY:()=>Hc,SHORTCUTS_ABORT_MOVE:()=>ml,SHORTCUTS_CLEANUP:()=>Dl,SHORTCUTS_CODE_NAVIGATION:()=>il,SHORTCUTS_DELETE:()=>ol,SHORTCUTS_DISCONNECT:()=>bl,SHORTCUTS_DUPLICATE:()=>El,SHORTCUTS_EDITING:()=>rl,SHORTCUTS_ESCAPE:()=>al,SHORTCUTS_EXTENDED_INFORMATION:()=>yl,SHORTCUTS_FINISH_MOVE:()=>pl,SHORTCUTS_FOCUS_TOOLBOX:()=>_l,SHORTCUTS_FOCUS_WORKSPACE:()=>gl,SHORTCUTS_GENERAL:()=>nl,SHORTCUTS_INFORMATION:()=>vl,SHORTCUTS_JUMP_BLOCK_END:()=>jl,SHORTCUTS_JUMP_BLOCK_START:()=>Al,SHORTCUTS_JUMP_BOTTOM_STACK:()=>Nl,SHORTCUTS_JUMP_FIRST_BLOCK:()=>Pl,SHORTCUTS_JUMP_LAST_BLOCK:()=>Fl,SHORTCUTS_JUMP_TOP_STACK:()=>Ml,SHORTCUTS_MOVE_DOWN:()=>fl,SHORTCUTS_MOVE_LEFT:()=>ll,SHORTCUTS_MOVE_RIGHT:()=>ul,SHORTCUTS_MOVE_UP:()=>dl,SHORTCUTS_NEXT_HEADING:()=>Cl,SHORTCUTS_NEXT_STACK:()=>xl,SHORTCUTS_PERFORM_ACTION:()=>Tl,SHORTCUTS_PREVIOUS_HEADING:()=>wl,SHORTCUTS_PREVIOUS_STACK:()=>Sl,SHORTCUTS_SHOW_CONTEXT_MENU:()=>hl,SHORTCUTS_SHOW_TOOLTIP:()=>Ol,SHORTCUTS_START_MOVE:()=>sl,SHORTCUTS_START_MOVE_STACK:()=>cl,SHORTCUTS_TOGGLE_SCREENREADER_MODE:()=>kl,SPACE_KEY:()=>Wc,TAB_KEY:()=>Vc,TEXTS_HUE:()=>me,TEXT_APPEND_HELPURL:()=>Ki,TEXT_APPEND_TITLE:()=>qi,TEXT_APPEND_TOOLTIP:()=>Yi,TEXT_APPEND_VARIABLE:()=>Ji,TEXT_CHANGECASE_HELPURL:()=>Oa,TEXT_CHANGECASE_OPERATOR_LOWERCASE:()=>ja,TEXT_CHANGECASE_OPERATOR_TITLECASE:()=>Ma,TEXT_CHANGECASE_OPERATOR_UPPERCASE:()=>Aa,TEXT_CHANGECASE_TOOLTIP:()=>ka,TEXT_CHARAT_FIRST:()=>pa,TEXT_CHARAT_FROM_END:()=>fa,TEXT_CHARAT_FROM_START:()=>da,TEXT_CHARAT_HELPURL:()=>la,TEXT_CHARAT_LAST:()=>ma,TEXT_CHARAT_RANDOM:()=>ha,TEXT_CHARAT_TAIL:()=>ga,TEXT_CHARAT_TITLE:()=>ua,TEXT_CHARAT_TOOLTIP:()=>_a,TEXT_COUNT_HELPURL:()=>qa,TEXT_COUNT_MESSAGE0:()=>Ka,TEXT_COUNT_TOOLTIP:()=>Ja,TEXT_CREATE_JOIN_ITEM_TITLE_ITEM:()=>Wi,TEXT_CREATE_JOIN_ITEM_TOOLTIP:()=>Gi,TEXT_CREATE_JOIN_TITLE_JOIN:()=>Hi,TEXT_CREATE_JOIN_TOOLTIP:()=>Ui,TEXT_FROM_END_ARIA:()=>ca,TEXT_FROM_START_ARIA:()=>sa,TEXT_GET_SUBSTRING_END_FROM_END:()=>Ta,TEXT_GET_SUBSTRING_END_FROM_START:()=>wa,TEXT_GET_SUBSTRING_END_LAST:()=>Ea,TEXT_GET_SUBSTRING_HELPURL:()=>ya,TEXT_GET_SUBSTRING_INPUT_IN_TEXT:()=>ba,TEXT_GET_SUBSTRING_START_FIRST:()=>Ca,TEXT_GET_SUBSTRING_START_FROM_END:()=>Sa,TEXT_GET_SUBSTRING_START_FROM_START:()=>xa,TEXT_GET_SUBSTRING_TAIL:()=>Da,TEXT_GET_SUBSTRING_TOOLTIP:()=>va,TEXT_INDEXOF_HELPURL:()=>na,TEXT_INDEXOF_OPERATOR_FIRST:()=>aa,TEXT_INDEXOF_OPERATOR_LAST:()=>oa,TEXT_INDEXOF_TITLE:()=>ia,TEXT_INDEXOF_TOOLTIP:()=>ra,TEXT_ISEMPTY_HELPURL:()=>$i,TEXT_ISEMPTY_TITLE:()=>ea,TEXT_ISEMPTY_TOOLTIP:()=>ta,TEXT_JOIN_HELPURL:()=>zi,TEXT_JOIN_TITLE_CREATEWITH:()=>Bi,TEXT_JOIN_TOOLTIP:()=>Vi,TEXT_LENGTH_HELPURL:()=>Xi,TEXT_LENGTH_TITLE:()=>Zi,TEXT_LENGTH_TOOLTIP:()=>Qi,TEXT_PRINT_HELPURL:()=>Ra,TEXT_PRINT_TITLE:()=>za,TEXT_PRINT_TOOLTIP:()=>Ba,TEXT_PROMPT_HELPURL:()=>Va,TEXT_PROMPT_TOOLTIP_NUMBER:()=>Wa,TEXT_PROMPT_TOOLTIP_TEXT:()=>Ga,TEXT_PROMPT_TYPE_NUMBER:()=>Ua,TEXT_PROMPT_TYPE_TEXT:()=>Ha,TEXT_REPLACE_HELPURL:()=>Xa,TEXT_REPLACE_MESSAGE0:()=>Ya,TEXT_REPLACE_TOOLTIP:()=>Za,TEXT_REVERSE_HELPURL:()=>$a,TEXT_REVERSE_MESSAGE0:()=>Qa,TEXT_REVERSE_TOOLTIP:()=>eo,TEXT_TEXT_HELPURL:()=>Li,TEXT_TEXT_TOOLTIP:()=>Ri,TEXT_TRIM_HELPURL:()=>Na,TEXT_TRIM_OPERATOR_BOTH:()=>Fa,TEXT_TRIM_OPERATOR_LEFT:()=>Ia,TEXT_TRIM_OPERATOR_RIGHT:()=>La,TEXT_TRIM_TOOLTIP:()=>Pa,TODAY:()=>A,UNDO:()=>Pe,UNKNOWN:()=>Mc,UNNAMED_KEY:()=>k,VARIABLES_DEFAULT_NAME:()=>O,VARIABLES_DYNAMIC_HUE:()=>ve,VARIABLES_GET_CREATE_SET:()=>Bs,VARIABLES_GET_HELPURL:()=>Rs,VARIABLES_GET_TOOLTIP:()=>zs,VARIABLES_HUE:()=>_e,VARIABLES_SET:()=>Hs,VARIABLES_SET_CREATE_GET:()=>Ws,VARIABLES_SET_HELPURL:()=>Vs,VARIABLES_SET_TOOLTIP:()=>Us,VARIABLE_ALREADY_EXISTS:()=>Ge,VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE:()=>Ke,VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER:()=>qe,WINDOWS:()=>Oc,WORKSPACE_COMMENT_DEFAULT_TEXT:()=>Sc,WORKSPACE_CONTENTS_BLOCKS_MANY:()=>Kl,WORKSPACE_CONTENTS_BLOCKS_ONE:()=>ql,WORKSPACE_CONTENTS_BLOCKS_ZERO:()=>Jl,WORKSPACE_CONTENTS_COMMENTS_MANY:()=>Yl,WORKSPACE_CONTENTS_COMMENTS_ONE:()=>Xl,WORKSPACE_LABEL_1_STACK:()=>Hl,WORKSPACE_LABEL_FLYOUT_WORKSPACE:()=>Gl,WORKSPACE_LABEL_MANY_STACKS:()=>Ul,WORKSPACE_LABEL_MUTATOR_WORKSPACE:()=>Wl,WORKSPACE_LABEL_PLAIN:()=>Bl,WORKSPACE_ROLEDESCRIPTION:()=>Vl,ZOOM_IN:()=>kd,ZOOM_OUT:()=>Ad,ZOOM_TO_FIT_ARIA_LABEL:()=>Nf}),{LOGIC_HUE:de,LOOPS_HUE:fe,MATH_HUE:pe,TEXTS_HUE:me,LISTS_HUE:he,COLOUR_HUE:ge,VARIABLES_HUE:_e,VARIABLES_DYNAMIC_HUE:ve,PROCEDURES_HUE:ye,VARIABLES_DEFAULT_NAME:O,UNNAMED_KEY:k,TODAY:A,DUPLICATE_BLOCK:j,ADD_COMMENT:M,REMOVE_COMMENT:N,DUPLICATE_COMMENT:P,EXTERNAL_INPUTS:be,INLINE_INPUTS:xe,DELETE_BLOCK:Se,DELETE_X_BLOCKS:Ce,DELETE_ALL_BLOCKS:we,CLEAN_UP:Te,CLOSE:Ee,COLLAPSE_BLOCK:De,COLLAPSE_ALL:Oe,EXPAND_BLOCK:ke,EXPAND_ALL:Ae,DISABLE_BLOCK:je,ENABLE_BLOCK:Me,HELP:Ne,UNDO:Pe,REDO:Fe,CHANGE_VALUE_TITLE:Ie,RENAME_VARIABLE:Le,RENAME_VARIABLE_TITLE:Re,NEW_VARIABLE:ze,NEW_STRING_VARIABLE:Be,NEW_NUMBER_VARIABLE:Ve,NEW_COLOUR_VARIABLE:He,NEW_VARIABLE_TYPE_TITLE:Ue,NEW_VARIABLE_TITLE:We,VARIABLE_ALREADY_EXISTS:Ge,VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE:Ke,VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER:qe,DELETE_VARIABLE_CONFIRMATION:Je,CANNOT_DELETE_VARIABLE_PROCEDURE:Ye,DELETE_VARIABLE:Xe,COLOUR_PICKER_HELPURL:Ze,COLOUR_PICKER_TOOLTIP:Qe,COLOUR_RANDOM_HELPURL:$e,COLOUR_RANDOM_TITLE:et,COLOUR_RANDOM_TOOLTIP:tt,COLOUR_RGB_HELPURL:nt,COLOUR_RGB_TITLE:rt,COLOUR_RGB_RED:it,COLOUR_RGB_GREEN:at,COLOUR_RGB_BLUE:ot,COLOUR_RGB_TOOLTIP:st,COLOUR_BLEND_HELPURL:ct,COLOUR_BLEND_TITLE:lt,COLOUR_BLEND_COLOUR1:ut,COLOUR_BLEND_COLOUR2:dt,COLOUR_BLEND_RATIO:ft,COLOUR_BLEND_TOOLTIP:pt,CONTROLS_REPEAT_HELPURL:mt,CONTROLS_REPEAT_TITLE:ht,CONTROLS_REPEAT_INPUT_DO:gt,CONTROLS_REPEAT_TOOLTIP:_t,CONTROLS_WHILEUNTIL_HELPURL:vt,CONTROLS_WHILEUNTIL_INPUT_DO:yt,CONTROLS_WHILEUNTIL_OPERATOR_WHILE:bt,CONTROLS_WHILEUNTIL_OPERATOR_UNTIL:xt,CONTROLS_WHILEUNTIL_TOOLTIP_WHILE:St,CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL:Ct,CONTROLS_FOR_HELPURL:wt,CONTROLS_FOR_TOOLTIP:Tt,CONTROLS_FOR_TITLE:Et,CONTROLS_FOR_INPUT_DO:Dt,CONTROLS_FOREACH_HELPURL:Ot,CONTROLS_FOREACH_TITLE:kt,CONTROLS_FOREACH_INPUT_DO:At,CONTROLS_FOREACH_TOOLTIP:jt,CONTROLS_FLOW_STATEMENTS_HELPURL:Mt,CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK:Nt,CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE:Pt,CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK:Ft,CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE:It,CONTROLS_FLOW_STATEMENTS_WARNING:Lt,CONTROLS_IF_HELPURL:Rt,CONTROLS_IF_TOOLTIP_1:zt,CONTROLS_IF_TOOLTIP_2:Bt,CONTROLS_IF_TOOLTIP_3:Vt,CONTROLS_IF_TOOLTIP_4:Ht,CONTROLS_IF_MSG_IF:Ut,CONTROLS_IF_MSG_ELSEIF:Wt,CONTROLS_IF_MSG_ELSE:Gt,CONTROLS_IF_MSG_THEN:Kt,CONTROLS_IF_IF_TITLE_IF:qt,CONTROLS_IF_IF_TOOLTIP:Jt,CONTROLS_IF_ELSEIF_TITLE_ELSEIF:Yt,CONTROLS_IF_ELSEIF_TOOLTIP:Xt,CONTROLS_IF_ELSE_TITLE_ELSE:Zt,CONTROLS_IF_ELSE_TOOLTIP:Qt,LOGIC_COMPARE_HELPURL:$t,LOGIC_COMPARE_EQ_ARIA:en,LOGIC_COMPARE_TOOLTIP_EQ:tn,LOGIC_COMPARE_NEQ_ARIA:nn,LOGIC_COMPARE_TOOLTIP_NEQ:rn,LOGIC_COMPARE_LT_ARIA:an,LOGIC_COMPARE_TOOLTIP_LT:on,LOGIC_COMPARE_LTE_ARIA:sn,LOGIC_COMPARE_TOOLTIP_LTE:cn,LOGIC_COMPARE_GT_ARIA:ln,LOGIC_COMPARE_TOOLTIP_GT:un,LOGIC_COMPARE_GTE_ARIA:dn,LOGIC_COMPARE_TOOLTIP_GTE:fn,LOGIC_OPERATION_HELPURL:pn,LOGIC_OPERATION_TOOLTIP_AND:mn,LOGIC_OPERATION_AND:hn,LOGIC_OPERATION_TOOLTIP_OR:gn,LOGIC_OPERATION_OR:_n,LOGIC_NEGATE_HELPURL:vn,LOGIC_NEGATE_TITLE:yn,LOGIC_NEGATE_TOOLTIP:bn,LOGIC_BOOLEAN_HELPURL:xn,LOGIC_BOOLEAN_TRUE:Sn,LOGIC_BOOLEAN_FALSE:Cn,LOGIC_BOOLEAN_TOOLTIP:wn,LOGIC_NULL_HELPURL:Tn,LOGIC_NULL:En,LOGIC_NULL_TOOLTIP:Dn,LOGIC_TERNARY_HELPURL:On,LOGIC_TERNARY_CONDITION:kn,LOGIC_TERNARY_IF_TRUE:An,LOGIC_TERNARY_IF_FALSE:jn,LOGIC_TERNARY_TOOLTIP:Mn,MATH_NUMBER_HELPURL:Nn,MATH_NUMBER_TOOLTIP:Pn,MATH_ADDITION_SYMBOL:Fn,MATH_ADDITION_SYMBOL_ARIA:In,MATH_SUBTRACTION_SYMBOL:Ln,MATH_SUBTRACTION_SYMBOL_ARIA:Rn,MATH_DIVISION_SYMBOL:zn,MATH_DIVISION_SYMBOL_ARIA:Bn,MATH_MULTIPLICATION_SYMBOL:Vn,MATH_MULTIPLICATION_SYMBOL_ARIA:Hn,MATH_POWER_SYMBOL:Un,MATH_POWER_SYMBOL_ARIA:Wn,MATH_TRIG_SIN:Gn,MATH_TRIG_SIN_ARIA:Kn,MATH_TRIG_COS:qn,MATH_TRIG_COS_ARIA:Jn,MATH_TRIG_TAN:Yn,MATH_TRIG_TAN_ARIA:Xn,MATH_TRIG_ASIN:Zn,MATH_TRIG_ASIN_ARIA:Qn,MATH_TRIG_ACOS:$n,MATH_TRIG_ACOS_ARIA:er,MATH_TRIG_ATAN:tr,MATH_TRIG_ATAN_ARIA:nr,MATH_CONSTANT_PI_ARIA:rr,MATH_CONSTANT_E_ARIA:ir,MATH_CONSTANT_GOLDEN_RATIO_ARIA:ar,MATH_CONSTANT_SQRT2_ARIA:or,MATH_CONSTANT_SQRT1_2_ARIA:sr,MATH_CONSTANT_INFINITY_ARIA:cr,MATH_ARITHMETIC_HELPURL:lr,MATH_ARITHMETIC_TOOLTIP_ADD:ur,MATH_ARITHMETIC_TOOLTIP_MINUS:dr,MATH_ARITHMETIC_TOOLTIP_MULTIPLY:fr,MATH_ARITHMETIC_TOOLTIP_DIVIDE:pr,MATH_ARITHMETIC_TOOLTIP_POWER:mr,MATH_SINGLE_HELPURL:hr,MATH_SINGLE_OP_ROOT:gr,MATH_SINGLE_TOOLTIP_ROOT:_r,MATH_SINGLE_OP_ABSOLUTE:vr,MATH_SINGLE_OP_ABSOLUTE_ARIA:yr,MATH_SINGLE_TOOLTIP_ABS:br,MATH_SINGLE_OP_NEG_ARIA:xr,MATH_SINGLE_OP_LN_ARIA:Sr,MATH_SINGLE_OP_LOG10_ARIA:Cr,MATH_SINGLE_OP_EXP_ARIA:wr,MATH_SINGLE_OP_POW10_ARIA:Tr,MATH_SINGLE_TOOLTIP_NEG:Er,MATH_SINGLE_TOOLTIP_LN:Dr,MATH_SINGLE_TOOLTIP_LOG10:Or,MATH_SINGLE_TOOLTIP_EXP:kr,MATH_SINGLE_TOOLTIP_POW10:Ar,MATH_TRIG_HELPURL:jr,MATH_TRIG_TOOLTIP_SIN:Mr,MATH_TRIG_TOOLTIP_COS:Nr,MATH_TRIG_TOOLTIP_TAN:Pr,MATH_TRIG_TOOLTIP_ASIN:Fr,MATH_TRIG_TOOLTIP_ACOS:Ir,MATH_TRIG_TOOLTIP_ATAN:Lr,MATH_CONSTANT_HELPURL:Rr,MATH_CONSTANT_TOOLTIP:zr,MATH_IS_EVEN:Br,MATH_IS_ODD:Vr,MATH_IS_PRIME:Hr,MATH_IS_WHOLE:Ur,MATH_IS_POSITIVE:Wr,MATH_IS_NEGATIVE:Gr,MATH_IS_DIVISIBLE_BY:Kr,MATH_IS_TOOLTIP:qr,MATH_CHANGE_HELPURL:Jr,MATH_CHANGE_TITLE:Yr,MATH_CHANGE_TITLE_ITEM:Xr,MATH_CHANGE_TOOLTIP:Zr,MATH_ROUND_HELPURL:Qr,MATH_ROUND_TOOLTIP:$r,MATH_ROUND_OPERATOR_ROUND:ei,MATH_ROUND_OPERATOR_ROUNDUP:ti,MATH_ROUND_OPERATOR_ROUNDDOWN:ni,MATH_ONLIST_HELPURL:ri,MATH_ONLIST_OPERATOR_SUM:ii,MATH_ONLIST_TOOLTIP_SUM:ai,MATH_ONLIST_OPERATOR_MIN:oi,MATH_ONLIST_OPERATOR_MIN_ARIA:si,MATH_ONLIST_TOOLTIP_MIN:ci,MATH_ONLIST_OPERATOR_MAX:li,MATH_ONLIST_OPERATOR_MAX_ARIA:ui,MATH_ONLIST_TOOLTIP_MAX:di,MATH_ONLIST_OPERATOR_AVERAGE:fi,MATH_ONLIST_TOOLTIP_AVERAGE:pi,MATH_ONLIST_OPERATOR_MEDIAN:mi,MATH_ONLIST_TOOLTIP_MEDIAN:hi,MATH_ONLIST_OPERATOR_MODE:gi,MATH_ONLIST_TOOLTIP_MODE:_i,MATH_ONLIST_OPERATOR_STD_DEV:vi,MATH_ONLIST_TOOLTIP_STD_DEV:yi,MATH_ONLIST_OPERATOR_RANDOM:bi,MATH_ONLIST_TOOLTIP_RANDOM:xi,MATH_MODULO_HELPURL:Si,MATH_MODULO_TITLE:Ci,MATH_MODULO_TOOLTIP:wi,MATH_CONSTRAIN_HELPURL:Ti,MATH_CONSTRAIN_TITLE:Ei,MATH_CONSTRAIN_TOOLTIP:Di,MATH_RANDOM_INT_HELPURL:Oi,MATH_RANDOM_INT_TITLE:ki,MATH_RANDOM_INT_TOOLTIP:Ai,MATH_RANDOM_FLOAT_HELPURL:ji,MATH_RANDOM_FLOAT_TITLE_RANDOM:Mi,MATH_RANDOM_FLOAT_TOOLTIP:Ni,MATH_ATAN2_HELPURL:Pi,MATH_ATAN2_TITLE:Fi,MATH_ATAN2_TOOLTIP:Ii,TEXT_TEXT_HELPURL:Li,TEXT_TEXT_TOOLTIP:Ri,TEXT_JOIN_HELPURL:zi,TEXT_JOIN_TITLE_CREATEWITH:Bi,TEXT_JOIN_TOOLTIP:Vi,TEXT_CREATE_JOIN_TITLE_JOIN:Hi,TEXT_CREATE_JOIN_TOOLTIP:Ui,TEXT_CREATE_JOIN_ITEM_TITLE_ITEM:Wi,TEXT_CREATE_JOIN_ITEM_TOOLTIP:Gi,TEXT_APPEND_HELPURL:Ki,TEXT_APPEND_TITLE:qi,TEXT_APPEND_VARIABLE:Ji,TEXT_APPEND_TOOLTIP:Yi,TEXT_LENGTH_HELPURL:Xi,TEXT_LENGTH_TITLE:Zi,TEXT_LENGTH_TOOLTIP:Qi,TEXT_ISEMPTY_HELPURL:$i,TEXT_ISEMPTY_TITLE:ea,TEXT_ISEMPTY_TOOLTIP:ta,TEXT_INDEXOF_HELPURL:na,TEXT_INDEXOF_TOOLTIP:ra,TEXT_INDEXOF_TITLE:ia,TEXT_INDEXOF_OPERATOR_FIRST:aa,TEXT_INDEXOF_OPERATOR_LAST:oa,TEXT_FROM_START_ARIA:sa,TEXT_FROM_END_ARIA:ca,TEXT_CHARAT_HELPURL:la,TEXT_CHARAT_TITLE:ua,TEXT_CHARAT_FROM_START:da,TEXT_CHARAT_FROM_END:fa,TEXT_CHARAT_FIRST:pa,TEXT_CHARAT_LAST:ma,TEXT_CHARAT_RANDOM:ha,TEXT_CHARAT_TAIL:ga,TEXT_CHARAT_TOOLTIP:_a,TEXT_GET_SUBSTRING_TOOLTIP:va,TEXT_GET_SUBSTRING_HELPURL:ya,TEXT_GET_SUBSTRING_INPUT_IN_TEXT:ba,TEXT_GET_SUBSTRING_START_FROM_START:xa,TEXT_GET_SUBSTRING_START_FROM_END:Sa,TEXT_GET_SUBSTRING_START_FIRST:Ca,TEXT_GET_SUBSTRING_END_FROM_START:wa,TEXT_GET_SUBSTRING_END_FROM_END:Ta,TEXT_GET_SUBSTRING_END_LAST:Ea,TEXT_GET_SUBSTRING_TAIL:Da,TEXT_CHANGECASE_HELPURL:Oa,TEXT_CHANGECASE_TOOLTIP:ka,TEXT_CHANGECASE_OPERATOR_UPPERCASE:Aa,TEXT_CHANGECASE_OPERATOR_LOWERCASE:ja,TEXT_CHANGECASE_OPERATOR_TITLECASE:Ma,TEXT_TRIM_HELPURL:Na,TEXT_TRIM_TOOLTIP:Pa,TEXT_TRIM_OPERATOR_BOTH:Fa,TEXT_TRIM_OPERATOR_LEFT:Ia,TEXT_TRIM_OPERATOR_RIGHT:La,TEXT_PRINT_HELPURL:Ra,TEXT_PRINT_TITLE:za,TEXT_PRINT_TOOLTIP:Ba,TEXT_PROMPT_HELPURL:Va,TEXT_PROMPT_TYPE_TEXT:Ha,TEXT_PROMPT_TYPE_NUMBER:Ua,TEXT_PROMPT_TOOLTIP_NUMBER:Wa,TEXT_PROMPT_TOOLTIP_TEXT:Ga,TEXT_COUNT_MESSAGE0:Ka,TEXT_COUNT_HELPURL:qa,TEXT_COUNT_TOOLTIP:Ja,TEXT_REPLACE_MESSAGE0:Ya,TEXT_REPLACE_HELPURL:Xa,TEXT_REPLACE_TOOLTIP:Za,TEXT_REVERSE_MESSAGE0:Qa,TEXT_REVERSE_HELPURL:$a,TEXT_REVERSE_TOOLTIP:eo,LISTS_CREATE_EMPTY_HELPURL:to,LISTS_CREATE_EMPTY_TITLE:no,LISTS_CREATE_EMPTY_TOOLTIP:ro,LISTS_CREATE_WITH_HELPURL:io,LISTS_CREATE_WITH_TOOLTIP:ao,LISTS_CREATE_WITH_INPUT_WITH:oo,LISTS_CREATE_WITH_CONTAINER_TITLE_ADD:so,LISTS_CREATE_WITH_CONTAINER_TOOLTIP:co,LISTS_CREATE_WITH_ITEM_TITLE:lo,LISTS_CREATE_WITH_ITEM_TOOLTIP:uo,LISTS_REPEAT_HELPURL:fo,LISTS_REPEAT_TOOLTIP:po,LISTS_REPEAT_TITLE:mo,LISTS_LENGTH_HELPURL:ho,LISTS_LENGTH_TITLE:go,LISTS_LENGTH_TOOLTIP:_o,LISTS_ISEMPTY_HELPURL:vo,LISTS_ISEMPTY_TITLE:yo,LISTS_ISEMPTY_TOOLTIP:bo,LISTS_INLIST:xo,LISTS_INDEX_OF_HELPURL:So,LISTS_INDEX_OF_INPUT_IN_LIST:Co,LISTS_INDEX_OF_FIRST:wo,LISTS_INDEX_OF_LAST:To,LISTS_INDEX_OF_TOOLTIP:Eo,LISTS_GET_INDEX_HELPURL:Do,LISTS_GET_INDEX_GET:Oo,LISTS_GET_INDEX_GET_REMOVE:ko,LISTS_GET_INDEX_REMOVE:Ao,LISTS_GET_INDEX_FROM_START:jo,LISTS_GET_INDEX_FROM_END:Mo,LISTS_GET_INDEX_FIRST:No,LISTS_GET_INDEX_LAST:Po,LISTS_GET_INDEX_RANDOM:Fo,LISTS_GET_INDEX_TAIL:Io,LISTS_GET_INDEX_INPUT_IN_LIST:Lo,LISTS_INDEX_FROM_START_TOOLTIP:Ro,LISTS_INDEX_FROM_END_TOOLTIP:zo,LISTS_GET_INDEX_TOOLTIP_GET_FROM:Bo,LISTS_GET_INDEX_TOOLTIP_GET_FIRST:Vo,LISTS_GET_INDEX_TOOLTIP_GET_LAST:Ho,LISTS_GET_INDEX_TOOLTIP_GET_RANDOM:Uo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM:Wo,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST:Go,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST:Ko,LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM:qo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM:Jo,LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST:Yo,LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST:Xo,LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM:Zo,LISTS_SET_INDEX_HELPURL:Qo,LISTS_SET_INDEX_INPUT_IN_LIST:$o,LISTS_SET_INDEX_SET:es,LISTS_SET_INDEX_INSERT:ts,LISTS_SET_INDEX_INPUT_TO:ns,LISTS_SET_INDEX_TOOLTIP_SET_FROM:rs,LISTS_SET_INDEX_TOOLTIP_SET_FIRST:is,LISTS_SET_INDEX_TOOLTIP_SET_LAST:as,LISTS_SET_INDEX_TOOLTIP_SET_RANDOM:os,LISTS_SET_INDEX_TOOLTIP_INSERT_FROM:ss,LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST:cs,LISTS_SET_INDEX_TOOLTIP_INSERT_LAST:ls,LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM:us,LISTS_GET_SUBLIST_HELPURL:ds,LISTS_GET_SUBLIST_INPUT_IN_LIST:fs,LISTS_GET_SUBLIST_START_FROM_START:F,LISTS_GET_SUBLIST_START_FROM_END:ps,LISTS_GET_SUBLIST_START_FIRST:ms,LISTS_GET_SUBLIST_END_FROM_START:hs,LISTS_GET_SUBLIST_END_FROM_END:gs,LISTS_GET_SUBLIST_END_LAST:_s,LISTS_GET_SUBLIST_TAIL:vs,LISTS_GET_SUBLIST_TOOLTIP:ys,LISTS_SORT_HELPURL:bs,LISTS_SORT_TITLE:xs,LISTS_SORT_TOOLTIP:Ss,LISTS_SORT_ORDER_ASCENDING:Cs,LISTS_SORT_ORDER_DESCENDING:ws,LISTS_SORT_TYPE_NUMERIC:Ts,LISTS_SORT_TYPE_TEXT:Es,LISTS_SORT_TYPE_IGNORECASE:Ds,LISTS_SPLIT_HELPURL:Os,LISTS_SPLIT_LIST_FROM_TEXT:ks,LISTS_SPLIT_TEXT_FROM_LIST:As,LISTS_SPLIT_WITH_DELIMITER:js,LISTS_SPLIT_TOOLTIP_SPLIT:Ms,LISTS_SPLIT_TOOLTIP_JOIN:Ns,LISTS_REVERSE_HELPURL:Ps,LISTS_REVERSE_MESSAGE0:Fs,LISTS_REVERSE_TOOLTIP:Is,ORDINAL_NUMBER_SUFFIX:Ls,VARIABLES_GET_HELPURL:Rs,VARIABLES_GET_TOOLTIP:zs,VARIABLES_GET_CREATE_SET:Bs,VARIABLES_SET_HELPURL:Vs,VARIABLES_SET:Hs,VARIABLES_SET_TOOLTIP:Us,VARIABLES_SET_CREATE_GET:Ws,PROCEDURES_DEFNORETURN_HELPURL:Gs,PROCEDURES_DEFNORETURN_TITLE:Ks,PROCEDURES_DEFNORETURN_PROCEDURE:qs,PROCEDURES_BEFORE_PARAMS:Js,PROCEDURES_CALL_BEFORE_PARAMS:Ys,PROCEDURES_CALL_DISABLED_DEF_WARNING:Xs,PROCEDURES_DEFNORETURN_DO:Zs,PROCEDURES_DEFNORETURN_TOOLTIP:Qs,PROCEDURES_DEFNORETURN_COMMENT:$s,PROCEDURES_DEFRETURN_HELPURL:ec,PROCEDURES_DEFRETURN_TITLE:tc,PROCEDURES_DEFRETURN_PROCEDURE:nc,PROCEDURES_DEFRETURN_DO:rc,PROCEDURES_DEFRETURN_COMMENT:ic,PROCEDURES_DEFRETURN_RETURN:ac,PROCEDURES_DEFRETURN_TOOLTIP:oc,PROCEDURES_ALLOW_STATEMENTS:sc,PROCEDURES_DEF_DUPLICATE_WARNING:cc,PROCEDURES_CALLNORETURN_HELPURL:lc,PROCEDURES_CALLNORETURN_TOOLTIP:uc,PROCEDURES_CALLRETURN_HELPURL:dc,PROCEDURES_CALLRETURN_TOOLTIP:fc,PROCEDURES_MUTATORCONTAINER_TITLE:pc,PROCEDURES_MUTATORCONTAINER_TOOLTIP:mc,PROCEDURES_MUTATORARG_TITLE:hc,PROCEDURES_MUTATORARG_TOOLTIP:gc,PROCEDURES_HIGHLIGHT_DEF:_c,PROCEDURES_CREATE_DO:vc,PROCEDURES_IFRETURN_TOOLTIP:yc,PROCEDURES_IFRETURN_HELPURL:bc,PROCEDURES_IFRETURN_WARNING:xc,WORKSPACE_COMMENT_DEFAULT_TEXT:Sc,COLLAPSED_WARNINGS_WARNING:Cc,DIALOG_OK:wc,DIALOG_CANCEL:Tc,EDIT_BLOCK_CONTENTS:Ec,MOVE_BLOCK:Dc,WINDOWS:Oc,MAC_OS:kc,CHROME_OS:Ac,LINUX:jc,UNKNOWN:Mc,CONTROL_KEY:Nc,COMMAND_KEY:Pc,OPTION_KEY:Fc,ALT_KEY:Ic,ENTER_KEY:Lc,BACKSPACE_KEY:Rc,DELETE_KEY:zc,ESCAPE:Bc,TAB_KEY:Vc,SHIFT_KEY:Hc,CAPS_LOCK_KEY:Uc,SPACE_KEY:Wc,PAGE_UP_KEY:Gc,PAGE_DOWN_KEY:Kc,END_KEY:qc,HOME_KEY:Jc,INSERT_KEY:Yc,PAUSE_KEY:Xc,CONTEXT_MENU_KEY:Zc,CUT_SHORTCUT:Qc,COPY_SHORTCUT:$c,PASTE_SHORTCUT:el,HELP_PROMPT:tl,SHORTCUTS_GENERAL:nl,SHORTCUTS_EDITING:rl,SHORTCUTS_CODE_NAVIGATION:il,SHORTCUTS_ESCAPE:al,SHORTCUTS_DELETE:ol,SHORTCUTS_START_MOVE:sl,SHORTCUTS_START_MOVE_STACK:cl,SHORTCUTS_MOVE_LEFT:ll,SHORTCUTS_MOVE_RIGHT:ul,SHORTCUTS_MOVE_UP:dl,SHORTCUTS_MOVE_DOWN:fl,SHORTCUTS_FINISH_MOVE:pl,SHORTCUTS_ABORT_MOVE:ml,SHORTCUTS_SHOW_CONTEXT_MENU:hl,SHORTCUTS_FOCUS_WORKSPACE:gl,SHORTCUTS_FOCUS_TOOLBOX:_l,SHORTCUTS_INFORMATION:vl,SHORTCUTS_EXTENDED_INFORMATION:yl,SHORTCUTS_DISCONNECT:bl,SHORTCUTS_NEXT_STACK:xl,SHORTCUTS_PREVIOUS_STACK:Sl,SHORTCUTS_NEXT_HEADING:Cl,SHORTCUTS_PREVIOUS_HEADING:wl,SHORTCUTS_PERFORM_ACTION:Tl,SHORTCUTS_DUPLICATE:El,SHORTCUTS_CLEANUP:Dl,SHORTCUTS_SHOW_TOOLTIP:Ol,SHORTCUTS_TOGGLE_SCREENREADER_MODE:kl,SHORTCUTS_JUMP_BLOCK_START:Al,SHORTCUTS_JUMP_BLOCK_END:jl,SHORTCUTS_JUMP_TOP_STACK:Ml,SHORTCUTS_JUMP_BOTTOM_STACK:Nl,SHORTCUTS_JUMP_FIRST_BLOCK:Pl,SHORTCUTS_JUMP_LAST_BLOCK:Fl,KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT:Il,KEYBOARD_NAV_CONSTRAINED_MOVE_HINT:Ll,KEYBOARD_NAV_COPIED_HINT:Rl,KEYBOARD_NAV_CUT_HINT:zl,WORKSPACE_LABEL_PLAIN:Bl,WORKSPACE_ROLEDESCRIPTION:Vl,WORKSPACE_LABEL_1_STACK:Hl,WORKSPACE_LABEL_MANY_STACKS:Ul,WORKSPACE_LABEL_MUTATOR_WORKSPACE:Wl,WORKSPACE_LABEL_FLYOUT_WORKSPACE:Gl,WORKSPACE_CONTENTS_BLOCKS_MANY:Kl,WORKSPACE_CONTENTS_BLOCKS_ONE:ql,WORKSPACE_CONTENTS_BLOCKS_ZERO:Jl,WORKSPACE_CONTENTS_COMMENTS_MANY:Yl,WORKSPACE_CONTENTS_COMMENTS_ONE:Xl,KEYBOARD_NAV_BLOCK_NAVIGATION_HINT:Zl,KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT:Ql,KEYBOARD_NAV_FLYOUT_LABEL_HINT:$l,BLOCK_LABEL_BEGIN_STACK:eu,BLOCK_LABEL_BEGIN_PREFIX:tu,BLOCK_LABEL_TOOLBOX_CATEGORY:nu,BLOCK_LABEL_DISABLED:ru,BLOCK_LABEL_COLLAPSED:iu,BLOCK_LABEL_REPLACEABLE:au,BLOCK_LABEL_HAS_INPUT:ou,BLOCK_LABEL_HAS_INPUTS:su,BLOCK_LABEL_HAS_BRANCHES:cu,BLOCK_LABEL_STATEMENT:lu,BLOCK_LABEL_CONTAINER:uu,BLOCK_LABEL_VALUE:du,BLOCK_LABEL_STACK_BLOCKS:fu,INPUT_LABEL_INDEX:pu,INPUT_LABEL_VALUE:mu,INPUT_LABEL_STATEMENT:hu,INPUT_LABEL_END_STATEMENT:gu,INPUT_LABEL_EMPTY:_u,INPUT_LABEL_CONDITION:vu,INPUT_LABEL_CONDITION_A:yu,INPUT_LABEL_CONDITION_B:bu,INPUT_LABEL_VALUE_A:xu,INPUT_LABEL_VALUE_B:Su,INPUT_LABEL_NUMBER:Cu,INPUT_LABEL_NUMBER_A:wu,INPUT_LABEL_NUMBER_B:Tu,INPUT_LABEL_NUMBER_TO_CHECK:Eu,INPUT_LABEL_NUMBER_LIST:Du,INPUT_LABEL_MATH_DIVIDEND:Ou,INPUT_LABEL_MATH_DIVISOR:ku,INPUT_LABEL_MATH_CHANGE_BY:Au,INPUT_LABEL_MATH_CONSTRAIN_VALUE:ju,INPUT_LABEL_NUMBER_MIN:Mu,INPUT_LABEL_NUMBER_MAX:Nu,INPUT_LABEL_NUMBER_ATAN2_X:Pu,INPUT_LABEL_NUMBER_ATAN2_Y:Fu,INPUT_LABEL_LOOP_TIMES:Iu,INPUT_LABEL_LOOP_FROM:Lu,INPUT_LABEL_LOOP_TO:Ru,INPUT_LABEL_LOOP_BY:zu,INPUT_LABEL_LOOP_LIST:Bu,INPUT_LABEL_TEXT_JOIN_ITEM:Vu,INPUT_LABEL_TEXT_APPEND:Hu,INPUT_LABEL_TEXT_TO_CHANGE:Uu,INPUT_LABEL_TEXT_TO_CHECK:Wu,INPUT_LABEL_TEXT_TO_FIND:Gu,INPUT_LABEL_TEXT_TO_REPLACE:Ku,INPUT_LABEL_TEXT_POSITION:qu,INPUT_LABEL_TEXT_START_POSITION:Ju,INPUT_LABEL_TEXT_END_POSITION:Yu,INPUT_LABEL_TEXT_PROMPT_MESSAGE:Xu,INPUT_LABEL_VARIABLES_SET:Zu,INPUT_LABEL_LISTS_CREATE_WITH_ITEM:Qu,INPUT_LABEL_LISTS_REPEAT_ITEM:$u,INPUT_LABEL_LISTS_REPEAT_NUM:ed,INPUT_LABEL_LISTS_TO_CHECK:td,INPUT_LABEL_LISTS_VALUE_TO_SET:nd,INPUT_LABEL_LISTS_POSITION:rd,INPUT_LABEL_LISTS_START_POSITION:id,INPUT_LABEL_LISTS_END_POSITION:ad,INPUT_LABEL_LISTS_LIST_FROM_TEXT:od,INPUT_LABEL_LISTS_TEXT_FROM_LIST:sd,INPUT_LABEL_LISTS_DELIMITER:cd,INPUT_LABEL_LISTS_TO_CHANGE:ld,ANNOUNCE_MOVE_WORKSPACE:ud,ANNOUNCE_MOVE_BEFORE:dd,ANNOUNCE_MOVE_AFTER:fd,ANNOUNCE_MOVE_INSIDE:pd,ANNOUNCE_MOVE_AROUND:md,ANNOUNCE_MOVE_TO:hd,ANNOUNCE_MOVE_OF:gd,ANNOUNCE_MOVE_CANCELED:_d,FIELD_LABEL_EMPTY:vd,ARIA_TYPE_FIELD_INPUT:yd,ARIA_TYPE_FIELD_TEXT_INPUT:bd,ARIA_TYPE_FIELD_NUMBER:xd,ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE:Sd,ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT:Cd,ARIA_TYPE_FIELD_DROPDOWN:wd,ARIA_TYPE_FIELD_IMAGE:Td,ARIA_TYPE_FIELD_CHECKBOX:Ed,FIELD_LABEL_EDIT_PREFIX:Dd,OPEN_TRASH:Od,ZOOM_IN:kd,ZOOM_OUT:Ad,RESET_ZOOM:jd,FIELD_LABEL_OPTION_INDEX:Md,FIELD_LABEL_CHECKBOX_CHECKED:Nd,FIELD_LABEL_CHECKBOX_UNCHECKED:Pd,FIELD_LABEL_VARIABLE:Fd,ARIA_LABEL_BUTTON:Id,ARIA_LABEL_HEADING:Ld,BUBBLE_LABEL_DEFAULT:Rd,BUBBLE_LABEL_COMMENT:zd,BUBBLE_LABEL_WARNING:Bd,ICON_LABEL_DEFAULT:Vd,ICON_LABEL_COMMENT_CLOSED:Hd,ICON_LABEL_COMMENT_OPEN:Ud,ICON_LABEL_MUTATOR_CLOSED:Wd,ICON_LABEL_MUTATOR_OPEN:Gd,ICON_LABEL_WARNING_CLOSED:Kd,ICON_LABEL_WARNING_OPEN:qd,ARIA_LABEL_COMMENT:Jd,ARIA_LABEL_COMMENT_COLLAPSE:Yd,ARIA_LABEL_COMMENT_EXPAND:Xd,SCREENREADER_MODE_ENABLED:Zd,SCREENREADER_MODE_DISABLED:Qd,CURRENT_BLOCK_ANNOUNCEMENT:$d,PARENT_BLOCKS_ANNOUNCEMENT:ef,NO_PARENT_ANNOUNCEMENT:tf,SCREENREADER_HINT:nf,ARIA_LABEL_ADD_ELSE_IF:rf,ARIA_LABEL_REMOVE_ELSE_IF:af,ARIA_LABEL_ADD_LIST_ITEM:of,ARIA_LABEL_REMOVE_LIST_ITEM:sf,ARIA_LABEL_ADD_TEXT:cf,ARIA_LABEL_REMOVE_TEXT:lf,ARIA_LABEL_ADD_INPUT:uf,ARIA_LABEL_REMOVE_INPUT:df,ARIA_TYPE_FIELD_ANGLE:ff,ARIA_LABEL_FIELD_ANGLE:pf,ARIA_TYPE_FIELD_DATE:mf,ARIA_TYPE_FIELD_COLOUR:hf,ARIA_TYPE_FIELD_BITMAP:gf,ARIA_TYPE_FIELD_GRID:_f,FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE:vf,FIELD_BITMAP_BUTTON_LABEL_CLEAR:yf,FIELD_BITMAP_PIXEL_ON:bf,FIELD_BITMAP_PIXEL_OFF:xf,FIELD_BITMAP_PIXEL_LABEL:Sf,FIELD_BITMAP_ARIA_VALUE:Cf,OPEN_BACKPACK:wf,CLOSE_BACKPACK:Tf,COPY_ALL_TO_BACKPACK:Ef,COPY_TO_BACKPACK:Df,EMPTY_BACKPACK:Of,PASTE_ALL_FROM_BACKPACK:kf,REMOVE_FROM_BACKPACK:Af,FIELD_MULTILINEINPUT_FINISH_EDITING:jf,FIELD_MULTILINEINPUT_NEW_LINE:Mf,ZOOM_TO_FIT_ARIA_LABEL:Nf,MINIMAP_ARIA_LABEL:Pf,ARIA_LABEL_TRASH_EMPTY:Ff}=e(le(),1).default,If=[{id:`blocks_words`,source:`module`},{id:`blocks_procedures`,source:`module`},{id:`blocks_logic`,source:`module`},{id:`blocks_switch`,source:`module`},{id:`blocks_text`,source:`module`},{id:`blocks_number`,source:`module`},{id:`field_oid`,source:`module`},{id:`field_cron`,source:`module`},{id:`field_script`,source:`module`},{id:`blocks_system`,source:`module`},{id:`blocks_action`,source:`module`},{id:`blocks_sendto`,source:`module`},{id:`blocks_time`,source:`module`},{id:`blocks_convert`,source:`module`},{id:`blocks_trigger`,source:`module`},{id:`blocks_timeout`,source:`module`},{id:`blocks_object`,source:`module`}],Lf={blocks_action:()=>r(()=>import(`./blocks_action-6Ej9xU2i.js`),__vite__mapDeps([0,1,2,3,4]),import.meta.url),blocks_convert:()=>r(()=>import(`./blocks_convert-DQ9x0Ysp.js`),__vite__mapDeps([5,1,2,3,4]),import.meta.url),blocks_words:()=>r(()=>import(`./blocks_words-D8PL_nSE.js`),[],import.meta.url),blocks_logic:()=>r(()=>import(`./blocks_logic-D2zQ9KId.js`),__vite__mapDeps([6,1,2,3,4]),import.meta.url),blocks_number:()=>r(()=>import(`./blocks_number-k2IjE7OH.js`),__vite__mapDeps([7,1,2,3]),import.meta.url),blocks_procedures:()=>r(()=>import(`./blocks_procedures-8BHrspJl.js`),__vite__mapDeps([8,1,3,9]),import.meta.url),blocks_sendto:()=>r(()=>import(`./blocks_sendto-BR7ZFKj1.js`),__vite__mapDeps([10,1,2,3,4]),import.meta.url),blocks_system:()=>r(()=>import(`./blocks_system-LUOqNSJG.js`),__vite__mapDeps([11,1,3,4,12]),import.meta.url),field_cron:()=>r(()=>import(`./field_cron-BMQWPb61.js`),__vite__mapDeps([13,1]),import.meta.url),field_oid:()=>r(()=>import(`./field_oid-BGIMv9gw.js`),__vite__mapDeps([12,1]),import.meta.url),field_script:()=>r(()=>import(`./field_script-CdzYBCe6.js`),__vite__mapDeps([9,1]),import.meta.url),blocks_object:()=>r(()=>import(`./blocks_object-DCnwv5kv.js`),__vite__mapDeps([14,1,2,3,4]),import.meta.url),blocks_switch:()=>r(()=>import(`./blocks_switch-DViYCmQd.js`),__vite__mapDeps([15,1,2,3]),import.meta.url),blocks_text:()=>r(()=>import(`./blocks_text-BOvtHN2r.js`),__vite__mapDeps([16,1,2,3]),import.meta.url),blocks_time:()=>r(()=>import(`./blocks_time-ugS4GvIN.js`),__vite__mapDeps([17,1,2,3,4]),import.meta.url),blocks_trigger:()=>r(()=>import(`./blocks_trigger-15cJjBQj.js`),__vite__mapDeps([18,1,3,4,12,13]),import.meta.url),blocks_timeout:()=>r(()=>import(`./blocks_timeout-CiwKK28I.js`),__vite__mapDeps([19,1,2,3,4]),import.meta.url)},Rf={...S,JavaScript:T};w(ue),window.Blockly=Rf,window.goog||={provide:()=>{},require:()=>{}};function zf(e){return new Promise(t=>{let n=window.document.createElement(`script`);n.src=e,n.onload=()=>t(),n.onerror=()=>{console.error(`Cannot load ${e}`),t()},window.document.head.appendChild(n)})}var I=null;function Bf(){return I||=(async()=>{for(let e of If)if(e.source===`module`){let t=Lf[e.id];if(!t){console.error(`No module registered for "${e.id}" - check BLOCK_MODULES in bridge.ts`);continue}(await t()).install()}else await zf(`google-blockly/own/${e.id}.js`)})(),I}var L=window.Blockly,R=class extends Error{constructor(){super(`The field has not yet been attached to its input. Call appendField to attach it.`)}},z=class e extends L.Field{constructor(e,t,n){super(e),s(this,`textGroup`,null),s(this,`borderRect_`,null),s(this,`maxLines_`,1/0),s(this,`isOverflowedY_`,!1),e!==Symbol(`SKIP_SETUP`)&&(n&&this.configure_(n),this.SERIALIZABLE=!0,this.setValue((e==null?void 0:e.toString())||``),t&&this.setValidator(t))}configure_(e){super.configure_(e),e.maxLines&&this.setMaxLines(e.maxLines)}toXml(e){return e.textContent=this.getValue().replace(/\n/g,` `),e}fromXml(e){this.setValue(e.textContent.replace(/ /g,` `))}saveState(){let t=this.saveLegacyState(e);return t===null?this.getValue():t}loadState(e){this.loadLegacyState(L.Field,e)||this.setValue(e)}initView(){this.createBorderRect_(),this.textGroup=L.utils.dom.createSvgElement(L.utils.Svg.G,{class:`blocklyEditableText`},this.fieldGroup_)}onHtmlInputKeyDownSuper_(e){e.key===`Enter`?(L.WidgetDiv.hideIfOwner(this),L.dropDownDiv.hideWithoutAnimation()):e.key===`Escape`?(this.setValue(this.htmlInput_.getAttribute(`data-untyped-default-value`),!1),L.WidgetDiv.hideIfOwner(this),L.dropDownDiv.hideWithoutAnimation()):e.key===`Tab`&&(L.WidgetDiv.hideIfOwner(this),L.dropDownDiv.hideWithoutAnimation(),this.sourceBlock_.tab(this,!e.shiftKey),e.preventDefault())}onHtmlInputChange_(e){let t=this.value_;this.setValue(this.getValueFromEditorText_(this.htmlInput_.value),!1),this.sourceBlock_&&L.Events.isEnabled()&&this.value_!==t&&L.Events.fire(new(L.Events.get(`block_field_intermediate_change`))(this.sourceBlock_,this.name||null,t,this.value_))}onFinishEditing_(e){}getValueFromEditorText_(e){return e}bindInputEvents_(e){this.onKeyDownWrapper_=L.browserEvents.conditionalBind(e,`keydown`,this,this.onHtmlInputKeyDown_),this.onKeyInputWrapper_=L.browserEvents.conditionalBind(e,`input`,this,this.onHtmlInputChange_)}getDisplayText_(){let e=this.getSourceBlock();if(!e)throw Error(`The field has not yet been attached to its input. Call appendField to attach it.`);let t=this.getText();if(!t)return L.Field.NBSP;let n=t.split(` `);t=``;let r=this.isOverflowedY_?this.maxLines_:n.length;for(let e=0;ethis.maxDisplayLength?i=`${i.substring(0,this.maxDisplayLength-4)}...`:this.isOverflowedY_&&e===r-1&&(i=`${i.substring(0,i.length-3)}...`),i=i.replace(/\s/g,L.Field.NBSP),t+=i,e!==r-1&&(t+=` `)}return e.RTL&&(t+=`‏`),t}doValueUpdate_(e){super.doValueUpdate_(e),this.value_!==null&&(this.isOverflowedY_=this.value_.split(` diff --git a/admin/assets/blocks_action-6Ej9xU2i.js b/admin/assets/blocks_action-6Ej9xU2i.js new file mode 100644 index 00000000..10b241c5 --- /dev/null +++ b/admin/assets/blocks_action-6Ej9xU2i.js @@ -0,0 +1 @@ +import{i as e,o as t,r as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{d as o,i as s,p as c,r as l,s as u}from"./helpers-C_OEphYI.js";function d(){let d=window.Blockly,f=d.Translate,p=window.getHelp;d.CustomBlocks=d.CustomBlocks||[],d.CustomBlocks.push(`Action`),d.Action={HUE:330,blocks:{}};let m=()=>new n(`FALSE`,function(e){this.getSourceBlock().updateShape_(l(e))}),h=()=>[[f(`http_timeout_ms`),`ms`],[f(`http_timeout_sec`),`sec`]],g=()=>[[f(`http_type_text`),`text`],[f(`http_type_arraybuffer`),`arraybuffer`]],_={mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`with_statement`,String(l(this.getFieldValue(`WITH_STATEMENT`)))),e},domToMutation:function(e){this.updateShape_(l(e.getAttribute(`with_statement`)))},updateShape_:function(e){o(this,e)}},v=(t,n,o,s,l,u)=>{r[t]={init:function(){this.appendDummyInput().appendField(n),this.appendDummyInput(`ATTR`).appendField(new e(o),`ATTR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Action.HUE),this.setTooltip(f(`${t}_tooltip`)),u&&this.setHelpUrl(p(u))},onchange:function(){c(this,s,l)},FUNCTION_TYPES:s},i.forBlock[t]=function(e){return[e.getFieldValue(`ATTR`),a.ATOMIC]}};d.Action.blocks.exec=` FALSE pwd `,r.exec={init:function(){this.appendDummyInput(`TEXT`).appendField(`» ${f(`exec`)}`),this.appendValueInput(`COMMAND`).appendField(f(`exec_command`)),this.appendDummyInput(`WITH_STATEMENT`).appendField(f(`with_results`)).appendField(m(),`WITH_STATEMENT`),this.appendDummyInput(`LOG`).appendField(f(`loglevel`)).appendField(new e(s()),`LOG`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`exec_tooltip`)),this.setHelpUrl(p(`exec_help`))},..._},i.forBlock.exec=function(e){let t=i.valueToCode(e,`COMMAND`,a.ATOMIC),n=e.getFieldValue(`LOG`),r=``;if(n&&(r=`console.${n}('exec: ' + ${t});\n`),l(e.getFieldValue(`WITH_STATEMENT`))){let n=i.statementToCode(e,`STATEMENT`);if(n)return`exec(${t}, async (error, result, stderr) => {\n${n}});\n${r}`}return`exec(${t});\n${r}`},d.Action.blocks.exec_result=` result`,v(`exec_result`,`»`,[[f(`exec_result_result`),`result`],[f(`exec_result_stderr`),`stderr`],[f(`exec_result_error`),`error`]],[`exec`],`exec_result_warning`,`exec_help`),d.Action.blocks.http_get=` 2000 ms text http:// `,r.http_get={init:function(){this.appendValueInput(`URL`).appendField(`🌐 ${f(`http_get`)}`),this.appendDummyInput().appendField(f(`http_timeout`)).appendField(new t(`2000`),`TIMEOUT`).appendField(new e(h()),`UNIT`),this.appendDummyInput(`TYPE`).appendField(f(`http_type`)).appendField(new e(g()),`TYPE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`http_get_tooltip`)),this.setHelpUrl(p(`http_get_help`))}},i.forBlock.http_get=function(e){let t=i.valueToCode(e,`URL`,a.ATOMIC),n=e.getFieldValue(`UNIT`),r=e.getFieldValue(`TIMEOUT`);Number.isNaN(r)&&(r=2e3),n===`sec`&&(r*=1e3);let o=e.getFieldValue(`TYPE`)||`text`,s=i.statementToCode(e,`STATEMENT`);return`httpGet(${t}, { timeout: ${r}, responseType: '${o}' }, async (err, response) => {\n${s}});\n`},d.Action.blocks.http_post=` 2000 ms text http:// `,r.http_post={init:function(){this.appendValueInput(`URL`).appendField(`🌐 ${f(`http_post`)}`),this.appendDummyInput().appendField(f(`http_timeout`)).appendField(new t(`2000`),`TIMEOUT`).appendField(new e(h()),`UNIT`),this.appendDummyInput(`TYPE`).appendField(f(`http_type`)).appendField(new e(g()),`TYPE`),this.appendValueInput(`DATA`).appendField(f(`http_post_data`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`http_post_tooltip`)),this.setHelpUrl(p(`http_post_help`))}},i.forBlock.http_post=function(e){let t=i.valueToCode(e,`URL`,a.ATOMIC),n=e.getFieldValue(`UNIT`),r=e.getFieldValue(`TIMEOUT`);isNaN(r)&&(r=2e3),n===`sec`&&(r*=1e3);let o=e.getFieldValue(`TYPE`)||`text`,s=i.valueToCode(e,`DATA`,a.ATOMIC)||`null`,c=i.statementToCode(e,`STATEMENT`);return`httpPost(${t}, ${s}, { timeout: ${r}, responseType: '${o}' }, async (err, response) => {\n${c}});\n`},d.Action.blocks.http_response=` response.data`,v(`http_response`,`🌐`,[[f(`http_response_data`),`response.data`],[f(`http_response_statuscode`),`response.statusCode`],[f(`http_response_responsetime`),`response.responseTime`],[f(`http_response_headers`),`response.headers`],[f(`http_response_error`),`err`]],[`http_get`,`http_post`],`http_response_warning`,`http_response_help`),d.Action.blocks.http_response_tofile=` temp.jpg `,r.http_response_tofile={init:function(){this.appendDummyInput().appendField(`🌐 ${f(`http_response_tofile`)}`),this.appendValueInput(`FILENAME`).appendField(f(`http_response_tofile_filename`)).setCheck(null),this.setInputsInline(!1),this.setOutput(!0,`String`),this.setColour(d.Action.HUE),this.setTooltip(f(`http_response_tofile_tooltip`)),this.setHelpUrl(p(`http_response_tofile_help`))},onchange:function(){c(this,[`http_get`,`http_post`],`http_response_warning`)},FUNCTION_TYPES:[`http_get`,`http_post`]},i.forBlock.http_response_tofile=function(e){return[`createTempFile(${i.valueToCode(e,`FILENAME`,a.ATOMIC)}, response.data)`,a.ATOMIC]};let y=()=>`${i.prefixLines(`if (err) {`,i.INDENT)}\n${i.prefixLines(`console.error(err);`,i.INDENT+i.INDENT)}\n${i.prefixLines(`}`,i.INDENT)}\n`;d.Action.blocks.file_write=` 0_userdata.0 demo.json `,r.file_write={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${f(`file_write`)}`),this.appendValueInput(`FILE`).appendField(f(`file_write_filename`)).setCheck(null),this.appendValueInput(`DATA`).appendField(f(`file_write_data`)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`file_write_tooltip`)),this.setHelpUrl(p(`file_write_help`))}},i.forBlock.file_write=function(e){let t=i.valueToCode(e,`OID`,a.ATOMIC),n=i.valueToCode(e,`FILE`,a.ATOMIC),r=i.valueToCode(e,`DATA`,a.ATOMIC),o=u(t);return`writeFile(${t}${o?` /* ${o} */`:``}, String(${n}), ${r||`null`}, (err) => {\n${y()}});\n`},d.Action.blocks.file_read=` 0_userdata.0 demo.json `,r.file_read={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${f(`file_read`)}`),this.appendValueInput(`FILE`).appendField(f(`file_read_filename`)).setCheck(null),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`file_read_tooltip`)),this.setHelpUrl(p(`file_read_help`))}},i.forBlock.file_read=function(e){let t=i.valueToCode(e,`OID`,a.ATOMIC),n=i.valueToCode(e,`FILE`,a.ATOMIC),r=i.statementToCode(e,`STATEMENT`),o=u(t);return`readFile(${t}${o?` /* ${o} */`:``}, String(${n}), (err, data, mimeType) => {\n${y()}${r}});\n`},d.Action.blocks.file_data=` data`,v(`file_data`,`📁`,[[f(`file_data_data`),`data`],[f(`file_data_mimeType`),`mimeType`]],[`file_read`],`file_data_warning`),d.Action.blocks.request=` FALSE http:// `,r.request={init:function(){this.appendDummyInput(`TEXT`).appendField(f(`request`)),this.appendValueInput(`URL`).appendField(f(`request_url`)),this.appendDummyInput(`WITH_STATEMENT`).appendField(f(`with_results`)).appendField(m(),`WITH_STATEMENT`),this.appendDummyInput(`LOG`).appendField(f(`loglevel`)).appendField(new e(s()),`LOG`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`request_tooltip`)),this.setHelpUrl(f(`request_help`))},..._},i.forBlock.request=function(e){let t=i.valueToCode(e,`URL`,a.ATOMIC),n=e.getFieldValue(`LOG`),r=``;if(n&&(r=`console.${n}('request: ' + ${t});\n`),l(e.getFieldValue(`WITH_STATEMENT`))){let n=i.statementToCode(e,`STATEMENT`);if(n)return`try {\n require("request")(${t}, async (error, response, result) => {\n ${n} }).on("error", (e) => { console.error(e); });\n} catch (e) { console.error(e); }\n${r}`}return`try {\n require("request")(${t}).on("error", (e) => { console.error(e); });\n} catch (e) { console.error(e); }\n${r}`}}export{d as install}; \ No newline at end of file diff --git a/admin/assets/blocks_action-CvnOHXwt.js b/admin/assets/blocks_action-CvnOHXwt.js deleted file mode 100644 index 791b6dbb..00000000 --- a/admin/assets/blocks_action-CvnOHXwt.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e,o as t,r as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{f as o,i as s,o as c,r as l,u}from"./helpers-Crmcgphg.js";function d(){let d=window.Blockly,f=d.Translate,p=window.getHelp;d.CustomBlocks=d.CustomBlocks||[],d.CustomBlocks.push(`Action`),d.Action={HUE:330,blocks:{}};let m=()=>new n(`FALSE`,function(e){this.getSourceBlock().updateShape_(l(e))}),h=()=>[[f(`http_timeout_ms`),`ms`],[f(`http_timeout_sec`),`sec`]],g=()=>[[f(`http_type_text`),`text`],[f(`http_type_arraybuffer`),`arraybuffer`]],_={mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`with_statement`,String(l(this.getFieldValue(`WITH_STATEMENT`)))),e},domToMutation:function(e){this.updateShape_(l(e.getAttribute(`with_statement`)))},updateShape_:function(e){u(this,e)}},v=(t,n,s,c,l,u)=>{r[t]={init:function(){this.appendDummyInput().appendField(n),this.appendDummyInput(`ATTR`).appendField(new e(s),`ATTR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Action.HUE),this.setTooltip(f(`${t}_tooltip`)),u&&this.setHelpUrl(p(u))},onchange:function(){o(this,c,l)},FUNCTION_TYPES:c},i.forBlock[t]=function(e){return[e.getFieldValue(`ATTR`),a.ATOMIC]}};d.Action.blocks.exec=` FALSE pwd `,r.exec={init:function(){this.appendDummyInput(`TEXT`).appendField(`» ${f(`exec`)}`),this.appendValueInput(`COMMAND`).appendField(f(`exec_command`)),this.appendDummyInput(`WITH_STATEMENT`).appendField(f(`with_results`)).appendField(m(),`WITH_STATEMENT`),this.appendDummyInput(`LOG`).appendField(f(`loglevel`)).appendField(new e(s()),`LOG`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`exec_tooltip`)),this.setHelpUrl(p(`exec_help`))},..._},i.forBlock.exec=function(e){let t=i.valueToCode(e,`COMMAND`,a.ATOMIC),n=e.getFieldValue(`LOG`),r=``;if(n&&(r=`console.${n}('exec: ' + ${t});\n`),l(e.getFieldValue(`WITH_STATEMENT`))){let n=i.statementToCode(e,`STATEMENT`);if(n)return`exec(${t}, async (error, result, stderr) => {\n${n}});\n${r}`}return`exec(${t});\n${r}`},d.Action.blocks.exec_result=` result`,v(`exec_result`,`»`,[[f(`exec_result_result`),`result`],[f(`exec_result_stderr`),`stderr`],[f(`exec_result_error`),`error`]],[`exec`],`exec_result_warning`,`exec_help`),d.Action.blocks.http_get=` 2000 ms text http:// `,r.http_get={init:function(){this.appendValueInput(`URL`).appendField(`🌐 ${f(`http_get`)}`),this.appendDummyInput().appendField(f(`http_timeout`)).appendField(new t(`2000`),`TIMEOUT`).appendField(new e(h()),`UNIT`),this.appendDummyInput(`TYPE`).appendField(f(`http_type`)).appendField(new e(g()),`TYPE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`http_get_tooltip`)),this.setHelpUrl(p(`http_get_help`))}},i.forBlock.http_get=function(e){let t=i.valueToCode(e,`URL`,a.ATOMIC),n=e.getFieldValue(`UNIT`),r=e.getFieldValue(`TIMEOUT`);Number.isNaN(r)&&(r=2e3),n===`sec`&&(r*=1e3);let o=e.getFieldValue(`TYPE`)||`text`,s=i.statementToCode(e,`STATEMENT`);return`httpGet(${t}, { timeout: ${r}, responseType: '${o}' }, async (err, response) => {\n${s}});\n`},d.Action.blocks.http_post=` 2000 ms text http:// `,r.http_post={init:function(){this.appendValueInput(`URL`).appendField(`🌐 ${f(`http_post`)}`),this.appendDummyInput().appendField(f(`http_timeout`)).appendField(new t(`2000`),`TIMEOUT`).appendField(new e(h()),`UNIT`),this.appendDummyInput(`TYPE`).appendField(f(`http_type`)).appendField(new e(g()),`TYPE`),this.appendValueInput(`DATA`).appendField(f(`http_post_data`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`http_post_tooltip`)),this.setHelpUrl(p(`http_post_help`))}},i.forBlock.http_post=function(e){let t=i.valueToCode(e,`URL`,a.ATOMIC),n=e.getFieldValue(`UNIT`),r=e.getFieldValue(`TIMEOUT`);isNaN(r)&&(r=2e3),n===`sec`&&(r*=1e3);let o=e.getFieldValue(`TYPE`)||`text`,s=i.valueToCode(e,`DATA`,a.ATOMIC)||`null`,c=i.statementToCode(e,`STATEMENT`);return`httpPost(${t}, ${s}, { timeout: ${r}, responseType: '${o}' }, async (err, response) => {\n${c}});\n`},d.Action.blocks.http_response=` response.data`,v(`http_response`,`🌐`,[[f(`http_response_data`),`response.data`],[f(`http_response_statuscode`),`response.statusCode`],[f(`http_response_responsetime`),`response.responseTime`],[f(`http_response_headers`),`response.headers`],[f(`http_response_error`),`err`]],[`http_get`,`http_post`],`http_response_warning`,`http_response_help`),d.Action.blocks.http_response_tofile=` temp.jpg `,r.http_response_tofile={init:function(){this.appendDummyInput().appendField(`🌐 ${f(`http_response_tofile`)}`),this.appendValueInput(`FILENAME`).appendField(f(`http_response_tofile_filename`)).setCheck(null),this.setInputsInline(!1),this.setOutput(!0,`String`),this.setColour(d.Action.HUE),this.setTooltip(f(`http_response_tofile_tooltip`)),this.setHelpUrl(p(`http_response_tofile_help`))},onchange:function(){o(this,[`http_get`,`http_post`],`http_response_warning`)},FUNCTION_TYPES:[`http_get`,`http_post`]},i.forBlock.http_response_tofile=function(e){return[`createTempFile(${i.valueToCode(e,`FILENAME`,a.ATOMIC)}, response.data)`,a.ATOMIC]};let y=()=>`${i.prefixLines(`if (err) {`,i.INDENT)}\n${i.prefixLines(`console.error(err);`,i.INDENT+i.INDENT)}\n${i.prefixLines(`}`,i.INDENT)}\n`;d.Action.blocks.file_write=` 0_userdata.0 demo.json `,r.file_write={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${f(`file_write`)}`),this.appendValueInput(`FILE`).appendField(f(`file_write_filename`)).setCheck(null),this.appendValueInput(`DATA`).appendField(f(`file_write_data`)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`file_write_tooltip`)),this.setHelpUrl(p(`file_write_help`))}},i.forBlock.file_write=function(e){let t=i.valueToCode(e,`OID`,a.ATOMIC),n=i.valueToCode(e,`FILE`,a.ATOMIC),r=i.valueToCode(e,`DATA`,a.ATOMIC),o=c(t);return`writeFile(${t}${o?` /* ${o} */`:``}, String(${n}), ${r||`null`}, (err) => {\n${y()}});\n`},d.Action.blocks.file_read=` 0_userdata.0 demo.json `,r.file_read={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${f(`file_read`)}`),this.appendValueInput(`FILE`).appendField(f(`file_read_filename`)).setCheck(null),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`file_read_tooltip`)),this.setHelpUrl(p(`file_read_help`))}},i.forBlock.file_read=function(e){let t=i.valueToCode(e,`OID`,a.ATOMIC),n=i.valueToCode(e,`FILE`,a.ATOMIC),r=i.statementToCode(e,`STATEMENT`),o=c(t);return`readFile(${t}${o?` /* ${o} */`:``}, String(${n}), (err, data, mimeType) => {\n${y()}${r}});\n`},d.Action.blocks.file_data=` data`,v(`file_data`,`📁`,[[f(`file_data_data`),`data`],[f(`file_data_mimeType`),`mimeType`]],[`file_read`],`file_data_warning`),d.Action.blocks.request=` FALSE http:// `,r.request={init:function(){this.appendDummyInput(`TEXT`).appendField(f(`request`)),this.appendValueInput(`URL`).appendField(f(`request_url`)),this.appendDummyInput(`WITH_STATEMENT`).appendField(f(`with_results`)).appendField(m(),`WITH_STATEMENT`),this.appendDummyInput(`LOG`).appendField(f(`loglevel`)).appendField(new e(s()),`LOG`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Action.HUE),this.setTooltip(f(`request_tooltip`)),this.setHelpUrl(f(`request_help`))},..._},i.forBlock.request=function(e){let t=i.valueToCode(e,`URL`,a.ATOMIC),n=e.getFieldValue(`LOG`),r=``;if(n&&(r=`console.${n}('request: ' + ${t});\n`),l(e.getFieldValue(`WITH_STATEMENT`))){let n=i.statementToCode(e,`STATEMENT`);if(n)return`try {\n require("request")(${t}, async (error, response, result) => {\n ${n} }).on("error", (e) => { console.error(e); });\n} catch (e) { console.error(e); }\n${r}`}return`try {\n require("request")(${t}).on("error", (e) => { console.error(e); });\n} catch (e) { console.error(e); }\n${r}`}}export{d as install}; \ No newline at end of file diff --git a/admin/assets/blocks_convert-BZlKcd02.js b/admin/assets/blocks_convert-DQ9x0Ysp.js similarity index 74% rename from admin/assets/blocks_convert-BZlKcd02.js rename to admin/assets/blocks_convert-DQ9x0Ysp.js index 743fa8d2..6e40dd1d 100644 --- a/admin/assets/blocks_convert-BZlKcd02.js +++ b/admin/assets/blocks_convert-DQ9x0Ysp.js @@ -1,3 +1,3 @@ -import{i as e,o as t,r as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{n as o,s,t as c}from"./helpers-Crmcgphg.js";function l(){let l=window.Blockly,u=l.Translate;l.CustomBlocks=l.CustomBlocks||[],l.CustomBlocks.push(`Convert`),l.Convert={HUE:280,blocks:{}},l.Convert.blocks.convert_tonumber=``,r.convert_tonumber={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_tonumber`)),this.setOutput(!0,`Number`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_tonumber_tooltip`))}},i.forBlock.convert_tonumber=function(e){return[`parseFloat(${i.valueToCode(e,`VALUE`,a.ATOMIC)})`,a.ATOMIC]},l.Convert.blocks.convert_toboolean=``,r.convert_toboolean={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_toboolean`)),this.setOutput(!0,`Boolean`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_toboolean_tooltip`))}},i.forBlock.convert_toboolean=function(e){return[`(() => { +import{i as e,o as t,r as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{c as o,n as s,t as c}from"./helpers-C_OEphYI.js";function l(){let l=window.Blockly,u=l.Translate;l.CustomBlocks=l.CustomBlocks||[],l.CustomBlocks.push(`Convert`),l.Convert={HUE:280,blocks:{}},l.Convert.blocks.convert_tonumber=``,r.convert_tonumber={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_tonumber`)),this.setOutput(!0,`Number`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_tonumber_tooltip`))}},i.forBlock.convert_tonumber=function(e){return[`parseFloat(${i.valueToCode(e,`VALUE`,a.ATOMIC)})`,a.ATOMIC]},l.Convert.blocks.convert_toboolean=``,r.convert_toboolean={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_toboolean`)),this.setOutput(!0,`Boolean`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_toboolean_tooltip`))}},i.forBlock.convert_toboolean=function(e){return[`(() => { const val = ${i.valueToCode(e,`VALUE`,a.ATOMIC)};\n if (val === 'true' || val === 'TRUE') return true;\n if (val === 'false' || val === 'FALSE') return false;\n return !!val; -})()`,a.ATOMIC]},l.Convert.blocks.convert_tostring=``,r.convert_tostring={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_tostring`)),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_tostring_tooltip`))}},i.forBlock.convert_tostring=function(e){return[`('' + ${i.valueToCode(e,`VALUE`,a.ATOMIC)})`,a.ATOMIC]},l.Convert.blocks.convert_type=``,r.convert_type={init:function(){this.appendValueInput(`ITEM`).appendField(u(`convert_type`)),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_type_tooltip`))}},i.forBlock.convert_type=function(e){return[`typeof ${i.valueToCode(e,`ITEM`,a.ATOMIC)}`,a.ATOMIC]},l.Convert.blocks.convert_to_date=``,r.convert_to_date={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_to_date`)),this.setOutput(!0,`Date`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_to_date_tooltip`))}},i.forBlock.convert_to_date=function(e){return[`getDateObject(${i.valueToCode(e,`VALUE`,a.ATOMIC)}).getTime()`,a.ATOMIC]},l.Convert.blocks.convert_from_date=` object`,r.convert_from_date={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_from_date`)),this.appendDummyInput(`OPTION`).appendField(u(`convert_to`)).appendField(new e(c(),function(e){this.getSourceBlock().updateShape_(e===`custom`,e===`wdts`||e===`wdt`||e===`Mt`||e===`Mts`)}),`OPTION`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_from_date_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`format`,t===`custom`?`true`:`false`),e.setAttribute(`language`,t===`wdt`||t===`wdts`||t===`Mt`||t===`Mts`?`true`:`false`),e},domToMutation:function(e){let t=e.getAttribute(`format`),n=e.getAttribute(`language`);this.updateShape_(t===`true`||t===`TRUE`,n===`true`||n===`TRUE`)},updateShape_:function(n,r){if(n?this.getInput(`FORMAT`)||this.appendDummyInput(`FORMAT`).appendField(` `).appendField(new t(u(`time_get_default_format`)),`FORMAT`):this.getInput(`FORMAT`)&&this.removeInput(`FORMAT`),r){if(!this.getInput(`LANGUAGE`)){let t=o();this.appendDummyInput(`LANGUAGE`).appendField(new e(t),`LANGUAGE`)}}else this.getInput(`LANGUAGE`)&&this.removeInput(`LANGUAGE`)}},i.forBlock.convert_from_date=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`FORMAT`),r=e.getFieldValue(`LANGUAGE`),o=i.valueToCode(e,`VALUE`,a.ATOMIC),c;return c=t===`object`?`getDateObject(${o}).getTime()`:t===`ms`?`getDateObject(${o}).getMilliseconds()`:t===`s`?`getDateObject(${o}).getSeconds()`:t===`sid`?`(() => { const v = getDateObject(${o}); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds(); })()`:t===`m`?`getDateObject(${o}).getMinutes()`:t===`mid`?`(() => { const v = getDateObject(${o}); return v.getHours() * 60 + v.getMinutes(); })()`:t===`h`?`getDateObject(${o}).getHours()`:t===`d`?`getDateObject(${o}).getDate()`:t===`M`?`(getDateObject(${o}).getMonth() + 1)`:t===`Mt`?`formatDate(getDateObject(${o}), 'OO', '${r}')`:t===`Mts`?`formatDate(getDateObject(${o}), 'O', '${r}')`:t===`y`?`getDateObject(${o}).getYear()`:t===`fy`?`getDateObject(${o}).getFullYear()`:t===`wdt`?`formatDate(getDateObject(${o}), 'WW', '${r}')`:t===`wdts`?`formatDate(getDateObject(${o}), 'W', '${r}')`:t===`wd`?`(() => { const d = getDateObject(${o}).getDay(); return d === 0 ? 7 : d; })()`:t===`cw`?`((date) => { const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); const dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil(((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7); })(getDateObject(${o}))`:t===`custom`?`formatDate(getDateObject(${o}), ${s(n)})`:`formatDate(getDateObject(${o}), ${s(t)})`,[c,a.ATOMIC]},l.Convert.blocks.convert_time_difference=` hh:mm:ss `,r.convert_time_difference={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_time_difference`)),this.appendDummyInput(`OPTION`).appendField(u(`convert_to`)).appendField(new e([[u(`time_difference_hh:mm:ss`),`hh:mm:ss`],[u(`time_difference_h:m:s`),`h:m:s`],[u(`time_difference_hh:mm`),`hh:mm`],[u(`time_difference_h:m`),`h:m`],[u(`time_difference_mm:ss`),`mm:ss`],[u(`time_difference_m:s`),`m:s`],[u(`time_difference_custom`),`custom`]],function(e){this.getSourceBlock().updateShape_(e===`custom`)}),`OPTION`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_time_difference_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`format`,t===`custom`?`true`:`false`),e},domToMutation:function(e){let t=e.getAttribute(`format`);this.updateShape_(t===`true`||t===`TRUE`)},updateShape_:function(e){e?this.getInput(`FORMAT`)||this.appendDummyInput(`FORMAT`).appendField(` `).appendField(new t(u(`time_difference_default_format`)),`FORMAT`):this.getInput(`FORMAT`)&&this.removeInput(`FORMAT`)}},i.forBlock.convert_time_difference=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`FORMAT`);return[`formatTimeDiff(${i.valueToCode(e,`VALUE`,a.ATOMIC)||`0`}, ${s(t===`custom`?n:t)})`,a.ATOMIC]},l.Convert.blocks.convert_json2object=``,r.convert_json2object={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_json2object`)),this.setOutput(!0),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_json2object_tooltip`))}},i.forBlock.convert_json2object=function(e){return[`(() => { try { return JSON.parse(${i.valueToCode(e,`VALUE`,a.ATOMIC)}); } catch (e) { return {}; }})()`,a.ATOMIC]},l.Convert.blocks.convert_object2json=` FALSE`,r.convert_object2json={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_object2json`)),this.appendDummyInput(`PRETTIFY`).appendField(u(`convert_object2json_prettify`)).appendField(new n(`FALSE`),`PRETTIFY`),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_object2json_tooltip`))}},i.forBlock.convert_object2json=function(e){let t=i.valueToCode(e,`VALUE`,a.ATOMIC),n=e.getFieldValue(`PRETTIFY`);return[`JSON.stringify(${t}${n===`TRUE`||n===`true`||n===!0?`, null, 2`:``})`,a.ATOMIC]},l.Convert.blocks.convert_jsonata=` * `,r.convert_jsonata={init:function(){this.appendValueInput(`EXPRESSION`).appendField(u(`convert_jsonata`)),this.appendValueInput(`TARGET`).appendField(u(`convert_jsonata_target`)),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_jsonata_tooltip`))}},i.forBlock.convert_jsonata=function(e){let t=i.valueToCode(e,`EXPRESSION`,a.ATOMIC),n=i.valueToCode(e,`TARGET`,a.ATOMIC);return n||=`{}`,[`(await jsonataExpression(${n}, ${t}))`,a.ATOMIC]}}export{l as install}; \ No newline at end of file +})()`,a.ATOMIC]},l.Convert.blocks.convert_tostring=``,r.convert_tostring={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_tostring`)),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_tostring_tooltip`))}},i.forBlock.convert_tostring=function(e){return[`('' + ${i.valueToCode(e,`VALUE`,a.ATOMIC)})`,a.ATOMIC]},l.Convert.blocks.convert_type=``,r.convert_type={init:function(){this.appendValueInput(`ITEM`).appendField(u(`convert_type`)),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_type_tooltip`))}},i.forBlock.convert_type=function(e){return[`typeof ${i.valueToCode(e,`ITEM`,a.ATOMIC)}`,a.ATOMIC]},l.Convert.blocks.convert_to_date=``,r.convert_to_date={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_to_date`)),this.setOutput(!0,`Date`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_to_date_tooltip`))}},i.forBlock.convert_to_date=function(e){return[`getDateObject(${i.valueToCode(e,`VALUE`,a.ATOMIC)}).getTime()`,a.ATOMIC]},l.Convert.blocks.convert_from_date=` object`,r.convert_from_date={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_from_date`)),this.appendDummyInput(`OPTION`).appendField(u(`convert_to`)).appendField(new e(c(),function(e){this.getSourceBlock().updateShape_(e===`custom`,e===`wdts`||e===`wdt`||e===`Mt`||e===`Mts`)}),`OPTION`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_from_date_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`format`,t===`custom`?`true`:`false`),e.setAttribute(`language`,t===`wdt`||t===`wdts`||t===`Mt`||t===`Mts`?`true`:`false`),e},domToMutation:function(e){let t=e.getAttribute(`format`),n=e.getAttribute(`language`);this.updateShape_(t===`true`||t===`TRUE`,n===`true`||n===`TRUE`)},updateShape_:function(n,r){if(n?this.getInput(`FORMAT`)||this.appendDummyInput(`FORMAT`).appendField(` `).appendField(new t(u(`time_get_default_format`)),`FORMAT`):this.getInput(`FORMAT`)&&this.removeInput(`FORMAT`),r){if(!this.getInput(`LANGUAGE`)){let t=s();this.appendDummyInput(`LANGUAGE`).appendField(new e(t),`LANGUAGE`)}}else this.getInput(`LANGUAGE`)&&this.removeInput(`LANGUAGE`)}},i.forBlock.convert_from_date=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`FORMAT`),r=e.getFieldValue(`LANGUAGE`),s=i.valueToCode(e,`VALUE`,a.ATOMIC),c;return c=t===`object`?`getDateObject(${s}).getTime()`:t===`ms`?`getDateObject(${s}).getMilliseconds()`:t===`s`?`getDateObject(${s}).getSeconds()`:t===`sid`?`(() => { const v = getDateObject(${s}); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds(); })()`:t===`m`?`getDateObject(${s}).getMinutes()`:t===`mid`?`(() => { const v = getDateObject(${s}); return v.getHours() * 60 + v.getMinutes(); })()`:t===`h`?`getDateObject(${s}).getHours()`:t===`d`?`getDateObject(${s}).getDate()`:t===`M`?`(getDateObject(${s}).getMonth() + 1)`:t===`Mt`?`formatDate(getDateObject(${s}), 'OO', '${r}')`:t===`Mts`?`formatDate(getDateObject(${s}), 'O', '${r}')`:t===`y`?`getDateObject(${s}).getYear()`:t===`fy`?`getDateObject(${s}).getFullYear()`:t===`wdt`?`formatDate(getDateObject(${s}), 'WW', '${r}')`:t===`wdts`?`formatDate(getDateObject(${s}), 'W', '${r}')`:t===`wd`?`(() => { const d = getDateObject(${s}).getDay(); return d === 0 ? 7 : d; })()`:t===`cw`?`((date) => { const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); const dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil(((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7); })(getDateObject(${s}))`:t===`custom`?`formatDate(getDateObject(${s}), ${o(n)})`:`formatDate(getDateObject(${s}), ${o(t)})`,[c,a.ATOMIC]},l.Convert.blocks.convert_time_difference=` hh:mm:ss `,r.convert_time_difference={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_time_difference`)),this.appendDummyInput(`OPTION`).appendField(u(`convert_to`)).appendField(new e([[u(`time_difference_hh:mm:ss`),`hh:mm:ss`],[u(`time_difference_h:m:s`),`h:m:s`],[u(`time_difference_hh:mm`),`hh:mm`],[u(`time_difference_h:m`),`h:m`],[u(`time_difference_mm:ss`),`mm:ss`],[u(`time_difference_m:s`),`m:s`],[u(`time_difference_custom`),`custom`]],function(e){this.getSourceBlock().updateShape_(e===`custom`)}),`OPTION`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_time_difference_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`format`,t===`custom`?`true`:`false`),e},domToMutation:function(e){let t=e.getAttribute(`format`);this.updateShape_(t===`true`||t===`TRUE`)},updateShape_:function(e){e?this.getInput(`FORMAT`)||this.appendDummyInput(`FORMAT`).appendField(` `).appendField(new t(u(`time_difference_default_format`)),`FORMAT`):this.getInput(`FORMAT`)&&this.removeInput(`FORMAT`)}},i.forBlock.convert_time_difference=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`FORMAT`);return[`formatTimeDiff(${i.valueToCode(e,`VALUE`,a.ATOMIC)||`0`}, ${o(t===`custom`?n:t)})`,a.ATOMIC]},l.Convert.blocks.convert_json2object=``,r.convert_json2object={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_json2object`)),this.setOutput(!0),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_json2object_tooltip`))}},i.forBlock.convert_json2object=function(e){return[`(() => { try { return JSON.parse(${i.valueToCode(e,`VALUE`,a.ATOMIC)}); } catch (e) { return {}; }})()`,a.ATOMIC]},l.Convert.blocks.convert_object2json=` FALSE`,r.convert_object2json={init:function(){this.appendValueInput(`VALUE`).appendField(u(`convert_object2json`)),this.appendDummyInput(`PRETTIFY`).appendField(u(`convert_object2json_prettify`)).appendField(new n(`FALSE`),`PRETTIFY`),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_object2json_tooltip`))}},i.forBlock.convert_object2json=function(e){let t=i.valueToCode(e,`VALUE`,a.ATOMIC),n=e.getFieldValue(`PRETTIFY`);return[`JSON.stringify(${t}${n===`TRUE`||n===`true`||n===!0?`, null, 2`:``})`,a.ATOMIC]},l.Convert.blocks.convert_jsonata=` * `,r.convert_jsonata={init:function(){this.appendValueInput(`EXPRESSION`).appendField(u(`convert_jsonata`)),this.appendValueInput(`TARGET`).appendField(u(`convert_jsonata_target`)),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(l.Convert.HUE),this.setTooltip(u(`convert_jsonata_tooltip`))}},i.forBlock.convert_jsonata=function(e){let t=i.valueToCode(e,`EXPRESSION`,a.ATOMIC),n=i.valueToCode(e,`TARGET`,a.ATOMIC);return n||=`{}`,[`(await jsonataExpression(${n}, ${t}))`,a.ATOMIC]}}export{l as install}; \ No newline at end of file diff --git a/admin/assets/blocks_logic-B33Pypxr.js b/admin/assets/blocks_logic-D2zQ9KId.js similarity index 96% rename from admin/assets/blocks_logic-B33Pypxr.js rename to admin/assets/blocks_logic-D2zQ9KId.js index b8e1658d..6b4be5e9 100644 --- a/admin/assets/blocks_logic-B33Pypxr.js +++ b/admin/assets/blocks_logic-D2zQ9KId.js @@ -1 +1 @@ -import{f as e,i as t,p as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{c as o}from"./helpers-Crmcgphg.js";function s(t,s,c,l,u){let d=window.Blockly.Translate,f=`${t}_container`,p=`${t}_mutator`;r[f]={init:function(){this.appendDummyInput().appendField(d(t)),this.appendStatementInput(`STACK`),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(d(`${t}_tooltip`)),this.contextMenu=!1}},r[p]={init:function(){this.appendDummyInput(s).appendField(d(c)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(d(`${t}_tooltip`)),this.contextMenu=!1}},r[t]={init:function(){this.itemCount_=2,this.setMutator(new e.MutatorIcon([p],this)),this.setInputsInline(!1),this.setOutput(!0,`Boolean`),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(d(`${t}_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute(`items`),10),this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(f);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t0&&t.appendField(d(c))}for(let e=this.itemCount_;this.getInput(`${s}${e}`);e++)this.removeInput(`${s}${e}`)}},i.forBlock[t]=function(e){let t=e,n=[];for(let r=0;r0?n.join(l):`false`}`,u]}}function c(){let e=window.Blockly.Translate;s(`logic_multi_and`,`AND`,`logic_multi_and_and`,` && `,a.LOGICAL_AND),s(`logic_multi_or`,`OR`,`logic_multi_or_or`,` || `,a.LOGICAL_OR),r.logic_between={init:function(){this.appendValueInput(`MIN`).setCheck(`Number`),this.appendValueInput(`VALUE`).setCheck(`Number`).appendField(new t([[`<`,`LT`],[`≤`,`LE`]]),`MIN_OPERATOR`),this.appendValueInput(`MAX`).setCheck(`Number`).appendField(new t([[`<`,`LT`],[`≤`,`LE`]]),`MAX_OPERATOR`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(e(`logic_between_tooltip`))}},i.forBlock.logic_between=function(e){let t=i.valueToCode(e,`MIN`,a.RELATIONAL)||0,n=i.valueToCode(e,`VALUE`,a.RELATIONAL)||0,r=i.valueToCode(e,`MAX`,a.RELATIONAL)||0;return[`${t} ${e.getFieldValue(`MIN_OPERATOR`)===`LT`?`<`:`<=`} ${n} && ${n} ${e.getFieldValue(`MAX_OPERATOR`)===`LT`?`<`:`<=`} ${r}`,a.LOGICAL_AND]},r.logic_ifempty={init:function(){this.appendValueInput(`VALUE`).setCheck(null).setAlign(n.Align.RIGHT).appendField(e(`logic_ifempty`)),this.appendValueInput(`DEFLT`).setCheck(null).setAlign(n.Align.RIGHT).appendField(e(`logic_ifempty_then`)),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(e(`logic_ifempty_tooltip`))}},i.forBlock.logic_ifempty=function(e){return[`${i.valueToCode(e,`VALUE`,a.LOGICAL_OR)||null} || ${i.valueToCode(e,`DEFLT`,a.LOGICAL_OR)||null}`,a.LOGICAL_OR]}}export{c as install}; \ No newline at end of file +import{f as e,i as t,p as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{l as o}from"./helpers-C_OEphYI.js";function s(t,s,c,l,u){let d=window.Blockly.Translate,f=`${t}_container`,p=`${t}_mutator`;r[f]={init:function(){this.appendDummyInput().appendField(d(t)),this.appendStatementInput(`STACK`),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(d(`${t}_tooltip`)),this.contextMenu=!1}},r[p]={init:function(){this.appendDummyInput(s).appendField(d(c)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(d(`${t}_tooltip`)),this.contextMenu=!1}},r[t]={init:function(){this.itemCount_=2,this.setMutator(new e.MutatorIcon([p],this)),this.setInputsInline(!1),this.setOutput(!0,`Boolean`),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(d(`${t}_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute(`items`),10),this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(f);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t0&&t.appendField(d(c))}for(let e=this.itemCount_;this.getInput(`${s}${e}`);e++)this.removeInput(`${s}${e}`)}},i.forBlock[t]=function(e){let t=e,n=[];for(let r=0;r0?n.join(l):`false`}`,u]}}function c(){let e=window.Blockly.Translate;s(`logic_multi_and`,`AND`,`logic_multi_and_and`,` && `,a.LOGICAL_AND),s(`logic_multi_or`,`OR`,`logic_multi_or_or`,` || `,a.LOGICAL_OR),r.logic_between={init:function(){this.appendValueInput(`MIN`).setCheck(`Number`),this.appendValueInput(`VALUE`).setCheck(`Number`).appendField(new t([[`<`,`LT`],[`≤`,`LE`]]),`MIN_OPERATOR`),this.appendValueInput(`MAX`).setCheck(`Number`).appendField(new t([[`<`,`LT`],[`≤`,`LE`]]),`MAX_OPERATOR`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(e(`logic_between_tooltip`))}},i.forBlock.logic_between=function(e){let t=i.valueToCode(e,`MIN`,a.RELATIONAL)||0,n=i.valueToCode(e,`VALUE`,a.RELATIONAL)||0,r=i.valueToCode(e,`MAX`,a.RELATIONAL)||0;return[`${t} ${e.getFieldValue(`MIN_OPERATOR`)===`LT`?`<`:`<=`} ${n} && ${n} ${e.getFieldValue(`MAX_OPERATOR`)===`LT`?`<`:`<=`} ${r}`,a.LOGICAL_AND]},r.logic_ifempty={init:function(){this.appendValueInput(`VALUE`).setCheck(null).setAlign(n.Align.RIGHT).appendField(e(`logic_ifempty`)),this.appendValueInput(`DEFLT`).setCheck(null).setAlign(n.Align.RIGHT).appendField(e(`logic_ifempty_then`)),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(`%{BKY_LOGIC_HUE}`),this.setTooltip(e(`logic_ifempty_tooltip`))}},i.forBlock.logic_ifempty=function(e){return[`${i.valueToCode(e,`VALUE`,a.LOGICAL_OR)||null} || ${i.valueToCode(e,`DEFLT`,a.LOGICAL_OR)||null}`,a.LOGICAL_OR]}}export{c as install}; \ No newline at end of file diff --git a/admin/assets/blocks_object-B64vSfel.js b/admin/assets/blocks_object-B64vSfel.js deleted file mode 100644 index 73aa8968..00000000 --- a/admin/assets/blocks_object-B64vSfel.js +++ /dev/null @@ -1 +0,0 @@ -import{f as e,o as t,p as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{c as o,s}from"./helpers-Crmcgphg.js";function c(){let c=window.Blockly,l=c.Translate;c.CustomBlocks=c.CustomBlocks||[],c.CustomBlocks.push(`Object`),c.Object={HUE:40,blocks:{}},c.Object.blocks.object_new=``,r.object_new_container={init:function(){this.setColour(c.Object.HUE),this.appendDummyInput().appendField(l(`object_new_attributes`)),this.appendStatementInput(`STACK`),this.setTooltip(l(`object_new_tooltip`)),this.contextMenu=!1}},r.object_new_mutator={init:function(){this.setColour(c.Object.HUE),this.appendDummyInput(`ATTR`).appendField(l(`object_new_attribute`)).appendField(new t(`attribute1`),`ATTR`),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(l(`object_new_tooltip`)),this.contextMenu=!1}},r.object_new={init:function(){this.appendDummyInput(`NAME`).appendField(l(`object_new`)),this.attributes_=[],this.itemCount_=0,this.setMutator(new e.MutatorIcon([`object_new_mutator`],this)),this.setInputsInline(!1),this.setOutput(!0),this.setColour(c.Object.HUE),this.setTooltip(l(`object_new_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);for(let t=0;t{var n;if(!((n=t.connection)!=null&&n.isConnected())){let n=e.newBlock(`text`);n.setShadow(!0),n.initSvg(),n.render(),n.outputConnection.connect(t.connection)}},100,r)}for(let e=this.itemCount_;this.getInput(`ATTR_${e}`);e++)this.removeInput(`ATTR_${e}`)}},i.forBlock.object_new=function(e){let t=e,n=[];for(let r=0;r attribute1 value `,r.object_set_attr={init:function(){this.appendDummyInput(`ATTR`).appendField(l(`object_set_attr`)).appendField(new t(`attribute1`),`ATTR`),this.appendValueInput(`OBJECT`).appendField(l(`object_set_attr_object`)),this.appendValueInput(`VALUE`).setCheck(null).appendField(l(`object_set_attr_value`)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(c.Object.HUE),this.setTooltip(l(`object_set_attr_tooltip`))}},i.forBlock.object_set_attr=function(e){let t=e.getFieldValue(`ATTR`),n=i.valueToCode(e,`VALUE`,a.ATOMIC),r=i.valueToCode(e,`OBJECT`,a.ATOMIC);return r||=`{}`,`((obj) => { if (typeof obj === 'object') { obj[${s(t)}] = ${n}; } })(${r});\n`},c.Object.blocks.object_del_attr=` attribute1`,r.object_del_attr={init:function(){this.appendDummyInput(`ATTR`).appendField(l(`object_del_attr`)).appendField(new t(`attribute1`),`ATTR`),this.appendValueInput(`OBJECT`).appendField(l(`object_del_attr_object`)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(c.Object.HUE),this.setTooltip(l(`object_del_attr_tooltip`))}},i.forBlock.object_del_attr=function(e){let t=e.getFieldValue(`ATTR`),n=i.valueToCode(e,`OBJECT`,a.ATOMIC);return n||=`{}`,`((obj) => { if (typeof obj === 'object') { delete obj[${s(t)}]; } })(${n});\n`},c.Object.blocks.object_has_attr=` attribute1 Object ID `,r.object_has_attr={init:function(){this.appendValueInput(`OBJECT`).appendField(l(`object_has_attr`)),this.appendDummyInput(`ATTR`).appendField(l(`object_has_attr_attr`)).appendField(new t(`attribute1`),`ATTR`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(c.Object.HUE),this.setTooltip(l(`object_has_attr_tooltip`))}},i.forBlock.object_has_attr=function(e){let t=i.valueToCode(e,`OBJECT`,a.ATOMIC),n=e.getFieldValue(`ATTR`);return[`Object.prototype.hasOwnProperty.call(${t}, ${s(n)})`,a.ATOMIC]},c.Object.blocks.object_keys=` Object ID `,r.object_keys={init:function(){this.appendValueInput(`OBJECT`).appendField(l(`object_keys`)),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setColour(c.Object.HUE),this.setTooltip(l(`object_keys_tooltip`))}},i.forBlock.object_keys=function(e){let t=i.valueToCode(e,`OBJECT`,a.ATOMIC);return t||=`{}`,[`Object.keys(${t})`,a.ATOMIC]}}export{c as install}; \ No newline at end of file diff --git a/admin/assets/blocks_object-DCnwv5kv.js b/admin/assets/blocks_object-DCnwv5kv.js new file mode 100644 index 00000000..b75f5f37 --- /dev/null +++ b/admin/assets/blocks_object-DCnwv5kv.js @@ -0,0 +1 @@ +import{f as e,o as t,p as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{c as o,l as s}from"./helpers-C_OEphYI.js";function c(){let c=window.Blockly,l=c.Translate;c.CustomBlocks=c.CustomBlocks||[],c.CustomBlocks.push(`Object`),c.Object={HUE:40,blocks:{}},c.Object.blocks.object_new=``,r.object_new_container={init:function(){this.setColour(c.Object.HUE),this.appendDummyInput().appendField(l(`object_new_attributes`)),this.appendStatementInput(`STACK`),this.setTooltip(l(`object_new_tooltip`)),this.contextMenu=!1}},r.object_new_mutator={init:function(){this.setColour(c.Object.HUE),this.appendDummyInput(`ATTR`).appendField(l(`object_new_attribute`)).appendField(new t(`attribute1`),`ATTR`),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(l(`object_new_tooltip`)),this.contextMenu=!1}},r.object_new={init:function(){this.appendDummyInput(`NAME`).appendField(l(`object_new`)),this.attributes_=[],this.itemCount_=0,this.setMutator(new e.MutatorIcon([`object_new_mutator`],this)),this.setInputsInline(!1),this.setOutput(!0),this.setColour(c.Object.HUE),this.setTooltip(l(`object_new_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);for(let t=0;t{var n;if(!((n=t.connection)!=null&&n.isConnected())){let n=e.newBlock(`text`);n.setShadow(!0),n.initSvg(),n.render(),n.outputConnection.connect(t.connection)}},100,r)}for(let e=this.itemCount_;this.getInput(`ATTR_${e}`);e++)this.removeInput(`ATTR_${e}`)}},i.forBlock.object_new=function(e){let t=e,n=[];for(let r=0;r attribute1 value `,r.object_set_attr={init:function(){this.appendDummyInput(`ATTR`).appendField(l(`object_set_attr`)).appendField(new t(`attribute1`),`ATTR`),this.appendValueInput(`OBJECT`).appendField(l(`object_set_attr_object`)),this.appendValueInput(`VALUE`).setCheck(null).appendField(l(`object_set_attr_value`)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(c.Object.HUE),this.setTooltip(l(`object_set_attr_tooltip`))}},i.forBlock.object_set_attr=function(e){let t=e.getFieldValue(`ATTR`),n=i.valueToCode(e,`VALUE`,a.ATOMIC),r=i.valueToCode(e,`OBJECT`,a.ATOMIC);return r||=`{}`,`((obj) => { if (typeof obj === 'object') { obj[${o(t)}] = ${n}; } })(${r});\n`},c.Object.blocks.object_del_attr=` attribute1`,r.object_del_attr={init:function(){this.appendDummyInput(`ATTR`).appendField(l(`object_del_attr`)).appendField(new t(`attribute1`),`ATTR`),this.appendValueInput(`OBJECT`).appendField(l(`object_del_attr_object`)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(c.Object.HUE),this.setTooltip(l(`object_del_attr_tooltip`))}},i.forBlock.object_del_attr=function(e){let t=e.getFieldValue(`ATTR`),n=i.valueToCode(e,`OBJECT`,a.ATOMIC);return n||=`{}`,`((obj) => { if (typeof obj === 'object') { delete obj[${o(t)}]; } })(${n});\n`},c.Object.blocks.object_has_attr=` attribute1 Object ID `,r.object_has_attr={init:function(){this.appendValueInput(`OBJECT`).appendField(l(`object_has_attr`)),this.appendDummyInput(`ATTR`).appendField(l(`object_has_attr_attr`)).appendField(new t(`attribute1`),`ATTR`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(c.Object.HUE),this.setTooltip(l(`object_has_attr_tooltip`))}},i.forBlock.object_has_attr=function(e){let t=i.valueToCode(e,`OBJECT`,a.ATOMIC),n=e.getFieldValue(`ATTR`);return[`Object.prototype.hasOwnProperty.call(${t}, ${o(n)})`,a.ATOMIC]},c.Object.blocks.object_keys=` Object ID `,r.object_keys={init:function(){this.appendValueInput(`OBJECT`).appendField(l(`object_keys`)),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setColour(c.Object.HUE),this.setTooltip(l(`object_keys_tooltip`))}},i.forBlock.object_keys=function(e){let t=i.valueToCode(e,`OBJECT`,a.ATOMIC);return t||=`{}`,[`Object.keys(${t})`,a.ATOMIC]}}export{c as install}; \ No newline at end of file diff --git a/admin/assets/blocks_procedures-BpvNI5dO.js b/admin/assets/blocks_procedures-8BHrspJl.js similarity index 58% rename from admin/assets/blocks_procedures-BpvNI5dO.js rename to admin/assets/blocks_procedures-8BHrspJl.js index 9956954b..76f4e87c 100644 --- a/admin/assets/blocks_procedures-BpvNI5dO.js +++ b/admin/assets/blocks_procedures-8BHrspJl.js @@ -1,3 +1,3 @@ -import{f as e,h as t,l as n,o as r,s as i,t as a}from"./blockly-C4zJerWL.js";import{n as o,t as s}from"./javascript-DVIhlTDr.js";import{FieldScript as c,b64DecodeUnicode as l}from"./field_script-CdzYBCe6.js";function u(e){return a[e]}function d(){let d=window.Blockly,f=d.Translate,p=t.xml,m=u(`procedures_ifreturn`);m.FUNCTION_TYPES.includes(`procedures_defcustomreturn`)||m.FUNCTION_TYPES.push(`procedures_defcustomreturn`),m.FUNCTION_TYPES.includes(`procedures_defcustomnoreturn`)||m.FUNCTION_TYPES.push(`procedures_defcustomnoreturn`),d.Procedures.allProceduresNew=function(e){let t=n.allProcedures(e),r=()=>e.getProcedureMap().getProcedures().filter(e=>!!e.getReturnTypes()).map(e=>[e.getName(),e.getParameters().map(e=>e.getName()),!0]),i=t=>{let i=r();return e.getBlocksByType(t,!1).forEach(e=>{n.isProcedureBlock(e)||i.push(e.getProcedureDef())}),i};return t.concat([i(`procedures_defcustomnoreturn`),i(`procedures_defcustomreturn`)])},d.Procedures.flyoutCategoryNew=function(e){let t=[],n=(e,n)=>{if(!a[e])return;let r=p.createElement(`block`);r.setAttribute(`type`,e),r.setAttribute(`gap`,`16`);let o=p.createElement(`field`);o.setAttribute(`name`,`NAME`),o.appendChild(p.createTextNode(i[n])),r.appendChild(o),t.push(r)},r=e=>{if(!a[e])return;let n=p.createElement(`block`);n.setAttribute(`type`,e),n.setAttribute(`gap`,`16`),t.push(n)};n(`procedures_defnoreturn`,`PROCEDURES_DEFNORETURN_PROCEDURE`),n(`procedures_defreturn`,`PROCEDURES_DEFRETURN_PROCEDURE`),r(`procedures_ifreturn`),r(`procedures_return`),n(`procedures_defcustomnoreturn`,`PROCEDURES_DEFNORETURN_PROCEDURE`),n(`procedures_defcustomreturn`,`PROCEDURES_DEFRETURN_PROCEDURE`),t.length&&t[t.length-1].setAttribute(`gap`,`24`);let o=(e,n)=>{for(let[r,i]of e){let e=p.createElement(`block`);e.setAttribute(`type`,n),e.setAttribute(`gap`,`16`);let a=p.createElement(`mutation`);a.setAttribute(`name`,r),e.appendChild(a);for(let e of i){let t=p.createElement(`arg`);t.setAttribute(`name`,e),a.appendChild(t)}t.push(e)}},s=d.Procedures.allProceduresNew(e);return o(s[0],`procedures_callnoreturn`),o(s[1],`procedures_callreturn`),o(s[2],`procedures_callcustomnoreturn`),o(s[3],`procedures_callcustomreturn`),t},o.forBlock.procedures_defreturn=function(e){let t=o,r=t.nameDB_.getName(e.getFieldValue(`NAME`),n.CATEGORY_NAME),i=``;t.STATEMENT_PREFIX&&(i+=t.injectId(t.STATEMENT_PREFIX,e)),t.STATEMENT_SUFFIX&&(i+=t.injectId(t.STATEMENT_SUFFIX,e)),i&&=t.prefixLines(i,t.INDENT);let a=``;t.INFINITE_LOOP_TRAP&&(a=t.prefixLines(t.injectId(t.INFINITE_LOOP_TRAP,e),t.INDENT));let c=``,l=``,u=t.statementToCode(e,`STACK`);e.getInput(`RETURN`)&&(c=t.valueToCode(e,`RETURN`,s.NONE)||``,u&&c&&(l=i),c&&=`${t.INDENT}return ${c};\n`);let d=`async function ${r}(${e.getVarModels().map(e=>t.nameDB_.getName(e.name,`VARIABLE`)).join(`, `)}) {\n${i}${a}${u}${l}${c}}`;return d=t.scrub_(e,d),t.definitions_[`%${r}`]=d,null},o.forBlock.procedures_defnoreturn=o.forBlock.procedures_defreturn,o.forBlock.procedures_callreturn=function(e){let t=o;return[`await ${t.nameDB_.getName(e.getFieldValue(`NAME`),n.CATEGORY_NAME)}(${e.getVarModels().map((n,r)=>t.valueToCode(e,`ARG${r}`,s.NONE)||`null`).join(`, `)})`,s.FUNCTION_CALL]};let h=t=>{let o=t?`procedures_defcustomreturn`:`procedures_defcustomnoreturn`,s=u(t?`procedures_defreturn`:`procedures_defnoreturn`),l=t?`procedures_defcustomreturn_name`:`procedures_defcustomnoreturn_name`,d=t?`PROCEDURES_DEFRETURN`:`PROCEDURES_DEFNORETURN`;a[o]={getProcedureModel(){return this.model},isProcedureDef(){return!0},init:function(){var a;let o=new r(``,n.rename);o.setSpellcheck(!1),this.appendDummyInput().appendField(f(l)).appendField(o,`NAME`).appendField(``,`PARAMS`),this.setMutator(new e.MutatorIcon([`procedures_mutatorarg`],this));let s=this.workspace.options;(s.comments||(a=s.parentWorkspace)!=null&&a.options.comments)&&i[`${d}_COMMENT`]&&this.setCommentText(i[`${d}_COMMENT`]),this.setStyle(`procedure_blocks`),t||this.setColour(i.PROCEDURES_HUE),this.setTooltip(i[`${d}_TOOLTIP`]),this.setHelpUrl(i[`${d}_HELPURL`]),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null,this.appendDummyInput(`SCRIPT`).appendField(new c(t?btoa(`return 0;`):``),`SCRIPT`),this.setInputsInline(!0),this.setStatements_(!1)},setStatements_:s.setStatements_,updateParams_:s.updateParams_,mutationToDom:s.mutationToDom,domToMutation:s.domToMutation,decompose:function(e){var t,r;let i=e.newBlock(`procedures_mutatorcontainer`);i.initSvg(),(t=i.getInput(`STATEMENT_INPUT`))==null||t.setVisible(!1);let a=(r=i.getInput(`STACK`))==null?void 0:r.connection;for(let t=0;t{let t=e?`procedures_callcustomreturn`:`procedures_callcustomnoreturn`,n=u(e?`procedures_callreturn`:`procedures_callnoreturn`);a[t]={init:n.init,getProcedureCall:n.getProcedureCall,renameProcedure:n.renameProcedure,setProcedureParameters_:n.setProcedureParameters_,updateShape_:n.updateShape_,mutationToDom:n.mutationToDom,domToMutation:n.domToMutation,getVarModels:n.getVarModels,onchange:n.onchange,customContextMenu:n.customContextMenu,defType_:e?`procedures_defcustomreturn`:`procedures_defcustomnoreturn`}};h(!0),o.forBlock.procedures_defcustomreturn=function(e){let t=o,r=t.nameDB_.getName(e.getFieldValue(`NAME`),n.CATEGORY_NAME),i=e.arguments_.map(e=>t.nameDB_.getName(e,`VARIABLE`)),a=l(e.getFieldValue(`SCRIPT`)||``).split(` +import{f as e,h as t,l as n,o as r,s as i,t as a}from"./blockly-C4zJerWL.js";import{n as o,t as s}from"./javascript-DVIhlTDr.js";import{FieldScript as c,b64DecodeUnicode as l}from"./field_script-CdzYBCe6.js";function u(e){return a[e]}function d(){let d=window.Blockly,f=d.Translate,p=t.xml,m=u(`procedures_ifreturn`);m.FUNCTION_TYPES.includes(`procedures_defcustomreturn`)||m.FUNCTION_TYPES.push(`procedures_defcustomreturn`),m.FUNCTION_TYPES.includes(`procedures_defcustomnoreturn`)||m.FUNCTION_TYPES.push(`procedures_defcustomnoreturn`),d.Procedures.allProceduresNew=function(e){let t=n.allProcedures(e),r=()=>e.getProcedureMap().getProcedures().filter(e=>!!e.getReturnTypes()).map(e=>[e.getName(),e.getParameters().map(e=>e.getName()),!0]),i=t=>{let i=r();return e.getBlocksByType(t,!1).forEach(e=>{n.isProcedureBlock(e)||i.push(e.getProcedureDef())}),i};return t.concat([i(`procedures_defcustomnoreturn`),i(`procedures_defcustomreturn`)])},d.Procedures.flyoutCategoryNew=function(e){let t=[],n=(e,n)=>{if(!a[e])return;let r=p.createElement(`block`);r.setAttribute(`type`,e),r.setAttribute(`gap`,`16`);let o=p.createElement(`field`);o.setAttribute(`name`,`NAME`),o.appendChild(p.createTextNode(i[n])),r.appendChild(o),t.push(r)},r=e=>{if(!a[e])return;let n=p.createElement(`block`);n.setAttribute(`type`,e),n.setAttribute(`gap`,`16`),t.push(n)};n(`procedures_defnoreturn`,`PROCEDURES_DEFNORETURN_PROCEDURE`),n(`procedures_defreturn`,`PROCEDURES_DEFRETURN_PROCEDURE`),r(`procedures_ifreturn`),r(`procedures_return`),n(`procedures_defcustomnoreturn`,`PROCEDURES_DEFNORETURN_PROCEDURE`),n(`procedures_defcustomreturn`,`PROCEDURES_DEFRETURN_PROCEDURE`),t.length&&t[t.length-1].setAttribute(`gap`,`24`);let o=(e,n)=>{for(let[r,i]of e){let e=p.createElement(`block`);e.setAttribute(`type`,n),e.setAttribute(`gap`,`16`);let a=p.createElement(`mutation`);a.setAttribute(`name`,r),e.appendChild(a);for(let e of i){let t=p.createElement(`arg`);t.setAttribute(`name`,e),a.appendChild(t)}t.push(e)}},s=d.Procedures.allProceduresNew(e);return o(s[0],`procedures_callnoreturn`),o(s[1],`procedures_callreturn`),o(s[2],`procedures_callcustomnoreturn`),o(s[3],`procedures_callcustomreturn`),t},o.forBlock.procedures_defreturn=function(e){let t=o,r=t.nameDB_.getName(e.getFieldValue(`NAME`),n.CATEGORY_NAME),i=``;t.STATEMENT_PREFIX&&(i+=t.injectId(t.STATEMENT_PREFIX,e)),t.STATEMENT_SUFFIX&&(i+=t.injectId(t.STATEMENT_SUFFIX,e)),i&&=t.prefixLines(i,t.INDENT);let a=``;t.INFINITE_LOOP_TRAP&&(a=t.prefixLines(t.injectId(t.INFINITE_LOOP_TRAP,e),t.INDENT));let c=``,l=``,u=e.getInput(`STACK`)?t.statementToCode(e,`STACK`):``;e.getInput(`RETURN`)&&(c=t.valueToCode(e,`RETURN`,s.NONE)||``,u&&c&&(l=i),c&&=`${t.INDENT}return ${c};\n`);let d=`async function ${r}(${e.getVarModels().map(e=>t.nameDB_.getName(e.name,`VARIABLE`)).join(`, `)}) {\n${i}${a}${u}${l}${c}}`;return d=t.scrub_(e,d),t.definitions_[`%${r}`]=d,null},o.forBlock.procedures_defnoreturn=o.forBlock.procedures_defreturn,o.forBlock.procedures_callreturn=function(e){let t=o;return[`await ${t.nameDB_.getName(e.getFieldValue(`NAME`),n.CATEGORY_NAME)}(${e.getVarModels().map((n,r)=>t.valueToCode(e,`ARG${r}`,s.NONE)||`null`).join(`, `)})`,s.FUNCTION_CALL]};let h=t=>{let o=t?`procedures_defcustomreturn`:`procedures_defcustomnoreturn`,s=u(t?`procedures_defreturn`:`procedures_defnoreturn`),l=t?`procedures_defcustomreturn_name`:`procedures_defcustomnoreturn_name`,d=t?`PROCEDURES_DEFRETURN`:`PROCEDURES_DEFNORETURN`;a[o]={getProcedureModel(){return this.model},isProcedureDef(){return!0},init:function(){var a;let o=new r(``,n.rename);o.setSpellcheck(!1),this.appendDummyInput().appendField(f(l)).appendField(o,`NAME`).appendField(``,`PARAMS`),this.setMutator(new e.MutatorIcon([`procedures_mutatorarg`],this));let s=this.workspace.options;(s.comments||(a=s.parentWorkspace)!=null&&a.options.comments)&&i[`${d}_COMMENT`]&&this.setCommentText(i[`${d}_COMMENT`]),this.setStyle(`procedure_blocks`),t||this.setColour(i.PROCEDURES_HUE),this.setTooltip(i[`${d}_TOOLTIP`]),this.setHelpUrl(i[`${d}_HELPURL`]),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null,this.appendDummyInput(`SCRIPT`).appendField(new c(t?btoa(`return 0;`):``),`SCRIPT`),this.setInputsInline(!0),this.setStatements_(!1)},setStatements_:s.setStatements_,updateParams_:s.updateParams_,mutationToDom:s.mutationToDom,domToMutation:s.domToMutation,decompose:function(e){var t,r;let i=e.newBlock(`procedures_mutatorcontainer`);i.initSvg(),(t=i.getInput(`STATEMENT_INPUT`))==null||t.setVisible(!1);let a=(r=i.getInput(`STACK`))==null?void 0:r.connection;for(let t=0;t{let t=e?`procedures_callcustomreturn`:`procedures_callcustomnoreturn`,n=u(e?`procedures_callreturn`:`procedures_callnoreturn`);a[t]={init:n.init,getProcedureCall:n.getProcedureCall,renameProcedure:n.renameProcedure,setProcedureParameters_:n.setProcedureParameters_,updateShape_:n.updateShape_,mutationToDom:n.mutationToDom,domToMutation:n.domToMutation,getVarModels:n.getVarModels,onchange:n.onchange,customContextMenu:n.customContextMenu,defType_:e?`procedures_defcustomreturn`:`procedures_defcustomnoreturn`}};h(!0),o.forBlock.procedures_defcustomreturn=function(e){let t=o,r=t.nameDB_.getName(e.getFieldValue(`NAME`),n.CATEGORY_NAME),i=e.arguments_.map(e=>t.nameDB_.getName(e,`VARIABLE`)),a=l(e.getFieldValue(`SCRIPT`)||``).split(` `).map(e=>` ${e}`),s=`async function ${r}(${i.join(`, `)}) {\n${a.join(` `)}\n}`;return s=t.scrub_(e,s),t.definitions_[`%${r}`]=s,null},g(!0),o.forBlock.procedures_callcustomreturn=o.forBlock.procedures_callreturn,u(`procedures_ifreturn`).init=function(){let e=this.appendValueInput(`CONDITION`).setCheck(`Boolean`).appendField(i.CONTROLS_IF_MSG_IF),t=this.workspace.newBlock(`logic_boolean`);t.setShadow(!0),t.setFieldValue(`TRUE`,`BOOL`),t.outputConnection.connect(e.connection),this.appendValueInput(`VALUE`).appendField(i.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle(`procedure_blocks`),this.setTooltip(i.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(i.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},h(!1),a.procedures_defcustomnoreturn.decompose=a.procedures_defcustomreturn.decompose,a.procedures_defcustomnoreturn.compose=a.procedures_defcustomreturn.compose,o.forBlock.procedures_defcustomnoreturn=o.forBlock.procedures_defcustomreturn,g(!1),o.forBlock.procedures_callcustomnoreturn=function(e){return`${o.forBlock.procedures_callcustomreturn(e,o)[0]};\n`},a.procedures_return={init:function(){this.appendValueInput(`VALUE`).appendField(i.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle(`procedure_blocks`),this.setTooltip(i.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(i.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},mutationToDom:function(){let e=p.createElement(`mutation`);return e.setAttribute(`value`,String(Number(this.hasReturnValue_))),e},domToMutation:function(e){this.hasReturnValue_=e.getAttribute(`value`)===`1`,this.hasReturnValue_||(this.removeInput(`VALUE`),this.appendDummyInput(`VALUE`).appendField(i.PROCEDURES_DEFRETURN_RETURN))},onchange:function(e){var t,n;if((t=(n=this.workspace).isDragging)!=null&&t.call(n)||e.type!==`move`&&e.type!==`create`)return;let r=!1,a=this;do{if(this.FUNCTION_TYPES.includes(a.type)){r=!0;break}a=a.getSurroundParent()}while(a);r?(a.type===`procedures_defnoreturn`&&this.hasReturnValue_?(this.removeInput(`VALUE`),this.appendDummyInput(`VALUE`).appendField(i.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):a.type===`procedures_defreturn`&&!this.hasReturnValue_&&(this.removeInput(`VALUE`),this.appendValueInput(`VALUE`).appendField(i.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(i.PROCEDURES_IFRETURN_WARNING),this.isInFlyout||this.setDisabledReason(!r,`UNPARENTED_IFRETURN`)},FUNCTION_TYPES:[`procedures_defnoreturn`,`procedures_defreturn`,`procedures_defcustomreturn`,`procedures_defcustomnoreturn`]},o.forBlock.procedures_return=function(e,t){let n=``;if(t.STATEMENT_SUFFIX&&(n+=t.prefixLines(t.injectId(t.STATEMENT_SUFFIX,e),t.INDENT)),e.hasReturnValue_){let r=t.valueToCode(e,`VALUE`,s.NONE)||`null`;n+=`${t.INDENT}return ${r};\n`}else n+=`${t.INDENT}return;\n`;return n}}export{d as install}; \ No newline at end of file diff --git a/admin/assets/blocks_sendto-pwZchfe0.js b/admin/assets/blocks_sendto-BR7ZFKj1.js similarity index 80% rename from admin/assets/blocks_sendto-pwZchfe0.js rename to admin/assets/blocks_sendto-BR7ZFKj1.js index 6c8ee5ce..6438b805 100644 --- a/admin/assets/blocks_sendto-pwZchfe0.js +++ b/admin/assets/blocks_sendto-BR7ZFKj1.js @@ -1,5 +1,5 @@ -import{f as e,i as t,o as n,p as r,r as i,t as a}from"./blockly-C4zJerWL.js";import{n as o,t as s}from"./javascript-DVIhlTDr.js";import{c,i as l,o as u,r as d,s as f,u as p}from"./helpers-Crmcgphg.js";function m(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function h(){let h=window.Blockly,g=h.Translate,_=window.getHelp;h.CustomBlocks=h.CustomBlocks||[],h.CustomBlocks.push(`Sendto`),h.Sendto={HUE:310,blocks:{}};let v=()=>new i(`FALSE`,function(e){this.getSourceBlock().updateShape_(d(e))});h.Sendto.blocks.sendto_custom=` admin.0 send FALSE `,a.sendto_custom_container={init:function(){this.appendDummyInput().appendField(g(`sendto_custom_arguments`)),this.appendStatementInput(`STACK`),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_custom_arg_tooltip`)),this.contextMenu=!1}},a.sendto_custom_mutator={init:function(){this.appendDummyInput(`ATTR`).appendField(g(`sendto_custom_argument`)).appendField(new n(`parameter`),`ATTR`),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_custom_arg_tooltip`)),this.contextMenu=!1}},a.sendto_custom={init:function(){var r;let i=[];if((r=window.main)!=null&&r.instances){for(let e of window.main.instances){var a;if((a=window.main.objects[e])!=null&&(a=a.common)!=null&&a.messagebox){let t=e.substring(15);i.push([t,t])}}i.length||i.push([g(`sendto_no_instances`),``]),this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_custom`)).appendField(new t(i),`INSTANCE`)}else this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_custom`)).appendField(new n(`adapter.0`),`INSTANCE`);this.appendDummyInput(`COMMAND`).appendField(g(`sendto_custom_command`)).appendField(new n(`send`),`COMMAND`),this.appendDummyInput(`LOG`).appendField(g(`loglevel`)).appendField(new t(l()),`LOG`),this.appendDummyInput(`WITH_STATEMENT`).appendField(g(`with_results`)).appendField(v(),`WITH_STATEMENT`),this.attributes_=[],this.itemCount_=0,this.setMutator(new e.MutatorIcon([`sendto_custom_mutator`],this)),this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_custom_tooltip`)),this.setHelpUrl(_(`sendto_custom_help`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,this.attributes_.map(e=>encodeURIComponent(e)).join(`,`)),e},domToMutation:function(e){this.attributes_=e.getAttribute(`items`).split(`,`).map(e=>decodeURIComponent(e)),this.itemCount_=this.attributes_.length,this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(`sendto_custom_container`);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t=1&&n.fieldRow[0].setValue(this.attributes_[e]):(n=this.appendValueInput(`ARG${e}`).setAlign(r.Align.RIGHT),n.appendField(this.attributes_[e])),setTimeout(e=>{var n;if(!((n=e.connection)!=null&&n.isConnected())){let n=t.newBlock(`text`);n.setShadow(!0),n.initSvg(),n.render(),n.outputConnection.connect(e.connection)}},100,n)}for(let e=this.itemCount_;this.getInput(`ARG${e}`);e++)this.removeInput(`ARG${e}`);p(this,e)}},o.forBlock.sendto_custom=function(e){let t=e,n=e.getFieldValue(`INSTANCE`),r=e.getFieldValue(`LOG`),i=e.getFieldValue(`COMMAND`),a=``,c;d(e.getFieldValue(`WITH_STATEMENT`))&&(c=o.statementToCode(e,`STATEMENT`));let l=[];for(let u=0;u {\n${c}});\n${a}`:`sendTo('${n}', ${f(i)}, ${p});\n${a}`;l.push({attr:d.replace(/'/g,`\\'`),val:p})}let u=l.length?l.map(e=>o.prefixLines(`'${e.attr}': ${e.val},`,o.INDENT)).join(` -`):``;return r&&(a=`console.${r}('sendTo[custom] ${n}: ${l.length?l.map(e=>`${e.attr}: ' + ${e.val} + '`).join(`, `):`[no args]`}');\n`),c?`sendTo('${n}', ${f(i)}, {\n${u}\n}, async (result) => {\n${c}});\n${a}`:`sendTo('${n}', ${f(i)}, {\n${u}\n});\n${a}`},h.Sendto.blocks.sendto_otherscript=` 0 1000 ms customMessage FALSE Script Object ID `,a.sendto_otherscript={init:function(){var e;let r=[];if((e=window.main)!=null&&e.instances)for(let e of window.main.instances){let t=e.match(/^system\.adapter\.javascript\.(\d+)$/);if(t){let e=parseInt(t[1],10);r.push([`javascript.${e}`,String(e)])}}if(!r.length)for(let e=0;e<=4;e++)r.push([`javascript.${e}`,String(e)]);this.appendDummyInput(`NAME`).appendField(`✉️ ${g(`sendto_otherscript_name`)}`),this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_otherscript_instance`)).appendField(new t(r),`INSTANCE`),this.appendValueInput(`OID`).appendField(g(`sendto_otherscript_script`)).setCheck(null),this.appendDummyInput().appendField(g(`sendto_otherscript_timeout`)).appendField(new n(`1000`),`TIMEOUT`).appendField(new t([[g(`timeouts_settimeout_ms`),`ms`],[g(`timeouts_settimeout_sec`),`sec`],[g(`timeouts_settimeout_min`),`min`]]),`UNIT`),this.appendDummyInput(`MESSAGE`).appendField(g(`sendto_otherscript_message`)).appendField(new n(`customMessage`),`MESSAGE`),this.appendValueInput(`DATA`).appendField(g(`sendto_otherscript_data`)),this.appendDummyInput(`WITH_STATEMENT`).appendField(g(`with_results`)).appendField(v(),`WITH_STATEMENT`),this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_otherscript_tooltip`)),this.setHelpUrl(_(`sendto_otherscript_help`))},updateShape_:function(e){p(this,e)}},o.forBlock.sendto_otherscript=function(e){let t=e.getFieldValue(`INSTANCE`),n=o.valueToCode(e,`OID`,s.ATOMIC),r=e.getFieldValue(`MESSAGE`),i=m(e.getFieldValue(`TIMEOUT`),e.getFieldValue(`UNIT`)),a;d(e.getFieldValue(`WITH_STATEMENT`))&&(a=o.statementToCode(e,`STATEMENT`));let c=u(n),l=o.valueToCode(e,`DATA`,s.ATOMIC)||`true`,p=`{ instance: ${t}, script: ${n}${c?` /* ${c} */`:``}, message: ${f(r)} }`;return a?`messageTo(${p}, ${l}, { timeout: ${i} }, (result) => {\n${a}})\n`:`messageTo(${p}, ${l}, { timeout: ${i} });\n`},h.Sendto.blocks.sendto_gethistory=` default none 0 500 min dayStart dayEnd `,a.sendto_gethistory={init:function(){var e;let r=[[`default`,`default`]];if((e=window.main)!=null&&e.instances)for(let e of window.main.instances){let t=e.match(/^system\.adapter\.(history|influxdb|sql)\.(\d+)$/);if(t){let e=`${t[1]}.${t[2]}`;r.push([e,e])}}this.appendDummyInput(`NAME`).appendField(g(`sendto_gethistory_name`)),this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_gethistory_instance`)).appendField(new t(r),`INSTANCE`),this.appendValueInput(`OID`).appendField(g(`sendto_gethistory_oid`)).setCheck(null),this.appendValueInput(`START`).appendField(g(`sendto_gethistory_start`)).setCheck(null),this.appendValueInput(`END`).appendField(g(`sendto_gethistory_end`)).setCheck(null),this.appendDummyInput(`AGGREGATE`).appendField(g(`sendto_gethistory_aggregate`)).appendField(new t([[g(`sendto_gethistory_none`),`none`],[g(`sendto_gethistory_minimum`),`min`],[g(`sendto_gethistory_maximum`),`max`],[g(`sendto_gethistory_avg`),`average`],[g(`sendto_gethistory_cnt`),`count`]]),`AGGREGATE`),this.appendDummyInput(`UNIT`).appendField(g(`sendto_gethistory_step`)).appendField(new n(`0`),`STEP`).appendField(new t([[g(`sendto_gethistory_ms`),`ms`],[g(`sendto_gethistory_sec`),`sec`],[g(`sendto_gethistory_min`),`min`],[g(`sendto_gethistory_hour`),`hour`],[g(`sendto_gethistory_day`),`day`]]),`UNIT`),this.appendDummyInput(`COUNT`).appendField(g(`sendto_gethistory_count`)).appendField(new n(`0`),`COUNT`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_gethistory_tooltip`)),this.setHelpUrl(_(`sendto_gethistory_help`))}},o.forBlock.sendto_gethistory=function(e){let t=e.getFieldValue(`INSTANCE`),n=o.valueToCode(e,`OID`,s.ATOMIC),r=o.valueToCode(e,`START`,s.ATOMIC),i=o.valueToCode(e,`END`,s.ATOMIC),a=e.getFieldValue(`AGGREGATE`),c=e.getFieldValue(`UNIT`),l=parseInt(e.getFieldValue(`COUNT`),10),d=parseFloat(e.getFieldValue(`STEP`));c===`day`?d*=864e5:c===`hour`?d*=36e5:c===`min`?d*=6e4:c===`sec`&&(d*=1e3);let p=o.statementToCode(e,`STATEMENT`),m=u(n);return`getHistory(${t==="default"?``:`${f(t)}, `}{\n id: ${n}${m?` /* ${m} */`:``},\n start: ${r},\n end: ${i},\n`+(d>0&&a!==`none`?` step: ${d},\n`:``)+(d===0||a===`none`?` count: ${l},\n`:``)+` aggregate: '${a}',\n removeBorderValues: true,\n}, async (err, result) => {\n if (err) {\n console.error(err);\n`+(p?` } else { -`:``)+(p?o.prefixLines(p,o.INDENT):``)+` } +import{f as e,i as t,o as n,p as r,r as i,t as a}from"./blockly-C4zJerWL.js";import{n as o,t as s}from"./javascript-DVIhlTDr.js";import{c,d as l,i as u,l as d,r as f,s as p}from"./helpers-C_OEphYI.js";function m(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function h(){let h=window.Blockly,g=h.Translate,_=window.getHelp;h.CustomBlocks=h.CustomBlocks||[],h.CustomBlocks.push(`Sendto`),h.Sendto={HUE:310,blocks:{}};let v=()=>new i(`FALSE`,function(e){this.getSourceBlock().updateShape_(f(e))});h.Sendto.blocks.sendto_custom=` admin.0 send FALSE `,a.sendto_custom_container={init:function(){this.appendDummyInput().appendField(g(`sendto_custom_arguments`)),this.appendStatementInput(`STACK`),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_custom_arg_tooltip`)),this.contextMenu=!1}},a.sendto_custom_mutator={init:function(){this.appendDummyInput(`ATTR`).appendField(g(`sendto_custom_argument`)).appendField(new n(`parameter`),`ATTR`),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_custom_arg_tooltip`)),this.contextMenu=!1}},a.sendto_custom={init:function(){var r;let i=[];if((r=window.main)!=null&&r.instances){for(let e of window.main.instances){var a;if((a=window.main.objects[e])!=null&&(a=a.common)!=null&&a.messagebox){let t=e.substring(15);i.push([t,t])}}i.length||i.push([g(`sendto_no_instances`),``]),this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_custom`)).appendField(new t(i),`INSTANCE`)}else this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_custom`)).appendField(new n(`adapter.0`),`INSTANCE`);this.appendDummyInput(`COMMAND`).appendField(g(`sendto_custom_command`)).appendField(new n(`send`),`COMMAND`),this.appendDummyInput(`LOG`).appendField(g(`loglevel`)).appendField(new t(u()),`LOG`),this.appendDummyInput(`WITH_STATEMENT`).appendField(g(`with_results`)).appendField(v(),`WITH_STATEMENT`),this.attributes_=[],this.itemCount_=0,this.setMutator(new e.MutatorIcon([`sendto_custom_mutator`],this)),this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_custom_tooltip`)),this.setHelpUrl(_(`sendto_custom_help`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,this.attributes_.map(e=>encodeURIComponent(e)).join(`,`)),e},domToMutation:function(e){this.attributes_=e.getAttribute(`items`).split(`,`).map(e=>decodeURIComponent(e)),this.itemCount_=this.attributes_.length,this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(`sendto_custom_container`);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t=1&&n.fieldRow[0].setValue(this.attributes_[e]):(n=this.appendValueInput(`ARG${e}`).setAlign(r.Align.RIGHT),n.appendField(this.attributes_[e])),setTimeout(e=>{var n;if(!((n=e.connection)!=null&&n.isConnected())){let n=t.newBlock(`text`);n.setShadow(!0),n.initSvg(),n.render(),n.outputConnection.connect(e.connection)}},100,n)}for(let e=this.itemCount_;this.getInput(`ARG${e}`);e++)this.removeInput(`ARG${e}`);l(this,e)}},o.forBlock.sendto_custom=function(e){let t=e,n=e.getFieldValue(`INSTANCE`),r=e.getFieldValue(`LOG`),i=e.getFieldValue(`COMMAND`),a=``,l;f(e.getFieldValue(`WITH_STATEMENT`))&&(l=o.statementToCode(e,`STATEMENT`));let u=[];for(let d=0;d {\n${l}});\n${a}`:`sendTo('${n}', ${c(i)}, ${p});\n${a}`;u.push({attr:f.replace(/'/g,`\\'`),val:p})}let d=u.length?u.map(e=>o.prefixLines(`'${e.attr}': ${e.val},`,o.INDENT)).join(` +`):``;return r&&(a=`console.${r}('sendTo[custom] ${n}: ${u.length?u.map(e=>`${e.attr}: ' + ${e.val} + '`).join(`, `):`[no args]`}');\n`),l?`sendTo('${n}', ${c(i)}, {\n${d}\n}, async (result) => {\n${l}});\n${a}`:`sendTo('${n}', ${c(i)}, {\n${d}\n});\n${a}`},h.Sendto.blocks.sendto_otherscript=` 0 1000 ms customMessage FALSE Script Object ID `,a.sendto_otherscript={init:function(){var e;let r=[];if((e=window.main)!=null&&e.instances)for(let e of window.main.instances){let t=e.match(/^system\.adapter\.javascript\.(\d+)$/);if(t){let e=parseInt(t[1],10);r.push([`javascript.${e}`,String(e)])}}if(!r.length)for(let e=0;e<=4;e++)r.push([`javascript.${e}`,String(e)]);this.appendDummyInput(`NAME`).appendField(`✉️ ${g(`sendto_otherscript_name`)}`),this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_otherscript_instance`)).appendField(new t(r),`INSTANCE`),this.appendValueInput(`OID`).appendField(g(`sendto_otherscript_script`)).setCheck(null),this.appendDummyInput().appendField(g(`sendto_otherscript_timeout`)).appendField(new n(`1000`),`TIMEOUT`).appendField(new t([[g(`timeouts_settimeout_ms`),`ms`],[g(`timeouts_settimeout_sec`),`sec`],[g(`timeouts_settimeout_min`),`min`]]),`UNIT`),this.appendDummyInput(`MESSAGE`).appendField(g(`sendto_otherscript_message`)).appendField(new n(`customMessage`),`MESSAGE`),this.appendValueInput(`DATA`).appendField(g(`sendto_otherscript_data`)),this.appendDummyInput(`WITH_STATEMENT`).appendField(g(`with_results`)).appendField(v(),`WITH_STATEMENT`),this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_otherscript_tooltip`)),this.setHelpUrl(_(`sendto_otherscript_help`))},updateShape_:function(e){l(this,e)}},o.forBlock.sendto_otherscript=function(e){let t=e.getFieldValue(`INSTANCE`),n=o.valueToCode(e,`OID`,s.ATOMIC),r=e.getFieldValue(`MESSAGE`),i=m(e.getFieldValue(`TIMEOUT`),e.getFieldValue(`UNIT`)),a;f(e.getFieldValue(`WITH_STATEMENT`))&&(a=o.statementToCode(e,`STATEMENT`));let l=p(n),u=o.valueToCode(e,`DATA`,s.ATOMIC)||`true`,d=`{ instance: ${t}, script: ${n}${l?` /* ${l} */`:``}, message: ${c(r)} }`;return a?`messageTo(${d}, ${u}, { timeout: ${i} }, (result) => {\n${a}})\n`:`messageTo(${d}, ${u}, { timeout: ${i} });\n`},h.Sendto.blocks.sendto_gethistory=` default none 0 500 min dayStart dayEnd `,a.sendto_gethistory={init:function(){var e;let r=[[`default`,`default`]];if((e=window.main)!=null&&e.instances)for(let e of window.main.instances){let t=e.match(/^system\.adapter\.(history|influxdb|sql)\.(\d+)$/);if(t){let e=`${t[1]}.${t[2]}`;r.push([e,e])}}this.appendDummyInput(`NAME`).appendField(g(`sendto_gethistory_name`)),this.appendDummyInput(`INSTANCE`).appendField(g(`sendto_gethistory_instance`)).appendField(new t(r),`INSTANCE`),this.appendValueInput(`OID`).appendField(g(`sendto_gethistory_oid`)).setCheck(null),this.appendValueInput(`START`).appendField(g(`sendto_gethistory_start`)).setCheck(null),this.appendValueInput(`END`).appendField(g(`sendto_gethistory_end`)).setCheck(null),this.appendDummyInput(`AGGREGATE`).appendField(g(`sendto_gethistory_aggregate`)).appendField(new t([[g(`sendto_gethistory_none`),`none`],[g(`sendto_gethistory_minimum`),`min`],[g(`sendto_gethistory_maximum`),`max`],[g(`sendto_gethistory_avg`),`average`],[g(`sendto_gethistory_cnt`),`count`]]),`AGGREGATE`),this.appendDummyInput(`UNIT`).appendField(g(`sendto_gethistory_step`)).appendField(new n(`0`),`STEP`).appendField(new t([[g(`sendto_gethistory_ms`),`ms`],[g(`sendto_gethistory_sec`),`sec`],[g(`sendto_gethistory_min`),`min`],[g(`sendto_gethistory_hour`),`hour`],[g(`sendto_gethistory_day`),`day`]]),`UNIT`),this.appendDummyInput(`COUNT`).appendField(g(`sendto_gethistory_count`)).appendField(new n(`0`),`COUNT`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(h.Sendto.HUE),this.setTooltip(g(`sendto_gethistory_tooltip`)),this.setHelpUrl(_(`sendto_gethistory_help`))}},o.forBlock.sendto_gethistory=function(e){let t=e.getFieldValue(`INSTANCE`),n=o.valueToCode(e,`OID`,s.ATOMIC),r=o.valueToCode(e,`START`,s.ATOMIC),i=o.valueToCode(e,`END`,s.ATOMIC),a=e.getFieldValue(`AGGREGATE`),l=e.getFieldValue(`UNIT`),u=parseInt(e.getFieldValue(`COUNT`),10),d=parseFloat(e.getFieldValue(`STEP`));l===`day`?d*=864e5:l===`hour`?d*=36e5:l===`min`?d*=6e4:l===`sec`&&(d*=1e3);let f=o.statementToCode(e,`STATEMENT`),m=p(n);return`getHistory(${t==="default"?``:`${c(t)}, `}{\n id: ${n}${m?` /* ${m} */`:``},\n start: ${r},\n end: ${i},\n`+(d>0&&a!==`none`?` step: ${d},\n`:``)+(d===0||a===`none`?` count: ${u},\n`:``)+` aggregate: '${a}',\n removeBorderValues: true,\n}, async (err, result) => {\n if (err) {\n console.error(err);\n`+(f?` } else { +`:``)+(f?o.prefixLines(f,o.INDENT):``)+` } }); `}}export{h as install}; \ No newline at end of file diff --git a/admin/assets/blocks_system-BZZcGqTJ.js b/admin/assets/blocks_system-BZZcGqTJ.js deleted file mode 100644 index cff7487b..00000000 --- a/admin/assets/blocks_system-BZZcGqTJ.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e,o as t,r as n,s as r,t as i}from"./blockly-C4zJerWL.js";import{n as a,t as o}from"./javascript-DVIhlTDr.js";import{a as s,l as c,r as l,s as u}from"./helpers-Crmcgphg.js";import{FieldOID as d}from"./field_oid-BGIMv9gw.js";function f(){let f=window.Blockly,p=f.Translate,m=window.getHelp;f.CustomBlocks=f.CustomBlocks||[],f.CustomBlocks.push(`System`),f.System={HUE:210,blocks:{},WARNING_PARENTS:[`on_ext`]};let h=e=>[[p(`get_value_val`),`val`],[p(`get_value_ack`),`ack`],[p(`get_value_ts`),`ts`],[p(`get_value_lc`),`lc`],[p(`get_value_q`),`q`],[p(`get_value_comment`),`c`],[p(`get_value_from`),`from`],...e?[[p(`get_value_user`),`user`]]:[],[p(`get_common_name`),`common.name`],[p(`get_common_desc`),`common.desc`],[p(`get_common_unit`),`common.unit`],[p(`get_common_role`),`common.role`],[p(`get_common_state_type`),`common.type`],[p(`get_common_read`),`common.read`],[p(`get_common_write`),`common.write`]],g=e=>e===`type`||e.startsWith(`common.`),_=function(){let e=this.getParent();e&&f.System.WARNING_PARENTS.includes(e.type)?this.setWarningText(p(`false_connection_trigger_warning`),this.id):this.setWarningText(null,this.id)},v=r=>({mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`delay_input`,String(l(this.getFieldValue(`WITH_DELAY`)))),e},domToMutation:function(e){this.updateShape_(l(e.getAttribute(`delay_input`)))},updateShape_:function(i){i?this.getInput(`DELAY`)||this.appendDummyInput(`DELAY`).appendField(` `).appendField(new t(`1000`),`DELAY_MS`).appendField(new e([[p(`control_ms`),`ms`],[p(`control_sec`),`sec`],[p(`control_min`),`min`]]),`UNIT`):this.getInput(`DELAY`)&&this.removeInput(`DELAY`),i?this.getInput(`CLEAR_RUNNING_INPUT`)||this.appendDummyInput(`CLEAR_RUNNING_INPUT`).appendField(p(r)).appendField(new n,`CLEAR_RUNNING`):this.getInput(`CLEAR_RUNNING_INPUT`)&&this.removeInput(`CLEAR_RUNNING_INPUT`)}}),y=()=>new n(`FALSE`,function(e){this.getSourceBlock().updateShape_(l(e))}),b=e=>c(e.getFieldValue(`DELAY_MS`),e.getFieldValue(`UNIT`));f.System.blocks.global_var=` scriptName`,i.global_var={init:function(){this.appendDummyInput(`VAR`).appendField(new e([[p(`global_var_scriptname`),`scriptName`],[p(`global_var_defaultdatadir`),`defaultDataDir`],[p(`global_var_verbose`),`verbose`]]),`VAR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`global_var_tooltip`)),this.setHelpUrl(m(`global_var`))}},a.forBlock.global_var=function(e){return[e.getFieldValue(`VAR`),o.ATOMIC]},f.System.blocks.debug=` info test `,i.debug={init:function(){this.appendValueInput(`TEXT`).setCheck(null).appendField(p(`debug`)),this.appendDummyInput(`Severity`).appendField(new e([[p(`loglevel_debug`),`debug`],[p(`loglevel_info`),`info`],[p(`loglevel_warn`),`warn`],[p(`loglevel_error`),`error`]]),`Severity`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`debug_tooltip`)),this.setHelpUrl(m(`debug_help`))}},a.forBlock.debug=function(e){let t=a.valueToCode(e,`TEXT`,o.ATOMIC);return`console.${e.getFieldValue(`Severity`)}(${t});\n`},f.System.blocks.comment=``,i.comment={init:function(){this.appendDummyInput(`COMMENT`).appendField(new f.FieldMultilineInput(p(`comment`)),`COMMENT`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(`#FFFF00`),this.setTooltip(p(`comment_tooltip`))}},a.forBlock.comment=function(e){return`${a.prefixLines(e.getFieldValue(`COMMENT`),`// `)}\n`},f.System.blocks.control=` FALSE`,i.control={init:function(){this.appendDummyInput().appendField(p(`control`)),this.appendDummyInput(`OID`).appendField(new d(p(`select_id`),`state`),`OID`),this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`control_with`)),this.appendDummyInput(`WITH_DELAY`).appendField(p(`control_delay`)).appendField(y(),`WITH_DELAY`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_tooltip`)),this.setHelpUrl(m(`control_help`))},...v(`control_clear_running`)},a.forBlock.control=function(e){let t=e.getFieldValue(`OID`);r.VARIABLES_DEFAULT_NAME=`value`;let n=b(e),i=l(e.getFieldValue(`CLEAR_RUNNING`)),c=a.valueToCode(e,`VALUE`,o.ATOMIC),u=s(t),d=u?` /* ${u} */`:``;return l(e.getFieldValue(`WITH_DELAY`))?`setStateDelayed('${t}'${d}, ${c}, ${n}, ${i});\n`:`setState('${t}'${d}, ${c});\n`},f.System.blocks.toggle=` FALSE`,i.toggle={init:function(){this.appendDummyInput().appendField(p(`toggle`)),this.appendDummyInput(`OID`).appendField(new d(p(`select_id`),`state`),`OID`),this.appendDummyInput(`WITH_DELAY`).appendField(p(`toggle_delay`)).appendField(y(),`WITH_DELAY`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`toggle_tooltip`)),this.setHelpUrl(m(`toggle_help`))},...v(`toggle_clear_running`)},a.forBlock.toggle=function(e){var t;let n=e.getFieldValue(`OID`);r.VARIABLES_DEFAULT_NAME=`value`;let i=b(e),o=(t=window.main)==null||(t=t.objects[n])==null?void 0:t.common,c=(o==null?void 0:o.type)||`boolean`,u=s(n),d=u?` /* ${u} */`:``,f=l(e.getFieldValue(`CLEAR_RUNNING`)),p;if(c===`number`){let e=o.max===void 0?100:parseFloat(o.max),t=o.min===void 0?0:parseFloat(o.min);p=`setState('${n}'${d}, state ? (state.val === ${t} ? ${e} : ${t}) : ${e});`}else p=`setState('${n}'${d}, state ? !state.val : true);`;let m=l(e.getFieldValue(`WITH_DELAY`))?`setStateDelayed('${n}'${d}, state ? !state.val : true, ${i}, ${f});`:p;return`getState('${n}', (err, state) => {\n${a.prefixLines(m,a.INDENT)}\n});\n`},f.System.blocks.update=` FALSE`,i.update={init:function(){this.appendDummyInput().appendField(p(`update`)),this.appendDummyInput(`OID`).appendField(new d(p(`select_id`),`state`),`OID`),this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`update_with`)),this.appendDummyInput(`WITH_DELAY`).appendField(p(`update_delay`)).appendField(y(),`WITH_DELAY`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`update_tooltip`)),this.setHelpUrl(m(`update_help`))},...v(`control_clear_running`)},a.forBlock.update=function(e){let t=e.getFieldValue(`OID`);r.VARIABLES_DEFAULT_NAME=`value`;let n=a.valueToCode(e,`VALUE`,o.ATOMIC),i=b(e),c=l(e.getFieldValue(`CLEAR_RUNNING`)),u=s(t),d=u?` /* ${u} */`:``;return l(e.getFieldValue(`WITH_DELAY`))?`setStateDelayed('${t}'${d}, ${n}, true, ${i}, ${c});\n`:`setState('${t}'${d}, ${n}, true);\n`},f.System.blocks.control_ex=` false FALSE TRUE 0 0 `,i.control_ex={init:function(){this.appendDummyInput().appendField(p(`control_ex`)),this.appendValueInput(`OID`).setCheck(`String`).appendField(p(`field_oid_OID`)),this.appendDummyInput(`TYPE`).appendField(new e([[p(`control_ex_control`),`false`],[p(`control_ex_update`),`true`]]),`TYPE`),this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`control_ex_value`)),this.appendValueInput(`DELAY_MS`).setCheck(`Number`).appendField(p(`control_ex_delay`)),this.appendValueInput(`EXPIRE`).setCheck(`Number`).appendField(p(`control_ex_expire`)),this.appendDummyInput(`CLEAR_RUNNING_INPUT`).appendField(p(`control_ex_clear_running`)).appendField(new n,`CLEAR_RUNNING`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_tooltip`)),this.setHelpUrl(m(`control_help`))}},a.forBlock.control_ex=function(e){let t=a.valueToCode(e,`OID`,o.ATOMIC),n=a.valueToCode(e,`VALUE`,o.ATOMIC),r=a.valueToCode(e,`DELAY_MS`,o.ATOMIC),i=a.valueToCode(e,`EXPIRE`,o.ATOMIC),s=l(e.getFieldValue(`CLEAR_RUNNING`));return`setStateDelayed(${t}, { val: ${n}, ack: ${l(e.getFieldValue(`TYPE`))}${i?`, expire: ${i}`:``} }, parseInt(((${r}) || '').toString(), 10), ${s});\n`},f.System.blocks.create=` 0_userdata.0.example`,i.create={init:function(){this.appendDummyInput().appendField(p(`create`)),this.appendDummyInput(`NAME`).appendField(p(`create_oid`)).appendField(new t(`0_userdata.0.example`),`NAME`);let e=this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`create_init`));e.connection&&(e.connection._optional=!0);let n=this.appendValueInput(`COMMON`).setCheck(null).appendField(p(`create_common`));n.connection&&(n.connection._optional=!0),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`create_tooltip`)),this.setHelpUrl(m(`create_help`))}},a.forBlock.create=function(e){let t=e.getFieldValue(`NAME`),n=a.valueToCode(e,`VALUE`,o.ATOMIC),r=n!==null&&n!==``?`, ${n}`:``,i=a.valueToCode(e,`COMMON`,o.ATOMIC),s=i!==null&&i!==``?`, ((common) => typeof common !== 'object' ? JSON.parse(common) : common)(${i})`:``,c=a.statementToCode(e,`STATEMENT`);return`createState(${u(t)}${r}${s}, async () => {\n${c}});\n`},f.System.blocks.create_ex=` 0_userdata.0.example string FALSE FALSE`,i.create_ex={init:function(){this.appendDummyInput().appendField(p(`create`)),this.appendDummyInput(`NAME`).appendField(p(`create_oid`)).appendField(new t(`0_userdata.0.example`),`NAME`),this.appendDummyInput(`TYPE`).appendField(p(`create_type`)).appendField(new e([[p(`create_type_string`),`string`],[p(`create_type_number`),`number`],[p(`create_type_boolean`),`boolean`],[p(`create_type_json`),`json`],[p(`create_type_object`),`object`],[p(`create_type_array`),`array`]]),`TYPE`);let r=this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`create_init`));r.connection&&(r.connection._optional=!0),this.appendDummyInput(`READABLE_INPUT`).appendField(p(`create_readable`)).appendField(new n(`FALSE`),`READABLE`),this.appendDummyInput(`WRITEABLE_INPUT`).appendField(p(`create_writeable`)).appendField(new n(`FALSE`),`WRITEABLE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`create_tooltip`)),this.setHelpUrl(m(`create_help`))}},a.forBlock.create_ex=function(e){let t=e.getFieldValue(`NAME`),n=e.getFieldValue(`TYPE`),r=``,i=a.valueToCode(e,`VALUE`,o.ATOMIC);i!==null&&i!==``&&(r=n===`number`?`, parseFloat(${i})`:n===`boolean`?`, !!${i}`:n===`string`?`, String(${i})`:`, ${i}`);let s=l(e.getFieldValue(`READABLE`)),c=l(e.getFieldValue(`WRITEABLE`)),d=a.statementToCode(e,`STATEMENT`);return`createState(${u(t)}${r}, { type: '${n}', read: ${s}, write: ${c} }, async () => {\n${d}});\n`},f.System.blocks.get_value=` val`,i.get_value={init:function(){this.appendDummyInput(`ATTR`).appendField(new e(h(!0)),`ATTR`),this.appendDummyInput().appendField(p(`get_value_OID`)),this.appendDummyInput().appendField(new d(p(`select_id`),`state`),`OID`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`get_value_tooltip`)),this.setHelpUrl(m(`get_value_help`))},onchange:_},a.forBlock.get_value=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ATTR`);return g(n)?[`(await getObjectAsync('${t}')).${n}`,o.ATOMIC]:[`getState(${u(t)}).${n}`,o.ATOMIC]},f.System.blocks.get_value_var=` val `,i.get_value_var={init:function(){this.appendDummyInput(`ATTR`).appendField(new e(h(!1)),`ATTR`),this.appendDummyInput().appendField(p(`get_value_OID`)),this.appendValueInput(`OID`).setCheck(null),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`get_value_tooltip`)),this.setHelpUrl(m(`get_value_help`))},onchange:_},a.forBlock.get_value_var=function(e){let t=a.valueToCode(e,`OID`,o.ATOMIC),n=e.getFieldValue(`ATTR`);return g(n)?[`(await getObjectAsync(${t})).${n}`,o.ATOMIC]:[`getState(${t}).${n}`,o.ATOMIC]},f.System.blocks.get_value_async=` val`,i.get_value_async={init:function(){this.appendDummyInput(`ATTR`).appendField(new e(h(!1)),`ATTR`),this.appendDummyInput().appendField(p(`get_value_OID`)),this.appendDummyInput().appendField(new d(p(`select_id`),`state`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`get_value_tooltip`)),this.setHelpUrl(m(`get_value_help`))}},a.forBlock.get_value_async=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ATTR`),r=a.statementToCode(e,`STATEMENT`),i=g(n)?{call:`getObjectAsync`,args:`(err, obj)`,from:`obj`}:{call:`getState`,args:`(err, state)`,from:`state`};return`${i.call}(${u(t)}, async ${i.args} => {\n${a.prefixLines(`let value = ${i.from}.${n};`,a.INDENT)}\n${r}});\n`},f.System.blocks.get_object=``,i.get_object={init:function(){this.appendDummyInput().appendField(p(`get_object`)),this.appendDummyInput().appendField(new d(p(`select_id`),`all`),`OID`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.Object.HUE),this.setTooltip(p(`get_object_tooltip`)),this.setHelpUrl(m(`get_object_help`))},onchange:function(){let e=this.getParent();e&&f.System.WARNING_PARENTS.includes(e.type)?this.setWarningText(p(`false_connection_trigger_warning`),this.id):e&&[`direct`,`control_ex`,`get_value_var`].includes(e.type)?this.setWarningText(p(`get_object_connection_warning`),this.id):this.setWarningText(null,this.id)}},a.forBlock.get_object=function(e){return[`getObject(${u(e.getFieldValue(`OID`))})`,o.ATOMIC]},f.System.blocks.get_object_async=``,i.get_object_async={init:function(){this.appendDummyInput().appendField(p(`get_object`)),this.appendDummyInput().appendField(new d(p(`select_id`),`all`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setColour(f.Object.HUE),this.setTooltip(p(`get_object_tooltip`)),this.setHelpUrl(m(`get_object_help`))}},a.forBlock.get_object_async=function(e){let t=a.statementToCode(e,`STATEMENT`);return`getObjectAsync(${u(e.getFieldValue(`OID`))}).then(async (obj) => {\n${t}});\n`},f.System.blocks.state_exists_var=` `,i.state_exists_var={init:function(){this.appendDummyInput().appendField(p(`state_exists`)),this.appendValueInput(`OID`).setCheck(null),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(f.System.HUE),this.setTooltip(p(`state_exists_tooltip`)),this.setHelpUrl(m(`state_exists_help`))}},a.forBlock.state_exists_var=function(e){return[`(await existsStateAsync(${a.valueToCode(e,`OID`,o.ATOMIC)||`''`}))`,o.ATOMIC]};let x=(e,t,n)=>{i[e]={init:function(){this.appendDummyInput().appendField(p(t)),this.appendDummyInput().appendField(new d(p(`select_id`),n),`oid`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(`%{BKY_TEXTS_HUE}`),this.setTooltip(p(`field_oid_tooltip`))}},a.forBlock[e]=function(e){return[u(e.getFieldValue(`oid`)),o.ATOMIC]}};f.System.blocks.field_oid=``,x(`field_oid`,`field_oid_OID`,`state`),f.System.blocks.field_oid_meta=``,x(`field_oid_meta`,`field_oid_OID_meta`,`meta`),f.System.blocks.field_oid_script=``,x(`field_oid_script`,`field_oid_OID_script`,`script`),f.System.blocks.get_attr=` attribute1 Object ID `,i.get_attr={init:function(){this.appendValueInput(`PATH`).setCheck(null).appendField(p(`get_attr_path`)),this.appendValueInput(`OBJECT`).appendField(p(`get_attr_by`)),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`get_attr_tooltip`)),this.setHelpUrl(m(`get_attr_help`))}},a.forBlock.get_attr=function(e){return[`getAttr(${a.valueToCode(e,`OBJECT`,o.ATOMIC)}, ${a.valueToCode(e,`PATH`,o.ATOMIC)})`,o.ATOMIC]},f.System.blocks.direct=` TRUE Object ID 1 Object ID 2 `,i.direct={init:function(){this.appendDummyInput().appendField(p(`direct`)),this.appendValueInput(`OID_SRC`).setCheck(`String`).appendField(p(`direct_oid_src`)),this.appendValueInput(`OID_DST`).setCheck(`String`).appendField(p(`direct_oid_dst`)),this.appendDummyInput(`ONLY_CHANGES`).appendField(p(`direct_only_changes`)).appendField(new n(`TRUE`),`ONLY_CHANGES`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.Trigger.HUE),this.setTooltip(p(`direct_tooltip`)),this.setHelpUrl(m(`direct_help`))}},a.forBlock.direct=function(e){let t=a.valueToCode(e,`OID_SRC`,o.ATOMIC),n=a.valueToCode(e,`OID_DST`,o.ATOMIC);return`on({ id: ${t}, change: '${l(e.getFieldValue(`ONLY_CHANGES`))?`ne`:`any`}' }, (obj) => {\n${a.prefixLines(`setState(${n}, obj.state.val);`,a.INDENT)}\n});\n`},f.System.blocks.control_instance=` admin.0 restartInstanceAsync`,i.control_instance={init:function(){var n;let r=[];if((n=window.main)!=null&&n.instances){for(let e of window.main.instances){let t=e.substring(15);r.push([t,t])}r.length||r.push([p(`control_instance_no_instances`),``]),this.appendDummyInput(`INSTANCE`).appendField(p(`control_instance`)).appendField(new e(r),`INSTANCE`)}else this.appendDummyInput(`INSTANCE`).appendField(p(`control_instance`)).appendField(new t(`adapter.0`),`INSTANCE`);this.appendDummyInput(`ACTION`).appendField(p(`control_instance_action`)).appendField(new e([[p(`control_instance_start`),`startInstanceAsync`],[p(`control_instance_stop`),`stopInstanceAsync`],[p(`control_instance_restart`),`restartInstanceAsync`]]),`ACTION`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_instance_tooltip`)),this.setHelpUrl(m(`control_instance_help`))}},a.forBlock.control_instance=function(e){return`await ${e.getFieldValue(`ACTION`)}(${u(e.getFieldValue(`INSTANCE`))});\n`},f.System.blocks.control_script=` startScriptAsync`,i.control_script={init:function(){this.appendDummyInput(`OID`).appendField(p(`control_script`)).appendField(new d(p(`select_id`),`script`),`OID`),this.appendDummyInput(`ACTION`).appendField(p(`control_instance_action`)).appendField(new e([[p(`control_script_start`),`startScriptAsync`],[p(`control_script_stop`),`stopScriptAsync`]]),`ACTION`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_script_tooltip`)),this.setHelpUrl(m(`control_script_help`))}},a.forBlock.control_script=function(e){return`await ${e.getFieldValue(`ACTION`)}(${u(e.getFieldValue(`OID`))});\n`},f.System.blocks.regex=` (.*)`,i.regex={init:function(){this.appendDummyInput().appendField(`RegExp`),this.appendDummyInput(`TEXT`).appendField(new t(`(.*)`),`TEXT`),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setColour(f.System.HUE)}},a.forBlock.regex=function(e){return[`new RegExp(${u(e.getFieldValue(`TEXT`))})`,o.ATOMIC]},f.System.blocks.selector=` channel[state.id=*]`,i.selector={init:function(){this.appendDummyInput().appendField(`${p(`selector`)} $(`),this.appendDummyInput(`TEXT`).appendField(new t(`channel[state.id=*]`),`TEXT`),this.appendDummyInput().appendField(`)`),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setColour(f.System.HUE)}},a.forBlock.selector=function(e){return[`Array.prototype.slice.apply($(${u(e.getFieldValue(`TEXT`))}))`,o.ATOMIC]}}export{f as install}; \ No newline at end of file diff --git a/admin/assets/blocks_system-LUOqNSJG.js b/admin/assets/blocks_system-LUOqNSJG.js new file mode 100644 index 00000000..d586f0c4 --- /dev/null +++ b/admin/assets/blocks_system-LUOqNSJG.js @@ -0,0 +1 @@ +import{i as e,o as t,r as n,s as r,t as i}from"./blockly-C4zJerWL.js";import{n as a,t as o}from"./javascript-DVIhlTDr.js";import{c as s,o as c,r as l,u}from"./helpers-C_OEphYI.js";import{FieldOID as d}from"./field_oid-BGIMv9gw.js";function f(){let f=window.Blockly,p=f.Translate,m=window.getHelp;f.CustomBlocks=f.CustomBlocks||[],f.CustomBlocks.push(`System`),f.System={HUE:210,blocks:{},WARNING_PARENTS:[`on_ext`]};let h=e=>[[p(`get_value_val`),`val`],[p(`get_value_ack`),`ack`],[p(`get_value_ts`),`ts`],[p(`get_value_lc`),`lc`],[p(`get_value_q`),`q`],[p(`get_value_comment`),`c`],[p(`get_value_from`),`from`],...e?[[p(`get_value_user`),`user`]]:[],[p(`get_common_name`),`common.name`],[p(`get_common_desc`),`common.desc`],[p(`get_common_unit`),`common.unit`],[p(`get_common_role`),`common.role`],[p(`get_common_state_type`),`common.type`],[p(`get_common_read`),`common.read`],[p(`get_common_write`),`common.write`]],g=e=>e===`type`||e.startsWith(`common.`),_=function(){let e=this.getParent();e&&f.System.WARNING_PARENTS.includes(e.type)?this.setWarningText(p(`false_connection_trigger_warning`),this.id):this.setWarningText(null,this.id)},v=r=>({mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`delay_input`,String(l(this.getFieldValue(`WITH_DELAY`)))),e},domToMutation:function(e){this.updateShape_(l(e.getAttribute(`delay_input`)))},updateShape_:function(i){i?this.getInput(`DELAY`)||this.appendDummyInput(`DELAY`).appendField(` `).appendField(new t(`1000`),`DELAY_MS`).appendField(new e([[p(`control_ms`),`ms`],[p(`control_sec`),`sec`],[p(`control_min`),`min`]]),`UNIT`):this.getInput(`DELAY`)&&this.removeInput(`DELAY`),i?this.getInput(`CLEAR_RUNNING_INPUT`)||this.appendDummyInput(`CLEAR_RUNNING_INPUT`).appendField(p(r)).appendField(new n,`CLEAR_RUNNING`):this.getInput(`CLEAR_RUNNING_INPUT`)&&this.removeInput(`CLEAR_RUNNING_INPUT`)}}),y=()=>new n(`FALSE`,function(e){this.getSourceBlock().updateShape_(l(e))}),b=e=>u(e.getFieldValue(`DELAY_MS`),e.getFieldValue(`UNIT`));f.System.blocks.global_var=` scriptName`,i.global_var={init:function(){this.appendDummyInput(`VAR`).appendField(new e([[p(`global_var_scriptname`),`scriptName`],[p(`global_var_defaultdatadir`),`defaultDataDir`],[p(`global_var_verbose`),`verbose`]]),`VAR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`global_var_tooltip`)),this.setHelpUrl(m(`global_var`))}},a.forBlock.global_var=function(e){return[e.getFieldValue(`VAR`),o.ATOMIC]},f.System.blocks.debug=` info test `,i.debug={init:function(){this.appendValueInput(`TEXT`).setCheck(null).appendField(p(`debug`)),this.appendDummyInput(`Severity`).appendField(new e([[p(`loglevel_debug`),`debug`],[p(`loglevel_info`),`info`],[p(`loglevel_warn`),`warn`],[p(`loglevel_error`),`error`]]),`Severity`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`debug_tooltip`)),this.setHelpUrl(m(`debug_help`))}},a.forBlock.debug=function(e){let t=a.valueToCode(e,`TEXT`,o.ATOMIC);return`console.${e.getFieldValue(`Severity`)}(${t});\n`},f.System.blocks.comment=``,i.comment={init:function(){this.appendDummyInput(`COMMENT`).appendField(new f.FieldMultilineInput(p(`comment`)),`COMMENT`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(`#FFFF00`),this.setTooltip(p(`comment_tooltip`))}},a.forBlock.comment=function(e){return`${a.prefixLines(e.getFieldValue(`COMMENT`),`// `)}\n`},f.System.blocks.control=` FALSE`,i.control={init:function(){this.appendDummyInput().appendField(p(`control`)),this.appendDummyInput(`OID`).appendField(new d(p(`select_id`),`state`),`OID`),this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`control_with`)),this.appendDummyInput(`WITH_DELAY`).appendField(p(`control_delay`)).appendField(y(),`WITH_DELAY`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_tooltip`)),this.setHelpUrl(m(`control_help`))},...v(`control_clear_running`)},a.forBlock.control=function(e){let t=e.getFieldValue(`OID`);r.VARIABLES_DEFAULT_NAME=`value`;let n=b(e),i=l(e.getFieldValue(`CLEAR_RUNNING`)),s=a.valueToCode(e,`VALUE`,o.ATOMIC),u=c(t),d=u?` /* ${u} */`:``;return l(e.getFieldValue(`WITH_DELAY`))?`setStateDelayed('${t}'${d}, ${s}, ${n}, ${i});\n`:`setState('${t}'${d}, ${s});\n`},f.System.blocks.toggle=` FALSE`,i.toggle={init:function(){this.appendDummyInput().appendField(p(`toggle`)),this.appendDummyInput(`OID`).appendField(new d(p(`select_id`),`state`),`OID`),this.appendDummyInput(`WITH_DELAY`).appendField(p(`toggle_delay`)).appendField(y(),`WITH_DELAY`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`toggle_tooltip`)),this.setHelpUrl(m(`toggle_help`))},...v(`toggle_clear_running`)},a.forBlock.toggle=function(e){var t;let n=e.getFieldValue(`OID`);r.VARIABLES_DEFAULT_NAME=`value`;let i=b(e),o=(t=window.main)==null||(t=t.objects[n])==null?void 0:t.common,s=(o==null?void 0:o.type)||`boolean`,u=c(n),d=u?` /* ${u} */`:``,f=l(e.getFieldValue(`CLEAR_RUNNING`)),p;if(s===`number`){let e=o.max===void 0?100:parseFloat(o.max),t=o.min===void 0?0:parseFloat(o.min);p=`setState('${n}'${d}, state ? (state.val === ${t} ? ${e} : ${t}) : ${e});`}else p=`setState('${n}'${d}, state ? !state.val : true);`;let m=l(e.getFieldValue(`WITH_DELAY`))?`setStateDelayed('${n}'${d}, state ? !state.val : true, ${i}, ${f});`:p;return`getState('${n}', (err, state) => {\n${a.prefixLines(m,a.INDENT)}\n});\n`},f.System.blocks.update=` FALSE`,i.update={init:function(){this.appendDummyInput().appendField(p(`update`)),this.appendDummyInput(`OID`).appendField(new d(p(`select_id`),`state`),`OID`),this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`update_with`)),this.appendDummyInput(`WITH_DELAY`).appendField(p(`update_delay`)).appendField(y(),`WITH_DELAY`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`update_tooltip`)),this.setHelpUrl(m(`update_help`))},...v(`control_clear_running`)},a.forBlock.update=function(e){let t=e.getFieldValue(`OID`);r.VARIABLES_DEFAULT_NAME=`value`;let n=a.valueToCode(e,`VALUE`,o.ATOMIC),i=b(e),s=l(e.getFieldValue(`CLEAR_RUNNING`)),u=c(t),d=u?` /* ${u} */`:``;return l(e.getFieldValue(`WITH_DELAY`))?`setStateDelayed('${t}'${d}, ${n}, true, ${i}, ${s});\n`:`setState('${t}'${d}, ${n}, true);\n`},f.System.blocks.control_ex=` false FALSE TRUE 0 0 `,i.control_ex={init:function(){this.appendDummyInput().appendField(p(`control_ex`)),this.appendValueInput(`OID`).setCheck(`String`).appendField(p(`field_oid_OID`)),this.appendDummyInput(`TYPE`).appendField(new e([[p(`control_ex_control`),`false`],[p(`control_ex_update`),`true`]]),`TYPE`),this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`control_ex_value`)),this.appendValueInput(`DELAY_MS`).setCheck(`Number`).appendField(p(`control_ex_delay`)),this.appendValueInput(`EXPIRE`).setCheck(`Number`).appendField(p(`control_ex_expire`)),this.appendDummyInput(`CLEAR_RUNNING_INPUT`).appendField(p(`control_ex_clear_running`)).appendField(new n,`CLEAR_RUNNING`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_tooltip`)),this.setHelpUrl(m(`control_help`))}},a.forBlock.control_ex=function(e){let t=a.valueToCode(e,`OID`,o.ATOMIC),n=a.valueToCode(e,`VALUE`,o.ATOMIC),r=a.valueToCode(e,`DELAY_MS`,o.ATOMIC),i=a.valueToCode(e,`EXPIRE`,o.ATOMIC),s=l(e.getFieldValue(`CLEAR_RUNNING`));return`setStateDelayed(${t}, { val: ${n}, ack: ${l(e.getFieldValue(`TYPE`))}${i?`, expire: ${i}`:``} }, parseInt(((${r}) || '').toString(), 10), ${s});\n`},f.System.blocks.create=` 0_userdata.0.example`,i.create={init:function(){this.appendDummyInput().appendField(p(`create`)),this.appendDummyInput(`NAME`).appendField(p(`create_oid`)).appendField(new t(`0_userdata.0.example`),`NAME`);let e=this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`create_init`));e.connection&&(e.connection._optional=!0);let n=this.appendValueInput(`COMMON`).setCheck(null).appendField(p(`create_common`));n.connection&&(n.connection._optional=!0),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`create_tooltip`)),this.setHelpUrl(m(`create_help`))}},a.forBlock.create=function(e){let t=e.getFieldValue(`NAME`),n=a.valueToCode(e,`VALUE`,o.ATOMIC),r=n!==null&&n!==``?`, ${n}`:``,i=a.valueToCode(e,`COMMON`,o.ATOMIC),c=i!==null&&i!==``?`, ((common) => typeof common !== 'object' ? JSON.parse(common) : common)(${i})`:``,l=a.statementToCode(e,`STATEMENT`);return`createState(${s(t)}${r}${c}, async () => {\n${l}});\n`},f.System.blocks.create_ex=` 0_userdata.0.example string FALSE FALSE`,i.create_ex={init:function(){this.appendDummyInput().appendField(p(`create`)),this.appendDummyInput(`NAME`).appendField(p(`create_oid`)).appendField(new t(`0_userdata.0.example`),`NAME`),this.appendDummyInput(`TYPE`).appendField(p(`create_type`)).appendField(new e([[p(`create_type_string`),`string`],[p(`create_type_number`),`number`],[p(`create_type_boolean`),`boolean`],[p(`create_type_json`),`json`],[p(`create_type_object`),`object`],[p(`create_type_array`),`array`]]),`TYPE`);let r=this.appendValueInput(`VALUE`).setCheck(null).appendField(p(`create_init`));r.connection&&(r.connection._optional=!0),this.appendDummyInput(`READABLE_INPUT`).appendField(p(`create_readable`)).appendField(new n(`FALSE`),`READABLE`),this.appendDummyInput(`WRITEABLE_INPUT`).appendField(p(`create_writeable`)).appendField(new n(`FALSE`),`WRITEABLE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`create_tooltip`)),this.setHelpUrl(m(`create_help`))}},a.forBlock.create_ex=function(e){let t=e.getFieldValue(`NAME`),n=e.getFieldValue(`TYPE`),r=``,i=a.valueToCode(e,`VALUE`,o.ATOMIC);i!==null&&i!==``&&(r=n===`number`?`, parseFloat(${i})`:n===`boolean`?`, !!${i}`:n===`string`?`, String(${i})`:`, ${i}`);let c=l(e.getFieldValue(`READABLE`)),u=l(e.getFieldValue(`WRITEABLE`)),d=a.statementToCode(e,`STATEMENT`);return`createState(${s(t)}${r}, { type: '${n}', read: ${c}, write: ${u} }, async () => {\n${d}});\n`},f.System.blocks.get_value=` val`,i.get_value={init:function(){this.appendDummyInput(`ATTR`).appendField(new e(h(!0)),`ATTR`),this.appendDummyInput().appendField(p(`get_value_OID`)),this.appendDummyInput().appendField(new d(p(`select_id`),`state`),`OID`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`get_value_tooltip`)),this.setHelpUrl(m(`get_value_help`))},onchange:_},a.forBlock.get_value=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ATTR`);return g(n)?[`(await getObjectAsync('${t}')).${n}`,o.ATOMIC]:[`getState(${s(t)}).${n}`,o.ATOMIC]},f.System.blocks.get_value_var=` val `,i.get_value_var={init:function(){this.appendDummyInput(`ATTR`).appendField(new e(h(!1)),`ATTR`),this.appendDummyInput().appendField(p(`get_value_OID`)),this.appendValueInput(`OID`).setCheck(null),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`get_value_tooltip`)),this.setHelpUrl(m(`get_value_help`))},onchange:_},a.forBlock.get_value_var=function(e){let t=a.valueToCode(e,`OID`,o.ATOMIC),n=e.getFieldValue(`ATTR`);return g(n)?[`(await getObjectAsync(${t})).${n}`,o.ATOMIC]:[`getState(${t}).${n}`,o.ATOMIC]},f.System.blocks.get_value_async=` val`,i.get_value_async={init:function(){this.appendDummyInput(`ATTR`).appendField(new e(h(!1)),`ATTR`),this.appendDummyInput().appendField(p(`get_value_OID`)),this.appendDummyInput().appendField(new d(p(`select_id`),`state`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`get_value_tooltip`)),this.setHelpUrl(m(`get_value_help`))}},a.forBlock.get_value_async=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ATTR`),r=a.statementToCode(e,`STATEMENT`),i=g(n)?{call:`getObjectAsync`,args:`(err, obj)`,from:`obj`}:{call:`getState`,args:`(err, state)`,from:`state`};return`${i.call}(${s(t)}, async ${i.args} => {\n${a.prefixLines(`let value = ${i.from}.${n};`,a.INDENT)}\n${r}});\n`},f.System.blocks.get_object=``,i.get_object={init:function(){this.appendDummyInput().appendField(p(`get_object`)),this.appendDummyInput().appendField(new d(p(`select_id`),`all`),`OID`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.Object.HUE),this.setTooltip(p(`get_object_tooltip`)),this.setHelpUrl(m(`get_object_help`))},onchange:function(){let e=this.getParent();e&&f.System.WARNING_PARENTS.includes(e.type)?this.setWarningText(p(`false_connection_trigger_warning`),this.id):e&&[`direct`,`control_ex`,`get_value_var`].includes(e.type)?this.setWarningText(p(`get_object_connection_warning`),this.id):this.setWarningText(null,this.id)}},a.forBlock.get_object=function(e){return[`getObject(${s(e.getFieldValue(`OID`))})`,o.ATOMIC]},f.System.blocks.get_object_async=``,i.get_object_async={init:function(){this.appendDummyInput().appendField(p(`get_object`)),this.appendDummyInput().appendField(new d(p(`select_id`),`all`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setColour(f.Object.HUE),this.setTooltip(p(`get_object_tooltip`)),this.setHelpUrl(m(`get_object_help`))}},a.forBlock.get_object_async=function(e){let t=a.statementToCode(e,`STATEMENT`);return`getObjectAsync(${s(e.getFieldValue(`OID`))}).then(async (obj) => {\n${t}});\n`},f.System.blocks.state_exists_var=` `,i.state_exists_var={init:function(){this.appendDummyInput().appendField(p(`state_exists`)),this.appendValueInput(`OID`).setCheck(null),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(f.System.HUE),this.setTooltip(p(`state_exists_tooltip`)),this.setHelpUrl(m(`state_exists_help`))}},a.forBlock.state_exists_var=function(e){return[`(await existsStateAsync(${a.valueToCode(e,`OID`,o.ATOMIC)||`''`}))`,o.ATOMIC]};let x=(e,t,n)=>{i[e]={init:function(){this.appendDummyInput().appendField(p(t)),this.appendDummyInput().appendField(new d(p(`select_id`),n),`oid`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(`%{BKY_TEXTS_HUE}`),this.setTooltip(p(`field_oid_tooltip`))}},a.forBlock[e]=function(e){return[s(e.getFieldValue(`oid`)),o.ATOMIC]}};f.System.blocks.field_oid=``,x(`field_oid`,`field_oid_OID`,`state`),f.System.blocks.field_oid_meta=``,x(`field_oid_meta`,`field_oid_OID_meta`,`meta`),f.System.blocks.field_oid_script=``,x(`field_oid_script`,`field_oid_OID_script`,`script`),f.System.blocks.get_attr=` attribute1 Object ID `,i.get_attr={init:function(){this.appendValueInput(`PATH`).setCheck(null).appendField(p(`get_attr_path`)),this.appendValueInput(`OBJECT`).appendField(p(`get_attr_by`)),this.setInputsInline(!0),this.setOutput(!0),this.setColour(f.System.HUE),this.setTooltip(p(`get_attr_tooltip`)),this.setHelpUrl(m(`get_attr_help`))}},a.forBlock.get_attr=function(e){return[`getAttr(${a.valueToCode(e,`OBJECT`,o.ATOMIC)}, ${a.valueToCode(e,`PATH`,o.ATOMIC)})`,o.ATOMIC]},f.System.blocks.direct=` TRUE Object ID 1 Object ID 2 `,i.direct={init:function(){this.appendDummyInput().appendField(p(`direct`)),this.appendValueInput(`OID_SRC`).setCheck(`String`).appendField(p(`direct_oid_src`)),this.appendValueInput(`OID_DST`).setCheck(`String`).appendField(p(`direct_oid_dst`)),this.appendDummyInput(`ONLY_CHANGES`).appendField(p(`direct_only_changes`)).appendField(new n(`TRUE`),`ONLY_CHANGES`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.Trigger.HUE),this.setTooltip(p(`direct_tooltip`)),this.setHelpUrl(m(`direct_help`))}},a.forBlock.direct=function(e){let t=a.valueToCode(e,`OID_SRC`,o.ATOMIC),n=a.valueToCode(e,`OID_DST`,o.ATOMIC);return`on({ id: ${t}, change: '${l(e.getFieldValue(`ONLY_CHANGES`))?`ne`:`any`}' }, (obj) => {\n${a.prefixLines(`setState(${n}, obj.state.val);`,a.INDENT)}\n});\n`},f.System.blocks.control_instance=` admin.0 restartInstanceAsync`,i.control_instance={init:function(){var n;let r=[];if((n=window.main)!=null&&n.instances){for(let e of window.main.instances){let t=e.substring(15);r.push([t,t])}r.length||r.push([p(`control_instance_no_instances`),``]),this.appendDummyInput(`INSTANCE`).appendField(p(`control_instance`)).appendField(new e(r),`INSTANCE`)}else this.appendDummyInput(`INSTANCE`).appendField(p(`control_instance`)).appendField(new t(`adapter.0`),`INSTANCE`);this.appendDummyInput(`ACTION`).appendField(p(`control_instance_action`)).appendField(new e([[p(`control_instance_start`),`startInstanceAsync`],[p(`control_instance_stop`),`stopInstanceAsync`],[p(`control_instance_restart`),`restartInstanceAsync`]]),`ACTION`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_instance_tooltip`)),this.setHelpUrl(m(`control_instance_help`))}},a.forBlock.control_instance=function(e){return`await ${e.getFieldValue(`ACTION`)}(${s(e.getFieldValue(`INSTANCE`))});\n`},f.System.blocks.control_script=` startScriptAsync`,i.control_script={init:function(){this.appendDummyInput(`OID`).appendField(p(`control_script`)).appendField(new d(p(`select_id`),`script`),`OID`),this.appendDummyInput(`ACTION`).appendField(p(`control_instance_action`)).appendField(new e([[p(`control_script_start`),`startScriptAsync`],[p(`control_script_stop`),`stopScriptAsync`]]),`ACTION`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(f.System.HUE),this.setTooltip(p(`control_script_tooltip`)),this.setHelpUrl(m(`control_script_help`))}},a.forBlock.control_script=function(e){return`await ${e.getFieldValue(`ACTION`)}(${s(e.getFieldValue(`OID`))});\n`},f.System.blocks.regex=` (.*)`,i.regex={init:function(){this.appendDummyInput().appendField(`RegExp`),this.appendDummyInput(`TEXT`).appendField(new t(`(.*)`),`TEXT`),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setColour(f.System.HUE)}},a.forBlock.regex=function(e){return[`new RegExp(${s(e.getFieldValue(`TEXT`))})`,o.ATOMIC]},f.System.blocks.selector=` channel[state.id=*]`,i.selector={init:function(){this.appendDummyInput().appendField(`${p(`selector`)} $(`),this.appendDummyInput(`TEXT`).appendField(new t(`channel[state.id=*]`),`TEXT`),this.appendDummyInput().appendField(`)`),this.setInputsInline(!0),this.setOutput(!0,`Array`),this.setColour(f.System.HUE)}},a.forBlock.selector=function(e){return[`Array.prototype.slice.apply($(${s(e.getFieldValue(`TEXT`))}))`,o.ATOMIC]}}export{f as install}; \ No newline at end of file diff --git a/admin/assets/blocks_time-BH2F-ylT.js b/admin/assets/blocks_time-BH2F-ylT.js deleted file mode 100644 index 17d54dcc..00000000 --- a/admin/assets/blocks_time-BH2F-ylT.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e,o as t,r as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{n as o,s,t as c}from"./helpers-Crmcgphg.js";var l={"time_get_yyyy.mm.dd":`YYYY.MM.DD`,"time_get_yyyy/mm/dd":`YYYY/MM/DD`,"time_get_yy.mm.dd":`YY.MM.DD`,"time_get_yy/mm/dd":`YY/MM/DD`,"time_get_dd.mm.yyyy":`DD.MM.YYYY`,"time_get_dd/mm/yyyy":`DD/MM/YYYY`,"time_get_dd.mm.yy":`DD.MM.YY`,"time_get_dd/mm/yy":`DD/MM/YY`,"time_get_mm/dd/yyyy":`MM/DD/YYYY`,"time_get_mm/dd/yy":`MM/DD/YY`,"time_get_dd.mm":`DD.MM.`,"time_get_dd/mm":`DD/MM`,"time_get_mm.dd":`MM.DD`,"time_get_mm/dd":`MM/DD`,time_get_hh_mm:`hh:mm`,time_get_hh_mm_ss:`hh:mm:ss`,"time_get_hh_mm_ss.sss":`hh:mm:ss.sss`};function u(e){return e===!0||e===`true`||e===`TRUE`}function d(){let d=window.Blockly,f=d.Translate,p=window.getHelp;d.CustomBlocks=d.CustomBlocks||[],d.CustomBlocks.push(`Time`),d.Time={HUE:270,blocks:{}};for(let[e,t]of Object.entries(l))d.Words[e].format=t;let m=()=>[[f(`time_compare_lt`),`<`],[f(`time_compare_le`),`<=`],[f(`time_compare_gt`),`>`],[f(`time_compare_ge`),`>=`],[f(`time_compare_eq`),`==`],[f(`time_compare_bw`),`between`],[f(`time_compare_nb`),`not between`]];d.Time.blocks.time_compare_ex=` TRUE < 12:00 `,r.time_compare_ex={init:function(){this.appendDummyInput(`TIME_TEXT`).appendField(f(`time_compare_ex`)),this.appendDummyInput(`USE_ACTUAL_TIME`).appendField(new n(`TRUE`,function(e){this.getSourceBlock().updateShape_(void 0,e)}),`USE_ACTUAL_TIME`),this.appendDummyInput().appendField(f(`time_compare_is_ex`)),this.appendDummyInput(`OPTION`).appendField(new e(m(),function(e){this.getSourceBlock().updateShape_(e===`between`||e===`not between`)}),`OPTION`),this.appendDummyInput().appendField(` `),this.appendValueInput(`START_TIME`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_compare_ex_tooltip`)),this.setHelpUrl(p(`time_compare_ex_help`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`),n=this.getFieldValue(`USE_ACTUAL_TIME`);return e.setAttribute(`end_time`,t===`between`||t===`not between`?`true`:`false`),e.setAttribute(`actual_time`,u(n)?`true`:`false`),e},domToMutation:function(e){this.updateShape_(u(e.getAttribute(`end_time`)),u(e.getAttribute(`actual_time`)))},updateShape_:function(e,t){if(e===void 0&&(e=this.getFieldValue(`OPTION`)===`between`||this.getFieldValue(`OPTION`)===`not between`),e){if(!this.getInput(`END_TIME`)&&(this.getInput(`CUSTOM_TIME`)&&(this.removeInput(`CUSTOM_TIME`),this.removeInput(`CUSTOM_TEXT`)),this.appendDummyInput(`AND`).appendField(f(`time_compare_and`)),this.appendValueInput(`END_TIME`),!window.scripts.loading)){let e=this.workspace;setTimeout(()=>{var t;let n=this.getInput(`END_TIME`);if(!(n!=null&&(t=n.connection)!=null&&t.isConnected())){let t=e.newBlock(`text`);t.setShadow(!0),t.setFieldValue(`18:00`,`TEXT`),t.outputConnection.connect(n.connection),t.initSvg(),t.render()}},100)}}else this.getInput(`END_TIME`)&&(this.removeInput(`END_TIME`),this.removeInput(`AND`));t===void 0&&(t=this.getFieldValue(`USE_ACTUAL_TIME`));let n=u(t),r=this.getInput(`CUSTOM_TIME`);n?r&&(this.getInput(`TIME_TEXT`).fieldRow[0].setValue(f(`time_compare_ex`)),this.removeInput(`CUSTOM_TIME`),this.removeInput(`CUSTOM_TEXT`)):(this.getInput(`TIME_TEXT`).fieldRow[0].setValue(f(`time_compare_custom_ex`)),r||(this.appendDummyInput(`CUSTOM_TEXT`).appendField(f(`time_compare_ex_custom`)),this.appendValueInput(`CUSTOM_TIME`)))}},i.forBlock.time_compare_ex=function(e){let t=e.getFieldValue(`OPTION`);return[`compareTime(${i.valueToCode(e,`START_TIME`,a.ATOMIC)}, ${e.getInput(`END_TIME`)&&i.valueToCode(e,`END_TIME`,a.ATOMIC)||null}, '${t}', ${e.getInput(`CUSTOM_TIME`)&&i.valueToCode(e,`CUSTOM_TIME`,a.ATOMIC)||null})`,a.ATOMIC]},d.Time.blocks.time_compare=` < 12:00`,r.time_compare={init:function(){this.appendDummyInput().appendField(f(`time_compare`)),this.appendDummyInput(`OPTION`).appendField(new e(m(),function(e){this.getSourceBlock().updateShape_(e===`between`||e===`not between`)}),`OPTION`),this.appendDummyInput().appendField(` `),this.appendDummyInput(`START_TIME`).appendField(new t(`12:00`),`START_TIME`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_compare_tooltip`)),this.setHelpUrl(p(`time_compare_help`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`end_time`,t===`between`||t===`not between`?`true`:`false`),e},domToMutation:function(e){this.updateShape_(u(e.getAttribute(`end_time`)))},updateShape_:function(e){e?this.getInput(`END_TIME`)||(this.appendDummyInput(`AND`).appendField(f(`time_compare_and`)),this.appendDummyInput(`END_TIME`).appendField(new t(`18:00`),`END_TIME`)):this.getInput(`END_TIME`)&&(this.removeInput(`END_TIME`),this.removeInput(`AND`))}},i.forBlock.time_compare=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`START_TIME`),r=e.getFieldValue(`END_TIME`);return[`compareTime(${s(n)}, ${r?s(r):`null`}, ${s(t)})`,a.ATOMIC]},d.Time.blocks.time_get=` object`,r.time_get={init:function(){this.appendDummyInput().appendField(f(`time_get`)),this.appendDummyInput(`OPTION`).appendField(new e(c(),function(e){this.getSourceBlock().updateShape_(e===`custom`,e===`wdt`||e===`wdts`||e===`Mt`||e===`Mts`)}),`OPTION`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Time.HUE),this.setTooltip(f(`time_get_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`format`,t===`custom`?`true`:`false`),e.setAttribute(`language`,t===`wdt`||t===`wdts`||t===`Mt`||t===`Mts`?`true`:`false`),e},domToMutation:function(e){this.updateShape_(u(e.getAttribute(`format`)),u(e.getAttribute(`language`)))},updateShape_:function(n,r){n?this.getInput(`FORMAT`)||this.appendDummyInput(`FORMAT`).appendField(` `).appendField(new t(f(`time_get_default_format`)),`FORMAT`):this.getInput(`FORMAT`)&&this.removeInput(`FORMAT`),r?this.getInput(`LANGUAGE`)||this.appendDummyInput(`LANGUAGE`).appendField(new e(o()),`LANGUAGE`):this.getInput(`LANGUAGE`)&&this.removeInput(`LANGUAGE`)}},i.forBlock.time_get=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`FORMAT`),r=e.getFieldValue(`LANGUAGE`),i;return i=t===`object`?`(new Date().getTime())`:t===`ms`?`(new Date().getMilliseconds())`:t===`s`?`(new Date().getSeconds())`:t===`sid`?`(() => { const v = new Date(); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds(); })()`:t===`m`?`(new Date().getMinutes())`:t===`mid`?`(() => { const v = new Date(); return v.getHours() * 60 + v.getMinutes(); })()`:t===`h`?`(new Date().getHours())`:t===`d`?`(new Date().getDate())`:t===`M`?`(new Date().getMonth() + 1)`:t===`Mt`?`formatDate(new Date(), 'OO', '${r}')`:t===`Mts`?`formatDate(new Date(), 'O', '${r}')`:t===`y`?`(new Date().getYear())`:t===`fy`?`(new Date().getFullYear())`:t===`wdt`?`formatDate(new Date(), 'WW', '${r}')`:t===`wdts`?`formatDate(new Date(), 'W', '${r}')`:t===`wd`?`(() => { const d = new Date().getDay(); return d === 0 ? 7 : d; })()`:t===`cw`?`((date) => { const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); const dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil(((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7); })(new Date())`:t===`custom`?`formatDate(new Date(), ${s(n)})`:`formatDate(new Date(), ${s(t)})`,[i,a.ATOMIC]},d.Time.blocks.time_get_special=` dayStart`,r.time_get_special={init:function(){this.appendDummyInput().appendField(f(`time_get_special`)),this.appendDummyInput(`TYPE`).appendField(new e([[f(`time_get_special_day_start`),`dayStart`],[f(`time_get_special_day_end`),`dayEnd`],[f(`time_get_special_week_start`),`weekStart`],[f(`time_get_special_week_end`),`weekEnd`],[f(`time_get_special_month_start`),`monthStart`],[f(`time_get_special_month_end`),`monthEnd`]]),`TYPE`),this.setInputsInline(!0),this.setOutput(!0,`Number`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_get_special_tooltip`))}},i.forBlock.time_get_special=function(e){let t=e.getFieldValue(`TYPE`),n=``;return t===`dayStart`?n=`/* start of day */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return d.getTime(); })()`:t===`dayEnd`?n=`/* end of day */ (() => { const d = new Date(); d.setHours(23, 59, 59, 999); return d.getTime(); })()`:t===`weekStart`?n=`/* start of week */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return new Date(d.getFullYear(), d.getMonth(), d.getDate() - d.getDay() + (d.getDay() == 0 ? -6 : 1)).getTime(); })()`:t===`weekEnd`?n=`/* end of week */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return new Date(d.getFullYear(), d.getMonth(), d.getDate() + (8 - d.getDay())).getTime() - 1; })()`:t===`monthStart`?n=`/* start of month */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); d.setDate(1); return d.getTime(); })()`:t===`monthEnd`&&(n=`/* end of month */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return new Date(d.getFullYear(), d.getMonth() + 1, 1).getTime() - 1; })()`),[n,a.ATOMIC]},d.Time.blocks.time_astro=` sunrise 0`,r.time_astro={init:function(){this.appendDummyInput().appendField(f(`time_astro`)),this.appendDummyInput(`TYPE`).appendField(new e([[f(`astro_sunriseText`),`sunrise`],[f(`astro_sunriseEndText`),`sunriseEnd`],[f(`astro_goldenHourEndText`),`goldenHourEnd`],[f(`astro_solarNoonText`),`solarNoon`],[f(`astro_goldenHourText`),`goldenHour`],[f(`astro_sunsetStartText`),`sunsetStart`],[f(`astro_sunsetText`),`sunset`],[f(`astro_duskText`),`dusk`],[f(`astro_nauticalDuskText`),`nauticalDusk`],[f(`astro_nightText`),`night`],[f(`astro_nightEndText`),`nightEnd`],[f(`astro_nauticalDawnText`),`nauticalDawn`],[f(`astro_dawnText`),`dawn`],[f(`astro_nadirText`),`nadir`]]),`TYPE`),this.appendDummyInput(`OFFSET`).appendField(f(`time_astro_offset`)).appendField(new t(`0`),`OFFSET`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Time.HUE),this.setTooltip(f(`time_astro_tooltip`)),this.setHelpUrl(p(`time_astro_help`))}},i.forBlock.time_astro=function(e){return[`getAstroDate('${e.getFieldValue(`TYPE`)}', undefined, ${parseFloat(e.getFieldValue(`OFFSET`))})`,a.ATOMIC]},d.Time.blocks.time_calculation=` + ms object 1 `,r.time_calculation={init:function(){this.appendDummyInput(`NAME`).appendField(f(`time_calculation`)),this.appendValueInput(`DATE_TIME`).appendField(f(`time_calculation_on`)).setCheck(null),this.appendDummyInput(`OPERATION`).appendField(new e([[`+`,`+`],[`-`,`-`]]),`OPERATION`),this.appendValueInput(`VALUE`),this.appendDummyInput(`UNIT`).appendField(new e([[f(`time_calculation_ms`),`ms`],[f(`time_calculation_sec`),`sec`],[f(`time_calculation_min`),`min`],[f(`time_calculation_hour`),`hour`],[f(`time_calculation_day`),`day`],[f(`time_calculation_week`),`week`]]),`UNIT`),this.setInputsInline(!0),this.setOutput(!0,`Number`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_calculation_tooltip`))}},i.forBlock.time_calculation=function(e){let t=i.valueToCode(e,`DATE_TIME`,a.ATOMIC),n=e.getFieldValue(`OPERATION`),r=i.valueToCode(e,`VALUE`,a.ATOMIC),o=e.getFieldValue(`UNIT`),s=1;return o===`sec`?s=1e3:o===`min`?s=6e4:o===`hour`?s=36e5:o===`day`?s=864e5:o===`week`&&(s=6048e5),[`/* time calculation */ ((dateTime) => { const ts = (typeof dateTime === 'object' ? dateTime.getTime() : dateTime); return ts ${n} ((${r}) * ${s}); })(${t})`,a.ATOMIC]}}export{d as install}; \ No newline at end of file diff --git a/admin/assets/blocks_time-ugS4GvIN.js b/admin/assets/blocks_time-ugS4GvIN.js new file mode 100644 index 00000000..a0fb55f0 --- /dev/null +++ b/admin/assets/blocks_time-ugS4GvIN.js @@ -0,0 +1 @@ +import{i as e,o as t,r as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{c as o,n as s,t as c}from"./helpers-C_OEphYI.js";var l={"time_get_yyyy.mm.dd":`YYYY.MM.DD`,"time_get_yyyy/mm/dd":`YYYY/MM/DD`,"time_get_yy.mm.dd":`YY.MM.DD`,"time_get_yy/mm/dd":`YY/MM/DD`,"time_get_dd.mm.yyyy":`DD.MM.YYYY`,"time_get_dd/mm/yyyy":`DD/MM/YYYY`,"time_get_dd.mm.yy":`DD.MM.YY`,"time_get_dd/mm/yy":`DD/MM/YY`,"time_get_mm/dd/yyyy":`MM/DD/YYYY`,"time_get_mm/dd/yy":`MM/DD/YY`,"time_get_dd.mm":`DD.MM.`,"time_get_dd/mm":`DD/MM`,"time_get_mm.dd":`MM.DD`,"time_get_mm/dd":`MM/DD`,time_get_hh_mm:`hh:mm`,time_get_hh_mm_ss:`hh:mm:ss`,"time_get_hh_mm_ss.sss":`hh:mm:ss.sss`};function u(e){return e===!0||e===`true`||e===`TRUE`}function d(){let d=window.Blockly,f=d.Translate,p=window.getHelp;d.CustomBlocks=d.CustomBlocks||[],d.CustomBlocks.push(`Time`),d.Time={HUE:270,blocks:{}};for(let[e,t]of Object.entries(l))d.Words[e].format=t;let m=()=>[[f(`time_compare_lt`),`<`],[f(`time_compare_le`),`<=`],[f(`time_compare_gt`),`>`],[f(`time_compare_ge`),`>=`],[f(`time_compare_eq`),`==`],[f(`time_compare_bw`),`between`],[f(`time_compare_nb`),`not between`]];d.Time.blocks.time_compare_ex=` TRUE < 12:00 `,r.time_compare_ex={init:function(){this.appendDummyInput(`TIME_TEXT`).appendField(f(`time_compare_ex`)),this.appendDummyInput(`USE_ACTUAL_TIME`).appendField(new n(`TRUE`,function(e){this.getSourceBlock().updateShape_(void 0,e)}),`USE_ACTUAL_TIME`),this.appendDummyInput().appendField(f(`time_compare_is_ex`)),this.appendDummyInput(`OPTION`).appendField(new e(m(),function(e){this.getSourceBlock().updateShape_(e===`between`||e===`not between`)}),`OPTION`),this.appendDummyInput().appendField(` `),this.appendValueInput(`START_TIME`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_compare_ex_tooltip`)),this.setHelpUrl(p(`time_compare_ex_help`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`),n=this.getFieldValue(`USE_ACTUAL_TIME`);return e.setAttribute(`end_time`,t===`between`||t===`not between`?`true`:`false`),e.setAttribute(`actual_time`,u(n)?`true`:`false`),e},domToMutation:function(e){this.updateShape_(u(e.getAttribute(`end_time`)),u(e.getAttribute(`actual_time`)))},updateShape_:function(e,t){if(e===void 0&&(e=this.getFieldValue(`OPTION`)===`between`||this.getFieldValue(`OPTION`)===`not between`),e){if(!this.getInput(`END_TIME`)&&(this.getInput(`CUSTOM_TIME`)&&(this.removeInput(`CUSTOM_TIME`),this.removeInput(`CUSTOM_TEXT`)),this.appendDummyInput(`AND`).appendField(f(`time_compare_and`)),this.appendValueInput(`END_TIME`),!window.scripts.loading)){let e=this.workspace;setTimeout(()=>{var t;let n=this.getInput(`END_TIME`);if(!(n!=null&&(t=n.connection)!=null&&t.isConnected())){let t=e.newBlock(`text`);t.setShadow(!0),t.setFieldValue(`18:00`,`TEXT`),t.outputConnection.connect(n.connection),t.initSvg(),t.render()}},100)}}else this.getInput(`END_TIME`)&&(this.removeInput(`END_TIME`),this.removeInput(`AND`));t===void 0&&(t=this.getFieldValue(`USE_ACTUAL_TIME`));let n=u(t),r=this.getInput(`CUSTOM_TIME`);n?r&&(this.getInput(`TIME_TEXT`).fieldRow[0].setValue(f(`time_compare_ex`)),this.removeInput(`CUSTOM_TIME`),this.removeInput(`CUSTOM_TEXT`)):(this.getInput(`TIME_TEXT`).fieldRow[0].setValue(f(`time_compare_custom_ex`)),r||(this.appendDummyInput(`CUSTOM_TEXT`).appendField(f(`time_compare_ex_custom`)),this.appendValueInput(`CUSTOM_TIME`)))}},i.forBlock.time_compare_ex=function(e){let t=e.getFieldValue(`OPTION`);return[`compareTime(${i.valueToCode(e,`START_TIME`,a.ATOMIC)}, ${e.getInput(`END_TIME`)&&i.valueToCode(e,`END_TIME`,a.ATOMIC)||null}, '${t}', ${e.getInput(`CUSTOM_TIME`)&&i.valueToCode(e,`CUSTOM_TIME`,a.ATOMIC)||null})`,a.ATOMIC]},d.Time.blocks.time_compare=` < 12:00`,r.time_compare={init:function(){this.appendDummyInput().appendField(f(`time_compare`)),this.appendDummyInput(`OPTION`).appendField(new e(m(),function(e){this.getSourceBlock().updateShape_(e===`between`||e===`not between`)}),`OPTION`),this.appendDummyInput().appendField(` `),this.appendDummyInput(`START_TIME`).appendField(new t(`12:00`),`START_TIME`),this.setInputsInline(!0),this.setOutput(!0,`Boolean`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_compare_tooltip`)),this.setHelpUrl(p(`time_compare_help`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`end_time`,t===`between`||t===`not between`?`true`:`false`),e},domToMutation:function(e){this.updateShape_(u(e.getAttribute(`end_time`)))},updateShape_:function(e){e?this.getInput(`END_TIME`)||(this.appendDummyInput(`AND`).appendField(f(`time_compare_and`)),this.appendDummyInput(`END_TIME`).appendField(new t(`18:00`),`END_TIME`)):this.getInput(`END_TIME`)&&(this.removeInput(`END_TIME`),this.removeInput(`AND`))}},i.forBlock.time_compare=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`START_TIME`),r=e.getFieldValue(`END_TIME`);return[`compareTime(${o(n)}, ${r?o(r):`null`}, ${o(t)})`,a.ATOMIC]},d.Time.blocks.time_get=` object`,r.time_get={init:function(){this.appendDummyInput().appendField(f(`time_get`)),this.appendDummyInput(`OPTION`).appendField(new e(c(),function(e){this.getSourceBlock().updateShape_(e===`custom`,e===`wdt`||e===`wdts`||e===`Mt`||e===`Mts`)}),`OPTION`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Time.HUE),this.setTooltip(f(`time_get_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`),t=this.getFieldValue(`OPTION`);return e.setAttribute(`format`,t===`custom`?`true`:`false`),e.setAttribute(`language`,t===`wdt`||t===`wdts`||t===`Mt`||t===`Mts`?`true`:`false`),e},domToMutation:function(e){this.updateShape_(u(e.getAttribute(`format`)),u(e.getAttribute(`language`)))},updateShape_:function(n,r){n?this.getInput(`FORMAT`)||this.appendDummyInput(`FORMAT`).appendField(` `).appendField(new t(f(`time_get_default_format`)),`FORMAT`):this.getInput(`FORMAT`)&&this.removeInput(`FORMAT`),r?this.getInput(`LANGUAGE`)||this.appendDummyInput(`LANGUAGE`).appendField(new e(s()),`LANGUAGE`):this.getInput(`LANGUAGE`)&&this.removeInput(`LANGUAGE`)}},i.forBlock.time_get=function(e){let t=e.getFieldValue(`OPTION`),n=e.getFieldValue(`FORMAT`),r=e.getFieldValue(`LANGUAGE`),i;return i=t===`object`?`(new Date().getTime())`:t===`ms`?`(new Date().getMilliseconds())`:t===`s`?`(new Date().getSeconds())`:t===`sid`?`(() => { const v = new Date(); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds(); })()`:t===`m`?`(new Date().getMinutes())`:t===`mid`?`(() => { const v = new Date(); return v.getHours() * 60 + v.getMinutes(); })()`:t===`h`?`(new Date().getHours())`:t===`d`?`(new Date().getDate())`:t===`M`?`(new Date().getMonth() + 1)`:t===`Mt`?`formatDate(new Date(), 'OO', '${r}')`:t===`Mts`?`formatDate(new Date(), 'O', '${r}')`:t===`y`?`(new Date().getYear())`:t===`fy`?`(new Date().getFullYear())`:t===`wdt`?`formatDate(new Date(), 'WW', '${r}')`:t===`wdts`?`formatDate(new Date(), 'W', '${r}')`:t===`wd`?`(() => { const d = new Date().getDay(); return d === 0 ? 7 : d; })()`:t===`cw`?`((date) => { const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); const dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil(((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7); })(new Date())`:t===`custom`?`formatDate(new Date(), ${o(n)})`:`formatDate(new Date(), ${o(t)})`,[i,a.ATOMIC]},d.Time.blocks.time_get_special=` dayStart`,r.time_get_special={init:function(){this.appendDummyInput().appendField(f(`time_get_special`)),this.appendDummyInput(`TYPE`).appendField(new e([[f(`time_get_special_day_start`),`dayStart`],[f(`time_get_special_day_end`),`dayEnd`],[f(`time_get_special_week_start`),`weekStart`],[f(`time_get_special_week_end`),`weekEnd`],[f(`time_get_special_month_start`),`monthStart`],[f(`time_get_special_month_end`),`monthEnd`]]),`TYPE`),this.setInputsInline(!0),this.setOutput(!0,`Number`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_get_special_tooltip`))}},i.forBlock.time_get_special=function(e){let t=e.getFieldValue(`TYPE`),n=``;return t===`dayStart`?n=`/* start of day */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return d.getTime(); })()`:t===`dayEnd`?n=`/* end of day */ (() => { const d = new Date(); d.setHours(23, 59, 59, 999); return d.getTime(); })()`:t===`weekStart`?n=`/* start of week */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return new Date(d.getFullYear(), d.getMonth(), d.getDate() - d.getDay() + (d.getDay() == 0 ? -6 : 1)).getTime(); })()`:t===`weekEnd`?n=`/* end of week */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return new Date(d.getFullYear(), d.getMonth(), d.getDate() + (8 - d.getDay())).getTime() - 1; })()`:t===`monthStart`?n=`/* start of month */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); d.setDate(1); return d.getTime(); })()`:t===`monthEnd`&&(n=`/* end of month */ (() => { const d = new Date(); d.setHours(0, 0, 0, 0); return new Date(d.getFullYear(), d.getMonth() + 1, 1).getTime() - 1; })()`),[n,a.ATOMIC]},d.Time.blocks.time_astro=` sunrise 0`,r.time_astro={init:function(){this.appendDummyInput().appendField(f(`time_astro`)),this.appendDummyInput(`TYPE`).appendField(new e([[f(`astro_sunriseText`),`sunrise`],[f(`astro_sunriseEndText`),`sunriseEnd`],[f(`astro_goldenHourEndText`),`goldenHourEnd`],[f(`astro_solarNoonText`),`solarNoon`],[f(`astro_goldenHourText`),`goldenHour`],[f(`astro_sunsetStartText`),`sunsetStart`],[f(`astro_sunsetText`),`sunset`],[f(`astro_duskText`),`dusk`],[f(`astro_nauticalDuskText`),`nauticalDusk`],[f(`astro_nightText`),`night`],[f(`astro_nightEndText`),`nightEnd`],[f(`astro_nauticalDawnText`),`nauticalDawn`],[f(`astro_dawnText`),`dawn`],[f(`astro_nadirText`),`nadir`]]),`TYPE`),this.appendDummyInput(`OFFSET`).appendField(f(`time_astro_offset`)).appendField(new t(`0`),`OFFSET`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Time.HUE),this.setTooltip(f(`time_astro_tooltip`)),this.setHelpUrl(p(`time_astro_help`))}},i.forBlock.time_astro=function(e){return[`getAstroDate('${e.getFieldValue(`TYPE`)}', undefined, ${parseFloat(e.getFieldValue(`OFFSET`))})`,a.ATOMIC]},d.Time.blocks.time_calculation=` + ms object 1 `,r.time_calculation={init:function(){this.appendDummyInput(`NAME`).appendField(f(`time_calculation`)),this.appendValueInput(`DATE_TIME`).appendField(f(`time_calculation_on`)).setCheck(null),this.appendDummyInput(`OPERATION`).appendField(new e([[`+`,`+`],[`-`,`-`]]),`OPERATION`),this.appendValueInput(`VALUE`),this.appendDummyInput(`UNIT`).appendField(new e([[f(`time_calculation_ms`),`ms`],[f(`time_calculation_sec`),`sec`],[f(`time_calculation_min`),`min`],[f(`time_calculation_hour`),`hour`],[f(`time_calculation_day`),`day`],[f(`time_calculation_week`),`week`]]),`UNIT`),this.setInputsInline(!0),this.setOutput(!0,`Number`),this.setColour(d.Time.HUE),this.setTooltip(f(`time_calculation_tooltip`))}},i.forBlock.time_calculation=function(e){let t=i.valueToCode(e,`DATE_TIME`,a.ATOMIC),n=e.getFieldValue(`OPERATION`),r=i.valueToCode(e,`VALUE`,a.ATOMIC),o=e.getFieldValue(`UNIT`),s=1;return o===`sec`?s=1e3:o===`min`?s=6e4:o===`hour`?s=36e5:o===`day`?s=864e5:o===`week`&&(s=6048e5),[`/* time calculation */ ((dateTime) => { const ts = (typeof dateTime === 'object' ? dateTime.getTime() : dateTime); return ts ${n} ((${r}) * ${s}); })(${t})`,a.ATOMIC]}}export{d as install}; \ No newline at end of file diff --git a/admin/assets/blocks_timeout-C3BoW4XJ.js b/admin/assets/blocks_timeout-C3BoW4XJ.js deleted file mode 100644 index e984a6c0..00000000 --- a/admin/assets/blocks_timeout-C3BoW4XJ.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,i as t,o as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";var o={id:`timeout`,marker:`isTimeout_`,variableType:`timeout`},s={id:`interval`,marker:`isInterval_`,variableType:`interval`};function c(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function l(e){return i.nameDB_.safeName(e.getFieldValue(`NAME`))}function u(){let u=window.Blockly,d=u.Translate,f=window.getHelp;u.CustomBlocks=u.CustomBlocks||[],u.CustomBlocks.push(`Timeouts`);let p=()=>[[d(`timeouts_settimeout_ms`),`ms`],[d(`timeouts_settimeout_sec`),`sec`],[d(`timeouts_settimeout_min`),`min`]],m=(t,n,r)=>{for(let i of n.getAllBlocks())if(i!==r&&(i.isTimeout_||i.isInterval_)&&e.equals(i.getFieldValue(`NAME`),t))return!1;return!0},h=(e,t)=>{if(t.isInFlyout)return e;for(;!m(e,t.workspace,t);){let t=e.match(/^(.*?)(\d+)$/);t?e=t[1]+(parseInt(t[2],10)+1):e+=`2`}return e},g=function(e){return h(e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,``),this.getSourceBlock())},_=(e,t)=>{let n=[];for(let r of e.getAllBlocks())if(r[t.marker]){let e=r.getFieldValue(`NAME`);n.push([e,e])}if(window.scripts.loading)for(let t of e.getVariableMap().getVariablesOfType(``))n.find(e=>e[0]===t.getName())||n.push([t.getName(),t.getName()]);for(let r of e.getVariableMap().getVariablesOfType(t.variableType))n.find(e=>e[0]===r.getName())||n.push([r.getName(),r.getName()]);return n.length||n.push([``,``]),n};u.Timeouts={HUE:70,blocks:{},getAllTimeouts:e=>_(e,o),getAllIntervals:e=>_(e,s)};let v=e=>new t(()=>{var t;return(t=window.scripts)!=null&&t.blocklyWorkspace?_(window.scripts.blocklyWorkspace,e):[]});u.Timeouts.blocks.timeouts_wait=` 1000 ms`,r.timeouts_wait={init:function(){this.appendDummyInput().appendField(d(`timeouts_wait`)).appendField(new n(`1000`),`DELAY`).appendField(new t(p()),`UNIT`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(u.Timeouts.HUE),this.setTooltip(d(`timeouts_wait_tooltip`)),this.setHelpUrl(f(`timeouts_wait_help`))}},i.forBlock.timeouts_wait=function(e){return`await wait(${c(e.getFieldValue(`DELAY`),e.getFieldValue(`UNIT`))});\n`};let y=(e,o)=>{let s=e.id===`timeout`,m=`timeouts_set${e.id}${o?`_variable`:``}`,_=s?`DELAY`:`INTERVAL`,v=s?`DELAY_MS`:`INTERVAL_MS`,y=`timeouts_set${e.id}`,b=s?`timeout`:d(`timeouts_setinterval_name`);r[m]={init:function(){let e=new n(h(b,this),g);e.setSpellcheck(!1);let r=this.appendDummyInput().appendField(d(y)).appendField(e,`NAME`).appendField(d(`${y}_in`));o?this.appendValueInput(v).setCheck(`Number`).appendField(d(`timeouts_settimeout_ms`)):r.appendField(new n(`1000`),_).appendField(new t(p()),`UNIT`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(o),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(u.Timeouts.HUE),this.setTooltip(d(`${y}_tooltip`)),this.setHelpUrl(f(`${y}_help`))},[e.marker]:!0,getVars:function(){return[this.getFieldValue(`NAME`)]},getVarModels:function(){let t=this.getFieldValue(`NAME`);return[{getId:()=>t,name:t,type:e.variableType}]}},i.forBlock[m]=function(e){let t=l(e),n=i.statementToCode(e,`STATEMENT`),r=o?`parseInt(${i.valueToCode(e,v,a.ATOMIC)})`:String(c(e.getFieldValue(_),e.getFieldValue(`UNIT`))),u=s?`${i.prefixLines(`${t} = null;`,i.INDENT)}\n`:``;return`${t} = ${s?`setTimeout`:`setInterval`}(async () => {\n${u}${n}}, ${r});\n`}},b=e=>{let t=`timeouts_clear${e.id}`,n=`timeouts_get${e.id}`;u.Timeouts.blocks[t]=` `,r[t]={init:function(){this.appendDummyInput(`NAME`).appendField(d(t)).appendField(v(e),`NAME`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(u.Timeouts.HUE),this.setTooltip(d(`${t}_tooltip`)),this.setHelpUrl(f(`${t}_help`))}},i.forBlock[t]=function(t){let n=l(t);return`(() => { if (${n}) { ${e.id===`timeout`?`clearTimeout`:`clearInterval`}(${n}); ${n} = null; }})();\n`},u.Timeouts.blocks[n]=` `,r[n]={init:function(){this.appendDummyInput(`NAME`).appendField(d(n)).appendField(v(e),`NAME`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(u.Timeouts.HUE),this.setTooltip(d(`${n}_tooltip`)),this.setHelpUrl(f(`${n}_help`))}},i.forBlock[n]=function(e){return[l(e),a.ATOMIC]}};u.Timeouts.blocks.timeouts_settimeout=` timeout 1000 ms`,y(o,!1),u.Timeouts.blocks.timeouts_settimeout_variable=` 1000 `,y(o,!0),b(o),u.Timeouts.blocks.timeouts_setinterval=` 1000 ms`,y(s,!1),u.Timeouts.blocks.timeouts_setinterval_variable=` 1000 `,y(s,!0),b(s)}export{u as install}; \ No newline at end of file diff --git a/admin/assets/blocks_timeout-CiwKK28I.js b/admin/assets/blocks_timeout-CiwKK28I.js new file mode 100644 index 00000000..21c7f5f1 --- /dev/null +++ b/admin/assets/blocks_timeout-CiwKK28I.js @@ -0,0 +1 @@ +import{c as e,i as t,o as n,t as r}from"./blockly-C4zJerWL.js";import{n as i,t as a}from"./javascript-DVIhlTDr.js";import{a as o}from"./helpers-C_OEphYI.js";var s={id:`timeout`,marker:`isTimeout_`,variableType:`timeout`},c={id:`interval`,marker:`isInterval_`,variableType:`interval`};function l(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function u(e){return i.nameDB_.safeName(e.getFieldValue(`NAME`))}function d(){let d=window.Blockly,f=d.Translate,p=window.getHelp;d.CustomBlocks=d.CustomBlocks||[],d.CustomBlocks.push(`Timeouts`);let m=()=>[[f(`timeouts_settimeout_ms`),`ms`],[f(`timeouts_settimeout_sec`),`sec`],[f(`timeouts_settimeout_min`),`min`]],h=(t,n,r)=>{for(let i of n.getAllBlocks())if(i!==r&&(i.isTimeout_||i.isInterval_)&&e.equals(i.getFieldValue(`NAME`),t))return!1;return!0},g=(e,t)=>{if(t.isInFlyout)return e;for(;!h(e,t.workspace,t);){let t=e.match(/^(.*?)(\d+)$/);t?e=t[1]+(parseInt(t[2],10)+1):e+=`2`}return e},_=function(e){return g(e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,``),this.getSourceBlock())},v=(e,t)=>{let n=[];for(let r of e.getAllBlocks())if(r[t.marker]){let e=r.getFieldValue(`NAME`);n.push([e,e])}if(window.scripts.loading)for(let t of e.getVariableMap().getVariablesOfType(``))n.find(e=>e[0]===t.getName())||n.push([t.getName(),t.getName()]);for(let r of e.getVariableMap().getVariablesOfType(t.variableType))n.find(e=>e[0]===r.getName())||n.push([r.getName(),r.getName()]);return n.length||n.push([``,``]),n};d.Timeouts={HUE:70,blocks:{},getAllTimeouts:e=>v(e,s),getAllIntervals:e=>v(e,c)};let y=e=>new t(()=>{var t;return(t=window.scripts)!=null&&t.blocklyWorkspace?v(window.scripts.blocklyWorkspace,e):[]});d.Timeouts.blocks.timeouts_wait=` 1000 ms`,r.timeouts_wait={init:function(){this.appendDummyInput().appendField(f(`timeouts_wait`)).appendField(new n(`1000`),`DELAY`).appendField(new t(m()),`UNIT`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Timeouts.HUE),this.setTooltip(f(`timeouts_wait_tooltip`)),this.setHelpUrl(p(`timeouts_wait_help`))}},i.forBlock.timeouts_wait=function(e){return`await wait(${l(e.getFieldValue(`DELAY`),e.getFieldValue(`UNIT`))});\n`};let b=(e,s)=>{let c=e.id===`timeout`,h=`timeouts_set${e.id}${s?`_variable`:``}`,v=c?`DELAY`:`INTERVAL`,y=c?`DELAY_MS`:`INTERVAL_MS`,b=`timeouts_set${e.id}`,x=c?`timeout`:f(`timeouts_setinterval_name`);r[h]={init:function(){let e=new n(g(x,this),_);e.setSpellcheck(!1);let r=this.appendDummyInput().appendField(f(b)).appendField(e,`NAME`).appendField(f(`${b}_in`));s?this.appendValueInput(y).setCheck(`Number`).appendField(f(`timeouts_settimeout_ms`)):r.appendField(new n(`1000`),v).appendField(new t(m()),`UNIT`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(s),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Timeouts.HUE),this.setTooltip(f(`${b}_tooltip`)),this.setHelpUrl(p(`${b}_help`))},[e.marker]:!0,getVars:function(){return[this.getFieldValue(`NAME`)]},getVarModels:function(){return[o(this.getFieldValue(`NAME`),e.variableType)]}},i.forBlock[h]=function(e){let t=u(e),n=i.statementToCode(e,`STATEMENT`),r=s?`parseInt(${i.valueToCode(e,y,a.ATOMIC)})`:String(l(e.getFieldValue(v),e.getFieldValue(`UNIT`))),o=c?`${i.prefixLines(`${t} = null;`,i.INDENT)}\n`:``;return`${t} = ${c?`setTimeout`:`setInterval`}(async () => {\n${o}${n}}, ${r});\n`}},x=e=>{let t=`timeouts_clear${e.id}`,n=`timeouts_get${e.id}`;d.Timeouts.blocks[t]=` `,r[t]={init:function(){this.appendDummyInput(`NAME`).appendField(f(t)).appendField(y(e),`NAME`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(d.Timeouts.HUE),this.setTooltip(f(`${t}_tooltip`)),this.setHelpUrl(p(`${t}_help`))}},i.forBlock[t]=function(t){let n=u(t);return`(() => { if (${n}) { ${e.id===`timeout`?`clearTimeout`:`clearInterval`}(${n}); ${n} = null; }})();\n`},d.Timeouts.blocks[n]=` `,r[n]={init:function(){this.appendDummyInput(`NAME`).appendField(f(n)).appendField(y(e),`NAME`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(d.Timeouts.HUE),this.setTooltip(f(`${n}_tooltip`)),this.setHelpUrl(p(`${n}_help`))}},i.forBlock[n]=function(e){return[u(e),a.ATOMIC]}};d.Timeouts.blocks.timeouts_settimeout=` timeout 1000 ms`,b(s,!1),d.Timeouts.blocks.timeouts_settimeout_variable=` 1000 `,b(s,!0),x(s),d.Timeouts.blocks.timeouts_setinterval=` 1000 ms`,b(c,!1),d.Timeouts.blocks.timeouts_setinterval_variable=` 1000 `,b(c,!0),x(c)}export{d as install}; \ No newline at end of file diff --git a/admin/assets/blocks_trigger-15cJjBQj.js b/admin/assets/blocks_trigger-15cJjBQj.js new file mode 100644 index 00000000..f392c151 --- /dev/null +++ b/admin/assets/blocks_trigger-15cJjBQj.js @@ -0,0 +1,2 @@ +import{c as e,f as t,i as n,o as r,r as i,s as a,t as o}from"./blockly-C4zJerWL.js";import{n as s,t as c}from"./javascript-DVIhlTDr.js";import{a as l,c as u,f as d,l as f,o as p,p as m,r as h,s as g}from"./helpers-C_OEphYI.js";import{FieldOID as _}from"./field_oid-BGIMv9gw.js";import{FieldCRON as v}from"./field_cron-BMQWPb61.js";function y(e){return s.nameDB_.safeName(e.getFieldValue(`NAME`))}function b(){let b=window.Blockly,x=b.Translate,S=window.getHelp;b.CustomBlocks=b.CustomBlocks||[],b.CustomBlocks.push(`Trigger`);let C=e=>{let t=[];for(let n of e.getAllBlocks())if(n.isSchedule_){let e=n.getFieldValue(`NAME`);t.push([e,e])}if(window.scripts.loading)for(let n of e.getVariableMap().getVariablesOfType(``))t.find(e=>e[0]===n.getName())||t.push([n.getName(),n.getName()]);for(let n of e.getVariableMap().getVariablesOfType(`cron`))t.find(e=>e[0]===n.getName())||t.push([n.getName(),n.getName()]);return t.length||t.push([``,``]),t};b.Trigger={HUE:330,getAllSchedules:C,blocks:{},WARNING_PARENTS:[`on`,`on_ext`,`schedule`,`schedule_by_id`,`schedule_create`,`astro`,`onMessage`,`onFile`,`onLog`,`onEnumMembers`,`timeouts_setinterval`,`timeouts_setinterval_variable`,`controls_repeat_ext`,`controls_repeat_ext`,`controls_for`,`controls_forEach`]};let w=()=>[[x(`on_onchange`),`ne`],[x(`on_any`),`any`],[x(`on_gt`),`gt`],[x(`on_ge`),`ge`],[x(`on_lt`),`lt`],[x(`on_le`),`le`],[x(`on_true`),`true`],[x(`on_false`),`false`]],T=()=>[[x(`on_ack_any`),``],[x(`on_ack_true`),`true`],[x(`on_ack_false`),`false`]],E=e=>e===`true`||e===`false`?`val: ${e}`:`change: '${e}'`,D=()=>`${s.prefixLines(`let value = obj.state.val;`,s.INDENT)}\n${s.prefixLines(`let oldValue = obj.oldState.val;`,s.INDENT)}\n`,O=(e,t,n,r)=>{setTimeout(()=>{var i;if(!((i=t.connection)!=null&&i.isConnected())){let i=e.newBlock(n);i.setShadow(!0),r&&i.setFieldValue(r[1],r[0]),i.outputConnection.connect(t.connection),i.initSvg(),i.render()}},100)},k=(e,t,r,i,a,s,c)=>{o[e]={init:function(){this.appendDummyInput().appendField(t),this.appendDummyInput(`ATTR`).appendField(new n(r),`ATTR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(s),this.setTooltip(x(`${e}_tooltip`)),c&&this.setHelpUrl(S(c))},onchange:function(){m(this,i,a)},FUNCTION_TYPES:i}};b.Trigger.blocks.on_ext=` ne `,o.on_ext_oid_container={init:function(){this.appendDummyInput().appendField(x(`on_ext_on`)),this.appendStatementInput(`STACK`),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ext_on_tooltip`)),this.contextMenu=!1}},o.on_ext_oid={init:function(){this.appendDummyInput(`OID`).appendField(x(`on_ext_oid`)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ext_oid_tooltip`)),this.contextMenu=!1}},o.on_ext={init:function(){this.itemCount_=1,this.setMutator(new t.MutatorIcon([`on_ext_oid`],this)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ext_tooltip`)),this.setHelpUrl(S(`on_help`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute(`items`),10),this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(`on_ext_oid_container`);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t {\n${i.length===1?D():``}${o}});\n`},b.Trigger.blocks.on=` ne `,o.on={init:function(){this.appendDummyInput().appendField(x(`on`)),this.appendDummyInput(`OID`).appendField(new _(x(`select_id`),`state`),`OID`),this.appendDummyInput(`CONDITION`).appendField(new n(w()),`CONDITION`),this.appendDummyInput(`ACK_CONDITION`).appendField(x(`on_ack`)).appendField(new n(T()),`ACK_CONDITION`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_tooltip`)),this.setHelpUrl(S(`on_help`))},onchange:function(){d(this)}},s.forBlock.on=function(e){let t=e.getFieldValue(`OID`),n=E(e.getFieldValue(`CONDITION`)),r=e.getFieldValue(`ACK_CONDITION`);a.VARIABLES_DEFAULT_NAME=`value`;let i=p(t),o=s.statementToCode(e,`STATEMENT`);return`on({ id: '${t}'${i?` /* ${i} */`:``}, ${n}${r?`, ack: ${r}`:``} }, async (obj) => {\n${D()}${o}});\n`},b.Trigger.blocks.on_source=` state.val`,k(`on_source`,`↪`,[[x(`on_source_state_val`),`state.val`],[x(`on_source_state_ts`),`state.ts`],[x(`on_source_state_q`),`state.q`],[x(`on_source_state_from`),`state.from`],[x(`on_source_state_ack`),`state.ack`],[x(`on_source_state_lc`),`state.lc`],[x(`on_source_state_c`),`state.c`],[x(`on_source_state_user`),`state.user`],[x(`on_source_id`),`id`],[x(`on_source_name`),`common.name`],[x(`on_source_desc`),`common.desc`],[x(`on_source_channel_id`),`channelId`],[x(`on_source_channel_name`),`channelName`],[x(`on_source_device_id`),`deviceId`],[x(`on_source_device_name`),`deviceName`],[x(`on_source_oldstate_val`),`oldState.val`],[x(`on_source_oldstate_ts`),`oldState.ts`],[x(`on_source_oldstate_q`),`oldState.q`],[x(`on_source_oldstate_from`),`oldState.from`],[x(`on_source_oldstate_ack`),`oldState.ack`],[x(`on_source_oldstate_lc`),`oldState.lc`],[x(`on_source_oldstate_c`),`oldState.c`],[x(`on_source_oldstate_user`),`oldState.user`]],[`on`,`on_ext`,`onEnumMembers`],`on_source_warning`,b.Trigger.HUE,`on_help`),s.forBlock.on_source=function(e){let t=e.getFieldValue(`ATTR`),n=t.split(`.`);return[n.length>1?`(obj.${n[0]} ? obj.${t} : '')`:`obj.${t}`,c.ATOMIC]},b.Trigger.blocks.on_ack_value=``,o.on_ack_value={init:function(){this.appendDummyInput().appendField(`↪ ${x(`on_ack_value`)}`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ack_value_tooltip`)),this.setHelpUrl(S(`on_help`))},onchange:function(){m(this,[`on`,`on_ext`,`onEnumMembers`],`on_ack_value_warning`)},FUNCTION_TYPES:[`on`,`on_ext`,`onEnumMembers`]},s.forBlock.on_ack_value=function(){return`if (obj.id && obj?.state && !obj.state.ack) { +${s.prefixLines(`await setStateAsync(obj.id, { val: obj.state.val, ack: true });`,s.INDENT)}\n}\n`},b.Trigger.blocks.astro=` sunrise 0`,o.astro={init:function(){this.appendDummyInput().appendField(x(`astro`)),this.appendDummyInput(`TYPE`).appendField(new n([[x(`astro_sunriseText`),`sunrise`],[x(`astro_sunriseEndText`),`sunriseEnd`],[x(`astro_goldenHourEndText`),`goldenHourEnd`],[x(`astro_solarNoonText`),`solarNoon`],[x(`astro_goldenHourText`),`goldenHour`],[x(`astro_sunsetStartText`),`sunsetStart`],[x(`astro_sunsetText`),`sunset`],[x(`astro_duskText`),`dusk`],[x(`astro_nauticalDuskText`),`nauticalDusk`],[x(`astro_nightText`),`night`],[x(`astro_nightEndText`),`nightEnd`],[x(`astro_nauticalDawnText`),`nauticalDawn`],[x(`astro_dawnText`),`dawn`],[x(`astro_nadirText`),`nadir`]]),`TYPE`),this.appendDummyInput().appendField(x(`astro_offset`)),this.appendDummyInput(`OFFSET`).appendField(new r(`0`),`OFFSET`),this.appendDummyInput().appendField(x(`astro_minutes`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`astro_tooltip`)),this.setHelpUrl(S(`astro_help`))},onchange:function(){d(this)}},s.forBlock.astro=function(e){return`schedule({ astro: '${e.getFieldValue(`TYPE`)}', shift: ${parseInt(e.getFieldValue(`OFFSET`),10)} }, async () => {\n${s.statementToCode(e,`STATEMENT`)}});\n`},b.Trigger.blocks.schedule=` * * * * *`,o.schedule={init:function(){this.appendDummyInput().appendField(x(`schedule`)),this.appendDummyInput(`SCHEDULE`).appendField(new v(`* * * * *`),`SCHEDULE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_tooltip`)),this.setHelpUrl(S(`schedule_help`))},onchange:function(){d(this)}},s.forBlock.schedule=function(e){let t=e.getFieldValue(`SCHEDULE`),n=s.statementToCode(e,`STATEMENT`);return`schedule(${t.startsWith(`{`)?`'${t}'`:`"${t}"`}, async () => {\n${n}});\n`},b.Trigger.blocks.schedule_by_id=` `,o.schedule_by_id={init:function(){this.appendDummyInput().appendField(x(`schedule_by_id`)),this.appendDummyInput(`OID`).appendField(new _(x(`select_id`),`state`),`OID`),this.appendDummyInput(`ACK_CONDITION`).appendField(x(`on_ack`)).appendField(new n(T()),`ACK_CONDITION`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_by_id_tooltip`)),this.setHelpUrl(S(`schedule_by_id_help`))}},s.forBlock.schedule_by_id=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ACK_CONDITION`),r=s.statementToCode(e,`STATEMENT`),i=p(t);return`scheduleById('${t}'${i?` /* ${i} */`:``}${n?`, ${n}`:``}, async () => {\n${r}});\n`},b.Trigger.blocks.schedule_create=` schedule `;let A=(t,n,r)=>{if(t===`schedule`)return!1;for(let i of n.getAllBlocks())if(i!==r&&i.isSchedule_&&e.equals(i.getFieldValue(`NAME`),t))return!1;return!0},j=(e,t)=>{if(t.isInFlyout)return e;for(;!A(e,t.workspace,t);){let t=e.match(/^(.*?)(\d+)$/);t?e=t[1]+(parseInt(t[2],10)+1):e+=`1`}return e},M=function(e){return j(e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,``),this.getSourceBlock())};o.schedule_create={init:function(){let e=new r(j(`schedule`,this),M);e.setSpellcheck(!1),this.appendDummyInput(`NAME`).appendField(x(`schedule_create`)).appendField(e,`NAME`),this.appendValueInput(`SCHEDULE`).appendField(x(`schedule_text`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_create_tooltip`)),this.setHelpUrl(S(`schedule_create_help`))},isSchedule_:!0,getVars:function(){return[this.getFieldValue(`NAME`)]},getVarModels:function(){return[l(this.getFieldValue(`NAME`),`cron`)]}},s.forBlock.schedule_create=function(e){return`${y(e)} = schedule(${s.valueToCode(e,`SCHEDULE`,c.ATOMIC)}, async () => {\n${s.statementToCode(e,`STATEMENT`)}});\n`},b.Trigger.blocks.schedule_clear=` `,o.schedule_clear={init:function(){this.appendDummyInput(`NAME`).appendField(x(`schedule_clear`)).appendField(new n(()=>{var e;return(e=window.scripts)!=null&&e.blocklyWorkspace?C(window.scripts.blocklyWorkspace):[]}),`NAME`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_clear_tooltip`)),this.setHelpUrl(S(`schedule_clear_help`))}},s.forBlock.schedule_clear=function(e){let t=y(e);return`(() => { if (${t}) { clearSchedule(${t}); ${t} = null; }})();\n`},b.Trigger.blocks.field_cron=` * * * * *`,o.field_cron={init:function(){this.appendDummyInput().appendField(x(`field_cron_CRON`)),this.appendDummyInput().appendField(new v(`* * * * *`),`CRON`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(b.Trigger.HUE),this.setTooltip(x(`field_cron_tooltip`))}},s.forBlock.field_cron=function(e){return[`'${e.getFieldValue(`CRON`)}'`,c.ATOMIC]},b.Trigger.blocks.cron_builder=` FALSE FALSE * * * * * `,o.cron_builder={init:function(){this.appendDummyInput().appendField(x(`cron_builder_CRON`)),this.appendDummyInput(`LINE`).appendField(x(`cron_builder_line`)).appendField(new i(`FALSE`,function(e){var t;(t=this.getSourceBlock())==null||t.setInputsInline(h(e))}),`LINE`);let e=this.workspace;for(let[t,n]of[[`DOW`,`cron_builder_dow`],[`MONTHS`,`cron_builder_month`],[`DAYS`,`cron_builder_day`],[`HOURS`,`cron_builder_hour`],[`MINUTES`,`cron_builder_minutes`]]){let r=this.appendValueInput(t).appendField(x(n));O(e,r,`text`,[`TEXT`,`*`])}this.appendDummyInput(`WITH_SECONDS`).appendField(x(`cron_builder_with_seconds`)).appendField(new i(`FALSE`,function(e){this.getSourceBlock().updateShape_(h(e))}),`WITH_SECONDS`),this.seconds_=!1,this.as_line_=!1,this.setInputsInline(this.as_line_),this.setOutput(!0,`String`),this.setColour(b.Trigger.HUE),this.setTooltip(x(`field_cron_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`seconds`,String(this.seconds_)),e.setAttribute(`as_line`,String(this.as_line_)),e},domToMutation:function(e){this.seconds_=e.getAttribute(`seconds`)===`true`,this.as_line_=e.getAttribute(`as_line`)===`true`,this.setInputsInline(this.as_line_),this.updateShape_(this.seconds_)},updateShape_:function(e){if(this.seconds_=e,e){if(!this.getInput(`SECONDS`)){let e=this.appendValueInput(`SECONDS`).appendField(x(`cron_builder_seconds`));O(this.workspace,e,`text`,[`TEXT`,`*`])}}else this.getInput(`SECONDS`)&&this.removeInput(`SECONDS`)}},s.forBlock.cron_builder=function(e){let t=t=>s.valueToCode(e,t,c.ATOMIC),n=e.getFieldValue(`WITH_SECONDS`),r=n&&e.getInput(`SECONDS`)?t(`SECONDS`):`0`;return[(h(n)?`${r}.toString().trim() + ' ' + `:``)+`${t(`MINUTES`)}.toString().trim() + ' ' + ${t(`HOURS`)}.toString().trim() + ' ' + ${t(`DAYS`)}.toString().trim() + ' ' + ${t(`MONTHS`)}.toString().trim() + ' ' + ${t(`DOW`)}.toString().trim()`,c.ATOMIC]},b.Trigger.blocks.onMessage=` customMessage`,o.onMessage={init:function(){this.appendDummyInput(`NAME`).appendField(`✉️ ${x(`onMessage`)}`),this.appendDummyInput(`MESSAGE`).appendField(x(`onMessage_message`)).appendField(new r(`customMessage`),`MESSAGE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onMessage_tooltip`)),this.setHelpUrl(S(`onMessage_help`))},onchange:function(){d(this)}},s.forBlock.onMessage=function(e){let t=e.getFieldValue(`MESSAGE`),n=s.statementToCode(e,`STATEMENT`);return`onMessage(${u(t)}, async (data, callback) => {\n${n}${s.prefixLines(`typeof callback === 'function' && callback({ result: true }); // default callback`,s.INDENT)}\n});\n`},b.Trigger.blocks.onMessage_data=` data`,k(`onMessage_data`,`✉️ `,[[x(`onMessage_data_data`),`data`]],[`onMessage`],`onMessage_data_warning`,b.Action.HUE,`onMessage_data_help`),s.forBlock.onMessage_data=function(e){return[e.getFieldValue(`ATTR`),c.ATOMIC]},b.Trigger.blocks.onFile=` FALSE 0_userdata.0 * `,o.onFile={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${x(`onFile`)}`).setCheck(null),this.appendValueInput(`FILE`).appendField(x(`onFile_file`)).setCheck(null),this.appendDummyInput(`WITH_FILE_INPUT`).appendField(x(`onFile_withFile`)).appendField(new i(`FALSE`),`WITH_FILE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onFile_tooltip`)),this.setHelpUrl(S(`onFile_help`))},onchange:function(){d(this)}},s.forBlock.onFile=function(e){let t=s.valueToCode(e,`OID`,c.ATOMIC),n=s.valueToCode(e,`FILE`,c.ATOMIC),r=e.getFieldValue(`WITH_FILE`),i=s.statementToCode(e,`STATEMENT`),a=g(t);return`onFile(${t}${a?` /* ${a} */`:``}, ${n}, ${r===`TRUE`?`true`:`false`}, async (id, fileName, size, data, mimeType) => {\n${i}});\n`},b.Trigger.blocks.onFile_data=` data`,k(`onFile_data`,`📁`,[[x(`onFile_data_data`),`data`],[x(`onFile_data_filename`),`fileName`],[x(`onFile_data_size`),`size`],[x(`onFile_data_mimeType`),`mimeType`],[x(`onFile_data_id`),`id`],[x(`onFile_data_tempFile`),`TEMP_FILE_PATH`]],[`onFile`],`onFile_data_warning`,b.Trigger.HUE),s.forBlock.onFile_data=function(e){let t=e.getFieldValue(`ATTR`);return t===`TEMP_FILE_PATH`?[`createTempFile(fileName, data)`,c.ATOMIC]:[t,c.ATOMIC]},b.Trigger.blocks.offFile=` 0_userdata.0 * `,o.offFile={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${x(`offFile`)}`).setCheck(null),this.appendValueInput(`FILE`).appendField(x(`onFile_file`)).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`offFile_tooltip`)),this.setHelpUrl(S(`offFile_help`))}},s.forBlock.offFile=function(e){let t=s.valueToCode(e,`OID`,c.ATOMIC),n=s.valueToCode(e,`FILE`,c.ATOMIC),r=g(t);return`offFile(${t}${r?` /* ${r} */`:``}, ${n});\n`},b.Trigger.blocks.onLog=` error`,o.onLog={init:function(){this.appendDummyInput(`TEXT`).appendField(`💬 ${x(`onLog`)}`),this.appendDummyInput(`Severity`).appendField(x(`loglevel`)).appendField(new n([[x(`loglevel_error`),`error`],[x(`loglevel_warn`),`warn`],[x(`loglevel_info`),`info`],[x(`loglevel_debug`),`debug`],[x(`loglevel_all`),`*`]]),`Severity`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onLog_tooltip`)),this.setHelpUrl(S(`onLog_help`))},onchange:function(){d(this)}},s.forBlock.onLog=function(e){let t=s.statementToCode(e,`STATEMENT`);return`onLog('${e.getFieldValue(`Severity`)}', async (data) => {\n${t}});\n`},b.Trigger.blocks.onLog_data=` data.message`,k(`onLog_data`,`💬 `,[[x(`onLog_data_message`),`data.message`],[x(`loglevel`),`data.severity`],[x(`onLog_data_from`),`data.from`],[x(`onLog_data_ts`),`data.ts`]],[`onLog`],`onLog_data_warning`,b.Trigger.HUE),s.forBlock.onLog_data=function(e){return[e.getFieldValue(`ATTR`),c.ATOMIC]},b.Trigger.blocks.onEnumMembers=``,o.onEnumMembers={init:function(){this.appendDummyInput().appendField(x(`onEnumMembers`)),this.appendDummyInput(`OID`).appendField(new _(x(`select_id`),`enum`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onEnumMembers_tooltip`)),this.setHelpUrl(S(`onEnumMembers_help`))},onchange:function(){d(this)}},s.forBlock.onEnumMembers=function(e){let t=e.getFieldValue(`OID`),n=s.statementToCode(e,`STATEMENT`),r=p(t);return`onEnumMembers('${t}'${r?` /* ${r} */`:``}, async (obj) => {\n${D()}${n}});\n`}}export{b as install}; \ No newline at end of file diff --git a/admin/assets/blocks_trigger-gwXvuAHV.js b/admin/assets/blocks_trigger-gwXvuAHV.js deleted file mode 100644 index 54e2a2d8..00000000 --- a/admin/assets/blocks_trigger-gwXvuAHV.js +++ /dev/null @@ -1,2 +0,0 @@ -import{c as e,f as t,i as n,o as r,r as i,s as a,t as o}from"./blockly-C4zJerWL.js";import{n as s,t as c}from"./javascript-DVIhlTDr.js";import{a as l,c as u,d,f,o as p,r as m,s as h}from"./helpers-Crmcgphg.js";import{FieldOID as g}from"./field_oid-BGIMv9gw.js";import{FieldCRON as _}from"./field_cron-BMQWPb61.js";function v(e){return s.nameDB_.safeName(e.getFieldValue(`NAME`))}function y(){let y=window.Blockly,b=y.Translate,x=window.getHelp;y.CustomBlocks=y.CustomBlocks||[],y.CustomBlocks.push(`Trigger`);let S=e=>{let t=[];for(let n of e.getAllBlocks())if(n.isSchedule_){let e=n.getFieldValue(`NAME`);t.push([e,e])}if(window.scripts.loading)for(let n of e.getVariableMap().getVariablesOfType(``))t.find(e=>e[0]===n.getName())||t.push([n.getName(),n.getName()]);for(let n of e.getVariableMap().getVariablesOfType(`cron`))t.find(e=>e[0]===n.getName())||t.push([n.getName(),n.getName()]);return t.length||t.push([``,``]),t};y.Trigger={HUE:330,getAllSchedules:S,blocks:{},WARNING_PARENTS:[`on`,`on_ext`,`schedule`,`schedule_by_id`,`schedule_create`,`astro`,`onMessage`,`onFile`,`onLog`,`onEnumMembers`,`timeouts_setinterval`,`timeouts_setinterval_variable`,`controls_repeat_ext`,`controls_repeat_ext`,`controls_for`,`controls_forEach`]};let C=()=>[[b(`on_onchange`),`ne`],[b(`on_any`),`any`],[b(`on_gt`),`gt`],[b(`on_ge`),`ge`],[b(`on_lt`),`lt`],[b(`on_le`),`le`],[b(`on_true`),`true`],[b(`on_false`),`false`]],w=()=>[[b(`on_ack_any`),``],[b(`on_ack_true`),`true`],[b(`on_ack_false`),`false`]],T=e=>e===`true`||e===`false`?`val: ${e}`:`change: '${e}'`,E=()=>`${s.prefixLines(`let value = obj.state.val;`,s.INDENT)}\n${s.prefixLines(`let oldValue = obj.oldState.val;`,s.INDENT)}\n`,D=(e,t,n,r)=>{setTimeout(()=>{var i;if(!((i=t.connection)!=null&&i.isConnected())){let i=e.newBlock(n);i.setShadow(!0),r&&i.setFieldValue(r[1],r[0]),i.outputConnection.connect(t.connection),i.initSvg(),i.render()}},100)},O=(e,t,r,i,a,s,c)=>{o[e]={init:function(){this.appendDummyInput().appendField(t),this.appendDummyInput(`ATTR`).appendField(new n(r),`ATTR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(s),this.setTooltip(b(`${e}_tooltip`)),c&&this.setHelpUrl(x(c))},onchange:function(){f(this,i,a)},FUNCTION_TYPES:i}};y.Trigger.blocks.on_ext=` ne `,o.on_ext_oid_container={init:function(){this.appendDummyInput().appendField(b(`on_ext_on`)),this.appendStatementInput(`STACK`),this.setColour(y.Trigger.HUE),this.setTooltip(b(`on_ext_on_tooltip`)),this.contextMenu=!1}},o.on_ext_oid={init:function(){this.appendDummyInput(`OID`).appendField(b(`on_ext_oid`)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(y.Trigger.HUE),this.setTooltip(b(`on_ext_oid_tooltip`)),this.contextMenu=!1}},o.on_ext={init:function(){this.itemCount_=1,this.setMutator(new t.MutatorIcon([`on_ext_oid`],this)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`on_ext_tooltip`)),this.setHelpUrl(x(`on_help`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute(`items`),10),this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(`on_ext_oid_container`);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t {\n${i.length===1?E():``}${o}});\n`},y.Trigger.blocks.on=` ne `,o.on={init:function(){this.appendDummyInput().appendField(b(`on`)),this.appendDummyInput(`OID`).appendField(new g(b(`select_id`),`state`),`OID`),this.appendDummyInput(`CONDITION`).appendField(new n(C()),`CONDITION`),this.appendDummyInput(`ACK_CONDITION`).appendField(b(`on_ack`)).appendField(new n(w()),`ACK_CONDITION`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`on_tooltip`)),this.setHelpUrl(x(`on_help`))},onchange:function(){d(this)}},s.forBlock.on=function(e){let t=e.getFieldValue(`OID`),n=T(e.getFieldValue(`CONDITION`)),r=e.getFieldValue(`ACK_CONDITION`);a.VARIABLES_DEFAULT_NAME=`value`;let i=l(t),o=s.statementToCode(e,`STATEMENT`);return`on({ id: '${t}'${i?` /* ${i} */`:``}, ${n}${r?`, ack: ${r}`:``} }, async (obj) => {\n${E()}${o}});\n`},y.Trigger.blocks.on_source=` state.val`,O(`on_source`,`↪`,[[b(`on_source_state_val`),`state.val`],[b(`on_source_state_ts`),`state.ts`],[b(`on_source_state_q`),`state.q`],[b(`on_source_state_from`),`state.from`],[b(`on_source_state_ack`),`state.ack`],[b(`on_source_state_lc`),`state.lc`],[b(`on_source_state_c`),`state.c`],[b(`on_source_state_user`),`state.user`],[b(`on_source_id`),`id`],[b(`on_source_name`),`common.name`],[b(`on_source_desc`),`common.desc`],[b(`on_source_channel_id`),`channelId`],[b(`on_source_channel_name`),`channelName`],[b(`on_source_device_id`),`deviceId`],[b(`on_source_device_name`),`deviceName`],[b(`on_source_oldstate_val`),`oldState.val`],[b(`on_source_oldstate_ts`),`oldState.ts`],[b(`on_source_oldstate_q`),`oldState.q`],[b(`on_source_oldstate_from`),`oldState.from`],[b(`on_source_oldstate_ack`),`oldState.ack`],[b(`on_source_oldstate_lc`),`oldState.lc`],[b(`on_source_oldstate_c`),`oldState.c`],[b(`on_source_oldstate_user`),`oldState.user`]],[`on`,`on_ext`,`onEnumMembers`],`on_source_warning`,y.Trigger.HUE,`on_help`),s.forBlock.on_source=function(e){let t=e.getFieldValue(`ATTR`),n=t.split(`.`);return[n.length>1?`(obj.${n[0]} ? obj.${t} : '')`:`obj.${t}`,c.ATOMIC]},y.Trigger.blocks.on_ack_value=``,o.on_ack_value={init:function(){this.appendDummyInput().appendField(`↪ ${b(`on_ack_value`)}`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`on_ack_value_tooltip`)),this.setHelpUrl(x(`on_help`))},onchange:function(){f(this,[`on`,`on_ext`,`onEnumMembers`],`on_ack_value_warning`)},FUNCTION_TYPES:[`on`,`on_ext`,`onEnumMembers`]},s.forBlock.on_ack_value=function(){return`if (obj.id && obj?.state && !obj.state.ack) { -${s.prefixLines(`await setStateAsync(obj.id, { val: obj.state.val, ack: true });`,s.INDENT)}\n}\n`},y.Trigger.blocks.astro=` sunrise 0`,o.astro={init:function(){this.appendDummyInput().appendField(b(`astro`)),this.appendDummyInput(`TYPE`).appendField(new n([[b(`astro_sunriseText`),`sunrise`],[b(`astro_sunriseEndText`),`sunriseEnd`],[b(`astro_goldenHourEndText`),`goldenHourEnd`],[b(`astro_solarNoonText`),`solarNoon`],[b(`astro_goldenHourText`),`goldenHour`],[b(`astro_sunsetStartText`),`sunsetStart`],[b(`astro_sunsetText`),`sunset`],[b(`astro_duskText`),`dusk`],[b(`astro_nauticalDuskText`),`nauticalDusk`],[b(`astro_nightText`),`night`],[b(`astro_nightEndText`),`nightEnd`],[b(`astro_nauticalDawnText`),`nauticalDawn`],[b(`astro_dawnText`),`dawn`],[b(`astro_nadirText`),`nadir`]]),`TYPE`),this.appendDummyInput().appendField(b(`astro_offset`)),this.appendDummyInput(`OFFSET`).appendField(new r(`0`),`OFFSET`),this.appendDummyInput().appendField(b(`astro_minutes`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`astro_tooltip`)),this.setHelpUrl(x(`astro_help`))},onchange:function(){d(this)}},s.forBlock.astro=function(e){return`schedule({ astro: '${e.getFieldValue(`TYPE`)}', shift: ${parseInt(e.getFieldValue(`OFFSET`),10)} }, async () => {\n${s.statementToCode(e,`STATEMENT`)}});\n`},y.Trigger.blocks.schedule=` * * * * *`,o.schedule={init:function(){this.appendDummyInput().appendField(b(`schedule`)),this.appendDummyInput(`SCHEDULE`).appendField(new _(`* * * * *`),`SCHEDULE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`schedule_tooltip`)),this.setHelpUrl(x(`schedule_help`))},onchange:function(){d(this)}},s.forBlock.schedule=function(e){let t=e.getFieldValue(`SCHEDULE`),n=s.statementToCode(e,`STATEMENT`);return`schedule(${t.startsWith(`{`)?`'${t}'`:`"${t}"`}, async () => {\n${n}});\n`},y.Trigger.blocks.schedule_by_id=` `,o.schedule_by_id={init:function(){this.appendDummyInput().appendField(b(`schedule_by_id`)),this.appendDummyInput(`OID`).appendField(new g(b(`select_id`),`state`),`OID`),this.appendDummyInput(`ACK_CONDITION`).appendField(b(`on_ack`)).appendField(new n(w()),`ACK_CONDITION`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`schedule_by_id_tooltip`)),this.setHelpUrl(x(`schedule_by_id_help`))}},s.forBlock.schedule_by_id=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ACK_CONDITION`),r=s.statementToCode(e,`STATEMENT`),i=l(t);return`scheduleById('${t}'${i?` /* ${i} */`:``}${n?`, ${n}`:``}, async () => {\n${r}});\n`},y.Trigger.blocks.schedule_create=` schedule `;let k=(t,n,r)=>{if(t===`schedule`)return!1;for(let i of n.getAllBlocks())if(i!==r&&i.isSchedule_&&e.equals(i.getFieldValue(`NAME`),t))return!1;return!0},A=(e,t)=>{if(t.isInFlyout)return e;for(;!k(e,t.workspace,t);){let t=e.match(/^(.*?)(\d+)$/);t?e=t[1]+(parseInt(t[2],10)+1):e+=`1`}return e},j=function(e){return A(e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,``),this.getSourceBlock())};o.schedule_create={init:function(){let e=new r(A(`schedule`,this),j);e.setSpellcheck(!1),this.appendDummyInput(`NAME`).appendField(b(`schedule_create`)).appendField(e,`NAME`),this.appendValueInput(`SCHEDULE`).appendField(b(`schedule_text`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`schedule_create_tooltip`)),this.setHelpUrl(x(`schedule_create_help`))},isSchedule_:!0,getVars:function(){return[this.getFieldValue(`NAME`)]},getVarModels:function(){let e=this.getFieldValue(`NAME`);return[{getId:()=>e,name:e,type:`cron`}]}},s.forBlock.schedule_create=function(e){return`${v(e)} = schedule(${s.valueToCode(e,`SCHEDULE`,c.ATOMIC)}, async () => {\n${s.statementToCode(e,`STATEMENT`)}});\n`},y.Trigger.blocks.schedule_clear=` `,o.schedule_clear={init:function(){this.appendDummyInput(`NAME`).appendField(b(`schedule_clear`)).appendField(new n(()=>{var e;return(e=window.scripts)!=null&&e.blocklyWorkspace?S(window.scripts.blocklyWorkspace):[]}),`NAME`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`schedule_clear_tooltip`)),this.setHelpUrl(x(`schedule_clear_help`))}},s.forBlock.schedule_clear=function(e){let t=v(e);return`(() => { if (${t}) { clearSchedule(${t}); ${t} = null; }})();\n`},y.Trigger.blocks.field_cron=` * * * * *`,o.field_cron={init:function(){this.appendDummyInput().appendField(b(`field_cron_CRON`)),this.appendDummyInput().appendField(new _(`* * * * *`),`CRON`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(y.Trigger.HUE),this.setTooltip(b(`field_cron_tooltip`))}},s.forBlock.field_cron=function(e){return[`'${e.getFieldValue(`CRON`)}'`,c.ATOMIC]},y.Trigger.blocks.cron_builder=` FALSE FALSE * * * * * `,o.cron_builder={init:function(){this.appendDummyInput().appendField(b(`cron_builder_CRON`)),this.appendDummyInput(`LINE`).appendField(b(`cron_builder_line`)).appendField(new i(`FALSE`,function(e){var t;(t=this.getSourceBlock())==null||t.setInputsInline(m(e))}),`LINE`);let e=this.workspace;for(let[t,n]of[[`DOW`,`cron_builder_dow`],[`MONTHS`,`cron_builder_month`],[`DAYS`,`cron_builder_day`],[`HOURS`,`cron_builder_hour`],[`MINUTES`,`cron_builder_minutes`]]){let r=this.appendValueInput(t).appendField(b(n));D(e,r,`text`,[`TEXT`,`*`])}this.appendDummyInput(`WITH_SECONDS`).appendField(b(`cron_builder_with_seconds`)).appendField(new i(`FALSE`,function(e){this.getSourceBlock().updateShape_(m(e))}),`WITH_SECONDS`),this.seconds_=!1,this.as_line_=!1,this.setInputsInline(this.as_line_),this.setOutput(!0,`String`),this.setColour(y.Trigger.HUE),this.setTooltip(b(`field_cron_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`seconds`,String(this.seconds_)),e.setAttribute(`as_line`,String(this.as_line_)),e},domToMutation:function(e){this.seconds_=e.getAttribute(`seconds`)===`true`,this.as_line_=e.getAttribute(`as_line`)===`true`,this.setInputsInline(this.as_line_),this.updateShape_(this.seconds_)},updateShape_:function(e){if(this.seconds_=e,e){if(!this.getInput(`SECONDS`)){let e=this.appendValueInput(`SECONDS`).appendField(b(`cron_builder_seconds`));D(this.workspace,e,`text`,[`TEXT`,`*`])}}else this.getInput(`SECONDS`)&&this.removeInput(`SECONDS`)}},s.forBlock.cron_builder=function(e){let t=t=>s.valueToCode(e,t,c.ATOMIC),n=e.getFieldValue(`WITH_SECONDS`),r=n&&e.getInput(`SECONDS`)?t(`SECONDS`):`0`;return[(m(n)?`${r}.toString().trim() + ' ' + `:``)+`${t(`MINUTES`)}.toString().trim() + ' ' + ${t(`HOURS`)}.toString().trim() + ' ' + ${t(`DAYS`)}.toString().trim() + ' ' + ${t(`MONTHS`)}.toString().trim() + ' ' + ${t(`DOW`)}.toString().trim()`,c.ATOMIC]},y.Trigger.blocks.onMessage=` customMessage`,o.onMessage={init:function(){this.appendDummyInput(`NAME`).appendField(`✉️ ${b(`onMessage`)}`),this.appendDummyInput(`MESSAGE`).appendField(b(`onMessage_message`)).appendField(new r(`customMessage`),`MESSAGE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`onMessage_tooltip`)),this.setHelpUrl(x(`onMessage_help`))},onchange:function(){d(this)}},s.forBlock.onMessage=function(e){let t=e.getFieldValue(`MESSAGE`),n=s.statementToCode(e,`STATEMENT`);return`onMessage(${h(t)}, async (data, callback) => {\n${n}${s.prefixLines(`typeof callback === 'function' && callback({ result: true }); // default callback`,s.INDENT)}\n});\n`},y.Trigger.blocks.onMessage_data=` data`,O(`onMessage_data`,`✉️ `,[[b(`onMessage_data_data`),`data`]],[`onMessage`],`onMessage_data_warning`,y.Action.HUE,`onMessage_data_help`),s.forBlock.onMessage_data=function(e){return[e.getFieldValue(`ATTR`),c.ATOMIC]},y.Trigger.blocks.onFile=` FALSE 0_userdata.0 * `,o.onFile={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${b(`onFile`)}`).setCheck(null),this.appendValueInput(`FILE`).appendField(b(`onFile_file`)).setCheck(null),this.appendDummyInput(`WITH_FILE_INPUT`).appendField(b(`onFile_withFile`)).appendField(new i(`FALSE`),`WITH_FILE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`onFile_tooltip`)),this.setHelpUrl(x(`onFile_help`))},onchange:function(){d(this)}},s.forBlock.onFile=function(e){let t=s.valueToCode(e,`OID`,c.ATOMIC),n=s.valueToCode(e,`FILE`,c.ATOMIC),r=e.getFieldValue(`WITH_FILE`),i=s.statementToCode(e,`STATEMENT`),a=p(t);return`onFile(${t}${a?` /* ${a} */`:``}, ${n}, ${r===`TRUE`?`true`:`false`}, async (id, fileName, size, data, mimeType) => {\n${i}});\n`},y.Trigger.blocks.onFile_data=` data`,O(`onFile_data`,`📁`,[[b(`onFile_data_data`),`data`],[b(`onFile_data_filename`),`fileName`],[b(`onFile_data_size`),`size`],[b(`onFile_data_mimeType`),`mimeType`],[b(`onFile_data_id`),`id`],[b(`onFile_data_tempFile`),`TEMP_FILE_PATH`]],[`onFile`],`onFile_data_warning`,y.Trigger.HUE),s.forBlock.onFile_data=function(e){let t=e.getFieldValue(`ATTR`);return t===`TEMP_FILE_PATH`?[`createTempFile(fileName, data)`,c.ATOMIC]:[t,c.ATOMIC]},y.Trigger.blocks.offFile=` 0_userdata.0 * `,o.offFile={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${b(`offFile`)}`).setCheck(null),this.appendValueInput(`FILE`).appendField(b(`onFile_file`)).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`offFile_tooltip`)),this.setHelpUrl(x(`offFile_help`))}},s.forBlock.offFile=function(e){let t=s.valueToCode(e,`OID`,c.ATOMIC),n=s.valueToCode(e,`FILE`,c.ATOMIC),r=p(t);return`offFile(${t}${r?` /* ${r} */`:``}, ${n});\n`},y.Trigger.blocks.onLog=` error`,o.onLog={init:function(){this.appendDummyInput(`TEXT`).appendField(`💬 ${b(`onLog`)}`),this.appendDummyInput(`Severity`).appendField(b(`loglevel`)).appendField(new n([[b(`loglevel_error`),`error`],[b(`loglevel_warn`),`warn`],[b(`loglevel_info`),`info`],[b(`loglevel_debug`),`debug`],[b(`loglevel_all`),`*`]]),`Severity`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`onLog_tooltip`)),this.setHelpUrl(x(`onLog_help`))},onchange:function(){d(this)}},s.forBlock.onLog=function(e){let t=s.statementToCode(e,`STATEMENT`);return`onLog('${e.getFieldValue(`Severity`)}', async (data) => {\n${t}});\n`},y.Trigger.blocks.onLog_data=` data.message`,O(`onLog_data`,`💬 `,[[b(`onLog_data_message`),`data.message`],[b(`loglevel`),`data.severity`],[b(`onLog_data_from`),`data.from`],[b(`onLog_data_ts`),`data.ts`]],[`onLog`],`onLog_data_warning`,y.Trigger.HUE),s.forBlock.onLog_data=function(e){return[e.getFieldValue(`ATTR`),c.ATOMIC]},y.Trigger.blocks.onEnumMembers=``,o.onEnumMembers={init:function(){this.appendDummyInput().appendField(b(`onEnumMembers`)),this.appendDummyInput(`OID`).appendField(new g(b(`select_id`),`enum`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(y.Trigger.HUE),this.setTooltip(b(`onEnumMembers_tooltip`)),this.setHelpUrl(x(`onEnumMembers_help`))},onchange:function(){d(this)}},s.forBlock.onEnumMembers=function(e){let t=e.getFieldValue(`OID`),n=s.statementToCode(e,`STATEMENT`),r=l(t);return`onEnumMembers('${t}'${r?` /* ${r} */`:``}, async (obj) => {\n${E()}${n}});\n`}}export{y as install}; \ No newline at end of file diff --git a/admin/assets/helpers-Crmcgphg.js b/admin/assets/helpers-C_OEphYI.js similarity index 86% rename from admin/assets/helpers-Crmcgphg.js rename to admin/assets/helpers-C_OEphYI.js index 2a44f8e3..c10c25fc 100644 --- a/admin/assets/helpers-Crmcgphg.js +++ b/admin/assets/helpers-C_OEphYI.js @@ -1 +1 @@ -import{n as javascriptGenerator}from"./javascript-DVIhlTDr.js";function reconnectChild(e,t,n){var r;if(!(e!=null&&e.getSourceBlock().workspace))return!1;let i=(r=t.getInput(n))==null?void 0:r.connection;if(!i)return!1;let a=e.targetBlock();return(!a||a===t)&&i.targetConnection!==e&&(i.isConnected()&&i.disconnect(),i.connect(e),!0)}function quote(e){return javascriptGenerator.quote_(e)}function dateFormat(e){return window.Blockly.Words[e].format}function dateFormatOptions(){let e=window.Blockly.Translate,t=[`object`,`ms`,`s`,`sid`,`m`,`mid`,`h`,`d`,`M`,`Mt`,`Mts`,`y`,`fy`,`wdt`,`wdts`,`wd`,`cw`,`custom`],n=[`time_get_yyyy.mm.dd`,`time_get_yyyy/mm/dd`,`time_get_yy.mm.dd`,`time_get_yy/mm/dd`,`time_get_dd.mm.yyyy`,`time_get_dd/mm/yyyy`,`time_get_dd.mm.yy`,`time_get_dd/mm/yy`,`time_get_mm/dd/yyyy`,`time_get_mm/dd/yy`,`time_get_dd.mm`,`time_get_dd/mm`,`time_get_mm.dd`,`time_get_mm/dd`,`time_get_hh_mm`,`time_get_hh_mm_ss`,`time_get_hh_mm_ss.sss`];return[...t.map(t=>[e(`time_get_${t}`),t]),...n.map(t=>[e(t),dateFormat(t)])]}function dateLanguageOptions(){let e=[`in english`,`en`],t=[`auf deutsch`,`de`],n=[`на русском`,`ru`];return window.systemLang===`de`?[t,e,n]:window.systemLang===`ru`?[n,e,t]:[e,t,n]}function isTrue(e){return e===!0||e===`true`||e===`TRUE`}function logLevelOptions(){let e=window.Blockly.Translate;return[[e(`loglevel_none`),``],[e(`loglevel_debug`),`debug`],[e(`loglevel_info`),`info`],[e(`loglevel_warn`),`warn`],[e(`loglevel_error`),`error`]]}function updateStatementInput(e,t){let n=t===void 0?isTrue(e.getFieldValue(`WITH_STATEMENT`)):t;e.getInput(`STATEMENT`)&&e.removeInput(`STATEMENT`),n&&e.appendStatementInput(`STATEMENT`)}function warnIfNotNestedIn(e,t,n){let r=!1,i=e;do{if(t.includes(i.type)){r=!0;break}i=i.getSurroundParent()}while(i);e.setWarningText(r?null:window.Blockly.Translate(n),e.id)}function objectNameOf(code){try{var _window$main;const objId=eval(code);let name=((_window$main=window.main)==null||(_window$main=_window$main.objects[objId])==null||(_window$main=_window$main.common)==null?void 0:_window$main.name)||``;return typeof name==`object`&&(name=name[window.systemLang]||name.en),name||``}catch{return``}}function toMilliseconds(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function objectNameById(e){var t;let n=((t=window.main)==null||(t=t.objects[e])==null||(t=t.common)==null?void 0:t.name)||``;return typeof n==`object`&&(n=n[window.systemLang]||n.en),n||``}function warnIfInsideTrigger(e){let t=e.getSurroundParent();for(;t;){if(window.Blockly.Trigger.WARNING_PARENTS.includes(t.type)){e.setWarningText(window.Blockly.Translate(`trigger_in_trigger_warning`),e.id);return}t=t.getSurroundParent()}e.setWarningText(null,e.id)}export{objectNameById as a,reconnectChild as c,warnIfInsideTrigger as d,warnIfNotNestedIn as f,logLevelOptions as i,toMilliseconds as l,dateLanguageOptions as n,objectNameOf as o,isTrue as r,quote as s,dateFormatOptions as t,updateStatementInput as u}; \ No newline at end of file +import{n as javascriptGenerator}from"./javascript-DVIhlTDr.js";function reconnectChild(e,t,n){var r;if(!(e!=null&&e.getSourceBlock().workspace))return!1;let i=(r=t.getInput(n))==null?void 0:r.connection;if(!i)return!1;let a=e.targetBlock();return(!a||a===t)&&i.targetConnection!==e&&(i.isConnected()&&i.disconnect(),i.connect(e),!0)}function quote(e){return javascriptGenerator.quote_(e)}function dateFormat(e){return window.Blockly.Words[e].format}function dateFormatOptions(){let e=window.Blockly.Translate,t=[`object`,`ms`,`s`,`sid`,`m`,`mid`,`h`,`d`,`M`,`Mt`,`Mts`,`y`,`fy`,`wdt`,`wdts`,`wd`,`cw`,`custom`],n=[`time_get_yyyy.mm.dd`,`time_get_yyyy/mm/dd`,`time_get_yy.mm.dd`,`time_get_yy/mm/dd`,`time_get_dd.mm.yyyy`,`time_get_dd/mm/yyyy`,`time_get_dd.mm.yy`,`time_get_dd/mm/yy`,`time_get_mm/dd/yyyy`,`time_get_mm/dd/yy`,`time_get_dd.mm`,`time_get_dd/mm`,`time_get_mm.dd`,`time_get_mm/dd`,`time_get_hh_mm`,`time_get_hh_mm_ss`,`time_get_hh_mm_ss.sss`];return[...t.map(t=>[e(`time_get_${t}`),t]),...n.map(t=>[e(t),dateFormat(t)])]}function dateLanguageOptions(){let e=[`in english`,`en`],t=[`auf deutsch`,`de`],n=[`на русском`,`ru`];return window.systemLang===`de`?[t,e,n]:window.systemLang===`ru`?[n,e,t]:[e,t,n]}function isTrue(e){return e===!0||e===`true`||e===`TRUE`}function logLevelOptions(){let e=window.Blockly.Translate;return[[e(`loglevel_none`),``],[e(`loglevel_debug`),`debug`],[e(`loglevel_info`),`info`],[e(`loglevel_warn`),`warn`],[e(`loglevel_error`),`error`]]}function updateStatementInput(e,t){let n=t===void 0?isTrue(e.getFieldValue(`WITH_STATEMENT`)):t;e.getInput(`STATEMENT`)&&e.removeInput(`STATEMENT`),n&&e.appendStatementInput(`STATEMENT`)}function warnIfNotNestedIn(e,t,n){let r=!1,i=e;do{if(t.includes(i.type)){r=!0;break}i=i.getSurroundParent()}while(i);e.setWarningText(r?null:window.Blockly.Translate(n),e.id)}function objectNameOf(code){try{var _window$main;const objId=eval(code);let name=((_window$main=window.main)==null||(_window$main=_window$main.objects[objId])==null||(_window$main=_window$main.common)==null?void 0:_window$main.name)||``;return typeof name==`object`&&(name=name[window.systemLang]||name.en),name||``}catch{return``}}function toMilliseconds(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function objectNameById(e){var t;let n=((t=window.main)==null||(t=t.objects[e])==null||(t=t.common)==null?void 0:t.name)||``;return typeof n==`object`&&(n=n[window.systemLang]||n.en),n||``}function warnIfInsideTrigger(e){let t=e.getSurroundParent();for(;t;){if(window.Blockly.Trigger.WARNING_PARENTS.includes(t.type)){e.setWarningText(window.Blockly.Translate(`trigger_in_trigger_warning`),e.id);return}t=t.getSurroundParent()}e.setWarningText(null,e.id)}function namedResourceVariableModel(e,t){return{getId:()=>e,getName:()=>e,getType:()=>t,name:e,type:t}}export{namedResourceVariableModel as a,quote as c,updateStatementInput as d,warnIfInsideTrigger as f,logLevelOptions as i,reconnectChild as l,dateLanguageOptions as n,objectNameById as o,warnIfNotNestedIn as p,isTrue as r,objectNameOf as s,dateFormatOptions as t,toMilliseconds as u}; \ No newline at end of file diff --git a/admin/assets/index-BvPVHv3P.js b/admin/assets/index-DbCN84MR.js similarity index 99% rename from admin/assets/index-BvPVHv3P.js rename to admin/assets/index-DbCN84MR.js index 3e94b9c1..671fba00 100644 --- a/admin/assets/index-BvPVHv3P.js +++ b/admin/assets/index-DbCN84MR.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BlocklyEditor-BB77aFJI.js","./Import-B-F9IhZ-.js","./Error-CBC2oZzb.js","./blockly-C4zJerWL.js","./javascript-DVIhlTDr.js","./blocklyDarkTheme-DEiAX5DT.js","./RulesEditor-ByjgEaVo.js","./ContextWrapper-W2H0z6zD.js","./Send-CChqR5Oy.js","./ContextWrapper-C2yvd2Tn.css","./RulesEditor-k-DMHotH.css","./Debugger-DCMWjeGm.js","./mjs-Bh7xFIpd.js","./ScriptEditorVanillaMonaco-v12-gORS.js","./aiCodeLensProvider-BGvIu6hH.js","./ScriptEditor-CMYUt5S4.js","./AiChatPanel-C4kuqP2U.js","./AiScriptAnalyzer--BHML2rN.js","./aiPromptBuilder-Bs27qOHT.js","./AiDiffView-zJTEnv05.js"])))=>i.map(i=>d[i]); -import{i as e,o as t,r as n,t as r}from"./rolldown-runtime-C0FnF6B9.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-DYEYnOkt.js";import{$t as a,A as o,At as s,B as c,Bn as l,Bt as u,Cr as d,Ct as f,D as p,Dt as m,E as h,En as g,F as _,Ft as v,G as y,Gn as b,Gt as x,H as S,Hn as C,Ht as w,In as T,It as E,J as D,Jn as O,Jt as k,K as A,Kn as j,Kt as M,L as N,Ln as P,Lt as F,M as I,Mn as L,Mt as R,N as z,Nn as B,Nt as ee,O as te,On as ne,Ot as re,P as ie,Pt as ae,Q as oe,Qn as se,Qt as ce,R as le,Rn as ue,Rt as de,S as fe,Sn as pe,St as me,Tn as he,U as ge,Un as V,Ut as _e,V as ve,Vn as ye,W as be,Wt as xe,X as Se,Xn as Ce,Y as we,Z as Te,_n as Ee,_t as De,an as Oe,ar as ke,at as Ae,bn as je,br as Me,bt as Ne,c as Pe,cn as Fe,ct as Ie,d as Le,dn as Re,dr as ze,en as Be,et as Ve,f as H,g as He,gn as Ue,gr as We,gt as Ge,h as Ke,hn as qe,hr as Je,ht as Ye,in as Xe,ir as Ze,it as Qe,jt as $e,k as et,kt as tt,lr as nt,mn as rt,mr as it,mt as at,n as ot,nt as st,o as ct,or as lt,ot as ut,p as dt,pn as U,pr as ft,q as pt,qn as W,qt as mt,r as ht,rn as gt,rt as _t,s as vt,sr as yt,t as bt,tn as xt,tr as G,tt as St,ur as Ct,vn as wt,vr as Tt,wn as Et,x as Dt,xn as Ot,xr as kt,xt as At,y as jt,yn as Mt,yr as Nt,yt as Pt,zn as Ft}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js";import{t as It}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js";import{n as Lt,t as Rt}from"./mjs-Bh7xFIpd.js";import{_ as zt,a as Bt,c as Vt,d as Ht,g as Ut,h as Wt,l as Gt,m as K,t as Kt,u as qt}from"./ContextWrapper-W2H0z6zD.js";import{t as Jt}from"./Error-CBC2oZzb.js";import{i as Yt}from"./AiScriptAnalyzer--BHML2rN.js";import{n as Xt}from"./aiCodeLensProvider-BGvIu6hH.js";import{t as Zt}from"./BlocklyEditor-BB77aFJI.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d();var Qt=P(W(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),$t=P(W(`path`,{d:`M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z`}),`FormatClear`),en=P(W(`path`,{d:`M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z`}),`Input`),tn=P(W(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z`}),`Lock`),nn=P(W(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreVert`),rn=P(W(`path`,{d:`M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5`}),`Palette`),an=P(W(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`}),`Search`),on=P(W(`path`,{d:`M16 17.01V10h-2v7.01h-3L15 21l4-3.99zM9 3 5 6.99h3V14h2V6.99h3z`}),`SwapVert`),sn=P(W(`path`,{d:`M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z`}),`UnfoldLess`),cn=P(W(`path`,{d:`M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z`}),`UnfoldMore`);function ln(e){"@babel/helpers - typeof";return ln=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ln(e)}function un(e,t){if(ln(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ln(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dn(e){var t=un(e,`string`);return ln(t)==`symbol`?t:t+``}function fn(e,t,n){return(t=dn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var mn=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),hn=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},gn={INIT:`@@redux/INIT`+hn(),REPLACE:`@@redux/REPLACE`+hn(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+hn()}};function _n(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function vn(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(pn(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(pn(1));return n(vn)(e,t)}if(typeof e!=`function`)throw Error(pn(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(pn(3));return a}function d(e){if(typeof e!=`function`)throw Error(pn(4));if(c)throw Error(pn(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(pn(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!_n(e))throw Error(pn(7));if(e.type===void 0)throw Error(pn(8));if(c)throw Error(pn(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;ne&&e[t]?e[t]:n||null,e)}function bn(e,t){return e.filter(e=>e!==t)}function xn(e){return typeof e==`object`}function Sn(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function Cn(e,t){return e.filter(e=>t.indexOf(e)>-1)}var wn=`dnd-core/INIT_COORDS`,Tn=`dnd-core/BEGIN_DRAG`,En=`dnd-core/PUBLISH_DRAG_SOURCE`,Dn=`dnd-core/HOVER`,On=`dnd-core/DROP`,kn=`dnd-core/END_DRAG`;function An(e,t){return{type:wn,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var jn={type:wn,payload:{clientOffset:null,sourceClientOffset:null}};function Mn(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(An(i)),Nn(t,o,s);let c=In(t,o);if(c==null){e.dispatch(jn);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Pn(a),l=a(c)}e.dispatch(An(i,l));let u=s.getSource(c).beginDrag(o,c);return u==null?void 0:(Fn(u),s.pinSource(c),{type:Tn,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}})}}function Nn(e,t,n){K(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){K(n.getSource(e),`Expected sourceIds to be registered.`)})}function Pn(e){K(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Fn(e){K(xn(e),`Item must be an object.`)}function In(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rn(e){for(var t=1;t{let o={type:On,payload:{dropResult:Rn({},t,Vn(i,a,r,n))}};e.dispatch(o)})}}function Bn(e){K(e.isDragging(),`Cannot call drop while not dragging.`),K(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function Vn(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Hn(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Hn(e){K(e===void 0||xn(e),`Drop result must either be an object or undefined.`)}function Un(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Wn(e){return function(){let t=e.getMonitor(),n=e.getRegistry();Gn(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:kn}}}function Gn(e){K(e.isDragging(),`Cannot call endDrag while not dragging.`)}function Kn(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function qn(e){return function(t,{clientOffset:n}={}){Jn(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return Xn(r,a,i.getItemType()),Yn(r,i,a),Zn(r,i,a),{type:Dn,payload:{targetIds:r,clientOffset:n||null}}}}function Jn(e){K(Array.isArray(e),`Expected targetIds to be an array.`)}function Yn(e,t,n){K(t.isDragging(),`Cannot call hover while not dragging.`),K(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t=0;r--){let i=e[r];Kn(t.getTargetType(i),n)||e.splice(r,1)}}function Zn(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function Qn(e){return function(){if(e.getMonitor().isDragging())return{type:En}}}function $n(e){return{beginDrag:Mn(e),publishDragSource:Qn(e),hover:qn(e),drop:zn(e),endDrag:Wn(e)}}var er=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=$n(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function tr(e,t){return{x:e.x+t.x,y:e.y+t.y}}function nr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rr(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:nr(tr(t,r),n)}function ir(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:nr(t,n)}var ar=[],or=[];ar.__IS_NONE__=!0,or.__IS_ALL__=!0;function sr(e,t){return e===ar?!1:e===or||t===void 0||Cn(t,e).length>0}var cr=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;K(typeof e==`function`,`listener must be a function.`),K(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!sr(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){K(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return K(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return K(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:Kn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return K(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Kn(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rr(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ir(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},lr=typeof global<`u`?global:self,ur=lr.MutationObserver||lr.WebKitMutationObserver;function dr(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function fr(e){let t=1,n=new ur(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var pr=typeof ur==`function`?fr:dr,mr=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,n=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=pr(this.flush),this.requestErrorThrow=dr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},hr=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},gr=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new hr(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},_r=new mr,vr=new gr(_r.registerPendingError);function yr(e){_r.enqueueTask(vr.create(e))}var br=`dnd-core/ADD_SOURCE`,xr=`dnd-core/ADD_TARGET`,Sr=`dnd-core/REMOVE_SOURCE`,Cr=`dnd-core/REMOVE_TARGET`;function wr(e){return{type:br,payload:{sourceId:e}}}function Tr(e){return{type:xr,payload:{targetId:e}}}function Er(e){return{type:Sr,payload:{sourceId:e}}}function Dr(e){return{type:Cr,payload:{targetId:e}}}function Or(e){K(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),K(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),K(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function kr(e){K(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),K(typeof e.hover==`function`,`Expected hover to be a function.`),K(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function Ar(e,t){if(t&&Array.isArray(e)){e.forEach(e=>Ar(e,!1));return}K(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var jr;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(jr||={});var Mr=0;function Nr(){return Mr++}function Pr(e){let t=Nr().toString();switch(e){case jr.SOURCE:return`S${t}`;case jr.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Fr(e){switch(e[0]){case`S`:return jr.SOURCE;case`T`:return jr.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Ir(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Lr=class{addSource(e,t){Ar(e),Or(t);let n=this.addHandler(jr.SOURCE,e,t);return this.store.dispatch(wr(n)),n}addTarget(e,t){Ar(e,!0),kr(t);let n=this.addHandler(jr.TARGET,e,t);return this.store.dispatch(Tr(n)),n}containsHandler(e){return Ir(this.dragSources,e)||Ir(this.dropTargets,e)}getSource(e,t=!1){return K(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return K(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return K(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return K(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Fr(e)===jr.SOURCE}isTargetId(e){return Fr(e)===jr.TARGET}removeSource(e){K(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Er(e)),yr(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){K(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Dr(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);K(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){K(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=Pr(e);return this.types.set(r,t),e===jr.SOURCE?this.dragSources.set(r,n):e===jr.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Rr=(e,t)=>e===t;function zr(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Br(e,t,n=Rr){if(e.length!==t.length)return!1;for(let r=0;r0||!Br(n,r)))return ar;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ur(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ii(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var ai=0,oi=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),si=nt(function(e){var{children:t}=e;let[n,r]=ci(ri(e,[`children`]));return ft(()=>{if(r){let e=ui();return++ai,()=>{--ai===0&&(e[oi]=null)}}},[]),W(Wt.Provider,{value:n,children:t})});function ci(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[li(e.backend,e.context,e.options,e.debugMode),!e.context]}function li(e,t=ui(),n,r){let i=t;return i[oi]||(i[oi]={dragDropManager:ti(e,t,n,r)}),i[oi]}function ui(){return typeof global<`u`?global:window}function di(e){let t=null;return()=>(t??=e(),t)}function fi(e,t){return e.filter(e=>e!==t)}function pi(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var mi=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=pi(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=fi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},hi=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},gi=n({FILE:()=>_i,HTML:()=>bi,TEXT:()=>yi,URL:()=>vi}),_i=`__NATIVE_FILE__`,vi=`__NATIVE_URL__`,yi=`__NATIVE_TEXT__`,bi=`__NATIVE_HTML__`;function xi(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}var Si={[_i]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[bi]:{exposeProperties:{html:(e,t)=>xi(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[vi]:{exposeProperties:{urls:(e,t)=>xi(e,t,``).split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BlocklyEditor-fPxUbzlK.js","./Import-B-F9IhZ-.js","./Error-CBC2oZzb.js","./blockly-C4zJerWL.js","./javascript-DVIhlTDr.js","./blocklyDarkTheme-DEiAX5DT.js","./RulesEditor-ByjgEaVo.js","./ContextWrapper-W2H0z6zD.js","./Send-CChqR5Oy.js","./ContextWrapper-C2yvd2Tn.css","./RulesEditor-k-DMHotH.css","./Debugger-DCMWjeGm.js","./mjs-Bh7xFIpd.js","./ScriptEditorVanillaMonaco-v12-gORS.js","./aiCodeLensProvider-BGvIu6hH.js","./ScriptEditor-CMYUt5S4.js","./AiChatPanel-C4kuqP2U.js","./AiScriptAnalyzer--BHML2rN.js","./aiPromptBuilder-Bs27qOHT.js","./AiDiffView-zJTEnv05.js"])))=>i.map(i=>d[i]); +import{i as e,o as t,r as n,t as r}from"./rolldown-runtime-C0FnF6B9.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-DYEYnOkt.js";import{$t as a,A as o,At as s,B as c,Bn as l,Bt as u,Cr as d,Ct as f,D as p,Dt as m,E as h,En as g,F as _,Ft as v,G as y,Gn as b,Gt as x,H as S,Hn as C,Ht as w,In as T,It as E,J as D,Jn as O,Jt as k,K as A,Kn as j,Kt as M,L as N,Ln as P,Lt as F,M as I,Mn as L,Mt as R,N as z,Nn as B,Nt as ee,O as te,On as ne,Ot as re,P as ie,Pt as ae,Q as oe,Qn as se,Qt as ce,R as le,Rn as ue,Rt as de,S as fe,Sn as pe,St as me,Tn as he,U as ge,Un as V,Ut as _e,V as ve,Vn as ye,W as be,Wt as xe,X as Se,Xn as Ce,Y as we,Z as Te,_n as Ee,_t as De,an as Oe,ar as ke,at as Ae,bn as je,br as Me,bt as Ne,c as Pe,cn as Fe,ct as Ie,d as Le,dn as Re,dr as ze,en as Be,et as Ve,f as H,g as He,gn as Ue,gr as We,gt as Ge,h as Ke,hn as qe,hr as Je,ht as Ye,in as Xe,ir as Ze,it as Qe,jt as $e,k as et,kt as tt,lr as nt,mn as rt,mr as it,mt as at,n as ot,nt as st,o as ct,or as lt,ot as ut,p as dt,pn as U,pr as ft,q as pt,qn as W,qt as mt,r as ht,rn as gt,rt as _t,s as vt,sr as yt,t as bt,tn as xt,tr as G,tt as St,ur as Ct,vn as wt,vr as Tt,wn as Et,x as Dt,xn as Ot,xr as kt,xt as At,y as jt,yn as Mt,yr as Nt,yt as Pt,zn as Ft}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js";import{t as It}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js";import{n as Lt,t as Rt}from"./mjs-Bh7xFIpd.js";import{_ as zt,a as Bt,c as Vt,d as Ht,g as Ut,h as Wt,l as Gt,m as K,t as Kt,u as qt}from"./ContextWrapper-W2H0z6zD.js";import{t as Jt}from"./Error-CBC2oZzb.js";import{i as Yt}from"./AiScriptAnalyzer--BHML2rN.js";import{n as Xt}from"./aiCodeLensProvider-BGvIu6hH.js";import{t as Zt}from"./BlocklyEditor-fPxUbzlK.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d();var Qt=P(W(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),$t=P(W(`path`,{d:`M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z`}),`FormatClear`),en=P(W(`path`,{d:`M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z`}),`Input`),tn=P(W(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z`}),`Lock`),nn=P(W(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreVert`),rn=P(W(`path`,{d:`M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5`}),`Palette`),an=P(W(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`}),`Search`),on=P(W(`path`,{d:`M16 17.01V10h-2v7.01h-3L15 21l4-3.99zM9 3 5 6.99h3V14h2V6.99h3z`}),`SwapVert`),sn=P(W(`path`,{d:`M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z`}),`UnfoldLess`),cn=P(W(`path`,{d:`M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z`}),`UnfoldMore`);function ln(e){"@babel/helpers - typeof";return ln=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ln(e)}function un(e,t){if(ln(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ln(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dn(e){var t=un(e,`string`);return ln(t)==`symbol`?t:t+``}function fn(e,t,n){return(t=dn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var mn=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),hn=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},gn={INIT:`@@redux/INIT`+hn(),REPLACE:`@@redux/REPLACE`+hn(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+hn()}};function _n(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function vn(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(pn(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(pn(1));return n(vn)(e,t)}if(typeof e!=`function`)throw Error(pn(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(pn(3));return a}function d(e){if(typeof e!=`function`)throw Error(pn(4));if(c)throw Error(pn(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(pn(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!_n(e))throw Error(pn(7));if(e.type===void 0)throw Error(pn(8));if(c)throw Error(pn(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;ne&&e[t]?e[t]:n||null,e)}function bn(e,t){return e.filter(e=>e!==t)}function xn(e){return typeof e==`object`}function Sn(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function Cn(e,t){return e.filter(e=>t.indexOf(e)>-1)}var wn=`dnd-core/INIT_COORDS`,Tn=`dnd-core/BEGIN_DRAG`,En=`dnd-core/PUBLISH_DRAG_SOURCE`,Dn=`dnd-core/HOVER`,On=`dnd-core/DROP`,kn=`dnd-core/END_DRAG`;function An(e,t){return{type:wn,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var jn={type:wn,payload:{clientOffset:null,sourceClientOffset:null}};function Mn(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(An(i)),Nn(t,o,s);let c=In(t,o);if(c==null){e.dispatch(jn);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Pn(a),l=a(c)}e.dispatch(An(i,l));let u=s.getSource(c).beginDrag(o,c);return u==null?void 0:(Fn(u),s.pinSource(c),{type:Tn,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}})}}function Nn(e,t,n){K(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){K(n.getSource(e),`Expected sourceIds to be registered.`)})}function Pn(e){K(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Fn(e){K(xn(e),`Item must be an object.`)}function In(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rn(e){for(var t=1;t{let o={type:On,payload:{dropResult:Rn({},t,Vn(i,a,r,n))}};e.dispatch(o)})}}function Bn(e){K(e.isDragging(),`Cannot call drop while not dragging.`),K(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function Vn(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Hn(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Hn(e){K(e===void 0||xn(e),`Drop result must either be an object or undefined.`)}function Un(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Wn(e){return function(){let t=e.getMonitor(),n=e.getRegistry();Gn(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:kn}}}function Gn(e){K(e.isDragging(),`Cannot call endDrag while not dragging.`)}function Kn(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function qn(e){return function(t,{clientOffset:n}={}){Jn(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return Xn(r,a,i.getItemType()),Yn(r,i,a),Zn(r,i,a),{type:Dn,payload:{targetIds:r,clientOffset:n||null}}}}function Jn(e){K(Array.isArray(e),`Expected targetIds to be an array.`)}function Yn(e,t,n){K(t.isDragging(),`Cannot call hover while not dragging.`),K(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t=0;r--){let i=e[r];Kn(t.getTargetType(i),n)||e.splice(r,1)}}function Zn(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function Qn(e){return function(){if(e.getMonitor().isDragging())return{type:En}}}function $n(e){return{beginDrag:Mn(e),publishDragSource:Qn(e),hover:qn(e),drop:zn(e),endDrag:Wn(e)}}var er=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=$n(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function tr(e,t){return{x:e.x+t.x,y:e.y+t.y}}function nr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rr(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:nr(tr(t,r),n)}function ir(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:nr(t,n)}var ar=[],or=[];ar.__IS_NONE__=!0,or.__IS_ALL__=!0;function sr(e,t){return e===ar?!1:e===or||t===void 0||Cn(t,e).length>0}var cr=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;K(typeof e==`function`,`listener must be a function.`),K(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!sr(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){K(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return K(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return K(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:Kn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return K(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Kn(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rr(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ir(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},lr=typeof global<`u`?global:self,ur=lr.MutationObserver||lr.WebKitMutationObserver;function dr(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function fr(e){let t=1,n=new ur(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var pr=typeof ur==`function`?fr:dr,mr=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,n=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=pr(this.flush),this.requestErrorThrow=dr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},hr=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},gr=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new hr(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},_r=new mr,vr=new gr(_r.registerPendingError);function yr(e){_r.enqueueTask(vr.create(e))}var br=`dnd-core/ADD_SOURCE`,xr=`dnd-core/ADD_TARGET`,Sr=`dnd-core/REMOVE_SOURCE`,Cr=`dnd-core/REMOVE_TARGET`;function wr(e){return{type:br,payload:{sourceId:e}}}function Tr(e){return{type:xr,payload:{targetId:e}}}function Er(e){return{type:Sr,payload:{sourceId:e}}}function Dr(e){return{type:Cr,payload:{targetId:e}}}function Or(e){K(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),K(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),K(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function kr(e){K(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),K(typeof e.hover==`function`,`Expected hover to be a function.`),K(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function Ar(e,t){if(t&&Array.isArray(e)){e.forEach(e=>Ar(e,!1));return}K(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var jr;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(jr||={});var Mr=0;function Nr(){return Mr++}function Pr(e){let t=Nr().toString();switch(e){case jr.SOURCE:return`S${t}`;case jr.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Fr(e){switch(e[0]){case`S`:return jr.SOURCE;case`T`:return jr.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Ir(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Lr=class{addSource(e,t){Ar(e),Or(t);let n=this.addHandler(jr.SOURCE,e,t);return this.store.dispatch(wr(n)),n}addTarget(e,t){Ar(e,!0),kr(t);let n=this.addHandler(jr.TARGET,e,t);return this.store.dispatch(Tr(n)),n}containsHandler(e){return Ir(this.dragSources,e)||Ir(this.dropTargets,e)}getSource(e,t=!1){return K(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return K(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return K(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return K(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Fr(e)===jr.SOURCE}isTargetId(e){return Fr(e)===jr.TARGET}removeSource(e){K(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Er(e)),yr(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){K(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Dr(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);K(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){K(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=Pr(e);return this.types.set(r,t),e===jr.SOURCE?this.dragSources.set(r,n):e===jr.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Rr=(e,t)=>e===t;function zr(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Br(e,t,n=Rr){if(e.length!==t.length)return!1;for(let r=0;r0||!Br(n,r)))return ar;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ur(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ii(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var ai=0,oi=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),si=nt(function(e){var{children:t}=e;let[n,r]=ci(ri(e,[`children`]));return ft(()=>{if(r){let e=ui();return++ai,()=>{--ai===0&&(e[oi]=null)}}},[]),W(Wt.Provider,{value:n,children:t})});function ci(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[li(e.backend,e.context,e.options,e.debugMode),!e.context]}function li(e,t=ui(),n,r){let i=t;return i[oi]||(i[oi]={dragDropManager:ti(e,t,n,r)}),i[oi]}function ui(){return typeof global<`u`?global:window}function di(e){let t=null;return()=>(t??=e(),t)}function fi(e,t){return e.filter(e=>e!==t)}function pi(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var mi=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=pi(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=fi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},hi=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},gi=n({FILE:()=>_i,HTML:()=>bi,TEXT:()=>yi,URL:()=>vi}),_i=`__NATIVE_FILE__`,vi=`__NATIVE_URL__`,yi=`__NATIVE_TEXT__`,bi=`__NATIVE_HTML__`;function xi(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}var Si={[_i]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[bi]:{exposeProperties:{html:(e,t)=>xi(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[vi]:{exposeProperties:{urls:(e,t)=>xi(e,t,``).split(` `),dataTransfer:e=>e},matchesTypes:[`Url`,`text/uri-list`]},[yi]:{exposeProperties:{text:(e,t)=>xi(e,t,``),dataTransfer:e=>e},matchesTypes:[`Text`,`text/plain`]}};function Ci(e,t){let n=Si[e];if(!n)throw Error(`native type ${e} has no configuration`);let r=new hi(n);return r.loadDataTransfer(t),r}function wi(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(Si).filter(e=>{let n=Si[e];return n!=null&&n.matchesTypes?n.matchesTypes.some(e=>t.indexOf(e)>-1):!1})[0]||null}var Ti=di(()=>/firefox/i.test(navigator.userAgent)),Ei=di(()=>!!window.safari),Di=class{interpolate(e){let{xs:t,ys:n,c1s:r,c2s:i,c3s:a}=this,o=t.length-1;if(e===t[o])return n[o];let s=0,c=a.length-1,l;for(;s<=c;){l=Math.floor(.5*(s+c));let r=t[l];if(re)c=l-1;else return n[l]}o=Math.max(0,c);let u=e-t[o],d=u*u;return n[o]+r[o]*u+i[o]*d+a[o]*u*d}constructor(e,t){let{length:n}=e,r=[];for(let e=0;ee[t]{let e=new Di([0,.5,1],[s.y,s.y/l*p,s.y+p-l]).interpolate(d);return Ei()&&a&&(e+=(window.devicePixelRatio-1)*p),e},h=()=>new Di([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(u),{offsetX:g,offsetY:_}=i,v=g===0||g,y=_===0||_;return{x:v?g:h(),y:y?_:m()}}var Pi=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function Fi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ii(e){for(var t=1;t{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);let r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,r),t.addEventListener(`selectstart`,i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,r),t.removeEventListener(`selectstart`,i),t.setAttribute(`draggable`,`false`)}}connectDropTarget(e,t){let n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener(`dragenter`,n),t.addEventListener(`dragover`,r),t.addEventListener(`drop`,i),()=>{t.removeEventListener(`dragenter`,n),t.removeEventListener(`dragover`,r),t.removeEventListener(`drop`,i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Ii({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Ii({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(gi).some(t=>gi[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=Ci(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)==null?void 0:e.addEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&ki(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>!!(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{let e=this.currentDragSourceNode;e==null||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{this.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<`u`&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;let{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;let n=Ai(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});let{dataTransfer:r}=e,i=wi(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){let e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){let{anchorX:e,anchorY:a,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=Ni(t,i,n,{anchorX:e,anchorY:a},{offsetX:o,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{r==null||r.setData(`application/json`,{})}catch{}this.setCurrentDragSourceNode(e.target);let{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;let{dataTransfer:n}=e,r=wi(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{let{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Ai(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}},this.handleTopDragOver=e=>{let{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`);return}this.altKeyPressed=e.altKey,this.lastClientOffset=Ai(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var t;e.preventDefault(),(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else wi(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{let{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Ai(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{let t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Pi(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new mi(this.isNodeInDocument)}},Ri=function(e,t,n){return new Li(e,t,n)},zi=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20shape-rendering='geometricPrecision'%20image-rendering='optimizeQuality'%20fill-rule='evenodd'%20xmlns:v='https://vecta.io/nano'%3e%3cpath%20fill='%23efda4e'%20d='M-.5-.5h512v512H-.5V-.5z'/%3e%3cpath%20fill='%23020100'%20d='M308.5%20287.5c1.777-3.005%202.777-6.338%203-10%209.147-21.963%2025.48-35.463%2049-40.5%2021.999-4.173%2043.666-2.84%2065%204%2014.575%205.411%2025.575%2014.911%2033%2028.5l-1%202c-12.413%205.624-24.58%2011.624-36.5%2018-5.321-8.25-12.821-13.417-22.5-15.5-13.957-3.122-27.29-1.455-40%205-8.125%205.36-10.958%2012.86-8.5%2022.5%203.223%206.223%208.057%2010.723%2014.5%2013.5l64%2020c38.459%2016.085%2052.626%2044.585%2042.5%2085.5-7.572%2026.208-24.738%2042.041-51.5%2047.5-25.102%205.733-49.768%204.4-74-4-19.291-8.625-32.291-22.958-39-43%2011.266-8.887%2023.433-16.387%2036.5-22.5%203.117%206.896%206.784%2013.563%2011%2020%2012.705%2012.307%2027.872%2016.807%2045.5%2013.5%2022.189-3.504%2032.355-16.338%2030.5-38.5-2.833-6.833-7.667-11.667-14.5-14.5l-57-17c-36.004-11.84-52.67-36.673-50-74.5z'/%3e%3cpath%20fill='%23020200'%20d='M222.5%20238.5h43l-.5%20159c-2.688%2052.355-30.188%2076.855-82.5%2073.5-24.871-3.543-41.204-17.21-49-41l.5-2.5a12.14%2012.14%200%200%200%204.5-3.5c10.653-5.825%2021.32-11.325%2032-16.5%204.763%2021.72%2017.763%2028.887%2039%2021.5%204.616-2.618%207.783-6.451%209.5-11.5%201.163-5.968%202.163-11.968%203-18l.5-161z'/%3e%3cpath%20fill='%23615820'%20d='M311.5%20277.5c-.223%203.662-1.223%206.995-3%2010%20.223-3.662%201.223-6.995%203-10z'/%3e%3c/svg%3e`,Bi=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20500%20500'%3e%3cpath%20fill='%234285f4'%20d='M44.271%2027.275l206.5%201v170l-58.5-36.5c-7.005-.916-12.505%201.584-16.5%207.5v147c4.625%204.412%2010.125%206.245%2016.5%205.5l57.5-35.5c.833%2054.003%201.356%20108.003.189%20162-1.272.546-45.599-.242-48.689%201.121-3.674%207.844-4.79%2011.207-13%2023.879-4.372%205.527-2.19%204.097-10.689%2012.258-5.166%202.748-4.191%203.45-14.311%206.242-17.67%201.983-35.336%201.983-53%200-9.535-3.774-10.879-4.163-18.526-11.22-5.562-4.39-11.131-11.803-11.974-15.28-4.068-7.881-3.42-9.116-5.5-13.5-3.672-1.503-35.798.203-40.746-1.335-5.823-2.314-2.946-.422-7.954-3.689-2.888-2.668-2.255-3.221-2.421-9.904L20.771%2050.275c.36-2.108-.41-5.806%202.522-11.615%204.343-5.852%205.374-7%2010.061-9.146%206.083-2.73%208.677-1.475%2010.917-2.239z'/%3e%3cpath%20d='M258.271%2030.275l154.63.407c5.654.559%2010.783%203.17%2014.37%207.093%204.907%204.408%206.204%208.723%207.5%2013.5v373c-.208%205.716-.297%207.982-4.848%2015.404-7.078%206.393-9.879%206.39-15.652%206.692-24.804%201.296-50.079%201.189-74.96%201.041-24.516-.014-68.46.89-81.5.391l-2.512-172.528c-20.083%2012.625-42.777%2025.125-63.028%2037.5-4.127%201.292-7.294.125-9.5-3.5l1-137c1.864-2.707%204.364-3.541%207.5-2.5%2020.366%2013.427%2064.35%2038.947%2065.581%2038.339l1.419-177.839z'%20fill='%23DDD'/%3e%3c/svg%3e`,Vi=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%20width='32'%20height='32'%3e%3cpath%20fill='%23007acc'%20d='M-.5-.5h503l-1%20179h10v333h-421v-7h-91V-.5z'/%3e%3cpath%20fill='%230f81cf'%20d='M502.5-.5h9v179h-10l1-179z'/%3e%3cpath%20fill='%23fdfefe'%20d='M470.5%20227.5c.33%2017.508-.003%2034.841-1%2052-23.486-15.709-48.82-19.875-76-12.5-15.89%208.078-19.39%2019.911-10.5%2035.5%204.673%205.577%2010.173%2010.077%2016.5%2013.5l38%2019c17.945%209.278%2031.112%2023.112%2039.5%2041.5%201.352%203.22%202.186%206.553%202.5%2010a305.16%20305.16%200%200%201%201%2026c-3.553%2033.726-21.886%2054.559-55%2062.5-34.769%207.363-68.435%204.196-101-9.5-.167-19.003%200-38.003.5-57%2022.903%2021.314%2049.736%2029.147%2080.5%2023.5%2019.435-5.701%2025.268-17.868%2017.5-36.5-4.718-6.44-10.552-11.606-17.5-15.5a1552.42%201552.42%200%200%201-47-24c-27.679-19.331-38.846-45.831-33.5-79.5%206.43-26.433%2022.597-43.933%2048.5-52.5%2026.131-6.625%2052.464-7.292%2079-2a565.56%20565.56%200%200%201%2018%205.5z'/%3e%3cpath%20fill='%23fefefe'%20d='M122.5%20222.5h182v46h-65v206h-52v-206h-65v-46z'/%3e%3cpath%20fill='%2370b3e1'%20d='M470.5%20227.5c1.327%2017.505%201.327%2035.171%200%2053-.607-.124-.94-.457-1-1%20.997-17.159%201.33-34.492%201-52z'/%3e%3cpath%20fill='%236cafe0'%20d='M479.5%20386.5c1.465%205.09%202.132%2010.423%202%2016-.002%203.518-.335%206.851-1%2010a305.16%20305.16%200%200%200-1-26z'/%3e%3cpath%20fill='%231283cf'%20d='M-.5%20504.5h91v7h-91v-7z'/%3e%3c/svg%3e`,Hi=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIj4KICAgIDxyYWRpYWxHcmFkaWVudCBpZD0ibXlHcmFkaWVudCI+CiAgICAgICAgPHN0b3Agb2Zmc2V0PSIxMCUiIHN0b3AtY29sb3I9IiMxQzJENUYiIC8+CiAgICAgICAgPHN0b3Agb2Zmc2V0PSI5NSUiIHN0b3AtY29sb3I9IiMwQjFENTMiIC8+CiAgICA8L3JhZGlhbEdyYWRpZW50PgogICAgPHBhdGggZmlsbD0idXJsKCcjbXlHcmFkaWVudCcpIiBkPSJNLS4xLS4xaDUxMnY1MTJILS4xVi0uMXoiLz4KICAgIDxwYXRoIGZpbGw9IiNmOGY4ZmEiCiAgICAgICAgICBkPSJNNDgyLjUgMjMxLjV2NmgtMjVjLS45NzItOC4xNy01LjYzOS0xMi4xNy0xNC0xMi05LjUzMS4wMjktMTMuMzY1IDQuNjk1LTExLjUgMTRsNC41IDQuNSAzMyA4YzE5LjM4OCA5LjYzNCAyMy4zODggMjMuODAxIDEyIDQyLjVhMzUuMDYgMzUuMDYgMCAwIDAtOCA2Yy0xMy45MjUgNC43NjEtMjguMjU4IDYuMjYxLTQzIDQuNS0xMC42MDEtMS4wMjQtMTguOTM1LTUuODU3LTI1LTE0LjUtMS4wNzctMi4yMjktMS43NDQtNC41NjMtMi03di04aDI1YzEuNDk1IDQuMjc5IDMuODI4IDguMTEzIDcgMTEuNSA3LjQ3OCAyLjI1OCAxNC44MTEgMS45MjUgMjItMSAyLjg5NC0yLjkwOSAzLjcyNy02LjQwOSAyLjUtMTAuNWEzNi44IDM2LjggMCAwIDAtMTIuNS01LjUgNTM5Ljc5IDUzOS43OSAwIDAgMS0yOC04Yy0xMi44NzQtNi41NjItMTcuNzA3LTE3LjA2Mi0xNC41LTMxLjUgMy41Ny0xMC41NjkgMTAuNzM3LTE3LjQwMyAyMS41LTIwLjUgMTYuMTQ4LTQuNTM5IDMxLjQ4Mi0yLjcwNiA0NiA1LjUgMiAyLjY2NyA0LjMzMyA1IDcgNyAxLjg3MSAyLjczNCAyLjg3MSA1LjczNCAzIDl6Ii8+CiAgICA8cGF0aCBmaWxsPSIjYTRhYmJmIiBkPSJNMTUzLjUgMjA5LjVjLjA2LS41NDMuMzkzLS44NzYgMS0xYTEwMjQuNjMgMTAyNC42MyAwIDAgMSAxIDY0bC0yLTYzeiIvPgogICAgPHBhdGggZmlsbD0iI2ZhZmJmYyIKICAgICAgICAgIGQ9Ik0xNTMuNSAyMDkuNWwyIDYzYzEuMjc4IDExLjQ0NCA3LjYxMSAxNi4yNzcgMTkgMTQuNSA4LjcwNC0xLjM3OCAxMy4yMDQtNi41NDQgMTMuNS0xNS41LjUtMjAuNjY0LjY2Ny00MS4zMzEuNS02MiA5Ljc0My0uMjE5IDE5LjQwOS0uMjE5IDI5IDAgLjQwMSAyMy4zNjItLjA5OSA0Ni42OTYtMS41IDcwLTQuMjk4IDE0Ljk2OC0xNC4xMzEgMjMuNDY4LTI5LjUgMjUuNWEyMjUuMTQgMjI1LjE0IDAgMCAxLTMwIDBjLTE1LjgyMi0yLjE1NS0yNS42NTUtMTAuOTg4LTI5LjUtMjYuNWwtLjUtNjloMjd6Ii8+CiAgICA8cGF0aCBmaWxsPSIjZmVmZWZlIgogICAgICAgICAgZD0iTTIzMy41IDIwOS41aDI3Yy0uMzMxIDI1LjE3Mi4wMDIgNTAuMTcyIDEgNzUgMCAuNjY3LjMzMyAxIDEgMSAxMy4xNTYuOTk2IDI2LjQ5IDEuMzI5IDQwIDF2MTdoLTY5di05NHoiLz4KICAgIDxwYXRoIGZpbGw9IiNhNWFjYmYiIGQ9Ik0yMzMuNSAyMDkuNWM5LjE1Mi0uOTk0IDE4LjQ4NS0xLjMyNyAyOC0xdjc2Yy0uOTk4LTI0LjgyOC0xLjMzMS00OS44MjgtMS03NWgtMjd6Ii8+CiAgICA8cGF0aCBmaWxsPSIjYTdhZWMxIiBkPSJNMzE2LjUgMjA5LjVoNzNjLjMyMyA2LjE5LS4wMSAxMi4xOS0xIDE4di0xN2MtMjQuMTcyLjMzMS00OC4xNzItLjAwMi03Mi0xeiIvPgogICAgPHBhdGggZmlsbD0iI2E1YWNjMCIgZD0iTTg1LjUgMjEwLjVoLTU5djkzaDI3Yy0uMzI4LTExLjE3OS4wMDUtMjIuMTc5IDEtMzN2MzRoLTI5di05NWE5MDAuOTggOTAwLjk4IDAgMCAxIDYwIDF6Ii8+CiAgICA8cGF0aCBmaWxsPSIjZmNmY2ZjIgogICAgICAgICAgZD0iTTg1LjUgMjEwLjVjMjIuMjIzIDMuNzU4IDI5LjU1NiAxNi40MjUgMjIgMzgtNC4yMjggNS4zOTctOS4yMjggOS44OTctMTUgMTMuNS0xLjMwNS44MDQtMS45NzEgMS45NzEtMiAzLjVsMjMgMzZjLTQuNDUxIDEuMzI3LTkuMjg0IDEuOTk0LTE0LjUgMmExMjguMTkgMTI4LjE5IDAgMCAxLTE1LjUtMWMtNi45NTUtMTAuMzI2LTEzLjQ1NS0yMC45OTItMTkuNS0zMi0zLjI2OS0xLjMxOC02LjQzNS0xLjMxOC05LjUgMC0uOTk1IDEwLjgyMS0xLjMyOCAyMS44MjEtMSAzM2gtMjd2LTkzaDU5eiIvPgogICAgPHBhdGggZmlsbD0iI2ZlZmVmZSIKICAgICAgICAgIGQ9Ik0zMTYuNSAyMDkuNWMyMy44MjguOTk4IDQ3LjgyOCAxLjMzMSA3MiAxdjE3Yy0xNC42Ny0uMTY3LTI5LjMzNyAwLTQ0IC41LTEuMzI2IDYuNTk5LTEuMzI2IDEzLjA5OSAwIDE5LjUgMTQuNDkuOTk2IDI5LjE1NyAxLjMyOSA0NCAxdjE2Yy0xNC44NDMtLjMyOS0yOS41MS4wMDQtNDQgMWE1MC41MSA1MC41MSAwIDAgMCAwIDIwYzE0LjQ5Ljk5NiAyOS4xNTcgMS4zMjkgNDQgMXYxN2gtNzNjLS4zMzItMzEuNTA0LjAwMi02Mi44MzggMS05NHoiLz4KICAgIDxwYXRoIGZpbGw9IiMxODI3NWIiCiAgICAgICAgICBkPSJNNTUuNSAyMjkuNWM3LjA4OS0uMzg0IDE0LjA4OS4xMTYgMjEgMS41IDMuNDAxIDEuMzIgNC43MzUgMy44MiA0IDcuNWwtLjUgNWMtMS43NzEuODA0LTMuMjcxIDEuOTcxLTQuNSAzLjUtNi41OTIgMS4zMjktMTMuMjU5IDEuODI5LTIwIDEuNXYtMTl6Ii8+CiAgICA8cGF0aCBmaWxsPSIjYTVhY2MwIiBkPSJNNDgyLjUgMjMxLjVjLjk2OCAyLjEwNyAxLjMwMiA0LjQ0MSAxIDctOC44NDkuMzI2LTE3LjUxNi0uMDA3LTI2LTFoMjV2LTZ6Ii8+CiAgICA8cGF0aCBmaWxsPSIjYTZhZGMwIiBkPSJNMzQ0LjUgMjQ3LjVoNDV2MThoLTQ1YzE0LjQ5LS45OTYgMjkuMTU3LTEuMzI5IDQ0LTF2LTE2Yy0xNC44NDMuMzI5LTI5LjUxLS4wMDQtNDQtMXoiLz4KICAgIDxwYXRoIGZpbGw9IiNhMmE5YmUiIGQ9Ik00MjguNSAyNzUuNWgtMjV2OGMtLjk3Ny0yLjc4Ny0xLjMxLTUuNzg3LTEtOSA4Ljg0OS0uMzI2IDE3LjUxNi4wMDcgMjYgMXoiLz4KICAgIDxwYXRoIGZpbGw9IiNhNWFjYmYiCiAgICAgICAgICBkPSJNMTEzLjUgMzAxLjVjLjk3OC4zMTEgMS42NDUuOTc4IDIgMmwtMTYgMWMtNS43MTEtLjAwNS0xMS4wNDQtLjY3Mi0xNi0yYTEyOC4xOSAxMjguMTkgMCAwIDAgMTUuNSAxYzUuMjE2LS4wMDYgMTAuMDQ5LS42NzMgMTQuNS0yeiIvPgogICAgPHBhdGggZmlsbD0iI2E1YWNjMCIgZD0iTTIzMy41IDIwOS41djk0aDY5di0xN2MtMTMuNTEuMzI5LTI2Ljg0NC0uMDA0LTQwLTFoNDF2MTloLTcxYTIyNTYuNDEgMjI1Ni40MSAwIDAgMSAxLTk1eiIvPgogICAgPHBhdGggZmlsbD0iI2E2YWNjMCIKICAgICAgICAgIGQ9Ik0zMTYuNSAyMDkuNWMtLjk5OCAzMS4xNjItMS4zMzIgNjIuNDk2LTEgOTRoNzN2LTE3Yy0xNC44NDMuMzI5LTI5LjUxLS4wMDQtNDQtMWg0NXYxOWgtNzVhMjMwNC45NSAyMzA0Ljk1IDAgMCAxIDEtOTZjLjYwNy4xMjQuOTQuNDU3IDEgMXoiLz4KPC9zdmc+`;d();var Ui=class e extends G.Component{constructor(t){super(t),T(this,`isShowInstance`,void 0),T(this,`oldId`,void 0),T(this,`handleCancel`,()=>{this.props.onClose()}),T(this,`handleOk`,()=>{this.props.onRename(this.oldId,this.state.id,this.state.name,this.state.instance===0?0:this.state.instance||void 0),this.props.onClose()}),T(this,`handleChange`,e=>{this.setState({name:e,id:this.getId(e)})}),this.state={name:t.name,id:t.id,instance:t.instance||0,prefix:e.getPrefix(t.id)},this.isShowInstance=!t.folder&&!!t.instances&&(!!t.instance||!!t.instances[0]||t.instances.length>1),this.oldId=t.id}static getPrefix(e){let t=(e||``).split(`.`);return t.pop(),t.join(`.`)}getId(e){return e=(e||``).replace(/[\\/\][.*,;'"`<>?\s]/g,`_`).trim().replace(/\.$/,`_`),`${this.state.prefix}.${e}`}render(){let e=this.props.instanceHosts||{};return O(a,{onClose:()=>!1,maxWidth:`md`,fullWidth:!0,open:!0,"aria-labelledby":`confirmation-dialog-title`,children:[W(gt,{id:`confirmation-dialog-title`,children:H.t(`Rename`)}),W(xt,{children:O(`form`,{noValidate:!0,autoComplete:`off`,children:[W(E,{variant:`standard`,style:{width:`100%`},id:`standard-name`,autoFocus:!0,label:H.t(`Name`),value:this.state.name,onKeyUp:e=>{e.key===`Enter`&&(e.preventDefault(),setTimeout(()=>this.handleOk(),200))},onChange:e=>this.handleChange(e.target.value),margin:`normal`}),W(E,{variant:`standard`,id:`standard-name-id`,style:{width:`100%`},label:H.t(`ID`),value:this.state.id,disabled:!0,margin:`normal`}),this.isShowInstance&&O(Fe,{variant:`standard`,children:[W(Ue,{htmlFor:`instance`,children:H.t(`Instance`)}),W(ne,{variant:`standard`,value:this.state.instance,onChange:e=>this.setState({instance:parseInt(e.target.value,10)}),inputProps:{name:`instance`,id:`instance`},children:this.props.instances.map(t=>{let n=e[t];return O(he,{value:t,children:[t||`0`,n?W(`span`,{style:{opacity:.6,marginLeft:8,fontSize:`smaller`},children:`@ ${n}`}):null]},t)})})]})]})}),O(Be,{children:[W(w,{variant:`contained`,onClick:this.handleOk,color:`primary`,startIcon:W(At,{}),children:H.t(`Ok`)}),W(w,{color:`grey`,variant:`contained`,onClick:this.handleCancel,startIcon:W(me,{}),children:H.t(`Cancel`)})]})]})}};d();var Wi=class extends G.Component{constructor(e){super(e),T(this,`handleCancel`,()=>{this.props.onClose()}),T(this,`handleOk`,()=>{this.props.onDelete(this.state.id),this.props.onClose()}),this.state={name:e.name,id:e.id}}render(){return O(a,{onClose:()=>!1,maxWidth:`md`,open:!0,"aria-labelledby":`confirmation-dialog-title`,children:[W(gt,{id:`confirmation-dialog-title`,children:H.t(`Are you sure?`)}),O(xt,{children:[W(Ye,{}),W(`span`,{style:{fontSize:14,fontWeight:`bold`},children:H.t(`Delete %s`,this.state.name)})]}),O(Be,{children:[W(w,{variant:`contained`,onClick:this.handleOk,color:`primary`,startIcon:W(At,{}),children:H.t(`Ok`)}),W(w,{color:`grey`,variant:`contained`,onClick:this.handleCancel,startIcon:W(me,{}),children:H.t(`Cancel`)})]})]})}},Gi=``+new URL(`tileJS-C48gYbHw.png`,import.meta.url).href,Ki=``+new URL(`tileTS-CsXmgy4B.png`,import.meta.url).href,qi=``+new URL(`tileBlockly-BMpdinN3.png`,import.meta.url).href,Ji=``+new URL(`tileRules-BkbaFIhs.png`,import.meta.url).href;d();var Yi={card:{maxWidth:345,minWidth:250,display:`inline-block`,margin:`0 10px 0 10px`},media:{height:122},text:{maxWidth:218,minHeight:30},complexity:{fontWeight:`bold`,fontStyle:`italic`,marginBottom:8}},Xi=class e extends G.Component{constructor(...e){super(...e),T(this,`handleCancel`,()=>{this.props.onClose()})}static openHtml(e){let t=H.getLanguage();!e.includes(`javascript.md`)&&(t===`de`||t===`ru`)&&(e=e.replace(/\/en\//,`/${t}/`));let n=window.open(e,`_blank`);n==null||n.focus()}getJSCard(){return O(_e,{style:Yi.card,children:[O(xe,{onClick:()=>this.props.onClose&&this.props.onClose(`Javascript/js`),children:[W(mt,{style:Yi.media,image:Gi,title:`JavaScript`}),O(M,{children:[W(`h2`,{children:`JavaScript`}),W(`div`,{style:Yi.complexity,children:H.t(`for programmers`)}),W(`div`,{style:Yi.text,children:H.t(`JS description`)})]})]}),O(x,{children:[W(w,{size:`small`,color:`primary`,variant:`contained`,onClick:()=>this.props.onClose&&this.props.onClose(`Javascript/js`),children:H.t(`Add`)}),W(w,{size:`small`,color:`secondary`,onClick:()=>e.openHtml(`https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md`),children:H.t(`Learn More`)})]})]})}getTSCard(){return O(_e,{style:Yi.card,children:[O(xe,{onClick:()=>this.props.onClose&&this.props.onClose(`TypeScript/ts`),children:[W(mt,{style:Yi.media,image:Ki,title:`TypeScript`}),O(M,{children:[W(`h2`,{children:`TypeScript`}),W(`div`,{style:Yi.complexity,children:H.t(`for professionals`)}),W(`div`,{style:Yi.text,children:H.t(`TS description`)})]})]}),O(x,{children:[W(w,{size:`small`,color:`primary`,variant:`contained`,onClick:()=>this.props.onClose&&this.props.onClose(`TypeScript/ts`),children:H.t(`Add`)}),W(w,{size:`small`,color:`secondary`,onClick:()=>e.openHtml(`https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md`),children:H.t(`Learn More`)})]})]})}getBlocklyCard(){return O(_e,{style:Yi.card,children:[O(xe,{onClick:()=>this.props.onClose&&this.props.onClose(`Blockly`),children:[W(mt,{style:Yi.media,image:qi,title:`Blockly`}),O(M,{children:[W(`h2`,{children:`Blockly`}),W(`div`,{style:Yi.complexity,children:H.t(`normal`)}),W(`div`,{style:Yi.text,children:H.t(`Blockly description`)})]})]}),O(x,{children:[W(w,{size:`small`,color:`primary`,variant:`contained`,onClick:()=>this.props.onClose&&this.props.onClose(`Blockly`),children:H.t(`Add`)}),W(w,{size:`small`,color:`secondary`,onClick:()=>e.openHtml(`https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/blockly.md`),children:H.t(`Learn More`)})]})]})}getRulesCard(){return O(_e,{style:Yi.card,children:[O(xe,{onClick:()=>this.props.onClose&&this.props.onClose(`Rules`),children:[W(mt,{style:Yi.media,image:Ji,title:`Rules`}),O(M,{children:[W(`h2`,{children:`Rules`}),W(`div`,{style:Yi.complexity,children:H.t(`easy`)}),W(`div`,{style:Yi.text,children:H.t(`Rules description`)})]})]}),O(x,{children:[W(w,{size:`small`,color:`primary`,variant:`contained`,onClick:()=>this.props.onClose&&this.props.onClose(`Rules`),children:H.t(`Add`)}),W(w,{size:`small`,color:`secondary`,onClick:()=>e.openHtml(`https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md`),children:H.t(`Learn More`)})]})]})}render(){return O(a,{onClose:()=>!1,maxWidth:`lg`,fullWidth:!0,open:!0,"aria-labelledby":`confirmation-dialog-title`,children:[W(gt,{id:`confirmation-dialog-title`,children:H.t(`Add new script`)}),O(xt,{style:{textAlign:`center`},children:[this.getRulesCard(),this.getBlocklyCard(),this.getJSCard(),this.getTSCard()]}),W(Be,{children:W(w,{color:`grey`,onClick:this.handleCancel,startIcon:W(me,{}),children:H.t(`Cancel`)})})]})}};d();var Zi=class extends G.Component{constructor(e){super(e),T(this,`isShowInstance`,void 0),T(this,`handleOk`,()=>{this.props.onAdd(this.getId(this.state.name),this.state.name,this.state.instance,this.props.type),this.props.onClose()}),this.state={name:e.name||`Script`,instance:e.instance||0,parent:e.parent,error:``,id:``},this.isShowInstance=!e.folder&&!!e.instances&&(!!e.instance||!!e.instances[0]||e.instances.length>1)}getId(e){return e=e||this.state.name||``,e=e.replace(/[\\/\][.*,;'"`<>?\s]/g,`_`).trim().replace(/\.$/,`_`),`${this.state?this.state.parent:this.props.parent}.${e}`}render(){var e;return O(a,{onClose:()=>!1,maxWidth:`md`,fullWidth:!0,open:!0,"aria-labelledby":`confirmation-dialog-title`,children:[W(gt,{id:`confirmation-dialog-title`,children:this.props.title||H.t(`Create new`)}),W(xt,{children:O(`form`,{noValidate:!0,autoComplete:`off`,children:[W(E,{variant:`standard`,style:{width:`100%`},id:`standard-name`,autoFocus:!0,error:!!this.state.error,label:H.t(`Name`),value:this.state.name||``,helperText:this.state.error,slotProps:{input:{endAdornment:this.state.name?W(U,{size:`small`,onClick:()=>this.setState({name:``}),children:W(Ne,{})}):void 0}},onKeyUp:e=>{e.preventDefault(),e.key===`Enter`&&!this.state.error&&setTimeout(()=>this.handleOk(),200)},onChange:e=>{var t;let n=e.target.value,r=this.getId(n);n?(t=this.props.existingItems)!=null&&t.includes(r)?this.setState({name:n,id:r,error:H.t(`Duplicate name`)}):this.setState({name:n,id:r,error:``}):this.setState({name:n,id:r,error:H.t(`Empty name is not allowed`)})},margin:`normal`}),O(Fe,{variant:`standard`,style:{width:`100%`},children:[W(Ue,{htmlFor:`parent`,children:H.t(`Folder`)}),W(ne,{variant:`standard`,style:{width:`100%`},value:this.state.parent,onChange:e=>this.setState({parent:e.target.value}),inputProps:{name:`parent`,id:`parent`},children:this.props.parents.map(e=>{let t=e.id.split(`.`);t.splice(0,2);let n=[],r=`script.js`;return t.forEach(e=>{r+=`.${e}`;let t=this.props.parents.find(e=>e.id===r);t?n.push(t.name):n.push(e)}),n.length||n.push(e.name),W(he,{value:e.id,children:n.join(` / `)},e.id)})})]}),W(E,{variant:`standard`,id:`standard-name-id`,style:{width:`100%`},label:H.t(`ID`),value:this.getId(),disabled:!0,margin:`normal`}),this.isShowInstance&&O(Fe,{variant:`standard`,children:[W(Ue,{htmlFor:`instance`,children:H.t(`Instance`)}),W(ne,{variant:`standard`,value:this.state.instance,onChange:e=>this.setState({instance:e.target.value}),inputProps:{name:`instance`,id:`instance`},children:(e=this.props.instances)==null?void 0:e.map(e=>W(he,{value:e,children:e||`0`},`instance${e}`))})]})]})}),O(Be,{children:[W(w,{variant:`contained`,onClick:this.handleOk,disabled:!!this.state.error,color:`primary`,startIcon:W(At,{}),children:H.t(`Ok`)}),W(w,{color:`grey`,variant:`contained`,onClick:()=>this.props.onClose(),startIcon:W(me,{}),children:H.t(`Cancel`)})]})]})}};d();var Qi={buttonIcon:{marginRight:8},icon:{width:24,height:24},filter:{width:`100%`},filterWithButton:{width:`100%`},title:{fontWeight:`bold`,marginTop:16}},$i=class extends G.Component{constructor(e){super(e),T(this,`handleOk`,()=>{var e;if((e=this.state.instances.find(e=>e.id===this.state.adapterToDebug))!=null&&e.enabled){this.props.socket.getObject(`system.adapter.${this.state.adapterToDebug}`).then(e=>{e&&(e.common.enabled=!1,this.props.socket.setObject(e._id,e).then(()=>this.props.onDebug(this.state.jsInstance,this.state.adapterToDebug)))});return}this.props.onDebug(this.state.jsInstance,this.state.adapterToDebug)}),this.state={instances:[],filter:window.localStorage.getItem(`javascript.debug.filter`)||``,showAskForStop:!1,jsInstance:window.localStorage.getItem(`javascript.debug.instance`)||``,jsInstanceHost:``,adapterToDebug:window.localStorage.getItem(`javascript.debug.adapter`)||``}}componentDidMount(){this.props.socket.getAdapterInstances().then(e=>{let t=e.filter(e=>{var t;return e&&!((t=e.common)!=null&&t.onlyWWW)}).map(e=>{var t,n,r;let i=e._id.replace(/^system\.adapter\./,``),[a]=i.split(`.`);return{id:i,enabled:(t=e.common)==null?void 0:t.enabled,host:(n=e.common)==null?void 0:n.host,icon:(r=e.common)!=null&&r.icon?`../../adapter/${a}/${e.common.icon}`:``}});t.sort((e,t)=>e.id>t.id?1:e.ide.id===this.state.jsInstance):null,i;if(!this.state.jsInstance||!r){let e=t.find(e=>e.id.startsWith(`javascript.`));i=(e==null?void 0:e.host)||``,n=(e==null?void 0:e.id)||``}else i=(r==null?void 0:r.host)||``;let a=this.state.adapterToDebug||``;a&&!t.find(e=>e.id===a)&&(a=``),this.setState({instances:t,jsInstance:n,adapterToDebug:a,jsInstanceHost:i})})}renderJavascriptList(){let e=this.state.instances.filter(e=>e.id.startsWith(`javascript.`));return e.length<2?null:O(Re,{children:[W(`div`,{style:Qi.title,children:H.t(`Host`)}),W(wt,{component:`nav`,children:e.map(e=>O(je,{component:`div`,selected:this.state.jsInstance===e.id,onClick:()=>this.setState({jsInstance:e.id,jsInstanceHost:e.host}),children:[W(Ot,{children:W(`img`,{src:e.icon,alt:e.id,style:Qi.icon})}),W(pe,{primary:e.id})]},e.id))})]})}renderInstances(){if(!this.state.jsInstance)return W(Re,{});let e=this.state.instances.filter(e=>e.id!==this.state.jsInstance&&e.host===this.state.jsInstanceHost&&(!this.state.filter||e.id.includes(this.state.filter.toLowerCase())));return O(Re,{children:[W(`div`,{style:Qi.title,children:H.t(`Instances`)}),W(wt,{component:`nav`,children:e.map(e=>O(je,{selected:this.state.adapterToDebug===e.id,onDoubleClick:()=>this.setState({adapterToDebug:e.id},()=>this.handleOk()),onClick:()=>this.setState({adapterToDebug:e.id}),children:[W(Ot,{children:W(`img`,{src:e.icon,alt:e.id,style:Qi.icon})}),W(pe,{primary:e.id})]},e.id))})]})}render(){return O(a,{maxWidth:`md`,fullWidth:!1,open:!0,onClose:()=>!1,"aria-labelledby":`confirmation-dialog-title`,children:[W(gt,{id:`confirmation-dialog-title`,children:this.props.title||H.t(`Debug instance`)}),W(xt,{children:O(B,{children:[W(Re,{children:W(rt,{style:Qi.filterWithButton,value:this.state.filter,placeholder:H.t(`Filter`),onChange:e=>{this.setState({filter:e.target.value}),window.localStorage.setItem(`javascript.debug.filter`,e.target.value)},endAdornment:W(qe,{position:`end`,children:this.state.filter?W(U,{size:`small`,"aria-label":`toggle password visibility`,onClick:()=>this.setState({filter:``}),children:W(Pt,{})}):``})})}),W(Re,{children:O(Re,{container:!0,children:[this.renderJavascriptList(),this.renderInstances()]})})]})}),O(Be,{children:[W(w,{variant:`contained`,onClick:this.handleOk,disabled:!this.state.jsInstance||!this.state.adapterToDebug,color:`primary`,startIcon:W(At,{}),children:H.t(`Start`)}),W(w,{color:`grey`,variant:`contained`,onClick:()=>this.props.onClose(),startIcon:W(me,{}),children:H.t(`Close`)})]})]})}};function ea(e){if(!e)throw Error(`Password must be a non-empty string.`)}function ta(e){return new TextEncoder().encode(e)}function na(e){return new TextDecoder().decode(e)}function ra(e){let t=``;for(let n=0;n({height:e.toolbar.height}),toolbarButtons:e=>({color:e.palette.mode===`dark`?`white !important`:`black !important`}),iconButtonsDisabled:{filter:`grayscale(100%)`,opacity:.5},toolbarSearch:{width:`calc(100% - 105px)`,lineHeight:`34px`,marginLeft:5},iconButtons:{width:32,height:32,padding:2},iconDropdownMenu:{paddingRight:5},iconOnTheRight:{position:`absolute`,right:10,top:`calc(50% - 8px)`},menu:{width:`100%`,height:`100%`},innerMenu:{width:`100%`,height:`calc(100% - 76px)`,overflowX:`hidden`,overflowY:`auto`},listItemIcon:{minWidth:32},filterIcon:{width:18,height:18,borderRadius:2,marginRight:5},scriptIcon:{width:18,height:18,borderRadius:2,marginTop:4,marginBottom:4,marginLeft:8,marginRight:4},folder:{cursor:`pointer`,padding:0,userSelect:`none`},folderReorder:{opacity:.3,transitionDuration:`0.5s`,transitionProperty:`opacity`},folderIcon:{width:20,height:20},folderIconReorder:{paddingTop:4,paddingBottom:4,paddingLeft:8,paddingRight:4},folderIconNoReorder:{cursor:`pointer`,paddingTop:4,paddingBottom:4,paddingLeft:8,paddingRight:4},script:{cursor:`pointer`,padding:0,userSelect:`none`},scriptReorder:{opacity:1,transitionDuration:`0.5s`,transitionProperty:`opacity`},reorder:{},expandButton:{width:37,height:37},selected:window.vendorPrefix?e=>({backgroundColor:e.palette.primary.main,color:e.palette.text.primary}):{backgroundColor:`#164477`,color:`white`},instances:{fontSize:`smaller`,fontWeight:`bold`,marginRight:4},childrenCount:{fontSize:10,opacity:.4},footer:{height:24,display:`flex`},footerButtons:e=>({"& img":{color:e.palette.mode===`dark`?`#ffffff`:`#111111`,cursor:`pointer`,mt:`1px`,mr:`2px`,height:22,width:22,"&:hover":{backgroundColor:`#dbdbdb`}},"& svg":{color:e.palette.mode===`dark`?`#ffffff`:`#111111`,cursor:`pointer`,mt:`1px`,mr:`2px`,height:22,width:22,"&:hover":{backgroundColor:`#dbdbdb`}}}),footerButtonsRight:{float:`right`}},_a={Blockly:Bi,"Javascript/js":zi,def:zi,Rules:Hi,"TypeScript/ts":Vi};function va(e,t,n){var r;return n||=H.getLanguage(),t!=null&&(r=t.common)!=null&&r.name?typeof t.common.name==`object`?(t.common.name[n]||t.common.name.en||e.replace(/^script\.js./,``)).toString():t.common.name.toString():e.replace(/^script\.js./,``)}function ya(e){let t=[{id:fa,depth:0,index:0,parent:null,title:`root`,type:`folder`,parentIndex:null}],n=Object.keys(e);for(let i=0;i1?o.join(`.`):null,instance:a.common.engine?parseInt(a.common.engine.split(`.`).pop(),10)||0:null,index:0,parentIndex:0})}else t.push({id:n[i],title:va(n[i],a),depth:o.length-1,type:`folder`,parent:o.length>1?o.join(`.`):null,index:0,parentIndex:null})}let i;do i=!1,t.forEach(e=>{if(e.parent&&!t.find(t=>t.id===e.parent)){let n=e.parent.split(`.`);n.pop(),t.push({id:e.parent,title:e.parent.split(`.`).pop()||``,depth:n.length-1,type:`folder`,parent:n.length>1?n.join(`.`):null,index:0,parentIndex:null}),i=!0}});while(i);return t.sort((e,t)=>{let n=e.id.toLowerCase(),r=t.id.toLowerCase();return e.type===`folder`&&t.type!==`folder`?-1:t.type===`folder`&&e.type!==`folder`||n>r?1:ne.index=t),t.forEach(e=>{if(e.parent){let n=t.find(t=>t.id===e.parent);n&&(e.parentIndex=n.index)}}),t}function ba(e){let{onDrop:t}=e,[{isOver:n,isOverAny:r},i]=qt({accept:`script`,drop:e=>n?t(e):void 0,collect:e=>({isOver:e.isOver({shallow:!0}),isOverAny:e.isOver()})});return W(`div`,{ref:e=>{i(e)},style:{background:n?`#40adff`:void 0,opacity:r?.7:void 0},children:e.children},e.folderName)}function xa(e){let{name:t}=e,[{opacity:n},r]=Ht({type:`script`,item:()=>({name:t}),collect:e=>({opacity:e.isDragging()?.3:1})});return W(`div`,{ref:e=>{r(e)},style:{opacity:n,transform:`translate3d(0, 0, 0)`},children:e.children},t)}var Sa=class e extends G.Component{constructor(e){super(e),T(this,`inputRef`,void 0),T(this,`filterTimer`,void 0),T(this,`problems`,void 0),T(this,`problemsTimer`,void 0),T(this,`onProblemUpdatedBound`,void 0),T(this,`parent`,null);let t=window.localStorage?window.localStorage.getItem(`SideMenu.expanded`):`[]`,n;try{n=JSON.parse(t||`[]`)||[]}catch{n=[]}this.inputRef=G.createRef(),this.state={listItems:ya(e.scripts||{}),expanded:n,problems:[],reorder:!1,themeName:this.props.themeName,selected:window.localStorage&&window.localStorage.getItem(`SideMenu.selected`)||null,creatingScript:null,creatingFolder:!1,copingScript:``,renaming:null,deleting:null,choosingType:!1,errorText:``,instances:e.instances||[],menuOpened:!1,menuAnchorEl:null,menuAnchorFilterEl:null,searchMode:!1,expertMode:this.props.expertMode,searchText:``,width:this.props.width||300,typeFilter:window.localStorage&&window.localStorage.getItem(`SideMenu.typeFilter`)||``,statusFilter:window.localStorage&&window.localStorage.getItem(`SideMenu.statusFilter`)||``,runningInstances:this.props.runningInstances||{},scriptsHash:e.scriptsHash,showAdapterDebug:!1,isAllZeroInstances:!1,showExportDialog:!1};let r=this.ensureSelectedIsVisible();r&&Object.assign(this.state,{expanded:r}),this.filterTimer=null,Object.assign(this.state,{isAllZeroInstances:this.getIsAllZeroInstances()}),this.problems=null,this.problemsTimer=null,this.onProblemUpdatedBound=this.onProblemUpdated.bind(this)}readProblems(e,t){if(t||=Object.keys(this.props.scripts),!t||!t.length)e&&e();else{var n,r;let i=t.shift(),a=this.props.scripts[i];if(((n=this.props.scripts)==null?void 0:n[i].type)===`script`&&(r=a.common)!=null&&r.enabled&&!i.match(/^script\.js\.global\./)){let n=a.common.engine.split(`.`).pop(),r=this,o=`javascript.${n}.scriptProblem.${i.substring(10)}`;this.props.socket.getState(o).then(n=>{r.onProblemUpdated(o,n),setTimeout(()=>r.readProblems(e,t),0)})}else setTimeout(()=>this.readProblems(e,t),0)}}componentDidMount(){this.readProblems(()=>{this.props.instances.forEach(e=>{this.props.socket.subscribeState(`javascript.${e}.scriptProblem.*`,this.onProblemUpdatedBound)})})}componentWillUnmount(){this.props.instances.forEach(e=>{this.props.socket.unsubscribeState(`javascript.${e}.scriptProblem.*`,this.onProblemUpdatedBound)}),this.filterTimer&&=(clearTimeout(this.filterTimer),null),this.problemsTimer&&=(clearTimeout(this.problemsTimer),null)}onProblemUpdated(e,t){if(!t||!e)return;e=`${fa}.${e.replace(/^javascript\.\d+\.scriptProblem\./,``)}`,this.problems||=JSON.parse(JSON.stringify(this.state.problems))||[];let n=!1;if(t.val)this.problems.includes(e)||(this.problems.push(e),n=!0);else{let t=this.problems.indexOf(e);t!==-1&&(this.problems.splice(t,1),n=!0)}n&&!this.problemsTimer&&(this.problemsTimer=setTimeout(()=>{this.problemsTimer=null,this.setState({problems:this.problems}),this.problems=null},300))}static filterListStatic(e,t,n,r,i){t=JSON.parse(JSON.stringify(t));let a=!1,o={listItems:t};if(e&&n&&r){let e=r.toLowerCase();if(t.forEach(t=>{var n;let r=t.title.toLowerCase();t.filteredPartly=!1;let o=r.includes(e),s=i==null||(n=i[t.id])==null?void 0:n.common;if(!o&&s!=null&&s.source)if(s.engineType===`Blockly`){let t=s.source.lastIndexOf(`//`);o=s.source.substring(0,t).toLowerCase().includes(e)}else o=s.source.toLowerCase().includes(e);o?t.filtered&&(t.filtered=!1,a=!0):t.filtered||(t.filtered=!0,a=!0)}),a)for(let e=t.length-1;e>=0;e--){let n=t[e];if(!n.filtered||n.filteredPartly){let e=n;do e!=null&&e.parent&&t[e.parentIndex]&&(a=!0,t[e.parentIndex].filteredPartly=!0),e=e!=null&&e.parent&&t[e.parentIndex]?t[e.parentIndex]:null;while(e)}}}else t.forEach(e=>{(e.filtered||e.filteredPartly)&&(e.filtered=!1,e.filteredPartly=!1,a=!0)}),e||(o.searchText=``,o.searchMode=!1,a=!0);return a?o:null}filterList(t,n){let r=e.filterListStatic(t,this.state.listItems,this.state.searchMode,this.state.searchText,this.props.scripts);r?this.setState(r,()=>n&&n()):n&&n()}static ensureSelectedIsVisibleStatic(e,t,n){t=JSON.parse(JSON.stringify(t));let r=!1,i=typeof e==`object`?e:n.find(t=>t.id===e);do{if(i!=null&&i.parent){let e=i.parent;i=n.find(t=>t.id===e)}else i=void 0;i&&(t.includes(i.id)||(t.push(i.id),r=!0))}while(i);return r?t:null}ensureSelectedIsVisible(t,n){return e.ensureSelectedIsVisibleStatic(t||this.state.selected,n||this.state.expanded,this.state.listItems)}static getDerivedStateFromProps(t,n){let r={},i=!1;if(n.expertMode!==t.expertMode&&(i=!0,r.expertMode=t.expertMode),n.scriptsHash!==t.scriptsHash&&t.scripts){let a=ya(t.scripts||{});if(r.listItems=a,n.searchText){let i=e.filterListStatic(!0,a,n.searchMode,n.searchText,t.scripts);i&&Object.assign(r,i)}let o=e.getIsAllZeroInstancesStatic(a,t.instances||[]),s=e.ensureSelectedIsVisibleStatic(n.selected,n.expanded,n.listItems);r.isAllZeroInstances=o,s&&(r.expanded=s),i=!0}if(n.width!==t.width&&(i=!0,r.width=t.width),n.themeName!==t.themeName&&(i=!0,r.themeName=t.themeName),t.selectId&&n.selected!==t.selectId){let a=n.listItems.find(e=>e.id===t.selectId);if(!n.reorder&&a){let t=e.ensureSelectedIsVisibleStatic(a,n.expanded,n.listItems);r.selected=a.id,t&&(r.expanded=t),i=!0,window.localStorage&&window.localStorage.setItem(`SideMenu.selected`,a.id)}}return i?r:null}static getIsAllZeroInstancesStatic(e,t){let n=!t[0]&&t.length<=1;return n&&e.forEach(e=>{e.type!==`folder`&&e.instance!==0&&(n=!1)}),n}getIsAllZeroInstances(t,n){return t||=this.state.listItems,n||=this.state.instances,e.getIsAllZeroInstancesStatic(t||this.state.listItems,n||this.state.instances)}saveExpanded(e){window.localStorage.setItem(`SideMenu.expanded`,JSON.stringify(e||this.state.expanded))}showError(e){this.setState({errorText:e})}onToggle(e,t){if(t==null||t.stopPropagation(),e===fa)return;let n=[...this.state.expanded],r=n.indexOf(e);r===-1?(n.push(e),n.sort()):(n.splice(r,1),this.state.selected&&this.state.selected.startsWith(`${e}.`)&&window.localStorage&&window.localStorage.setItem(`SideMenu.selected`,e)),this.setState({expanded:n}),this.saveExpanded(n)}renderItemButtonsOnEnd(e,t){if(this.state.reorder)return null;if(e.type!==`folder`){let t=e.enabled?la:da;return e.enabled&&this.state.problems.includes(e.id)&&(t=ua),[W(U,{onClick:t=>{t.stopPropagation(),this.props.onEnableDisable&&this.props.onEnableDisable(e.id,!e.enabled)},title:e.enabled?H.t(`Pause script`):H.t(`Run script`),disabled:this.props.debugMode,style:{...q.iconButtons,...this.props.debugMode?q.iconButtonsDisabled:void 0,color:t},size:`medium`,children:e.enabled?W(zt,{}):W(Ut,{})},`startStop`),this.state.width>ha?W(U,{style:this.props.debugMode?q.iconButtonsDisabled:void 0,title:H.t(`Delete script`),disabled:e.id===ma||e.id===pa||this.props.debugMode,onClick:t=>this.onDelete(e,t),size:`medium`,children:W(Ye,{})},`delete`):null,W(U,{style:this.props.debugMode?q.iconButtonsDisabled:void 0,disabled:this.props.debugMode,title:H.t(`Edit script or just double click`),onClick:t=>this.onEdit(e,t),size:`medium`,children:W(en,{})},`openInEdit`)]}return this.state.width>ha&&e.id!==fa&&e.id!==pa&&e.id!==ma&&!(t!=null&&t.length)?W(U,{style:this.props.debugMode?q.iconButtonsDisabled:void 0,title:H.t(`Delete folder`),disabled:e.id===ma||e.id===pa||this.props.debugMode,onClick:t=>this.onDelete(e,t),size:`medium`,children:W(Ye,{})},`delete`):null}onDelete(e,t){return t==null||t.stopPropagation(),new Promise(t=>{if(!e){t();return}typeof e==`object`?this.setState({deleting:e.id},()=>t()):this.setState({deleting:e},()=>t())})}onEdit(e,t){this.onClick(e,t),this.props.onEdit&&this.props.onEdit(e.id)}getTextStyle(e){return!this.state.reorder&&e.type!==`folder`?{width:`calc(100% - ${this.state.width>ha?185:137}px)`,overflow:`hidden`,whiteSpace:`nowrap`,flex:`none`,padding:`0 16px 0 0`}:{whiteSpace:`nowrap`,padding:`0 16px 0 0`}}onClick(e,t){if(t==null||t.stopPropagation(),!this.state.reorder&&e){let t=this.ensureSelectedIsVisible(e),n={selected:e.id};t&&(n.expanded=t),this.setState(n),window.localStorage&&window.localStorage.setItem(`SideMenu.selected`,e.id)}}onDblClick(e,t){t==null||t.stopPropagation(),!this.state.reorder&&(e.type===`folder`?this.onToggle(e.id):this.onEdit(e))}isFilteredOut(e){var t;return e.filtered&&!e.filteredPartly||this.state.typeFilter&&e.type!==`folder`&&e.type.toLowerCase()!==this.state.typeFilter.toLowerCase()||!this.state.expertMode&&(t=this.props.scripts[e.id])!=null&&(t=t.native)!=null&&t.protected||this.state.statusFilter&&e.type!==`folder`&&(this.state.statusFilter===`running`&&!e.enabled||this.state.statusFilter===`paused`&&e.enabled||this.state.statusFilter===`problems`&&(!e.enabled||!this.state.problems.includes(e.id)))?!0:e.id===ma&&!this.state.expertMode}hasVisibleContent(e,t){return e.type===`folder`?t.some(n=>n.parent===e.id&&this.hasVisibleContent(n,t)):!this.isFilteredOut(e)}countDescendantScripts(e,t){let n=0,r=t.filter(t=>t.parent===e.id);for(let e of r)e.type===`folder`?n+=this.countDescendantScripts(e,t):n++;return n}countVisibleDescendantScripts(e,t){let n=0,r=t.filter(t=>t.parent===e.id);for(let e of r)e.type===`folder`?n+=this.countVisibleDescendantScripts(e,t):this.isFilteredOut(e)||n++;return n}renderListItem(e,t,n,r=0,i=0){var a;if(e.id===fa&&!this.state.reorder)return null;let o=(this.state.reorder?e.depth:e.depth-1)*ga,s=e.title;if(this.state.searchText){let e=s.toLowerCase().indexOf(this.state.searchText.toLowerCase());e!==-1&&(s=[W(`span`,{children:s.substring(0,e)},`first`),W(`span`,{style:{color:`orange`},children:s.substring(e,e+this.state.searchText.length)},`second`),W(`span`,{children:s.substring(e+this.state.searchText.length)},`third`)])}if(!this.state.isAllZeroInstances&&e.type!==`folder`){let t=this.state.runningInstances[`system.adapter.javascript.${e.instance}`];s=[O(`span`,{title:`${H.t(`Instance`)} ${e.instance}${t?``:` (${H.t(`not running`)})`}`,style:{...q.instances,color:t?la:da},children:[`[`,e.instance,`]`]},`instance`),W(`span`,{children:s},`title`)]}let c=this.state.reorder&&!this.props.debugMode,l={marginLeft:o,cursor:e.type===`folder`&&c?`default`:`inherit`,width:`calc(100% - ${o}px)`};c||(l.opacity=e.filteredPartly?.5:1),e.id===ma&&e.id!==this.state.selected&&(l.color=`#00a200`);let u=e.id===fa;!u&&t&&(u=this.state.expanded.includes(e.id));let d;d=e.type===`folder`?{...q.folderIcon,...c?q.folderIconReorder:q.folderIconNoReorder}:{...q.scriptIcon},e.id===ma?d.color=`#356956`:e.id===pa&&(d.color=`#4899e1`);let f=null;if(e.type===`folder`&&r>0){let e=!!(this.state.statusFilter||this.state.typeFilter);f=W(`span`,{style:q.childrenCount,children:e&&i!==r?`${i}(${r})`:r})}let p={...e.type===`folder`?q.folder:q.script,...c?q.reorder:void 0,...c&&e.type!==`folder`?q.scriptReorder:void 0,...c&&e.type===`folder`?q.folderReorder:void 0,...l};return O(Mt,{style:p,sx:e.id===this.state.selected&&!c?q.selected:void 0,className:He.clsx(c&&e.type===`folder`&&`folder-reorder`,c&&e.type!==`folder`&&`script-reorder`),onClick:t=>this.onClick(e,t),onDoubleClick:t=>this.onDblClick(e,t),secondaryAction:this.renderItemButtonsOnEnd(e,t),children:[(a=this.props.scripts[e.id])!=null&&(a=a.native)!=null&&a.protected?W(tn,{style:{color:`orange`,position:`absolute`,right:5,width:10,height:10}}):null,W(Ot,{style:q.listItemIcon,children:e.type===`folder`?W(c||u?ut:Ae,{style:d,onClick:t=>!c&&this.onToggle(e.id,t)}):W(`img`,{style:d,alt:e.type,src:_a[e.type]||_a.def})}),W(pe,{sx:{"& .MuiListItemText-primary":e.id===this.state.selected&&!c?q.selected:void 0},style:this.getTextStyle(e),primary:O(`span`,{style:{display:`flex`,alignItems:`center`},children:[W(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`},children:s}),f]})})]},e.id)}onDragFinish(e,t){let n=`${t}.${e.split(`.`).pop()}`;n!==e&&(this.state.listItems.find(e=>e.id===n)&&(n+=`_${H.t(`copy`)}`),this.props.onRename&&this.props.onRename(e,n))}renderOneItem(e,t){let n=this.state.statusFilter||this.state.typeFilter?e.filter(n=>n.parent===t.id&&this.hasVisibleContent(n,e)):[],r=e.filter(e=>e.parent===t.id);if(this.isFilteredOut(t)||t.type===`folder`&&(this.state.statusFilter||this.state.typeFilter)&&!n.length)return null;let i=this.state.reorder&&!this.props.debugMode,a=t.type===`folder`?this.countDescendantScripts(t,e):0,o=t.type===`folder`&&(this.state.statusFilter||this.state.typeFilter)?this.countVisibleDescendantScripts(t,e):a,s=this.renderListItem(t,r,n,a,o),c=[],l;return r&&(i||this.state.expanded.includes(t.id)||t.id===fa)&&(l=r.map(t=>this.renderOneItem(e,t)).reduce((e,t)=>t?e.concat(t.filter(e=>!!e)):e,[])),i?t.type===`folder`?c.push(O(ba,{onDrop:e=>this.onDragFinish(e.name,t.id),folderName:t.id,children:[W(xa,{name:t.id,children:s},`draggable_${t.id}`),W(`div`,{children:l||null})]},`droppable_${t.id}`)):c.push(O(xa,{name:t.id,children:[s,l||null]},`draggable_${t.id}`)):(c.push(s),l==null||l.forEach(e=>c.push(e))),c}renderAllItems(e){let t=e.filter(e=>!e.parent).map(t=>this.renderOneItem(e,t)).reduce((e,t)=>t?e.concat(t.filter(e=>!!e)):e,[]);return W(wt,{dense:!0,disablePadding:!0,sx:q.mainList,children:t})}onAddNew(e){e==null||e.stopPropagation();let t=this.state.listItems.find(e=>e.id===this.state.selected),n=fa;for(;t&&t.type!==`folder`;)t=this.state.listItems[t.parentIndex];t&&(n=t.id),this.parent=n,this.setState({choosingType:!0})}onCopy(e,t){e==null||e.stopPropagation();let n=this.state.listItems.find(e=>e.id===t),r=fa;for(;n&&n.type!==`folder`;)n=this.state.listItems[n.parentIndex];n&&(r=n.id),this.parent=r,this.setState({copingScript:t||``})}onAddNewFolder(e){e==null||e.stopPropagation();let t=this.state.listItems.find(e=>e.id===this.state.selected),n=fa;for(;t&&t.type!==`folder`;)t=this.state.listItems[t.parentIndex];t&&(n=t.id),this.parent=n,this.setState({creatingFolder:!0})}onRename(e){e==null||e.stopPropagation(),this.setState({renaming:this.state.selected})}getUniqueName(e){let t=1,n=`${H.t(`Script`)} `;if(e){let r=va(e,this.props.scripts[e]),i=r.match(/\d+$/);i?(n=r.replace(/\d+$/,``),t=parseInt(i[0],10)+1):n=r}for(;this.state.listItems.find(e=>e.id===`${this.parent}.${n.replace(/\.\s/g,`_`)}${t}`);)t++;return n+t}getUniqueFolderName(){let e=1;for(;this.state.listItems.find(t=>t.id===`${this.parent}.${H.t(`Folder`)}_${e}`);)e++;return`${H.t(`Folder`)} ${e}`}onCloseMenu(e){this.setState({menuOpened:!1,menuAnchorEl:null,menuAnchorFilterEl:null},e)}getMainMenu(e,t){var n,r;let i=this.state.expertMode&&!!Object.keys(this.props.changedScripts).find(e=>{var t;return this.props.changedScripts[e]&&((t=this.props.scripts[e])==null||(t=t.native)==null?void 0:t.protected)});return O(Et,{id:`long-menu`,anchorEl:this.state.menuAnchorEl,open:this.state.menuOpened,onClose:()=>this.setState({menuOpened:!1,menuAnchorEl:null}),slotProps:{paper:{style:{maxHeight:ca*7.5}}},children:[this.state.width<=ha?O(he,{disabled:this.props.debugMode||!this.state.selected||this.state.selected===ma||this.state.selected===pa||!!(e!=null&&e.length),onClick:e=>{if(e.stopPropagation(),e.preventDefault(),this.state.listItems.find(e=>e.parent===this.state.selected)){this.showError(H.t(`Cannot delete non empty item!`));return}this.setState({menuOpened:!1,menuAnchorEl:null},()=>this.onDelete(this.state.selected).then(()=>{}))},children:[W(Ye,{style:{...q.iconDropdownMenu,color:`red`}}),H.t(`Delete`)]},`delete`):null,O(he,{disabled:this.props.debugMode||i,selected:this.state.expertMode,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.onCloseMenu(()=>this.props.onExpertModeChange&&this.props.onExpertModeChange(!this.state.expertMode))},children:[W(jt,{style:{...q.iconDropdownMenu,color:this.state.expertMode?`orange`:`inherit`}}),H.t(`Expert mode`)]},`expertMode`),this.props.onExport&&O(he,{onClick:e=>{e.stopPropagation(),e.preventDefault(),this.onCloseMenu(()=>this.setState({showExportDialog:!0}))},children:[W(st,{style:q.iconDropdownMenu}),H.t(`Export all scripts`)]},`exportAll`),this.props.onImport&&O(he,{disabled:this.props.debugMode,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.onCloseMenu(()=>this.props.onImport())},children:[W(_t,{style:q.iconDropdownMenu}),H.t(`Import scripts`)]},`import`),this.props.onThemeChange&&O(he,{onClick:()=>this.onCloseMenu(()=>{this.props.onThemeChange&&this.props.onThemeChange(He.toggleTheme(this.state.themeName))}),children:[W(rn,{style:q.iconDropdownMenu}),H.t(`Change theme (actual "%s")`,this.state.themeName)]},`dark`),this.props.onAddNew&&O(he,{disabled:!this.state.selected||!t||t.type===`folder`,onClick:e=>{let t=this.state.selected;this.onCloseMenu(()=>this.onCopy(e,t))},children:[W(De,{style:q.iconDropdownMenu}),H.t(`Copy script`)]},`copy`),this.state.expertMode&&O(he,{disabled:this.props.debugMode,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.onCloseMenu(()=>this.setState({showAdapterDebug:!0}))},children:[W(Qt,{style:q.iconDropdownMenu}),H.t(`Debug instance`)]},`debugInstance`),this.state.selected&&this.props.password&&this.props.scripts[this.state.selected].type===`script`?O(he,{disabled:this.props.debugMode||this.props.changedScripts[this.state.selected],onClick:e=>{e.stopPropagation(),e.preventDefault(),this.onCloseMenu(async()=>{let e=await this.props.socket.getObject(this.state.selected);if(e){var t;(t=e.native)!=null&&t.protected?(delete e.native.protected,e.common.source=sa(this.props.password,e.common.source||``)):(e.native||={},e.native.protected=!0,e.common.source=oa(this.props.password,e.common.source||``)),await this.props.socket.setObject(e._id,e)}})},children:[W(tn,{style:{...q.iconDropdownMenu,color:`orange`}}),(n=this.props.scripts[this.state.selected])!=null&&(n=n.native)!=null&&n.protected?W(`span`,{style:{color:(r=this.props.scripts[this.state.selected])!=null&&(r=r.native)!=null&&r.protected?`orange`:void 0},children:H.t(`Unprotect script`)}):H.t(`Protect script`)]},`encrypt`):null]},`menu`)}getToolbarButtons(){let e=[],t=this.state.reorder&&!this.props.debugMode;if(this.state.searchMode&&!this.props.debugMode)e.push(W(rt,{value:this.state.searchText,style:q.toolbarSearch,ref:this.inputRef,autoFocus:!0,placeholder:H.t(`Search...`),onChange:e=>{this.setState({searchText:e.target.value}),this.filterTimer&&clearTimeout(this.filterTimer),this.filterTimer=setTimeout(()=>{this.filterTimer=null,this.filterList(!0),this.props.onSearch&&this.props.onSearch(this.state.searchText)},400)}},`searchInput`)),e.push(W(U,{sx:q.toolbarButtons,style:{float:`right`},title:H.t(`End search mode`),onClick:e=>{e.stopPropagation(),this.filterList(!1,()=>this.props.onSearch&&this.props.onSearch(this.state.searchText))},size:`medium`,children:W($t,{})},`disableSearch`)),this.state.searchText&&e.push(W(U,{title:H.t(`Clear search input`),sx:q.toolbarButtons,style:{marginTop:7,float:`right`},onClick:e=>{e.stopPropagation(),this.setState({searchText:``},()=>{this.filterList(!0),this.props.onSearch&&this.props.onSearch(this.state.searchText)})},size:`medium`,children:W(Pt,{fontSize:`small`})},`cleanSearch`));else{if(!t){e.push(W(U,{"aria-label":`More`,"aria-owns":this.state.menuOpened?`long-menu`:void 0,title:H.t(`Menu`),"aria-haspopup":`true`,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({menuOpened:!0,menuAnchorEl:e.currentTarget})},size:`medium`,children:W(nn,{})},`menuButton`));let n=this.state.listItems.find(e=>e.id===this.state.selected),r;n&&this.state.width<=ha&&n.type===`folder`&&(r=this.state.listItems.filter(e=>e.parent===this.state.selected)),e.push(this.getMainMenu(r,n)),e.push(W(U,{disabled:this.props.debugMode,title:H.t(`Create new script`),sx:{...q.toolbarButtons,...this.props.debugMode?q.iconButtonsDisabled:void 0},style:{color:t?`red`:`inherit`},onClick:e=>this.onAddNew(e),size:`medium`,children:W(f,{})},`new-script`)),e.push(W(U,{disabled:this.props.debugMode,title:H.t(`Create new folder`),sx:{...q.toolbarButtons,...this.props.debugMode?q.iconButtonsDisabled:void 0},style:{color:t?`red`:`inherit`},onClick:e=>this.onAddNewFolder(e),size:`medium`,children:W(Ge,{})},`new-folder`))}e.push(W(U,{disabled:t||this.props.debugMode,sx:{...q.toolbarButtons,...this.props.debugMode?q.iconButtonsDisabled:void 0},title:H.t(`Search in scripts`),style:{float:`right`,opacity:this.props.debugMode?.5:+!t},onClick:e=>{e.stopPropagation(),this.setState({searchMode:!0})},size:`medium`,children:W(an,{})},`search`)),e.push(W(U,{disabled:this.props.debugMode,title:H.t(`Reorder scripts in folders`),sx:{...q.toolbarButtons,...this.props.debugMode?q.iconButtonsDisabled:void 0},style:{color:t?`red`:`inherit`,float:`right`},onClick:e=>{e.stopPropagation(),this.setState({reorder:!this.state.reorder})},size:`medium`,children:W(on,{})},`reorder`)),!t&&this.state.selected&&this.state.selected!==ma&&this.state.selected!==pa&&e.push(W(U,{sx:{...q.toolbarButtons,...this.props.debugMode?q.iconButtonsDisabled:void 0},disabled:this.props.debugMode,title:H.t(`Rename`),onClick:e=>this.onRename(e),size:`medium`,children:W(at,{})},`rename`)),e.push(O(`span`,{style:{opacity:.5,fontSize:10},children:[`v`,this.props.version]},`version`))}return e}getFolders(){let e=[{id:fa,name:H.t(`Root folder`)}];return this.state.listItems.forEach(t=>{t.type===`folder`&&t.id!==fa&&(!t.id.startsWith(ma)||this.state.expertMode)&&e.push({id:t.id,name:t.title})}),e}onCollapseAll(){this.setState({expanded:[]}),this.saveExpanded([])}onExpandAll(){let e=[];this.state.listItems.forEach(t=>this.state.listItems.find(e=>e.parent===t.id)&&e.push(t.id)),this.setState({expanded:e}),this.saveExpanded(e)}getBottomButtons(){return this.state.reorder||this.props.debugMode?null:[W(u,{sx:q.footerButtons,title:H.t(`Show only running scripts`),onClick:e=>{e.stopPropagation(),e.preventDefault();let t=this.state.statusFilter===`running`?``:`running`;window.localStorage&&window.localStorage.setItem(`SideMenu.statusFilter`,t),this.setState({statusFilter:t})},children:W(zt,{style:{color:la,opacity:this.state.statusFilter===`running`?1:.3,background:this.state.statusFilter===`running`?`gray`:`inherit`}})},`filterByRunning`),W(u,{sx:q.footerButtons,title:H.t(`Show only paused scripts`),onClick:()=>{let e=this.state.statusFilter===`paused`?``:`paused`;window.localStorage&&window.localStorage.setItem(`SideMenu.statusFilter`,e),this.setState({statusFilter:e})},children:W(Ut,{style:{color:da,opacity:this.state.statusFilter===`paused`?1:.3,background:this.state.statusFilter===`paused`?`gray`:`inherit`}})},`filterByPaused`),W(u,{sx:q.footerButtons,style:{marginRight:16},title:H.t(`Show only scripts with problems`),onClick:()=>{let e=this.state.statusFilter===`problems`?``:`problems`;window.localStorage&&window.localStorage.setItem(`SideMenu.statusFilter`,e),this.setState({statusFilter:e})},children:W(zt,{style:{color:ua,opacity:this.state.statusFilter===`problems`?1:.3,background:this.state.statusFilter===`problems`?`gray`:`inherit`}})},`filterByProblem`),W(u,{sx:q.footerButtons,children:W(`img`,{alt:`Blockly`,style:{opacity:this.state.typeFilter===`Blockly`?1:.3,background:this.state.typeFilter===`Blockly`?`gray`:`inherit`},src:_a.Blockly||_a.def,onClick:()=>{let e=this.state.typeFilter===`Blockly`?``:`Blockly`;window.localStorage&&window.localStorage.setItem(`SideMenu.typeFilter`,e),this.setState({typeFilter:e})}})},`filterBlockly`),W(u,{sx:q.footerButtons,children:W(`img`,{alt:`Javascript`,style:{opacity:this.state.typeFilter===`Javascript/js`?1:.3,background:this.state.typeFilter===`Javascript/js`?`gray`:`inherit`},src:_a[`Javascript/js`]||_a.def,onClick:()=>{let e=this.state.typeFilter===`Javascript/js`?``:`Javascript/js`;window.localStorage&&window.localStorage.setItem(`SideMenu.typeFilter`,e),this.setState({typeFilter:e})}})},`filterJS`),W(u,{sx:q.footerButtons,children:W(`img`,{alt:`TypeScript`,style:{opacity:this.state.typeFilter===`TypeScript/ts`?1:.3,background:this.state.typeFilter===`TypeScript/ts`?`gray`:`inherit`},src:_a[`TypeScript/ts`]||_a.def,onClick:()=>{let e=this.state.typeFilter===`TypeScript/ts`?``:`TypeScript/ts`;window.localStorage&&window.localStorage.setItem(`SideMenu.typeFilter`,e),this.setState({typeFilter:e})}})},`filterTS`),W(u,{sx:q.footerButtons,children:W(`img`,{alt:`Rules`,style:{opacity:this.state.typeFilter===`Rules`?1:.3,background:this.state.typeFilter===`Rules`?`gray`:`inherit`},src:_a.Rules||_a.def,onClick:()=>{let e=this.state.typeFilter===`Rules`?``:`Rules`;window.localStorage&&window.localStorage.setItem(`SideMenu.typeFilter`,e),this.setState({typeFilter:e})}})},`filterRules`),W(`div`,{style:{flexGrow:1}},`padding`),W(u,{sx:q.footerButtons,onClick:()=>this.onExpandAll(),title:H.t(`Expand all`),children:W(cn,{style:q.footerButtonsRight})},`expandAll`),this.state.expanded.length?W(u,{sx:q.footerButtons,onClick:()=>this.onCollapseAll(),title:H.t(`Collapse all`),children:W(sn,{style:q.footerButtonsRight})},`collapseAll`):W(`div`,{style:{height:22,width:24}})]}getAdapterDebugDialog(){return this.state.showAdapterDebug?W($i,{socket:this.props.socket,onClose:()=>this.setState({showAdapterDebug:!1}),onDebug:(e,t)=>this.setState({showAdapterDebug:!1},()=>this.props.onDebugInstance({instance:e,adapter:t}))},`debug`):null}render(){var e,t;let n=this.state.renaming?this.state.listItems.find(e=>e.id===this.state.renaming):void 0,r=this.state.copingScript&&this.props.scripts[this.state.copingScript].type===`script`?this.props.scripts[this.state.copingScript]:void 0;return[O(Oe,{variant:`permanent`,style:q.menu,sx:{"& .MuiDrawer-paper":q.drawerPaper},anchor:`left`,onClick:()=>this.onClick({id:``}),children:[W(u,{sx:q.toolbar,children:this.getToolbarButtons()}),W(Xe,{}),W(si,{backend:Ri,children:W(`div`,{style:q.innerMenu,children:this.renderAllItems(this.state.listItems)})}),W(Xe,{}),W(`div`,{style:q.footer,children:this.getBottomButtons()})]},`drawer`),n?W(Ui,{name:n.title,id:this.state.renaming||``,folder:n.type===`folder`,instance:n.instance,instances:this.props.instances,instanceHosts:this.props.instanceHosts,onClose:()=>this.setState({renaming:null}),onRename:(e,t,n,r)=>this.props.onRename&&this.props.onRename(e,t,n,r)},`dialog-rename`):null,this.state.deleting?W(Wi,{name:this.state.listItems.find(e=>e.id===this.state.deleting).title,id:this.state.deleting,onClose:()=>this.setState({deleting:null}),onDelete:e=>this.props.onDelete&&this.props.onDelete(e)},`dialog-delete`):null,this.state.choosingType?W(Xi,{onClose:e=>{let t={choosingType:!1};e&&(t.creatingScript=e),this.setState(t)}},`dialog-script-type`):null,this.state.creatingScript?W(Zi,{onClose:()=>this.setState({creatingScript:null}),title:H.t(`Create new script`),name:this.getUniqueName(),parents:this.getFolders(),folder:!1,existingItems:this.state.listItems.map(e=>e.id),instance:this.props.instances[0]||0,instances:this.props.instances,type:this.state.creatingScript,parent:this.parent,onAdd:(e,t,n,r)=>this.props.onAddNew&&this.props.onAddNew(e,t,!1,n,r)},`dialog-new-script`):null,this.state.copingScript?W(Zi,{onClose:()=>this.setState({copingScript:``}),title:H.t(`Copy script`),name:this.getUniqueName(this.state.copingScript),parents:this.getFolders(),folder:!1,instance:parseInt(r==null||(e=r.common)==null||(e=e.engine)==null?void 0:e.split(`.`).pop(),10)||0,instances:this.props.instances,type:(r==null||(t=r.common)==null?void 0:t.engineType)||`Javascript/js`,parent:this.parent,onAdd:(e,t,n,r)=>{var i;let a=this.state.copingScript&&this.props.scripts[this.state.copingScript].type===`script`?this.props.scripts[this.state.copingScript]:void 0;a!=null&&a.common&&(a.common.enabled=!1),this.props.onAddNew&&this.props.onAddNew(e,t,!1,n,r,a==null||(i=a.common)==null?void 0:i.source)}},`dialog-copy-script`):null,this.state.creatingFolder?W(Zi,{onClose:()=>this.setState({creatingFolder:!1}),title:H.t(`Create new folder`),parents:this.getFolders(),name:this.getUniqueFolderName(),parent:this.parent,onAdd:(e,t)=>this.props.onAddNew&&this.props.onAddNew(e,t,!0)},`dialog-new-folder`):null,this.state.errorText?W(Jt,{onClose:()=>this.setState({errorText:``}),text:this.state.errorText},`error`):null,this.getAdapterDebugDialog(),this.state.showExportDialog?O(a,{open:!0,onClose:()=>this.setState({showExportDialog:!1}),children:[W(gt,{children:H.t(`Export all scripts`)}),O(Be,{children:[W(w,{variant:`contained`,onClick:()=>{this.setState({showExportDialog:!1}),this.props.onExport(!0)},color:`primary`,children:H.t(`as JSON`)}),W(w,{variant:`contained`,onClick:()=>{this.setState({showExportDialog:!1}),this.props.onExport(!1)},color:`grey`,children:H.t(`as plain text`)}),W(w,{variant:`contained`,onClick:()=>this.setState({showExportDialog:!1}),color:`primary`,children:H.t(`Cancel`)})]})]},`dialog-export-format`):null]}};d();var Ca=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgAQMAAADYVuV7AAAABlBMVEUAAAAzMzPI8eYgAAAAAXRSTlMAQObYZgAAACFJREFUeAFjAIJRwP////8PYIKWHCigNQdKj/pn1D+jAABTG16wVQqVpQAAAABJRU5ErkJggg==`,wa=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgAQMAAADYVuV7AAAABlBMVEUAAAAzMzPI8eYgAAAAAXRSTlMAQObYZgAAABtJREFUeAFjAIJRwP8fCj7QkENn/4z6Z5QzCgBjbWaoyx1PqQAAAABJRU5ErkJggg==`;function Ta(e){let t,n=e.getHours();return n<10&&(n=`0${n.toString()}`),t=`${n}:`,n=e.getMinutes(),n<10&&(n=`0${n.toString()}`),t+=`${n}:`,n=e.getSeconds(),n<10&&(n=`0${n.toString()}`),t+=`${n}.`,n=e.getMilliseconds(),n<10?n=`00${n.toString()}`:n<100&&(n=`0${n.toString()}`),t+=n,t}var Ea=34,Da={logBox:{width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`},logBoxInner:e=>({display:`inline-block`,color:e.palette.mode===`dark`?`white`:`black`,width:`calc(100% - ${Ea}px)`,height:`100%`,overflow:`auto`,position:`relative`,verticalAlign:`top`}),info:e=>({background:e.palette.mode===`dark`?`darkgrey`:`lightgrey`,color:(e.palette.mode,`black`)}),error:e=>({background:`#FF0000`,color:e.palette.mode===`dark`?`black`:`white`}),warn:e=>({background:`#FF8000`,color:e.palette.mode===`dark`?`black`:`white`}),debug:e=>({background:`gray`,opacity:.8,color:e.palette.mode===`dark`?`black`:`white`}),silly:e=>({background:`gray`,opacity:.6,color:e.palette.mode===`dark`?`black`:`white`}),table:{fontFamily:`monospace`,width:`100%`},toolbox:{width:Ea,height:`100%`,boxShadow:`2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)`,display:`inline-block`,verticalAlign:`top`,overflow:`hidden`},trFrom:{width:90},trTime:{width:90},trSeverity:{width:40,fontWeight:`bold`},trPreMessage:{padding:0,margin:0},iconButtons:{width:32,height:32,padding:4},layoutIcon:e=>({"& img":{width:24,height:24,background:e.palette.mode===`dark`?`#9d9d9d`:void 0,borderRadius:e.palette.mode===`dark`?`30px`:void 0}})};function Oa(e){return e<10?`00${e}`:e<100?`0${e}`:e.toString()}var ka={},Aa=class e extends G.Component{constructor(t){super(t),T(this,`messagesEnd`,void 0),T(this,`logHandler`,t=>{let n=this.state.lines,r=this.state.editing.filter(e=>t.message.includes(e)),i=null;if(!r.length||(r.length===1?i=r[0]:(r.sort(),i=r[r.length-1]),!i))return;let a=n[i]||[],o=ka[i]||[];a.push(e.generateLine(t,i));let s=t.severity;(s===`info`||s===`warn`)&&(s+=` `);let c=new Date(t.ts);if(o.push(`${c.toLocaleString()}.${Oa(c.getMilliseconds())}\t[${s}]: ${t.message}`),a.length>300){let e=a.length-300;a.splice(0,e),o.splice(0,e)}ka[i]=o,n[i]=a,this.setState({lines:n})}),this.state={lines:{},goBottom:!0,selected:null,editing:this.props.editing||[]},this.messagesEnd=G.createRef()}static generateLine(e,t){let n=e.message||``;if(typeof n!=`object`){let t=RegExp(`${e.from.replace(`.`,`\\.`).replace(`)`,`\\)`).replace(`(`,`\\(`)} \\(\\d+\\) `,`g`),r=n.match(t);n=r?n.replace(r[0],``):n.replace(`${e.from} `,``)}return n.startsWith(`${t}: `)&&(n=n.substring(t.length+2)),O(u,{component:`tr`,sx:Da[e.severity],children:[W(`td`,{style:Da.trFrom,children:e.from}),W(`td`,{style:Da.trTime,children:Ta(new Date(e.ts))}),W(`td`,{style:Da.trSeverity,children:e.severity}),W(`td`,{children:W(`pre`,{style:Da.trPreMessage,children:n})})]},`tr_${e.ts}_${e.message.substring(e.message.length-10)}`)}scrollToBottom(){var e;(e=this.messagesEnd)==null||(e=e.current)==null||e.scrollIntoView({behavior:`smooth`})}componentDidMount(){this.props.socket.registerLogHandler(this.logHandler)}componentWillUnmount(){this.props.socket.unregisterLogHandler(this.logHandler)}componentDidUpdate(){this.state.goBottom&&this.scrollToBottom()}static getDerivedStateFromProps(e,t){let n=!1,r={};if(e.selected!==t.selected){let i=e.selected,a=t.lines;i&&(a[i]=a[i]||[],ka[i]=ka[i]||[]),r.selected=i,n=!0}if(JSON.stringify(e.editing)!==JSON.stringify(t.editing)){let i=JSON.parse(JSON.stringify(e.editing));n=!0;let a=t.lines;for(let e in ka)Object.prototype.hasOwnProperty.call(ka,e)&&(i.includes(e)||(delete ka[e],delete a[e]));r.editing=i}return n?r:null}onCopy(){He.copyToClipboard((ka[this.state.selected]||[]).join(` `))}clearLog(){let e=this.state.lines;e[this.state.selected]&&(e[this.state.selected]=[]),ka[this.state.selected]&&(ka[this.state.selected]=[]),this.setState({lines:e})}renderLogList(e){return this.state.selected&&e!=null&&e.length?O(u,{sx:Da.logBoxInner,children:[W(`table`,{style:Da.table,children:W(`tbody`,{children:e})},`logTable`),W(`div`,{ref:this.messagesEnd,style:{float:`left`,clear:`both`}},`logScrollPoint`)]},`logList`):W(u,{sx:Da.logBoxInner,style:{paddingLeft:10},children:H.t(`Log outputs`)},`logList`)}render(){let e=this.state.selected?this.state.lines[this.state.selected]:null;return O(`div`,{style:Da.logBox,children:[O(`div`,{style:Da.toolbox,children:[W(U,{style:Da.iconButtons,onClick:()=>this.setState({goBottom:!this.state.goBottom}),color:this.state.goBottom?`secondary`:void 0,size:`medium`,children:W(Se,{})}),e!=null&&e.length?W(U,{style:Da.iconButtons,onClick:()=>this.clearLog(),size:`medium`,children:W(N,{})}):null,e!=null&&e.length?W(U,{style:Da.iconButtons,onClick:()=>this.onCopy(),size:`medium`,children:W(_,{})}):null,this.props.onLayoutChange?W(U,{style:Da.iconButtons,onClick:()=>this.props.onLayoutChange&&this.props.onLayoutChange(),title:H.t(`Change layout`),size:`medium`,sx:Da.layoutIcon,children:W(`img`,{alt:`split`,src:this.props.verticalLayout?Ca:wa})}):null,W(U,{style:Da.iconButtons,onClick:()=>this.props.onHideLog(),title:H.t(`Hide logs`),size:`medium`,children:W(oe,{})})]},`toolbox`),this.renderLogList(e)]})}},ja=`focus-outline-hidden`;function Ma(){var e=this;document.addEventListener(`keydown`,function(t){e.focusByKeyboard=!0},!0),document.addEventListener(`mousedown`,function(t){e.focusByKeyboard=!1},!0),document.addEventListener(`focus`,function(t){e.updateVisibility()},!0),document.addEventListener(`focusout`,function(t){window.setTimeout(function(){document.hasFocus()||(e.focusByKeyboard=!0,e.updateVisibility())},0)}),this.updateVisibility()}Ma.prototype={focusByKeyboard:!0,updateVisibility:function(){this.hidden=!this.focusByKeyboard},set hidden(e){document.documentElement.classList.toggle(ja,e)},get hidden(){return document.documentElement.classList.contains(ja)}},new Ma;var Na=r(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r{Object.defineProperty(e,"__esModule",{value:!0});var t=e.easeFunctions={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},n=e.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};e.setPosition=function(e,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:`easeInOutCubic`;return r>i?n:e+(n-e)*t[a](r/i)},e.calcEndPoint=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(n(e))return parseInt(e)+r;var i=t===window||t===document.documentElement?window.pageYOffset:t.scrollTop-t.getBoundingClientRect().top;return(e.nodeName.toLowerCase()===`html`?-i:e.getBoundingClientRect().top+i)+r}})),Fa=r(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},r=Pa();e.default=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.duration,a=i===void 0?500:i,o=t.context,s=o===void 0?window:o,c=t.offset,l=c===void 0?0:c,u=t.ease,d=u===void 0?`easeInOutCubic`:u,f=t.callback;if((typeof window>`u`?`undefined`:n(window))===`object`){var p=s.scrollTop!==null&&s.scrollTop!==void 0?s.scrollTop:window.pageYOffset,m=(0,r.calcEndPoint)(e,s,l),h=performance.now(),g=window.requestAnimationFrame;(function t(){var n=performance.now()-h,i=(0,r.setPosition)(p,m,n,a,d);s===window?window.scroll(0,i):s.scrollTop=i,n>a?typeof f==`function`&&f(e):g(t)})()}},t.exports=e.default})),Ia=r(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{},t=e.query,i=t===void 0?`[href^="#"]:not([href="#"]`:t,a=e.match,o=a===void 0?function(e){return document.getElementById(e.hash.substring(1))}:a,s=e.hashChange,c=s===void 0||s,l=e.scrollSmoothConfig,u=document.querySelectorAll(i),d=function(e){e.preventDefault();var t=o(e.target);t&&(c&&history.replaceState(null,null,`#`+t.id),(0,r.default)(t,n({},l)))};Array.from(u).map(function(e){e.addEventListener(`click`,d,!1)})},t.exports=e.default})),La=r(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:{},t=e.activeClass,r=t===void 0?`active`:t,i=e.query,a=i===void 0?`[href^="#"]:not([href="#"]):not([href="#0"])`:i,o=e.threshold,s=o===void 0?[.25,.5,.75]:o,c=e.detectType,l=c===void 0?`max`:c,u={threshold:s},d=function(e){return e.classList.remove(r)},f=function(e){return e.classList.add(r)},p=function(){document.querySelectorAll(`.`+r).forEach(d)},m=function(e){p(),f(document.querySelector(`a[href="#`+e.id+`"]`))},h=function(e){e.forEach(function(e){e.intersectionRatio>=Math[l].apply(Math,n(s))&&m(e.target)})},g=document.querySelectorAll(a),_=new IntersectionObserver(h,u);g.forEach(function(e){var t=document.querySelector(`#`+e.hash.slice(1));_.observe(t)})},t.exports=e.default})),Ra=r(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=o(Fa()),r=Pa(),i=o(Ia()),a=o(La());function o(e){return e&&e.__esModule?e:{default:e}}e.default={to:n.default,calcEndPoint:r.calcEndPoint,anchorScroll:i.default,observe:a.default},t.exports=e.default})),za=r(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n():e.Scrollparent=n()})(e,function(){var e=/(auto|scroll)/,t=function(e,n){return e.parentNode===null?n:t(e.parentNode,n.concat([e]))},n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return n(e,`overflow`)+n(e,`overflow-y`)+n(e,`overflow-x`)},i=function(t){return e.test(r(t))};return function(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var n=t(e.parentNode,[]),r=0;r{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(S,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function x(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function S(){var e=m();if(x(e))return C(e);s=setTimeout(S,b(e))}function C(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function T(){return s===void 0?o:C(m())}function E(){var e=m(),n=x(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(S,t),_(c)}return s===void 0&&(s=setTimeout(S,t)),o}return E.cancel=w,E.flush=T,E}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h})),Va=t(Na()),Ha=t(Ra()),Ua=t(za()),Wa=t(Ba());function Ga(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ka=`data-focus-lock`,qa=`data-focus-lock-disabled`,Ja=`data-no-focus-lock`,Ya=`data-autofocus-inside`,Xa=`data-no-autofocus`;function Za(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}d();function Qa(e,t){var n=Nt(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}d();var $a=typeof window<`u`?Je:ft,eo=new WeakMap;function to(e,t){var n=Qa(t||null,function(t){return e.forEach(function(e){return Za(e,t)})});return $a(function(){var t=eo.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Za(e,null)}),i.forEach(function(e){r.has(e)||Za(e,a)})}eo.set(n,e)},[e]),n}d();var no={width:`1px`,height:`0px`,padding:0,overflow:`hidden`,position:`fixed`,top:`1px`,left:`1px`},ro=function(){return ro=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0}).sort(zo)},Ho=[`button:enabled`,`select:enabled`,`textarea:enabled`,`input:enabled`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[tabindex]`,`[contenteditable]`,`[autofocus]`].join(`,`),Uo=`${Ho}, [data-focus-guard]`,Wo=function(e,t){return yo((e.shadowRoot||e).children).reduce(function(e,n){return e.concat(n.matches(t?Uo:Ho)?[n]:[],Wo(n))},[])},Go=function(e,t){var n;return e instanceof HTMLIFrameElement&&(n=e.contentDocument)!=null&&n.body?Ko([e.contentDocument.body],t):[e]},Ko=function(e,t){return e.reduce(function(e,n){var r,i=Wo(n,t),a=(r=[]).concat.apply(r,i.map(function(e){return Go(e,t)}));return e.concat(a,n.parentNode?yo(n.parentNode.querySelectorAll(Ho)).filter(function(e){return e===n}):[])},[])},qo=function(e){return yo(e.querySelectorAll(`[${Ya}]`)).map(function(e){return Ko([e])}).reduce(function(e,t){return e.concat(t)},[])},Jo=function(e,t){return yo(e).filter(function(e){return Do(t,e)}).filter(function(e){return Po(e)})},Yo=function(e,t){return t===void 0&&(t=new Map),yo(e).filter(function(e){return ko(t,e)})},Xo=function(e,t,n){return Vo(Jo(Ko(e,n),t),!0,n)},Zo=function(e,t){return Vo(Jo(Ko(e),t),!1)},Qo=function(e,t){return Jo(qo(e),t)},$o=function(e,t){return e.shadowRoot?$o(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:yo(e.children).some(function(e){var n;if(e instanceof HTMLIFrameElement){var r=(n=e.contentDocument)==null?void 0:n.body;return r?$o(r,t):!1}return $o(e,t)})},es=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(e,n){return!t.has(n)})},ts=function(e){return e.parentNode?ts(e.parentNode):e},ns=function(e){return bo(e).filter(Boolean).reduce(function(e,t){var n=t.getAttribute(Ka);return e.push.apply(e,n?es(yo(ts(t).querySelectorAll(`[${Ka}="${n}"]:not([${qa}="disabled"])`))):[t]),e},[])},rs=function(e){try{return e()}catch{return}},is=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?is(t.shadowRoot):t instanceof HTMLIFrameElement&&rs(function(){return t.contentWindow.document})?is(t.contentWindow.document):t}},as=function(e,t){return e===t},os=function(e,t){return!!yo(e.querySelectorAll(`iframe`)).some(function(e){return as(e,t)})},ss=function(e,t){return t===void 0&&(t=is(xo(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:ns(e).some(function(e){return $o(e,t)||os(e,t)})},cs=function(e){e===void 0&&(e=document);var t=is(e);return t?yo(e.querySelectorAll(`[${Ja}]`)).some(function(e){return $o(e,t)}):!1},ls=function(e,t){return t.filter(No).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e},us=function(e,t){return No(e)&&e.name?ls(e,t):e},ds=function(e){var t=new Set;return e.forEach(function(n){return t.add(us(n,e))}),e.filter(function(e){return t.has(e)})},fs=function(e){return e[0]&&e.length>1?us(e[0],e):e[0]},ps=function(e,t){return e.indexOf(us(t,e))},ms=`NEW_FOCUS`,hs=function(e,t,n,r,i){var a=e.length,o=e[0],s=e[a-1],c=Io(r);if(!(r&&e.indexOf(r)>=0)){var l=r===void 0?-1:n.indexOf(r),u=i?n.indexOf(i):l,d=i?e.indexOf(i):-1;if(l===-1)return d===-1?ms:d;if(d===-1)return ms;var f=l-u,p=n.indexOf(o),m=n.indexOf(s),h=ds(n),g=r===void 0?-1:h.indexOf(r),_=i?h.indexOf(i):g,v=h.filter(function(e){return e.tabIndex>=0}),y=r===void 0?-1:v.indexOf(r),b=i?v.indexOf(i):y,x=y>=0&&b>=0?b-y:_-g;if(!f&&d>=0||t.length===0)return d;var S=ps(e,t[0]),C=ps(e,t[t.length-1]);if(l<=p&&c&&Math.abs(f)>1)return C;if(l>=m&&c&&Math.abs(f)>1)return S;if(f&&Math.abs(x)>1)return d;if(l<=p)return C;if(l>m)return S;if(f)return Math.abs(f)>1?d:(a+d+f)%a}},gs=function(e){return function(t){var n,r=(n=Ao(t))==null?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!==`false`||e.indexOf(t)>=0}},_s=function(e,t,n){var r=Yo(e.map(function(e){return e.node}).filter(gs(n)));return r&&r.length?fs(r):fs(Yo(t))},vs=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&vs(e.parentNode.host||e.parentNode,t),t},ys=function(e,t){for(var n=vs(e),r=vs(t),i=0;i=0)return a}return!1},bs=function(e,t,n){var r=bo(e),i=bo(t),a=r[0],o=!1;return i.filter(Boolean).forEach(function(e){o=ys(o||e,e)||o,n.filter(Boolean).forEach(function(e){var t=ys(a,e);t&&(o=!o||$o(t,o)?t:ys(t,o))})}),o},xs=function(e,t){return e.reduce(function(e,n){return e.concat(Qo(n,t))},[])},Ss=function(e,t){var n=new Map;return t.forEach(function(e){return n.set(e.node,e)}),e.map(function(e){return n.get(e)}).filter(Ro)},Cs=function(e,t){var n=is(bo(e).length>0?document:xo(e).ownerDocument),r=ns(e).filter(Lo),i=bs(n||e,e,r),a=new Map,o=Zo(r,a),s=o.filter(function(e){var t=e.node;return Lo(t)});if(s[0]){var c=Zo([i],a).map(function(e){return e.node}),l=Ss(c,s),u=l.map(function(e){return e.node}),d=l.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),f=hs(u,d,c,n,t);if(f===`NEW_FOCUS`){var p=_s(o,d,xs(r,a))||_s(o,u,xs(r,a));if(p)return{node:p};console.warn(`focus-lock: cannot find any node to move focus into`);return}return f===void 0?f:l[f]}},ws=function(e){var t=ns(e).filter(Lo),n=Vo(Ko([bs(e,e,t)],!0),!0,!0),r=Ko(t,!1);return n.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:r.indexOf(t)>=0,guard:Io(t)}})},Ts=function(e,t){e&&(`focus`in e&&e.focus(t),`contentWindow`in e&&e.contentWindow&&e.contentWindow.focus())},Es=0,Ds=!1,Os=function(e,t,n){n===void 0&&(n={});var r=Cs(e,t);if(!Ds&&r){if(Es>2){console.error(`FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting`),Ds=!0,setTimeout(function(){Ds=!1},1);return}Es++,Ts(r.node,n.focusOptions),Es--}};function ks(e){if(!e)return null;if(typeof WeakRef>`u`)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var As=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ks(n),parent:ks(n.parentElement),left:ks(n.previousElementSibling),right:ks(n.nextElementSibling)}),n=n.parentElement;return{element:ks(e),stack:t,ownerDocument:e.ownerDocument}},js=function(e){var t,n,r;if(e)for(var i=e.stack,a=e.ownerDocument,o=new Map,s=0,c=i;s-1&&(m.filter(function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute(`tabIndex`)}),nc(h,m.length,1,m),nc(h,-1,-1,m))}}}return e},lc=function(e){cc()&&e&&(e.stopPropagation(),e.preventDefault())},uc=function(){return Hs(cc)},dc=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||ec(n,t)},fc=function(){return null},pc=function(){Zs=!0},mc=function(){Zs=!1,Xs=`just`,Hs(function(){Xs=`meanwhile`})},hc=function(){document.addEventListener(`focusin`,lc),document.addEventListener(`focusout`,uc),window.addEventListener(`focus`,pc),window.addEventListener(`blur`,mc)},gc=function(){document.removeEventListener(`focusin`,lc),document.removeEventListener(`focusout`,uc),window.removeEventListener(`focus`,pc),window.removeEventListener(`blur`,mc)};function _c(e){return e.filter(function(e){return!e.disabled})}var vc={moveFocusInside:Os,focusInside:ss,focusNextElement:Ls,focusPrevElement:Rs,focusFirstElement:Bs,focusLastElement:Vs,captureFocusRestore:Ms};function yc(e){var t=e.slice(-1)[0];t&&!Ks&&hc();var n=Ks,r=n&&t&&t.id===n.id;Ks=t,n&&!r&&(n.onDeactivation(),e.filter(function(e){return e.id===n.id}).length||n.returnFocus(!t)),t?(qs=null,(!r||n.observed!==t.observed)&&t.onActivation(vc),cc(!0),Hs(cc)):(gc(),qs=null)}co.assignSyncMedium(dc),lo.assignMedium(uc),uo.assignMedium(function(e){return e(vc)});var bc=vo(_c,yc)(fc);d();var xc=yt(function(e,t){return G.createElement(ho,b({sideCar:bc,ref:t},e))}),Sc=ho.propTypes||{};Sc.sideCar,Ga(Sc,[`sideCar`]),xc.propTypes={};var Cc=xc,J=`-ms-`,wc=`-moz-`,Y=`-webkit-`,Tc=`comm`,Ec=`rule`,Dc=`decl`,Oc=`@import`,kc=`@namespace`,Ac=`@keyframes`,jc=`@layer`,Mc=Math.abs,Nc=String.fromCharCode,Pc=Object.assign;function Fc(e,t){return Z(e,0)^45?(((t<<2^Z(e,0))<<2^Z(e,1))<<2^Z(e,2))<<2^Z(e,3):0}function Ic(e){return e.trim()}function Lc(e,t){return(e=t.exec(e))?e[0]:e}function X(e,t,n){return e.replace(t,n)}function Rc(e,t,n){return e.indexOf(t,n)}function Z(e,t){return e.charCodeAt(t)|0}function zc(e,t,n){return e.slice(t,n)}function Bc(e){return e.length}function Vc(e){return e.length}function Hc(e,t){return t.push(e),e}function Uc(e,t){return e.map(t).join(``)}function Wc(e,t){return e.filter(function(e){return!Lc(e,t)})}var Gc=1,Kc=1,qc=0,Jc=0,Q=0,Yc=``;function Xc(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Gc,column:Kc,length:o,return:``,siblings:s}}function Zc(e,t){return Pc(Xc(``,null,null,``,null,null,0,e.siblings),e,{length:-e.length},t)}function Qc(e){for(;e.root;)e=Zc(e.root,{children:[e]});Hc(e,e.siblings)}function $c(){return Q}function el(){return Q=Jc>0?Z(Yc,--Jc):0,Kc--,Q===10&&(Kc=1,Gc--),Q}function tl(){return Q=Jc2||al(Q)>3?``:` `}function ul(e,t){for(;--t&&tl()&&!(Q<48||Q>102||Q>57&&Q<65||Q>70&&Q<97););return il(e,rl()+(t<6&&nl()==32&&tl()==32))}function dl(e){for(;tl();)switch(Q){case e:return Jc;case 34:case 39:e!==34&&e!==39&&dl(Q);break;case 40:e===41&&dl(e);break;case 92:tl();break}return Jc}function fl(e,t){for(;tl()&&e+Q!==57&&(e+Q!==84||nl()!==47););return`/*`+il(t,Jc-1)+`*`+Nc(e===47?e:tl())}function pl(e){for(;!al(nl());)tl();return il(e,Jc)}function ml(e){return sl(hl(``,null,null,null,[``],e=ol(e),0,[0],e))}function hl(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=tl()){case 40:if(m!=108&&Z(C,d-1)==58){Rc(C+=X(cl(v),`&`,`&\f`),`&\f`,Mc(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=cl(v);break;case 9:case 10:case 13:case 32:C+=ll(m);break;case 92:C+=ul(rl()-1,7);continue;case 47:switch(nl()){case 42:case 47:Hc(_l(fl(tl(),rl()),t,n,c),c),(al(m||1)==5||al(nl()||1)==5)&&Bc(C)&&zc(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=Bc(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=X(C,/\f/g,``)),p>0&&(Bc(C)-d||h===0&&m===47)&&Hc(p>32?vl(C+`;`,r,n,d-1,c):vl(X(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(Hc(S=gl(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)hl(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(Z(C,3)===110)break;case 108:if(Z(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?hl(e,S,S,r&&Hc(gl(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):hl(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Bc(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&el()==125)continue}switch(C+=Nc(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Bc(C)-1)*_,_=1;break;case 64:nl()===45&&(C+=cl(tl())),f=nl(),u=d=Bc(y=C+=pl(rl())),v++;break;case 45:m===45&&Bc(C)==2&&(h=0)}}return a}function gl(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Vc(p),h=0,g=0,_=0;h0?p[v]+` `+y:X(y,/&\f/g,p[v])))&&(c[_++]=b);return Xc(e,t,n,i===0?Ec:s,c,l,u,d)}function _l(e,t,n,r){return Xc(e,t,n,Tc,Nc($c()),zc(e,2,-2),0,r)}function vl(e,t,n,r,i){return Xc(e,t,n,Dc,zc(e,0,r),zc(e,r+1,-1),r,i)}function yl(e,t,n){switch(Fc(e,t)){case 5103:return Y+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Y+e+e;case 4855:return Y+e.replace(`add`,`source-over`).replace(`substract`,`source-out`).replace(`intersect`,`source-in`).replace(`exclude`,`xor`)+e;case 4789:return wc+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Y+e+wc+e+J+e+e;case 5936:switch(Z(e,t+11)){case 114:return Y+e+J+X(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Y+e+J+X(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Y+e+J+X(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}case 6828:case 4268:case 2903:return Y+e+J+e+e;case 6165:return Y+e+J+`flex-`+e+e;case 5187:return Y+e+X(e,/(\w+).+(:[^]+)/,Y+`box-$1$2`+J+`flex-$1$2`)+e;case 5443:return Y+e+J+`flex-item-`+X(e,/flex-|-self/g,``)+(Lc(e,/flex-|baseline/)?``:J+`grid-row-`+X(e,/flex-|-self/g,``))+e;case 4675:return Y+e+J+`flex-line-pack`+X(e,/align-content|flex-|-self/g,``)+e;case 5548:return Y+e+J+X(e,`shrink`,`negative`)+e;case 5292:return Y+e+J+X(e,`basis`,`preferred-size`)+e;case 6060:return Y+`box-`+X(e,`-grow`,``)+Y+e+J+X(e,`grow`,`positive`)+e;case 4554:return Y+X(e,/([^-])(transform)/g,`$1`+Y+`$2`)+e;case 6187:return X(X(X(e,/(zoom-|grab)/,Y+`$1`),/(image-set)/,Y+`$1`),e,``)+e;case 5495:case 3959:return X(e,/(image-set\([^]*)/,Y+"$1$`$1");case 4968:return X(X(e,/(.+:)(flex-)?(.*)/,Y+`box-pack:$3`+J+`flex-pack:$3`),/space-between/,`justify`)+Y+e+e;case 4200:if(!Lc(e,/flex-|baseline/))return J+`grid-column-align`+zc(e,t)+e;break;case 2592:case 3360:return J+X(e,`template-`,``)+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Lc(e.props,/grid-\w+-end/)})?~Rc(e+(n=n[t].value),`span`,0)?e:J+X(e,`-start`,``)+e+J+`grid-row-span:`+(~Rc(n,`span`,0)?Lc(n,/\d+/):Lc(n,/\d+/)-+Lc(e,/\d+/))+`;`:J+X(e,`-start`,``)+e;case 4896:case 4128:return n&&n.some(function(e){return Lc(e.props,/grid-\w+-start/)})?e:J+X(X(e,`-end`,`-span`),`span `,``)+e;case 4095:case 3583:case 4068:case 2532:return X(e,/(.+)-inline(.+)/,Y+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bc(e)-1-t>6)switch(Z(e,t+1)){case 109:if(Z(e,t+4)!==45)break;case 102:return X(e,/(.+:)(.+)-([^]+)/,`$1`+Y+`$2-$3$1`+wc+(Z(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Rc(e,`stretch`,0)?yl(X(e,`stretch`,`fill-available`),t,n)+e:e}break;case 5152:case 5920:return X(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,a,o,s){return J+n+`:`+r+s+(i?J+n+`-span:`+(a?o:o-+r)+s:``)+e});case 4949:if(Z(e,t+6)===121)return X(e,`:`,`:`+Y)+e;break;case 6444:switch(Z(e,Z(e,14)===45?18:11)){case 120:return X(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,`$1`+Y+(Z(e,14)===45?`inline-`:``)+`box$3$1`+Y+`$2$3$1`+J+`$2box$3`)+e;case 100:return X(e,`:`,`:`+J)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return X(e,`scroll-`,`scroll-snap-`)+e}return e}function bl(e,t){for(var n=``,r=0;r-1&&!e.return)switch(e.type){case Dc:e.return=yl(e.value,e.length,n);return;case Ac:return bl([Zc(e,{value:X(e.value,`@`,`@`+Y)})],r);case Ec:if(e.length)return Uc(n=e.props,function(t){switch(Lc(t,r=/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:Qc(Zc(e,{props:[X(t,/:(read-\w+)/,`:`+wc+`$1`)]})),Qc(Zc(e,{props:[t]})),Pc(e,{props:Wc(n,r)});break;case`::placeholder`:Qc(Zc(e,{props:[X(t,/:(plac\w+)/,`:`+Y+`input-$1`)]})),Qc(Zc(e,{props:[X(t,/:(plac\w+)/,`:`+wc+`$1`)]})),Qc(Zc(e,{props:[X(t,/:(plac\w+)/,J+`input-$1`)]})),Qc(Zc(e,{props:[t]})),Pc(e,{props:Wc(n,r)})}return``})}}d();var Tl=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,El=`active`,Dl=`data-styled-version`,Ol=`6.5.2`,kl=`/*!sc*/ `,Al=typeof window<`u`&&typeof document<`u`;function jl(e){if(typeof process<`u`){let t={}[e];if(t!==void 0&&t!==``)return t!==`false`}}var Ml=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:jl(`REACT_APP_SC_DISABLE_SPEEDY`)??jl(`SC_DISABLE_SPEEDY`)??(typeof process<`u`&&!1)),Nl=`sc-keyframes-`,Pl={};function Fl(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(`, `)}`:``}`)}var Il=new Map,Ll=new Map,Rl=1,zl=e=>{if(Il.has(e))return Il.get(e);for(;Ll.has(Rl);)Rl++;let t=Rl++;return Il.set(e,t),Ll.set(t,e),t},Bl=e=>Ll.get(e),Vl=(e,t)=>{Rl=t+1,Il.set(e,t),Ll.set(t,e)},Hl=Object.freeze([]),Ul=Object.freeze({});function Wl(e,t,n=Ul){return e.theme!==n.theme&&e.theme||t||n.theme}var Gl=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Kl=/(^-|-$)/g;function ql(e){return e.replace(Gl,`-`).replace(Kl,``)}var Jl=/(a)(d)/gi,Yl=e=>String.fromCharCode(e+(e>25?39:97));function Xl(e){let t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=Yl(t%52)+n;return(Yl(t%52)+n).replace(Jl,`$1-$2`)}var Zl=5381,Ql=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},$l=e=>Ql(Zl,e);function eu(e){return Xl($l(e)>>>0)}function tu(e){return e.displayName||e.name||`Component`}function nu(e){return typeof e==`string`&&!0}function ru(e){return nu(e)?`styled.${e}`:`Styled(${tu(e)})`}var iu=Symbol.for(`react.memo`),au=Symbol.for(`react.forward_ref`),ou={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},su={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cu={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},lu={[au]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[iu]:cu};function uu(e){return(`type`in(t=e)&&t.type.$$typeof)===iu?cu:`$$typeof`in e?lu[e.$$typeof]:ou;var t}var du=Object.defineProperty,fu=Object.getOwnPropertyNames,pu=Object.getOwnPropertySymbols,mu=Object.getOwnPropertyDescriptor,hu=Object.getPrototypeOf,gu=Object.prototype;function _u(e,t,n){if(typeof t!=`string`){let r=hu(t);r&&r!==gu&&_u(e,r,n);let i=fu(t).concat(pu(t)),a=uu(e),o=uu(t);for(let r=0;rthis._cGroup)for(let n=this._cGroup;n=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if(r<<=1,r<0)throw Fl(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t=``;if(e>=this.length||this.groupSizes[e]===0)return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;etypeof ShadowRoot<`u`&&e instanceof ShadowRoot||`host`in e&&e.nodeType===11,Au=e=>{if(!e)return document;if(ku(e))return e;if(`getRootNode`in e){let t=e.getRootNode();if(ku(t))return t}return document},ju=(e,t,n)=>{let r=n.split(`,`),i;for(let n=0,a=r.length;n{let n=(t.textContent??``).split(kl),r=[];for(let t=0,i=n.length;t{let t=Au(e.options.target).querySelectorAll(Du);for(let n=0,r=t.length;n{let n=document.head,r=e||n,i=document.createElement(`style`),a=(e=>{let t=Array.from(e.querySelectorAll(`style[${Tl}]`));return t[t.length-1]})(r),o=a===void 0?null:a.nextSibling;i.setAttribute(Tl,El),i.setAttribute(Dl,Ol);let s=t||Fu();return s&&i.setAttribute(`nonce`,s),r.insertBefore(i,o),i},Lu=class{constructor(e,t){this.element=Iu(e,t),this.element.appendChild(document.createTextNode(``)),this.sheet=(e=>{if(e.sheet)return e.sheet;let t=e.getRootNode().styleSheets??document.styleSheets;for(let n=0,r=t.length;n=0){let n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e(e=>{let t=e.getTag(),{length:n}=t,r=``;for(let i=0;i0&&(c+=e+`,`);r+=o+s+`{content:"`+c+`"}/*!sc*/ @@ -182,7 +182,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);if(r.length<2||i.length<2)return null;let a=new Set;for(let e of r){let t=e.trim();qf(t)&&a.add(t)}if(a.size<2)return null;let o=r.length,s=Math.ceil(o*1.5),c=Math.max(2,Math.floor(o*.5)),l=-1,u=-1,d=0,f=new Uint8Array(i.length);for(let e=0;ed&&(d=n,l=e,u=t)}if(l<0||dl+1&&!f[u-1];)u--;for(;le.trim()).filter(e=>e.length>0);return t.length!==0&&t.every(e=>e.startsWith(`//`)||e.startsWith(`/*`)||e.startsWith(`*`)||e.endsWith(`*/`))}function Xf(e){let t=[],n=!1,r=null,i=0;for(let a=0;a0||o.length===0)&&(t.push({startLine:i,endLine:a}),n=!1,r=null):o.startsWith(`/*`)?(n=!0,r=`jsdoc`,i=a+1,o.includes(`*/`)&&(t.push({startLine:i,endLine:a+1}),n=!1,r=null)):o.startsWith(`//`)&&(n=!0,r=`line`,i=a+1)}return n&&i>0&&t.push({startLine:i,endLine:e.length}),t}function Zf(e,t,n=.2){if(!Yf(e)||!t)return null;let r=t.split(` `),i=Xf(r);if(!i.length)return null;let a=new Set;for(let t of e.split(` -`)){let e=t.trim().replace(/^\/\*+/,``).replace(/\*+\/$/,``).replace(/^\/\//,``).replace(/^\*+/,``).trim();e.length>=3&&a.add(e.toLowerCase())}if(a.size===0){if(i.length===1){let e=i[0],t=r[e.endLine-1]??``;return{range:{startLine:e.startLine,startColumn:1,endLine:e.endLine,endColumn:t.length+1},confidence:.5,method:`similarity`}}return null}let o=i[0],s=0;for(let e of i){let t=0;for(let n=e.startLine-1;ns&&(s=n,o=e)}if(si(()=>import(`./BlocklyEditor-BB77aFJI.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),tp=G.lazy(()=>i(()=>import(`./RulesEditor-ByjgEaVo.js`),__vite__mapDeps([6,7,8,1,9,10]),import.meta.url)),np=G.lazy(()=>i(()=>import(`./Debugger-DCMWjeGm.js`),__vite__mapDeps([11,12,2,13,14]),import.meta.url)),rp=G.lazy(()=>i(()=>import(`./ScriptEditorVanillaMonaco-v12-gORS.js`).then(e=>e.n),__vite__mapDeps([13,14]),import.meta.url)),ip=G.lazy(()=>i(()=>import(`./ScriptEditor-CMYUt5S4.js`),__vite__mapDeps([15,13,14]),import.meta.url)),ap=G.lazy(()=>i(()=>import(`./AiChatPanel-C4kuqP2U.js`),__vite__mapDeps([16,8,17,5,18]),import.meta.url)),op=G.lazy(()=>i(()=>import(`./AiDiffView-zJTEnv05.js`),__vite__mapDeps([19]),import.meta.url)),sp={Blockly:Bi,"Javascript/js":zi,Rules:Hi,def:zi,"TypeScript/ts":Vi},cp=48,lp=`#02a102`,up=`#70aae9`,dp=l[400],fp=ye[400],$={toolbar:e=>({minHeight:38,boxShadow:`0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)`,backgroundColor:e.palette.mode===`dark`?`#1e1e1e`:`#E2E2E2`}),toolbarButtons:{padding:4,marginLeft:4},toolbarButtonsDisabled:{filter:`grayscale(100%)`,opacity:.5},editorDiv:e=>({height:`calc(100% - ${(parseInt(e.toolbar.height,10)||48)+38+10}px)`,width:`100%`,overflow:`hidden`,position:`relative`}),textButton:{marginRight:10,minHeight:24,padding:`6px 16px`,height:32},saveButton:{background:`#ff9900`},textIcon:{marginLeft:8},tabIcon:{width:24,height:24,verticalAlign:`middle`,marginBottom:2,marginRight:2,borderRadius:3},hintIcon:{padding:`0 8px 0 8px`},hintText:{},hintButton:{marginTop:8,marginLeft:20},tabMenuButton:{position:`absolute`,top:0,right:0},tabChanged:e=>({color:e.palette.secondary.main}),tabText:{maxWidth:130,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,display:`inline-block`,verticalAlign:`middle`},tabChangedIcon:{color:`#FF0000`,fontSize:16,marginLeft:5},closeButton:{marginLeft:5},notRunning:{color:`#ffbc00`,marginRight:8,marginLeft:8},tabButton:{minHeight:48},tabButtonWrapper:{display:`inline-block`},menuIcon:{width:18,height:18,borderRadius:2,marginRight:5}},pp=class e extends G.Component{constructor(e){var t;super(e),T(this,`getSelect`,null),T(this,`changedMirror`,{}),T(this,`cron`,{initValue:null,callback:null}),T(this,`scriptDialog`,{initValue:null,callback:null,args:null,isReturn:!1}),T(this,`objects`,void 0),T(this,`scripts`,void 0),T(this,`selectId`,{initValue:null,callback:null}),T(this,`confirmCallback`,null),T(this,`blocklyEditorRef`,G.createRef()),T(this,`scriptEditorRef`,G.createRef()),T(this,`lastKnownTs`,{}),T(this,`onBrowserClose`,e=>{let t=Object.keys(this.scripts).find(e=>JSON.stringify(this.scripts[e])!==JSON.stringify(this.getScriptFromObject(e)));if(t){console.log(`Script ${JSON.stringify(this.scripts[t])}`);let n=H.t(`Configuration not saved.`);return e||=window.event,e&&(e.returnValue=n),n}}),T(this,`cachedScriptInfos`,null),T(this,`lastObjectsHash`,``),T(this,`setTourStep`,e=>this.setState({tourStep:e}));let n=window.localStorage.getItem(`Editor.selected`)||``,r=window.localStorage.getItem(`Editor.editing`)||`[]`,i;try{i=JSON.parse(r)}catch{i=[]}n&&!i.includes(n)&&i.push(n),n&&!this.props.password&&(t=this.props.objects[n])!=null&&(t=t.native)!=null&&t.protected&&(n=i.find(e=>{var t;return!((t=this.props.objects[e])!=null&&(t=t.native)!=null&&t.protected)})||``),!n&&i.length&&(n=this.props.password?i[0]:i.find(e=>{var t;return!((t=this.props.objects[e])!=null&&(t=t.native)!=null&&t.protected)})||``),this.state={askAboutDebug:!1,astroEvents:null,blockly:null,changed:{},cmdToBlockly:``,cmdToRules:``,confirm:``,debugEnabled:!1,editing:i,insert:``,instancesLoaded:!1,isTourOpen:window.localStorage.getItem(`tour`)!==`true`,menuDebugAnchorEl:null,menuOidDisplayAnchorEl:null,oidDisplayMode:parseInt(window.localStorage.getItem(`Blockly.FieldOID.displayMode`)||`0`,10)||0,oidShowIcon:window.localStorage.getItem(`Blockly.FieldOID.showIcon`)===`true`,menuOpened:!!this.props.menuOpened,menuTabsOpened:!1,aiChatOpen:window.localStorage.getItem(`Editor.aiChatOpen`)===`true`,aiDiffView:null,aiActionRequest:null,inlineAskHandler:null,aiCompletionsEnabled:window.localStorage.getItem(`Editor.aiCompletions`)!==`false`,triggerPrettier:1,scriptConflict:``,rules:null,runningInstances:this.props.runningInstances||{},searchText:``,selected:n,showAdapterDebug:!1,showAstro:!1,showCompiledCode:!1,showCron:!1,showDebugMenu:!1,showScript:!1,showSelectId:!1,themeType:this.props.themeType,toast:``,tourStep:Vt.selectTriggers,verboseEnabled:!1,visible:e.visible},this.setChangedInAdmin(),window.systemLang=H.getLanguage(),window.main={objects:{},getObject:(e,t)=>this.props.socket.getObject(e).then(e=>t==null?void 0:t(null,e)).catch(e=>t==null?void 0:t(e)),getState:(e,t)=>this.props.socket.getState(e).then(e=>t==null?void 0:t(null,e)).catch(e=>t==null?void 0:t(e)),instances:[],selectIdDialog:(e,t,n)=>{typeof t==`function`&&(n=t,t=null),this.selectId.callback=n,this.selectId.initValue=e,this.selectId.type=t,this.setState({showSelectId:!0})},cronDialog:(e,t)=>{this.cron.callback=t,this.cron.initValue=e,this.setState({showCron:!0})},showScriptDialog:(e,t,n,r)=>{this.scriptDialog.callback=r,this.scriptDialog.initValue=e,this.scriptDialog.args=t,this.scriptDialog.isReturn=n||!1,this.setState({showScript:!0})}},this.objects=e.objects,this.scripts={},this.getAllAdapterInstances().then(()=>{this.props.onSelectedChange&&this.state.selected&&setTimeout(()=>this.props.onSelectedChange(this.state.selected,this.state.editing),100)})}async getAllAdapterInstances(){let e=await this.props.socket.getAdapterInstances(!0),t={},n=e.map(e=>(t[e._id]=e,e._id));window.main.objects=t,window.main.instances=n,this.setState({instancesLoaded:!0})}static onInstanceChanged(e,t){if(e)if(!t&&window.main.instances.includes(e)){delete window.main.objects[e];let t=window.main.instances.indexOf(e);window.main.instances.splice(t,1)}else(t==null?void 0:t.type)===`instance`&&(window.main.instances.includes(e)||(window.main.instances.push(e),window.main.instances.sort()),window.main.objects[e]=t)}setChangedInAdmin(){let e=Object.keys(this.state.changed).find(e=>this.state.changed[e]);Object.keys(this.state.changed).forEach(e=>{this.changedMirror[e]=this.state.changed[e]}),Object.keys(this.changedMirror).forEach(e=>{this.state.changed[e]===void 0&&delete this.changedMirror[e]}),this.props.onChangedChanged(this.changedMirror),window.parent!==void 0&&window.parent&&(window.parent.configNotSaved=!!e)}componentDidMount(){window.addEventListener(`beforeunload`,this.onBrowserClose,!1),this.props.socket.subscribeObject(`system.adapter.*`,e.onInstanceChanged)}componentWillUnmount(){window.removeEventListener(`beforeunload`,this.onBrowserClose),this.props.socket.unsubscribeObject(`system.adapter.*`,e.onInstanceChanged)}componentDidUpdate(e){if(e.scriptsHash!==this.props.scriptsHash)for(let e of this.state.editing){let t=this.props.objects[e];if(!t||t.type!==`script`)continue;let n=t.ts||0,r=this.lastKnownTs[e];r!==void 0&&n!==r&&(this.state.changed[e]?this.state.scriptConflict||this.setState({scriptConflict:e}):(this.scripts[e]=this.getScriptFromObject(e),this.lastKnownTs[e]=n))}}removeNonExistingScripts(e,t){e||=this.props,t||={};let n=!1;if(this.state.editing&&this.state.editing.find(t=>e&&!e.objects[t])){let e=[...this.state.editing];for(let t=e.length-1;t>=0;t--)this.objects[e[t]]||(n=!0,e.splice(t,1));n&&(t.editing=e),this.state.selected&&!this.objects[this.state.selected]&&(n=!0,t.selected=e[0]||``,t.selected&&this.scripts[t.selected]&&(this.state.blockly!==(this.scripts[t.selected].engineType===`Blockly`)&&(t.blockly=this.scripts[t.selected].engineType===`Blockly`,n=!0),this.state.rules!==(this.scripts[t.selected].engineType===`Rules`)&&(t.rules=this.scripts[t.selected].engineType===`Rules`,n=!0),this.state.verboseEnabled!==this.scripts[t.selected].verbose&&(t.verboseEnabled=this.scripts[t.selected].verbose,n=!0),this.state.debugEnabled!==this.scripts[t.selected].debug&&(t.debugEnabled=this.scripts[t.selected].debug,n=!0)))}return n}UNSAFE_componentWillReceiveProps(e){let t={},n=!1;if(JSON.stringify(e.runningInstances)!==JSON.stringify(this.state.runningInstances)&&(n=!0,t.runningInstances=e.runningInstances),this.state.menuOpened!==e.menuOpened&&(t.menuOpened=e.menuOpened,n=!0),this.state.themeType!==e.themeType&&(t.themeType=e.themeType,n=!0),this.removeNonExistingScripts(e,t)&&(n=!0),this.state.searchText!==e.searchText&&(t.searchText=e.searchText,n=!0),this.objects!==e.objects){this.objects=e.objects,window.main.objects=e.objects,Object.keys(this.scripts).forEach(e=>{let t=this.scripts[e].source;this.scripts[e]=JSON.parse(JSON.stringify(this.objects[e].common)),this.scripts[e].source=t}),this.state.selected&&this.objects[this.state.selected]&&(this.scripts[this.state.selected]||=JSON.parse(JSON.stringify(this.objects[this.state.selected].common)),this.state.blockly!==(this.scripts[this.state.selected].engineType===`Blockly`)&&(t.blockly=this.scripts[this.state.selected].engineType===`Blockly`,n=!0),this.state.rules!==(this.scripts[this.state.selected].engineType===`Rules`)&&(t.rules=this.scripts[this.state.selected].engineType===`Rules`,n=!0),this.state.verboseEnabled!==this.scripts[this.state.selected].verbose&&(t.verboseEnabled=this.scripts[this.state.selected].verbose,n=!0),this.state.debugEnabled!==this.scripts[this.state.selected].debug&&(t.debugEnabled=this.scripts[this.state.selected].debug,n=!0));let r=[...this.state.editing];for(let e=r.length-1;e>=0;e--)this.objects[r[e]]||(n=!0,r.splice(e,1),this.state.changed[r[e]]!==void 0&&(t.changed||={...this.state.changed},t.changed&&delete t.changed[r[e]]));this.state.selected&&!this.objects[this.state.selected]&&(t.selected=r[0]||``),n&&(t.editing=r)}else for(let e in this.scripts){var r;if(Object.prototype.hasOwnProperty.call(this.scripts,e)){if((r=this.objects[e])!=null&&r.common){if(this.objects[e].type===`script`){let r=this.scripts[e].source,o=JSON.parse(JSON.stringify(this.scripts[e]));if(o.source=this.objects[e].common.source,JSON.stringify(o)!==JSON.stringify(this.objects[e].common)&&(this.scripts[e]=JSON.parse(JSON.stringify(this.objects[e].common)),this.scripts[e].source=r),r!==this.objects[e].common.source)if(this.state.changed[e]){var i;(i=this.objects[e].from)!=null&&i.startsWith(`system.adapter.javascript.`)&&(this.objects[e].from=`system.adapter.admin.0`,this.setState({toast:H.t(`Script %s was modified on disk.`,e.split(`.`).pop())}))}else{var a;this.props.password&&(a=this.objects[e].native)!=null&&a.protected?this.scripts[e].source=sa(this.props.password,this.objects[e].common.source):this.scripts[e].source=this.objects[e].common.source}else this.state.changed[e]&&(t.changed||={...this.state.changed},t.changed&&(t.changed[e]=!1),n=!0)}}else if(this.scripts[e]&&(delete this.scripts[e],this.state.selected===e)){if(this.state.editing.indexOf(e)!==-1){let r=[...this.state.editing],i=r.indexOf(e);i!==-1&&(r.splice(i,1),t.editing=r,n=!0)}t.selected=this.state.editing[0]||``,n=!0}}}if(e.selected&&this.state.selected!==e.selected){let r=this.getScriptFromObject(e.selected);this.scripts[e.selected]||=r;let i=r&&JSON.stringify(this.scripts[e.selected])!==JSON.stringify(r),a=[...this.state.editing];e.selected&&!a.includes(e.selected)&&(a.push(e.selected),this.props.onSelectedChange(e.selected,a),window.localStorage.setItem(`Editor.editing`,JSON.stringify(a))),n=!0,t.changed||={...this.state.changed},t.changed[e.selected]=!!i,t.editing=a,t.selected=e.selected,t.blockly=this.scripts[e.selected].engineType===`Blockly`,t.rules=this.scripts[e.selected].engineType===`Rules`,t.verboseEnabled=this.scripts[e.selected].verbose,t.debugEnabled=this.scripts[e.selected].debug,t.showCompiledCode=!1}this.state.visible!==e.visible&&(n=!0,t.visible=e.visible),n&&this.setState(t,()=>this.setChangedInAdmin())}onRestart(){var e,t;(e=(t=this.props).onRestart)==null||e.call(t,this.state.selected)}onStartStop(){var e,t,n;let r=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));r.enabled=!r.enabled,this.props.password&&(e=this.props.objects[this.state.selected].native)!=null&&e.protected&&(r.source=oa(this.props.password,r.source)),(t=(n=this.props).onChange)==null||t.call(n,this.state.selected,r)}onSave(){if(this.state.isTourOpen&&this.state.tourStep===Vt.saveTheScript&&(this.setState({isTourOpen:!1}),window.localStorage.setItem(`tour`,`true`)),this.state.changed[this.state.selected]){let e={...this.state.changed};e[this.state.selected]=!1,this.setState({changed:e},()=>{var e,t,n;this.setChangedInAdmin();let r=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));this.props.password&&(e=this.props.objects[this.state.selected].native)!=null&&e.protected&&(r.source=oa(this.props.password,r.source)),(t=(n=this.props).onChange)==null||t.call(n,this.state.selected,r)})}}onSaveAll(){let e={...this.state.changed};Object.keys(e).forEach(t=>{if(e[t]){var n,r,i;e[t]=!1;let a=JSON.parse(JSON.stringify(this.scripts[t]));this.props.password&&(n=this.props.objects[t].native)!=null&&n.protected&&(a.source=oa(this.props.password,a.source)),(r=(i=this.props).onChange)==null||r.call(i,t,a)}}),this.setState({changed:e},()=>this.setChangedInAdmin())}onCancel(){var e;this.scripts[this.state.selected]=this.getScriptFromObject(this.state.selected),this.lastKnownTs[this.state.selected]=((e=this.props.objects[this.state.selected])==null?void 0:e.ts)||0;let t={...this.state.changed};t[this.state.selected]=!1,this.setState({changed:t},()=>this.setChangedInAdmin())}onRegisterSelect(e){this.getSelect=e}handleAiAction(e){let t={aiActionRequest:e};this.state.aiChatOpen||(window.localStorage.setItem(`Editor.aiChatOpen`,`true`),t.aiChatOpen=!0),this.setState(t)}getEditorApi(){let e=()=>this.scriptEditorRef.current;return{getSelection:()=>{var t,n;return((t=e())==null||(n=t.getEditorSelection)==null?void 0:n.call(t))??null},getContent:()=>{var t,n;return((t=e())==null||(n=t.getEditorContent)==null?void 0:n.call(t))??``},getCursorPosition:()=>{var t,n;return((t=e())==null||(n=t.getCursorPosition)==null?void 0:n.call(t))??null},highlightText:t=>{var n,r;return((n=e())==null||(r=n.highlightText)==null?void 0:r.call(n,t))??0},highlightLineRange:(t,n)=>{var r,i;return((r=e())==null||(i=r.highlightLineRange)==null?void 0:i.call(r,t,n))??!1},goToLine:(t,n)=>{var r,i;return((r=e())==null||(i=r.goToLine)==null?void 0:i.call(r,t,n))??!1},insertTextAtCursor:t=>{let n=e();return n!=null&&n.insertTextIntoEditor?(n.insertTextIntoEditor(t),!0):!1},replaceSelection:t=>{var n,r;return((n=e())==null||(r=n.replaceSelection)==null?void 0:r.call(n,t))??!1},getDiagnostics:()=>{var t,n;return((t=e())==null||(n=t.getDiagnostics)==null?void 0:n.call(t))??[]},getSymbols:async()=>{var t,n;return((t=e())==null||(n=t.getDocumentSymbols)==null?void 0:n.call(t))??[]}}}onConvertBlockly2JS(){this.showConfirmDialog(H.t(`It will not be possible to revert this operation.`),e=>{if(e){this.scripts[this.state.selected].engineType=`Javascript/js`;let e=this.scripts[this.state.selected].source.split(` +`)){let e=t.trim().replace(/^\/\*+/,``).replace(/\*+\/$/,``).replace(/^\/\//,``).replace(/^\*+/,``).trim();e.length>=3&&a.add(e.toLowerCase())}if(a.size===0){if(i.length===1){let e=i[0],t=r[e.endLine-1]??``;return{range:{startLine:e.startLine,startColumn:1,endLine:e.endLine,endColumn:t.length+1},confidence:.5,method:`similarity`}}return null}let o=i[0],s=0;for(let e of i){let t=0;for(let n=e.startLine-1;ns&&(s=n,o=e)}if(si(()=>import(`./BlocklyEditor-fPxUbzlK.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),tp=G.lazy(()=>i(()=>import(`./RulesEditor-ByjgEaVo.js`),__vite__mapDeps([6,7,8,1,9,10]),import.meta.url)),np=G.lazy(()=>i(()=>import(`./Debugger-DCMWjeGm.js`),__vite__mapDeps([11,12,2,13,14]),import.meta.url)),rp=G.lazy(()=>i(()=>import(`./ScriptEditorVanillaMonaco-v12-gORS.js`).then(e=>e.n),__vite__mapDeps([13,14]),import.meta.url)),ip=G.lazy(()=>i(()=>import(`./ScriptEditor-CMYUt5S4.js`),__vite__mapDeps([15,13,14]),import.meta.url)),ap=G.lazy(()=>i(()=>import(`./AiChatPanel-C4kuqP2U.js`),__vite__mapDeps([16,8,17,5,18]),import.meta.url)),op=G.lazy(()=>i(()=>import(`./AiDiffView-zJTEnv05.js`),__vite__mapDeps([19]),import.meta.url)),sp={Blockly:Bi,"Javascript/js":zi,Rules:Hi,def:zi,"TypeScript/ts":Vi},cp=48,lp=`#02a102`,up=`#70aae9`,dp=l[400],fp=ye[400],$={toolbar:e=>({minHeight:38,boxShadow:`0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)`,backgroundColor:e.palette.mode===`dark`?`#1e1e1e`:`#E2E2E2`}),toolbarButtons:{padding:4,marginLeft:4},toolbarButtonsDisabled:{filter:`grayscale(100%)`,opacity:.5},editorDiv:e=>({height:`calc(100% - ${(parseInt(e.toolbar.height,10)||48)+38+10}px)`,width:`100%`,overflow:`hidden`,position:`relative`}),textButton:{marginRight:10,minHeight:24,padding:`6px 16px`,height:32},saveButton:{background:`#ff9900`},textIcon:{marginLeft:8},tabIcon:{width:24,height:24,verticalAlign:`middle`,marginBottom:2,marginRight:2,borderRadius:3},hintIcon:{padding:`0 8px 0 8px`},hintText:{},hintButton:{marginTop:8,marginLeft:20},tabMenuButton:{position:`absolute`,top:0,right:0},tabChanged:e=>({color:e.palette.secondary.main}),tabText:{maxWidth:130,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,display:`inline-block`,verticalAlign:`middle`},tabChangedIcon:{color:`#FF0000`,fontSize:16,marginLeft:5},closeButton:{marginLeft:5},notRunning:{color:`#ffbc00`,marginRight:8,marginLeft:8},tabButton:{minHeight:48},tabButtonWrapper:{display:`inline-block`},menuIcon:{width:18,height:18,borderRadius:2,marginRight:5}},pp=class e extends G.Component{constructor(e){var t;super(e),T(this,`getSelect`,null),T(this,`changedMirror`,{}),T(this,`cron`,{initValue:null,callback:null}),T(this,`scriptDialog`,{initValue:null,callback:null,args:null,isReturn:!1}),T(this,`objects`,void 0),T(this,`scripts`,void 0),T(this,`selectId`,{initValue:null,callback:null}),T(this,`confirmCallback`,null),T(this,`blocklyEditorRef`,G.createRef()),T(this,`scriptEditorRef`,G.createRef()),T(this,`lastKnownTs`,{}),T(this,`onBrowserClose`,e=>{let t=Object.keys(this.scripts).find(e=>JSON.stringify(this.scripts[e])!==JSON.stringify(this.getScriptFromObject(e)));if(t){console.log(`Script ${JSON.stringify(this.scripts[t])}`);let n=H.t(`Configuration not saved.`);return e||=window.event,e&&(e.returnValue=n),n}}),T(this,`cachedScriptInfos`,null),T(this,`lastObjectsHash`,``),T(this,`setTourStep`,e=>this.setState({tourStep:e}));let n=window.localStorage.getItem(`Editor.selected`)||``,r=window.localStorage.getItem(`Editor.editing`)||`[]`,i;try{i=JSON.parse(r)}catch{i=[]}n&&!i.includes(n)&&i.push(n),n&&!this.props.password&&(t=this.props.objects[n])!=null&&(t=t.native)!=null&&t.protected&&(n=i.find(e=>{var t;return!((t=this.props.objects[e])!=null&&(t=t.native)!=null&&t.protected)})||``),!n&&i.length&&(n=this.props.password?i[0]:i.find(e=>{var t;return!((t=this.props.objects[e])!=null&&(t=t.native)!=null&&t.protected)})||``),this.state={askAboutDebug:!1,astroEvents:null,blockly:null,changed:{},cmdToBlockly:``,cmdToRules:``,confirm:``,debugEnabled:!1,editing:i,insert:``,instancesLoaded:!1,isTourOpen:window.localStorage.getItem(`tour`)!==`true`,menuDebugAnchorEl:null,menuOidDisplayAnchorEl:null,oidDisplayMode:parseInt(window.localStorage.getItem(`Blockly.FieldOID.displayMode`)||`0`,10)||0,oidShowIcon:window.localStorage.getItem(`Blockly.FieldOID.showIcon`)===`true`,menuOpened:!!this.props.menuOpened,menuTabsOpened:!1,aiChatOpen:window.localStorage.getItem(`Editor.aiChatOpen`)===`true`,aiDiffView:null,aiActionRequest:null,inlineAskHandler:null,aiCompletionsEnabled:window.localStorage.getItem(`Editor.aiCompletions`)!==`false`,triggerPrettier:1,scriptConflict:``,rules:null,runningInstances:this.props.runningInstances||{},searchText:``,selected:n,showAdapterDebug:!1,showAstro:!1,showCompiledCode:!1,showCron:!1,showDebugMenu:!1,showScript:!1,showSelectId:!1,themeType:this.props.themeType,toast:``,tourStep:Vt.selectTriggers,verboseEnabled:!1,visible:e.visible},this.setChangedInAdmin(),window.systemLang=H.getLanguage(),window.main={objects:{},getObject:(e,t)=>this.props.socket.getObject(e).then(e=>t==null?void 0:t(null,e)).catch(e=>t==null?void 0:t(e)),getState:(e,t)=>this.props.socket.getState(e).then(e=>t==null?void 0:t(null,e)).catch(e=>t==null?void 0:t(e)),instances:[],selectIdDialog:(e,t,n)=>{typeof t==`function`&&(n=t,t=null),this.selectId.callback=n,this.selectId.initValue=e,this.selectId.type=t,this.setState({showSelectId:!0})},cronDialog:(e,t)=>{this.cron.callback=t,this.cron.initValue=e,this.setState({showCron:!0})},showScriptDialog:(e,t,n,r)=>{this.scriptDialog.callback=r,this.scriptDialog.initValue=e,this.scriptDialog.args=t,this.scriptDialog.isReturn=n||!1,this.setState({showScript:!0})}},this.objects=e.objects,this.scripts={},this.getAllAdapterInstances().then(()=>{this.props.onSelectedChange&&this.state.selected&&setTimeout(()=>this.props.onSelectedChange(this.state.selected,this.state.editing),100)})}async getAllAdapterInstances(){let e=await this.props.socket.getAdapterInstances(!0),t={},n=e.map(e=>(t[e._id]=e,e._id));window.main.objects=t,window.main.instances=n,this.setState({instancesLoaded:!0})}static onInstanceChanged(e,t){if(e)if(!t&&window.main.instances.includes(e)){delete window.main.objects[e];let t=window.main.instances.indexOf(e);window.main.instances.splice(t,1)}else(t==null?void 0:t.type)===`instance`&&(window.main.instances.includes(e)||(window.main.instances.push(e),window.main.instances.sort()),window.main.objects[e]=t)}setChangedInAdmin(){let e=Object.keys(this.state.changed).find(e=>this.state.changed[e]);Object.keys(this.state.changed).forEach(e=>{this.changedMirror[e]=this.state.changed[e]}),Object.keys(this.changedMirror).forEach(e=>{this.state.changed[e]===void 0&&delete this.changedMirror[e]}),this.props.onChangedChanged(this.changedMirror),window.parent!==void 0&&window.parent&&(window.parent.configNotSaved=!!e)}componentDidMount(){window.addEventListener(`beforeunload`,this.onBrowserClose,!1),this.props.socket.subscribeObject(`system.adapter.*`,e.onInstanceChanged)}componentWillUnmount(){window.removeEventListener(`beforeunload`,this.onBrowserClose),this.props.socket.unsubscribeObject(`system.adapter.*`,e.onInstanceChanged)}componentDidUpdate(e){if(e.scriptsHash!==this.props.scriptsHash)for(let e of this.state.editing){let t=this.props.objects[e];if(!t||t.type!==`script`)continue;let n=t.ts||0,r=this.lastKnownTs[e];r!==void 0&&n!==r&&(this.state.changed[e]?this.state.scriptConflict||this.setState({scriptConflict:e}):(this.scripts[e]=this.getScriptFromObject(e),this.lastKnownTs[e]=n))}}removeNonExistingScripts(e,t){e||=this.props,t||={};let n=!1;if(this.state.editing&&this.state.editing.find(t=>e&&!e.objects[t])){let e=[...this.state.editing];for(let t=e.length-1;t>=0;t--)this.objects[e[t]]||(n=!0,e.splice(t,1));n&&(t.editing=e),this.state.selected&&!this.objects[this.state.selected]&&(n=!0,t.selected=e[0]||``,t.selected&&this.scripts[t.selected]&&(this.state.blockly!==(this.scripts[t.selected].engineType===`Blockly`)&&(t.blockly=this.scripts[t.selected].engineType===`Blockly`,n=!0),this.state.rules!==(this.scripts[t.selected].engineType===`Rules`)&&(t.rules=this.scripts[t.selected].engineType===`Rules`,n=!0),this.state.verboseEnabled!==this.scripts[t.selected].verbose&&(t.verboseEnabled=this.scripts[t.selected].verbose,n=!0),this.state.debugEnabled!==this.scripts[t.selected].debug&&(t.debugEnabled=this.scripts[t.selected].debug,n=!0)))}return n}UNSAFE_componentWillReceiveProps(e){let t={},n=!1;if(JSON.stringify(e.runningInstances)!==JSON.stringify(this.state.runningInstances)&&(n=!0,t.runningInstances=e.runningInstances),this.state.menuOpened!==e.menuOpened&&(t.menuOpened=e.menuOpened,n=!0),this.state.themeType!==e.themeType&&(t.themeType=e.themeType,n=!0),this.removeNonExistingScripts(e,t)&&(n=!0),this.state.searchText!==e.searchText&&(t.searchText=e.searchText,n=!0),this.objects!==e.objects){this.objects=e.objects,window.main.objects=e.objects,Object.keys(this.scripts).forEach(e=>{let t=this.scripts[e].source;this.scripts[e]=JSON.parse(JSON.stringify(this.objects[e].common)),this.scripts[e].source=t}),this.state.selected&&this.objects[this.state.selected]&&(this.scripts[this.state.selected]||=JSON.parse(JSON.stringify(this.objects[this.state.selected].common)),this.state.blockly!==(this.scripts[this.state.selected].engineType===`Blockly`)&&(t.blockly=this.scripts[this.state.selected].engineType===`Blockly`,n=!0),this.state.rules!==(this.scripts[this.state.selected].engineType===`Rules`)&&(t.rules=this.scripts[this.state.selected].engineType===`Rules`,n=!0),this.state.verboseEnabled!==this.scripts[this.state.selected].verbose&&(t.verboseEnabled=this.scripts[this.state.selected].verbose,n=!0),this.state.debugEnabled!==this.scripts[this.state.selected].debug&&(t.debugEnabled=this.scripts[this.state.selected].debug,n=!0));let r=[...this.state.editing];for(let e=r.length-1;e>=0;e--)this.objects[r[e]]||(n=!0,r.splice(e,1),this.state.changed[r[e]]!==void 0&&(t.changed||={...this.state.changed},t.changed&&delete t.changed[r[e]]));this.state.selected&&!this.objects[this.state.selected]&&(t.selected=r[0]||``),n&&(t.editing=r)}else for(let e in this.scripts){var r;if(Object.prototype.hasOwnProperty.call(this.scripts,e)){if((r=this.objects[e])!=null&&r.common){if(this.objects[e].type===`script`){let r=this.scripts[e].source,o=JSON.parse(JSON.stringify(this.scripts[e]));if(o.source=this.objects[e].common.source,JSON.stringify(o)!==JSON.stringify(this.objects[e].common)&&(this.scripts[e]=JSON.parse(JSON.stringify(this.objects[e].common)),this.scripts[e].source=r),r!==this.objects[e].common.source)if(this.state.changed[e]){var i;(i=this.objects[e].from)!=null&&i.startsWith(`system.adapter.javascript.`)&&(this.objects[e].from=`system.adapter.admin.0`,this.setState({toast:H.t(`Script %s was modified on disk.`,e.split(`.`).pop())}))}else{var a;this.props.password&&(a=this.objects[e].native)!=null&&a.protected?this.scripts[e].source=sa(this.props.password,this.objects[e].common.source):this.scripts[e].source=this.objects[e].common.source}else this.state.changed[e]&&(t.changed||={...this.state.changed},t.changed&&(t.changed[e]=!1),n=!0)}}else if(this.scripts[e]&&(delete this.scripts[e],this.state.selected===e)){if(this.state.editing.indexOf(e)!==-1){let r=[...this.state.editing],i=r.indexOf(e);i!==-1&&(r.splice(i,1),t.editing=r,n=!0)}t.selected=this.state.editing[0]||``,n=!0}}}if(e.selected&&this.state.selected!==e.selected){let r=this.getScriptFromObject(e.selected);this.scripts[e.selected]||=r;let i=r&&JSON.stringify(this.scripts[e.selected])!==JSON.stringify(r),a=[...this.state.editing];e.selected&&!a.includes(e.selected)&&(a.push(e.selected),this.props.onSelectedChange(e.selected,a),window.localStorage.setItem(`Editor.editing`,JSON.stringify(a))),n=!0,t.changed||={...this.state.changed},t.changed[e.selected]=!!i,t.editing=a,t.selected=e.selected,t.blockly=this.scripts[e.selected].engineType===`Blockly`,t.rules=this.scripts[e.selected].engineType===`Rules`,t.verboseEnabled=this.scripts[e.selected].verbose,t.debugEnabled=this.scripts[e.selected].debug,t.showCompiledCode=!1}this.state.visible!==e.visible&&(n=!0,t.visible=e.visible),n&&this.setState(t,()=>this.setChangedInAdmin())}onRestart(){var e,t;(e=(t=this.props).onRestart)==null||e.call(t,this.state.selected)}onStartStop(){var e,t,n;let r=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));r.enabled=!r.enabled,this.props.password&&(e=this.props.objects[this.state.selected].native)!=null&&e.protected&&(r.source=oa(this.props.password,r.source)),(t=(n=this.props).onChange)==null||t.call(n,this.state.selected,r)}onSave(){if(this.state.isTourOpen&&this.state.tourStep===Vt.saveTheScript&&(this.setState({isTourOpen:!1}),window.localStorage.setItem(`tour`,`true`)),this.state.changed[this.state.selected]){let e={...this.state.changed};e[this.state.selected]=!1,this.setState({changed:e},()=>{var e,t,n;this.setChangedInAdmin();let r=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));this.props.password&&(e=this.props.objects[this.state.selected].native)!=null&&e.protected&&(r.source=oa(this.props.password,r.source)),(t=(n=this.props).onChange)==null||t.call(n,this.state.selected,r)})}}onSaveAll(){let e={...this.state.changed};Object.keys(e).forEach(t=>{if(e[t]){var n,r,i;e[t]=!1;let a=JSON.parse(JSON.stringify(this.scripts[t]));this.props.password&&(n=this.props.objects[t].native)!=null&&n.protected&&(a.source=oa(this.props.password,a.source)),(r=(i=this.props).onChange)==null||r.call(i,t,a)}}),this.setState({changed:e},()=>this.setChangedInAdmin())}onCancel(){var e;this.scripts[this.state.selected]=this.getScriptFromObject(this.state.selected),this.lastKnownTs[this.state.selected]=((e=this.props.objects[this.state.selected])==null?void 0:e.ts)||0;let t={...this.state.changed};t[this.state.selected]=!1,this.setState({changed:t},()=>this.setChangedInAdmin())}onRegisterSelect(e){this.getSelect=e}handleAiAction(e){let t={aiActionRequest:e};this.state.aiChatOpen||(window.localStorage.setItem(`Editor.aiChatOpen`,`true`),t.aiChatOpen=!0),this.setState(t)}getEditorApi(){let e=()=>this.scriptEditorRef.current;return{getSelection:()=>{var t,n;return((t=e())==null||(n=t.getEditorSelection)==null?void 0:n.call(t))??null},getContent:()=>{var t,n;return((t=e())==null||(n=t.getEditorContent)==null?void 0:n.call(t))??``},getCursorPosition:()=>{var t,n;return((t=e())==null||(n=t.getCursorPosition)==null?void 0:n.call(t))??null},highlightText:t=>{var n,r;return((n=e())==null||(r=n.highlightText)==null?void 0:r.call(n,t))??0},highlightLineRange:(t,n)=>{var r,i;return((r=e())==null||(i=r.highlightLineRange)==null?void 0:i.call(r,t,n))??!1},goToLine:(t,n)=>{var r,i;return((r=e())==null||(i=r.goToLine)==null?void 0:i.call(r,t,n))??!1},insertTextAtCursor:t=>{let n=e();return n!=null&&n.insertTextIntoEditor?(n.insertTextIntoEditor(t),!0):!1},replaceSelection:t=>{var n,r;return((n=e())==null||(r=n.replaceSelection)==null?void 0:r.call(n,t))??!1},getDiagnostics:()=>{var t,n;return((t=e())==null||(n=t.getDiagnostics)==null?void 0:n.call(t))??[]},getSymbols:async()=>{var t,n;return((t=e())==null||(n=t.getDocumentSymbols)==null?void 0:n.call(t))??[]}}}onConvertBlockly2JS(){this.showConfirmDialog(H.t(`It will not be possible to revert this operation.`),e=>{if(e){this.scripts[this.state.selected].engineType=`Javascript/js`;let e=this.scripts[this.state.selected].source.split(` `);e.pop(),this.scripts[this.state.selected].source=e.join(` `);let t=this.state.selected,n={...this.state.changed};n[this.state.selected]=!0,this.setState({changed:n,blockly:!1,selected:``},()=>{this.setChangedInAdmin(),setTimeout(()=>this.setState({selected:t}),100)})}})}onChange(e){if(e.script!==void 0){if(e.script===this.scripts[this.state.selected].source)return;this.scripts[this.state.selected].source=e.script}e.debug!==void 0&&(this.scripts[this.state.selected].debug=e.debug),e.verbose!==void 0&&(this.scripts[this.state.selected].verbose=e.verbose);let t=JSON.stringify(this.scripts[this.state.selected])!==JSON.stringify(this.getScriptFromObject(this.state.selected));if(t!==!!this.state.changed[this.state.selected]){let e={...this.state.changed};e[this.state.selected]=t,this.objects[this.state.selected].from=`system.adapter.admin.0`,this.setState({changed:e},()=>this.setChangedInAdmin())}}onTabChange(e){var t,n;if(this.props.debugMode)return;window.localStorage.setItem(`Editor.selected`,e);let r=this.scripts[e]||this.getScriptFromObject(e);this.scripts[e]||(this.scripts[e]=r),this.lastKnownTs[e]===void 0&&this.props.objects[e]&&(this.lastKnownTs[e]=this.props.objects[e].ts||0),this.setState({selected:e,rules:r.engineType===`Rules`,blockly:r.engineType===`Blockly`,showCompiledCode:!1,verboseEnabled:r.verbose,debugEnabled:r.debug}),(t=(n=this.props).onSelectedChange)==null||t.call(n,e,this.state.editing)}isScriptChanged(e){return!!(this.scripts[e]&&this.props.objects[e]&&JSON.stringify(this.scripts[e])!==JSON.stringify(this.getScriptFromObject(e)))}onTabClose(e,t){t==null||t.stopPropagation();let n=this.state.editing.indexOf(e);if(this.state.editing.includes(e))if(this.isScriptChanged(e))this.showConfirmDialog(H.t(`Discard changes for %s`,this.props.objects[e].common.name),t=>{t&&(delete this.scripts[e],delete this.lastKnownTs[e],this.onTabClose(e))});else{let t=[...this.state.editing];t.splice(n,1);let r={editing:t};if(e===this.state.selected?r.selected=t.length?n===0||t.length===1?t[0]:t[n-1]:``:this.state.selected&&!t.length&&(r.selected=``),window.localStorage.setItem(`Editor.editing`,JSON.stringify(t)),r.selected!==void 0){r.changed||={...this.state.changed},r.changed[r.selected]=this.isScriptChanged(r.selected);let e=r.selected?this.scripts[r.selected]||this.getScriptFromObject(r.selected):void 0;r.blockly=(e==null?void 0:e.engineType)===`Blockly`,r.rules=(e==null?void 0:e.engineType)===`Rules`,r.verboseEnabled=!!(e!=null&&e.verbose),r.debugEnabled=!!(e!=null&&e.debug),r.showCompiledCode=!1}this.setState(r,()=>{if(this.setChangedInAdmin(),r.selected!==void 0){var e,t;(e=(t=this.props).onSelectedChange)==null||e.call(t,r.selected,this.state.editing),window.localStorage.setItem(`Editor.selected`,r.selected)}else{var n,i;(n=(i=this.props).onSelectedChange)==null||n.call(i,this.state.selected,this.state.editing)}})}}showConfirmDialog(e,t){this.confirmCallback=t,this.setState({confirm:e})}sendCommandToBlockly(e){this.setState({cmdToBlockly:e},()=>setTimeout(()=>this.setState({cmdToBlockly:``}),200))}sendCommandToRules(e){this.setState({cmdToRules:e},()=>setTimeout(()=>this.setState({cmdToRules:``}),200))}static getText(e){return typeof e==`object`?e[H.getLanguage()]||e.en:e}getScriptFullName(t){let n=t.split(`.`);n.shift(),n.shift();let r=[],i=`script.js`;for(let t=0;tthis.onTabChange(t),indicatorColor:`primary`,style:{position:`relative`,marginLeft:10,width:this.state.editing.length>1?`calc(100% - 50px)`:`100%`,display:`inline-block`},textColor:`primary`,variant:`scrollable`,scrollButtons:`auto`,allowScrollButtonsMobile:!0,children:[this.state.editing.map(t=>{var n,r;if(!this.props.objects[t]){let e=[W(u,{sx:this.isScriptChanged(t)?$.tabChanged:void 0,style:$.tabText,children:t.split(`.`).pop()},`text`),W(U,{onClick:e=>this.onTabClose(t,e),style:$.closeButton,size:`small`,component:`span`,children:W(z,{})},`icon`)];return W(m,{wrapped:!0,href:`#${t}`,label:e,value:t,sx:{"& .MuiTab-wrapper":$.tabButtonWrapper}},t)}if(!this.props.password&&(n=this.props.objects[t].native)!=null&&n.protected)return null;let i=e.getText(this.props.objects[t].common.name)||``,a=this.getScriptFullName(t);i.length>18&&(i=`${i.substring(0,15)}...`);let o=(r=this.getScriptFromObject(t))==null?void 0:r.source,s=this.scripts[t]&&o!==this.scripts[t].source,c=[W(u,{sx:this.isScriptChanged(t)?$.tabChanged:void 0,style:$.tabText,children:i},`text`),s?W(`span`,{style:$.tabChangedIcon,children:`▣`},`changedSign`):null,!this.props.debugInstance&&(!this.props.debugMode||this.state.selected!==t)&&W(U,{onClick:e=>this.onTabClose(t,e),style:$.closeButton,size:`small`,component:`span`,children:W(z,{})},`icon`)];return W(m,{disabled:!!this.props.debugInstance||this.state.selected!==t&&this.props.debugMode,wrapped:!0,iconPosition:`start`,icon:W(`img`,{alt:``,src:sp[this.props.objects[t].common.engineType]||sp.def,style:$.tabIcon},`icon`),href:`#${t}`,label:c,style:$.tabButton,value:t,title:a,sx:{"& .MuiTab-wrapper":$.tabButtonWrapper}},t)}),this.props.debugInstance?W(m,{disabled:!1,wrapped:!0,href:`#${this.props.debugInstance.adapter}`,label:this.props.debugInstance.adapter,style:$.tabButton,value:this.props.debugInstance.adapter,title:this.props.debugInstance.adapter,sx:{"& .MuiTab-wrapper":$.tabButtonWrapper}},this.props.debugInstance.adapter):``]},`tabs1`),this.state.editing.length>1?W(U,{href:`#`,"aria-label":`Close all but current`,style:$.tabMenuButton,title:H.t(`Close all but current`),"aria-haspopup":`false`,onClick:e=>{let t=[this.state.selected];Object.keys(this.scripts).forEach(e=>e!==this.state.selected&&JSON.stringify(this.scripts[e])!==JSON.stringify(this.getScriptFromObject(e))&&t.push(e)),window.localStorage.setItem(`Editor.editing`,JSON.stringify(t)),this.setState({menuTabsOpened:!1,editing:t})},size:`medium`,children:W(I,{})},`menuButton`):null]:W(u,{sx:$.toolbar,children:O(w,{color:`grey`,disabled:!0,style:$.hintButton,href:``,children:[W(`span`,{children:H.t(`Click on this icon`)},`select2`),W(ve,{style:$.hintIcon},`select3`),W(`span`,{children:H.t(`for edit or create script`)},`select4`)]},`select1`)},`tabs2`)}getDebugMenu(){return this.state.showDebugMenu?O(Et,{id:`menu-debug`,anchorEl:this.state.menuDebugAnchorEl,open:this.state.showDebugMenu,onClose:()=>this.setState({showDebugMenu:!1,menuDebugAnchorEl:null}),slotProps:{root:{style:{maxHeight:cp*7.5}}},children:[O(he,{title:H.t(`debug_help`),onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({showDebugMenu:!1,menuDebugAnchorEl:null,debugEnabled:!this.state.debugEnabled},()=>this.onChange({debug:this.state.debugEnabled}))},children:[W(k,{checked:this.state.debugEnabled}),W(te,{style:{...$.menuIcon,color:lp}}),H.t(`debug_label`)]},`debugEnabled`),O(he,{title:H.t(`verbose_help`),onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({showDebugMenu:!1,menuDebugAnchorEl:null,verboseEnabled:!this.state.verboseEnabled},()=>this.onChange({verbose:this.state.verboseEnabled}))},children:[W(k,{checked:this.state.verboseEnabled}),W(y,{style:{...$.menuIcon,color:up}}),H.t(`verbose_label`)]},`verboseEnabled`)]},`menuDebug`):null}getDebugBadge(){return[this.state.debugEnabled&&this.state.verboseEnabled?W(te,{style:{...$.menuIcon,color:up}},`DebugVerbose`):null,this.state.debugEnabled&&!this.state.verboseEnabled?W(te,{style:{...$.menuIcon,color:lp}},`DebugNoVerbose`):null,!this.state.debugEnabled&&this.state.verboseEnabled?W(y,{style:{...$.menuIcon,color:up}},`noDebugVerbose`):null]}getAskAboutDebug(){return this.state.askAboutDebug?W(bt,{onClose:()=>{this.setState({askAboutDebug:!1},()=>this.props.onDebugModeChange(!0))},ok:H.t(`Yes`),cancel:H.t(`Cancel`),text:H.t(`The script will be stopped and must be activated manually after debugging. Continue?`)}):null}getToolbar(){var e,t;let n=!!(this.state.selected&&(e=this.scripts[this.state.selected])!=null&&e.engine&&this.state.runningInstances[this.scripts[this.state.selected].engine]),r=!!(this.state.selected&&(t=this.scripts[this.state.selected])!=null&&t.enabled);if(this.state.selected){let e=Object.keys(this.state.changed).filter(e=>this.state.changed[e]).length,t=this.state.changed[this.state.selected];return O(F,{variant:`dense`,sx:$.toolbar,children:[!this.props.debugInstance&&this.state.menuOpened&&this.props.onLocate&&W(U,{style:$.toolbarButtons,title:H.t(`Locate file`),onClick:()=>this.props.onLocate(this.state.selected),size:`medium`,children:W(c,{})},`locate`),!this.props.debugInstance&&!t&&n?W(U,{disabled:this.props.debugMode,style:$.toolbarButtons,onClick:()=>this.onRestart(),title:H.t(`Restart`),size:`medium`,children:W(pt,{})},`restart`):null,!this.props.debugInstance&&!t?W(U,{disabled:this.props.debugMode,onClick:()=>this.onStartStop(),title:r?H.t(`Pause script`):H.t(`Run script`),size:`medium`,style:{...$.toolbarButtons,color:r?dp:fp},children:W(r?ge:be,{})},`start-stop`):null,!this.props.debugInstance&&!t&&!r?W(`span`,{style:$.notRunning,children:H.t(`Script is not running`)}):null,!t&&r&&!n?W(`span`,{style:$.notRunning,children:H.t(`Instance is disabled`)}):null,t?W(w,{color:`grey`,variant:`contained`,style:{...$.textButton,...$.saveButton},className:`button-save`,onClick:()=>this.onSave(),endIcon:W(D,{}),children:H.t(`Save`)},`save`):null,e>1||e===1&&!t?W(w,{color:`grey`,variant:`contained`,style:$.textButton,onClick:()=>this.onSaveAll(),endIcon:W(D,{}),children:H.t(`Save all`)},`saveall`):null,t?W(w,{color:`grey`,variant:`contained`,style:$.textButton,onClick:()=>this.onCancel(),endIcon:W(o,{}),children:H.t(`Cancel`)},`cancel`):null,!this.state.showCompiledCode&&!this.state.rules?W(U,{title:H.t(`Undo`),style:$.toolbarButtons,onClick:()=>{if(this.state.blockly){var e;let t=(e=this.blocklyEditorRef.current)==null?void 0:e.blocklyWorkspace;t==null||t.undo(!1)}else{var t;(t=this.scriptEditorRef.current)==null||t.undo()}},size:`medium`,children:W(we,{})},`undo`):null,!this.state.showCompiledCode&&!this.state.rules?W(U,{title:H.t(`Redo`),style:$.toolbarButtons,onClick:()=>{if(this.state.blockly){var e;let t=(e=this.blocklyEditorRef.current)==null?void 0:e.blocklyWorkspace;t==null||t.undo(!0)}else{var t;(t=this.scriptEditorRef.current)==null||t.redo()}},size:`medium`,children:W(A,{})},`redo`):null,W(`div`,{style:{flex:2}}),this.state.blockly&&!this.state.showCompiledCode&&W(U,{"aria-label":`OID display mode`,title:H.t(`OID display mode`),style:$.toolbarButtons,onClick:e=>this.setState({menuOidDisplayAnchorEl:e.currentTarget}),size:`medium`,children:W(`img`,{src:$f[this.state.oidDisplayMode]||$f[0],alt:`OID`,width:36,height:22})},`oid-display-mode`),O(Et,{anchorEl:this.state.menuOidDisplayAnchorEl,open:!!this.state.menuOidDisplayAnchorEl,onClose:()=>this.setState({menuOidDisplayAnchorEl:null}),children:[$f.map((e,t)=>O(he,{selected:this.state.oidDisplayMode===t,onClick:()=>{var e,n;this.setState({oidDisplayMode:t,menuOidDisplayAnchorEl:null});let r=(e=window.scripts)==null?void 0:e.blocklyWorkspace;r&&(n=window.Blockly)!=null&&(n=n.FieldOID)!=null&&n.setDisplayMode&&window.Blockly.FieldOID.setDisplayMode(t,r)},children:[W(`img`,{src:e,alt:``,width:48,height:28,style:{marginRight:8}}),(()=>{var e,n,r;let i=(e=window.Blockly)==null||(e=e.FieldOID)==null||(e=e.DISPLAY_MODE_KEYS)==null?void 0:e[t];return i&&(((n=window.Blockly)==null||(n=n.Words)==null||(n=n[i])==null?void 0:n[H.getLanguage()])||((r=window.Blockly)==null||(r=r.Words)==null||(r=r[i])==null?void 0:r.en))||[`Show name`,`Show name path`,`Show ID`,`Show full ID`][t]})()]},`oid-mode-${t}`)),W(Xe,{}),O(he,{onClick:()=>{var e,t;let n=!this.state.oidShowIcon;this.setState({oidShowIcon:n});let r=(e=window.scripts)==null?void 0:e.blocklyWorkspace;r&&(t=window.Blockly)!=null&&(t=t.FieldOID)!=null&&t.setShowIcon&&window.Blockly.FieldOID.setShowIcon(n,r)},children:[W(k,{checked:this.state.oidShowIcon,style:{padding:0,marginRight:8}}),(()=>{var e,t;let n=`oid_show_icon`;return((e=window.Blockly)==null||(e=e.Words)==null||(e=e[n])==null?void 0:e[H.getLanguage()])||((t=window.Blockly)==null||(t=t.Words)==null||(t=t[n])==null?void 0:t.en)||`Show icon`})()]},`oid-show-icon`)]},`menuOidDisplay`),!this.props.debugInstance&&!this.state.showCompiledCode&&W(U,{style:$.toolbarButtons,title:H.t(`Prettify the script`),onClick:()=>this.setState({triggerPrettier:this.state.triggerPrettier+1}),size:`medium`,children:W(ie,{})},`prettier`),this.state.blockly&&!this.state.showCompiledCode?W(U,{"aria-label":`Export Blocks`,title:H.t(`Export blocks`),style:$.toolbarButtons,onClick:()=>this.sendCommandToBlockly(`export`),size:`medium`,children:W(st,{})},`export`):null,this.state.blockly&&!this.state.showCompiledCode&&W(U,{"aria-label":`Import Blocks`,title:H.t(`Import blocks`),style:$.toolbarButtons,onClick:()=>this.sendCommandToBlockly(`import`),size:`medium`,children:W(_t,{})},`import`),this.state.blockly&&!this.state.showCompiledCode&&W(U,{"aria-label":`Check code`,title:H.t(`Check blocks`),style:$.toolbarButtons,onClick:()=>this.sendCommandToBlockly(`check`),size:`medium`,children:W(Qe,{})},`check`),!this.props.debugMode&&!this.state.blockly&&!this.state.rules&&!this.state.showCompiledCode?W(U,{"aria-label":`create CRON`,title:H.t(`Create or edit CRON or time wizard`),style:$.toolbarButtons,onClick:()=>this.setState({showCron:!0}),size:`medium`,children:W(St,{})},`select-cron`):null,this.scripts[this.state.selected]&&this.scripts[this.state.selected].engineType!==`Rules`?W(j,{children:W(U,{"aria-label":`AI`,title:H.t(`AI Chat`),style:{...$.toolbarButtons,...this.state.aiChatOpen?{color:`#4caf50`}:{}},size:`medium`,onClick:()=>{let e=!this.state.aiChatOpen;window.localStorage.setItem(`Editor.aiChatOpen`,String(e)),this.setState({aiChatOpen:e})},children:W(h,{})},`ai`)}):null,W(U,{"aria-label":`Show astronomical events`,title:H.t(`Show astronomical events`),style:$.toolbarButtons,disabled:!n,onClick:()=>{this.setState({showAstro:!0,astroEvents:null}),this.props.socket.sendTo(this.scripts[this.state.selected].engine.replace(`system.adapter.`,``),`calcAstroAll`,{}).then(e=>this.setState({astroEvents:e}))},size:`medium`,children:W(p,{})},`show-astro`),!this.props.debugMode&&!this.state.blockly&&!this.state.rules&&!this.state.showCompiledCode&&W(U,{"aria-label":`select ID`,title:H.t(`Insert object ID`),style:$.toolbarButtons,onClick:()=>this.setState({showSelectId:!0}),size:`medium`,children:W(Ve,{})},`select-id`),this.state.blockly&&!this.state.rules&&this.state.showCompiledCode&&W(w,{color:`grey`,"aria-label":`convert to javascript`,title:H.t(`Convert blockly to javascript for ever.`),onClick:()=>this.onConvertBlockly2JS(),children:`Blockly=>JS`},`convert2js`),this.state.rules&&!this.state.showCompiledCode&&W(U,{"aria-label":`Export Blocks`,title:H.t(`Export blocks`),style:$.toolbarButtons,onClick:()=>this.sendCommandToRules(`export`),size:`medium`,children:W(st,{})},`export`),this.state.rules&&!this.state.showCompiledCode&&W(U,{"aria-label":`Import Blocks`,title:H.t(`Import blocks`),style:$.toolbarButtons,onClick:()=>this.sendCommandToRules(`import`),size:`medium`,children:W(_t,{})},`import`),this.props.expertMode&&!t&&(this.props.debugMode||!this.state.blockly&&!this.state.rules||(this.state.blockly||this.state.rules)&&this.state.showCompiledCode)&&W(U,{style:$.toolbarButtons,color:this.props.debugMode?`primary`:`default`,disabled:!this.props.debugMode&&!n,onClick:()=>{!this.props.debugMode&&r?this.setState({askAboutDebug:!0}):this.props.onDebugModeChange(!this.props.debugMode)},size:`medium`,children:W(te,{style:{fontSize:32}})}),(this.state.blockly||this.state.rules)&&W(w,{"aria-label":`blockly`,title:H.t(`Show javascript code`),className:`button-js-code`,color:this.state.showCompiledCode?`secondary`:`inherit`,disabled:this.props.debugMode,style:{...$.toolbarButtons,...this.props.debugMode?$.toolbarButtonsDisabled:void 0,padding:`0 5px`},onClick:()=>{this.props.debugMode||(this.setState({showCompiledCode:!this.state.showCompiledCode}),this.state.isTourOpen&&this.state.tourStep===Vt.showJavascript&&this.setState({tourStep:Vt.switchBackToRules}),this.state.isTourOpen&&this.state.tourStep===Vt.switchBackToRules&&this.setState({tourStep:Vt.saveTheScript}))},children:W(`img`,{alt:this.state.blockly?`blockly2js`:`rules2js`,src:this.state.blockly?``+new URL(`blockly2js-B3Jxf2e-.svg`,import.meta.url).href:``+new URL(`rules2js-DnYyR8mI.svg`,import.meta.url).href})},`blockly-code`),W(U,{disabled:this.props.debugMode,"aria-label":`Debug menu`,title:H.t(`Debug options`),style:$.toolbarButtons,onClick:e=>this.setState({showDebugMenu:!0,menuDebugAnchorEl:e.currentTarget}),size:`medium`,children:W(v,{style:$.badgeMargin,badgeContent:this.getDebugBadge(),children:W(et,{})})},`debug`)]},`toolbar1`)}return null}getScriptInfos(){let e=Object.keys(this.props.objects).join(`,`);return this.cachedScriptInfos&&this.lastObjectsHash===e?this.cachedScriptInfos:(this.lastObjectsHash=e,this.cachedScriptInfos=Yt(this.props.objects),this.cachedScriptInfos)}getScriptEditor(){if(!this.props.debugMode&&this.state.selected&&this.props.objects[this.state.selected]&&this.state.blockly!==null&&(!this.state.blockly||this.state.showCompiledCode)&&(!this.state.rules||this.state.showCompiledCode)){this.scripts[this.state.selected]||=this.getScriptFromObject(this.state.selected);let n=this.scripts[this.state.selected].engineType===`TypeScript/ts`?`typescript`:`javascript`,r=W(kt,{fallback:W(Wf,{}),children:W(rp,{ref:this.scriptEditorRef,name:this.state.selected,adapterName:this.props.adapterName,insert:this.state.insert,onInserted:()=>this.setState({insert:``}),onForceSave:()=>this.onSave(),searchText:this.state.searchText,onRegisterSelect:e=>this.onRegisterSelect(e),readOnly:this.state.showCompiledCode,changed:this.state.changed[this.state.selected],code:this.scripts[this.state.selected].source||``,isDark:this.state.themeType===`dark`,socket:this.props.socket,runningInstances:this.state.runningInstances,triggerPrettier:this.state.triggerPrettier,onChange:e=>this.onChange({script:e}),language:n,aiCompletionsEnabled:this.state.aiCompletionsEnabled,onAiAction:e=>this.handleAiAction(e),onInlineAsk:this.state.inlineAskHandler?e=>this.state.inlineAskHandler(e.question,e.selectedCode):void 0},`scriptEditor1`)});if(this.state.aiDiffView)return W(u,{sx:$.editorDiv,children:W(kt,{fallback:W(Wf,{}),children:W(op,{originalCode:this.state.aiDiffView.original,modifiedCode:this.state.aiDiffView.modified,language:n,themeType:this.state.themeType,onAccept:e=>{this.onChange({script:e}),this.setState({aiDiffView:null})},onReject:()=>this.setState({aiDiffView:null})})})},`scriptEditorDiv`);if(this.state.aiChatOpen){var e,t;let i=window.localStorage.getItem(`Editor.aiChatSizes`),a=[70,30];try{i&&(a=JSON.parse(i))}catch{}return W(u,{sx:$.editorDiv,children:O(Rt,{direction:Lt.Horizontal,initialSizes:a,minWidths:[200,250],gutterClassName:this.state.themeType===`dark`?`Dark visGutter`:`Light visGutter`,onResizeFinished:(e,t)=>{window.localStorage.setItem(`Editor.aiChatSizes`,JSON.stringify(t))},children:[r,W(kt,{fallback:W(Wf,{}),children:W(ap,{socket:this.props.socket,runningInstances:this.state.runningInstances,themeType:this.state.themeType,currentCode:((e=this.scripts[this.state.selected])==null?void 0:e.source)||``,currentLanguage:n,selectedCode:((t=this.getSelect)==null?void 0:t.call(this))||``,allScripts:this.getScriptInfos(),editorApi:this.getEditorApi(),aiActionRequest:this.state.aiActionRequest,onAiActionConsumed:()=>this.setState({aiActionRequest:null}),onRegisterInlineAsk:e=>this.setState({inlineAskHandler:e}),currentScriptId:this.state.selected,onInsertCode:e=>this.setState({insert:e}),onShowDiff:(e,t)=>{var n;let r=this.state.selected,i=((n=this.scripts[r])==null?void 0:n.source)||``,a=this.scriptEditorRef.current,o=(t,n)=>{a==null||a.showInlineDiff({range:t,originalText:n,modifiedText:e,onAccepted:()=>{var e;let t=(a==null||(e=a.getEditorContent)==null?void 0:e.call(a))||i;this.onChange({script:t})}})};if(t&&t.range&&t.scriptId===r){o(t.range,t.originalText);return}try{let t=Qf(e,i);if(t){let e=i.split(` `).slice(t.range.startLine-1,t.range.endLine).join(` diff --git a/admin/assets/mf-entry-bootstrap-0-a03ecebd.js b/admin/assets/mf-entry-bootstrap-0-7c55ebe7.js similarity index 96% rename from admin/assets/mf-entry-bootstrap-0-a03ecebd.js rename to admin/assets/mf-entry-bootstrap-0-7c55ebe7.js index 3500e41e..b8ad88c4 100644 --- a/admin/assets/mf-entry-bootstrap-0-a03ecebd.js +++ b/admin/assets/mf-entry-bootstrap-0-7c55ebe7.js @@ -37,4 +37,4 @@ const __mfImport = (src) => if (__mfReactServerModuleCache?.pendingShareLoads) { await Promise.all(__mfReactServerModuleCache.pendingShareLoads); } -})().then(() => __mfImport("./index-BvPVHv3P.js")); +})().then(() => __mfImport("./index-DbCN84MR.js")); diff --git a/admin/mf-stats.json b/admin/mf-stats.json index 64497ae9..a4bcbf8e 100644 --- a/admin/mf-stats.json +++ b/admin/mf-stats.json @@ -1 +1 @@ -{"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.ssr.js","path":"","type":"module"},"types":{"path":"","name":"","zip":"@mf-types.zip","api":"@mf-types.d.ts"},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"9.3.1","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/gui-components","name":"@iobroker/gui-components","version":"10.1.0","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react/jsx-runtime","name":"react/jsx-runtime","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom/client","name":"react-dom/client","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[],"buildOutput":[{"fileName":"assets/hostInit-DBlZi_Kt.js","type":"chunk","isEntry":false,"size":2477},{"fileName":"assets/index-BvPVHv3P.js","type":"chunk","isEntry":true,"size":597005},{"fileName":"assets/virtualExposes-DgGB-18P.js","type":"chunk","isEntry":false,"size":126},{"fileName":"remoteEntry.js","type":"chunk","isEntry":false,"size":149},{"fileName":"assets/AiChatPanel-C4kuqP2U.js","type":"chunk","isEntry":false,"size":65564},{"fileName":"assets/AiDatapointProvider-DzFpUKkT.js","type":"chunk","isEntry":false,"size":2429},{"fileName":"assets/AiDiffView-zJTEnv05.js","type":"chunk","isEntry":false,"size":1503},{"fileName":"assets/AiInlineProvider-CaHd2G2Q.js","type":"chunk","isEntry":false,"size":2404},{"fileName":"assets/AiScriptAnalyzer--BHML2rN.js","type":"chunk","isEntry":false,"size":4552},{"fileName":"assets/BlocklyEditor-BB77aFJI.js","type":"chunk","isEntry":false,"size":193405},{"fileName":"assets/ContextWrapper-W2H0z6zD.js","type":"chunk","isEntry":false,"size":132344},{"fileName":"assets/Debugger-DCMWjeGm.js","type":"chunk","isEntry":false,"size":146841},{"fileName":"assets/Error-CBC2oZzb.js","type":"chunk","isEntry":false,"size":1018},{"fileName":"assets/Import-B-F9IhZ-.js","type":"chunk","isEntry":false,"size":6256},{"fileName":"assets/RulesEditor-ByjgEaVo.js","type":"chunk","isEntry":false,"size":26886},{"fileName":"assets/ScriptEditor-CMYUt5S4.js","type":"chunk","isEntry":false,"size":2192},{"fileName":"assets/ScriptEditorVanillaMonaco-v12-gORS.js","type":"chunk","isEntry":false,"size":25096},{"fileName":"assets/Send-CChqR5Oy.js","type":"chunk","isEntry":false,"size":257},{"fileName":"assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-7EPUlgCk.js","type":"chunk","isEntry":false,"size":4746},{"fileName":"assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js","type":"chunk","isEntry":false,"size":2471659},{"fileName":"assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js","type":"chunk","isEntry":false,"size":181278},{"fileName":"assets/aiCodeLensProvider-BGvIu6hH.js","type":"chunk","isEntry":false,"size":3475},{"fileName":"assets/aiPromptBuilder-Bs27qOHT.js","type":"chunk","isEntry":false,"size":3215},{"fileName":"assets/applyCodeEdit-D3nb7erO.js","type":"chunk","isEntry":false,"size":633},{"fileName":"assets/blockly-C4zJerWL.js","type":"chunk","isEntry":false,"size":631985},{"fileName":"assets/blocklyDarkTheme-DEiAX5DT.js","type":"chunk","isEntry":false,"size":490},{"fileName":"assets/blocks_action-CvnOHXwt.js","type":"chunk","isEntry":false,"size":10231},{"fileName":"assets/blocks_convert-BZlKcd02.js","type":"chunk","isEntry":false,"size":8703},{"fileName":"assets/blocks_logic-B33Pypxr.js","type":"chunk","isEntry":false,"size":3954},{"fileName":"assets/blocks_number-k2IjE7OH.js","type":"chunk","isEntry":false,"size":705},{"fileName":"assets/blocks_object-B64vSfel.js","type":"chunk","isEntry":false,"size":6451},{"fileName":"assets/blocks_procedures-BpvNI5dO.js","type":"chunk","isEntry":false,"size":9322},{"fileName":"assets/blocks_sendto-pwZchfe0.js","type":"chunk","isEntry":false,"size":10973},{"fileName":"assets/blocks_switch-DViYCmQd.js","type":"chunk","isEntry":false,"size":4638},{"fileName":"assets/blocks_system-BZZcGqTJ.js","type":"chunk","isEntry":false,"size":21824},{"fileName":"assets/blocks_text-BOvtHN2r.js","type":"chunk","isEntry":false,"size":1736},{"fileName":"assets/blocks_time-BH2F-ylT.js","type":"chunk","isEntry":false,"size":12608},{"fileName":"assets/blocks_timeout-C3BoW4XJ.js","type":"chunk","isEntry":false,"size":5337},{"fileName":"assets/blocks_trigger-gwXvuAHV.js","type":"chunk","isEntry":false,"size":22900},{"fileName":"assets/blocks_words-D8PL_nSE.js","type":"chunk","isEntry":false,"size":136156},{"fileName":"assets/cronHoverProvider-DjY3jLvQ.js","type":"chunk","isEntry":false,"size":1950},{"fileName":"assets/dist-D6o4h8Pd.js","type":"chunk","isEntry":false,"size":63682},{"fileName":"assets/docs-compact-D7rpMc7r.js","type":"chunk","isEntry":false,"size":13791},{"fileName":"assets/field_cron-BMQWPb61.js","type":"chunk","isEntry":false,"size":697},{"fileName":"assets/field_oid-BGIMv9gw.js","type":"chunk","isEntry":false,"size":9049},{"fileName":"assets/field_script-CdzYBCe6.js","type":"chunk","isEntry":false,"size":1594},{"fileName":"assets/helpers-Crmcgphg.js","type":"chunk","isEntry":false,"size":2969},{"fileName":"assets/inlineChatWidget-SDoyVtOR.js","type":"chunk","isEntry":false,"size":6857},{"fileName":"assets/inlineDiffController-CnHE3Rwd.js","type":"chunk","isEntry":false,"size":7288},{"fileName":"assets/javascript-DVIhlTDr.js","type":"chunk","isEntry":false,"size":28093},{"fileName":"assets/mjs-Bh7xFIpd.js","type":"chunk","isEntry":false,"size":12364},{"fileName":"assets/rolldown-runtime-C0FnF6B9.js","type":"chunk","isEntry":false,"size":1291},{"fileName":"assets/stateHoverProvider-D0iXo6YF.js","type":"chunk","isEntry":false,"size":144287},{"fileName":"assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-DYEYnOkt.js","type":"chunk","isEntry":false,"size":17426},{"fileName":"assets/virtual_mf-exposes___mfe_internal__iobroker_javascript__remoteEntry_js-ChiJXsfH.js","type":"chunk","isEntry":false,"size":24},{"fileName":"assets/vite-preload-helper-B7qeedMF.js","type":"chunk","isEntry":false,"size":1243},{"fileName":"assets/ContextWrapper-C2yvd2Tn.css","type":"asset","isEntry":false,"size":6721},{"fileName":"assets/RulesEditor-k-DMHotH.css","type":"asset","isEntry":false,"size":14048},{"fileName":"assets/back-CXiqI7Po.jpg","type":"asset","isEntry":false,"size":44316},{"fileName":"assets/blockly2js-B3Jxf2e-.svg","type":"asset","isEntry":false,"size":8421},{"fileName":"assets/hysteresis-CLhhemcG.png","type":"asset","isEntry":false,"size":12163},{"fileName":"assets/index-BHhhebRG.css","type":"asset","isEntry":false,"size":1129},{"fileName":"assets/rules2js-DnYyR8mI.svg","type":"asset","isEntry":false,"size":6950},{"fileName":"assets/tileBlockly-BMpdinN3.png","type":"asset","isEntry":false,"size":12893},{"fileName":"assets/tileJS-C48gYbHw.png","type":"asset","isEntry":false,"size":17266},{"fileName":"assets/tileRules-BkbaFIhs.png","type":"asset","isEntry":false,"size":83463},{"fileName":"assets/tileTS-CsXmgy4B.png","type":"asset","isEntry":false,"size":13415},{"fileName":"index.html","type":"asset","isEntry":false,"size":22155},{"fileName":"assets/mf-entry-bootstrap-0-a03ecebd.js","type":"asset","isEntry":false,"size":1565}],"assetAnalysis":{"react":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"react-dom":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"react/jsx-runtime":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"prop-types":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"@mui/material":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"@iobroker/gui-components":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"react-dom/client":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js"],"async":[]},"css":{"sync":[],"async":[]}}}} \ No newline at end of file +{"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.ssr.js","path":"","type":"module"},"types":{"path":"","name":"","zip":"@mf-types.zip","api":"@mf-types.d.ts"},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"9.3.1","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/gui-components","name":"@iobroker/gui-components","version":"10.1.0","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react/jsx-runtime","name":"react/jsx-runtime","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom/client","name":"react-dom/client","version":"19.2.8","singleton":true,"requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[],"buildOutput":[{"fileName":"assets/hostInit-DBlZi_Kt.js","type":"chunk","isEntry":false,"size":2477},{"fileName":"assets/index-DbCN84MR.js","type":"chunk","isEntry":true,"size":597005},{"fileName":"assets/virtualExposes-DgGB-18P.js","type":"chunk","isEntry":false,"size":126},{"fileName":"remoteEntry.js","type":"chunk","isEntry":false,"size":149},{"fileName":"assets/AiChatPanel-C4kuqP2U.js","type":"chunk","isEntry":false,"size":65564},{"fileName":"assets/AiDatapointProvider-DzFpUKkT.js","type":"chunk","isEntry":false,"size":2429},{"fileName":"assets/AiDiffView-zJTEnv05.js","type":"chunk","isEntry":false,"size":1503},{"fileName":"assets/AiInlineProvider-CaHd2G2Q.js","type":"chunk","isEntry":false,"size":2404},{"fileName":"assets/AiScriptAnalyzer--BHML2rN.js","type":"chunk","isEntry":false,"size":4552},{"fileName":"assets/BlocklyEditor-fPxUbzlK.js","type":"chunk","isEntry":false,"size":193405},{"fileName":"assets/ContextWrapper-W2H0z6zD.js","type":"chunk","isEntry":false,"size":132344},{"fileName":"assets/Debugger-DCMWjeGm.js","type":"chunk","isEntry":false,"size":146841},{"fileName":"assets/Error-CBC2oZzb.js","type":"chunk","isEntry":false,"size":1018},{"fileName":"assets/Import-B-F9IhZ-.js","type":"chunk","isEntry":false,"size":6256},{"fileName":"assets/RulesEditor-ByjgEaVo.js","type":"chunk","isEntry":false,"size":26886},{"fileName":"assets/ScriptEditor-CMYUt5S4.js","type":"chunk","isEntry":false,"size":2192},{"fileName":"assets/ScriptEditorVanillaMonaco-v12-gORS.js","type":"chunk","isEntry":false,"size":25096},{"fileName":"assets/Send-CChqR5Oy.js","type":"chunk","isEntry":false,"size":257},{"fileName":"assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-7EPUlgCk.js","type":"chunk","isEntry":false,"size":4746},{"fileName":"assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js","type":"chunk","isEntry":false,"size":2471659},{"fileName":"assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js","type":"chunk","isEntry":false,"size":181278},{"fileName":"assets/aiCodeLensProvider-BGvIu6hH.js","type":"chunk","isEntry":false,"size":3475},{"fileName":"assets/aiPromptBuilder-Bs27qOHT.js","type":"chunk","isEntry":false,"size":3215},{"fileName":"assets/applyCodeEdit-D3nb7erO.js","type":"chunk","isEntry":false,"size":633},{"fileName":"assets/blockly-C4zJerWL.js","type":"chunk","isEntry":false,"size":631985},{"fileName":"assets/blocklyDarkTheme-DEiAX5DT.js","type":"chunk","isEntry":false,"size":490},{"fileName":"assets/blocks_action-6Ej9xU2i.js","type":"chunk","isEntry":false,"size":10236},{"fileName":"assets/blocks_convert-DQ9x0Ysp.js","type":"chunk","isEntry":false,"size":8708},{"fileName":"assets/blocks_logic-D2zQ9KId.js","type":"chunk","isEntry":false,"size":3954},{"fileName":"assets/blocks_number-k2IjE7OH.js","type":"chunk","isEntry":false,"size":705},{"fileName":"assets/blocks_object-DCnwv5kv.js","type":"chunk","isEntry":false,"size":6456},{"fileName":"assets/blocks_procedures-8BHrspJl.js","type":"chunk","isEntry":false,"size":9345},{"fileName":"assets/blocks_sendto-BR7ZFKj1.js","type":"chunk","isEntry":false,"size":10973},{"fileName":"assets/blocks_switch-DViYCmQd.js","type":"chunk","isEntry":false,"size":4638},{"fileName":"assets/blocks_system-LUOqNSJG.js","type":"chunk","isEntry":false,"size":21819},{"fileName":"assets/blocks_text-BOvtHN2r.js","type":"chunk","isEntry":false,"size":1736},{"fileName":"assets/blocks_time-ugS4GvIN.js","type":"chunk","isEntry":false,"size":12613},{"fileName":"assets/blocks_timeout-CiwKK28I.js","type":"chunk","isEntry":false,"size":5350},{"fileName":"assets/blocks_trigger-15cJjBQj.js","type":"chunk","isEntry":false,"size":22888},{"fileName":"assets/blocks_words-D8PL_nSE.js","type":"chunk","isEntry":false,"size":136156},{"fileName":"assets/cronHoverProvider-DjY3jLvQ.js","type":"chunk","isEntry":false,"size":1950},{"fileName":"assets/dist-D6o4h8Pd.js","type":"chunk","isEntry":false,"size":63682},{"fileName":"assets/docs-compact-D7rpMc7r.js","type":"chunk","isEntry":false,"size":13791},{"fileName":"assets/field_cron-BMQWPb61.js","type":"chunk","isEntry":false,"size":697},{"fileName":"assets/field_oid-BGIMv9gw.js","type":"chunk","isEntry":false,"size":9049},{"fileName":"assets/field_script-CdzYBCe6.js","type":"chunk","isEntry":false,"size":1594},{"fileName":"assets/helpers-C_OEphYI.js","type":"chunk","isEntry":false,"size":3104},{"fileName":"assets/inlineChatWidget-SDoyVtOR.js","type":"chunk","isEntry":false,"size":6857},{"fileName":"assets/inlineDiffController-CnHE3Rwd.js","type":"chunk","isEntry":false,"size":7288},{"fileName":"assets/javascript-DVIhlTDr.js","type":"chunk","isEntry":false,"size":28093},{"fileName":"assets/mjs-Bh7xFIpd.js","type":"chunk","isEntry":false,"size":12364},{"fileName":"assets/rolldown-runtime-C0FnF6B9.js","type":"chunk","isEntry":false,"size":1291},{"fileName":"assets/stateHoverProvider-D0iXo6YF.js","type":"chunk","isEntry":false,"size":144287},{"fileName":"assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-DYEYnOkt.js","type":"chunk","isEntry":false,"size":17426},{"fileName":"assets/virtual_mf-exposes___mfe_internal__iobroker_javascript__remoteEntry_js-ChiJXsfH.js","type":"chunk","isEntry":false,"size":24},{"fileName":"assets/vite-preload-helper-B7qeedMF.js","type":"chunk","isEntry":false,"size":1243},{"fileName":"assets/ContextWrapper-C2yvd2Tn.css","type":"asset","isEntry":false,"size":6721},{"fileName":"assets/RulesEditor-k-DMHotH.css","type":"asset","isEntry":false,"size":14048},{"fileName":"assets/back-CXiqI7Po.jpg","type":"asset","isEntry":false,"size":44316},{"fileName":"assets/blockly2js-B3Jxf2e-.svg","type":"asset","isEntry":false,"size":8421},{"fileName":"assets/hysteresis-CLhhemcG.png","type":"asset","isEntry":false,"size":12163},{"fileName":"assets/index-BHhhebRG.css","type":"asset","isEntry":false,"size":1129},{"fileName":"assets/rules2js-DnYyR8mI.svg","type":"asset","isEntry":false,"size":6950},{"fileName":"assets/tileBlockly-BMpdinN3.png","type":"asset","isEntry":false,"size":12893},{"fileName":"assets/tileJS-C48gYbHw.png","type":"asset","isEntry":false,"size":17266},{"fileName":"assets/tileRules-BkbaFIhs.png","type":"asset","isEntry":false,"size":83463},{"fileName":"assets/tileTS-CsXmgy4B.png","type":"asset","isEntry":false,"size":13415},{"fileName":"index.html","type":"asset","isEntry":false,"size":22155},{"fileName":"assets/mf-entry-bootstrap-0-7c55ebe7.js","type":"asset","isEntry":false,"size":1565}],"assetAnalysis":{"react":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"react-dom":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"react/jsx-runtime":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"prop-types":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"@mui/material":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"@iobroker/gui-components":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js"],"async":[]},"css":{"sync":[],"async":[]}},"react-dom/client":{"js":{"sync":["assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js"],"async":[]},"css":{"sync":[],"async":[]}}}} \ No newline at end of file diff --git a/admin/tab.html b/admin/tab.html index 72c0ede9..55220161 100644 --- a/admin/tab.html +++ b/admin/tab.html @@ -27,7 +27,7 @@ Scripts - + @@ -38,10 +38,10 @@ - + - +