@cp949/phyx-blockly 12.5.1-p1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -0
- package/blockly.min.js +2751 -0
- package/blockly.mjs +163 -0
- package/blockly_compressed.js +1825 -0
- package/blockly_compressed.js.map +1 -0
- package/blocks.d.ts +17 -0
- package/blocks.js +4 -0
- package/blocks.mjs +12 -0
- package/blocks_compressed.js +194 -0
- package/blocks_compressed.js.map +1 -0
- package/core/any_aliases.d.ts +7 -0
- package/core/block.d.ts +1006 -0
- package/core/block_animations.d.ts +34 -0
- package/core/block_flyout_inflater.d.ts +94 -0
- package/core/block_svg.d.ts +737 -0
- package/core/blockly.d.ts +286 -0
- package/core/blockly_options.d.ts +70 -0
- package/core/blocks.d.ts +17 -0
- package/core/browser_events.d.ts +88 -0
- package/core/bubbles/bubble.d.ts +228 -0
- package/core/bubbles/mini_workspace_bubble.d.ts +84 -0
- package/core/bubbles/text_bubble.d.ts +38 -0
- package/core/bubbles/textinput_bubble.d.ts +102 -0
- package/core/bubbles.d.ts +11 -0
- package/core/bump_objects.d.ts +37 -0
- package/core/button_flyout_inflater.d.ts +42 -0
- package/core/clipboard/block_paster.d.ts +34 -0
- package/core/clipboard/registry.d.ts +21 -0
- package/core/clipboard/workspace_comment_paster.d.ts +19 -0
- package/core/clipboard.d.ts +103 -0
- package/core/comments/collapse_comment_bar_button.d.ts +52 -0
- package/core/comments/comment_bar_button.d.ts +62 -0
- package/core/comments/comment_editor.d.ts +62 -0
- package/core/comments/comment_view.d.ts +213 -0
- package/core/comments/delete_comment_bar_button.d.ts +52 -0
- package/core/comments/rendered_workspace_comment.d.ts +121 -0
- package/core/comments/workspace_comment.d.ts +107 -0
- package/core/comments.d.ts +13 -0
- package/core/common.d.ts +163 -0
- package/core/component_manager.d.ts +112 -0
- package/core/config.d.ts +24 -0
- package/core/connection.d.ts +291 -0
- package/core/connection_checker.d.ts +85 -0
- package/core/connection_db.d.ts +100 -0
- package/core/connection_type.d.ts +15 -0
- package/core/constants.d.ts +19 -0
- package/core/contextmenu.d.ts +58 -0
- package/core/contextmenu_items.d.ts +73 -0
- package/core/contextmenu_registry.d.ts +173 -0
- package/core/css.d.ts +25 -0
- package/core/delete_area.d.ts +48 -0
- package/core/dialog.d.ts +82 -0
- package/core/drag_target.d.ts +75 -0
- package/core/dragging/block_drag_strategy.d.ts +130 -0
- package/core/dragging/bubble_drag_strategy.d.ts +20 -0
- package/core/dragging/comment_drag_strategy.d.ts +26 -0
- package/core/dragging/dragger.d.ts +49 -0
- package/core/dragging.d.ts +11 -0
- package/core/dropdowndiv.d.ts +208 -0
- package/core/events/events.d.ts +72 -0
- package/core/events/events_abstract.d.ts +72 -0
- package/core/events/events_block_base.d.ts +46 -0
- package/core/events/events_block_change.d.ts +100 -0
- package/core/events/events_block_create.d.ts +59 -0
- package/core/events/events_block_delete.d.ts +62 -0
- package/core/events/events_block_drag.d.ts +61 -0
- package/core/events/events_block_field_intermediate_change.d.ts +71 -0
- package/core/events/events_block_move.d.ts +115 -0
- package/core/events/events_bubble_open.d.ts +62 -0
- package/core/events/events_click.d.ts +64 -0
- package/core/events/events_comment_base.d.ts +55 -0
- package/core/events/events_comment_change.d.ts +64 -0
- package/core/events/events_comment_collapse.d.ts +40 -0
- package/core/events/events_comment_create.d.ts +57 -0
- package/core/events/events_comment_delete.d.ts +57 -0
- package/core/events/events_comment_drag.d.ts +51 -0
- package/core/events/events_comment_move.d.ts +93 -0
- package/core/events/events_comment_resize.d.ts +68 -0
- package/core/events/events_selected.d.ts +53 -0
- package/core/events/events_theme_change.d.ts +43 -0
- package/core/events/events_toolbox_item_select.d.ts +49 -0
- package/core/events/events_trashcan_open.d.ts +47 -0
- package/core/events/events_ui_base.d.ts +32 -0
- package/core/events/events_var_base.d.ts +46 -0
- package/core/events/events_var_create.d.ts +55 -0
- package/core/events/events_var_delete.d.ts +50 -0
- package/core/events/events_var_rename.d.ts +51 -0
- package/core/events/events_var_type_change.d.ts +55 -0
- package/core/events/events_viewport.d.ts +67 -0
- package/core/events/predicates.d.ts +87 -0
- package/core/events/type.d.ts +81 -0
- package/core/events/utils.d.ts +211 -0
- package/core/events/workspace_events.d.ts +23 -0
- package/core/extensions.d.ts +99 -0
- package/core/field.d.ts +724 -0
- package/core/field_checkbox.d.ts +156 -0
- package/core/field_dropdown.d.ts +295 -0
- package/core/field_image.d.ts +148 -0
- package/core/field_input.d.ts +293 -0
- package/core/field_label.d.ts +80 -0
- package/core/field_label_serializable.d.ts +50 -0
- package/core/field_number.d.ts +194 -0
- package/core/field_registry.d.ts +83 -0
- package/core/field_textinput.d.ts +78 -0
- package/core/field_variable.d.ts +261 -0
- package/core/flyout_base.d.ts +453 -0
- package/core/flyout_button.d.ts +140 -0
- package/core/flyout_horizontal.d.ts +87 -0
- package/core/flyout_item.d.ts +26 -0
- package/core/flyout_metrics_manager.d.ts +46 -0
- package/core/flyout_navigator.d.ts +11 -0
- package/core/flyout_separator.d.ts +64 -0
- package/core/flyout_vertical.d.ts +88 -0
- package/core/focus_manager.d.ts +266 -0
- package/core/generator.d.ts +279 -0
- package/core/gesture.d.ts +449 -0
- package/core/grid.d.ts +124 -0
- package/core/icons/comment_icon.d.ts +134 -0
- package/core/icons/exceptions.d.ts +17 -0
- package/core/icons/icon.d.ts +84 -0
- package/core/icons/icon_types.d.ts +25 -0
- package/core/icons/mutator_icon.d.ts +96 -0
- package/core/icons/registry.d.ts +23 -0
- package/core/icons/warning_icon.d.ts +77 -0
- package/core/icons.d.ts +14 -0
- package/core/inject.d.ts +16 -0
- package/core/inputs/align.d.ts +14 -0
- package/core/inputs/dummy_input.d.ts +20 -0
- package/core/inputs/end_row_input.d.ts +25 -0
- package/core/inputs/input.d.ts +147 -0
- package/core/inputs/input_types.d.ts +16 -0
- package/core/inputs/statement_input.d.ts +22 -0
- package/core/inputs/value_input.d.ts +20 -0
- package/core/inputs.d.ts +14 -0
- package/core/insertion_marker_previewer.d.ts +67 -0
- package/core/interfaces/i_autohideable.d.ts +21 -0
- package/core/interfaces/i_bounded_element.d.ts +27 -0
- package/core/interfaces/i_bubble.d.ts +55 -0
- package/core/interfaces/i_collapsible_toolbox_item.d.ts +28 -0
- package/core/interfaces/i_comment_icon.d.ts +24 -0
- package/core/interfaces/i_component.d.ts +17 -0
- package/core/interfaces/i_connection_checker.d.ts +75 -0
- package/core/interfaces/i_connection_previewer.d.ts +39 -0
- package/core/interfaces/i_contextmenu.d.ts +16 -0
- package/core/interfaces/i_copyable.d.ts +30 -0
- package/core/interfaces/i_deletable.d.ts +23 -0
- package/core/interfaces/i_delete_area.d.ts +25 -0
- package/core/interfaces/i_drag_target.d.ts +59 -0
- package/core/interfaces/i_draggable.d.ts +56 -0
- package/core/interfaces/i_dragger.d.ts +32 -0
- package/core/interfaces/i_flyout.d.ts +159 -0
- package/core/interfaces/i_flyout_inflater.d.ts +48 -0
- package/core/interfaces/i_focusable_node.d.ts +105 -0
- package/core/interfaces/i_focusable_tree.d.ts +125 -0
- package/core/interfaces/i_has_bubble.d.ts +27 -0
- package/core/interfaces/i_icon.d.ts +84 -0
- package/core/interfaces/i_keyboard_accessible.d.ts +19 -0
- package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
- package/core/interfaces/i_metrics_manager.d.ts +129 -0
- package/core/interfaces/i_movable.d.ts +17 -0
- package/core/interfaces/i_navigation_policy.d.ts +63 -0
- package/core/interfaces/i_observable.d.ts +21 -0
- package/core/interfaces/i_parameter_model.d.ts +44 -0
- package/core/interfaces/i_paster.d.ts +15 -0
- package/core/interfaces/i_positionable.d.ts +29 -0
- package/core/interfaces/i_procedure_block.d.ts +16 -0
- package/core/interfaces/i_procedure_map.d.ts +16 -0
- package/core/interfaces/i_procedure_model.d.ts +59 -0
- package/core/interfaces/i_registrable.d.ts +11 -0
- package/core/interfaces/i_rendered_element.d.ts +16 -0
- package/core/interfaces/i_selectable.d.ts +26 -0
- package/core/interfaces/i_selectable_toolbox_item.d.ts +51 -0
- package/core/interfaces/i_serializable.d.ts +24 -0
- package/core/interfaces/i_serializer.d.ts +45 -0
- package/core/interfaces/i_styleable.d.ts +23 -0
- package/core/interfaces/i_toolbox.d.ts +102 -0
- package/core/interfaces/i_toolbox_item.d.ts +71 -0
- package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
- package/core/interfaces/i_variable_map.d.ts +48 -0
- package/core/interfaces/i_variable_model.d.ts +36 -0
- package/core/internal_constants.d.ts +34 -0
- package/core/keyboard_nav/block_comment_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/block_navigation_policy.d.ts +84 -0
- package/core/keyboard_nav/comment_bar_button_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/comment_editor_navigation_policy.d.ts +34 -0
- package/core/keyboard_nav/connection_navigation_policy.d.ts +67 -0
- package/core/keyboard_nav/field_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/flyout_button_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/flyout_navigation_policy.d.ts +65 -0
- package/core/keyboard_nav/flyout_separator_navigation_policy.d.ts +33 -0
- package/core/keyboard_nav/icon_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/line_cursor.d.ts +187 -0
- package/core/keyboard_nav/marker.d.ts +53 -0
- package/core/keyboard_nav/workspace_comment_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/workspace_navigation_policy.d.ts +56 -0
- package/core/keyboard_navigation_controller.d.ts +48 -0
- package/core/label_flyout_inflater.d.ts +42 -0
- package/core/layer_manager.d.ts +101 -0
- package/core/layers.d.ts +16 -0
- package/core/main.d.ts +7 -0
- package/core/marker_manager.d.ts +72 -0
- package/core/menu.d.ts +170 -0
- package/core/menu_separator.d.ts +25 -0
- package/core/menuitem.d.ts +147 -0
- package/core/metrics_manager.d.ts +221 -0
- package/core/msg.d.ts +24 -0
- package/core/names.d.ts +139 -0
- package/core/navigator.d.ts +65 -0
- package/core/observable_procedure_map.d.ts +34 -0
- package/core/options.d.ts +148 -0
- package/core/positionable_helpers.d.ts +89 -0
- package/core/procedures.d.ts +108 -0
- package/core/registry.d.ts +158 -0
- package/core/render_management.d.ts +34 -0
- package/core/rendered_connection.d.ts +262 -0
- package/core/renderers/common/block_rendering.d.ts +63 -0
- package/core/renderers/common/constants.d.ts +454 -0
- package/core/renderers/common/drawer.d.ts +156 -0
- package/core/renderers/common/i_path_object.d.ts +88 -0
- package/core/renderers/common/info.d.ts +201 -0
- package/core/renderers/common/path_object.d.ts +130 -0
- package/core/renderers/common/renderer.d.ts +141 -0
- package/core/renderers/geras/constants.d.ts +22 -0
- package/core/renderers/geras/drawer.d.ts +44 -0
- package/core/renderers/geras/geras.d.ts +17 -0
- package/core/renderers/geras/highlight_constants.d.ts +100 -0
- package/core/renderers/geras/highlighter.d.ts +96 -0
- package/core/renderers/geras/info.d.ts +45 -0
- package/core/renderers/geras/measurables/inline_input.d.ts +22 -0
- package/core/renderers/geras/measurables/statement_input.d.ts +22 -0
- package/core/renderers/geras/path_object.d.ts +42 -0
- package/core/renderers/geras/renderer.d.ts +77 -0
- package/core/renderers/measurables/base.d.ts +26 -0
- package/core/renderers/measurables/bottom_row.d.ts +58 -0
- package/core/renderers/measurables/connection.d.ts +25 -0
- package/core/renderers/measurables/external_value_input.d.ts +25 -0
- package/core/renderers/measurables/field.d.ts +28 -0
- package/core/renderers/measurables/hat.d.ts +19 -0
- package/core/renderers/measurables/icon.d.ts +25 -0
- package/core/renderers/measurables/in_row_spacer.d.ts +20 -0
- package/core/renderers/measurables/inline_input.d.ts +22 -0
- package/core/renderers/measurables/input_connection.d.ts +28 -0
- package/core/renderers/measurables/input_row.d.ts +26 -0
- package/core/renderers/measurables/jagged_edge.d.ts +19 -0
- package/core/renderers/measurables/next_connection.d.ts +22 -0
- package/core/renderers/measurables/output_connection.d.ts +24 -0
- package/core/renderers/measurables/previous_connection.d.ts +22 -0
- package/core/renderers/measurables/round_corner.d.ts +20 -0
- package/core/renderers/measurables/row.d.ts +124 -0
- package/core/renderers/measurables/spacer_row.d.ts +27 -0
- package/core/renderers/measurables/square_corner.d.ts +20 -0
- package/core/renderers/measurables/statement_input.d.ts +21 -0
- package/core/renderers/measurables/top_row.d.ts +53 -0
- package/core/renderers/measurables/types.d.ts +258 -0
- package/core/renderers/thrasos/info.d.ts +37 -0
- package/core/renderers/thrasos/renderer.d.ts +28 -0
- package/core/renderers/thrasos/thrasos.d.ts +10 -0
- package/core/renderers/zelos/constants.d.ts +165 -0
- package/core/renderers/zelos/drawer.d.ts +51 -0
- package/core/renderers/zelos/info.d.ts +89 -0
- package/core/renderers/zelos/measurables/bottom_row.d.ts +26 -0
- package/core/renderers/zelos/measurables/inputs.d.ts +21 -0
- package/core/renderers/zelos/measurables/row_elements.d.ts +20 -0
- package/core/renderers/zelos/measurables/top_row.d.ts +28 -0
- package/core/renderers/zelos/path_object.d.ts +76 -0
- package/core/renderers/zelos/renderer.d.ts +64 -0
- package/core/renderers/zelos/zelos.d.ts +17 -0
- package/core/scrollbar.d.ts +348 -0
- package/core/scrollbar_pair.d.ts +121 -0
- package/core/separator_flyout_inflater.d.ts +57 -0
- package/core/serialization/blocks.d.ts +138 -0
- package/core/serialization/exceptions.d.ts +81 -0
- package/core/serialization/priorities.d.ts +20 -0
- package/core/serialization/procedures.d.ts +97 -0
- package/core/serialization/registry.d.ts +21 -0
- package/core/serialization/variables.d.ts +38 -0
- package/core/serialization/workspace_comments.d.ts +45 -0
- package/core/serialization/workspaces.d.ts +29 -0
- package/core/serialization.d.ts +19 -0
- package/core/shortcut_items.d.ts +59 -0
- package/core/shortcut_registry.d.ts +236 -0
- package/core/sprites.d.ts +15 -0
- package/core/theme/classic.d.ts +12 -0
- package/core/theme/themes.d.ts +9 -0
- package/core/theme/zelos.d.ts +11 -0
- package/core/theme.d.ts +151 -0
- package/core/theme_manager.d.ts +92 -0
- package/core/toast.d.ts +74 -0
- package/core/toolbox/category.d.ts +265 -0
- package/core/toolbox/collapsible_category.d.ts +99 -0
- package/core/toolbox/separator.d.ts +40 -0
- package/core/toolbox/toolbox.d.ts +419 -0
- package/core/toolbox/toolbox_item.d.ts +109 -0
- package/core/tooltip.d.ts +118 -0
- package/core/touch.d.ts +72 -0
- package/core/trashcan.d.ts +212 -0
- package/core/utils/aria.d.ts +69 -0
- package/core/utils/array.d.ts +15 -0
- package/core/utils/colour.d.ts +102 -0
- package/core/utils/coordinate.d.ts +87 -0
- package/core/utils/deprecation.d.ts +18 -0
- package/core/utils/dom.d.ts +154 -0
- package/core/utils/drag.d.ts +33 -0
- package/core/utils/focusable_tree_traverser.d.ts +53 -0
- package/core/utils/idgenerator.d.ts +33 -0
- package/core/utils/keycodes.d.ts +137 -0
- package/core/utils/math.d.ts +31 -0
- package/core/utils/metrics.d.ts +64 -0
- package/core/utils/object.d.ts +17 -0
- package/core/utils/parsing.d.ts +52 -0
- package/core/utils/rect.d.ts +82 -0
- package/core/utils/size.d.ts +44 -0
- package/core/utils/string.d.ts +46 -0
- package/core/utils/style.d.ts +89 -0
- package/core/utils/svg.d.ts +75 -0
- package/core/utils/svg_math.d.ts +64 -0
- package/core/utils/svg_paths.d.ts +103 -0
- package/core/utils/toolbox.d.ts +180 -0
- package/core/utils/useragent.d.ts +14 -0
- package/core/utils/xml.d.ts +96 -0
- package/core/utils.d.ts +31 -0
- package/core/variable_map.d.ts +164 -0
- package/core/variable_model.d.ts +73 -0
- package/core/variables.d.ts +238 -0
- package/core/variables_dynamic.d.ts +56 -0
- package/core/widgetdiv.d.ts +87 -0
- package/core/workspace.d.ts +482 -0
- package/core/workspace_audio.d.ts +62 -0
- package/core/workspace_dragger.d.ts +48 -0
- package/core/workspace_svg.d.ts +1103 -0
- package/core/xml.d.ts +127 -0
- package/core/zoom_controls.d.ts +134 -0
- package/core-node.js +31 -0
- package/core.d.ts +7 -0
- package/core.js +4 -0
- package/dart.d.ts +7 -0
- package/dart.js +4 -0
- package/dart.mjs +6 -0
- package/dart_compressed.js +330 -0
- package/dart_compressed.js.map +1 -0
- package/generators/dart/dart_generator.d.ts +104 -0
- package/generators/dart/lists.d.ts +21 -0
- package/generators/dart/logic.d.ts +20 -0
- package/generators/dart/loops.d.ts +14 -0
- package/generators/dart/math.d.ts +26 -0
- package/generators/dart/procedures.d.ts +14 -0
- package/generators/dart/text.d.ts +25 -0
- package/generators/dart/variables.d.ts +14 -0
- package/generators/dart/variables_dynamic.d.ts +10 -0
- package/generators/dart.d.ts +18 -0
- package/generators/javascript/javascript_generator.d.ts +123 -0
- package/generators/javascript/lists.d.ts +21 -0
- package/generators/javascript/logic.d.ts +20 -0
- package/generators/javascript/loops.d.ts +14 -0
- package/generators/javascript/math.d.ts +26 -0
- package/generators/javascript/procedures.d.ts +17 -0
- package/generators/javascript/text.d.ts +25 -0
- package/generators/javascript/variables.d.ts +14 -0
- package/generators/javascript/variables_dynamic.d.ts +10 -0
- package/generators/javascript.d.ts +18 -0
- package/generators/lua/lists.d.ts +21 -0
- package/generators/lua/logic.d.ts +20 -0
- package/generators/lua/loops.d.ts +14 -0
- package/generators/lua/lua_generator.d.ts +91 -0
- package/generators/lua/math.d.ts +26 -0
- package/generators/lua/procedures.d.ts +14 -0
- package/generators/lua/text.d.ts +25 -0
- package/generators/lua/variables.d.ts +14 -0
- package/generators/lua/variables_dynamic.d.ts +10 -0
- package/generators/lua.d.ts +12 -0
- package/generators/php/lists.d.ts +21 -0
- package/generators/php/logic.d.ts +20 -0
- package/generators/php/loops.d.ts +14 -0
- package/generators/php/math.d.ts +26 -0
- package/generators/php/php_generator.d.ts +122 -0
- package/generators/php/procedures.d.ts +14 -0
- package/generators/php/text.d.ts +25 -0
- package/generators/php/variables.d.ts +14 -0
- package/generators/php/variables_dynamic.d.ts +10 -0
- package/generators/php.d.ts +13 -0
- package/generators/python/lists.d.ts +21 -0
- package/generators/python/logic.d.ts +20 -0
- package/generators/python/loops.d.ts +14 -0
- package/generators/python/math.d.ts +26 -0
- package/generators/python/procedures.d.ts +14 -0
- package/generators/python/python_generator.d.ts +111 -0
- package/generators/python/text.d.ts +25 -0
- package/generators/python/variables.d.ts +14 -0
- package/generators/python/variables_dynamic.d.ts +10 -0
- package/generators/python.d.ts +13 -0
- package/index.d.ts +10 -0
- package/index.js +36 -0
- package/index.mjs +163 -0
- package/javascript.d.ts +7 -0
- package/javascript.js +4 -0
- package/javascript.mjs +6 -0
- package/javascript_compressed.js +264 -0
- package/javascript_compressed.js.map +1 -0
- package/lua.d.ts +7 -0
- package/lua.js +4 -0
- package/lua.mjs +6 -0
- package/lua_compressed.js +373 -0
- package/lua_compressed.js.map +1 -0
- package/media/1x1.gif +0 -0
- package/media/click.mp3 +0 -0
- package/media/delete-icon.svg +1 -0
- package/media/delete.mp3 +0 -0
- package/media/disconnect.mp3 +0 -0
- package/media/dropdown-arrow.svg +1 -0
- package/media/foldout-icon.svg +1 -0
- package/media/handclosed.cur +0 -0
- package/media/handdelete.cur +0 -0
- package/media/handopen.cur +0 -0
- package/media/pilcrow.png +0 -0
- package/media/quote0.png +0 -0
- package/media/quote1.png +0 -0
- package/media/resize-handle.svg +3 -0
- package/media/sprites.png +0 -0
- package/media/sprites.svg +74 -0
- package/msg/ab.d.ts +8 -0
- package/msg/ab.js +465 -0
- package/msg/ab.mjs +446 -0
- package/msg/ace.d.ts +8 -0
- package/msg/ace.js +465 -0
- package/msg/ace.mjs +446 -0
- package/msg/af.d.ts +8 -0
- package/msg/af.js +465 -0
- package/msg/af.mjs +446 -0
- package/msg/am.d.ts +8 -0
- package/msg/am.js +465 -0
- package/msg/am.mjs +446 -0
- package/msg/ar.d.ts +8 -0
- package/msg/ar.js +465 -0
- package/msg/ar.mjs +446 -0
- package/msg/ast.d.ts +8 -0
- package/msg/ast.js +465 -0
- package/msg/ast.mjs +446 -0
- package/msg/az.d.ts +8 -0
- package/msg/az.js +465 -0
- package/msg/az.mjs +446 -0
- package/msg/ba.d.ts +8 -0
- package/msg/ba.js +465 -0
- package/msg/ba.mjs +446 -0
- package/msg/bcc.d.ts +8 -0
- package/msg/bcc.js +465 -0
- package/msg/bcc.mjs +446 -0
- package/msg/be-tarask.d.ts +8 -0
- package/msg/be-tarask.js +465 -0
- package/msg/be-tarask.mjs +446 -0
- package/msg/be.d.ts +8 -0
- package/msg/be.js +465 -0
- package/msg/be.mjs +446 -0
- package/msg/bg.d.ts +8 -0
- package/msg/bg.js +465 -0
- package/msg/bg.mjs +446 -0
- package/msg/bn.d.ts +8 -0
- package/msg/bn.js +465 -0
- package/msg/bn.mjs +446 -0
- package/msg/br.d.ts +8 -0
- package/msg/br.js +465 -0
- package/msg/br.mjs +446 -0
- package/msg/bs.d.ts +8 -0
- package/msg/bs.js +465 -0
- package/msg/bs.mjs +446 -0
- package/msg/ca.d.ts +8 -0
- package/msg/ca.js +465 -0
- package/msg/ca.mjs +446 -0
- package/msg/cdo.d.ts +8 -0
- package/msg/cdo.js +465 -0
- package/msg/cdo.mjs +446 -0
- package/msg/ce.d.ts +8 -0
- package/msg/ce.js +465 -0
- package/msg/ce.mjs +446 -0
- package/msg/cs.d.ts +8 -0
- package/msg/cs.js +465 -0
- package/msg/cs.mjs +446 -0
- package/msg/da.d.ts +8 -0
- package/msg/da.js +465 -0
- package/msg/da.mjs +446 -0
- package/msg/de.d.ts +8 -0
- package/msg/de.js +465 -0
- package/msg/de.mjs +446 -0
- package/msg/diq.d.ts +8 -0
- package/msg/diq.js +465 -0
- package/msg/diq.mjs +446 -0
- package/msg/dtp.d.ts +8 -0
- package/msg/dtp.js +465 -0
- package/msg/dtp.mjs +446 -0
- package/msg/dty.d.ts +8 -0
- package/msg/dty.js +465 -0
- package/msg/dty.mjs +446 -0
- package/msg/ee.d.ts +8 -0
- package/msg/ee.js +465 -0
- package/msg/ee.mjs +446 -0
- package/msg/el.d.ts +8 -0
- package/msg/el.js +465 -0
- package/msg/el.mjs +446 -0
- package/msg/en-gb.d.ts +8 -0
- package/msg/en-gb.js +465 -0
- package/msg/en-gb.mjs +446 -0
- package/msg/en.d.ts +8 -0
- package/msg/en.js +465 -0
- package/msg/en.mjs +446 -0
- package/msg/eo.d.ts +8 -0
- package/msg/eo.js +465 -0
- package/msg/eo.mjs +446 -0
- package/msg/es.d.ts +8 -0
- package/msg/es.js +465 -0
- package/msg/es.mjs +446 -0
- package/msg/et.d.ts +8 -0
- package/msg/et.js +465 -0
- package/msg/et.mjs +446 -0
- package/msg/eu.d.ts +8 -0
- package/msg/eu.js +465 -0
- package/msg/eu.mjs +446 -0
- package/msg/fa.d.ts +8 -0
- package/msg/fa.js +465 -0
- package/msg/fa.mjs +446 -0
- package/msg/fi.d.ts +8 -0
- package/msg/fi.js +465 -0
- package/msg/fi.mjs +446 -0
- package/msg/fo.d.ts +8 -0
- package/msg/fo.js +465 -0
- package/msg/fo.mjs +446 -0
- package/msg/fr.d.ts +8 -0
- package/msg/fr.js +465 -0
- package/msg/fr.mjs +446 -0
- package/msg/frr.d.ts +8 -0
- package/msg/frr.js +465 -0
- package/msg/frr.mjs +446 -0
- package/msg/gl.d.ts +8 -0
- package/msg/gl.js +465 -0
- package/msg/gl.mjs +446 -0
- package/msg/gn.d.ts +8 -0
- package/msg/gn.js +465 -0
- package/msg/gn.mjs +446 -0
- package/msg/gor.d.ts +8 -0
- package/msg/gor.js +465 -0
- package/msg/gor.mjs +446 -0
- package/msg/ha.d.ts +8 -0
- package/msg/ha.js +465 -0
- package/msg/ha.mjs +446 -0
- package/msg/hak.d.ts +8 -0
- package/msg/hak.js +465 -0
- package/msg/hak.mjs +446 -0
- package/msg/he.d.ts +8 -0
- package/msg/he.js +465 -0
- package/msg/he.mjs +446 -0
- package/msg/hi.d.ts +8 -0
- package/msg/hi.js +465 -0
- package/msg/hi.mjs +446 -0
- package/msg/hr.d.ts +8 -0
- package/msg/hr.js +465 -0
- package/msg/hr.mjs +446 -0
- package/msg/hrx.d.ts +8 -0
- package/msg/hrx.js +465 -0
- package/msg/hrx.mjs +446 -0
- package/msg/hsb.d.ts +8 -0
- package/msg/hsb.js +465 -0
- package/msg/hsb.mjs +446 -0
- package/msg/hu.d.ts +8 -0
- package/msg/hu.js +465 -0
- package/msg/hu.mjs +446 -0
- package/msg/hy.d.ts +8 -0
- package/msg/hy.js +465 -0
- package/msg/hy.mjs +446 -0
- package/msg/ia.d.ts +8 -0
- package/msg/ia.js +465 -0
- package/msg/ia.mjs +446 -0
- package/msg/id.d.ts +8 -0
- package/msg/id.js +465 -0
- package/msg/id.mjs +446 -0
- package/msg/ig.d.ts +8 -0
- package/msg/ig.js +465 -0
- package/msg/ig.mjs +446 -0
- package/msg/inh.d.ts +8 -0
- package/msg/inh.js +465 -0
- package/msg/inh.mjs +446 -0
- package/msg/is.d.ts +8 -0
- package/msg/is.js +465 -0
- package/msg/is.mjs +446 -0
- package/msg/it.d.ts +8 -0
- package/msg/it.js +465 -0
- package/msg/it.mjs +446 -0
- package/msg/ja.d.ts +8 -0
- package/msg/ja.js +465 -0
- package/msg/ja.mjs +446 -0
- package/msg/ka.d.ts +8 -0
- package/msg/ka.js +465 -0
- package/msg/ka.mjs +446 -0
- package/msg/kab.d.ts +8 -0
- package/msg/kab.js +465 -0
- package/msg/kab.mjs +446 -0
- package/msg/kbd-cyrl.d.ts +8 -0
- package/msg/kbd-cyrl.js +465 -0
- package/msg/kbd-cyrl.mjs +446 -0
- package/msg/km.d.ts +8 -0
- package/msg/km.js +465 -0
- package/msg/km.mjs +446 -0
- package/msg/kn.d.ts +8 -0
- package/msg/kn.js +465 -0
- package/msg/kn.mjs +446 -0
- package/msg/ko.d.ts +8 -0
- package/msg/ko.js +465 -0
- package/msg/ko.mjs +446 -0
- package/msg/ksh.d.ts +8 -0
- package/msg/ksh.js +465 -0
- package/msg/ksh.mjs +446 -0
- package/msg/ku-latn.d.ts +8 -0
- package/msg/ku-latn.js +465 -0
- package/msg/ku-latn.mjs +446 -0
- package/msg/ky.d.ts +8 -0
- package/msg/ky.js +465 -0
- package/msg/ky.mjs +446 -0
- package/msg/la.d.ts +8 -0
- package/msg/la.js +465 -0
- package/msg/la.mjs +446 -0
- package/msg/lb.d.ts +8 -0
- package/msg/lb.js +465 -0
- package/msg/lb.mjs +446 -0
- package/msg/lki.d.ts +8 -0
- package/msg/lki.js +465 -0
- package/msg/lki.mjs +446 -0
- package/msg/lo.d.ts +8 -0
- package/msg/lo.js +465 -0
- package/msg/lo.mjs +446 -0
- package/msg/lrc.d.ts +8 -0
- package/msg/lrc.js +465 -0
- package/msg/lrc.mjs +446 -0
- package/msg/lt.d.ts +8 -0
- package/msg/lt.js +465 -0
- package/msg/lt.mjs +446 -0
- package/msg/lv.d.ts +8 -0
- package/msg/lv.js +465 -0
- package/msg/lv.mjs +446 -0
- package/msg/mg.d.ts +8 -0
- package/msg/mg.js +465 -0
- package/msg/mg.mjs +446 -0
- package/msg/mk.d.ts +8 -0
- package/msg/mk.js +465 -0
- package/msg/mk.mjs +446 -0
- package/msg/ml.d.ts +8 -0
- package/msg/ml.js +465 -0
- package/msg/ml.mjs +446 -0
- package/msg/mnw.d.ts +8 -0
- package/msg/mnw.js +465 -0
- package/msg/mnw.mjs +446 -0
- package/msg/ms.d.ts +8 -0
- package/msg/ms.js +465 -0
- package/msg/ms.mjs +446 -0
- package/msg/msg.d.ts +440 -0
- package/msg/my.d.ts +8 -0
- package/msg/my.js +465 -0
- package/msg/my.mjs +446 -0
- package/msg/mzn.d.ts +8 -0
- package/msg/mzn.js +465 -0
- package/msg/mzn.mjs +446 -0
- package/msg/nb.d.ts +8 -0
- package/msg/nb.js +465 -0
- package/msg/nb.mjs +446 -0
- package/msg/ne.d.ts +8 -0
- package/msg/ne.js +465 -0
- package/msg/ne.mjs +446 -0
- package/msg/nl.d.ts +8 -0
- package/msg/nl.js +465 -0
- package/msg/nl.mjs +446 -0
- package/msg/oc.d.ts +8 -0
- package/msg/oc.js +465 -0
- package/msg/oc.mjs +446 -0
- package/msg/olo.d.ts +8 -0
- package/msg/olo.js +465 -0
- package/msg/olo.mjs +446 -0
- package/msg/pa.d.ts +8 -0
- package/msg/pa.js +465 -0
- package/msg/pa.mjs +446 -0
- package/msg/pl.d.ts +8 -0
- package/msg/pl.js +465 -0
- package/msg/pl.mjs +446 -0
- package/msg/pms.d.ts +8 -0
- package/msg/pms.js +465 -0
- package/msg/pms.mjs +446 -0
- package/msg/ps.d.ts +8 -0
- package/msg/ps.js +465 -0
- package/msg/ps.mjs +446 -0
- package/msg/pt-br.d.ts +8 -0
- package/msg/pt-br.js +465 -0
- package/msg/pt-br.mjs +446 -0
- package/msg/pt.d.ts +8 -0
- package/msg/pt.js +465 -0
- package/msg/pt.mjs +446 -0
- package/msg/ro.d.ts +8 -0
- package/msg/ro.js +465 -0
- package/msg/ro.mjs +446 -0
- package/msg/ru.d.ts +8 -0
- package/msg/ru.js +465 -0
- package/msg/ru.mjs +446 -0
- package/msg/sc.d.ts +8 -0
- package/msg/sc.js +465 -0
- package/msg/sc.mjs +446 -0
- package/msg/sco.d.ts +8 -0
- package/msg/sco.js +465 -0
- package/msg/sco.mjs +446 -0
- package/msg/sd.d.ts +8 -0
- package/msg/sd.js +465 -0
- package/msg/sd.mjs +446 -0
- package/msg/shn.d.ts +8 -0
- package/msg/shn.js +465 -0
- package/msg/shn.mjs +446 -0
- package/msg/si.d.ts +8 -0
- package/msg/si.js +465 -0
- package/msg/si.mjs +446 -0
- package/msg/sk.d.ts +8 -0
- package/msg/sk.js +465 -0
- package/msg/sk.mjs +446 -0
- package/msg/skr-arab.d.ts +8 -0
- package/msg/skr-arab.js +465 -0
- package/msg/skr-arab.mjs +446 -0
- package/msg/sl.d.ts +8 -0
- package/msg/sl.js +465 -0
- package/msg/sl.mjs +446 -0
- package/msg/smn.d.ts +8 -0
- package/msg/smn.js +465 -0
- package/msg/smn.mjs +446 -0
- package/msg/sq.d.ts +8 -0
- package/msg/sq.js +465 -0
- package/msg/sq.mjs +446 -0
- package/msg/sr-latn.d.ts +8 -0
- package/msg/sr-latn.js +465 -0
- package/msg/sr-latn.mjs +446 -0
- package/msg/sr.d.ts +8 -0
- package/msg/sr.js +465 -0
- package/msg/sr.mjs +446 -0
- package/msg/sv.d.ts +8 -0
- package/msg/sv.js +465 -0
- package/msg/sv.mjs +446 -0
- package/msg/sw.d.ts +8 -0
- package/msg/sw.js +465 -0
- package/msg/sw.mjs +446 -0
- package/msg/ta.d.ts +8 -0
- package/msg/ta.js +465 -0
- package/msg/ta.mjs +446 -0
- package/msg/tcy.d.ts +8 -0
- package/msg/tcy.js +465 -0
- package/msg/tcy.mjs +446 -0
- package/msg/tdd.d.ts +8 -0
- package/msg/tdd.js +465 -0
- package/msg/tdd.mjs +446 -0
- package/msg/te.d.ts +8 -0
- package/msg/te.js +465 -0
- package/msg/te.mjs +446 -0
- package/msg/th.d.ts +8 -0
- package/msg/th.js +465 -0
- package/msg/th.mjs +446 -0
- package/msg/ti.d.ts +8 -0
- package/msg/ti.js +465 -0
- package/msg/ti.mjs +446 -0
- package/msg/tl.d.ts +8 -0
- package/msg/tl.js +465 -0
- package/msg/tl.mjs +446 -0
- package/msg/tlh.d.ts +8 -0
- package/msg/tlh.js +465 -0
- package/msg/tlh.mjs +446 -0
- package/msg/tr.d.ts +8 -0
- package/msg/tr.js +465 -0
- package/msg/tr.mjs +446 -0
- package/msg/ug-arab.d.ts +8 -0
- package/msg/ug-arab.js +465 -0
- package/msg/ug-arab.mjs +446 -0
- package/msg/uk.d.ts +8 -0
- package/msg/uk.js +465 -0
- package/msg/uk.mjs +446 -0
- package/msg/ur.d.ts +8 -0
- package/msg/ur.js +465 -0
- package/msg/ur.mjs +446 -0
- package/msg/uz.d.ts +8 -0
- package/msg/uz.js +465 -0
- package/msg/uz.mjs +446 -0
- package/msg/vi.d.ts +8 -0
- package/msg/vi.js +465 -0
- package/msg/vi.mjs +446 -0
- package/msg/xmf.d.ts +8 -0
- package/msg/xmf.js +465 -0
- package/msg/xmf.mjs +446 -0
- package/msg/yo.d.ts +8 -0
- package/msg/yo.js +465 -0
- package/msg/yo.mjs +446 -0
- package/msg/zgh.d.ts +8 -0
- package/msg/zgh.js +465 -0
- package/msg/zgh.mjs +446 -0
- package/msg/zh-hans.d.ts +8 -0
- package/msg/zh-hans.js +465 -0
- package/msg/zh-hans.mjs +446 -0
- package/msg/zh-hant.d.ts +8 -0
- package/msg/zh-hant.js +465 -0
- package/msg/zh-hant.mjs +446 -0
- package/package.json +133 -0
- package/php.d.ts +7 -0
- package/php.js +4 -0
- package/php.mjs +6 -0
- package/php_compressed.js +283 -0
- package/php_compressed.js.map +1 -0
- package/python.d.ts +7 -0
- package/python.js +4 -0
- package/python.mjs +6 -0
- package/python_compressed.js +208 -0
- package/python_compressed.js.map +1 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
// Do not edit this file; automatically generated.
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
;(function(root, factory) {
|
|
5
|
+
if (typeof define === 'function' && define.amd) { // AMD
|
|
6
|
+
define(["./blockly_compressed.js"], factory);
|
|
7
|
+
} else if (typeof exports === 'object') { // Node.js
|
|
8
|
+
module.exports = factory(require("./blockly_compressed.js"));
|
|
9
|
+
} else { // Script
|
|
10
|
+
root.lua = factory(root.Blockly);
|
|
11
|
+
root.Blockly.Lua = root.lua.luaGenerator;
|
|
12
|
+
}
|
|
13
|
+
}(this, function(__parent__) {
|
|
14
|
+
var $=__parent__.__namespace__;
|
|
15
|
+
var lists_create_empty$$module$build$src$generators$lua$lists=function(a,b){return["{}",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_create_with$$module$build$src$generators$lua$lists=function(a,b){const c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";return["{"+c.join(", ")+"}",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_repeat$$module$build$src$generators$lua$lists=
|
|
16
|
+
function(a,b){const c=b.provideFunction_("create_list_repeated",`
|
|
17
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(item, count)
|
|
18
|
+
local t = {}
|
|
19
|
+
for i = 1, count do
|
|
20
|
+
table.insert(t, item)
|
|
21
|
+
end
|
|
22
|
+
return t
|
|
23
|
+
end
|
|
24
|
+
`),d=b.valueToCode(a,"ITEM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";a=b.valueToCode(a,"NUM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";return[c+"("+d+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_length$$module$build$src$generators$lua$lists=function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"{}"),Order$$module$build$src$generators$lua$lua_generator.UNARY]},lists_isEmpty$$module$build$src$generators$lua$lists=
|
|
25
|
+
function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"{}")+" == 0",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL]},lists_indexOf$$module$build$src$generators$lua$lists=function(a,b){const c=b.valueToCode(a,"FIND",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''",d=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}";return[(a.getFieldValue("END")==="FIRST"?b.provideFunction_("first_index",
|
|
26
|
+
`
|
|
27
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t, elem)
|
|
28
|
+
for k, v in ipairs(t) do
|
|
29
|
+
if v == elem then
|
|
30
|
+
return k
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
return 0
|
|
34
|
+
end
|
|
35
|
+
`):b.provideFunction_("last_index",`
|
|
36
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t, elem)
|
|
37
|
+
for i = #t, 1, -1 do
|
|
38
|
+
if t[i] == elem then
|
|
39
|
+
return i
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
return 0
|
|
43
|
+
end
|
|
44
|
+
`))+"("+d+", "+c+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_getIndex$$module$build$src$generators$lua$lists=function(a,b){var c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START";const e=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.HIGH)||"({})";if(d!=="LAST"&&d!=="FROM_END"&&d!=="RANDOM"||e.match(/^\w+$/)){b=b.valueToCode(a,"AT",c==="GET"&&d==="FROM_END"?Order$$module$build$src$generators$lua$lua_generator.ADDITIVE:Order$$module$build$src$generators$lua$lua_generator.NONE)||
|
|
45
|
+
"1";b=getListIndex$$module$build$src$generators$lua$lists(e,d,b);if(c==="GET")return[e+"["+b+"]",Order$$module$build$src$generators$lua$lua_generator.HIGH];d="table.remove("+e+", "+b+")";return c==="GET_REMOVE"?[d,Order$$module$build$src$generators$lua$lua_generator.HIGH]:d+"\n"}if(c==="REMOVE")return c=b.valueToCode(a,"AT",d==="FROM_END"?Order$$module$build$src$generators$lua$lua_generator.ADDITIVE:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1",b=b.nameDB_.getDistinctName("tmp_list",
|
|
46
|
+
$.NameType$$module$build$src$core$names.VARIABLE),c=getListIndex$$module$build$src$generators$lua$lists(b,d,c),b+" = "+e+"\ntable.remove("+b+", "+c+")\n";a=b.valueToCode(a,"AT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";return[(c==="GET"?b.provideFunction_("list_get_"+d.toLowerCase(),["function "+b.FUNCTION_NAME_PLACEHOLDER_+"(t"+(d==="FROM_END"||d==="FROM_START"?", at)":")")," return t["+getListIndex$$module$build$src$generators$lua$lists("t",d,"at")+"]","end"]):b.provideFunction_("list_remove_"+
|
|
47
|
+
d.toLowerCase(),["function "+b.FUNCTION_NAME_PLACEHOLDER_+"(t"+(d==="FROM_END"||d==="FROM_START"?", at)":")")," return table.remove(t, "+getListIndex$$module$build$src$generators$lua$lists("t",d,"at")+")","end"]))+"("+e+(d==="FROM_END"||d==="FROM_START"?", "+a:"")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_setIndex$$module$build$src$generators$lua$lists=function(a,b){let c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.HIGH)||"{}";const d=a.getFieldValue("MODE")||
|
|
48
|
+
"SET",e=a.getFieldValue("WHERE")||"FROM_START",f=b.valueToCode(a,"AT",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE)||"1";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"Nil";let g="";e!=="LAST"&&e!=="FROM_END"&&e!=="RANDOM"||c.match(/^\w+$/)||(b=b.nameDB_.getDistinctName("tmp_list",$.NameType$$module$build$src$core$names.VARIABLE),g=b+" = "+c+"\n",c=b);g=d==="SET"?g+(c+"["+getListIndex$$module$build$src$generators$lua$lists(c,e,f)+"] = "+a):g+("table.insert("+
|
|
49
|
+
c+", "+(getListIndex$$module$build$src$generators$lua$lists(c,e,f)+(e==="LAST"?" + 1":""))+", "+a+")");return g+"\n"},lists_getSublist$$module$build$src$generators$lua$lists=function(a,b){const c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}",d=a.getFieldValue("WHERE1"),e=a.getFieldValue("WHERE2"),f=b.valueToCode(a,"AT1",Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";a=b.valueToCode(a,"AT2",Order$$module$build$src$generators$lua$lua_generator.NONE)||
|
|
50
|
+
"1";const g=d==="FROM_END"||d==="FROM_START"?", at1":"",h=e==="FROM_END"||e==="FROM_START"?", at2":"";return[b.provideFunction_("list_sublist_"+d.toLowerCase()+"_"+e.toLowerCase(),`
|
|
51
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(source${g}${h})
|
|
52
|
+
local t = {}
|
|
53
|
+
local start = ${getListIndex$$module$build$src$generators$lua$lists("source",d,"at1")}
|
|
54
|
+
local finish = ${getListIndex$$module$build$src$generators$lua$lists("source",e,"at2")}
|
|
55
|
+
for i = start, finish do
|
|
56
|
+
table.insert(t, source[i])
|
|
57
|
+
end
|
|
58
|
+
return t
|
|
59
|
+
end
|
|
60
|
+
`)+"("+c+(d==="FROM_END"||d==="FROM_START"?", "+f:"")+(e==="FROM_END"||e==="FROM_START"?", "+a:"")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_sort$$module$build$src$generators$lua$lists=function(a,b){const c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}",d=a.getFieldValue("DIRECTION")==="1"?1:-1;a=a.getFieldValue("TYPE");return[b.provideFunction_("list_sort",`
|
|
61
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(list, typev, direction)
|
|
62
|
+
local t = {}
|
|
63
|
+
for n,v in pairs(list) do table.insert(t, v) end
|
|
64
|
+
local compareFuncs = {
|
|
65
|
+
NUMERIC = function(a, b)
|
|
66
|
+
return (tonumber(tostring(a)) or 0)
|
|
67
|
+
< (tonumber(tostring(b)) or 0) end,
|
|
68
|
+
TEXT = function(a, b)
|
|
69
|
+
return tostring(a) < tostring(b) end,
|
|
70
|
+
IGNORE_CASE = function(a, b)
|
|
71
|
+
return string.lower(tostring(a)) < string.lower(tostring(b)) end
|
|
72
|
+
}
|
|
73
|
+
local compareTemp = compareFuncs[typev]
|
|
74
|
+
local compare = compareTemp
|
|
75
|
+
if direction == -1
|
|
76
|
+
then compare = function(a, b) return compareTemp(b, a) end
|
|
77
|
+
end
|
|
78
|
+
table.sort(t, compare)
|
|
79
|
+
return t
|
|
80
|
+
end
|
|
81
|
+
`)+"("+c+',"'+a+'", '+d+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_split$$module$build$src$generators$lua$lists=function(a,b){let c=b.valueToCode(a,"INPUT",Order$$module$build$src$generators$lua$lua_generator.NONE);const d=b.valueToCode(a,"DELIM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";a=a.getFieldValue("MODE");if(a==="SPLIT")c||(c="''"),b=b.provideFunction_("list_string_split",`
|
|
82
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(input, delim)
|
|
83
|
+
local t = {}
|
|
84
|
+
local pos = 1
|
|
85
|
+
while true do
|
|
86
|
+
next_delim = string.find(input, delim, pos)
|
|
87
|
+
if next_delim == nil then
|
|
88
|
+
table.insert(t, string.sub(input, pos))
|
|
89
|
+
break
|
|
90
|
+
else
|
|
91
|
+
table.insert(t, string.sub(input, pos, next_delim-1))
|
|
92
|
+
pos = next_delim + #delim
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
return t
|
|
96
|
+
end
|
|
97
|
+
`);else if(a==="JOIN")c||(c="{}"),b="table.concat";else throw Error("Unknown mode: "+a);return[b+"("+c+", "+d+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},lists_reverse$$module$build$src$generators$lua$lists=function(a,b){a=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}";return[b.provideFunction_("list_reverse",`
|
|
98
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(input)
|
|
99
|
+
local reversed = {}
|
|
100
|
+
for i = #input, 1, -1 do
|
|
101
|
+
table.insert(reversed, input[i])
|
|
102
|
+
end
|
|
103
|
+
return reversed
|
|
104
|
+
end
|
|
105
|
+
`)+"("+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},controls_if$$module$build$src$generators$lua$logic=function(a,b){var c=0;let d="";b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));do{const e=b.valueToCode(a,"IF"+c,Order$$module$build$src$generators$lua$lua_generator.NONE)||"false";let f=b.statementToCode(a,"DO"+c);b.STATEMENT_SUFFIX&&(f=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+f);d+=(c>0?"else":"")+"if "+e+" then\n"+f;c++}while(a.getInput("IF"+c));
|
|
106
|
+
if(a.getInput("ELSE")||b.STATEMENT_SUFFIX)c=a.getInput("ELSE")?b.statementToCode(a,"ELSE"):"",b.STATEMENT_SUFFIX&&(c=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+c),d+="else\n"+c;return d+"end\n"},logic_compare$$module$build$src$generators$lua$logic=function(a,b){const c={EQ:"==",NEQ:"~=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],d=b.valueToCode(a,"A",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL)||"0";a=b.valueToCode(a,"B",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL)||
|
|
107
|
+
"0";return[d+" "+c+" "+a,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL]},logic_operation$$module$build$src$generators$lua$logic=function(a,b){const c=a.getFieldValue("OP")==="AND"?"and":"or",d=c==="and"?Order$$module$build$src$generators$lua$lua_generator.AND:Order$$module$build$src$generators$lua$lua_generator.OR;let e=b.valueToCode(a,"A",d);a=b.valueToCode(a,"B",d);e||a?(b=c==="and"?"true":"false",e||(e=b),a||(a=b)):a=e="false";return[e+" "+c+" "+a,d]},logic_negate$$module$build$src$generators$lua$logic=
|
|
108
|
+
function(a,b){return["not "+(b.valueToCode(a,"BOOL",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"true"),Order$$module$build$src$generators$lua$lua_generator.UNARY]},logic_boolean$$module$build$src$generators$lua$logic=function(a,b){return[a.getFieldValue("BOOL")==="TRUE"?"true":"false",Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},logic_null$$module$build$src$generators$lua$logic=function(a,b){return["nil",Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},
|
|
109
|
+
logic_ternary$$module$build$src$generators$lua$logic=function(a,b){const c=b.valueToCode(a,"IF",Order$$module$build$src$generators$lua$lua_generator.AND)||"false",d=b.valueToCode(a,"THEN",Order$$module$build$src$generators$lua$lua_generator.AND)||"nil";a=b.valueToCode(a,"ELSE",Order$$module$build$src$generators$lua$lua_generator.OR)||"nil";return[c+" and "+d+" or "+a,Order$$module$build$src$generators$lua$lua_generator.OR]},addContinueLabel$$module$build$src$generators$lua$loops=function(a,b){return a.includes(CONTINUE_STATEMENT$$module$build$src$generators$lua$loops)?
|
|
110
|
+
a+b+"::continue::\n":a},controls_repeat_ext$$module$build$src$generators$lua$loops=function(a,b){let c;c=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):b.valueToCode(a,"TIMES",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";c=$.isNumber$$module$build$src$core$utils$string(c)?parseInt(c,10):"math.floor("+c+")";let d=b.statementToCode(a,"DO");d=b.addLoopTrap(d,a);d=addContinueLabel$$module$build$src$generators$lua$loops(d,b.INDENT);return"for "+b.nameDB_.getDistinctName("count",
|
|
111
|
+
$.NameType$$module$build$src$core$names.VARIABLE)+" = 1, "+c+" do\n"+d+"end\n"},controls_whileUntil$$module$build$src$generators$lua$loops=function(a,b){const c=a.getFieldValue("MODE")==="UNTIL";let d=b.valueToCode(a,"BOOL",c?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"false",e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);e=addContinueLabel$$module$build$src$generators$lua$loops(e,b.INDENT);c&&(d="not "+d);return"while "+
|
|
112
|
+
d+" do\n"+e+"end\n"},controls_for$$module$build$src$generators$lua$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0",e=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0",f=b.valueToCode(a,"BY",Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";let g=b.statementToCode(a,"DO");g=b.addLoopTrap(g,a);g=addContinueLabel$$module$build$src$generators$lua$loops(g,
|
|
113
|
+
b.INDENT);a="";let h;$.isNumber$$module$build$src$core$utils$string(d)&&$.isNumber$$module$build$src$core$utils$string(e)&&$.isNumber$$module$build$src$core$utils$string(f)?h=(Number(d)<=Number(e)?"":"-")+Math.abs(Number(f)):(a="",h=b.nameDB_.getDistinctName(c+"_inc",$.NameType$$module$build$src$core$names.VARIABLE),a+=h+" = ",a=$.isNumber$$module$build$src$core$utils$string(f)?a+(Math.abs(f)+"\n"):a+("math.abs("+f+")\n"),a=a+("if ("+d+") > ("+e+") then\n")+(b.INDENT+h+" = -"+h+"\n"),a+="end\n");
|
|
114
|
+
return a+("for "+c+" = "+d+", "+e+", "+h)+(" do\n"+g+"end\n")},controls_forEach$$module$build$src$generators$lua$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}";let e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);e=addContinueLabel$$module$build$src$generators$lua$loops(e,b.INDENT);return"for _, "+c+" in ipairs("+d+") do \n"+e+"end\n"},controls_flow_statements$$module$build$src$generators$lua$loops=
|
|
115
|
+
function(a,b){let c="";b.STATEMENT_PREFIX&&(c+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(c+=b.injectId(b.STATEMENT_SUFFIX,a));if(b.STATEMENT_PREFIX){const d=a.getSurroundLoop();d&&!d.suppressPrefixSuffix&&(c+=b.injectId(b.STATEMENT_PREFIX,d))}switch(a.getFieldValue("FLOW")){case "BREAK":return c+"break\n";case "CONTINUE":return c+CONTINUE_STATEMENT$$module$build$src$generators$lua$loops}throw Error("Unknown flow statement.");},math_number$$module$build$src$generators$lua$math=function(a,
|
|
116
|
+
b){a=Number(a.getFieldValue("NUM"));return[String(a),a<0?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},math_arithmetic$$module$build$src$generators$lua$math=function(a,b){var c={ADD:[" + ",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE],MINUS:[" - ",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE],MULTIPLY:[" * ",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE],DIVIDE:[" / ",
|
|
117
|
+
Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE],POWER:[" ^ ",Order$$module$build$src$generators$lua$lua_generator.EXPONENTIATION]}[a.getFieldValue("OP")];const d=c[0];c=c[1];const e=b.valueToCode(a,"A",c)||"0";a=b.valueToCode(a,"B",c)||"0";return[e+d+a,c]},math_single$$module$build$src$generators$lua$math=function(a,b){var c=a.getFieldValue("OP");if(c==="NEG")return a=b.valueToCode(a,"NUM",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"0",["-"+a,Order$$module$build$src$generators$lua$lua_generator.UNARY];
|
|
118
|
+
if(c==="POW10")return a=b.valueToCode(a,"NUM",Order$$module$build$src$generators$lua$lua_generator.EXPONENTIATION)||"0",["10 ^ "+a,Order$$module$build$src$generators$lua$lua_generator.EXPONENTIATION];a=c==="ROUND"?b.valueToCode(a,"NUM",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE)||"0":b.valueToCode(a,"NUM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";switch(c){case "ABS":c="math.abs("+a+")";break;case "ROOT":c="math.sqrt("+a+")";break;case "LN":c="math.log("+a+
|
|
119
|
+
")";break;case "LOG10":c="math.log("+a+", 10)";break;case "EXP":c="math.exp("+a+")";break;case "ROUND":c="math.floor("+a+" + .5)";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin(math.rad("+a+"))";break;case "COS":c="math.cos(math.rad("+a+"))";break;case "TAN":c="math.tan(math.rad("+a+"))";break;case "ASIN":c="math.deg(math.asin("+a+"))";break;case "ACOS":c="math.deg(math.acos("+a+"))";break;case "ATAN":c="math.deg(math.atan("+a+"))";
|
|
120
|
+
break;default:throw Error("Unknown math operator: "+c);}return[c,Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_constant$$module$build$src$generators$lua$math=function(a,b){return{PI:["math.pi",Order$$module$build$src$generators$lua$lua_generator.HIGH],E:["math.exp(1)",Order$$module$build$src$generators$lua$lua_generator.HIGH],GOLDEN_RATIO:["(1 + math.sqrt(5)) / 2",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE],SQRT2:["math.sqrt(2)",Order$$module$build$src$generators$lua$lua_generator.HIGH],
|
|
121
|
+
SQRT1_2:["math.sqrt(1 / 2)",Order$$module$build$src$generators$lua$lua_generator.HIGH],INFINITY:["math.huge",Order$$module$build$src$generators$lua$lua_generator.HIGH]}[a.getFieldValue("CONSTANT")]},math_number_property$$module$build$src$generators$lua$math=function(a,b){var c={EVEN:[" % 2 == 0",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL],ODD:[" % 2 == 1",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE,
|
|
122
|
+
Order$$module$build$src$generators$lua$lua_generator.RELATIONAL],WHOLE:[" % 1 == 0",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL],POSITIVE:[" > 0",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL],NEGATIVE:[" < 0",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL],
|
|
123
|
+
DIVISIBLE_BY:[null,Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE,Order$$module$build$src$generators$lua$lua_generator.RELATIONAL],PRIME:[null,Order$$module$build$src$generators$lua$lua_generator.NONE,Order$$module$build$src$generators$lua$lua_generator.HIGH]};const d=a.getFieldValue("PROPERTY"),[e,f,g]=c[d];c=b.valueToCode(a,"NUMBER_TO_CHECK",f)||"0";if(d==="PRIME")a=b.provideFunction_("math_isPrime",`
|
|
124
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(n)
|
|
125
|
+
-- https://en.wikipedia.org/wiki/Primality_test#Naive_methods
|
|
126
|
+
if n == 2 or n == 3 then
|
|
127
|
+
return true
|
|
128
|
+
end
|
|
129
|
+
-- False if n is NaN, negative, is 1, or not whole.
|
|
130
|
+
-- And false if n is divisible by 2 or 3.
|
|
131
|
+
if not(n > 1) or n % 1 ~= 0 or n % 2 == 0 or n % 3 == 0 then
|
|
132
|
+
return false
|
|
133
|
+
end
|
|
134
|
+
-- Check all the numbers of form 6k +/- 1, up to sqrt(n).
|
|
135
|
+
for x = 6, math.sqrt(n) + 1.5, 6 do
|
|
136
|
+
if n % (x - 1) == 0 or n % (x + 1) == 0 then
|
|
137
|
+
return false
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
return true
|
|
141
|
+
end
|
|
142
|
+
`)+"("+c+")";else if(d==="DIVISIBLE_BY"){a=b.valueToCode(a,"DIVISOR",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE)||"0";if(a==="0")return["nil",Order$$module$build$src$generators$lua$lua_generator.ATOMIC];a=c+" % "+a+" == 0"}else a=c+e;return[a,g]},math_change$$module$build$src$generators$lua$math=function(a,b){const c=b.valueToCode(a,"DELTA",Order$$module$build$src$generators$lua$lua_generator.ADDITIVE)||"0";a=b.getVariableName(a.getFieldValue("VAR"));return a+" = "+a+" + "+
|
|
143
|
+
c+"\n"},math_on_list$$module$build$src$generators$lua$math=function(a,b){function c(){return b.provideFunction_("math_sum",`
|
|
144
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
145
|
+
local result = 0
|
|
146
|
+
for _, v in ipairs(t) do
|
|
147
|
+
result = result + v
|
|
148
|
+
end
|
|
149
|
+
return result
|
|
150
|
+
end
|
|
151
|
+
`)}var d=a.getFieldValue("OP");a=b.valueToCode(a,"LIST",Order$$module$build$src$generators$lua$lua_generator.NONE)||"{}";switch(d){case "SUM":d=c();break;case "MIN":d=b.provideFunction_("math_min",`
|
|
152
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
153
|
+
if #t == 0 then
|
|
154
|
+
return 0
|
|
155
|
+
end
|
|
156
|
+
local result = math.huge
|
|
157
|
+
for _, v in ipairs(t) do
|
|
158
|
+
if v < result then
|
|
159
|
+
result = v
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
return result
|
|
163
|
+
end
|
|
164
|
+
`);break;case "AVERAGE":d=b.provideFunction_("math_average",`
|
|
165
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
166
|
+
if #t == 0 then
|
|
167
|
+
return 0
|
|
168
|
+
end
|
|
169
|
+
return ${c()}(t) / #t
|
|
170
|
+
end
|
|
171
|
+
`);break;case "MAX":d=b.provideFunction_("math_max",`
|
|
172
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
173
|
+
if #t == 0 then
|
|
174
|
+
return 0
|
|
175
|
+
end
|
|
176
|
+
local result = -math.huge
|
|
177
|
+
for _, v in ipairs(t) do
|
|
178
|
+
if v > result then
|
|
179
|
+
result = v
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
return result
|
|
183
|
+
end
|
|
184
|
+
`);break;case "MEDIAN":d=b.provideFunction_("math_median",`
|
|
185
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
186
|
+
-- Source: http://lua-users.org/wiki/SimpleStats
|
|
187
|
+
if #t == 0 then
|
|
188
|
+
return 0
|
|
189
|
+
end
|
|
190
|
+
local temp = {}
|
|
191
|
+
for _, v in ipairs(t) do
|
|
192
|
+
if type(v) == 'number' then
|
|
193
|
+
table.insert(temp, v)
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
table.sort(temp)
|
|
197
|
+
if #temp % 2 == 0 then
|
|
198
|
+
return (temp[#temp / 2] + temp[(#temp / 2) + 1]) / 2
|
|
199
|
+
else
|
|
200
|
+
return temp[math.ceil(#temp / 2)]
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
`);break;case "MODE":d=b.provideFunction_("math_modes",`
|
|
204
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
205
|
+
-- Source: http://lua-users.org/wiki/SimpleStats
|
|
206
|
+
local counts = {}
|
|
207
|
+
for _, v in ipairs(t) do
|
|
208
|
+
if counts[v] == nil then
|
|
209
|
+
counts[v] = 1
|
|
210
|
+
else
|
|
211
|
+
counts[v] = counts[v] + 1
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
local biggestCount = 0
|
|
215
|
+
for _, v in pairs(counts) do
|
|
216
|
+
if v > biggestCount then
|
|
217
|
+
biggestCount = v
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
local temp = {}
|
|
221
|
+
for k, v in pairs(counts) do
|
|
222
|
+
if v == biggestCount then
|
|
223
|
+
table.insert(temp, k)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
return temp
|
|
227
|
+
end
|
|
228
|
+
`);break;case "STD_DEV":d=b.provideFunction_("math_standard_deviation",`
|
|
229
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
230
|
+
local m
|
|
231
|
+
local vm
|
|
232
|
+
local total = 0
|
|
233
|
+
local count = 0
|
|
234
|
+
local result
|
|
235
|
+
m = #t == 0 and 0 or ${c()}(t) / #t
|
|
236
|
+
for _, v in ipairs(t) do
|
|
237
|
+
if type(v) == 'number' then
|
|
238
|
+
vm = v - m
|
|
239
|
+
total = total + (vm * vm)
|
|
240
|
+
count = count + 1
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
result = math.sqrt(total / (count-1))
|
|
244
|
+
return result
|
|
245
|
+
end
|
|
246
|
+
`);break;case "RANDOM":d=b.provideFunction_("math_random_list",`
|
|
247
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(t)
|
|
248
|
+
if #t == 0 then
|
|
249
|
+
return nil
|
|
250
|
+
end
|
|
251
|
+
return t[math.random(#t)]
|
|
252
|
+
end
|
|
253
|
+
`);break;default:throw Error("Unknown operator: "+d);}return[d+"("+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_modulo$$module$build$src$generators$lua$math=function(a,b){const c=b.valueToCode(a,"DIVIDEND",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE)||"0";a=b.valueToCode(a,"DIVISOR",Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE)||"0";return[c+" % "+a,Order$$module$build$src$generators$lua$lua_generator.MULTIPLICATIVE]},math_constrain$$module$build$src$generators$lua$math=
|
|
254
|
+
function(a,b){const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0",d=b.valueToCode(a,"LOW",Order$$module$build$src$generators$lua$lua_generator.NONE)||"-math.huge";a=b.valueToCode(a,"HIGH",Order$$module$build$src$generators$lua$lua_generator.NONE)||"math.huge";return["math.min(math.max("+c+", "+d+"), "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_random_int$$module$build$src$generators$lua$math=function(a,b){const c=b.valueToCode(a,
|
|
255
|
+
"FROM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";return["math.random("+c+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_random_float$$module$build$src$generators$lua$math=function(a,b){return["math.random()",Order$$module$build$src$generators$lua$lua_generator.HIGH]},math_atan2$$module$build$src$generators$lua$math=function(a,b){const c=b.valueToCode(a,"X",Order$$module$build$src$generators$lua$lua_generator.NONE)||
|
|
256
|
+
"0";return["math.deg(math.atan2("+(b.valueToCode(a,"Y",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0")+", "+c+"))",Order$$module$build$src$generators$lua$lua_generator.HIGH]},procedures_defreturn$$module$build$src$generators$lua$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME"));var d="";b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(d+=b.injectId(b.STATEMENT_SUFFIX,a));d&&(d=b.prefixLines(d,b.INDENT));let e="";b.INFINITE_LOOP_TRAP&&
|
|
257
|
+
(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let f="";a.getInput("STACK")&&(f=b.statementToCode(a,"STACK"));let g="";a.getInput("RETURN")&&(g=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$lua$lua_generator.NONE)||"");let h="";f&&g&&(h=d);g?g=b.INDENT+"return "+g+"\n":f||(f="");const k=[],l=a.getVars();for(let m=0;m<l.length;m++)k[m]=b.getVariableName(l[m]);d="function "+c+"("+k.join(", ")+")\n"+d+e+f+h+g+"end\n";d=b.scrub_(a,d);b.definitions_["%"+c]=d;return null},
|
|
258
|
+
procedures_callreturn$$module$build$src$generators$lua$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME")),d=[],e=a.getVars();for(let f=0;f<e.length;f++)d[f]=b.valueToCode(a,"ARG"+f,Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},procedures_callnoreturn$$module$build$src$generators$lua$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,b)[0]+"\n"},procedures_ifreturn$$module$build$src$generators$lua$procedures=
|
|
259
|
+
function(a,b){let c="if "+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$lua$lua_generator.NONE)||"false")+" then\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"nil",c+=b.INDENT+"return "+a+"\n"):c+=b.INDENT+"return\n";return c+"end\n"},text$$module$build$src$generators$lua$text=function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},
|
|
260
|
+
text_join$$module$build$src$generators$lua$text=function(a,b){if(a.itemCount_===0)return["''",Order$$module$build$src$generators$lua$lua_generator.ATOMIC];if(a.itemCount_===1)return["tostring("+(b.valueToCode(a,"ADD0",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH];if(a.itemCount_===2){var c=b.valueToCode(a,"ADD0",Order$$module$build$src$generators$lua$lua_generator.CONCATENATION)||"''";a=b.valueToCode(a,"ADD1",Order$$module$build$src$generators$lua$lua_generator.CONCATENATION)||
|
|
261
|
+
"''";return[c+" .. "+a,Order$$module$build$src$generators$lua$lua_generator.CONCATENATION]}c=[];for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";return["table.concat({"+c.join(", ")+"})",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_append$$module$build$src$generators$lua$text=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.CONCATENATION)||
|
|
262
|
+
"''";return c+" = "+c+" .. "+a+"\n"},text_length$$module$build$src$generators$lua$text=function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"''"),Order$$module$build$src$generators$lua$lua_generator.UNARY]},text_isEmpty$$module$build$src$generators$lua$text=function(a,b){return["#"+(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.UNARY)||"''")+" == 0",Order$$module$build$src$generators$lua$lua_generator.RELATIONAL]},
|
|
263
|
+
text_indexOf$$module$build$src$generators$lua$text=function(a,b){const c=b.valueToCode(a,"FIND",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''",d=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";return[(a.getFieldValue("END")==="FIRST"?b.provideFunction_("firstIndexOf",`
|
|
264
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str, substr)
|
|
265
|
+
local i = string.find(str, substr, 1, true)
|
|
266
|
+
if i == nil then
|
|
267
|
+
return 0
|
|
268
|
+
end
|
|
269
|
+
return i
|
|
270
|
+
end
|
|
271
|
+
`):b.provideFunction_("lastIndexOf",`
|
|
272
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str, substr)
|
|
273
|
+
local i = string.find(string.reverse(str), string.reverse(substr), 1, true)
|
|
274
|
+
if i then
|
|
275
|
+
return #str + 2 - i - #substr
|
|
276
|
+
end
|
|
277
|
+
return 0
|
|
278
|
+
end
|
|
279
|
+
`))+"("+d+", "+c+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_charAt$$module$build$src$generators$lua$text=function(a,b){var c=a.getFieldValue("WHERE")||"FROM_START";const d=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";if(c==="RANDOM")b=b.provideFunction_("text_random_letter",`
|
|
280
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str)
|
|
281
|
+
local index = math.random(string.len(str))
|
|
282
|
+
return string.sub(str, index, index)
|
|
283
|
+
end
|
|
284
|
+
`)+"("+d+")";else{if(c==="FIRST")c="1";else if(c==="LAST")c="-1";else if(a=b.valueToCode(a,"AT",c==="FROM_END"?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1",c==="FROM_START")c=a;else if(c==="FROM_END")c="-"+a;else throw Error("Unhandled option (text_charAt).");b=c.match(/^-?\w*$/)?"string.sub("+d+", "+c+", "+c+")":b.provideFunction_("text_char_at",`
|
|
285
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str, index)
|
|
286
|
+
return string.sub(str, index, index)
|
|
287
|
+
end
|
|
288
|
+
`)+"("+d+", "+c+")"}return[b,Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_getSubstring$$module$build$src$generators$lua$text=function(a,b){const c=b.valueToCode(a,"STRING",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";var d=a.getFieldValue("WHERE1"),e=b.valueToCode(a,"AT1",d==="FROM_END"?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";if(d==="FIRST")d=1;else if(d==="FROM_START")d=e;else if(d===
|
|
289
|
+
"FROM_END")d="-"+e;else throw Error("Unhandled option (text_getSubstring)");e=a.getFieldValue("WHERE2");a=b.valueToCode(a,"AT2",e==="FROM_END"?Order$$module$build$src$generators$lua$lua_generator.UNARY:Order$$module$build$src$generators$lua$lua_generator.NONE)||"1";if(e==="LAST")a=-1;else if(e!=="FROM_START")if(e==="FROM_END")a="-"+a;else throw Error("Unhandled option (text_getSubstring)");return["string.sub("+c+", "+d+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_changeCase$$module$build$src$generators$lua$text=
|
|
290
|
+
function(a,b){const c=a.getFieldValue("CASE");a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";let d;c==="UPPERCASE"?d="string.upper":c==="LOWERCASE"?d="string.lower":c==="TITLECASE"&&(d=b.provideFunction_("text_titlecase",`
|
|
291
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(str)
|
|
292
|
+
local buf = {}
|
|
293
|
+
local inWord = false
|
|
294
|
+
for i = 1, #str do
|
|
295
|
+
local c = string.sub(str, i, i)
|
|
296
|
+
if inWord then
|
|
297
|
+
table.insert(buf, string.lower(c))
|
|
298
|
+
if string.find(c, "%s") then
|
|
299
|
+
inWord = false
|
|
300
|
+
end
|
|
301
|
+
else
|
|
302
|
+
table.insert(buf, string.upper(c))
|
|
303
|
+
inWord = true
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
return table.concat(buf)
|
|
307
|
+
end
|
|
308
|
+
`));return[d+"("+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_trim$$module$build$src$generators$lua$text=function(a,b){const c={LEFT:"^%s*(,-)",RIGHT:"(.-)%s*$",BOTH:"^%s*(.-)%s*$"}[a.getFieldValue("MODE")];return["string.gsub("+(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''")+', "'+c+'", "%1")',Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_print$$module$build$src$generators$lua$text=function(a,b){return"print("+
|
|
309
|
+
(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''")+")\n"},text_prompt_ext$$module$build$src$generators$lua$text=function(a,b){let c;c=a.getField("TEXT")?b.quote_(a.getFieldValue("TEXT")):b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";b=b.provideFunction_("text_prompt",`
|
|
310
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(msg)
|
|
311
|
+
io.write(msg)
|
|
312
|
+
io.flush()
|
|
313
|
+
return io.read()
|
|
314
|
+
end
|
|
315
|
+
`)+"("+c+")";a.getFieldValue("TYPE")==="NUMBER"&&(b="tonumber("+b+", 10)");return[b,Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_count$$module$build$src$generators$lua$text=function(a,b){const c=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";a=b.valueToCode(a,"SUB",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";return[b.provideFunction_("text_count",`
|
|
316
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle)
|
|
317
|
+
if #needle == 0 then
|
|
318
|
+
return #haystack + 1
|
|
319
|
+
end
|
|
320
|
+
local i = 1
|
|
321
|
+
local count = 0
|
|
322
|
+
while true do
|
|
323
|
+
i = string.find(haystack, needle, i, true)
|
|
324
|
+
if i == nil then
|
|
325
|
+
break
|
|
326
|
+
end
|
|
327
|
+
count = count + 1
|
|
328
|
+
i = i + #needle
|
|
329
|
+
end
|
|
330
|
+
return count
|
|
331
|
+
end
|
|
332
|
+
`)+"("+c+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_replace$$module$build$src$generators$lua$text=function(a,b){const c=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''",d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''";return[b.provideFunction_("text_replace",`
|
|
333
|
+
function ${b.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement)
|
|
334
|
+
local buf = {}
|
|
335
|
+
local i = 1
|
|
336
|
+
while i <= #haystack do
|
|
337
|
+
if string.sub(haystack, i, i + #needle - 1) == needle then
|
|
338
|
+
for j = 1, #replacement do
|
|
339
|
+
table.insert(buf, string.sub(replacement, j, j))
|
|
340
|
+
end
|
|
341
|
+
i = i + #needle
|
|
342
|
+
else
|
|
343
|
+
table.insert(buf, string.sub(haystack, i, i))
|
|
344
|
+
i = i + 1
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
return table.concat(buf)
|
|
348
|
+
end
|
|
349
|
+
`)+"("+c+", "+d+", "+a+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},text_reverse$$module$build$src$generators$lua$text=function(a,b){return["string.reverse("+(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$lua$lua_generator.NONE)||"''")+")",Order$$module$build$src$generators$lua$lua_generator.HIGH]},variables_get$$module$build$src$generators$lua$variables=function(a,b){return[b.getVariableName(a.getFieldValue("VAR")),Order$$module$build$src$generators$lua$lua_generator.ATOMIC]},
|
|
350
|
+
variables_set$$module$build$src$generators$lua$variables=function(a,b){const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$lua$lua_generator.NONE)||"0";return b.getVariableName(a.getFieldValue("VAR"))+" = "+c+"\n"},Order$$module$build$src$generators$lua$lua_generator;
|
|
351
|
+
(function(a){a[a.ATOMIC=0]="ATOMIC";a[a.HIGH=1]="HIGH";a[a.EXPONENTIATION=2]="EXPONENTIATION";a[a.UNARY=3]="UNARY";a[a.MULTIPLICATIVE=4]="MULTIPLICATIVE";a[a.ADDITIVE=5]="ADDITIVE";a[a.CONCATENATION=6]="CONCATENATION";a[a.RELATIONAL=7]="RELATIONAL";a[a.AND=8]="AND";a[a.OR=9]="OR";a[a.NONE=99]="NONE"})(Order$$module$build$src$generators$lua$lua_generator||(Order$$module$build$src$generators$lua$lua_generator={}));
|
|
352
|
+
var LuaGenerator$$module$build$src$generators$lua$lua_generator=class extends $.CodeGenerator$$module$build$src$core$generator{constructor(a="Lua"){super(a);this.isInitialized=!1;for(const b in Order$$module$build$src$generators$lua$lua_generator)a=Order$$module$build$src$generators$lua$lua_generator[b],typeof a!=="string"&&(this["ORDER_"+b]=a);this.addReservedWords("_,__inext,assert,bit,colors,colours,coroutine,disk,dofile,error,fs,fetfenv,getmetatable,gps,help,io,ipairs,keys,loadfile,loadstring,math,native,next,os,paintutils,pairs,parallel,pcall,peripheral,print,printError,rawequal,rawget,rawset,read,rednet,redstone,rs,select,setfenv,setmetatable,sleep,string,table,term,textutils,tonumber,tostring,turtle,type,unpack,vector,write,xpcall,_VERSION,__indext,HTTP,and,break,do,else,elseif,end,false,for,function,if,in,local,nil,not,or,repeat,return,then,true,until,while,add,sub,mul,div,mod,pow,unm,concat,len,eq,lt,le,index,newindex,call,assert,collectgarbage,dofile,error,_G,getmetatable,inpairs,load,loadfile,next,pairs,pcall,print,rawequal,rawget,rawlen,rawset,select,setmetatable,tonumber,tostring,type,_VERSION,xpcall,require,package,string,table,math,bit32,io,file,os,debug")}init(a){super.init(a);
|
|
353
|
+
this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.Names$$module$build$src$core$names(this.RESERVED_WORDS_);this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);this.isInitialized=!0}finish(a){const b=Object.values(this.definitions_);a=super.finish(a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a}scrubNakedValue(a){return"local _ = "+a+"\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,
|
|
354
|
+
"\\'");return"'"+a+"'"}multiline_quote_(a){return a.split(/\n/g).map(this.quote_).join(" .. '\\n' ..\n")}scrub_(a,b,c=!1){let d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.wrap$$module$build$src$core$utils$string(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e,"-- ")+"\n");for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===$.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&
|
|
355
|
+
(d+=this.prefixLines(e,"-- "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}},module$build$src$generators$lua$lua_generator={};module$build$src$generators$lua$lua_generator.LuaGenerator=LuaGenerator$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua$lua_generator.Order=Order$$module$build$src$generators$lua$lua_generator;var getListIndex$$module$build$src$generators$lua$lists=function(a,b,c){return b==="FIRST"?"1":b==="FROM_END"?"#"+a+" + 1 - "+c:b==="LAST"?"#"+a:b==="RANDOM"?"math.random(#"+a+")":c},module$build$src$generators$lua$lists={};module$build$src$generators$lua$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_create_with=lists_create_with$$module$build$src$generators$lua$lists;
|
|
356
|
+
module$build$src$generators$lua$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_indexOf=lists_indexOf$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_isEmpty=lists_isEmpty$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_length=lists_length$$module$build$src$generators$lua$lists;
|
|
357
|
+
module$build$src$generators$lua$lists.lists_repeat=lists_repeat$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_reverse=lists_reverse$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_setIndex=lists_setIndex$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_sort=lists_sort$$module$build$src$generators$lua$lists;module$build$src$generators$lua$lists.lists_split=lists_split$$module$build$src$generators$lua$lists;var controls_ifelse$$module$build$src$generators$lua$logic=controls_if$$module$build$src$generators$lua$logic,module$build$src$generators$lua$logic={};module$build$src$generators$lua$logic.controls_if=controls_if$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.controls_ifelse=controls_if$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_boolean=logic_boolean$$module$build$src$generators$lua$logic;
|
|
358
|
+
module$build$src$generators$lua$logic.logic_compare=logic_compare$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_negate=logic_negate$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_null=logic_null$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_operation=logic_operation$$module$build$src$generators$lua$logic;module$build$src$generators$lua$logic.logic_ternary=logic_ternary$$module$build$src$generators$lua$logic;var CONTINUE_STATEMENT$$module$build$src$generators$lua$loops="goto continue\n",controls_repeat$$module$build$src$generators$lua$loops=controls_repeat_ext$$module$build$src$generators$lua$loops,module$build$src$generators$lua$loops={};module$build$src$generators$lua$loops.controls_flow_statements=controls_flow_statements$$module$build$src$generators$lua$loops;module$build$src$generators$lua$loops.controls_for=controls_for$$module$build$src$generators$lua$loops;
|
|
359
|
+
module$build$src$generators$lua$loops.controls_forEach=controls_forEach$$module$build$src$generators$lua$loops;module$build$src$generators$lua$loops.controls_repeat=controls_repeat_ext$$module$build$src$generators$lua$loops;module$build$src$generators$lua$loops.controls_repeat_ext=controls_repeat_ext$$module$build$src$generators$lua$loops;module$build$src$generators$lua$loops.controls_whileUntil=controls_whileUntil$$module$build$src$generators$lua$loops;var math_round$$module$build$src$generators$lua$math=math_single$$module$build$src$generators$lua$math,math_trig$$module$build$src$generators$lua$math=math_single$$module$build$src$generators$lua$math,module$build$src$generators$lua$math={};module$build$src$generators$lua$math.math_arithmetic=math_arithmetic$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_atan2=math_atan2$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_change=math_change$$module$build$src$generators$lua$math;
|
|
360
|
+
module$build$src$generators$lua$math.math_constant=math_constant$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_constrain=math_constrain$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_modulo=math_modulo$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_number=math_number$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_number_property=math_number_property$$module$build$src$generators$lua$math;
|
|
361
|
+
module$build$src$generators$lua$math.math_on_list=math_on_list$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_random_float=math_random_float$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_random_int=math_random_int$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_round=math_single$$module$build$src$generators$lua$math;module$build$src$generators$lua$math.math_single=math_single$$module$build$src$generators$lua$math;
|
|
362
|
+
module$build$src$generators$lua$math.math_trig=math_single$$module$build$src$generators$lua$math;var procedures_defnoreturn$$module$build$src$generators$lua$procedures=procedures_defreturn$$module$build$src$generators$lua$procedures,module$build$src$generators$lua$procedures={};module$build$src$generators$lua$procedures.procedures_callnoreturn=procedures_callnoreturn$$module$build$src$generators$lua$procedures;module$build$src$generators$lua$procedures.procedures_callreturn=procedures_callreturn$$module$build$src$generators$lua$procedures;
|
|
363
|
+
module$build$src$generators$lua$procedures.procedures_defnoreturn=procedures_defreturn$$module$build$src$generators$lua$procedures;module$build$src$generators$lua$procedures.procedures_defreturn=procedures_defreturn$$module$build$src$generators$lua$procedures;module$build$src$generators$lua$procedures.procedures_ifreturn=procedures_ifreturn$$module$build$src$generators$lua$procedures;var text_prompt$$module$build$src$generators$lua$text=text_prompt_ext$$module$build$src$generators$lua$text,module$build$src$generators$lua$text={};module$build$src$generators$lua$text.text=text$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_append=text_append$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_changeCase=text_changeCase$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_charAt=text_charAt$$module$build$src$generators$lua$text;
|
|
364
|
+
module$build$src$generators$lua$text.text_count=text_count$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_getSubstring=text_getSubstring$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_indexOf=text_indexOf$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_isEmpty=text_isEmpty$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_join=text_join$$module$build$src$generators$lua$text;
|
|
365
|
+
module$build$src$generators$lua$text.text_length=text_length$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_print=text_print$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_prompt=text_prompt_ext$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_prompt_ext=text_prompt_ext$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_replace=text_replace$$module$build$src$generators$lua$text;
|
|
366
|
+
module$build$src$generators$lua$text.text_reverse=text_reverse$$module$build$src$generators$lua$text;module$build$src$generators$lua$text.text_trim=text_trim$$module$build$src$generators$lua$text;var module$build$src$generators$lua$variables={};module$build$src$generators$lua$variables.variables_get=variables_get$$module$build$src$generators$lua$variables;module$build$src$generators$lua$variables.variables_set=variables_set$$module$build$src$generators$lua$variables;var module$build$src$generators$lua$variables_dynamic={};module$build$src$generators$lua$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$lua$variables;module$build$src$generators$lua$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$lua$variables;var luaGenerator$$module$build$src$generators$lua=new LuaGenerator$$module$build$src$generators$lua$lua_generator,generators$$module$build$src$generators$lua=Object.assign({},module$build$src$generators$lua$lists,module$build$src$generators$lua$logic,module$build$src$generators$lua$loops,module$build$src$generators$lua$math,module$build$src$generators$lua$procedures,module$build$src$generators$lua$text,module$build$src$generators$lua$variables,module$build$src$generators$lua$variables_dynamic);
|
|
367
|
+
for(const a in generators$$module$build$src$generators$lua)luaGenerator$$module$build$src$generators$lua.forBlock[a]=generators$$module$build$src$generators$lua[a];var module$build$src$generators$lua={};module$build$src$generators$lua.LuaGenerator=LuaGenerator$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua.Order=Order$$module$build$src$generators$lua$lua_generator;module$build$src$generators$lua.luaGenerator=luaGenerator$$module$build$src$generators$lua;
|
|
368
|
+
module$build$src$generators$lua.__namespace__=$;
|
|
369
|
+
return module$build$src$generators$lua;
|
|
370
|
+
}));
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
//# sourceMappingURL=lua_compressed.js.map
|