x-block-lib 0.4.16 → 0.4.18

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 +161 -161
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,41 +2,41 @@
2
2
  var tt = Object.defineProperty;
3
3
  var ot = (e, o, t) => o in e ? tt(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
4
4
  var A = (e, o, t) => ot(e, typeof o != "symbol" ? o + "" : o, t);
5
- import { getCurrentScope as nt, onScopeDispose as it, unref as C, computed as S, watch as j, ref as ne, getCurrentInstance as st, onMounted as fe, defineComponent as W, resolveComponent as v, openBlock as L, createBlock as x, useModel as ue, onUnmounted as lt, withCtx as K, createElementBlock as X, Fragment as at, renderList as rt, createVNode as B, createTextVNode as ct, toDisplayString as pe, isRef as _t, withKeys as ut, withModifiers as le, mergeProps as pt, createElementVNode as V, normalizeStyle as F, createCommentVNode as ee, mergeModels as ve, useTemplateRef as Tt, onBeforeUnmount as dt } from "vue";
6
- import { d as _, j as s, O as l, u, X as ft, B as y, E, M as O, i as ie, a as U, b as f, C as Ue, F as Ee, c as Et, P as Te, N as he, V as te, e as ht, f as Pe, s as mt, g as w, S as I, h as ae, k as Y, l as J, m as re, n as G, o as P, p as Ae, G as ce, q as Ot, r as gt, t as _e, U as z, D as Q, v as D, w as It, T as se, x as xe, y as Lt, z as be, A as yt } from "./blockly-d7r2qvsx.js";
7
- import { storeToRefs as Ct } from "pinia";
8
- import { openConfirmDlg as vt, openPromptDlg as At, eventBus as ke, useSystem as bt, useColor as kt, useViewStack as De, useGlobalStore as Nt } from "x-essential-lib";
9
- import { useDisplay as Bt } from "vuetify";
5
+ import { getCurrentScope as nt, onScopeDispose as it, unref as C, computed as S, watch as j, ref as ne, getCurrentInstance as st, onMounted as fe, defineComponent as W, resolveComponent as v, openBlock as L, createBlock as x, useModel as ue, onUnmounted as lt, withCtx as K, createElementBlock as X, Fragment as at, renderList as rt, createVNode as B, createTextVNode as ct, toDisplayString as pe, isRef as _t, withKeys as ut, withModifiers as le, mergeProps as pt, createElementVNode as V, normalizeStyle as F, createCommentVNode as ee, mergeModels as ve, useTemplateRef as Tt, nextTick as dt, onBeforeUnmount as ft } from "vue";
6
+ import { d as _, j as s, O as l, u, X as Et, B as y, E, M as O, i as ie, a as U, b as f, C as Ue, F as Ee, c as ht, P as Te, N as he, V as te, e as mt, f as Pe, s as Ot, g as w, S as I, h as ae, k as Y, l as J, m as re, n as G, o as P, p as Ae, G as ce, q as gt, r as It, t as _e, U as z, D as Q, v as D, w as Lt, T as se, x as xe, y as yt, z as be, A as Ct } from "./blockly-d7r2qvsx.js";
7
+ import { storeToRefs as vt } from "pinia";
8
+ import { openConfirmDlg as At, openPromptDlg as bt, eventBus as ke, useSystem as kt, useColor as Nt, useViewStack as De, useGlobalStore as Bt, waitMs as Rt } from "x-essential-lib";
9
+ import { useDisplay as St } from "vuetify";
10
10
  import { useI18n as Ye } from "vue-i18n";
11
- var Rt = "M19.36,2.72L20.78,4.14L15.06,9.85C16.13,11.39 16.28,13.24 15.38,14.44L9.06,8.12C10.26,7.22 12.11,7.37 13.65,8.44L19.36,2.72M5.93,17.57C3.92,15.56 2.69,13.16 2.35,10.92L7.23,8.83L14.67,16.27L12.58,21.15C10.34,20.81 7.94,19.58 5.93,17.57Z", St = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", Mt = "M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z", Vt = "M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z", Ut = "M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z", Pt = "M21 3L3 10.53V11.5L9.84 14.16L12.5 21H13.46L21 3Z";
12
- function xt(e) {
11
+ var Mt = "M19.36,2.72L20.78,4.14L15.06,9.85C16.13,11.39 16.28,13.24 15.38,14.44L9.06,8.12C10.26,7.22 12.11,7.37 13.65,8.44L19.36,2.72M5.93,17.57C3.92,15.56 2.69,13.16 2.35,10.92L7.23,8.83L14.67,16.27L12.58,21.15C10.34,20.81 7.94,19.58 5.93,17.57Z", Vt = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", Ut = "M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z", Pt = "M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z", xt = "M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z", Dt = "M21 3L3 10.53V11.5L9.84 14.16L12.5 21H13.46L21 3Z";
12
+ function Yt(e) {
13
13
  return nt() ? (it(e), !0) : !1;
14
14
  }
15
- function Dt(e) {
15
+ function Kt(e) {
16
16
  return typeof e == "function" ? e() : C(e);
17
17
  }
18
- const Yt = typeof window < "u" && typeof document < "u";
18
+ const Ft = typeof window < "u" && typeof document < "u";
19
19
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
20
20
  function Ne(e) {
21
21
  var o;
22
- const t = Dt(e);
22
+ const t = Kt(e);
23
23
  return (o = t == null ? void 0 : t.$el) != null ? o : t;
24
24
  }
25
- const Kt = Yt ? window : void 0;
26
- function Ft() {
25
+ const wt = Ft ? window : void 0;
26
+ function Ht() {
27
27
  const e = ne(!1), o = st();
28
28
  return o && fe(() => {
29
29
  e.value = !0;
30
30
  }, o), e;
31
31
  }
32
- function wt(e) {
33
- const o = Ft();
32
+ function Gt(e) {
33
+ const o = Ht();
34
34
  return S(() => (o.value, !!e()));
35
35
  }
36
- function Ht(e, o, t = {}) {
37
- const { window: n = Kt, ...i } = t;
36
+ function $t(e, o, t = {}) {
37
+ const { window: n = wt, ...i } = t;
38
38
  let a;
39
- const r = wt(() => n && "ResizeObserver" in n), c = () => {
39
+ const r = Gt(() => n && "ResizeObserver" in n), c = () => {
40
40
  a && (a.disconnect(), a = void 0);
41
41
  }, p = S(() => Array.isArray(e) ? e.map((g) => Ne(g)) : [Ne(e)]), h = j(
42
42
  p,
@@ -51,7 +51,7 @@ function Ht(e, o, t = {}) {
51
51
  ), T = () => {
52
52
  c(), h();
53
53
  };
54
- return xt(T), {
54
+ return Yt(T), {
55
55
  isSupported: r,
56
56
  stop: T
57
57
  };
@@ -198,7 +198,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
198
198
  `
199
199
  )}(${o}, ${t}, ${n})`, l.FUNCTION_CALL];
200
200
  };
201
- const Gt = function() {
201
+ const jt = function() {
202
202
  if (!window.blocklyState) {
203
203
  const e = {
204
204
  runtime: {
@@ -244,10 +244,10 @@ function q(e) {
244
244
  return u.xml.textToDom(o);
245
245
  }
246
246
  function Ke(e, o, t) {
247
- const n = `<xml><block type="parameter_v1"><mutation key="${o}" name="${t}"/></block></xml>`, i = u.xml.textToDom(n), a = ft.domToWorkspace(i, e);
247
+ const n = `<xml><block type="parameter_v1"><mutation key="${o}" name="${t}"/></block></xml>`, i = u.xml.textToDom(n), a = Et.domToWorkspace(i, e);
248
248
  return e.getBlockById(a[0]);
249
249
  }
250
- const $t = u.xml, jt = [
250
+ const Xt = u.xml, Wt = [
251
251
  {
252
252
  type: "call_func_v1",
253
253
  prefixInputs: ["OUTPUT"]
@@ -277,17 +277,17 @@ const $t = u.xml, jt = [
277
277
  prefixInputs: ["ARG"]
278
278
  }
279
279
  ];
280
- function Xt(e, o) {
280
+ function Jt(e, o) {
281
281
  var n, i;
282
- const t = jt.find((a) => a.type === e);
282
+ const t = Wt.find((a) => a.type === e);
283
283
  return t ? !!((n = t.prefixInputs) != null && n.some((a) => o.startsWith(a)) || (i = t.inputs) != null && i.some((a) => a === o)) : !1;
284
284
  }
285
- const Wt = {
285
+ const zt = {
286
286
  init: function() {
287
287
  this.key = "", this.name = "", this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
288
288
  },
289
289
  mutationToDom: function() {
290
- const e = $t.createElement("mutation");
290
+ const e = Xt.createElement("mutation");
291
291
  return e.setAttribute("key", this.key), e.setAttribute("name", this.name), e;
292
292
  },
293
293
  domToMutation: function(e) {
@@ -316,7 +316,7 @@ const Wt = {
316
316
  tryDuplicate_: function(e) {
317
317
  var t;
318
318
  const o = this.workspace.getBlockById(e.oldParentId);
319
- if (o && Xt(o.type, e.oldInputName))
319
+ if (o && Jt(o.type, e.oldInputName))
320
320
  try {
321
321
  E.disable();
322
322
  const n = (t = o.getInput(e.oldInputName)) == null ? void 0 : t.connection;
@@ -332,23 +332,23 @@ const Wt = {
332
332
  this.name ? this.setFieldValue(O[this.name], "LABEL") : this.setFieldValue(this.key, "LABEL");
333
333
  }
334
334
  };
335
- y.parameter_v1 = Wt;
335
+ y.parameter_v1 = zt;
336
336
  s.forBlock.parameter_v1 = function(e) {
337
337
  return [e.key, l.ATOMIC];
338
338
  };
339
- const Jt = u.xml, zt = {
339
+ const Qt = u.xml, qt = {
340
340
  init: function() {
341
341
  this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
342
342
  }
343
343
  };
344
- y.list_create_container_v1 = zt;
345
- const Qt = {
344
+ y.list_create_container_v1 = qt;
345
+ const Zt = {
346
346
  init: function() {
347
347
  this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
348
348
  }
349
349
  };
350
- y.list_create_item_v1 = Qt;
351
- const qt = {
350
+ y.list_create_item_v1 = Zt;
351
+ const eo = {
352
352
  init: function() {
353
353
  this.itemCount_ = 0, this.setMutator(
354
354
  new ie.MutatorIcon(
@@ -358,7 +358,7 @@ const qt = {
358
358
  ), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
359
359
  },
360
360
  mutationToDom: function() {
361
- const e = Jt.createElement("mutation");
361
+ const e = Qt.createElement("mutation");
362
362
  return e.setAttribute("items", String(this.itemCount_)), e;
363
363
  },
364
364
  domToMutation: function(e) {
@@ -432,7 +432,7 @@ const qt = {
432
432
  this.removeInput("ADD" + e);
433
433
  }
434
434
  };
435
- y.list_create_v1 = qt;
435
+ y.list_create_v1 = eo;
436
436
  s.forBlock.list_create_v1 = function(e) {
437
437
  const o = e, t = new Array(o.itemCount_);
438
438
  for (let i = 0; i < o.itemCount_; i++)
@@ -648,7 +648,7 @@ s.forBlock.list_set_v1 = function(e) {
648
648
  return `${o}[${t}] = ${n};
649
649
  `;
650
650
  };
651
- const Zt = {
651
+ const to = {
652
652
  // logic_compare
653
653
  EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
654
654
  NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
@@ -662,7 +662,7 @@ const Zt = {
662
662
  };
663
663
  f.register(
664
664
  "logic_op_tooltip_v1",
665
- f.buildTooltipForDropdown("OP", Zt)
665
+ f.buildTooltipForDropdown("OP", to)
666
666
  );
667
667
  _([
668
668
  {
@@ -687,7 +687,7 @@ _([
687
687
  s.forBlock.logic_boolean_v1 = function(e) {
688
688
  return [e.getFieldValue("BOOL") === "TRUE" ? "true" : "false", l.ATOMIC];
689
689
  };
690
- const eo = {
690
+ const oo = {
691
691
  onchange: function(e) {
692
692
  this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
693
693
  const o = this.getInputTargetBlock("A"), t = this.getInputTargetBlock("B");
@@ -707,7 +707,7 @@ const eo = {
707
707
  f.register(
708
708
  "logic_compare_v1",
709
709
  function() {
710
- this.mixin(eo);
710
+ this.mixin(oo);
711
711
  }
712
712
  );
713
713
  _([
@@ -757,7 +757,7 @@ s.forBlock.logic_compare_v1 = function(e) {
757
757
  const i = s.valueToCode(e, "A", n) || "0", a = s.valueToCode(e, "B", n) || "0";
758
758
  return [`${i} ${t} ${a}`, n];
759
759
  };
760
- const to = {
760
+ const no = {
761
761
  elseIfCount_: 0,
762
762
  hasElse_: !1,
763
763
  mutationToDom: function() {
@@ -885,7 +885,7 @@ const to = {
885
885
  };
886
886
  f.registerMutator(
887
887
  "logic_if_v1_mutator",
888
- to,
888
+ no,
889
889
  void 0,
890
890
  ["logic_if_else_if_v1", "logic_if_else_v1"]
891
891
  );
@@ -1031,7 +1031,7 @@ s.forBlock.logic_operation_v1 = function(e) {
1031
1031
  }
1032
1032
  return [`${n} ${o} ${i}`, t];
1033
1033
  };
1034
- const oo = {
1034
+ const io = {
1035
1035
  prevParentConnection_: null,
1036
1036
  onchange: function(e) {
1037
1037
  const o = this.getInputTargetBlock("THEN"), t = this.getInputTargetBlock("ELSE"), n = this.outputConnection.targetConnection;
@@ -1046,7 +1046,7 @@ const oo = {
1046
1046
  this.prevParentConnection_ = n;
1047
1047
  }
1048
1048
  };
1049
- f.registerMixin("logic_ternary_v1", oo);
1049
+ f.registerMixin("logic_ternary_v1", io);
1050
1050
  _([
1051
1051
  {
1052
1052
  type: "logic_ternary_v1",
@@ -1083,7 +1083,7 @@ s.forBlock.logic_ternary_v1 = function(e) {
1083
1083
  const o = s.valueToCode(e, "IF", l.CONDITIONAL) || "false", t = s.valueToCode(e, "THEN", l.CONDITIONAL) || "null", n = s.valueToCode(e, "ELSE", l.CONDITIONAL) || "null";
1084
1084
  return [o + " ? " + t + " : " + n, l.CONDITIONAL];
1085
1085
  };
1086
- const no = {
1086
+ const so = {
1087
1087
  customContextMenu: function(e) {
1088
1088
  if (this.isInFlyout)
1089
1089
  return;
@@ -1105,7 +1105,7 @@ const no = {
1105
1105
  };
1106
1106
  f.registerMixin(
1107
1107
  "contextMenu_newGetVariableBlock_v1",
1108
- no
1108
+ so
1109
1109
  );
1110
1110
  f.register(
1111
1111
  "flow_control_tooltip_v1",
@@ -1114,16 +1114,16 @@ f.register(
1114
1114
  CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
1115
1115
  })
1116
1116
  );
1117
- const io = /* @__PURE__ */ new Set([
1117
+ const lo = /* @__PURE__ */ new Set([
1118
1118
  "repeat_v1",
1119
1119
  "for_each_v1",
1120
1120
  "for_v1",
1121
1121
  "while_until_v1"
1122
- ]), so = {
1122
+ ]), ao = {
1123
1123
  getSurroundLoop: function() {
1124
1124
  let e = this;
1125
1125
  do {
1126
- if (io.has(e.type))
1126
+ if (lo.has(e.type))
1127
1127
  return !0;
1128
1128
  e = e == null ? void 0 : e.getSurroundParent();
1129
1129
  } while (e);
@@ -1146,7 +1146,7 @@ const io = /* @__PURE__ */ new Set([
1146
1146
  };
1147
1147
  f.registerMixin(
1148
1148
  "flow_control_in_loop_check_v1",
1149
- so
1149
+ ao
1150
1150
  );
1151
1151
  _([
1152
1152
  {
@@ -1311,7 +1311,7 @@ ${n}
1311
1311
  }
1312
1312
  `;
1313
1313
  };
1314
- const lo = {
1314
+ const ro = {
1315
1315
  // math_arithmetic
1316
1316
  ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
1317
1317
  SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
@@ -1345,7 +1345,7 @@ const lo = {
1345
1345
  };
1346
1346
  f.register(
1347
1347
  "math_op_tooltip_v1",
1348
- f.buildTooltipForDropdown("OP", lo)
1348
+ f.buildTooltipForDropdown("OP", ro)
1349
1349
  );
1350
1350
  _([
1351
1351
  {
@@ -1948,21 +1948,21 @@ s.forBlock.math_trig_v1 = function(e) {
1948
1948
  }
1949
1949
  return [n, l.DIVISION];
1950
1950
  };
1951
- const ao = u.xml, ro = {
1951
+ const co = u.xml, _o = {
1952
1952
  init: function() {
1953
1953
  this.appendDummyInput().appendField(
1954
1954
  "%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
1955
1955
  ), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
1956
1956
  }
1957
1957
  };
1958
- y.object_create_container_v1 = ro;
1959
- const co = {
1958
+ y.object_create_container_v1 = _o;
1959
+ const uo = {
1960
1960
  init: function() {
1961
1961
  this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
1962
1962
  }
1963
1963
  };
1964
- y.object_create_item_v1 = co;
1965
- const _o = {
1964
+ y.object_create_item_v1 = uo;
1965
+ const po = {
1966
1966
  init: function() {
1967
1967
  this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
1968
1968
  new ie.MutatorIcon(
@@ -1972,7 +1972,7 @@ const _o = {
1972
1972
  ), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
1973
1973
  },
1974
1974
  mutationToDom: function() {
1975
- const e = ao.createElement("mutation");
1975
+ const e = co.createElement("mutation");
1976
1976
  return e.setAttribute("items", String(this.itemCount_)), e;
1977
1977
  },
1978
1978
  domToMutation: function(e) {
@@ -2042,7 +2042,7 @@ const _o = {
2042
2042
  this.removeInput("ADD" + e);
2043
2043
  }
2044
2044
  };
2045
- y.object_create_v1 = _o;
2045
+ y.object_create_v1 = po;
2046
2046
  s.forBlock.object_create_v1 = function(e) {
2047
2047
  const o = e;
2048
2048
  let t = "{";
@@ -2300,13 +2300,13 @@ _([
2300
2300
  s.forBlock.object_to_json_v1 = function(e) {
2301
2301
  return [`__jsonStringifyV1__(${s.valueToCode(e, "OBJECT", l.NONE) || "null"})`, l.FUNCTION_CALL];
2302
2302
  };
2303
- const Be = u.xml, uo = {
2303
+ const Be = u.xml, To = {
2304
2304
  init: function() {
2305
- this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Et(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
2305
+ this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new ht(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
2306
2306
  }
2307
2307
  };
2308
- y.procedure_def_container_v1 = uo;
2309
- const po = {
2308
+ y.procedure_def_container_v1 = To;
2309
+ const fo = {
2310
2310
  init: function() {
2311
2311
  const e = new Ee(Te.DEFAULT_ARG);
2312
2312
  e.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(e, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
@@ -2328,8 +2328,8 @@ const po = {
2328
2328
  return e;
2329
2329
  }
2330
2330
  };
2331
- y.procedure_def_item_v1 = po;
2332
- const To = {
2331
+ y.procedure_def_item_v1 = fo;
2332
+ const Eo = {
2333
2333
  init: function() {
2334
2334
  this.withReturn = !1, this.args = [];
2335
2335
  const e = new Ee(
@@ -2429,13 +2429,13 @@ const To = {
2429
2429
  }
2430
2430
  }
2431
2431
  };
2432
- y.procedure_def_v1 = To;
2433
- const fo = u.xml, Eo = {
2432
+ y.procedure_def_v1 = Eo;
2433
+ const ho = u.xml, mo = {
2434
2434
  init: function() {
2435
2435
  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}");
2436
2436
  },
2437
2437
  mutationToDom: function() {
2438
- const e = fo.createElement("mutation");
2438
+ const e = ho.createElement("mutation");
2439
2439
  return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), e;
2440
2440
  },
2441
2441
  domToMutation: function(e) {
@@ -2486,7 +2486,7 @@ const fo = u.xml, Eo = {
2486
2486
  e.type === "procedure_def_v1" || e.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
2487
2487
  }
2488
2488
  };
2489
- y.procedure_return_v1 = Eo;
2489
+ y.procedure_return_v1 = mo;
2490
2490
  s.forBlock.procedure_return_v1 = function(e) {
2491
2491
  const o = e;
2492
2492
  return o.withReturn ? `return ${s.valueToCode(o, "VALUE", l.NONE) || "null"};
@@ -2514,9 +2514,9 @@ _([
2514
2514
  s.forBlock.text_v1 = function(e) {
2515
2515
  return [s.quote_(e.getFieldValue("TEXT")), l.ATOMIC];
2516
2516
  };
2517
- const ho = /^\s*'([^']|\\')*'\s*$/;
2517
+ const Oo = /^\s*'([^']|\\')*'\s*$/;
2518
2518
  function oe(e) {
2519
- return ho.test(e) ? [e, l.ATOMIC] : [`String(${e})`, l.FUNCTION_CALL];
2519
+ return Oo.test(e) ? [e, l.ATOMIC] : [`String(${e})`, l.FUNCTION_CALL];
2520
2520
  }
2521
2521
  f.register(
2522
2522
  "text_append_tooltip_v1",
@@ -2721,10 +2721,10 @@ _([
2721
2721
  s.forBlock.text_is_empty_v1 = function(e) {
2722
2722
  return [`!${s.valueToCode(e, "VALUE", l.MEMBER) || "''"}.length`, l.LOGICAL_NOT];
2723
2723
  };
2724
- const mo = u.xml, Oo = {
2724
+ const go = u.xml, Io = {
2725
2725
  itemCount_: 0,
2726
2726
  mutationToDom: function() {
2727
- const e = mo.createElement("mutation");
2727
+ const e = go.createElement("mutation");
2728
2728
  return e.setAttribute("items", `${this.itemCount_}`), e;
2729
2729
  },
2730
2730
  domToMutation: function(e) {
@@ -2796,13 +2796,13 @@ const mo = u.xml, Oo = {
2796
2796
  for (let e = this.itemCount_; this.getInput("ADD" + e); e++)
2797
2797
  this.removeInput("ADD" + e);
2798
2798
  }
2799
- }, go = function() {
2799
+ }, Lo = function() {
2800
2800
  this.itemCount_ = 2, this.updateShape_(), this.setMutator(new ie.MutatorIcon(["text_join_item_v1"], this));
2801
2801
  };
2802
2802
  f.registerMutator(
2803
2803
  "text_join_mutator_v1",
2804
- Oo,
2805
- go
2804
+ Io,
2805
+ Lo
2806
2806
  );
2807
2807
  _([
2808
2808
  {
@@ -3034,7 +3034,7 @@ s.forBlock.text_trim_v1 = function(e) {
3034
3034
  }[e.getFieldValue("MODE")];
3035
3035
  return [`__trimV1__(${o}, ${n})`, l.ATOMIC];
3036
3036
  };
3037
- const Io = {
3037
+ const yo = {
3038
3038
  init: function() {
3039
3039
  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}");
3040
3040
  },
@@ -3060,7 +3060,7 @@ const Io = {
3060
3060
  ));
3061
3061
  }
3062
3062
  };
3063
- y.create_timer_v1 = Io;
3063
+ y.create_timer_v1 = yo;
3064
3064
  s.forBlock.create_timer_v1 = function(e) {
3065
3065
  const o = s.valueToCode(e, "INTERVAL", l.ATOMIC) || "1000", t = s.valueToCode(e, "LOOP", l.ATOMIC) || "false", n = s.valueToCode(e, "COUNT", l.ATOMIC) || "1", i = s.valueToCode(e, "IMMEDIATE", l.ATOMIC) || "false", a = s.statementToCode(e, "CALLBACK");
3066
3066
  return `__createTimerV1__(${o}, ${t}, ${n}, ${i}, function() {
@@ -3090,18 +3090,18 @@ s.forBlock.delay_v1 = function(e) {
3090
3090
  return `__delayV1__(${s.valueToCode(e, "MS", l.ATOMIC) || "0"});
3091
3091
  `;
3092
3092
  };
3093
- const Lo = {
3093
+ const Co = {
3094
3094
  customContextMenu: function(e) {
3095
3095
  if (this.isInFlyout) {
3096
3096
  if (this.type === "variables_get_v1" || this.type === "variables_get_v1_reporter") {
3097
3097
  const o = {
3098
3098
  text: O.RENAME_VARIABLE,
3099
3099
  enabled: !0,
3100
- callback: yo(this)
3100
+ callback: vo(this)
3101
3101
  }, t = this.getField("VAR").getText(), n = {
3102
3102
  text: O.DELETE_VARIABLE.replace("%1", t),
3103
3103
  enabled: !0,
3104
- callback: Co(this)
3104
+ callback: Ao(this)
3105
3105
  };
3106
3106
  e.unshift(o), e.unshift(n);
3107
3107
  }
@@ -3119,12 +3119,12 @@ const Lo = {
3119
3119
  });
3120
3120
  }
3121
3121
  }
3122
- }, yo = function(e) {
3122
+ }, vo = function(e) {
3123
3123
  return function() {
3124
3124
  const o = e.workspace, n = e.getField("VAR").getVariable();
3125
3125
  te.renameVariable(o, n);
3126
3126
  };
3127
- }, Co = function(e) {
3127
+ }, Ao = function(e) {
3128
3128
  return function() {
3129
3129
  const o = e.workspace, n = e.getField("VAR").getVariable();
3130
3130
  o.deleteVariableById(n.getId()), o.refreshToolboxSelection();
@@ -3132,7 +3132,7 @@ const Lo = {
3132
3132
  };
3133
3133
  f.registerMixin(
3134
3134
  "context_menu_variable_v1",
3135
- Lo
3135
+ Co
3136
3136
  );
3137
3137
  _([
3138
3138
  {
@@ -3189,7 +3189,7 @@ s.forBlock.variable_set_v1 = function(e) {
3189
3189
  `;
3190
3190
  };
3191
3191
  const Re = u.xml;
3192
- function vo() {
3192
+ function bo() {
3193
3193
  const e = [];
3194
3194
  {
3195
3195
  const o = Re.createElement("label");
@@ -3201,11 +3201,11 @@ function vo() {
3201
3201
  }
3202
3202
  return e;
3203
3203
  }
3204
- const Ao = {
3204
+ const ko = {
3205
3205
  name: "INTERFACE_CATEGORY",
3206
- callback: vo
3206
+ callback: bo
3207
3207
  }, $ = u.xml;
3208
- function bo() {
3208
+ function No() {
3209
3209
  const e = [];
3210
3210
  {
3211
3211
  const o = $.createElement("label");
@@ -3232,18 +3232,18 @@ function bo() {
3232
3232
  }
3233
3233
  const k = {
3234
3234
  name: "PROCEDURE_CATEGORY",
3235
- callback: bo
3235
+ callback: No
3236
3236
  };
3237
- function ko() {
3238
- const { args: e } = Gt.app.view, o = [];
3237
+ function Bo() {
3238
+ const { args: e } = jt.app.view, o = [];
3239
3239
  return e == null || e.forEach(({ id: t, name: n, type: i }) => {
3240
3240
  o.push({ id: t, name: n, type: i });
3241
3241
  }), o;
3242
3242
  }
3243
3243
  const Se = u.xml;
3244
- function No() {
3244
+ function Ro() {
3245
3245
  const e = [];
3246
- if (ko().length > 0) {
3246
+ if (Bo().length > 0) {
3247
3247
  {
3248
3248
  const o = Se.createElement("label");
3249
3249
  o.setAttribute("text", "%{BKY_LABEL_ARGUMENT}"), e.push(o);
@@ -3257,9 +3257,9 @@ function No() {
3257
3257
  }
3258
3258
  const de = {
3259
3259
  name: "UI_CATEGORY",
3260
- callback: No
3260
+ callback: Ro
3261
3261
  }, Z = u.xml;
3262
- function Bo(e) {
3262
+ function So(e) {
3263
3263
  const o = [];
3264
3264
  {
3265
3265
  const n = Z.createElement("label");
@@ -3279,7 +3279,7 @@ function Bo(e) {
3279
3279
  const t = e.getVariablesOfType("");
3280
3280
  if (t.length <= 0)
3281
3281
  return o;
3282
- t.sort(ht.compareByName);
3282
+ t.sort(mt.compareByName);
3283
3283
  {
3284
3284
  const n = Z.createElement("label");
3285
3285
  n.setAttribute("text", O.LABEL_CREATED), o.push(n);
@@ -3297,17 +3297,17 @@ function Bo(e) {
3297
3297
  }
3298
3298
  const N = {
3299
3299
  name: "VARIABLE_CATEGORY",
3300
- callback: Bo
3300
+ callback: So
3301
3301
  };
3302
3302
  Pe.setConfirm(async (e, o) => {
3303
- const t = await vt({
3303
+ const t = await At({
3304
3304
  title: "",
3305
3305
  text: e
3306
3306
  });
3307
3307
  o(!!t);
3308
3308
  });
3309
3309
  Pe.setPrompt(async (e, o, t) => {
3310
- const n = await At({
3310
+ const n = await bt({
3311
3311
  title: "",
3312
3312
  value: o
3313
3313
  });
@@ -3328,7 +3328,7 @@ const Fe = (e, o, t) => {
3328
3328
  };
3329
3329
  async function Me(e) {
3330
3330
  const o = await Fe(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en-kge4l75d.js"), "./msg/zhHans.ts": () => import("./msg-zhHans-hfznrf5k.js") }), `./msg/${e}.ts`, 3);
3331
- mt(o.default);
3331
+ Ot(o.default);
3332
3332
  }
3333
3333
  function we(e) {
3334
3334
  const o = w();
@@ -3343,7 +3343,7 @@ function we(e) {
3343
3343
  const i = n.getRelativeToSurfaceXY(), a = i.x * o.scale, r = i.y * o.scale;
3344
3344
  o.scroll(-a, -r);
3345
3345
  }
3346
- function Ro() {
3346
+ function Mo() {
3347
3347
  var t;
3348
3348
  const e = w();
3349
3349
  if (!e)
@@ -3351,7 +3351,7 @@ function Ro() {
3351
3351
  const o = (t = e.getTopBlocks(!0)) == null ? void 0 : t[0];
3352
3352
  o && we(o.id);
3353
3353
  }
3354
- class So {
3354
+ class Vo {
3355
3355
  init({ contextMenu: o = !0, shortcut: t = !0 } = {
3356
3356
  contextMenu: !0,
3357
3357
  shortcut: !0
@@ -3466,7 +3466,7 @@ class So {
3466
3466
  if (!c || !J(c) || !c.isDeletable() || !G(c))
3467
3467
  return !1;
3468
3468
  const p = c.toCopyData();
3469
- return p ? (localStorage.setItem("blocklyStash", JSON.stringify(p)), c instanceof Ot ? c.checkAndDelete() : c.dispose(), !0) : !1;
3469
+ return p ? (localStorage.setItem("blocklyStash", JSON.stringify(p)), c instanceof gt ? c.checkAndDelete() : c.dispose(), !0) : !1;
3470
3470
  },
3471
3471
  keyCodes: [o, t, n]
3472
3472
  };
@@ -3506,7 +3506,7 @@ class So {
3506
3506
  I.registry.register(i);
3507
3507
  }
3508
3508
  }
3509
- class Mo {
3509
+ class Uo {
3510
3510
  init() {
3511
3511
  const o = P.registry.getItem("cleanWorkspace");
3512
3512
  o && (o.callback = function(t) {
@@ -3530,7 +3530,7 @@ function He(e) {
3530
3530
  const o = e.getParent();
3531
3531
  return o && He(o) ? !0 : !o && !!(e.outputConnection || e.previousConnection);
3532
3532
  }
3533
- class Vo {
3533
+ class Po {
3534
3534
  init() {
3535
3535
  const o = P.registry.getItem("blockDisable");
3536
3536
  o && (o.preconditionFn = function(t) {
@@ -4357,7 +4357,7 @@ class Ge extends _e {
4357
4357
  }
4358
4358
  }
4359
4359
  Ge.prototype.DEFAULT_VALUE = "#ffffff";
4360
- gt.register(`
4360
+ It.register(`
4361
4361
  .blocklyColourTable {
4362
4362
  border-collapse: collapse;
4363
4363
  display: block;
@@ -4384,16 +4384,16 @@ gt.register(`
4384
4384
  position: relative;
4385
4385
  }
4386
4386
  `);
4387
- function Uo() {
4388
- It.register("field_colour", Ge);
4387
+ function xo() {
4388
+ Lt.register("field_colour", Ge);
4389
4389
  }
4390
- const Po = new So();
4391
- Po.init({ contextMenu: !0, shortcut: !0 });
4392
- const xo = new Mo();
4393
- xo.init();
4394
4390
  const Do = new Vo();
4395
- Do.init();
4396
- Uo();
4391
+ Do.init({ contextMenu: !0, shortcut: !0 });
4392
+ const Yo = new Uo();
4393
+ Yo.init();
4394
+ const Ko = new Po();
4395
+ Ko.init();
4396
+ xo();
4397
4397
  se.Classic.blockStyles = {
4398
4398
  color_blocks: {
4399
4399
  colourPrimary: "#a5745b",
@@ -4518,7 +4518,7 @@ se.Classic.categoryStyles = {
4518
4518
  colour: "#a55b80"
4519
4519
  }
4520
4520
  };
4521
- const Yo = xe.defineTheme("light", {
4521
+ const Fo = xe.defineTheme("light", {
4522
4522
  name: "light",
4523
4523
  base: se.Classic,
4524
4524
  componentStyles: {
@@ -4534,7 +4534,7 @@ const Yo = xe.defineTheme("light", {
4534
4534
  scrollbarOpacity: 0.4,
4535
4535
  cursorColour: ""
4536
4536
  }
4537
- }), Ko = xe.defineTheme("dark", {
4537
+ }), wo = xe.defineTheme("dark", {
4538
4538
  name: "dark",
4539
4539
  base: se.Classic,
4540
4540
  componentStyles: {
@@ -4551,14 +4551,14 @@ const Yo = xe.defineTheme("light", {
4551
4551
  cursorColour: ""
4552
4552
  }
4553
4553
  });
4554
- function Fo(e) {
4554
+ function Ho(e) {
4555
4555
  const o = w();
4556
4556
  switch (console.log(o), e) {
4557
4557
  case "light":
4558
- o.setTheme(Yo);
4558
+ o.setTheme(Fo);
4559
4559
  break;
4560
4560
  case "dark":
4561
- o.setTheme(Ko);
4561
+ o.setTheme(wo);
4562
4562
  break;
4563
4563
  }
4564
4564
  }
@@ -5201,7 +5201,7 @@ const me = {
5201
5201
  type: "text_reverse_v1"
5202
5202
  }
5203
5203
  ]
5204
- }, wo = {
5204
+ }, Go = {
5205
5205
  kind: "category",
5206
5206
  name: "%{BKY_CATEGORY_TIME}",
5207
5207
  categorystyle: "time_category",
@@ -5225,7 +5225,7 @@ const me = {
5225
5225
  }
5226
5226
  }
5227
5227
  ]
5228
- }, Ho = {
5228
+ }, $o = {
5229
5229
  kind: "categoryToolbox",
5230
5230
  contents: [
5231
5231
  {
@@ -5241,7 +5241,7 @@ const me = {
5241
5241
  Oe,
5242
5242
  ye,
5243
5243
  me,
5244
- wo,
5244
+ Go,
5245
5245
  {
5246
5246
  kind: "category",
5247
5247
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -5258,10 +5258,10 @@ const me = {
5258
5258
  kind: "category",
5259
5259
  name: "%{BKY_CATEGORY_INTERFACE}",
5260
5260
  categorystyle: "interface_category",
5261
- custom: Ao.name
5261
+ custom: ko.name
5262
5262
  }
5263
5263
  ]
5264
- }, Go = {
5264
+ }, jo = {
5265
5265
  kind: "categoryToolbox",
5266
5266
  contents: [
5267
5267
  Ie,
@@ -5284,7 +5284,7 @@ const me = {
5284
5284
  custom: k.name
5285
5285
  }
5286
5286
  ]
5287
- }, $o = {
5287
+ }, Xo = {
5288
5288
  kind: "categoryToolbox",
5289
5289
  contents: [
5290
5290
  Ie,
@@ -5307,7 +5307,7 @@ const me = {
5307
5307
  custom: k.name
5308
5308
  }
5309
5309
  ]
5310
- }, jo = /* @__PURE__ */ W({
5310
+ }, Wo = /* @__PURE__ */ W({
5311
5311
  __name: "index",
5312
5312
  setup(e) {
5313
5313
  const o = () => {
@@ -5323,12 +5323,12 @@ const me = {
5323
5323
  class: "mr-3",
5324
5324
  variant: "outlined",
5325
5325
  density: "comfortable",
5326
- icon: C(Rt),
5326
+ icon: C(Mt),
5327
5327
  onClick: o
5328
5328
  }, null, 8, ["icon"]);
5329
5329
  };
5330
5330
  }
5331
- }), Xo = /* @__PURE__ */ W({
5331
+ }), Jo = /* @__PURE__ */ W({
5332
5332
  __name: "index",
5333
5333
  props: {
5334
5334
  modelValue: { type: Boolean, required: !0 },
@@ -5343,15 +5343,15 @@ const me = {
5343
5343
  class: "mr-3",
5344
5344
  variant: "outlined",
5345
5345
  density: "comfortable",
5346
- icon: o.value ? C(Vt) : C(Ut),
5346
+ icon: o.value ? C(Pt) : C(xt),
5347
5347
  onClick: n[0] || (n[0] = (a) => o.value = !o.value)
5348
5348
  }, null, 8, ["icon"]);
5349
5349
  };
5350
5350
  }
5351
- }), Wo = {
5351
+ }), zo = {
5352
5352
  key: 1,
5353
5353
  class: "text-caption text-grey"
5354
- }, Jo = /* @__PURE__ */ W({
5354
+ }, Qo = /* @__PURE__ */ W({
5355
5355
  __name: "index",
5356
5356
  setup(e) {
5357
5357
  const { t: o } = Ye(), t = ne([]), n = () => {
@@ -5414,13 +5414,13 @@ const me = {
5414
5414
  }, 1032, ["active", "onClick"]))), 128))
5415
5415
  ]),
5416
5416
  _: 1
5417
- })) : (L(), X("span", Wo, pe(C(o)("x-block-lib.noOption")), 1));
5417
+ })) : (L(), X("span", zo, pe(C(o)("x-block-lib.noOption")), 1));
5418
5418
  };
5419
5419
  }
5420
- }), zo = { class: "text-subtitle-1 ml-3" }, Qo = /* @__PURE__ */ W({
5420
+ }), qo = { class: "text-subtitle-1 ml-3" }, Zo = /* @__PURE__ */ W({
5421
5421
  __name: "index",
5422
5422
  setup(e) {
5423
- const { t: o } = Ye(), t = Bt(), { sysBarAvail: n } = bt(), { backgroundColor1: i } = kt(), a = S(() => {
5423
+ const { t: o } = Ye(), t = St(), { sysBarAvail: n } = kt(), { backgroundColor1: i } = Nt(), a = S(() => {
5424
5424
  let h = "100%";
5425
5425
  return t.mdAndUp.value && (h = "400px"), {
5426
5426
  background: i.value,
@@ -5452,7 +5452,7 @@ const me = {
5452
5452
  B(g, pt(b, {
5453
5453
  variant: "outlined",
5454
5454
  density: "comfortable",
5455
- icon: C(Pt)
5455
+ icon: C(Dt)
5456
5456
  }), null, 16, ["icon"])
5457
5457
  ]),
5458
5458
  default: K(() => [
@@ -5477,10 +5477,10 @@ const me = {
5477
5477
  }, {
5478
5478
  default: K(() => [
5479
5479
  B(M, {
5480
- icon: C(St),
5480
+ icon: C(Vt),
5481
5481
  onClick: T[0] || (T[0] = (b) => p.value = !1)
5482
5482
  }, null, 8, ["icon"]),
5483
- V("span", zo, pe(C(o)("x-block-lib.navigator")), 1)
5483
+ V("span", qo, pe(C(o)("x-block-lib.navigator")), 1)
5484
5484
  ]),
5485
5485
  _: 1
5486
5486
  }),
@@ -5488,7 +5488,7 @@ const me = {
5488
5488
  class: "overflow-y-auto",
5489
5489
  style: F(r.value)
5490
5490
  }, [
5491
- B(Jo),
5491
+ B(Qo),
5492
5492
  V("div", {
5493
5493
  style: F(c.value)
5494
5494
  }, null, 4)
@@ -5523,10 +5523,10 @@ const me = {
5523
5523
  wheel: !0
5524
5524
  }
5525
5525
  };
5526
- function qo(e, o, t) {
5526
+ function en(e, o, t) {
5527
5527
  let n;
5528
- o === "app" ? t === "v1" && (n = Ho) : o === "func" ? t === "v1" && (n = $o) : o === "flow" && t === "v1" && (n = Go), console.assert(!!n), Ve.toolbox = n;
5529
- const i = Lt(e, Ve);
5528
+ o === "app" ? t === "v1" && (n = $o) : o === "func" ? t === "v1" && (n = Xo) : o === "flow" && t === "v1" && (n = jo), console.assert(!!n), Ve.toolbox = n;
5529
+ const i = yt(e, Ve);
5530
5530
  return o === "app" ? t === "v1" && (i.registerToolboxCategoryCallback(
5531
5531
  de.name,
5532
5532
  de.callback
@@ -5550,7 +5550,7 @@ function qo(e, o, t) {
5550
5550
  N.callback
5551
5551
  )), i;
5552
5552
  }
5553
- const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5553
+ const tn = { class: "position-relative w-100 h-100" }, on = /* @__PURE__ */ W({
5554
5554
  __name: "index",
5555
5555
  props: /* @__PURE__ */ ve({
5556
5556
  type: {},
@@ -5563,7 +5563,7 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5563
5563
  }),
5564
5564
  emits: /* @__PURE__ */ ve(["ready", "change"], ["update:lock", "update:scale"]),
5565
5565
  setup(e, { expose: o, emit: t }) {
5566
- const n = Nt(), { locale: i, dark: a } = Ct(n), { open: r } = De("blocklyEditorFlyout"), c = ue(e, "lock"), p = ue(e, "scale"), h = e, T = t, g = Tt("blocklyDiv");
5566
+ const n = Bt(), { locale: i, dark: a } = vt(n), { open: r } = De("blocklyEditorFlyout"), c = ue(e, "lock"), p = ue(e, "scale"), h = e, T = t, g = Tt("blocklyDiv");
5567
5567
  let d;
5568
5568
  const M = ne(!1), H = ne(!1), b = S(() => ({
5569
5569
  position: "absolute",
@@ -5593,15 +5593,15 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5593
5593
  M.value = !0, be.workspaces.load(m, d);
5594
5594
  }, Je = () => be.workspaces.save(d), ze = () => s.workspaceToCode(d);
5595
5595
  fe(async () => {
5596
- await Me(i.value), d = qo(g.value, h.type, h.version), d.addChangeListener(E.disableOrphans), d.addChangeListener(Qe), d.setScale(p.value), T("ready");
5597
- }), dt(() => {
5596
+ await Me(i.value), d = en(g.value, h.type, h.version), d.addChangeListener(E.disableOrphans), d.addChangeListener(Qe), d.setScale(p.value), await dt(), T("ready");
5597
+ }), ft(() => {
5598
5598
  r.value = !1;
5599
- }), Ht(g, () => {
5600
- d && yt(d);
5599
+ }), $t(g, () => {
5600
+ d && Ct(d);
5601
5601
  });
5602
- function Qe(m) {
5602
+ async function Qe(m) {
5603
5603
  if (m.type === E.FINISHED_LOADING) {
5604
- Ro(), M.value = !1;
5604
+ Mo(), await Rt(100), M.value = !1;
5605
5605
  return;
5606
5606
  }
5607
5607
  M.value || (m.type === E.VIEWPORT_CHANGE && (p.value = d.getScale()), m.type === E.BLOCK_DRAG && (m.isStart ? H.value = !0 : H.value = !1), T("change"));
@@ -5609,7 +5609,7 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5609
5609
  return j(i, (m) => {
5610
5610
  Me(m);
5611
5611
  }), j(a, (m) => {
5612
- Fo(m ? "dark" : "light");
5612
+ Ho(m ? "dark" : "light");
5613
5613
  }), j(r, (m) => {
5614
5614
  var R;
5615
5615
  m || (R = d.getToolbox()) == null || R.clearSelection();
@@ -5617,7 +5617,7 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5617
5617
  d.setScale(m);
5618
5618
  }), o({ loading: M, resize: Xe, load: We, save: Je, generateCode: ze }), (m, R) => {
5619
5619
  const qe = v("v-icon"), Ze = v("x-loading");
5620
- return L(), X("div", Zo, [
5620
+ return L(), X("div", tn, [
5621
5621
  V("div", {
5622
5622
  id: "blocklyEditor",
5623
5623
  ref_key: "blocklyDiv",
@@ -5630,7 +5630,7 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5630
5630
  style: F(b.value)
5631
5631
  }, [
5632
5632
  B(qe, {
5633
- icon: C(Mt),
5633
+ icon: C(Ut),
5634
5634
  size: "x-large"
5635
5635
  }, null, 8, ["icon"])
5636
5636
  ], 4)) : ee("", !0),
@@ -5642,12 +5642,12 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5642
5642
  class: "d-flex align-end pt-3 pr-3",
5643
5643
  style: F(je.value)
5644
5644
  }, [
5645
- B(jo),
5646
- B(Xo, {
5645
+ B(Wo),
5646
+ B(Jo, {
5647
5647
  modelValue: c.value,
5648
5648
  "onUpdate:modelValue": R[0] || (R[0] = (et) => c.value = et)
5649
5649
  }, null, 8, ["modelValue"]),
5650
- B(Qo)
5650
+ B(Zo)
5651
5651
  ], 4),
5652
5652
  M.value ? (L(), x(Ze, {
5653
5653
  key: 2,
@@ -5656,16 +5656,16 @@ const Zo = { class: "position-relative w-100 h-100" }, en = /* @__PURE__ */ W({
5656
5656
  ]);
5657
5657
  };
5658
5658
  }
5659
- }), tn = (e) => {
5660
- e.component("XBlockly", en);
5659
+ }), nn = (e) => {
5660
+ e.component("XBlockly", on);
5661
5661
  };
5662
- async function _n(e) {
5662
+ async function pn(e) {
5663
5663
  return (await Fe(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en-hf8d9jpk.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans-kicfou8k.js") }), `./locales/${e}/index.ts`, 4)).default;
5664
5664
  }
5665
- const un = { install: tn };
5665
+ const Tn = { install: nn };
5666
5666
  export {
5667
- en as XBlockly,
5668
- un as default,
5669
- tn as install,
5670
- _n as loadLocaleMessageBlock
5667
+ on as XBlockly,
5668
+ Tn as default,
5669
+ nn as install,
5670
+ pn as loadLocaleMessageBlock
5671
5671
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.4.16",
4
+ "version": "0.4.18",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",