blockly 12.3.1 → 12.4.1

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 (154) hide show
  1. package/blockly.min.js +285 -277
  2. package/blockly_compressed.js +241 -234
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +8 -7
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/browser_events.d.ts +8 -2
  7. package/core/contextmenu_registry.d.ts +2 -2
  8. package/core/dragging/block_drag_strategy.d.ts +9 -0
  9. package/core/flyout_base.d.ts +5 -7
  10. package/core/flyout_button.d.ts +2 -1
  11. package/core/gesture.d.ts +0 -5
  12. package/core/icons/icon.d.ts +3 -1
  13. package/core/interfaces/i_contextmenu.d.ts +2 -0
  14. package/core/layer_manager.d.ts +17 -2
  15. package/core/menuitem.d.ts +8 -0
  16. package/core/rendered_connection.d.ts +1 -2
  17. package/core/toolbox/toolbox.d.ts +2 -0
  18. package/core/workspace_audio.d.ts +12 -11
  19. package/core/workspace_dragger.d.ts +0 -6
  20. package/core/workspace_svg.d.ts +1 -1
  21. package/dart_compressed.js +1 -1
  22. package/dart_compressed.js.map +1 -1
  23. package/msg/ab.js +36 -36
  24. package/msg/ace.js +36 -36
  25. package/msg/af.js +36 -36
  26. package/msg/am.js +36 -36
  27. package/msg/ar.js +36 -36
  28. package/msg/ast.js +36 -36
  29. package/msg/az.js +36 -36
  30. package/msg/ba.js +36 -36
  31. package/msg/bcc.js +36 -36
  32. package/msg/be-tarask.js +36 -36
  33. package/msg/be.js +36 -36
  34. package/msg/bg.js +36 -36
  35. package/msg/bn.js +36 -36
  36. package/msg/br.js +36 -36
  37. package/msg/bs.js +36 -36
  38. package/msg/ca.js +36 -36
  39. package/msg/cdo.js +36 -36
  40. package/msg/ce.js +36 -36
  41. package/msg/cs.js +36 -36
  42. package/msg/da.js +36 -36
  43. package/msg/de.js +32 -32
  44. package/msg/diq.js +36 -36
  45. package/msg/dtp.js +36 -36
  46. package/msg/dty.js +36 -36
  47. package/msg/ee.js +36 -36
  48. package/msg/el.js +36 -36
  49. package/msg/en-gb.js +36 -36
  50. package/msg/en.js +36 -36
  51. package/msg/eo.js +36 -36
  52. package/msg/es.js +34 -34
  53. package/msg/et.js +36 -36
  54. package/msg/eu.js +36 -36
  55. package/msg/fa.js +36 -36
  56. package/msg/fi.js +36 -36
  57. package/msg/fo.js +36 -36
  58. package/msg/fr.js +28 -28
  59. package/msg/frr.js +36 -36
  60. package/msg/gl.js +35 -35
  61. package/msg/gn.js +36 -36
  62. package/msg/gor.js +36 -36
  63. package/msg/ha.js +36 -36
  64. package/msg/hak.js +36 -36
  65. package/msg/he.js +36 -36
  66. package/msg/hi.js +36 -36
  67. package/msg/hr.js +36 -36
  68. package/msg/hrx.js +36 -36
  69. package/msg/hsb.js +36 -36
  70. package/msg/hu.js +36 -36
  71. package/msg/hy.js +36 -36
  72. package/msg/ia.js +35 -35
  73. package/msg/id.js +36 -36
  74. package/msg/ig.js +36 -36
  75. package/msg/inh.js +36 -36
  76. package/msg/is.js +36 -36
  77. package/msg/it.js +36 -36
  78. package/msg/ja.js +36 -36
  79. package/msg/ka.js +36 -36
  80. package/msg/kab.js +36 -36
  81. package/msg/kbd-cyrl.js +36 -36
  82. package/msg/km.js +36 -36
  83. package/msg/kn.js +36 -36
  84. package/msg/ko.js +26 -26
  85. package/msg/ksh.js +36 -36
  86. package/msg/ku-latn.js +36 -36
  87. package/msg/ky.js +36 -36
  88. package/msg/la.js +36 -36
  89. package/msg/lb.js +36 -36
  90. package/msg/lki.js +36 -36
  91. package/msg/lo.js +36 -36
  92. package/msg/lrc.js +36 -36
  93. package/msg/lt.js +36 -36
  94. package/msg/lv.js +36 -36
  95. package/msg/mg.js +36 -36
  96. package/msg/mk.js +36 -36
  97. package/msg/ml.js +36 -36
  98. package/msg/mnw.js +36 -36
  99. package/msg/ms.js +36 -36
  100. package/msg/my.js +36 -36
  101. package/msg/mzn.js +36 -36
  102. package/msg/nb.js +36 -36
  103. package/msg/ne.js +36 -36
  104. package/msg/nl.js +36 -36
  105. package/msg/oc.js +36 -36
  106. package/msg/olo.js +36 -36
  107. package/msg/pa.js +36 -36
  108. package/msg/pl.js +36 -36
  109. package/msg/pms.js +36 -36
  110. package/msg/ps.js +36 -36
  111. package/msg/pt-br.js +36 -36
  112. package/msg/pt.js +36 -36
  113. package/msg/ro.js +36 -36
  114. package/msg/ru.js +35 -35
  115. package/msg/sc.js +36 -36
  116. package/msg/sco.js +36 -36
  117. package/msg/sd.js +36 -36
  118. package/msg/shn.js +36 -36
  119. package/msg/si.js +36 -36
  120. package/msg/sk.js +36 -36
  121. package/msg/skr-arab.js +36 -36
  122. package/msg/sl.js +26 -26
  123. package/msg/smn.js +36 -36
  124. package/msg/sq.js +36 -36
  125. package/msg/sr-latn.js +36 -36
  126. package/msg/sr.js +36 -36
  127. package/msg/sv.js +36 -36
  128. package/msg/sw.js +36 -36
  129. package/msg/ta.js +36 -36
  130. package/msg/tcy.js +36 -36
  131. package/msg/tdd.js +36 -36
  132. package/msg/te.js +36 -36
  133. package/msg/th.js +36 -36
  134. package/msg/ti.js +36 -36
  135. package/msg/tl.js +36 -36
  136. package/msg/tlh.js +36 -36
  137. package/msg/tr.js +36 -36
  138. package/msg/ug-arab.js +36 -36
  139. package/msg/uk.js +36 -36
  140. package/msg/ur.js +36 -36
  141. package/msg/uz.js +36 -36
  142. package/msg/vi.js +36 -36
  143. package/msg/xmf.js +36 -36
  144. package/msg/yo.js +36 -36
  145. package/msg/zgh.js +36 -36
  146. package/msg/zh-hans.js +35 -35
  147. package/msg/zh-hant.js +35 -35
  148. package/package.json +2 -2
  149. package/media/click.ogg +0 -0
  150. package/media/click.wav +0 -0
  151. package/media/delete.ogg +0 -0
  152. package/media/delete.wav +0 -0
  153. package/media/disconnect.ogg +0 -0
  154. package/media/disconnect.wav +0 -0
