blockly 11.0.0-beta.5 → 11.0.0-beta.7

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.
Files changed (139) hide show
  1. package/blockly.min.js +722 -763
  2. package/blockly_compressed.js +676 -680
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +27 -29
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/block.d.ts +12 -6
  7. package/core/block_svg.d.ts +28 -42
  8. package/core/blockly.d.ts +11 -51
  9. package/core/bubbles/bubble.d.ts +17 -2
  10. package/core/bubbles/mini_workspace_bubble.d.ts +1 -1
  11. package/core/bubbles/text_bubble.d.ts +1 -1
  12. package/core/bubbles/textinput_bubble.d.ts +1 -1
  13. package/core/clipboard.d.ts +0 -19
  14. package/core/comments/comment_view.d.ts +207 -0
  15. package/core/comments/rendered_workspace_comment.d.ts +75 -0
  16. package/core/comments/workspace_comment.d.ts +107 -0
  17. package/core/comments.d.ts +9 -0
  18. package/core/connection.d.ts +1 -1
  19. package/core/delete_area.d.ts +1 -2
  20. package/core/dragging/block_drag_strategy.d.ts +105 -0
  21. package/core/dragging/bubble_drag_strategy.d.ts +20 -0
  22. package/core/dragging/comment_drag_strategy.d.ts +20 -0
  23. package/core/dragging/dragger.d.ts +47 -0
  24. package/core/events/events.d.ts +3 -0
  25. package/core/events/events_click.d.ts +1 -1
  26. package/core/events/events_comment_base.d.ts +6 -1
  27. package/core/events/events_comment_change.d.ts +1 -1
  28. package/core/events/events_comment_collapse.d.ts +39 -0
  29. package/core/events/events_comment_create.d.ts +5 -1
  30. package/core/events/events_comment_delete.d.ts +5 -1
  31. package/core/events/events_comment_move.d.ts +17 -1
  32. package/core/events/utils.d.ts +2 -0
  33. package/core/field_dropdown.d.ts +1 -0
  34. package/core/field_image.d.ts +1 -1
  35. package/core/flyout_base.d.ts +17 -1
  36. package/core/flyout_button.d.ts +26 -1
  37. package/core/generator.d.ts +1 -1
  38. package/core/gesture.d.ts +25 -54
  39. package/core/grid.d.ts +9 -9
  40. package/core/icons/comment_icon.d.ts +8 -3
  41. package/core/icons/icon.d.ts +0 -6
  42. package/core/icons/icon_types.d.ts +2 -2
  43. package/core/icons/mutator_icon.d.ts +1 -16
  44. package/core/icons/warning_icon.d.ts +1 -1
  45. package/core/inputs/input.d.ts +10 -19
  46. package/core/{connection_previewers/insertion_marker_previewer.d.ts → insertion_marker_previewer.d.ts} +3 -3
  47. package/core/interfaces/i_comment_icon.d.ts +21 -0
  48. package/core/interfaces/i_deletable.d.ts +6 -0
  49. package/core/interfaces/i_delete_area.d.ts +1 -2
  50. package/core/interfaces/i_draggable.d.ts +47 -3
  51. package/core/interfaces/i_dragger.d.ts +32 -0
  52. package/core/interfaces/i_has_bubble.d.ts +1 -1
  53. package/core/interfaces/i_parameter_model.d.ts +7 -0
  54. package/core/interfaces/i_procedure_model.d.ts +7 -0
  55. package/core/interfaces/i_selectable.d.ts +5 -3
  56. package/core/internal_constants.d.ts +0 -7
  57. package/core/keyboard_nav/ast_node.d.ts +21 -2
  58. package/core/options.d.ts +1 -0
  59. package/core/registry.d.ts +2 -2
  60. package/core/renderers/common/drawer.d.ts +0 -7
  61. package/core/renderers/common/marker_svg.d.ts +7 -0
  62. package/core/renderers/measurables/icon.d.ts +0 -5
  63. package/core/serialization/priorities.d.ts +2 -0
  64. package/core/serialization/procedures.d.ts +28 -26
  65. package/core/serialization/workspace_comments.d.ts +45 -0
  66. package/core/serialization.d.ts +2 -1
  67. package/core/toolbox/toolbox.d.ts +1 -2
  68. package/core/utils/dom.d.ts +0 -9
  69. package/core/utils/keycodes.d.ts +32 -32
  70. package/core/utils/size.d.ts +10 -0
  71. package/core/utils/string.d.ts +0 -10
  72. package/core/workspace_comment_svg.d.ts +1 -2
  73. package/core/workspace_svg.d.ts +0 -27
  74. package/core/xml.d.ts +9 -3
  75. package/core-node.js +31 -0
  76. package/dart.d.ts +1 -24
  77. package/dart_compressed.js +22 -72
  78. package/dart_compressed.js.map +1 -1
  79. package/generators/dart/dart_generator.d.ts +17 -17
  80. package/generators/dart/text.d.ts +0 -1
  81. package/generators/javascript/javascript_generator.d.ts +34 -35
  82. package/generators/javascript/text.d.ts +0 -1
  83. package/generators/lua/lua_generator.d.ts +10 -10
  84. package/generators/lua/text.d.ts +0 -1
  85. package/generators/php/php_generator.d.ts +36 -36
  86. package/generators/php/text.d.ts +0 -1
  87. package/generators/python/python_generator.d.ts +20 -21
  88. package/generators/python/text.d.ts +0 -1
  89. package/index.js +19 -7
  90. package/javascript.d.ts +1 -41
  91. package/javascript_compressed.js +19 -54
  92. package/javascript_compressed.js.map +1 -1
  93. package/lua.d.ts +1 -18
  94. package/lua_compressed.js +24 -47
  95. package/lua_compressed.js.map +1 -1
  96. package/media/delete-icon.svg +1 -0
  97. package/media/foldout-icon.svg +1 -0
  98. package/media/resize-handle.svg +3 -0
  99. package/msg/ce.d.ts +8 -0
  100. package/msg/dtp.d.ts +8 -0
  101. package/msg/hsb.d.ts +8 -0
  102. package/msg/tdd.d.ts +8 -0
  103. package/package.json +46 -12
  104. package/php.d.ts +1 -43
  105. package/php_compressed.js +13 -46
  106. package/php_compressed.js.map +1 -1
  107. package/python.d.ts +1 -27
  108. package/python_compressed.js +21 -40
  109. package/python_compressed.js.map +1 -1
  110. package/blockly.js +0 -22
  111. package/blocks.js +0 -22
  112. package/browser.js +0 -30
  113. package/core/block_dragger.d.ts +0 -212
  114. package/core/bubble_dragger.d.ts +0 -77
  115. package/core/field_angle.d.ts +0 -208
  116. package/core/field_colour.d.ts +0 -243
  117. package/core/field_multilineinput.d.ts +0 -182
  118. package/core/interfaces/i_block_dragger.d.ts +0 -47
  119. package/core/renderers/minimalist/constants.d.ts +0 -21
  120. package/core/renderers/minimalist/drawer.d.ts +0 -26
  121. package/core/renderers/minimalist/info.d.ts +0 -35
  122. package/core/renderers/minimalist/minimalist.d.ts +0 -12
  123. package/core/renderers/minimalist/renderer.d.ts +0 -48
  124. package/core-browser.js +0 -26
  125. package/core.js +0 -26
  126. package/dart.js +0 -22
  127. package/generators/dart/colour.d.ts +0 -16
  128. package/generators/javascript/colour.d.ts +0 -16
  129. package/generators/lua/colour.d.ts +0 -16
  130. package/generators/php/colour.d.ts +0 -16
  131. package/generators/python/colour.d.ts +0 -16
  132. package/javascript.js +0 -23
  133. package/lua.js +0 -22
  134. package/msg/constants.d.ts +0 -14
  135. package/msg/qqq.d.ts +0 -14
  136. package/msg/synonyms.d.ts +0 -14
  137. package/node.js +0 -21
  138. package/php.js +0 -22
  139. package/python.js +0 -23
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#041E49"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#041E49"><path d="M480-360 280-560h400L480-360Z"/></svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="8" viewBox="0 0 8 8" width="8" fill="#041E49" stroke="#000">
2
+ <g><line x1="2.6666666666666665" y1="7" x2="7" y2="2.6666666666666665"></line><line x1="5.333333333333333" y1="7" x2="7" y2="5.333333333333333"></line></g>
3
+ </svg>
package/msg/ce.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export * from './msg';
8
+
package/msg/dtp.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export * from './msg';
8
+
package/msg/hsb.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export * from './msg';
8
+
package/msg/tdd.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export * from './msg';
8
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly",
3
- "version": "11.0.0-beta.5",
3
+ "version": "11.0.0-beta.7",
4
4
  "description": "Blockly is a library for building visual programming editors.",
