x-block-lib 0.9.1 → 0.9.3

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 (2) hide show
  1. package/dist/index.js +373 -381
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
  import { E as v, r as Sn, M as xo, s as wo, a as Fo, X as Hn, u as L, B as I, j as i, O as h, F as O, b as en, i as k, c as kt, d as Yo, e as $, f as g, g as Ko, h as Z, k as vt, p as jt, l as pt, m as Ln, n as x, C as Gn, N as _t, o as $o, P as nn, q as We, V as xt, t as Wn, W as Ho, v as Go, w as Wo, S as jo, x as Xo, y as Jo, z as ne, T as Be, A as jn, D as qo, G as Qo, H as Xn, I as zo, J as Zo, K as ts, L as es, Q as ns, R as os, U as ss, Y as is } from "./vendor.omuaiksa.js";
3
3
  import { globalState as A } from "x-state-lib";
4
4
  import { globalObjects as Nt, openConfirmDlg as as, openPromptDlg as cs, messageWarning as Jn, useColor as oe, useSystem as qn, useViewStack as fn, eventBus as Vt } from "x-essential-lib";
5
- import { pkgs as de, parsePixelStr as rs, parsePercentStr as ls, getTag as $t, unwrapEventId as Qn, elements as B, unwrapEventKeyOfCustomSlot as bt, unwrapEventKeyOfElementSlot as us, unwrapPropertyKeyOfElementSlot as zn, unwrapPropertyKeyOfCustomSlot as Zn, makeEventId as M, makeEventKeyOfCustomSlot as Xt, makePropertyKeyOfCustomSlot as ue, unwrapSlotId as Dt, makeEventKeyOfElementSlot as ps, makePropertyKeyOfElementSlot as to, toEventName as be, unwrapMethodId as se, unwrapMethodKeyOfCustomSlot as he, unwrapMethodKeyOfElementSlot as _s, makeMethodId as ft, makeMethodKeyOfElementSlot as ds, makeMethodKeyOfCustomSlot as on, toMethodName as Pe, unwrapPropertyId as hs, makePropertyId as Tt, toPropertyName as eo, isLocaleOfEventKind as fs, getImplementMethodName as no, isLocaleOfMethodKind as oo, makeTriggerId as Pt } from "x-runtime-lib";
6
- import { provide as ms, inject as Ts, defineComponent as mt, computed as H, resolveComponent as K, createBlock as dt, openBlock as V, unref as F, withCtx as ht, createVNode as U, mergeProps as mn, useModel as Qt, ref as wt, resolveDirective as Es, withDirectives as gs, createElementBlock as lt, normalizeStyle as ot, createElementVNode as Q, createCommentVNode as Et, toDisplayString as zt, withModifiers as Jt, mergeModels as sn, Fragment as so, renderList as As, useId as an, onUnmounted as Is, useTemplateRef as qt, withKeys as io, isRef as pe, onMounted as Bn, nextTick as ys, onBeforeUnmount as bn, watch as Gt, renderSlot as Os } from "vue";
5
+ import { pkgs as de, parsePixelStr as rs, parsePercentStr as ls, getTag as $t, unwrapEventId as Qn, elements as B, unwrapEventKeyOfCustomSlot as bt, unwrapEventKeyOfElementSlot as us, unwrapPropertyKeyOfElementSlot as zn, unwrapPropertyKeyOfCustomSlot as Zn, makeEventId as M, makeEventKeyOfCustomSlot as Xt, makePropertyKeyOfCustomSlot as ue, unwrapSlotId as Dt, makeEventKeyOfElementSlot as ps, makePropertyKeyOfElementSlot as to, toEventName as be, unwrapMethodId as se, unwrapMethodKeyOfCustomSlot as he, unwrapMethodKeyOfElementSlot as _s, makeMethodId as ft, makeMethodKeyOfElementSlot as ds, makeMethodKeyOfCustomSlot as on, toMethodName as Pe, unwrapPropertyId as hs, makePropertyId as Tt, toPropertyName as eo, addIndent as fs, isLocaleOfEventKind as ms, getImplementMethodName as no, isLocaleOfMethodKind as oo, makeTriggerId as Pt } from "x-runtime-lib";
6
+ import { provide as Ts, inject as Es, defineComponent as mt, computed as H, resolveComponent as K, createBlock as dt, openBlock as V, unref as F, withCtx as ht, createVNode as U, mergeProps as mn, useModel as Qt, ref as wt, resolveDirective as gs, withDirectives as As, createElementBlock as lt, normalizeStyle as ot, createElementVNode as Q, createCommentVNode as Et, toDisplayString as zt, withModifiers as Jt, mergeModels as sn, Fragment as so, renderList as Is, useId as an, onUnmounted as ys, useTemplateRef as qt, withKeys as io, isRef as pe, onMounted as Bn, nextTick as Os, onBeforeUnmount as bn, watch as Gt, renderSlot as vs } from "vue";
7
7
  import { useDisplay as Tn } from "vuetify";
8
8
  import { useI18n as ie } from "vue-i18n";
9
9
  var R = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(R || {});