@@ -21,9 +21,12 @@ export type Data = [EventTarget, string, (e: Event) => void][];
21
21
  * @param opt_noCaptureIdentifier True if triggering on this event should not
22
22
  * block execution of other event handlers on this touch or other
23
23
  * simultaneous touches. False by default.
24
+ * @param options An object with options controlling the behavior of the event
25
+ * listener. Passed through directly as the third argument to
26
+ * `addEventListener`.
24
27
  * @returns Opaque data that can be passed to unbindEvent_.
25
28
  */
26
- export declare function conditionalBind(node: EventTarget, name: string, thisObject: object | null, func: Function, opt_noCaptureIdentifier?: boolean): Data;
29
+ export declare function conditionalBind(node: EventTarget, name: string, thisObject: object | null, func: Function, opt_noCaptureIdentifier?: boolean, options?: AddEventListenerOptions): Data;
27
30
  /**
28
31
  * Bind an event handler that should be called regardless of whether it is part
29
32
  * of the active touch stream.
@@ -34,9 +37,12 @@ export declare function conditionalBind(node: EventTarget, name: string, thisObj
34
37
  * @param name Event name to listen to (e.g. 'mousedown').
35
38
  * @param thisObject The value of 'this' in the function.
36
39
  * @param func Function to call when event is triggered.
40
+ * @param options An object with options controlling the behavior of the event
41
+ * listener. Passed through directly as the third argument to
42
+ * `addEventListener`.
37
43
  * @returns Opaque data that can be passed to unbindEvent_.
38
44
  */