5
5
  "keywords": [
6
6
  "blockly"
@@ -16,14 +16,45 @@
16
16
  "author": {
17
17
  "name": "Neil Fraser"
18
18
  },
19
- "main": "./index.js",
20
- "umd": "./blockly.min.js",
21
- "unpkg": "./blockly.min.js",
22
- "types": "./index.d.ts",
23
- "browser": {
24
- "./node.js": "./browser.js",
25
- "./core.js": "./core-browser.js",
26
- "./blockly-node.js": "./blockly.js"
19
+ "exports": {
20
+ ".": {
21
+ "types": "./index.d.ts",
22
+ "umd": "./blockly.min.js",
23
+ "default": "./index.js"
24
+ },
25
+ "./core": {
26
+ "types": "./core.d.ts",
27
+ "node": "./core-node.js",
28
+ "default": "./blockly_compressed.js"
29
+ },
30
+ "./blocks": {
31
+ "types": "./blocks.d.ts",
32
+ "default": "./blocks_compressed.js"
33
+ },
34
+ "./dart": {
35
+ "types": "./dart.d.ts",
36
+ "default": "./dart_compressed.js"
37
+ },
38
+ "./lua": {
39
+ "types": "./lua.d.ts",
40
+ "default": "./lua_compressed.js"
41
+ },
42
+ "./javascript": {
43
+ "types": "./javascript.d.ts",
44
+ "default": "./javascript_compressed.js"
45
+ },
46
+ "./php": {
47
+ "types": "./php.d.ts",
48
+ "default": "./php_compressed.js"
49
+ },
50
+ "./python": {
51
+ "types": "./python.d.ts",
52
+ "default": "./python_compressed.js"
53
+ },
54
+ "./msg/*": {
55
+ "types": "./msg/*.d.ts",
56
+ "default": "./msg/*.js"
57
+ }
27
58
  },
28
59
  "license": "Apache-2.0",
29
60
  "devDependencies": {
@@ -33,7 +64,7 @@
33
64
  "@hyperjump/json-schema": "^1.5.0",
34
65
  "@microsoft/api-documenter": "^7.22.4",
35
66
  "@microsoft/api-extractor": "^7.29.5",
36
- "@typescript-eslint/eslint-plugin": "^6.1.0",
67
+ "@typescript-eslint/eslint-plugin": "^7.3.1",
37
68
  "async-done": "^2.0.0",
38
69
  "chai": "^4.2.0",
39
70
  "concurrently": "^8.0.1",
@@ -62,11 +93,14 @@
62
93
  "prettier": "3.2.5",
63
94
  "readline-sync": "^1.4.10",
64
95
  "rimraf": "^5.0.0",
65
- "typescript": "^5.0.2",
96
+ "typescript": "^5.3.3",
66
97
  "webdriverio": "^8.32.2",
67
98
  "yargs": "^17.2.1"
68
99
  },
69
100
  "dependencies": {
70
- "jsdom": "22.1.0"
101
+ "jsdom": "23.0.0"
102
+ },
103
+ "engines": {
104
+ "node": ">=18"
71
105
  }
72
106
  }
package/php.d.ts CHANGED
@@ -4,46 +4,4 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- export enum Order {
8
- ATOMIC = 0, // 0 "" ...
9
- CLONE = 1, // clone
10
- NEW = 1, // new
11
- MEMBER = 2.1, // []
12
- FUNCTION_CALL = 2.2, // ()
13
- POWER = 3, // **
14
- INCREMENT = 4, // ++
15
- DECREMENT = 4, // --
16
- BITWISE_NOT = 4, // ~
17
- CAST = 4, // (int) (float) (string) (array) ...
18
- SUPPRESS_ERROR = 4, // @
19
- INSTANCEOF = 5, // instanceof
20
- LOGICAL_NOT = 6, // !
21
- UNARY_PLUS = 7.1, // +
22
- UNARY_NEGATION = 7.2, // -
23
- MULTIPLICATION = 8.1, // *
24
- DIVISION = 8.2, // /
25
- MODULUS = 8.3, // %
26
- ADDITION = 9.1, // +
27
- SUBTRACTION = 9.2, // -
28
- STRING_CONCAT = 9.3, // .
29
- BITWISE_SHIFT = 10, // << >>
30
- RELATIONAL = 11, // < <= > >=
31
- EQUALITY = 12, // == != === !== <> <=>
32
- REFERENCE = 13, // &
33
- BITWISE_AND = 13, // &
34
- BITWISE_XOR = 14, // ^
35
- BITWISE_OR = 15, // |
36
- LOGICAL_AND = 16, // &&
37
- LOGICAL_OR = 17, // ||
38
- IF_NULL = 18, // ??
39
- CONDITIONAL = 19, // ?:
40
- ASSIGNMENT = 20, // = += -= *= /= %= <<= >>= ...
41
- LOGICAL_AND_WEAK = 21, // and
42
- LOGICAL_XOR = 22, // xor
43
- LOGICAL_OR_WEAK = 23, // or
44
- NONE = 99, // (...)
45
- }
46
-
47
- export declare const phpGenerator: any;
48
-
49
- export {PhpGenerator} from './generators/php';
7
+ export * from './generators/php';
package/php_compressed.js CHANGED
@@ -12,41 +12,8 @@
12
12
  }