@@ -46,7 +46,7 @@ function me(t) {
46
46
  function b(t) {
47
47
  return t.length <= 0 && t.push([E("NO_OPTION"), ""]), t;
48
48
  }
49
- function vs(t) {
49
+ function Cs(t) {
50
50
  let e = 0;
51
51
  for (; t; )
52
52
  e++, t = t.getParent();
@@ -81,17 +81,17 @@ function Rn(t) {
81
81
  const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
82
82
  return L.xml.textToDom(e);
83
83
  }
84
- function Cs(t) {
84
+ function ks(t) {
85
85
  return L.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
86
86
  }
87
87
  function cn(t, e) {
88
88
  let n = null;
89
- return e === "string" ? n = je("") : e === "integer" || e === "decimal" ? n = Rn(0) : e === "boolean" ? n = Cs() : e === "enum" || e === "dateTime" ? n = je("") : console.assert(!1), n ? Hn.domToBlock(n, t) : null;
89
+ return e === "string" ? n = je("") : e === "integer" || e === "decimal" ? n = Rn(0) : e === "boolean" ? n = ks() : e === "enum" || e === "dateTime" ? n = je("") : console.assert(!1), n ? Hn.domToBlock(n, t) : null;
90
90
  }
91
91
  function St(t) {
92
92
  return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
93
93
  }
94
- function ks(t) {
94
+ function Ns(t) {
95
95
  return t.array ? "Array" : t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? me(t.items) : t.ui === "multiTypes" ? me(t.types) : t.ui === "selectComp" ? "Comp" : t.ui === "selectSlot" ? "Slot" : t.ui === "selectAdaptSlot" ? "AdaptSlot" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
96
96
  }
97
97
  function lo(t) {
@@ -144,36 +144,36 @@ function Ee(t) {
144
144
  function uo() {
145
145
  return L.xml.textToDom('<shadow type="list_create_v1"></shadow>');
146
146
  }
147
- function Ns() {
147
+ function Ss() {
148
148
  return L.xml.textToDom('<shadow type="object_create_v1"></shadow>');
149
149
  }
150
- function Ss(t) {
150
+ function Ls(t) {
151
151
  const e = `<shadow type="${Re(t)}"></shadow>`;
152
152
  return L.xml.textToDom(e);
153
153
  }
154
- function Ls(t) {
154
+ function Bs(t) {
155
155
  const e = `<shadow type="${Re(t)}"></shadow>`;
156
156
  return L.xml.textToDom(e);
157
157
  }
158
- function Bs() {
158
+ function bs() {
159
159
  return L.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
160
160
  }
161
- function bs() {
161
+ function Ps() {
162
162
  return L.xml.textToDom('<shadow type="select_slot_v1"></shadow>');
163
163
  }
164
- function Ps(t) {
164
+ function Rs(t) {
165
165
  const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
166
166
  return L.xml.textToDom(e);
167
167
  }
168
168
  function rt(t) {
169
169
  let e = null;
170
- return t === "string" ? e = yt("") : t === "number" ? e = Te(0) : t === "boolean" ? e = Ee(!1) : t === "array" ? e = uo() : t === "object" ? e = Ns() : console.assert(!1), e;
170
+ return t === "string" ? e = yt("") : t === "number" ? e = Te(0) : t === "boolean" ? e = Ee(!1) : t === "array" ? e = uo() : t === "object" ? e = Ss() : console.assert(!1), e;
171
171
  }
172
- function Rs(t) {
172
+ function Ds(t) {
173
173
  let e = null;
174
- return t.array ? e = uo() : t.ui === "dummy" ? e = null : t.ui === "strInput" ? e = yt(t.default) : t.ui === "numInput" ? e = Te(t.default) : t.ui === "switch" ? e = Ee(t.default) : t.ui === "select" ? e = Ss(t.items) : t.ui === "multiTypes" ? e = Ls(t.types) : t.ui === "selectComp" ? e = Bs() : t.ui === "selectSlot" ? e = bs() : t.ui === "colorPicker" ? e = Ps(t.default ?? "#ff0000") : console.assert(!1), e;
174
+ return t.array ? e = uo() : t.ui === "dummy" ? e = null : t.ui === "strInput" ? e = yt(t.default) : t.ui === "numInput" ? e = Te(t.default) : t.ui === "switch" ? e = Ee(t.default) : t.ui === "select" ? e = Ls(t.items) : t.ui === "multiTypes" ? e = Bs(t.types) : t.ui === "selectComp" ? e = bs() : t.ui === "selectSlot" ? e = Ps() : t.ui === "colorPicker" ? e = Rs(t.default ?? "#ff0000") : console.assert(!1), e;
175
175
  }
176
- function Ds() {
176
+ function Ms() {
177
177
  const { activeObject: t, activePage: e } = A.app, n = [];
178
178
  if (t.type === "page" && e.meta.arguments)
179
179
  for (const { id: o, name: s, type: a } of e.meta.arguments)
@@ -192,13 +192,13 @@ function Dn(t) {
192
192
  };
193
193
  }
194
194
  }
195
- function Ms() {
195
+ function Us() {
196
196
  const t = [];
197
- return Ds().forEach(({ key: n, name: o }) => {
197
+ return Ms().forEach(({ key: n, name: o }) => {
198
198
  t.push([o, n]);
199
199
  }), b(t);
200
200
  }
201
- const Us = {
201
+ const Vs = {
202
202
  init: function() {
203
203
  this.argument = {
204
204
  key: "",
@@ -220,7 +220,7 @@ const Us = {
220
220
  }, 0);
221
221
  },
222
222
  genArgumentOpts_: function() {
223
- return Ms();
223
+ return Us();
224
224
  },
225
225
  onchange: function(t) {
226
226
  if (t.type === R.STATE_CHANGE)
@@ -256,12 +256,12 @@ const Us = {
256
256
  this.setWarningText(null);
257
257
  }
258
258
  };
259
- I.get_page_argument_v1 = Us;
259
+ I.get_page_argument_v1 = Vs;
260
260
  i.forBlock.get_page_argument_v1 = function(t) {
261
261
  const e = t;
262
262
  return [`__getPageArgumentV1__(${i.quote_(e.argument.key)})`, h.FUNCTION_CALL];
263
263
  };
264
- const Vs = (t, e) => {
264
+ const xs = (t, e) => {
265
265
  const n = Re(t), o = me(t);
266
266
  I[n] = {
267
267
  init: function() {
@@ -284,9 +284,9 @@ const Vs = (t, e) => {
284
284
  for (const t in de) {
285
285
  const e = de[t];
286
286
  for (const n in e.items)
287
- Vs(n, e.items[n]);
287
+ xs(n, e.items[n]);
288
288
  }
289
- const xs = (t, e) => {
289
+ const ws = (t, e) => {
290
290
  const n = Re(t), o = me(t);
291
291
  I[n] = {
292
292
  init: function() {
@@ -379,23 +379,23 @@ const xs = (t, e) => {
379
379
  for (const t in de) {
380
380
  const e = de[t];
381
381
  for (const n in e.types)
382
- xs(n, e.types[n]);
382
+ ws(n, e.types[n]);
383
383
  }
384
- const ws = L.xml, Fs = {
384
+ const Fs = L.xml, Ys = {
385
385
  init: function() {
386
386
  this.appendDummyInput().appendField(
387
387
  "%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
388
388
  ), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
389
389
  }
390
390
  };
391
- I.app_bind_container_v1 = Fs;
392
- const Ys = {
391
+ I.app_bind_container_v1 = Ys;
392
+ const Ks = {
393
393
  init: function() {
394
394
  this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
395
395
  }
396
396
  };
397
- I.app_bind_item_v1 = Ys;
398
- const Ks = {
397
+ I.app_bind_item_v1 = Ks;
398
+ const $s = {
399
399
  init: function() {
400
400
  this.itemCount_ = 0, this.setMutator(
401
401
  new kt.MutatorIcon(
@@ -407,7 +407,7 @@ const Ks = {
407
407
  }, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
408
408
  },
409
409
  mutationToDom: function() {
410
- const t = ws.createElement("mutation");
410
+ const t = Fs.createElement("mutation");
411
411
  return t.setAttribute("items", String(this.itemCount_)), t;
412
412
  },
413
413
  domToMutation: function(t) {
@@ -513,7 +513,7 @@ const Ks = {
513
513
  this.setWarningText(null);
514
514
  }
515
515
  };
516
- I.app_bind_v1 = Ks;
516
+ I.app_bind_v1 = $s;
517
517
  i.forBlock.app_bind_v1 = function() {
518
518
  return "";
519
519
  };
@@ -531,7 +531,7 @@ function Mn(t) {
531
531
  name: n.name
532
532
  };
533
533
  }
534
- function $s() {
534
+ function Hs() {
535
535
  const t = [];
536
536
  return po().forEach(({ id: n, name: o }) => {
537
537
  t.push([o, n]);
@@ -554,7 +554,7 @@ function Un(t) {
554
554
  name: n.name
555
555
  };
556
556
  }
557
- function Hs() {
557
+ function Gs() {
558
558
  const { i18n: t } = Nt, e = [];
559
559
  return _o().forEach(({ id: o, name: s }) => {
560
560
  let a = s;
@@ -1076,7 +1076,7 @@ function Xe(t) {
1076
1076
  }
1077
1077
  }
1078
1078
  }
1079
- function Gs(t) {
1079
+ function Ws(t) {
1080
1080
  const e = [], n = rn(t);
1081
1081
  let o;
1082
1082
  for (const { id: s, kind: a, names: c } of n)
@@ -1180,7 +1180,7 @@ function Je(t) {
1180
1180
  };
1181
1181
  }
1182
1182
  }
1183
- function Ws(t) {
1183
+ function js(t) {
1184
1184
  const e = [], n = ln(t);
1185
1185
  let o;
1186
1186
  for (const { id: s, kind: a, names: c } of n)
@@ -1418,7 +1418,7 @@ function qe(t) {
1418
1418
  }
1419
1419
  }
1420
1420
  }
1421
- function js(t) {
1421
+ function Xs(t) {
1422
1422
  const e = [], n = un(t);
1423
1423
  let o;
1424
1424
  for (const { id: s, kind: a, names: c } of n)
@@ -1546,14 +1546,14 @@ function Qe(t, e) {
1546
1546
  if (n)
1547
1547
  return n.outputs?.find((o) => o.key === e);
1548
1548
  }
1549
- function Xs(t) {
1549
+ function Js(t) {
1550
1550
  const e = [], n = pn(t);
1551
1551
  if (n)
1552
1552
  for (const { name: o, key: s } of n)
1553
1553
  e.push([o, s]);
1554
1554
  return b(e);
1555
1555
  }
1556
- function Js(t, e, n, o, s) {
1556
+ function qs(t, e, n, o, s) {
1557
1557
  const { properties: a } = A.runtime, { activeObject: c, activePage: l, activeComp: p, depends: _ } = A.app;
1558
1558
  if (t.events && t.events.length > 0)
1559
1559
  return !1;
@@ -1631,7 +1631,7 @@ function Js(t, e, n, o, s) {
1631
1631
  }
1632
1632
  return !0;
1633
1633
  }
1634
- function qs(t, e) {
1634
+ function Qs(t, e) {
1635
1635
  const { activeObject: n, activeComp: o } = A.app;
1636
1636
  if (W(t.key) && e && n.type === "comp" && o.meta.slots) {
1637
1637
  const s = o.meta.slots.find((a) => a.id === e);
@@ -1645,7 +1645,7 @@ function qs(t, e) {
1645
1645
  }
1646
1646
  return !(N(t.key) && n.type === "comp" && o.meta.events && o.meta.events.length > 0);
1647
1647
  }
1648
- function Qs(t, e, n) {
1648
+ function zs(t, e, n) {
1649
1649
  const { activeObject: o, activeComp: s, depends: a } = A.app;
1650
1650
  if (t.methods && t.methods.length > 0)
1651
1651
  return !1;
@@ -1681,7 +1681,7 @@ function Qs(t, e, n) {
1681
1681
  }
1682
1682
  return !0;
1683
1683
  }
1684
- function zs(t, e) {
1684
+ function Zs(t, e) {
1685
1685
  const { activeObject: n, activeComp: o } = A.app;
1686
1686
  if (W(t.key) && e && n.type === "comp" && o.meta.slots) {
1687
1687
  const s = o.meta.slots.find((a) => a.id === e);
@@ -1695,7 +1695,7 @@ function zs(t, e) {
1695
1695
  }
1696
1696
  return !(N(t.key) && n.type === "comp" && o.meta.methods && o.meta.methods.length > 0);
1697
1697
  }
1698
- function Zs(t, e, n, o, s) {
1698
+ function ti(t, e, n, o, s) {
1699
1699
  const { properties: a } = A.runtime, { activeObject: c, activeComp: l, depends: p } = A.app;
1700
1700
  if (a[t.key] && a[t.key][e] && a[t.key][e].length > 0)
1701
1701
  return !1;
@@ -1741,7 +1741,7 @@ function Zs(t, e, n, o, s) {
1741
1741
  }
1742
1742
  return !0;
1743
1743
  }
1744
- function ti(t, e, n, o, s) {
1744
+ function ei(t, e, n, o, s) {
1745
1745
  const { properties: a } = A.runtime, { activeObject: c, activeComp: l, depends: p } = A.app;
1746
1746
  if (a[t.key] && a[t.key][e]) {
1747
1747
  for (const { keys: _, raw: r } of a[t.key][e])
@@ -1791,7 +1791,7 @@ function ti(t, e, n, o, s) {
1791
1791
  return !0;
1792
1792
  }
1793
1793
  function fo(t, e, n, o, s, a) {
1794
- return t ? t === "onEvent" ? Js(e, n, o, s, a) : t === "triggerEvent" ? qs(e, o) : t === "callMethod" ? Qs(e, s, a) : t === "implementMethod" ? zs(e, o) : t === "getProperty" ? Zs(e, n, o, s, a) : t === "setProperty" ? ti(e, n, o, s, a) : !1 : !1;
1794
+ return t ? t === "onEvent" ? qs(e, n, o, s, a) : t === "triggerEvent" ? Qs(e, o) : t === "callMethod" ? zs(e, s, a) : t === "implementMethod" ? Zs(e, o) : t === "getProperty" ? ti(e, n, o, s, a) : t === "setProperty" ? ei(e, n, o, s, a) : !1 : !1;
1795
1795
  }
1796
1796
  function st(t) {
1797
1797
  const { activeObject: e } = A.app, n = $t(e.type, e.subtype);
@@ -1866,7 +1866,7 @@ function ze(t, e) {
1866
1866
  name: s.name
1867
1867
  };
1868
1868
  }
1869
- function ei(t) {
1869
+ function ni(t) {
1870
1870
  const e = [];
1871
1871
  return _n(t).forEach(({ id: o, name: s }) => {
1872
1872
  e.push([s, o]);
@@ -2184,7 +2184,7 @@ function Vn(t) {
2184
2184
  name: o.name
2185
2185
  };
2186
2186
  }
2187
- function ni() {
2187
+ function oi() {
2188
2188
  const { i18n: t } = Nt, e = [], n = To();
2189
2189
  for (const { id: o, name: s } of n) {
2190
2190
  let a = s;
@@ -2209,7 +2209,7 @@ function Eo() {
2209
2209
  t.push([o, n]);
2210
2210
  return b(t);
2211
2211
  }
2212
- const oi = {
2212
+ const si = {
2213
2213
  init: function() {
2214
2214
  this.node = {
2215
2215
  id: "",
@@ -2255,7 +2255,7 @@ const oi = {
2255
2255
  return Mt("onEvent");
2256
2256
  },
2257
2257
  genEventOpts_: function() {
2258
- return Gs(this.node.id);
2258
+ return Ws(this.node.id);
2259
2259
  },
2260
2260
  onchange: function(t) {
2261
2261
  if (t.type === R.STATE_CHANGE)
@@ -2320,7 +2320,7 @@ const oi = {
2320
2320
  return;
2321
2321
  const t = [];
2322
2322
  this.getInput("INSTANCE") && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
2323
- const e = fs(this.event.kind);
2323
+ const e = ms(this.event.kind);
2324
2324
  if (this.event.params)
2325
2325
  for (let n = 0; n < this.event.params.length; n++) {
2326
2326
  const { key: o, name: s } = this.event.params[n];
@@ -2355,7 +2355,7 @@ const oi = {
2355
2355
  this.setWarningText(null);
2356
2356
  }
2357
2357
  };
2358
- I.on_app_event_v1 = oi;
2358
+ I.on_app_event_v1 = si;
2359
2359
  i.forBlock.on_app_event_v1 = function(t) {
2360
2360
  const e = i.quote_, n = t;
2361
2361
  let o = "__instance__";
@@ -2364,10 +2364,14 @@ i.forBlock.on_app_event_v1 = function(t) {
2364
2364
  o && (o += ", "), o += `__param$${c}__`;
2365
2365
  const s = i.statementToCode(n, "HANDLE");
2366
2366
  return `__onEventV1__(${e(n.event.id)}, async (${o}) => {
2367
- ${s}});
2367
+ try {
2368
+ ${fs(s, 2)} } catch (e) {
2369
+ __messageV1__('error', e.message);
2370
+ }
2371
+ });
2368
2372
  `;
2369
2373
  };
2370
- const si = {
2374
+ const ii = {
2371
2375
  init: function() {
2372
2376
  this.node = {
2373
2377
  id: "",
@@ -2413,7 +2417,7 @@ const si = {
2413
2417
  return Mt("triggerEvent");
2414
2418
  },
2415
2419
  genEventOpts_: function() {
2416
- return Ws(this.node.id);
2420
+ return js(this.node.id);
2417
2421
  },
2418
2422
  onchange: function(t) {
2419
2423
  if (t.type === R.STATE_CHANGE)
@@ -2518,7 +2522,7 @@ const si = {
2518
2522
  this.setWarningText(null);
2519
2523
  }
2520
2524
  };
2521
- I.trigger_app_event_v1 = si;
2525
+ I.trigger_app_event_v1 = ii;
2522
2526
  i.forBlock.trigger_app_event_v1 = function(t) {
2523
2527
  const e = i.quote_, n = t;
2524
2528
  let o = "''";
@@ -2581,7 +2585,7 @@ i.forBlock.app_debug_trace_v1 = function(t) {
2581
2585
  return `__debugTraceV1__(${i.valueToCode(t, "OBJECT", h.NONE)});
2582
2586
  `;
2583
2587
  };
2584
- const ii = {
2588
+ const ai = {
2585
2589
  init: function() {
2586
2590
  this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_CONFIRM_DLG_HELPURL}");
2587
2591
  },
@@ -2610,7 +2614,7 @@ const ii = {
2610
2614
  ]);
2611
2615
  }
2612
2616
  };
2613
- I.open_confirm_dlg_v1 = ii;
2617
+ I.open_confirm_dlg_v1 = ai;
2614
2618
  i.forBlock.open_confirm_dlg_v1 = function(t) {
2615
2619
  const e = i.valueToCode(t, "TITLE", h.ATOMIC), n = i.valueToCode(t, "TEXT", h.ATOMIC), o = i.statementToCode(t, "HANDLE");
2616
2620
  return `{
@@ -2618,7 +2622,7 @@ i.forBlock.open_confirm_dlg_v1 = function(t) {
2618
2622
  ${o}}
2619
2623
  `;
2620
2624
  };
2621
- const ai = {
2625
+ const ci = {
2622
2626
  init: function() {
2623
2627
  this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_PROMPT_DLG_HELPURL}");
2624
2628
  },
@@ -2649,7 +2653,7 @@ const ai = {
2649
2653
  ]);
2650
2654
  }
2651
2655
  };
2652
- I.open_prompt_dlg_v1 = ai;
2656
+ I.open_prompt_dlg_v1 = ci;
2653
2657
  i.forBlock.open_prompt_dlg_v1 = function(t) {
2654
2658
  const e = i.valueToCode(t, "TITLE", h.ATOMIC), n = i.valueToCode(t, "LABEL", h.ATOMIC), o = i.valueToCode(t, "VALUE", h.ATOMIC), s = i.statementToCode(t, "HANDLE");
2655
2659
  return `{
@@ -2689,7 +2693,7 @@ i.forBlock.popup_message_v1 = function(t) {
2689
2693
  return `__messageV1__(${e}, ${n});
2690
2694
  `;
2691
2695
  };
2692
- const ci = {
2696
+ const ri = {
2693
2697
  init: function() {
2694
2698
  this.node = {
2695
2699
  id: "",
@@ -2735,7 +2739,7 @@ const ci = {
2735
2739
  return Mt("callMethod");
2736
2740
  },
2737
2741
  genMethodOpts_: function() {
2738
- return js(this.node.id);
2742
+ return Xs(this.node.id);
2739
2743
  },
2740
2744
  onchange: function(t) {
2741
2745
  if (t.type === R.STATE_CHANGE)
@@ -2869,7 +2873,7 @@ const ci = {
2869
2873
  this.setWarningText(null);
2870
2874
  }
2871
2875
  };
2872
- I.call_app_method_v1 = ci;
2876
+ I.call_app_method_v1 = ri;
2873
2877
  i.forBlock.call_app_method_v1 = function(t) {
2874
2878
  const e = i.INDENT, n = i.quote_, o = t;
2875
2879
  let s = "''";
@@ -2919,36 +2923,24 @@ i.forBlock.call_app_method_v1 = function(t) {
2919
2923
  const { kind: l, nodeId: p, methodKey: _ } = se(o.method.id), r = no(l, p, _);
2920
2924
  if (o.method.outputs && o.method.outputs.length > 0) {
2921
2925
  const u = i.statementToCode(o, "HANDLE");
2922
- return `try {
2926
+ return `{
2923
2927
  const __outputs__ = await ${r}(${s}, ${a});
2924
- ${c}${u}} catch (e) {
2925
- __messageV1__('error', e.message)
2926
- }
2928
+ ${c}${u}}
2927
2929
  `;
2928
2930
  } else
2929
- return `try {
2930
- await ${r}(${s}, ${a});
2931
- } catch (e) {
2932
- __messageV1__('error', e.message)
2933
- }
2931
+ return `await ${r}(${s}, ${a});
2934
2932
  `;
2935
2933
  } else if (o.method.outputs && o.method.outputs.length > 0) {
2936
2934
  const l = i.statementToCode(o, "HANDLE");
2937
- return `try {
2935
+ return `{
2938
2936
  const __outputs__ = await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
2939
- ${c}${l}} catch (e) {
2940
- __messageV1__('error', e.message)
2941
- }
2937
+ ${c}${l}}
2942
2938
  `;
2943
2939
  } else
2944
- return `try {
2945
- await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
2946
- } catch (e) {
2947
- __messageV1__('error', e.message)
2948
- }
2940
+ return `await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
2949
2941
  `;
2950
2942
  };
2951
- const ri = {
2943
+ const li = {
2952
2944
  init: function() {
2953
2945
  this.node = {
2954
2946
  id: "",
@@ -3087,7 +3079,7 @@ const ri = {
3087
3079
  this.setWarningText(null);
3088
3080
  }
3089
3081
  };
3090
- I.implement_app_method_v1 = ri;
3082
+ I.implement_app_method_v1 = li;
3091
3083
  i.forBlock.implement_app_method_v1 = function(t) {
3092
3084
  const e = i.INDENT, n = i.quote_, o = t, { kind: s, nodeId: a, methodKey: c } = se(o.method.id);
3093
3085
  let l = "";
@@ -3102,7 +3094,7 @@ ${p}${e}return __outputs__;
3102
3094
  }
3103
3095
  `;
3104
3096
  };
3105
- const li = {
3097
+ const ui = {
3106
3098
  init: function() {
3107
3099
  this.node = {
3108
3100
  id: "",
@@ -3165,7 +3157,7 @@ const li = {
3165
3157
  return ho(this.node.id);
3166
3158
  },
3167
3159
  genOutputOpts_: function() {
3168
- return Xs(this.method.id);
3160
+ return Js(this.method.id);
3169
3161
  },
3170
3162
  onchange: function(t) {
3171
3163
  if (t.type === R.STATE_CHANGE)
@@ -3265,7 +3257,7 @@ const li = {
3265
3257
  this.setWarningText(null);
3266
3258
  }
3267
3259
  };
3268
- I.set_app_method_output_v1 = li;
3260
+ I.set_app_method_output_v1 = ui;
3269
3261
  i.forBlock.set_app_method_output_v1 = function(t) {
3270
3262
  const e = i.quote_, n = t;
3271
3263
  let o = i.valueToCode(n, "VALUE", h.ATOMIC);
@@ -3315,7 +3307,7 @@ g([
3315
3307
  i.forBlock.app_env_is_v1 = function(t) {
3316
3308
  return [`__getEnvV1__() === ${i.quote_(t.getFieldValue("ENV"))}`, h.ATOMIC];
3317
3309
  };
3318
- const ui = {
3310
+ const pi = {
3319
3311
  init: function() {
3320
3312
  this.app = {
3321
3313
  id: "",
@@ -3353,10 +3345,10 @@ const ui = {
3353
3345
  }, 0);
3354
3346
  },
3355
3347
  genAppOpts_: function() {
3356
- return $s();
3348
+ return Hs();
3357
3349
  },
3358
3350
  genPageOpts_: function() {
3359
- return ei(this.app.id);
3351
+ return ni(this.app.id);
3360
3352
  },
3361
3353
  onchange: function(t) {
3362
3354
  if (t.type === R.STATE_CHANGE)
@@ -3405,13 +3397,13 @@ const ui = {
3405
3397
  e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
3406
3398
  }
3407
3399
  };
3408
- I.navigate_to_v1 = ui;
3400
+ I.navigate_to_v1 = pi;
3409
3401
  i.forBlock.navigate_to_v1 = function(t) {
3410
3402
  const e = t, n = i.quote_(e.app.id), o = i.quote_(e.page.id);
3411
3403
  return `__navigateToV1__(${n}, ${o});
3412
3404
  `;
3413
3405
  };
3414
- const pi = {
3406
+ const _i = {
3415
3407
  init: function() {
3416
3408
  this.comp = {
3417
3409
  id: "",
@@ -3439,7 +3431,7 @@ const pi = {
3439
3431
  }, 0);
3440
3432
  },
3441
3433
  genCompOpts_: function() {
3442
- return Hs();
3434
+ return Gs();
3443
3435
  },
3444
3436
  onchange: function(t) {
3445
3437
  if (t.type === R.STATE_CHANGE)
@@ -3468,12 +3460,12 @@ const pi = {
3468
3460
  t.name !== this.comp.name && (this.comp.name = t.name), this.setWarningText(null);
3469
3461
  }
3470
3462
  };
3471
- I.select_comp_v1 = pi;
3463
+ I.select_comp_v1 = _i;
3472
3464
  i.forBlock.select_comp_v1 = function(t) {
3473
3465
  const e = i.quote_, o = t.comp.id;
3474
3466
  return [e(o), h.ATOMIC];
3475
3467
  };
3476
- const _i = {
3468
+ const di = {
3477
3469
  init: function() {
3478
3470
  this.slot = {
3479
3471
  id: "",
@@ -3501,7 +3493,7 @@ const _i = {
3501
3493
  }, 0);
3502
3494
  },
3503
3495
  genSlotOpts_: function() {
3504
- return ni();
3496
+ return oi();
3505
3497
  },
3506
3498
  onchange: function(t) {
3507
3499
  if (t.type === R.STATE_CHANGE)
@@ -3530,12 +3522,12 @@ const _i = {
3530
3522
  t.name !== this.slot.name && (this.slot.name = t.name), this.setWarningText(null);
3531
3523
  }
3532
3524
  };
3533
- I.select_slot_v1 = _i;
3525
+ I.select_slot_v1 = di;
3534
3526
  i.forBlock.select_slot_v1 = function(t) {
3535
3527
  const e = i.quote_, o = t.slot.id;
3536
3528
  return [e(o), h.ATOMIC];
3537
3529
  };
3538
- const di = {
3530
+ const hi = {
3539
3531
  init: function() {
3540
3532
  this.node = {
3541
3533
  id: "",
@@ -3663,13 +3655,13 @@ const di = {
3663
3655
  $(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
3664
3656
  }
3665
3657
  };
3666
- I.get_app_property_v1 = di;
3658
+ I.get_app_property_v1 = hi;
3667
3659
  i.forBlock.get_app_property_v1 = function(t) {
3668
3660
  const e = i.quote_, n = t;
3669
3661
  let o = "''";
3670
3662
  return n.getInput("INSTANCE") && (o = i.valueToCode(n, "INSTANCE", h.NONE) || "''"), [`__getPropertyV1__(${e(n.property.id)}, ${o})`, h.ATOMIC];
3671
3663
  };
3672
- const hi = {
3664
+ const fi = {
3673
3665
  init: function() {
3674
3666
  this.node = {
3675
3667
  id: "",
@@ -3780,7 +3772,7 @@ const hi = {
3780
3772
  if (n) {
3781
3773
  n.setShadowDom(null);
3782
3774
  const o = n.connection?.targetBlock();
3783
- o && o.dispose(), t.meta.element ? n.setCheck(ks(t.meta.raw)).setShadowDom(Rs(t.meta.raw)) : n.setCheck(St(t.meta.raw.type)).setShadowDom(rt(t.meta.raw.type));
3775
+ o && o.dispose(), t.meta.element ? n.setCheck(Ns(t.meta.raw)).setShadowDom(Ds(t.meta.raw)) : n.setCheck(St(t.meta.raw.type)).setShadowDom(rt(t.meta.raw.type));
3784
3776
  }
3785
3777
  },
3786
3778
  checkWarning_: function() {
@@ -3806,7 +3798,7 @@ const hi = {
3806
3798
  $(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
3807
3799
  }
3808
3800
  };
3809
- I.set_app_property_v1 = hi;
3801
+ I.set_app_property_v1 = fi;
3810
3802
  i.forBlock.set_app_property_v1 = function(t) {
3811
3803
  const e = i.quote_, n = t;
3812
3804
  let o = "''";
@@ -3819,7 +3811,7 @@ i.forBlock.set_app_property_v1 = function(t) {
3819
3811
  return `await __setPropertyV1__(${e(n.property.id)}, ${s}, ${o});
3820
3812
  `;
3821
3813
  };
3822
- const fi = {
3814
+ const mi = {
3823
3815
  init: function() {
3824
3816
  this.state = {
3825
3817
  id: "",
@@ -3882,12 +3874,12 @@ const fi = {
3882
3874
  this.setWarningText(null);
3883
3875
  }
3884
3876
  };
3885
- I.get_app_state_v1 = fi;
3877
+ I.get_app_state_v1 = mi;
3886
3878
  i.forBlock.get_app_state_v1 = function(t) {
3887
3879
  const e = i.quote_;
3888
3880
  return [`__getStateV1__(${e(t.state.id)})`, h.ATOMIC];
3889
3881
  };
3890
- const mi = {
3882
+ const Ti = {
3891
3883
  init: function() {
3892
3884
  this.state = {
3893
3885
  id: "",
@@ -3955,7 +3947,7 @@ const mi = {
3955
3947
  this.setWarningText(null);
3956
3948
  }
3957
3949
  };
3958
- I.set_app_state_v1 = mi;
3950
+ I.set_app_state_v1 = Ti;
3959
3951
  i.forBlock.set_app_state_v1 = function(t) {
3960
3952
  const e = i.quote_, n = t, o = i.valueToCode(n, "VALUE", h.NONE);
3961
3953
  return `__setStateV1__(${e(n.state.id)}, ${o});
@@ -4664,7 +4656,7 @@ function ${i.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
4664
4656
  `
4665
4657
  )}(${e}, ${n}, ${o})`, h.FUNCTION_CALL];
4666
4658
  };
4667
- const Ti = L.xml, Ei = [
4659
+ const Ei = L.xml, gi = [
4668
4660
  {
4669
4661
  type: "add_data_v1",
4670
4662
  inputs: ["SUCCESS", "MESSAGE", "DATA"]
@@ -4728,16 +4720,16 @@ const Ti = L.xml, Ei = [
4728
4720
  inputs: ["SUCCESS", "MESSAGE", "DATA"]
4729
4721
  }
4730
4722
  ];
4731
- function gi(t, e) {
4732
- const n = Ei.find((o) => o.type === t);
4723
+ function Ai(t, e) {
4724
+ const n = gi.find((o) => o.type === t);
4733
4725
  return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
4734
4726
  }
4735
- const Ai = {
4727
+ const Ii = {
4736
4728
  init: function() {
4737
4729
  this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
4738
4730
  },
4739
4731
  mutationToDom: function() {
4740
- const t = Ti.createElement("mutation");
4732
+ const t = Ei.createElement("mutation");
4741
4733
  return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
4742
4734
  },
4743
4735
  domToMutation: function(t) {
@@ -4766,7 +4758,7 @@ const Ai = {
4766
4758
  },
4767
4759
  tryDuplicate_: function(t) {
4768
4760
  const e = this.workspace.getBlockById(t.oldParentId);
4769
- if (e && gi(e.type, t.oldInputName))
4761
+ if (e && Ai(e.type, t.oldInputName))
4770
4762
  try {
4771
4763
  v.disable();
4772
4764
  const n = e.getInput(t.oldInputName)?.connection;
@@ -4791,15 +4783,15 @@ const Ai = {
4791
4783
  this.setFieldValue(this.name, "LABEL");
4792
4784
  }
4793
4785
  };
4794
- I.parameter_v1 = Ai;
4786
+ I.parameter_v1 = Ii;
4795
4787
  i.forBlock.parameter_v1 = function(t) {
4796
4788
  return [t.key, h.ATOMIC];
4797
4789
  };
4798
- const Ii = {
4790
+ const yi = {
4799
4791
  init: function() {
4800
4792
  }
4801
4793
  };
4802
- I.on_flow_state_event_v1 = Ii;
4794
+ I.on_flow_state_event_v1 = yi;
4803
4795
  i.forBlock.on_flow_state_event_v1 = function() {
4804
4796
  return `__onFlowStateEventV1__();
4805
4797
  `;
@@ -4826,7 +4818,7 @@ function xn(t) {
4826
4818
  const { activeFunc: e } = A.compute;
4827
4819
  return e.outputs?.find((n) => n.id === t);
4828
4820
  }
4829
- function yi() {
4821
+ function Oi() {
4830
4822
  const { activeFunc: t } = A.compute, e = [];
4831
4823
  return t.outputs?.forEach(({ id: n, name: o }) => {
4832
4824
  e.push([o, n]);
@@ -4847,7 +4839,7 @@ function Ao(t) {
4847
4839
  e.push([s, o]);
4848
4840
  }), b(e);
4849
4841
  }
4850
- const Oi = {
4842
+ const vi = {
4851
4843
  init: function() {
4852
4844
  this.space = {
4853
4845
  id: "",
@@ -4994,7 +4986,7 @@ const Oi = {
4994
4986
  this.setWarningText(null);
4995
4987
  }
4996
4988
  };
4997
- I.call_func_v1 = Oi;
4989
+ I.call_func_v1 = vi;
4998
4990
  i.forBlock.call_func_v1 = function(t) {
4999
4991
  const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
5000
4992
  let c = "";
@@ -5021,7 +5013,7 @@ ${e}var __result__ = __callFuncV1__(${s},${a},__inputs__,__getEnvV1__(),${l});
5021
5013
  ${p}${_}}
5022
5014
  `;
5023
5015
  };
5024
- const vi = {
5016
+ const Ci = {
5025
5017
  init: function() {
5026
5018
  this.space = {
5027
5019
  id: "",
@@ -5168,7 +5160,7 @@ const vi = {
5168
5160
  this.setWarningText(null);
5169
5161
  }
5170
5162
  };
5171
- I.call_func_internal_v1 = vi;
5163
+ I.call_func_internal_v1 = Ci;
5172
5164
  i.forBlock.call_func_internal_v1 = function(t) {
5173
5165
  const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
5174
5166
  let c = `${e}var __inputs__ = {
@@ -5198,7 +5190,7 @@ ${e}}
5198
5190
  ${p}${_}}
5199
5191
  `;
5200
5192
  };
5201
- const Ci = {
5193
+ const ki = {
5202
5194
  init: function() {
5203
5195
  this.func = {
5204
5196
  id: ""
@@ -5254,7 +5246,7 @@ const Ci = {
5254
5246
  this.setWarningText(null);
5255
5247
  }
5256
5248
  };
5257
- I.func_entry_v1 = Ci;
5249
+ I.func_entry_v1 = ki;
5258
5250
  i.forBlock.func_entry_v1 = function(t) {
5259
5251
  const e = t, n = i.statementToCode(e, "HANDLE"), o = [];
5260
5252
  if (e.func.inputs)
@@ -5265,7 +5257,7 @@ i.forBlock.func_entry_v1 = function(t) {
5265
5257
  return `function __funcEntryV1__(${o.join(", ")}) {
5266
5258
  ${n}}`;
5267
5259
  };
5268
- const ki = {
5260
+ const Ni = {
5269
5261
  init: function() {
5270
5262
  this.output = {
5271
5263
  id: "",
@@ -5293,7 +5285,7 @@ const ki = {
5293
5285
  }, 0);
5294
5286
  },
5295
5287
  genOutputOpts_: function() {
5296
- return yi();
5288
+ return Oi();
5297
5289
  },
5298
5290
  onchange: function(t) {
5299
5291
  if (t.type === R.STATE_CHANGE)
@@ -5340,7 +5332,7 @@ const ki = {
5340
5332
  this.setWarningText(null);
5341
5333
  }
5342
5334
  };
5343
- I.set_func_output_v1 = ki;
5335
+ I.set_func_output_v1 = Ni;
5344
5336
  i.forBlock.set_func_output_v1 = function(t) {
5345
5337
  const e = i.quote_, n = t, { id: o, type: s } = n.output;
5346
5338
  let a = i.valueToCode(n, "VALUE", h.ATOMIC);
@@ -5458,13 +5450,13 @@ function Ze(t, e, n) {
5458
5450
  if (a)
5459
5451
  return a.columns.find((c) => c.id === n);
5460
5452
  }
5461
- function Ni(t, e) {
5453
+ function Si(t, e) {
5462
5454
  const n = [];
5463
5455
  return Ie(t, e).forEach(({ id: s, name: a }) => {
5464
5456
  n.push([a, s]);
5465
5457
  }), b(n);
5466
5458
  }
5467
- function Si(t) {
5459
+ function Li(t) {
5468
5460
  const e = t.getInput("TABLE").connection;
5469
5461
  if (e.targetBlock())
5470
5462
  return;
@@ -5498,7 +5490,7 @@ function Si(t) {
5498
5490
  }, c = Z.blocks.append(a, t.workspace);
5499
5491
  e.connect(c.outputConnection);
5500
5492
  }
5501
- function Li(t) {
5493
+ function Bi(t) {
5502
5494
  const e = t.getInput("HANDLE").connection;
5503
5495
  if (e.targetBlock())
5504
5496
  return;
@@ -5522,7 +5514,7 @@ function Li(t) {
5522
5514
  }, o = Z.blocks.append(n, t.workspace);
5523
5515
  e.connect(o.previousConnection);
5524
5516
  }
5525
- const Bi = {
5517
+ const bi = {
5526
5518
  init: function() {
5527
5519
  this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
5528
5520
  },
@@ -5538,14 +5530,14 @@ const Bi = {
5538
5530
  this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
5539
5531
  },
5540
5532
  ensureBlocks_: function() {
5541
- this.isInsertionMarker() || (Si(this), q(this, [
5533
+ this.isInsertionMarker() || (Li(this), q(this, [
5542
5534
  ["SUCCESS", "__success__", "x-runtime-lib.success", !0],
5543
5535
  ["MESSAGE", "__message__", "x-runtime-lib.message", !0],
5544
5536
  ["DATA", "__data__", "x-runtime-lib.data", !0]
5545
- ]), Li(this));
5537
+ ]), Bi(this));
5546
5538
  }
5547
5539
  };
5548
- I.add_data_v1 = Bi;
5540
+ I.add_data_v1 = bi;
5549
5541
  i.forBlock.add_data_v1 = function(t) {
5550
5542
  const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.statementToCode(t, "HANDLE");
5551
5543
  return `{
@@ -5561,7 +5553,7 @@ ${e}}
5561
5553
  ${o}}
5562
5554
  `;
5563
5555
  };
5564
- const bi = {
5556
+ const Pi = {
5565
5557
  init: function() {
5566
5558
  this.space = {
5567
5559
  id: "",
@@ -5630,7 +5622,7 @@ const bi = {
5630
5622
  return Ue(this.space.id);
5631
5623
  },
5632
5624
  genColumnOpts_: function() {
5633
- return Ni(this.space.id, this.table.id);
5625
+ return Si(this.space.id, this.table.id);
5634
5626
  },
5635
5627
  onchange: function(t) {
5636
5628
  if (t.type === R.STATE_CHANGE)
@@ -5726,7 +5718,7 @@ const bi = {
5726
5718
  this.setWarningText(null);
5727
5719
  }
5728
5720
  };
5729
- I.cond_atomic_v1 = bi;
5721
+ I.cond_atomic_v1 = Pi;
5730
5722
  i.forBlock.cond_atomic_v1 = function(t) {
5731
5723
  const e = i.quote_, n = t, o = n.column.name, s = i.valueToCode(n, "VALUE", h.ATOMIC) || null, c = {
5732
5724
  EQ: "=",
@@ -5738,19 +5730,19 @@ i.forBlock.cond_atomic_v1 = function(t) {
5738
5730
  }[n.getFieldValue("OP")];
5739
5731
  return [`{type:'ATOMIC',key:${e(o)},value:${s},operator:${e(c)}}`, h.ATOMIC];
5740
5732
  };
5741
- const Pi = {
5733
+ const Ri = {
5742
5734
  init: function() {
5743
5735
  this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
5744
5736
  }
5745
5737
  };
5746
- I.cond_logic_container_v1 = Pi;
5747
- const Ri = {
5738
+ I.cond_logic_container_v1 = Ri;
5739
+ const Di = {
5748
5740
  init: function() {
5749
5741
  this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
5750
5742
  }
5751
5743
  };
5752
- I.cond_logic_item_v1 = Ri;
5753
- const Di = {
5744
+ I.cond_logic_item_v1 = Di;
5745
+ const Mi = {
5754
5746
  init: function() {
5755
5747
  this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
5756
5748
  new O([
@@ -5824,7 +5816,7 @@ const Di = {
5824
5816
  this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
5825
5817
  }
5826
5818
  };
5827
- I.cond_logic_v1 = Di;
5819
+ I.cond_logic_v1 = Mi;
5828
5820
  i.forBlock.cond_logic_v1 = function(t) {
5829
5821
  const e = i.quote_, n = t, o = n.getFieldValue("TYPE"), s = [], a = i.valueToCode(n, "VALUE", h.ATOMIC) || null;
5830
5822
  s.push(a);
@@ -5834,7 +5826,7 @@ i.forBlock.cond_logic_v1 = function(t) {
5834
5826
  }
5835
5827
  return [`{type:${e(o)},entries:[${s}]}`, h.ATOMIC];
5836
5828
  };
5837
- function Mi(t) {
5829
+ function Ui(t) {
5838
5830
  const e = t.getInput("TABLE").connection;
5839
5831
  if (e.targetBlock())
5840
5832
  return;
@@ -5853,7 +5845,7 @@ function Mi(t) {
5853
5845
  }, a = Z.blocks.append(s, t.workspace);
5854
5846
  e.connect(a.outputConnection);
5855
5847
  }
5856
- function Ui(t) {
5848
+ function Vi(t) {
5857
5849
  const e = t.getInput("CONDITION").connection;
5858
5850
  if (e.targetBlock())
5859
5851
  return;
@@ -5878,7 +5870,7 @@ function Ui(t) {
5878
5870
  }, c = Z.blocks.append(a, t.workspace);
5879
5871
  e.connect(c.outputConnection);
5880
5872
  }
5881
- function Vi(t) {
5873
+ function xi(t) {
5882
5874
  const e = t.getInput("HANDLE").connection;
5883
5875
  if (e.targetBlock())
5884
5876
  return;
@@ -5902,7 +5894,7 @@ function Vi(t) {
5902
5894
  }, o = Z.blocks.append(n, t.workspace);
5903
5895
  e.connect(o.previousConnection);
5904
5896
  }
5905
- const xi = {
5897
+ const wi = {
5906
5898
  init: function() {
5907
5899
  this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
5908
5900
  },
@@ -5918,13 +5910,13 @@ const xi = {
5918
5910
  this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
5919
5911
  },
5920
5912
  ensureBlocks_: function() {
5921
- this.isInsertionMarker() || (Mi(this), Ui(this), q(this, [
5913
+ this.isInsertionMarker() || (Ui(this), Vi(this), q(this, [
5922
5914
  ["SUCCESS", "__success__", "x-runtime-lib.success", !0],
5923
5915
  ["MESSAGE", "__message__", "x-runtime-lib.message", !0]
5924
- ]), Vi(this));
5916
+ ]), xi(this));
5925
5917
  }
5926
5918
  };
5927
- I.delete_data_v1 = xi;
5919
+ I.delete_data_v1 = wi;
5928
5920
  i.forBlock.delete_data_v1 = function(t) {
5929
5921
  const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
5930
5922
  return `{
@@ -5962,7 +5954,7 @@ i.forBlock.interrupt_transaction_v1 = function(t) {
5962
5954
  return `throw ${i.valueToCode(t, "VALUE", h.NONE) || "''"};
5963
5955
  `;
5964
5956
  };
5965
- function wi(t) {
5957
+ function Fi(t) {
5966
5958
  const e = t.getInput("TABLE").connection;
5967
5959
  if (e.targetBlock())
5968
5960
  return;
@@ -5996,7 +5988,7 @@ function wi(t) {
5996
5988
  }, c = Z.blocks.append(a, t.workspace);
5997
5989
  e.connect(c.outputConnection);
5998
5990
  }
5999
- function Fi(t) {
5991
+ function Yi(t) {
6000
5992
  const e = t.getInput("CONDITION").connection;
6001
5993
  if (e.targetBlock())
6002
5994
  return;
@@ -6005,7 +5997,7 @@ function Fi(t) {
6005
5997
  }, o = Z.blocks.append(n, t.workspace);
6006
5998
  e.connect(o.outputConnection);
6007
5999
  }
6008
- function Yi(t) {
6000
+ function Ki(t) {
6009
6001
  const e = t.getInput("EXTRA").connection;
6010
6002
  if (e.targetBlock())
6011
6003
  return;
@@ -6042,7 +6034,7 @@ function Yi(t) {
6042
6034
  }, o = Z.blocks.append(n, t.workspace);
6043
6035
  e.connect(o.outputConnection);
6044
6036
  }
6045
- function Ki(t) {
6037
+ function $i(t) {
6046
6038
  const e = t.getInput("HANDLE").connection;
6047
6039
  if (e.targetBlock())
6048
6040
  return;
@@ -6080,7 +6072,7 @@ g([
6080
6072
  style: "procedure_blocks"
6081
6073
  }
6082
6074
  ]);
6083
- const $i = {
6075
+ const Hi = {
6084
6076
  init: function() {
6085
6077
  this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
6086
6078
  },
@@ -6096,15 +6088,15 @@ const $i = {
6096
6088
  this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
6097
6089
  },
6098
6090
  ensureBlocks_: function() {
6099
- this.isInsertionMarker() || (wi(this), Fi(this), Yi(this), q(this, [
6091
+ this.isInsertionMarker() || (Fi(this), Yi(this), Ki(this), q(this, [
6100
6092
  ["SUCCESS", "__success__", "x-runtime-lib.success", !0],
6101
6093
  ["MESSAGE", "__message__", "x-runtime-lib.message", !0],
6102
6094
  ["MAIN_DATA", "__mainData__", "x-runtime-lib.mainData", !0],
6103
6095
  ["EXTRA_DATA", "__extraData__", "x-runtime-lib.extraData", !0]
6104
- ]), Ki(this));
6096
+ ]), $i(this));
6105
6097
  }
6106
6098
  };
6107
- I.query_data_v1 = $i;
6099
+ I.query_data_v1 = Hi;
6108
6100
  i.forBlock.query_data_v1 = function(t) {
6109
6101
  const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.valueToCode(t, "EXTRA", h.ATOMIC) || "null", a = i.statementToCode(t, "HANDLE");
6110
6102
  return `{
@@ -6177,19 +6169,19 @@ i.forBlock.query_extra_sortby_v1 = function(t) {
6177
6169
  const e = i.valueToCode(t, "COLUMN", h.ATOMIC) || "''", n = i.valueToCode(t, "DESC", h.ATOMIC) || !1;
6178
6170
  return [`{type:'sortby',value:${e},value2:${n}}`, h.ATOMIC];
6179
6171
  };
6180
- const Hi = {
6172
+ const Gi = {
6181
6173
  init: function() {
6182
6174
  this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
6183
6175
  }
6184
6176
  };
6185
- I.select_column_container_v1 = Hi;
6186
- const Gi = {
6177
+ I.select_column_container_v1 = Gi;
6178
+ const Wi = {
6187
6179
  init: function() {
6188
6180
  this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
6189
6181
  }
6190
6182
  };
6191
- I.select_column_item_v1 = Gi;
6192
- const Wi = {
6183
+ I.select_column_item_v1 = Wi;
6184
+ const ji = {
6193
6185
  init: function() {
6194
6186
  this.space = {
6195
6187
  id: "",
@@ -6398,7 +6390,7 @@ const Wi = {
6398
6390
  this.setWarningText(null);
6399
6391
  }
6400
6392
  };
6401
- I.select_column_v1 = Wi;
6393
+ I.select_column_v1 = ji;
6402
6394
  i.forBlock.select_column_v1 = function(t) {
6403
6395
  const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
6404
6396
  for (let p = 0; p < n.itemCount_; p++) {
@@ -6410,7 +6402,7 @@ i.forBlock.select_column_v1 = function(t) {
6410
6402
  r !== 0 && (c += ","), c += `{name:${e(p)},alias:${e(_)}}`;
6411
6403
  }), c += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${c}}`, h.ATOMIC];
6412
6404
  };
6413
- const ji = {
6405
+ const Xi = {
6414
6406
  init: function() {
6415
6407
  this.space = {
6416
6408
  id: "",
@@ -6502,12 +6494,12 @@ const ji = {
6502
6494
  e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
6503
6495
  }
6504
6496
  };
6505
- I.select_table_v1 = ji;
6497
+ I.select_table_v1 = Xi;
6506
6498
  i.forBlock.select_table_v1 = function(t) {
6507
6499
  const e = i.quote_, n = t, o = n.space.id, s = n.table.id;
6508
6500
  return [`{spaceId:${e(o)},tableId:${e(s)}}`, h.ATOMIC];
6509
6501
  };
6510
- const Xi = {
6502
+ const Ji = {
6511
6503
  init: function() {
6512
6504
  this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
6513
6505
  },
@@ -6529,9 +6521,9 @@ const Xi = {
6529
6521
  ]);
6530
6522
  }
6531
6523
  };
6532
- I.transaction_v1 = Xi;
6524
+ I.transaction_v1 = Ji;
6533
6525
  i.forBlock.transaction_v1 = function(t) {
6534
- const e = i.INDENT, n = t, o = vs(n), s = i.statementToCode(n, "HANDLE"), a = i.statementToCode(n, "FINALLY");
6526
+ const e = i.INDENT, n = t, o = Cs(n), s = i.statementToCode(n, "HANDLE"), a = i.statementToCode(n, "FINALLY");
6535
6527
  return `{
6536
6528
  ${e}var __error${o}__ = '';
6537
6529
  ${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
@@ -6573,19 +6565,19 @@ ${e}}
6573
6565
  }
6574
6566
  `;
6575
6567
  };
6576
- const Ji = {
6568
+ const qi = {
6577
6569
  init: function() {
6578
6570
  this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
6579
6571
  }
6580
6572
  };
6581
- I.update_column_container_v1 = Ji;
6582
- const qi = {
6573
+ I.update_column_container_v1 = qi;
6574
+ const Qi = {
6583
6575
  init: function() {
6584
6576
  this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
6585
6577
  }
6586
6578
  };
6587
- I.update_column_item_v1 = qi;
6588
- const Qi = {
6579
+ I.update_column_item_v1 = Qi;
6580
+ const zi = {
6589
6581
  init: function() {
6590
6582
  this.space = {
6591
6583
  id: "",
@@ -6829,7 +6821,7 @@ const Qi = {
6829
6821
  this.setWarningText(null);
6830
6822
  }
6831
6823
  };
6832
- I.update_column_v1 = Qi;
6824
+ I.update_column_v1 = zi;
6833
6825
  i.forBlock.update_column_v1 = function(t) {
6834
6826
  const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
6835
6827
  for (let p = 0; p < n.itemCount_; p++) {
@@ -6841,7 +6833,7 @@ i.forBlock.update_column_v1 = function(t) {
6841
6833
  r !== 0 && (c += ","), c += `{name:${e(p)},value:${_}}`;
6842
6834
  }), c += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${c}}`, h.ATOMIC];
6843
6835
  };
6844
- function zi(t) {
6836
+ function Zi(t) {
6845
6837
  const e = t.getInput("TABLE").connection;
6846
6838
  if (e.targetBlock())
6847
6839
  return;
@@ -6875,7 +6867,7 @@ function zi(t) {
6875
6867
  }, c = Z.blocks.append(a, t.workspace);
6876
6868
  e.connect(c.outputConnection);
6877
6869
  }
6878
- function Zi(t) {
6870
+ function ta(t) {
6879
6871
  const e = t.getInput("CONDITION").connection;
6880
6872
  if (e.targetBlock())
6881
6873
  return;
@@ -6884,7 +6876,7 @@ function Zi(t) {
6884
6876
  }, o = Z.blocks.append(n, t.workspace);
6885
6877
  e.connect(o.outputConnection);
6886
6878
  }
6887
- function ta(t) {
6879
+ function ea(t) {
6888
6880
  const e = t.getInput("HANDLE").connection;
6889
6881
  if (e.targetBlock())
6890
6882
  return;
@@ -6908,7 +6900,7 @@ function ta(t) {
6908
6900
  }, o = Z.blocks.append(n, t.workspace);
6909
6901
  e.connect(o.previousConnection);
6910
6902
  }
6911
- const ea = {
6903
+ const na = {
6912
6904
  init: function() {
6913
6905
  this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
6914
6906
  },
@@ -6924,14 +6916,14 @@ const ea = {
6924
6916
  this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
6925
6917
  },
6926
6918
  ensureBlocks: function() {
6927
- this.isInsertionMarker() || (zi(this), Zi(this), q(this, [
6919
+ this.isInsertionMarker() || (Zi(this), ta(this), q(this, [
6928
6920
  ["SUCCESS", "__success__", "x-runtime-lib.success", !0],
6929
6921
  ["MESSAGE", "__message__", "x-runtime-lib.message", !0],
6930
6922
  ["DATA", "__data__", "x-runtime-lib.data", !0]
6931
- ]), ta(this));
6923
+ ]), ea(this));
6932
6924
  }
6933
6925
  };
6934
- I.update_data_v1 = ea;
6926
+ I.update_data_v1 = na;
6935
6927
  i.forBlock.update_data_v1 = function(t) {
6936
6928
  const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
6937
6929
  return `{
@@ -6948,7 +6940,7 @@ ${e}}
6948
6940
  ${s}}
6949
6941
  `;
6950
6942
  };
6951
- const na = L.xml, oa = {
6943
+ const oa = L.xml, sa = {
6952
6944
  init: function() {
6953
6945
  this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
6954
6946
  new pt(Ft, 20, 20, void 0, () => {
@@ -6957,7 +6949,7 @@ const na = L.xml, oa = {
6957
6949
  ), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
6958
6950
  },
6959
6951
  mutationToDom: function() {
6960
- const t = na.createElement("mutation");
6952
+ const t = oa.createElement("mutation");
6961
6953
  return t.setAttribute("items", String(this.length)), t;
6962
6954
  },
6963
6955
  domToMutation: function(t) {
@@ -7009,8 +7001,8 @@ const na = L.xml, oa = {
7009
7001
  this.length--;
7010
7002
  }
7011
7003
  };
7012
- I.json_array_v1 = oa;
7013
- const sa = {
7004
+ I.json_array_v1 = sa;
7005
+ const ia = {
7014
7006
  init: function() {
7015
7007
  this.appendDummyInput().appendField(
7016
7008
  new O([
@@ -7021,8 +7013,8 @@ const sa = {
7021
7013
  ), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
7022
7014
  }
7023
7015
  };
7024
- I.json_boolean_v1 = sa;
7025
- const wn = L.xml, ia = {
7016
+ I.json_boolean_v1 = ia;
7017
+ const wn = L.xml, aa = {
7026
7018
  init: function() {
7027
7019
  this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
7028
7020
  new pt(Ft, 20, 20, void 0, () => {
@@ -7088,38 +7080,38 @@ const wn = L.xml, ia = {
7088
7080
  this.length--;
7089
7081
  }
7090
7082
  };
7091
- I.json_map_v1 = ia;
7092
- const aa = {
7083
+ I.json_map_v1 = aa;
7084
+ const ca = {
7093
7085
  init: function() {
7094
7086
  this.appendDummyInput().appendField(new en(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
7095
7087
  }
7096
7088
  };
7097
- I.json_number_v1 = aa;
7098
- const ca = {
7089
+ I.json_number_v1 = ca;
7090
+ const ra = {
7099
7091
  init: function() {
7100
7092
  this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
7101
7093
  }
7102
7094
  };
7103
- I.json_root_v1 = ca;
7104
- const ra = {
7095
+ I.json_root_v1 = ra;
7096
+ const la = {
7105
7097
  init: function() {
7106
7098
  this.appendDummyInput().appendField('"').appendField(new vt(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
7107
7099
  }
7108
7100
  };
7109
- I.json_string_v1 = ra;
7110
- const la = L.xml, ua = {
7101
+ I.json_string_v1 = la;
7102
+ const ua = L.xml, pa = {
7111
7103
  init: function() {
7112
7104
  this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
7113
7105
  }
7114
7106
  };
7115
- I.list_create_container_v1 = ua;
7116
- const pa = {
7107
+ I.list_create_container_v1 = pa;
7108
+ const _a = {
7117
7109
  init: function() {
7118
7110
  this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
7119
7111
  }
7120
7112
  };
7121
- I.list_create_item_v1 = pa;
7122
- const _a = {
7113
+ I.list_create_item_v1 = _a;
7114
+ const da = {
7123
7115
  init: function() {
7124
7116
  this.itemCount_ = 0, this.setMutator(
7125
7117
  new kt.MutatorIcon(
@@ -7129,7 +7121,7 @@ const _a = {
7129
7121
  ), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
7130
7122
  },
7131
7123
  mutationToDom: function() {
7132
- const t = la.createElement("mutation");
7124
+ const t = ua.createElement("mutation");
7133
7125
  return t.setAttribute("items", String(this.itemCount_)), t;
7134
7126
  },
7135
7127
  domToMutation: function(t) {
@@ -7201,7 +7193,7 @@ const _a = {
7201
7193
  this.removeInput("ADD" + t);
7202
7194
  }
7203
7195
  };
7204
- I.list_create_v1 = _a;
7196
+ I.list_create_v1 = da;
7205
7197
  i.forBlock.list_create_v1 = function(t) {
7206
7198
  const e = t, n = new Array(e.itemCount_);
7207
7199
  for (let s = 0; s < e.itemCount_; s++)
@@ -7417,7 +7409,7 @@ i.forBlock.list_set_v1 = function(t) {
7417
7409
  return `${e}[${n}] = ${o};
7418
7410
  `;
7419
7411
  };
7420
- const da = {
7412
+ const ha = {
7421
7413
  // logic_compare
7422
7414
  EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
7423
7415
  NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
@@ -7431,7 +7423,7 @@ const da = {
7431
7423
  };
7432
7424
  x.register(
7433
7425
  "logic_op_tooltip_v1",
7434
- x.buildTooltipForDropdown("OP", da)
7426
+ x.buildTooltipForDropdown("OP", ha)
7435
7427
  );
7436
7428
  g([
7437
7429
  {
@@ -7456,7 +7448,7 @@ g([
7456
7448
  i.forBlock.logic_boolean_v1 = function(t) {
7457
7449
  return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", h.ATOMIC];
7458
7450
  };
7459
- const ha = {
7451
+ const fa = {
7460
7452
  onchange: function(t) {
7461
7453
  this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
7462
7454
  const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
@@ -7476,7 +7468,7 @@ const ha = {
7476
7468
  x.register(
7477
7469
  "logic_compare_v1",
7478
7470
  function() {
7479
- this.mixin(ha);
7471
+ this.mixin(fa);
7480
7472
  }
7481
7473
  );
7482
7474
  g([
@@ -7526,7 +7518,7 @@ i.forBlock.logic_compare_v1 = function(t) {
7526
7518
  const s = i.valueToCode(t, "A", o) || "0", a = i.valueToCode(t, "B", o) || "0";
7527
7519
  return [`${s} ${n} ${a}`, o];
7528
7520
  };
7529
- const fa = {
7521
+ const ma = {
7530
7522
  elseIfCount_: 0,
7531
7523
  hasElse_: !1,
7532
7524
  mutationToDom: function() {
@@ -7653,7 +7645,7 @@ const fa = {
7653
7645
  };
7654
7646
  x.registerMutator(
7655
7647
  "logic_if_v1_mutator",
7656
- fa,
7648
+ ma,
7657
7649
  void 0,
7658
7650
  ["logic_if_else_if_v1", "logic_if_else_v1"]
7659
7651
  );
@@ -7799,7 +7791,7 @@ i.forBlock.logic_operation_v1 = function(t) {
7799
7791
  }
7800
7792
  return [`${o} ${e} ${s}`, n];
7801
7793
  };
7802
- const ma = {
7794
+ const Ta = {
7803
7795
  prevParentConnection_: null,
7804
7796
  onchange: function(t) {
7805
7797
  const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
@@ -7814,7 +7806,7 @@ const ma = {
7814
7806
  this.prevParentConnection_ = o;
7815
7807
  }
7816
7808
  };
7817
- x.registerMixin("logic_ternary_v1", ma);
7809
+ x.registerMixin("logic_ternary_v1", Ta);
7818
7810
  g([
7819
7811
  {
7820
7812
  type: "logic_ternary_v1",
@@ -7851,7 +7843,7 @@ i.forBlock.logic_ternary_v1 = function(t) {
7851
7843
  const e = i.valueToCode(t, "IF", h.CONDITIONAL) || "false", n = i.valueToCode(t, "THEN", h.CONDITIONAL) || "null", o = i.valueToCode(t, "ELSE", h.CONDITIONAL) || "null";
7852
7844
  return [e + " ? " + n + " : " + o, h.CONDITIONAL];
7853
7845
  };
7854
- const Ta = {
7846
+ const Ea = {
7855
7847
  customContextMenu: function(t) {
7856
7848
  if (this.isInFlyout)
7857
7849
  return;
@@ -7873,7 +7865,7 @@ const Ta = {
7873
7865
  };
7874
7866
  x.registerMixin(
7875
7867
  "contextMenu_newGetVariableBlock_v1",
7876
- Ta
7868
+ Ea
7877
7869
  );
7878
7870
  x.register(
7879
7871
  "flow_control_tooltip_v1",
@@ -7882,16 +7874,16 @@ x.register(
7882
7874
  CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
7883
7875
  })
7884
7876
  );
7885
- const Ea = /* @__PURE__ */ new Set([
7877
+ const ga = /* @__PURE__ */ new Set([
7886
7878
  "repeat_v1",
7887
7879
  "for_each_v1",
7888
7880
  "for_v1",
7889
7881
  "while_until_v1"
7890
- ]), ga = {
7882
+ ]), Aa = {
7891
7883
  getSurroundLoop: function() {
7892
7884
  let t = this;
7893
7885
  do {
7894
- if (Ea.has(t.type))
7886
+ if (ga.has(t.type))
7895
7887
  return t;
7896
7888
  t = t?.getSurroundParent();
7897
7889
  } while (t);
@@ -7912,7 +7904,7 @@ const Ea = /* @__PURE__ */ new Set([
7912
7904
  };
7913
7905
  x.registerMixin(
7914
7906
  "flow_control_in_loop_check_v1",
7915
- ga
7907
+ Aa
7916
7908
  );
7917
7909
  g([
7918
7910
  {
@@ -8214,7 +8206,7 @@ i.forBlock.while_until_v1 = function(t) {
8214
8206
  ${o}}
8215
8207
  `;
8216
8208
  };
8217
- const Aa = {
8209
+ const Ia = {
8218
8210
  // math_arithmetic
8219
8211
  ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
8220
8212
  SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
@@ -8248,7 +8240,7 @@ const Aa = {
8248
8240
  };
8249
8241
  x.register(
8250
8242
  "math_op_tooltip_v1",
8251
- x.buildTooltipForDropdown("OP", Aa)
8243
+ x.buildTooltipForDropdown("OP", Ia)
8252
8244
  );
8253
8245
  g([
8254
8246
  {
@@ -8848,21 +8840,21 @@ i.forBlock.math_trig_v1 = function(t) {
8848
8840
  }
8849
8841
  return [o, h.DIVISION];
8850
8842
  };
8851
- const Ia = L.xml, ya = {
8843
+ const ya = L.xml, Oa = {
8852
8844
  init: function() {
8853
8845
  this.appendDummyInput().appendField(
8854
8846
  "%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
8855
8847
  ), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
8856
8848
  }
8857
8849
  };
8858
- I.object_create_container_v1 = ya;
8859
- const Oa = {
8850
+ I.object_create_container_v1 = Oa;
8851
+ const va = {
8860
8852
  init: function() {
8861
8853
  this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
8862
8854
  }
8863
8855
  };
8864
- I.object_create_item_v1 = Oa;
8865
- const va = {
8856
+ I.object_create_item_v1 = va;
8857
+ const Ca = {
8866
8858
  init: function() {
8867
8859
  this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
8868
8860
  new kt.MutatorIcon(
@@ -8872,7 +8864,7 @@ const va = {
8872
8864
  ), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
8873
8865
  },
8874
8866
  mutationToDom: function() {
8875
- const t = Ia.createElement("mutation");
8867
+ const t = ya.createElement("mutation");
8876
8868
  return t.setAttribute("items", String(this.itemCount_)), t;
8877
8869
  },
8878
8870
  domToMutation: function(t) {
@@ -8936,7 +8928,7 @@ const va = {
8936
8928
  this.removeInput("ADD" + t);
8937
8929
  }
8938
8930
  };
8939
- I.object_create_v1 = va;
8931
+ I.object_create_v1 = Ca;
8940
8932
  i.forBlock.object_create_v1 = function(t) {
8941
8933
  const e = t;
8942
8934
  let n = "{";
@@ -9178,13 +9170,13 @@ g([
9178
9170
  i.forBlock.object_to_json_v1 = function(t) {
9179
9171
  return [`__jsonStringifyV1__(${i.valueToCode(t, "OBJECT", h.NONE) || "null"})`, h.FUNCTION_CALL];
9180
9172
  };
9181
- const Fn = L.xml, Ca = {
9173
+ const Fn = L.xml, ka = {
9182
9174
  init: function() {
9183
9175
  this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new $o(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
9184
9176
  }
9185
9177
  };
9186
- I.procedure_def_container_v1 = Ca;
9187
- const ka = {
9178
+ I.procedure_def_container_v1 = ka;
9179
+ const Na = {
9188
9180
  init: function() {
9189
9181
  const t = new vt(nn.DEFAULT_ARG);
9190
9182
  t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
@@ -9206,8 +9198,8 @@ const ka = {
9206
9198
  return t;
9207
9199
  }
9208
9200
  };
9209
- I.procedure_def_item_v1 = ka;
9210
- const Na = {
9201
+ I.procedure_def_item_v1 = Na;
9202
+ const Sa = {
9211
9203
  init: function() {
9212
9204
  this.withReturn = !1, this.args = [];
9213
9205
  const t = new vt(
@@ -9311,13 +9303,13 @@ const Na = {
9311
9303
  }
9312
9304
  }
9313
9305
  };
9314
- I.procedure_def_v1 = Na;
9315
- const Sa = L.xml, La = {
9306
+ I.procedure_def_v1 = Sa;
9307
+ const La = L.xml, Ba = {
9316
9308
  init: function() {
9317
9309
  this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
9318
9310
  },
9319
9311
  mutationToDom: function() {
9320
- const t = Sa.createElement("mutation");
9312
+ const t = La.createElement("mutation");
9321
9313
  return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
9322
9314
  },
9323
9315
  domToMutation: function(t) {
@@ -9368,14 +9360,14 @@ const Sa = L.xml, La = {
9368
9360
  t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
9369
9361
  }
9370
9362
  };
9371
- I.procedure_return_v1 = La;
9363
+ I.procedure_return_v1 = Ba;
9372
9364
  i.forBlock.procedure_return_v1 = function(t) {
9373
9365
  const e = t;
9374
9366
  return e.withReturn ? `return ${i.valueToCode(e, "VALUE", h.NONE) || "null"};
9375
9367
  ` : `return;
9376
9368
  `;
9377
9369
  };
9378
- const Ba = {
9370
+ const ba = {
9379
9371
  init: function() {
9380
9372
  this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
9381
9373
  },
@@ -9398,7 +9390,7 @@ const Ba = {
9398
9390
  ]);
9399
9391
  }
9400
9392
  };
9401
- I.download_resource_v1 = Ba;
9393
+ I.download_resource_v1 = ba;
9402
9394
  i.forBlock.download_resource_v1 = function(t) {
9403
9395
  const e = i.valueToCode(t, "ASSET", h.ATOMIC) || null, n = i.statementToCode(t, "HANDLE");
9404
9396
  return `{
@@ -9426,7 +9418,7 @@ function Io(t) {
9426
9418
  }
9427
9419
  return o(e.dirTree, ""), n;
9428
9420
  }
9429
- function ba(t) {
9421
+ function Pa(t) {
9430
9422
  const e = [];
9431
9423
  return Io(t).forEach(({ id: o, name: s }) => {
9432
9424
  e.push([s, o]);
@@ -9441,7 +9433,7 @@ function yo(t, e) {
9441
9433
  s.dirid === e && o.push(s);
9442
9434
  }), o;
9443
9435
  }
9444
- function Pa(t, e) {
9436
+ function Ra(t, e) {
9445
9437
  const n = [];
9446
9438
  return yo(t, e).forEach(({ id: s, name: a }) => {
9447
9439
  n.push([a, s]);
@@ -9453,13 +9445,13 @@ function Oo() {
9453
9445
  e.resources.length > 0 && t.push(e);
9454
9446
  }), t;
9455
9447
  }
9456
- function Ra() {
9448
+ function Da() {
9457
9449
  const t = [];
9458
9450
  return Oo().forEach(({ id: n, name: o }) => {
9459
9451
  t.push([o, n]);
9460
9452
  }), b(t);
9461
9453
  }
9462
- const Da = {
9454
+ const Ma = {
9463
9455
  init: function() {
9464
9456
  this.space = {
9465
9457
  id: "",
@@ -9511,20 +9503,20 @@ const Da = {
9511
9503
  this.space = We(t.space), this.dir = We(t.dir), this.resource = We(t.resource);
9512
9504
  },
9513
9505
  genSpaceOpts_: function() {
9514
- return Ra();
9506
+ return Da();
9515
9507
  },
9516
9508
  genDirOpts_: function() {
9517
- return ba(this.space.id);
9509
+ return Pa(this.space.id);
9518
9510
  },
9519
9511
  genResourceOpts_: function() {
9520
- return Pa(this.space.id, this.dir.id);
9512
+ return Ra(this.space.id, this.dir.id);
9521
9513
  }
9522
9514
  };
9523
- I.select_resource_v1 = Da;
9515
+ I.select_resource_v1 = Ma;
9524
9516
  i.forBlock.select_resource_v1 = function() {
9525
9517
  return "";
9526
9518
  };
9527
- const Ma = {
9519
+ const Ua = {
9528
9520
  init: function() {
9529
9521
  this.appendDummyInput().appendField(
9530
9522
  "%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
@@ -9555,7 +9547,7 @@ const Ma = {
9555
9547
  ]);
9556
9548
  }
9557
9549
  };
9558
- I.upload_resource_v1 = Ma;
9550
+ I.upload_resource_v1 = Ua;
9559
9551
  i.forBlock.upload_resource_v1 = function(t) {
9560
9552
  const e = i.valueToCode(t, "NAME", h.ATOMIC) || "''", n = i.valueToCode(t, "DIR", h.ATOMIC) || "null", o = i.valueToCode(t, "DATA", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
9561
9553
  return `{
@@ -9588,9 +9580,9 @@ g([
9588
9580
  i.forBlock.text_v1 = function(t) {
9589
9581
  return [i.quote_(t.getFieldValue("TEXT")), h.ATOMIC];
9590
9582
  };
9591
- const Ua = /^\s*'([^']|\\')*'\s*$/;
9583
+ const Va = /^\s*'([^']|\\')*'\s*$/;
9592
9584
  function _e(t) {
9593
- return Ua.test(t) ? [t, h.ATOMIC] : [`String(${t})`, h.FUNCTION_CALL];
9585
+ return Va.test(t) ? [t, h.ATOMIC] : [`String(${t})`, h.FUNCTION_CALL];
9594
9586
  }
9595
9587
  x.register(
9596
9588
  "text_append_tooltip_v1",
@@ -9794,10 +9786,10 @@ g([
9794
9786
  i.forBlock.text_is_empty_v1 = function(t) {
9795
9787
  return [`!${i.valueToCode(t, "VALUE", h.MEMBER) || "''"}.length`, h.LOGICAL_NOT];
9796
9788
  };
9797
- const Va = L.xml, xa = {
9789
+ const xa = L.xml, wa = {
9798
9790
  itemCount_: 0,
9799
9791
  mutationToDom: function() {
9800
- const t = Va.createElement("mutation");
9792
+ const t = xa.createElement("mutation");
9801
9793
  return t.setAttribute("items", `${this.itemCount_}`), t;
9802
9794
  },
9803
9795
  domToMutation: function(t) {
@@ -9868,13 +9860,13 @@ const Va = L.xml, xa = {
9868
9860
  for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
9869
9861
  this.removeInput("ADD" + t);
9870
9862
  }
9871
- }, wa = function() {
9863
+ }, Fa = function() {
9872
9864
  this.itemCount_ = 2, this.updateShape_(), this.setMutator(new kt.MutatorIcon(["text_join_item_v1"], this));
9873
9865
  };
9874
9866
  x.registerMutator(
9875
9867
  "text_join_mutator_v1",
9876
- xa,
9877
- wa
9868
+ wa,
9869
+ Fa
9878
9870
  );
9879
9871
  g([
9880
9872
  {
@@ -10106,7 +10098,7 @@ i.forBlock.text_trim_v1 = function(t) {
10106
10098
  }[t.getFieldValue("MODE")];
10107
10099
  return [`__trimV1__(${e}, ${o})`, h.ATOMIC];
10108
10100
  };
10109
- const Fa = {
10101
+ const Ya = {
10110
10102
  init: function() {
10111
10103
  this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
10112
10104
  },
@@ -10132,7 +10124,7 @@ const Fa = {
10132
10124
  this.getInput("IMMEDIATE")?.setShadowDom(o);
10133
10125
  }
10134
10126
  };
10135
- I.create_timer_v1 = Fa;
10127
+ I.create_timer_v1 = Ya;
10136
10128
  i.forBlock.create_timer_v1 = function(t) {
10137
10129
  const e = i.valueToCode(t, "INTERVAL", h.ATOMIC) || "1000", n = i.valueToCode(t, "LOOP", h.ATOMIC) || "false", o = i.valueToCode(t, "COUNT", h.ATOMIC) || "1", s = i.valueToCode(t, "IMMEDIATE", h.ATOMIC) || "false", a = i.statementToCode(t, "CALLBACK");
10138
10130
  return `__createTimerV1__(${e}, ${n}, ${o}, ${s}, async function() {
@@ -10161,18 +10153,18 @@ i.forBlock.delay_v1 = function(t) {
10161
10153
  return `await __delayV1__(${i.valueToCode(t, "DURATION", h.ATOMIC) || "0"});
10162
10154
  `;
10163
10155
  };
10164
- const Ya = {
10156
+ const Ka = {
10165
10157
  customContextMenu: function(t) {
10166
10158
  if (this.isInFlyout) {
10167
10159
  if (this.type === "variable_get_v1") {
10168
10160
  const e = {
10169
10161
  text: E("RENAME_VARIABLE"),
10170
10162
  enabled: !0,
10171
- callback: Ka(this)
10163
+ callback: $a(this)
10172
10164
  }, n = this.getField("VAR").getText(), o = {
10173
10165
  text: E("DELETE_VARIABLE").replace("%1", n),
10174
10166
  enabled: !0,
10175
- callback: $a(this)
10167
+ callback: Ha(this)
10176
10168
  };
10177
10169
  t.unshift(e), t.unshift(o);
10178
10170
  }
@@ -10190,12 +10182,12 @@ const Ya = {
10190
10182
  });
10191
10183
  }
10192
10184
  }
10193
- }, Ka = function(t) {
10185
+ }, $a = function(t) {
10194
10186
  return function() {
10195
10187
  const e = t.workspace, o = t.getField("VAR").getVariable();
10196
10188
  xt.renameVariable(e, o);
10197
10189
  };
10198
- }, $a = function(t) {
10190
+ }, Ha = function(t) {
10199
10191
  return function() {
10200
10192
  const n = t.getField("VAR").getVariable();
10201
10193
  n && xt.deleteVariable(n.getWorkspace(), n, t);
@@ -10203,7 +10195,7 @@ const Ya = {
10203
10195
  };
10204
10196
  x.registerMixin(
10205
10197
  "context_menu_variable_v1",
10206
- Ya
10198
+ Ka
10207
10199
  );
10208
10200
  g([
10209
10201
  {
@@ -10277,14 +10269,14 @@ const ce = O.prototype;
10277
10269
  ce.doClassValidation_ = function(t) {
10278
10270
  return t;
10279
10271
  };
10280
- const Ha = ce.doValueUpdate_;
10272
+ const Ga = ce.doValueUpdate_;
10281
10273
  ce.doValueUpdate_ = function(t) {
10282
- Ha.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
10274
+ Ga.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
10283
10275
  };
10284
- const Ga = ce.getText_;
10276
+ const Wa = ce.getText_;
10285
10277
  ce.getText_ = function() {
10286
10278
  if (this.selectedOption)
10287
- return Ga.call(this);
10279
+ return Wa.call(this);
10288
10280
  const { i18n: t } = Nt, e = this.getSourceBlock();
10289
10281
  if (this.name === "APP")
10290
10282
  return e.app.name;
@@ -10353,7 +10345,7 @@ function vo(t) {
10353
10345
  const e = t.getParent();
10354
10346
  return e && vo(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
10355
10347
  }
10356
- class Wa {
10348
+ class ja {
10357
10349
  init() {
10358
10350
  const e = Go.registry.getItem("blockDisable");
10359
10351
  e && (e.preconditionFn = function(n) {
@@ -10364,10 +10356,10 @@ class Wa {
10364
10356
  }
10365
10357
  Wo.registerFieldColour();
10366
10358
  jo.registry.unregister(Xo.names.ESCAPE);
10367
- const ja = new Jo.CrossTabCopyPaste();
10368
- ja.init({ contextMenu: !0, shortcut: !0 });
10369
- const Xa = new Wa();
10370
- Xa.init();
10359
+ const Xa = new Jo.CrossTabCopyPaste();
10360
+ Xa.init({ contextMenu: !0, shortcut: !0 });
10361
+ const Ja = new ja();
10362
+ Ja.init();
10371
10363
  function An(t) {
10372
10364
  const e = ne();
10373
10365
  if (!e)
@@ -10539,7 +10531,7 @@ Be.Classic.categoryStyles = {
10539
10531
  colour: "#a55b80"
10540
10532
  }
10541
10533
  };
10542
- const Ja = jn.defineTheme("light", {
10534
+ const qa = jn.defineTheme("light", {
10543
10535
  name: "light",
10544
10536
  base: Be.Classic,
10545
10537
  componentStyles: {
@@ -10555,7 +10547,7 @@ const Ja = jn.defineTheme("light", {
10555
10547
  scrollbarOpacity: 0.4,
10556
10548
  cursorColour: ""
10557
10549
  }
10558
- }), qa = jn.defineTheme("dark", {
10550
+ }), Qa = jn.defineTheme("dark", {
10559
10551
  name: "dark",
10560
10552
  base: Be.Classic,
10561
10553
  componentStyles: {
@@ -10572,14 +10564,14 @@ const Ja = jn.defineTheme("light", {
10572
10564
  cursorColour: ""
10573
10565
  }
10574
10566
  });
10575
- function Qa(t) {
10567
+ function za(t) {
10576
10568
  const e = ne();
10577
10569
  switch (t) {
10578
10570
  case "light":
10579
- e.setTheme(Ja);
10571
+ e.setTheme(qa);
10580
10572
  break;
10581
10573
  case "dark":
10582
- e.setTheme(qa);
10574
+ e.setTheme(Qa);
10583
10575
  break;
10584
10576
  }
10585
10577
  }
@@ -10587,7 +10579,7 @@ const hn = ["get_app_property_v1", "get_app_state_v1"];
10587
10579
  function gt(t, e) {
10588
10580
  return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
10589
10581
  }
10590
- function za(t) {
10582
+ function Za(t) {
10591
10583
  const e = [];
10592
10584
  function n(o) {
10593
10585
  for (const s of o.getChildren(!0))
@@ -10595,7 +10587,7 @@ function za(t) {
10595
10587
  }
10596
10588
  return n(t), e;
10597
10589
  }
10598
- function Za(t) {
10590
+ function tc(t) {
10599
10591
  const e = [];
10600
10592
  for (const n of t)
10601
10593
  if (n.type === "get_app_property_v1") {
@@ -10611,7 +10603,7 @@ function Za(t) {
10611
10603
  } else n.type === "get_app_state_v1" ? gt(e, Pt({ type: "state", stateId: n.state.id })) : console.assert(!1);
10612
10604
  return e;
10613
10605
  }
10614
- function tc(t) {
10606
+ function ec(t) {
10615
10607
  const e = [];
10616
10608
  for (const n of t.getChildren(!0))
10617
10609
  if (hn.includes(n.type))
@@ -10622,7 +10614,7 @@ function tc(t) {
10622
10614
  }
10623
10615
  return e;
10624
10616
  }
10625
- function ec(t) {
10617
+ function nc(t) {
10626
10618
  const e = [], n = [];
10627
10619
  for (const o of t)
10628
10620
  if (o.type === "get_app_property_v1") {
@@ -10686,7 +10678,7 @@ function ec(t) {
10686
10678
  console.assert(!1);
10687
10679
  return e;
10688
10680
  }
10689
- function nc(t) {
10681
+ function oc(t) {
10690
10682
  const e = {
10691
10683
  watchEffect: {},
10692
10684
  bind: {
@@ -10698,11 +10690,11 @@ function nc(t) {
10698
10690
  return e;
10699
10691
  for (const o of n)
10700
10692
  if (o.type === "watch_effect_v1") {
10701
- const s = za(o), a = Za(s);
10693
+ const s = Za(o), a = tc(s);
10702
10694
  for (const c of a)
10703
10695
  e.watchEffect[c] || (e.watchEffect[c] = []), gt(e.watchEffect[c], o.id);
10704
10696
  } else if (o.type === "app_bind_v1") {
10705
- const s = tc(o), a = ec(s);
10697
+ const s = ec(o), a = nc(s);
10706
10698
  e.bind.sets[o.id] = a;
10707
10699
  for (const c of a) {
10708
10700
  const l = Pt(c);
@@ -10712,13 +10704,13 @@ function nc(t) {
10712
10704
  return e;
10713
10705
  }
10714
10706
  const ko = /* @__PURE__ */ Symbol();
10715
- function oc(t) {
10716
- ms(ko, t);
10707
+ function sc(t) {
10708
+ Ts(ko, t);
10717
10709
  }
10718
10710
  function In() {
10719
- return Ts(ko);
10711
+ return Es(ko);
10720
10712
  }
10721
- const sc = /* @__PURE__ */ mt({
10713
+ const ic = /* @__PURE__ */ mt({
10722
10714
  __name: "index",
10723
10715
  props: {
10724
10716
  lock: { type: Boolean }
@@ -10755,7 +10747,7 @@ const sc = /* @__PURE__ */ mt({
10755
10747
  }, 8, ["disabled", "text"]);
10756
10748
  };
10757
10749
  }
10758
- }), ic = /* @__PURE__ */ mt({
10750
+ }), ac = /* @__PURE__ */ mt({
10759
10751
  __name: "index",
10760
10752
  props: {
10761
10753
  modelValue: { type: Boolean, required: !0 },
@@ -10782,11 +10774,11 @@ const sc = /* @__PURE__ */ mt({
10782
10774
  }, 8, ["disabled", "text"]);
10783
10775
  };
10784
10776
  }
10785
- }), ac = { class: "d-flex flex-column" }, cc = { class: "text-subtitle-1 ml-6" }, rc = {
10777
+ }), cc = { class: "d-flex flex-column" }, rc = { class: "text-subtitle-1 ml-6" }, lc = {
10786
10778
  key: 0,
10787
10779
  class: "text-caption text-grey text-truncate ml-6",
10788
10780
  style: { maxWidth: "340px" }
10789
- }, lc = /* @__PURE__ */ mt({
10781
+ }, uc = /* @__PURE__ */ mt({
10790
10782
  __name: "item",
10791
10783
  props: {
10792
10784
  id: {},
@@ -10814,17 +10806,17 @@ const sc = /* @__PURE__ */ mt({
10814
10806
  pointerEvents: "none"
10815
10807
  }));
10816
10808
  return (r, u) => {
10817
- const d = K("v-spacer"), f = K("v-icon"), m = Es("ripple");
10818
- return gs((V(), lt("div", {
10809
+ const d = K("v-spacer"), f = K("v-icon"), m = gs("ripple");
10810
+ return As((V(), lt("div", {
10819
10811
  class: "d-flex align-center cursor-pointer",
10820
10812
  style: ot(p.value),
10821
10813
  onClick: u[1] || (u[1] = (T) => c("x-click", a.id)),
10822
10814
  onMouseout: u[2] || (u[2] = (T) => l.value = !1),
10823
10815
  onMouseover: u[3] || (u[3] = (T) => l.value = !0)
10824
10816
  }, [
10825
- Q("div", ac, [
10826
- Q("span", cc, zt(a.title), 1),
10827
- a.desc ? (V(), lt("span", rc, zt(a.desc), 1)) : Et("", !0)
10817
+ Q("div", cc, [
10818
+ Q("span", rc, zt(a.title), 1),
10819
+ a.desc ? (V(), lt("span", lc, zt(a.desc), 1)) : Et("", !0)
10828
10820
  ]),
10829
10821
  U(d),
10830
10822
  U(f, {
@@ -10841,10 +10833,10 @@ const sc = /* @__PURE__ */ mt({
10841
10833
  ]);
10842
10834
  };
10843
10835
  }
10844
- }), uc = {
10836
+ }), pc = {
10845
10837
  key: 1,
10846
10838
  class: "text-caption text-grey"
10847
- }, pc = /* @__PURE__ */ mt({
10839
+ }, _c = /* @__PURE__ */ mt({
10848
10840
  __name: "index",
10849
10841
  props: /* @__PURE__ */ sn({
10850
10842
  lock: { type: Boolean }
@@ -10940,7 +10932,7 @@ const sc = /* @__PURE__ */ mt({
10940
10932
  onStart: p
10941
10933
  }, {
10942
10934
  default: ht(() => [
10943
- (V(!0), lt(so, null, As(a.value, (m) => (V(), dt(lc, {
10935
+ (V(!0), lt(so, null, Is(a.value, (m) => (V(), dt(uc, {
10944
10936
  id: m.id,
10945
10937
  key: m.id,
10946
10938
  desc: m.desc,
@@ -10950,14 +10942,14 @@ const sc = /* @__PURE__ */ mt({
10950
10942
  }, null, 8, ["id", "desc", "select", "title"]))), 128))
10951
10943
  ]),
10952
10944
  _: 1
10953
- }, 8, ["modelValue"])) : (V(), lt("span", uc, zt(F(n)("x-block-lib.noOption")), 1));
10945
+ }, 8, ["modelValue"])) : (V(), lt("span", pc, zt(F(n)("x-block-lib.noOption")), 1));
10954
10946
  }
10955
- }), _c = (t, e) => {
10947
+ }), dc = (t, e) => {
10956
10948
  const n = t.__vccOpts || t;
10957
10949
  for (const [o, s] of e)
10958
10950
  n[o] = s;
10959
10951
  return n;
10960
- }, dc = /* @__PURE__ */ _c(pc, [["__scopeId", "data-v-a77ed323"]]), hc = /* @__PURE__ */ mt({
10952
+ }, hc = /* @__PURE__ */ dc(_c, [["__scopeId", "data-v-a77ed323"]]), fc = /* @__PURE__ */ mt({
10961
10953
  __name: "index",
10962
10954
  props: {
10963
10955
  modelValue: { type: Boolean, required: !0 },
@@ -10985,7 +10977,7 @@ const sc = /* @__PURE__ */ mt({
10985
10977
  onClick: l[0] || (l[0] = (p) => a(""))
10986
10978
  }, "blockTree"));
10987
10979
  }
10988
- }), fc = { class: "text-subtitle-1" }, mc = /* @__PURE__ */ mt({
10980
+ }), mc = { class: "text-subtitle-1" }, Tc = /* @__PURE__ */ mt({
10989
10981
  __name: "index",
10990
10982
  props: {
10991
10983
  type: {},
@@ -11008,7 +11000,7 @@ const sc = /* @__PURE__ */ mt({
11008
11000
  }), _ = H(() => ({
11009
11001
  height: "60px"
11010
11002
  })), { open: r } = fn(`blocklyNavigatorDlg${an()}`);
11011
- Is(() => {
11003
+ ys(() => {
11012
11004
  r.value = !1;
11013
11005
  });
11014
11006
  const u = qt("blockList"), d = qt("blockTree");
@@ -11054,7 +11046,7 @@ const sc = /* @__PURE__ */ mt({
11054
11046
  variant: "text",
11055
11047
  onClick: T[0] || (T[0] = (nt) => r.value = !1)
11056
11048
  }),
11057
- Q("span", fc, zt(F(n)("x-block-lib.navigator")), 1),
11049
+ Q("span", mc, zt(F(n)("x-block-lib.navigator")), 1),
11058
11050
  U(D)
11059
11051
  ]),
11060
11052
  _: 1
@@ -11063,14 +11055,14 @@ const sc = /* @__PURE__ */ mt({
11063
11055
  class: "overflow-y-auto",
11064
11056
  style: ot(p.value)
11065
11057
  }, [
11066
- t.type === "list" ? (V(), dt(dc, {
11058
+ t.type === "list" ? (V(), dt(hc, {
11067
11059
  key: 0,
11068
11060
  ref_key: "blockList",
11069
11061
  ref: u,
11070
11062
  modelValue: F(r),
11071
11063
  "onUpdate:modelValue": T[1] || (T[1] = (nt) => pe(r) ? r.value = nt : null),
11072
11064
  lock: t.lock
11073
- }, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (V(), dt(hc, {
11065
+ }, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (V(), dt(fc, {
11074
11066
  key: 1,
11075
11067
  ref_key: "blockTree",
11076
11068
  ref: d,
@@ -11143,7 +11135,7 @@ function Kn(t, e) {
11143
11135
  const a = X.createTextNode(String(e));
11144
11136
  return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
11145
11137
  }
11146
- function Tc(t, e) {
11138
+ function Ec(t, e) {
11147
11139
  e === void 0 && (e = !1);
11148
11140
  const n = X.createElement("value");
11149
11141
  n.setAttribute("name", t);
@@ -11154,11 +11146,11 @@ function Tc(t, e) {
11154
11146
  const a = X.createTextNode(e ? "TRUE" : "FALSE");
11155
11147
  return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
11156
11148
  }
11157
- function Ec() {
11149
+ function gc() {
11158
11150
  const { activeObject: t, activeComp: e } = A.app;
11159
11151
  return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
11160
11152
  }
11161
- function gc() {
11153
+ function Ac() {
11162
11154
  const { activeObject: t, activeComp: e } = A.app;
11163
11155
  return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
11164
11156
  }
@@ -11166,7 +11158,7 @@ function $n() {
11166
11158
  const { activeObject: t, activeComp: e } = A.app;
11167
11159
  return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
11168
11160
  }
11169
- function Ac() {
11161
+ function Ic() {
11170
11162
  const { activeObject: t, activeComp: e } = A.app;
11171
11163
  if (t.type !== "comp")
11172
11164
  return !1;
@@ -11177,55 +11169,55 @@ function Ac() {
11177
11169
  }
11178
11170
  return !1;
11179
11171
  }
11180
- function Ic() {
11172
+ function yc() {
11181
11173
  const t = [];
11182
- return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), Ec() && t.push(C("trigger_app_event_v1")), t.push(
11174
+ return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), gc() && t.push(C("trigger_app_event_v1")), t.push(
11183
11175
  C("app_bind_v1", [No([{ key: "items", value: "2" }])])
11184
- ), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), gc() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), (st("callMethod") || $n()) && t.push(j(E("LABEL_METHOD"))), st("callMethod") && t.push(C("call_app_method_v1")), $n() && (t.push(C("implement_app_method_v1")), Ac() && t.push(C("set_app_method_output_v1")), t.push(C("procedure_return_v1"))), t;
11176
+ ), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), Ac() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), (st("callMethod") || $n()) && t.push(j(E("LABEL_METHOD"))), st("callMethod") && t.push(C("call_app_method_v1")), $n() && (t.push(C("implement_app_method_v1")), Ic() && t.push(C("set_app_method_output_v1")), t.push(C("procedure_return_v1"))), t;
11185
11177
  }
11186
- const So = { name: "APP_COMP_CATEGORY", callback: Ic };
11187
- function yc() {
11178
+ const So = { name: "APP_COMP_CATEGORY", callback: yc };
11179
+ function Oc() {
11188
11180
  const t = [];
11189
11181
  return t.push(j(E("LABEL_FUNC"))), t.push(j(E("LABEL_FLOW"))), t;
11190
11182
  }
11191
- const ye = { name: "APP_COMPUTE_CATEGORY", callback: yc };
11192
- function Oc() {
11183
+ const ye = { name: "APP_COMPUTE_CATEGORY", callback: Oc };
11184
+ function vc() {
11193
11185
  const t = [];
11194
11186
  return t.push(C("app_debug_trace_v1", [Kt("OBJECT")])), t.push(C("popup_message_v1", [Kt("TEXT")])), t.push(C("open_confirm_dlg_v1")), t.push(C("open_prompt_dlg_v1")), t;
11195
11187
  }
11196
- const Oe = { name: "APP_MESSAGE_CATEGORY", callback: Oc };
11197
- function vc() {
11188
+ const Oe = { name: "APP_MESSAGE_CATEGORY", callback: vc };
11189
+ function Cc() {
11198
11190
  for (const t of A.app.appList)
11199
11191
  if (t.pages.length > 0)
11200
11192
  return !0;
11201
11193
  return !1;
11202
11194
  }
11203
- function Cc() {
11195
+ function kc() {
11204
11196
  const t = [];
11205
- return t.push(C("app_env_is_v1")), vc() && t.push(C("navigate_to_v1")), t;
11197
+ return t.push(C("app_env_is_v1")), Cc() && t.push(C("navigate_to_v1")), t;
11206
11198
  }
11207
- const ve = { name: "APP_MISC_CATEGORY", callback: Cc };
11208
- function kc() {
11199
+ const ve = { name: "APP_MISC_CATEGORY", callback: kc };
11200
+ function Nc() {
11209
11201
  const { activeObject: t, activePage: e } = A.app;
11210
11202
  return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
11211
11203
  }
11212
- function Nc() {
11204
+ function Sc() {
11213
11205
  const { activeObject: t, activePage: e } = A.app;
11214
11206
  return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
11215
11207
  }
11216
- function Sc() {
11208
+ function Lc() {
11217
11209
  const t = [];
11218
11210
  return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), t.push(
11219
11211
  C("app_bind_v1", [No([{ key: "items", value: "2" }])])
11220
- ), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), kc() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), st("callMethod") && (t.push(j(E("LABEL_METHOD"))), t.push(C("call_app_method_v1"))), Nc() && (t.push(j(E("LABEL_ARGUMENT"))), t.push(C("get_page_argument_v1"))), t;
11212
+ ), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), Nc() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), st("callMethod") && (t.push(j(E("LABEL_METHOD"))), t.push(C("call_app_method_v1"))), Sc() && (t.push(j(E("LABEL_ARGUMENT"))), t.push(C("get_page_argument_v1"))), t;
11221
11213
  }
11222
- const Lo = { name: "APP_PAGE_CATEGORY", callback: Sc };
11223
- function Lc() {
11214
+ const Lo = { name: "APP_PAGE_CATEGORY", callback: Lc };
11215
+ function Bc() {
11224
11216
  const t = [];
11225
11217
  return t.push(j(E("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
11226
11218
  }
11227
- const Ce = { name: "APP_RESOURCE_CATEGORY", callback: Lc }, Wt = L.xml;
11228
- function Bc() {
11219
+ const Ce = { name: "APP_RESOURCE_CATEGORY", callback: Bc }, Wt = L.xml;
11220
+ function bc() {
11229
11221
  const t = [];
11230
11222
  {
11231
11223
  const e = Wt.createElement("label");
@@ -11250,9 +11242,9 @@ function Bc() {
11250
11242
  }
11251
11243
  const At = {
11252
11244
  name: "PROCEDURE_CATEGORY",
11253
- callback: Bc
11245
+ callback: bc
11254
11246
  }, le = L.xml;
11255
- function bc() {
11247
+ function Pc() {
11256
11248
  const t = ne(), e = [];
11257
11249
  {
11258
11250
  const o = le.createElement("label");
@@ -11290,9 +11282,9 @@ function bc() {
11290
11282
  }
11291
11283
  const It = {
11292
11284
  name: "VARIABLE_CATEGORY",
11293
- callback: bc
11285
+ callback: Pc
11294
11286
  };
11295
- function Pc() {
11287
+ function Rc() {
11296
11288
  const t = [];
11297
11289
  if (ut().length > 0)
11298
11290
  t.push(j(E("LABEL_OPERATION"))), t.push(C("add_data_v1")), t.push(C("delete_data_v1")), t.push(C("update_data_v1")), t.push(C("query_data_v1")), t.push(C("transaction_v1")), t.push(
@@ -11305,7 +11297,7 @@ function Pc() {
11305
11297
  ), t.push(
11306
11298
  C("query_extra_sortby_v1", [
11307
11299
  Kt("COLUMN"),
11308
- Tc("DESC")
11300
+ Ec("DESC")
11309
11301
  ])
11310
11302
  );
11311
11303
  else {
@@ -11314,30 +11306,30 @@ function Pc() {
11314
11306
  }
11315
11307
  return t;
11316
11308
  }
11317
- const ke = { name: "COMPUTE_DATA_CATEGORY", callback: Pc };
11318
- function Rc() {
11309
+ const ke = { name: "COMPUTE_DATA_CATEGORY", callback: Rc };
11310
+ function Dc() {
11319
11311
  return ae("flow").length > 0;
11320
11312
  }
11321
- function Dc() {
11313
+ function Mc() {
11322
11314
  const t = [];
11323
- return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Rc() && console.assert(!0), t;
11315
+ return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Dc() && console.assert(!0), t;
11324
11316
  }
11325
- const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback: Dc };
11326
- function Mc() {
11317
+ const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback: Mc };
11318
+ function Uc() {
11327
11319
  return ae("func").length > 0;
11328
11320
  }
11329
- function Uc() {
11321
+ function Vc() {
11330
11322
  const { activeObject: t, activeFunc: e } = A.compute, n = [];
11331
- return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))), Mc() && n.push(C("call_func_internal_v1")), n;
11323
+ return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))), Uc() && n.push(C("call_func_internal_v1")), n;
11332
11324
  }
11333
- const Se = { name: "COMPUTE_FUNC_CATEGORY", callback: Uc };
11334
- function Vc() {
11325
+ const Se = { name: "COMPUTE_FUNC_CATEGORY", callback: Vc };
11326
+ function xc() {
11335
11327
  const t = [];
11336
11328
  return t.push(
11337
11329
  C("compute_debug_trace_v1", [Kt("OBJECT")])
11338
11330
  ), t;
11339
11331
  }
11340
- const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
11332
+ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
11341
11333
  kind: "category",
11342
11334
  name: "%{BKY_CATEGORY_COLOR}",
11343
11335
  categorystyle: "color_category",
@@ -12040,7 +12032,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
12040
12032
  }
12041
12033
  }
12042
12034
  ]
12043
- }, xc = {
12035
+ }, wc = {
12044
12036
  kind: "categoryToolbox",
12045
12037
  contents: [
12046
12038
  {
@@ -12094,7 +12086,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
12094
12086
  custom: ye.name
12095
12087
  }
12096
12088
  ]
12097
- }, wc = {
12089
+ }, Fc = {
12098
12090
  kind: "categoryToolbox",
12099
12091
  contents: [
12100
12092
  {
@@ -12141,7 +12133,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
12141
12133
  custom: At.name
12142
12134
  }
12143
12135
  ]
12144
- }, Fc = {
12136
+ }, Yc = {
12145
12137
  kind: "categoryToolbox",
12146
12138
  contents: [
12147
12139
  {
@@ -12188,7 +12180,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
12188
12180
  custom: At.name
12189
12181
  }
12190
12182
  ]
12191
- }, Yc = {
12183
+ }, Kc = {
12192
12184
  kind: "categoryToolbox",
12193
12185
  contents: [
12194
12186
  {
@@ -12219,7 +12211,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
12219
12211
  ]
12220
12212
  }
12221
12213
  ]
12222
- }, Kc = {
12214
+ }, $c = {
12223
12215
  kind: "categoryToolbox",
12224
12216
  contents: [
12225
12217
  {
@@ -12299,26 +12291,26 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
12299
12291
  wheel: !0
12300
12292
  }
12301
12293
  };
12302
- function $c(t, e, n, o) {
12303
- tn.theme = o ? "dark" : "light", tn.toolbox = Hc(e, n);
12294
+ function Hc(t, e, n, o) {
12295
+ tn.theme = o ? "dark" : "light", tn.toolbox = Gc(e, n);
12304
12296
  const s = zo(t, tn);
12305
12297
  return s.addChangeListener((a) => {
12306
12298
  setTimeout(() => {
12307
12299
  Zo.shadowBlockConversionChangeListener(a);
12308
12300
  }, 0);
12309
- }), Gc(s, e, n), Wc(s), s;
12301
+ }), Wc(s, e, n), jc(s), s;
12310
12302
  }
12311
- function Hc(t, e) {
12303
+ function Gc(t, e) {
12312
12304
  let n;
12313
- return t === "page" ? e === "v1" && (n = Kc) : t === "comp" ? e === "v1" && (n = xc) : t === "func" ? e === "v1" && (n = Fc) : t === "flow" ? e === "v1" && (n = wc) : t === "json" && e === "v1" && (n = Yc), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
12305
+ return t === "page" ? e === "v1" && (n = $c) : t === "comp" ? e === "v1" && (n = wc) : t === "func" ? e === "v1" && (n = Yc) : t === "flow" ? e === "v1" && (n = Fc) : t === "json" && e === "v1" && (n = Kc), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
12314
12306
  }
12315
- function Gc(t, e, n) {
12307
+ function Wc(t, e, n) {
12316
12308
  function o({ name: s, callback: a }) {
12317
12309
  t.registerToolboxCategoryCallback(s, () => a(e));
12318
12310
  }
12319
12311
  e === "page" ? n === "v1" && (o(Lo), o(Oe), o(ve), o(It), o(At), o(Ce), o(ye)) : e === "comp" ? n === "v1" && (o(So), o(Oe), o(ve), o(It), o(At), o(Ce), o(ye)) : e === "func" ? n === "v1" && (o(Se), o(Ne), o(ke), o(Le), o(It), o(At)) : e === "flow" && n === "v1" && (o(Se), o(Ne), o(ke), o(Le), o(It), o(At));
12320
12312
  }
12321
- function Wc(t) {
12313
+ function jc(t) {
12322
12314
  const { router: e } = Nt;
12323
12315
  t.registerButtonCallback("NO_COMPUTE", () => {
12324
12316
  const n = e.resolve({
@@ -12336,7 +12328,7 @@ function Wc(t) {
12336
12328
  }, 100);
12337
12329
  });
12338
12330
  }
12339
- function jc(t, e) {
12331
+ function Xc(t, e) {
12340
12332
  const n = e.newBlock("json_root_v1");
12341
12333
  n.initSvg(), n.render();
12342
12334
  const o = (s, a) => {
@@ -12378,7 +12370,7 @@ function jc(t, e) {
12378
12370
  new (v.get(v.FINISHED_LOADING))(e)
12379
12371
  );
12380
12372
  }
12381
- function Xc(t) {
12373
+ function Jc(t) {
12382
12374
  const e = (o) => {
12383
12375
  if (!o)
12384
12376
  return null;
@@ -12410,7 +12402,7 @@ function Xc(t) {
12410
12402
  if (o.type === "json_root_v1")
12411
12403
  return e(o);
12412
12404
  }
12413
- const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12405
+ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
12414
12406
  __name: "index",
12415
12407
  props: /* @__PURE__ */ sn({
12416
12408
  type: {},
@@ -12426,7 +12418,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12426
12418
  emits: /* @__PURE__ */ sn(["ready"], ["update:lock", "update:scale"]),
12427
12419
  setup(t, { expose: e, emit: n }) {
12428
12420
  const { backgroundColor2: o } = oe(), s = Qt(t, "lock"), a = Qt(t, "scale"), c = n, l = `blocklyEditor${an()}`, p = wt(), _ = qt("parentContainer"), r = qt("clean"), u = qt("navigator"), d = {};
12429
- oc(d);
12421
+ sc(d);
12430
12422
  const f = wt(!0), m = wt(!1), T = H(() => t.type === "json" ? "tree" : "list"), y = H(() => ({
12431
12423
  width: "100%",
12432
12424
  height: "calc(100% - 48px)"
@@ -12476,13 +12468,13 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12476
12468
  console.assert(!1);
12477
12469
  return;
12478
12470
  }
12479
- ts(_.value), await Pn(t.locale), d.workspace = $c(p.value, t.type, t.version, t.dark), d.workspace.addChangeListener(v.disableOrphans), d.workspace.addChangeListener(bo);
12471
+ ts(_.value), await Pn(t.locale), d.workspace = Hc(p.value, t.type, t.version, t.dark), d.workspace.addChangeListener(v.disableOrphans), d.workspace.addChangeListener(bo);
12480
12472
  const P = document.querySelector(`#${l} .blocklyFlyout`);
12481
12473
  new MutationObserver((Ge) => {
12482
12474
  Ge.forEach((re) => {
12483
12475
  re.type === "attributes" && re.attributeName === "style" && (Ht.value = d.workspace.getFlyout().isVisible());
12484
12476
  });
12485
- }).observe(P, { attributes: !0 }), Ht.value = d.workspace.getFlyout().isVisible(), On(), vn(), await ys(), c("ready");
12477
+ }).observe(P, { attributes: !0 }), Ht.value = d.workspace.getFlyout().isVisible(), On(), vn(), await Os(), c("ready");
12486
12478
  }), bn(() => {
12487
12479
  Ht.value = !1;
12488
12480
  }), es(p, () => {
@@ -12506,13 +12498,13 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12506
12498
  }
12507
12499
  }
12508
12500
  const Po = (P) => {
12509
- f.value = !0, t.type === "json" ? jc(P, d.workspace) : Z.workspaces.load(P, d.workspace);
12510
- }, Ro = () => t.type === "json" ? Xc(d.workspace) : Z.workspaces.save(d.workspace), Do = () => {
12501
+ f.value = !0, t.type === "json" ? Xc(P, d.workspace) : Z.workspaces.load(P, d.workspace);
12502
+ }, Ro = () => t.type === "json" ? Jc(d.workspace) : Z.workspaces.save(d.workspace), Do = () => {
12511
12503
  if (t.type === "json")
12512
12504
  console.assert(!1);
12513
12505
  else
12514
12506
  return i.workspaceToCode(d.workspace);
12515
- }, Mo = () => nc(d.workspace), On = () => {
12507
+ }, Mo = () => oc(d.workspace), On = () => {
12516
12508
  d.workspace.setIsReadOnly(s.value), d.workspace.isReadOnly() && (Ht.value = !1);
12517
12509
  }, vn = () => {
12518
12510
  d.workspace.setScale(a.value);
@@ -12537,7 +12529,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12537
12529
  ), Gt(
12538
12530
  () => t.dark,
12539
12531
  (P) => {
12540
- Qa(P ? "dark" : "light");
12532
+ za(P ? "dark" : "light");
12541
12533
  }
12542
12534
  ), Gt(Ht, (P) => {
12543
12535
  P || d.workspace?.hideChaff();
@@ -12554,7 +12546,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12554
12546
  fireStateChange: Uo
12555
12547
  }), (P, Bt) => {
12556
12548
  const Ge = K("v-icon"), re = K("x-loading");
12557
- return V(), lt("div", Jc, [
12549
+ return V(), lt("div", qc, [
12558
12550
  Q("div", {
12559
12551
  id: l,
12560
12552
  ref_key: "blocklyDiv",
@@ -12564,7 +12556,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12564
12556
  Q("div", {
12565
12557
  style: ot(S.value)
12566
12558
  }, [
12567
- Os(P.$slots, "bottom")
12559
+ vs(P.$slots, "bottom")
12568
12560
  ], 4),
12569
12561
  m.value ? (V(), lt("div", {
12570
12562
  key: 0,
@@ -12581,16 +12573,16 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12581
12573
  class: "d-flex align-end ga-3 pt-3 pr-3",
12582
12574
  style: ot(Ut.value)
12583
12575
  }, [
12584
- U(sc, {
12576
+ U(ic, {
12585
12577
  ref_key: "clean",
12586
12578
  ref: r,
12587
12579
  lock: s.value
12588
12580
  }, null, 8, ["lock"]),
12589
- U(ic, {
12581
+ U(ac, {
12590
12582
  modelValue: s.value,
12591
12583
  "onUpdate:modelValue": Bt[0] || (Bt[0] = (Vo) => s.value = Vo)
12592
12584
  }, null, 8, ["modelValue"]),
12593
- U(mc, {
12585
+ U(Tc, {
12594
12586
  ref_key: "navigator",
12595
12587
  ref: u,
12596
12588
  lock: s.value,
@@ -12617,7 +12609,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12617
12609
  ]);
12618
12610
  };
12619
12611
  }
12620
- }), Qc = /* @__PURE__ */ mt({
12612
+ }), zc = /* @__PURE__ */ mt({
12621
12613
  __name: "index",
12622
12614
  props: {
12623
12615
  code: {}
@@ -12643,7 +12635,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12643
12635
  }, 8, ["color"]);
12644
12636
  };
12645
12637
  }
12646
- }), zc = { class: "text-subtitle-1" }, Zc = { class: "w-100 h-100 overflow-auto" }, tr = /* @__PURE__ */ mt({
12638
+ }), Zc = { class: "text-subtitle-1" }, tr = { class: "w-100 h-100 overflow-auto" }, er = /* @__PURE__ */ mt({
12647
12639
  __name: "index",
12648
12640
  setup(t) {
12649
12641
  const { t: e } = ie(), { sysBarAvail: n } = qn(), { backgroundColor0: o, backgroundColor2: s } = oe(), a = wt(""), c = H(() => {
@@ -12690,7 +12682,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12690
12682
  variant: "text",
12691
12683
  onClick: r[0] || (r[0] = (T) => p.value = !1)
12692
12684
  }),
12693
- Q("span", zc, zt(F(e)("x-block-lib.dlg.source.title")), 1),
12685
+ Q("span", Zc, zt(F(e)("x-block-lib.dlg.source.title")), 1),
12694
12686
  U(f)
12695
12687
  ]),
12696
12688
  _: 1
@@ -12698,8 +12690,8 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12698
12690
  Q("div", {
12699
12691
  style: ot(c.value)
12700
12692
  }, [
12701
- Q("div", Zc, [
12702
- U(Qc, { code: a.value }, null, 8, ["code"])
12693
+ Q("div", tr, [
12694
+ U(zc, { code: a.value }, null, 8, ["code"])
12703
12695
  ])
12704
12696
  ], 4)
12705
12697
  ]),
@@ -12710,16 +12702,16 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
12710
12702
  }, 8, ["modelValue"]);
12711
12703
  };
12712
12704
  }
12713
- }), er = (t) => {
12714
- t.component("XBlockly", qc), t.component("XSourceDlg", tr);
12705
+ }), nr = (t) => {
12706
+ t.component("XBlockly", Qc), t.component("XSourceDlg", er);
12715
12707
  };
12716
- async function lr(t) {
12708
+ async function ur(t) {
12717
12709
  return (await co(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.gy41k67q.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.b828ufea.js") }), `./locales/${t}/index.ts`, 4)).default;
12718
12710
  }
12719
- const ur = { install: er };
12711
+ const pr = { install: nr };
12720
12712
  export {
12721
- qc as XBlockly,
12722
- ur as default,
12723
- er as install,
12724
- lr as loadLocaleMessageBlock
12713
+ Qc as XBlockly,
12714
+ pr as default,
12715
+ nr as install,
12716
+ ur as loadLocaleMessageBlock
12725
12717
  };