39
- export declare function bind(node: EventTarget, name: string, thisObject: object | null, func: Function): Data;
45
+ export declare function bind(node: EventTarget, name: string, thisObject: object | null, func: Function, options?: AddEventListenerOptions): Data;
40
46
  /**
41
47
  * Unbind one or more events event from a function call.
42
48
  *
@@ -86,6 +86,7 @@ export declare namespace ContextMenuRegistry {
86
86
  scopeType?: ScopeType;
87
87
  weight: number;
88
88
  id: string;
89
+ preconditionFn?: (p1: Scope, menuOpenEvent: Event) => string;
89
90
  }
90
91
  /**
91
92
  * A representation of a normal, clickable menu item in the registry.
@@ -100,8 +101,8 @@ export declare namespace ContextMenuRegistry {
100
101
  */
101
102
  callback: (scope: Scope, menuOpenEvent: Event, menuSelectEvent: Event, location: Coordinate) => void;
102
103
  displayText: ((p1: Scope) => string | HTMLElement) | string | HTMLElement;
103
- preconditionFn: (p1: Scope, menuOpenEvent: Event) => string;
104
104
  separator?: never;
105
+ preconditionFn: (p1: Scope, menuOpenEvent: Event) => string;
105
106
  }
106
107
  /**
107
108
  * A representation of a menu separator item in the registry.
@@ -110,7 +111,6 @@ export declare namespace ContextMenuRegistry {
110
111
  separator: true;
111
112
  callback?: never;
112
113
  displayText?: never;
113
- preconditionFn?: never;
114
114
  }
115
115
  /**
116
116
  * A menu item as entered in the registry.
@@ -35,6 +35,15 @@ export declare class BlockDragStrategy implements IDragStrategy {
35
35
  * from any parent blocks.
36
36
  */
37
37
  startDrag(e?: PointerEvent): void;
38
+ /**
39
+ * Returns an array of visible bubbles attached to the given block or its
40
+ * descendants.
41
+ *
42
+ * @param block The block to identify open bubbles on.
43
+ * @returns An array of all currently visible bubbles on the given block or
44
+ * its descendants.
45
+ */
46
+ private getVisibleBubbles;
38
47
  /**
39
48
  * Get whether the drag should act on a single block or a block stack.
40
49
  *
@@ -104,6 +104,11 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
104
104
  * to reflow when elements in the flyout workspace change.
105
105
  */
106
106
  private reflowWrapper;
107
+ /**
108
+ * If true, prevents the reflow wrapper from running. Used to prevent infinite
109
+ * recursion.
110
+ */
111
+ private inhibitReflowWrapper;
107
112
  /**
108
113
  * List of flyout elements.
109
114
  */
@@ -372,13 +377,6 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
372
377
  * @internal
373
378
  */
374
379
  isScrollable(): boolean;
375
- /**
376
- * Copy a block from the flyout to the workspace and position it correctly.
377
- *
378
- * @param oldBlock The flyout block to copy.
379
- * @returns The new block in the main workspace.
380
- */
381
- private placeNewBlock;
382
380
  /**
383
381
  * Serialize a block to JSON.
384
382
  *
@@ -24,9 +24,10 @@ export declare class FlyoutButton implements IBoundedElement, IRenderedElement,
24
24
  static TEXT_MARGIN_Y: number;
25
25
  /** The radius of the flyout button's borders. */
26
26
  static BORDER_RADIUS: number;
27
+ /** The key to the function called when this button is activated. */
28
+ readonly callbackKey: string;
27
29
  private readonly text;
28
30
  private readonly position;
29
- private readonly callbackKey;
30
31
  private readonly cssClass;
31
32
  /** Mouse up event data. */
32
33
  private onMouseDownWrapper;