13
13
  }(this, function(__parent__) {
14
14
  var $=__parent__.__namespace__;
15
- var colour_picker$$module$build$src$generators$php$colour=function(a,b){return[b.quote_(a.getFieldValue("COLOUR")),Order$$module$build$src$generators$php$php_generator.ATOMIC]},colour_random$$module$build$src$generators$php$colour=function(a,b){return[b.provideFunction_("colour_random",`
16
- function ${b.FUNCTION_NAME_PLACEHOLDER_}() {
17
- return '#' . str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT);
18
- }
19
- `)+"()",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},colour_rgb$$module$build$src$generators$php$colour=function(a,b){const c=b.valueToCode(a,"RED",Order$$module$build$src$generators$php$php_generator.NONE)||0,d=b.valueToCode(a,"GREEN",Order$$module$build$src$generators$php$php_generator.NONE)||0;a=b.valueToCode(a,"BLUE",Order$$module$build$src$generators$php$php_generator.NONE)||0;return[b.provideFunction_("colour_rgb",`
20
- function ${b.FUNCTION_NAME_PLACEHOLDER_}($r, $g, $b) {
21
- $r = round(max(min($r, 100), 0) * 2.55);
22
- $g = round(max(min($g, 100), 0) * 2.55);
23
- $b = round(max(min($b, 100), 0) * 2.55);
24
- $hex = '#';
25
- $hex .= str_pad(dechex($r), 2, '0', STR_PAD_LEFT);
26
- $hex .= str_pad(dechex($g), 2, '0', STR_PAD_LEFT);
27
- $hex .= str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
28
- return $hex;
29
- }
30
- `)+"("+c+", "+d+", "+a+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},colour_blend$$module$build$src$generators$php$colour=function(a,b){const c=b.valueToCode(a,"COLOUR1",Order$$module$build$src$generators$php$php_generator.NONE)||"'#000000'",d=b.valueToCode(a,"COLOUR2",Order$$module$build$src$generators$php$php_generator.NONE)||"'#000000'";a=b.valueToCode(a,"RATIO",Order$$module$build$src$generators$php$php_generator.NONE)||.5;return[b.provideFunction_("colour_blend",`
31
- function ${b.FUNCTION_NAME_PLACEHOLDER_}($c1, $c2, $ratio) {
32
- $ratio = max(min($ratio, 1), 0);
33
- $r1 = hexdec(substr($c1, 1, 2));
34
- $g1 = hexdec(substr($c1, 3, 2));
35
- $b1 = hexdec(substr($c1, 5, 2));
36
- $r2 = hexdec(substr($c2, 1, 2));
37
- $g2 = hexdec(substr($c2, 3, 2));
38
- $b2 = hexdec(substr($c2, 5, 2));
39
- $r = round($r1 * (1 - $ratio) + $r2 * $ratio);
40
- $g = round($g1 * (1 - $ratio) + $g2 * $ratio);
41
- $b = round($b1 * (1 - $ratio) + $b2 * $ratio);
42
- $hex = '#';
43
- $hex .= str_pad(dechex($r), 2, '0', STR_PAD_LEFT);
44
- $hex .= str_pad(dechex($g), 2, '0', STR_PAD_LEFT);
45
- $hex .= str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
46
- return $hex;
47
- }
48
- `)+"("+c+", "+d+", "+a+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_empty$$module$build$src$generators$php$lists=function(a,b){return["array()",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_with$$module$build$src$generators$php$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$php$php_generator.NONE)||"null";return["array("+c.join(", ")+
49
- ")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_repeat$$module$build$src$generators$php$lists=function(a,b){const c=b.provideFunction_("lists_repeat",`
15
+ var lists_create_empty$$module$build$src$generators$php$lists=function(a,b){return["array()",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_with$$module$build$src$generators$php$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$php$php_generator.NONE)||"null";return["array("+c.join(", ")+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_repeat$$module$build$src$generators$php$lists=
16
+ function(a,b){const c=b.provideFunction_("lists_repeat",`
50
17
  function ${b.FUNCTION_NAME_PLACEHOLDER_}($value, $count) {
51
18
  $array = array();
52
19
  for ($index = 0; $index < $count; $index++) {
@@ -233,14 +200,14 @@ function ${b.FUNCTION_NAME_PLACEHOLDER_}($a, $b) {
233
200
  return rand($a, $b);
234
201
  }
235
202
  `)+"("+c+", "+a+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},math_random_float$$module$build$src$generators$php$math=function(a,b){return["(float)rand()/(float)getrandmax()",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},math_atan2$$module$build$src$generators$php$math=function(a,b){const c=b.valueToCode(a,"X",Order$$module$build$src$generators$php$php_generator.NONE)||"0";return["atan2("+(b.valueToCode(a,"Y",Order$$module$build$src$generators$php$php_generator.NONE)||
236
- "0")+", "+c+") / pi() * 180",Order$$module$build$src$generators$php$php_generator.DIVISION]},procedures_defreturn$$module$build$src$generators$php$procedures=function(a,b){var c=[],d=a.workspace,e=$.allUsedVarModels$$module$build$src$core$variables(d)||[];for(var f of e)e=f.name,-1===a.getVars().indexOf(e)&&c.push(b.getVariableName(e));d=$.allDeveloperVariables$$module$build$src$core$variables(d);for(f=0;f<d.length;f++)c.push(b.nameDB_.getName(d[f],$.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE));
237
- d=c.length?b.INDENT+"global "+c.join(", ")+";\n":"";c=b.getProcedureName(a.getFieldValue("NAME"));f="";b.STATEMENT_PREFIX&&(f+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(f+=b.injectId(b.STATEMENT_SUFFIX,a));f&&(f=b.prefixLines(f,b.INDENT));e="";b.INFINITE_LOOP_TRAP&&(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));const g=b.statementToCode(a,"STACK");let h=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$php$php_generator.NONE)||"",k="";g&&h&&(k=f);h&&(h=b.INDENT+
238
- "return "+h+";\n");const l=[],m=a.getVars();for(let n=0;n<m.length;n++)l[n]=b.getVariableName(m[n]);d="function "+c+"("+l.join(", ")+") {\n"+d+f+e+g+k+h+"}";d=b.scrub_(a,d);b.definitions_["%"+c]=d;return null},procedures_callreturn$$module$build$src$generators$php$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$php$php_generator.NONE)||"null";return[c+"("+d.join(", ")+
239
- ")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},procedures_callnoreturn$$module$build$src$generators$php$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,b)[0]+";\n"},procedures_ifreturn$$module$build$src$generators$php$procedures=function(a,b){let c="if ("+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$php$php_generator.NONE)||"false")+") {\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?
240
- (a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$php$php_generator.NONE)||"null",c+=b.INDENT+"return "+a+";\n"):c+=b.INDENT+"return;\n";return c+"}\n"},text$$module$build$src$generators$php$text=function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$php$php_generator.ATOMIC]},text_multiline$$module$build$src$generators$php$text=function(a,b){a=b.multiline_quote_(a.getFieldValue("TEXT"));b=-1!==a.indexOf(".")?Order$$module$build$src$generators$php$php_generator.STRING_CONCAT:
241
- Order$$module$build$src$generators$php$php_generator.ATOMIC;return[a,b]},text_join$$module$build$src$generators$php$text=function(a,b){if(0===a.itemCount_)return["''",Order$$module$build$src$generators$php$php_generator.ATOMIC];if(1===a.itemCount_)return[b.valueToCode(a,"ADD0",Order$$module$build$src$generators$php$php_generator.NONE)||"''",Order$$module$build$src$generators$php$php_generator.NONE];if(2===a.itemCount_){var c=b.valueToCode(a,"ADD0",Order$$module$build$src$generators$php$php_generator.STRING_CONCAT)||
242
- "''";a=b.valueToCode(a,"ADD1",Order$$module$build$src$generators$php$php_generator.STRING_CONCAT)||"''";return[c+" . "+a,Order$$module$build$src$generators$php$php_generator.STRING_CONCAT]}c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$php$php_generator.NONE)||"''";return["implode('', array("+c.join(",")+"))",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},text_append$$module$build$src$generators$php$text=function(a,
243
- b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"''";return c+" .= "+a+";\n"},text_length$$module$build$src$generators$php$text=function(a,b){const c=b.provideFunction_("length",`
203
+ "0")+", "+c+") / pi() * 180",Order$$module$build$src$generators$php$php_generator.DIVISION]},procedures_defreturn$$module$build$src$generators$php$procedures=function(a,b){var c=[],d=a.workspace,e=$.allUsedVarModels$$module$build$src$core$variables(d)||[];for(var f of e)e=f.name,a.getVars().includes(e)||c.push(b.getVariableName(e));d=$.allDeveloperVariables$$module$build$src$core$variables(d);for(f=0;f<d.length;f++)c.push(b.nameDB_.getName(d[f],$.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE));
204
+ d=c.length?b.INDENT+"global "+c.join(", ")+";\n":"";c=b.getProcedureName(a.getFieldValue("NAME"));f="";b.STATEMENT_PREFIX&&(f+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(f+=b.injectId(b.STATEMENT_SUFFIX,a));f&&(f=b.prefixLines(f,b.INDENT));e="";b.INFINITE_LOOP_TRAP&&(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let g="";a.getInput("STACK")&&(g=b.statementToCode(a,"STACK"));let h="";a.getInput("RETURN")&&(h=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$php$php_generator.NONE)||
205
+ "");let k="";g&&h&&(k=f);h&&(h=b.INDENT+"return "+h+";\n");const l=[],m=a.getVars();for(let n=0;n<m.length;n++)l[n]=b.getVariableName(m[n]);d="function "+c+"("+l.join(", ")+") {\n"+d+f+e+g+k+h+"}";d=b.scrub_(a,d);b.definitions_["%"+c]=d;return null},procedures_callreturn$$module$build$src$generators$php$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$php$php_generator.NONE)||
206
+ "null";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},procedures_callnoreturn$$module$build$src$generators$php$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,b)[0]+";\n"},procedures_ifreturn$$module$build$src$generators$php$procedures=function(a,b){let c="if ("+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$php$php_generator.NONE)||"false")+") {\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,
207
+ a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$php$php_generator.NONE)||"null",c+=b.INDENT+"return "+a+";\n"):c+=b.INDENT+"return;\n";return c+"}\n"},text$$module$build$src$generators$php$text=function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$php$php_generator.ATOMIC]},text_join$$module$build$src$generators$php$text=function(a,b){if(0===a.itemCount_)return["''",Order$$module$build$src$generators$php$php_generator.ATOMIC];
208
+ if(1===a.itemCount_)return[b.valueToCode(a,"ADD0",Order$$module$build$src$generators$php$php_generator.NONE)||"''",Order$$module$build$src$generators$php$php_generator.NONE];if(2===a.itemCount_){var c=b.valueToCode(a,"ADD0",Order$$module$build$src$generators$php$php_generator.STRING_CONCAT)||"''";a=b.valueToCode(a,"ADD1",Order$$module$build$src$generators$php$php_generator.STRING_CONCAT)||"''";return[c+" . "+a,Order$$module$build$src$generators$php$php_generator.STRING_CONCAT]}c=Array(a.itemCount_);
209
+ for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$php$php_generator.NONE)||"''";return["implode('', array("+c.join(",")+"))",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},text_append$$module$build$src$generators$php$text=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"''";return c+" .= "+a+";\n"},text_length$$module$build$src$generators$php$text=
210
+ function(a,b){const c=b.provideFunction_("length",`
244
211
  function ${b.FUNCTION_NAME_PLACEHOLDER_}($value) {
245
212
  if (is_string($value)) {
246
213
  return strlen($value);
@@ -295,7 +262,7 @@ this.isInitialized=!1;for(const b in Order$$module$build$src$generators$php$php_
295
262
  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 a+";\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,
296
263
  "\\'");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))&&
297
264
  (d+=this.prefixLines(e,"// "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}getAdjusted(a,b,c=0,d=!1,e=Order$$module$build$src$generators$php$php_generator.NONE){a.workspace.options.oneBasedIndex&&c--;let f=a.workspace.options.oneBasedIndex?"1":"0",g=e;0<c?g=Order$$module$build$src$generators$php$php_generator.ADDITION:0>c?g=Order$$module$build$src$generators$php$php_generator.SUBTRACTION:d&&(g=Order$$module$build$src$generators$php$php_generator.UNARY_NEGATION);
298
- a=this.valueToCode(a,b,g)||f;if(0===c&&!d)return a;if($.isNumber$$module$build$src$core$utils$string(a))return a=String(Number(a)+c),d&&(a=String(-Number(a))),a;0<c?a=`${a} + ${c}`:0>c&&(a=`${a} - ${-c}`);d&&(a=c?`-(${a})`:`-${a}`);Math.floor(e)>=Math.floor(g)&&(a=`(${a})`);return a}},module$build$src$generators$php$php_generator={};module$build$src$generators$php$php_generator.Order=Order$$module$build$src$generators$php$php_generator;module$build$src$generators$php$php_generator.PhpGenerator=PhpGenerator$$module$build$src$generators$php$php_generator;var module$build$src$generators$php$colour={};module$build$src$generators$php$colour.colour_blend=colour_blend$$module$build$src$generators$php$colour;module$build$src$generators$php$colour.colour_picker=colour_picker$$module$build$src$generators$php$colour;module$build$src$generators$php$colour.colour_random=colour_random$$module$build$src$generators$php$colour;module$build$src$generators$php$colour.colour_rgb=colour_rgb$$module$build$src$generators$php$colour;var module$build$src$generators$php$lists={};module$build$src$generators$php$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_create_with=lists_create_with$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$php$lists;
265
+ a=this.valueToCode(a,b,g)||f;if(0===c&&!d)return a;if($.isNumber$$module$build$src$core$utils$string(a))return a=String(Number(a)+c),d&&(a=String(-Number(a))),a;0<c?a=`${a} + ${c}`:0>c&&(a=`${a} - ${-c}`);d&&(a=c?`-(${a})`:`-${a}`);Math.floor(e)>=Math.floor(g)&&(a=`(${a})`);return a}},module$build$src$generators$php$php_generator={};module$build$src$generators$php$php_generator.Order=Order$$module$build$src$generators$php$php_generator;module$build$src$generators$php$php_generator.PhpGenerator=PhpGenerator$$module$build$src$generators$php$php_generator;var module$build$src$generators$php$lists={};module$build$src$generators$php$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_create_with=lists_create_with$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$php$lists;
299
266
  module$build$src$generators$php$lists.lists_indexOf=lists_indexOf$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_isEmpty=lists_isEmpty$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_length=lists_length$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_repeat=lists_repeat$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_reverse=lists_reverse$$module$build$src$generators$php$lists;
300
267
  module$build$src$generators$php$lists.lists_setIndex=lists_setIndex$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_sort=lists_sort$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_split=lists_split$$module$build$src$generators$php$lists;var controls_ifelse$$module$build$src$generators$php$logic=controls_if$$module$build$src$generators$php$logic,module$build$src$generators$php$logic={};module$build$src$generators$php$logic.controls_if=controls_if$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.controls_ifelse=controls_if$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_boolean=logic_boolean$$module$build$src$generators$php$logic;
301
268
  module$build$src$generators$php$logic.logic_compare=logic_compare$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_negate=logic_negate$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_null=logic_null$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_operation=logic_operation$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_ternary=logic_ternary$$module$build$src$generators$php$logic;var controls_repeat$$module$build$src$generators$php$loops=controls_repeat_ext$$module$build$src$generators$php$loops,module$build$src$generators$php$loops={};module$build$src$generators$php$loops.controls_flow_statements=controls_flow_statements$$module$build$src$generators$php$loops;module$build$src$generators$php$loops.controls_for=controls_for$$module$build$src$generators$php$loops;module$build$src$generators$php$loops.controls_forEach=controls_forEach$$module$build$src$generators$php$loops;
@@ -305,8 +272,8 @@ module$build$src$generators$php$math.math_on_list=math_on_list$$module$build$src
305
272
  module$build$src$generators$php$math.math_trig=math_single$$module$build$src$generators$php$math;var procedures_defnoreturn$$module$build$src$generators$php$procedures=procedures_defreturn$$module$build$src$generators$php$procedures,module$build$src$generators$php$procedures={};module$build$src$generators$php$procedures.procedures_callnoreturn=procedures_callnoreturn$$module$build$src$generators$php$procedures;module$build$src$generators$php$procedures.procedures_callreturn=procedures_callreturn$$module$build$src$generators$php$procedures;
306
273
  module$build$src$generators$php$procedures.procedures_defnoreturn=procedures_defreturn$$module$build$src$generators$php$procedures;module$build$src$generators$php$procedures.procedures_defreturn=procedures_defreturn$$module$build$src$generators$php$procedures;module$build$src$generators$php$procedures.procedures_ifreturn=procedures_ifreturn$$module$build$src$generators$php$procedures;var text_prompt$$module$build$src$generators$php$text=text_prompt_ext$$module$build$src$generators$php$text,module$build$src$generators$php$text={};module$build$src$generators$php$text.text=text$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_append=text_append$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_changeCase=text_changeCase$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_charAt=text_charAt$$module$build$src$generators$php$text;
307
274
  module$build$src$generators$php$text.text_count=text_count$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_getSubstring=text_getSubstring$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_indexOf=text_indexOf$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_isEmpty=text_isEmpty$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_join=text_join$$module$build$src$generators$php$text;
308
- module$build$src$generators$php$text.text_length=text_length$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_multiline=text_multiline$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_print=text_print$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_prompt=text_prompt_ext$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_prompt_ext=text_prompt_ext$$module$build$src$generators$php$text;
309
- module$build$src$generators$php$text.text_replace=text_replace$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_reverse=text_reverse$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_trim=text_trim$$module$build$src$generators$php$text;var module$build$src$generators$php$variables={};module$build$src$generators$php$variables.variables_get=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables.variables_set=variables_set$$module$build$src$generators$php$variables;var module$build$src$generators$php$variables_dynamic={};module$build$src$generators$php$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$php$variables;var phpGenerator$$module$build$src$generators$php=new PhpGenerator$$module$build$src$generators$php$php_generator,generators$$module$build$src$generators$php=Object.assign({},module$build$src$generators$php$colour,module$build$src$generators$php$lists,module$build$src$generators$php$logic,module$build$src$generators$php$loops,module$build$src$generators$php$math,module$build$src$generators$php$procedures,module$build$src$generators$php$text,module$build$src$generators$php$variables,module$build$src$generators$php$variables_dynamic);
275
+ module$build$src$generators$php$text.text_length=text_length$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_print=text_print$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_prompt=text_prompt_ext$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_prompt_ext=text_prompt_ext$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_replace=text_replace$$module$build$src$generators$php$text;
276
+ module$build$src$generators$php$text.text_reverse=text_reverse$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_trim=text_trim$$module$build$src$generators$php$text;var module$build$src$generators$php$variables={};module$build$src$generators$php$variables.variables_get=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables.variables_set=variables_set$$module$build$src$generators$php$variables;var module$build$src$generators$php$variables_dynamic={};module$build$src$generators$php$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$php$variables;var phpGenerator$$module$build$src$generators$php=new PhpGenerator$$module$build$src$generators$php$php_generator,generators$$module$build$src$generators$php=Object.assign({},module$build$src$generators$php$lists,module$build$src$generators$php$logic,module$build$src$generators$php$loops,module$build$src$generators$php$math,module$build$src$generators$php$procedures,module$build$src$generators$php$text,module$build$src$generators$php$variables,module$build$src$generators$php$variables_dynamic);
310
277
  for(const a in generators$$module$build$src$generators$php)phpGenerator$$module$build$src$generators$php.forBlock[a]=generators$$module$build$src$generators$php[a];var module$build$src$generators$php={};module$build$src$generators$php.Order=Order$$module$build$src$generators$php$php_generator;module$build$src$generators$php.PhpGenerator=PhpGenerator$$module$build$src$generators$php$php_generator;module$build$src$generators$php.phpGenerator=phpGenerator$$module$build$src$generators$php;
311
278
  module$build$src$generators$php.__namespace__=$;
312
279
  return module$build$src$generators$php;