package/core/gesture.d.ts CHANGED
@@ -332,11 +332,6 @@ export declare class Gesture {
332
332
  * @param _e A pointerup event.
333
333
  */
334
334
  private doWorkspaceClick;
335
- /**
336
- * Move the dragged/clicked block to the front of the workspace so that it is
337
- * not occluded by other blocks.
338
- */
339
- private bringBlockToFront;
340
335
  /**
341
336
  * Record the field that a gesture started on.
342
337
  *
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Block } from '../block.js';
7
+ import type { IContextMenu } from '../interfaces/i_contextmenu.js';
7
8
  import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
8
9
  import type { IIcon } from '../interfaces/i_icon.js';
9
10
  import * as tooltip from '../tooltip.js';
@@ -16,7 +17,7 @@ import type { IconType } from './icon_types.js';
16
17
  * block (such as warnings or comments) as opposed to fields, which provide
17
18
  * "actual" information, related to how a block functions.
18
19
  */
19
- export declare abstract class Icon implements IIcon {
20
+ export declare abstract class Icon implements IIcon, IContextMenu {
20
21
  protected sourceBlock: Block;
21
22
  /**
22
23
  * The position of this icon relative to its blocks top-start,
@@ -78,5 +79,6 @@ export declare abstract class Icon implements IIcon {
78
79
  * @returns The block this icon is attached to.
79
80
  */
80
81
  getSourceBlock(): Block;
82
+ showContextMenu(e: PointerEvent): void;
81
83
  }
82
84
  //# sourceMappingURL=icon.d.ts.map
@@ -11,4 +11,6 @@ export interface IContextMenu {
11
11
  */
12
12
  showContextMenu(e: Event): void;
13
13
  }
14
+ /** @returns true if the given object implements IContextMenu. */
15
+ export declare function hasContextMenu(obj: any): obj is IContextMenu;
14
16
  //# sourceMappingURL=i_contextmenu.d.ts.map
@@ -38,15 +38,24 @@ export declare class LayerManager {
38
38
  * Moves the given element to the drag layer, which exists on top of all other
39
39
  * layers, and the drag surface.
40
40
  *
41
+ * @param elem The element to move onto the drag layer.
42
+ * @param focus Whether or not to focus the element post-move.
43
+ *
41
44
  * @internal
42
45
  */
43
- moveToDragLayer(elem: IRenderedElement & IFocusableNode): void;
46
+ moveToDragLayer(elem: IRenderedElement & IFocusableNode, focus?: boolean): void;
44
47
  /**
45
48
  * Moves the given element off of the drag layer.
46
49
  *
50
+ * @param elem The element to move off of the drag layer.
51
+ * @param layerNum The identifier of the layer to move the element onto.
52
+ * Should be a constant from layers.ts.
53
+ * @param focus Whether or not the element should be focused once moved onto
54
+ * the destination layer.
55
+ *
47
56
  * @internal
48
57
  */
49
- moveOffDragLayer(elem: IRenderedElement & IFocusableNode, layerNum: number): void;
58
+ moveOffDragLayer(elem: IRenderedElement & IFocusableNode, layerNum: number, focus?: boolean): void;
50
59
  /**
51
60
  * Appends the given element to a layer. If the layer does not exist, it is
52
61
  * created.
@@ -82,5 +91,11 @@ export declare class LayerManager {
82
91
  * @internal
83
92
  */
84
93
  getBubbleLayer(): SVGGElement;
94
+ /**
95
+ * Returns the drag layer.
96
+ *
97
+ * @internal
98
+ */
99
+ getDragLayer(): SVGGElement | undefined;
85
100
  }
86
101
  //# sourceMappingURL=layer_manager.d.ts.map
@@ -135,5 +135,13 @@ export declare class MenuItem {
135
135
  * @internal
136
136
  */
137
137
  onAction(fn: (p1: MenuItem, menuSelectEvent: Event) => void, obj: object): void;
138
+ /**
139
+ * Adds or removes the checkmark indicator on this menu item.
140
+ * The indicator is present even if this menu item is not checked, as long
141
+ * as it is checkable; its visibility is controlled with CSS.
142
+ *
143
+ * @param add True to add the checkmark indicator, false to remove it.
144
+ */
145
+ private toggleHasCheckbox;
138
146
  }
139
147
  //# sourceMappingURL=menuitem.d.ts.map
@@ -8,7 +8,6 @@
8
8
  *
9
9
  * @class
10
10
  */
11
- import type { Block } from './block.js';
12
11
  import type { BlockSvg } from './block_svg.js';
13
12
  import { Connection } from './connection.js';
14
13
  import { IContextMenu } from './interfaces/i_contextmenu.js';
@@ -164,7 +163,7 @@ export declare class RenderedConnection extends Connection implements IContextMe
164
163
  *
165
164
  * @returns List of blocks to render.
166
165
  */
167
- startTrackingAll(): Block[];
166
+ startTrackingAll(): BlockSvg[];
168
167
  /**
169
168
  * Behaviour after a connection attempt fails.
170
169
  * Bumps this connection away from the other connection. Called when an
@@ -60,6 +60,8 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
60
60
  protected boundEvents_: browserEvents.Data[];
61
61
  /** The workspace this toolbox is on. */
62
62
  protected readonly workspace_: WorkspaceSvg;
63
+ /** Whether the mouse is currently being clicked. */
64
+ private mouseDown;
63
65
  /** @param workspace The workspace in which to create new blocks. */
64
66
  constructor(workspace: WorkspaceSvg);
65
67
  /**
@@ -3,6 +3,12 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object in charge of loading, storing, and playing audio for a
8
+ * workspace.
9
+ *
10
+ * @class
11
+ */
6
12
  import type { WorkspaceSvg } from './workspace_svg.js';
7
13
  /**
8
14
  * Class for loading, storing, and playing audio for a workspace.
@@ -15,6 +21,8 @@ export declare class WorkspaceAudio {
15
21
  private lastSound;
16
22
  /** Whether the audio is muted or not. */
17
23
  private muted;
24
+ /** Audio context used for playback. */
25
+ private readonly context?;
18
26
  /**
19
27
  * @param parentWorkspace The parent of the workspace this audio object
20
28
  * belongs to, or null.
@@ -29,18 +37,11 @@ export declare class WorkspaceAudio {
29
37
  /**
30
38
  * Load an audio file. Cache it, ready for instantaneous playing.
31
39
  *
32
- * @param filenames List of file types in decreasing order of preference (i.e.
33
- * increasing size). E.g. ['media/go.mp3', 'media/go.wav'] Filenames
34
- * include path from Blockly's root. File extensions matter.
40
+ * @param filenames Single-item array containing the URL for the sound file.
41
+ * Any items after the first item are ignored.
35
42
  * @param name Name of sound.
36
43
  */
37
- load(filenames: string[], name: string): void;
38
- /**
39
- * Preload all the audio files so that they play quickly when asked for.
40
- *
41
- * @internal
42
- */
43
- preload(): void;
44
+ load(filenames: string[], name: string): Promise<void>;
44
45
  /**
45
46
  * Play a named sound at specified volume. If volume is not specified,
46
47
  * use full volume (1).
@@ -48,7 +49,7 @@ export declare class WorkspaceAudio {
48
49
  * @param name Name of sound.
49
50
  * @param opt_volume Volume of sound (0-1).
50
51
  */
51
- play(name: string, opt_volume?: number): void;
52
+ play(name: string, opt_volume?: number): Promise<void>;
52
53
  /**
53
54
  * @param muted If true, mute sounds. Otherwise, play them.
54
55
  */
@@ -22,12 +22,6 @@ export declare class WorkspaceDragger {
22
22
  protected startScrollXY_: Coordinate;
23
23
  /** @param workspace The workspace to drag. */
24
24
  constructor(workspace: WorkspaceSvg);
25
- /**
26
- * Sever all links from this object.
27
- *
28
- * @internal
29
- */
30
- dispose(): void;
31
25
  /**
32
26
  * Start dragging the workspace.
33
27
  *
@@ -975,7 +975,7 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
975
975
  * valid gesture exists.
976
976
  * @internal
977
977
  */
978
- getGesture(e: PointerEvent): Gesture | null;
978
+ getGesture(e?: PointerEvent): Gesture | null;
979
979
  /**
980
980
  * Clear the reference to the current gesture.
981
981
  *
@@ -305,7 +305,7 @@ a[a.ASSIGNMENT=16]="ASSIGNMENT";a[a.NONE=99]="NONE"})(Order$$module$build$src$ge
305
305
  var DartGenerator$$module$build$src$generators$dart$dart_generator=class extends $.CodeGenerator$$module$build$src$core$generator{constructor(a="Dart"){super(a);this.isInitialized=!1;for(const b in Order$$module$build$src$generators$dart$dart_generator)a=Order$$module$build$src$generators$dart$dart_generator[b],typeof a!=="string"&&(this["ORDER_"+b]=a);this.addReservedWords("assert,break,case,catch,class,const,continue,default,do,else,enum,extends,false,final,finally,for,if,in,is,new,null,rethrow,return,super,switch,this,throw,true,try,var,void,while,with,print,identityHashCode,identical,BidirectionalIterator,Comparable,double,Function,int,Invocation,Iterable,Iterator,List,Map,Match,num,Pattern,RegExp,Set,StackTrace,String,StringSink,Type,bool,DateTime,Deprecated,Duration,Expando,Null,Object,RuneIterator,Runes,Stopwatch,StringBuffer,Symbol,Uri,Comparator,AbstractClassInstantiationError,ArgumentError,AssertionError,CastError,ConcurrentModificationError,CyclicInitializationError,Error,Exception,FallThroughError,FormatException,IntegerDivisionByZeroException,NoSuchMethodError,NullThrownError,OutOfMemoryError,RangeError,StackOverflowError,StateError,TypeError,UnimplementedError,UnsupportedError")}init(a){super.init(a);
306
306
  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);const b=[];var c=$.allDeveloperVariables$$module$build$src$core$variables(a);for(let d=0;d<c.length;d++)b.push(this.nameDB_.getName(c[d],$.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE));a=$.allUsedVarModels$$module$build$src$core$variables(a);for(c=0;c<a.length;c++)b.push(this.nameDB_.getName(a[c].getId(),
307
307
  $.NameType$$module$build$src$core$names.VARIABLE));b.length&&(this.definitions_.variables="var "+b.join(", ")+";");this.isInitialized=!0}finish(a){a&&(a=this.prefixLines(a,this.INDENT));a="main() {\n"+a+"}";const b=[],c=[];for(let d in this.definitions_){const e=this.definitions_[d];e.match(/^import\s/)?b.push(e):c.push(e)}a=super.finish(a);this.isInitialized=!1;this.nameDB_.reset();return(b.join("\n")+"\n\n"+c.join("\n\n")).replace(/\n\n+/g,"\n\n").replace(/\n*$/,"\n\n\n")+a}scrubNakedValue(a){return a+
308
- ";\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\$/g,"\\$").replace(/'/g,"\\'");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=a.getProcedureDef?d+this.prefixLines(e+"\n","/// "):d+this.prefixLines(e+"\n","// "));for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===
308
+ ";\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\$/g,"\\$").replace(/'/g,"\\'");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="getProcedureDef"in a?d+this.prefixLines(e+"\n","/// "):d+this.prefixLines(e+"\n","// "));for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===
309
309
  $.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&(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$dart$dart_generator.NONE){a.workspace.options.oneBasedIndex&&c--;const f=a.workspace.options.oneBasedIndex?"1":"0";let g=e;c?g=Order$$module$build$src$generators$dart$dart_generator.ADDITIVE:
310
310
  d&&(g=Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX);a=this.valueToCode(a,b,g)||f;if(c===0&&!d)return a;if($.isNumber$$module$build$src$core$utils$string(a))return a=String(Number(a)+c),d&&(a=String(-Number(a))),a;c>0?a=`${a} + ${c}`:c<0&&(a=`${a} - ${-c}`);d&&(a=c?`-(${a})`:`-${a}`);Math.floor(e)>=Math.floor(g)&&(a=`(${a})`);return a}},module$build$src$generators$dart$dart_generator={};module$build$src$generators$dart$dart_generator.DartGenerator=DartGenerator$$module$build$src$generators$dart$dart_generator;
311
311
  module$build$src$generators$dart$dart_generator.Order=Order$$module$build$src$generators$dart$dart_generator;var module$build$src$generators$dart$lists={};module$build$src$generators$dart$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_create_with=lists_create_with$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$dart$lists;