x-block-lib 0.8.18 → 0.8.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,13 +6,13 @@
6
6
  Website: https://highlightjs.org/
7
7
  License: see project LICENSE
8
8
  Touched: 2021
9
- */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-a998c1ee]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
10
- import { E as A, r as hn, M as Bn, s as Io, a as Oo, X as bn, u as y, B as T, j as s, O as c, F as I, b as Ye, i as C, c as _t, d as vo, e as M, f as m, g as Co, h as K, k as ut, p as bt, l as z, m as fn, n as B, C as Pn, N as Z, o as yo, P as we, q as be, V as It, t as Rn, W as ko, v as No, w as Lo, S as So, x as Bo, y as bo, z as Ft, T as he, A as Dn, D as Po, G as Ro, H as Mn, I as Do, J as Mo, K as Uo, L as Vo, Q as xo, R as Fo, U as Yo, Y as wo } from "./vendor.txua272r.js";
9
+ */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-6cb62cd6]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
10
+ import { E as A, r as hn, M as Bn, s as Io, a as Oo, X as bn, u as y, B as T, j as s, O as c, F as I, b as xe, i as C, c as _t, d as vo, e as M, f as m, g as Co, h as K, k as ut, p as bt, l as z, m as fn, n as B, C as Pn, N as Z, o as yo, P as Fe, q as Se, V as It, t as Rn, W as ko, v as No, w as Lo, S as So, x as Bo, y as bo, z as xt, T as pe, A as Dn, D as Po, G as Ro, H as Mn, I as Do, J as Mo, K as Uo, L as Vo, Q as xo, R as Fo, U as Yo, Y as wo } from "./vendor.txua272r.js";
11
11
  import { globalState as E } from "x-state-lib";
12
- import { globalObjects as Et, openConfirmDlg as Ko, openPromptDlg as $o, messageWarning as Un, useColor as Yt, useSystem as Vn, useViewStack as ze, eventBus as At } from "x-essential-lib";
13
- import { pkgs as qt, parsePixelStr as Ho, parsePercentStr as Go, getPropTag as Nt, unwrapEventId as Qt, elements as J, makeEventId as jt, toEventName as fe, unwrapMethodId as Dt, makeMethodId as Ke, toMethodName as Ze, unwrapPropertyId as tn, makePropertyId as Pe, toPropertyName as xn, isLocaleOfEventKind as Wo, isLocaleOfMethodKind as Fn, makeTriggerId as mt } from "x-runtime-lib";
14
- import { provide as jo, inject as Xo, defineComponent as nt, resolveComponent as D, createBlock as tt, openBlock as S, unref as R, withCtx as et, createVNode as L, mergeProps as en, useModel as Mt, ref as Ot, computed as Y, resolveDirective as Jo, withDirectives as qo, createElementBlock as X, normalizeStyle as G, createElementVNode as w, createCommentVNode as ot, toDisplayString as Ut, withModifiers as Pt, mergeModels as $e, Fragment as Yn, renderList as Qo, useId as He, onUnmounted as zo, useTemplateRef as Rt, withKeys as wn, isRef as Xt, onMounted as mn, nextTick as Zo, onBeforeUnmount as Tn, watch as St, renderSlot as ti } from "vue";
15
- import { useI18n as wt } from "vue-i18n";
12
+ import { globalObjects as Et, openConfirmDlg as Ko, openPromptDlg as Ho, messageWarning as Un, useColor as Ft, useSystem as Vn, useViewStack as qe, eventBus as At } from "x-essential-lib";
13
+ import { pkgs as Jt, parsePixelStr as $o, parsePercentStr as Go, getPropTag as Nt, unwrapEventId as Qe, elements as J, makeEventId as Wt, toEventName as de, unwrapMethodId as ze, makeMethodId as Ye, toMethodName as Ze, unwrapPropertyId as tn, makePropertyId as Be, toPropertyName as xn, isLocaleOfEventKind as Wo, isLocaleOfMethodKind as Fn, makeTriggerId as mt } from "x-runtime-lib";
14
+ import { provide as jo, inject as Xo, defineComponent as nt, resolveComponent as D, createBlock as tt, openBlock as S, unref as R, withCtx as et, createVNode as L, mergeProps as en, useModel as Dt, ref as Ot, computed as Y, resolveDirective as Jo, withDirectives as qo, createElementBlock as X, normalizeStyle as G, createElementVNode as w, createCommentVNode as ot, toDisplayString as Mt, withModifiers as Pt, mergeModels as we, Fragment as Yn, renderList as Qo, useId as Ke, onUnmounted as zo, useTemplateRef as Rt, withKeys as wn, isRef as jt, onMounted as mn, nextTick as Zo, onBeforeUnmount as Tn, watch as St, renderSlot as ti } from "vue";
15
+ import { useI18n as Yt } from "vue-i18n";
16
16
  import { useDisplay as ei } from "vuetify";
17
17
  var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
18
18
  class Kn extends A.Abstract {
@@ -23,28 +23,28 @@ hn.register(
23
23
  "state_change",
24
24
  Kn
25
25
  );
26
- const $n = (t, e, n) => {
26
+ const Hn = (t, e, n) => {
27
27
  const o = t[e];
28
28
  return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
29
29
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
30
30
  });
31
31
  };
32
32
  async function En(t) {
33
- const e = await $n(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.jq2w67rd.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.hsanc2zi.js") }), `./msg/${t}.ts`, 3);
33
+ const e = await Hn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.jq2w67rd.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.hsanc2zi.js") }), `./msg/${t}.ts`, 3);
34
34
  Io(e.default);
35
35
  }
36
36
  function p(t) {
37
37
  return Bn[t] ?? t;
38
38
  }
39
- const vt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", zt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
40
- function me(t) {
39
+ const vt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", qt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
40
+ function he(t) {
41
41
  const e = t.lastIndexOf("V");
42
42
  if (e <= 0 || e >= t.length - 1)
43
43
  return console.assert(!1, `invalid key=${t}`), "";
44
44
  const n = Oo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
45
45
  return `${n}_${o}`;
46
46
  }
47
- function Zt(t) {
47
+ function Qt(t) {
48
48
  const e = t.lastIndexOf("V");
49
49
  if (e <= 0 || e >= t.length - 1)
50
50
  return console.assert(!1, `invalid key=${t}`), "";
@@ -60,13 +60,13 @@ function ni(t) {
60
60
  e++, t = t.getParent();
61
61
  return e;
62
62
  }
63
- function Hn(t) {
63
+ function $n(t) {
64
64
  return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
65
65
  }
66
- function te(t, e) {
66
+ function zt(t, e) {
67
67
  return !!(t.startsWith("basic.") || !e.ui || e.readonly);
68
68
  }
69
- function Re(t) {
69
+ function be(t) {
70
70
  const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
71
71
  return y.xml.textToDom(e);
72
72
  }
@@ -77,15 +77,15 @@ function gn(t) {
77
77
  function oi(t) {
78
78
  return y.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
79
79
  }
80
- function Ge(t, e) {
80
+ function He(t, e) {
81
81
  let n = null;
82
- return e === "string" ? n = Re("") : e === "integer" || e === "decimal" ? n = gn(0) : e === "boolean" ? n = oi() : e === "enum" || e === "dateTime" ? n = Re("") : console.assert(!1), n ? bn.domToBlock(n, t) : null;
82
+ return e === "string" ? n = be("") : e === "integer" || e === "decimal" ? n = gn(0) : e === "boolean" ? n = oi() : e === "enum" || e === "dateTime" ? n = be("") : console.assert(!1), n ? bn.domToBlock(n, t) : null;
83
83
  }
84
84
  function pt(t) {
85
85
  return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
86
86
  }
87
87
  function ii(t) {
88
- return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? Zt(t.items) : t.ui === "multiTypes" ? Zt(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
88
+ return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? Qt(t.items) : t.ui === "multiTypes" ? Qt(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
89
89
  }
90
90
  function Gn(t) {
91
91
  return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
@@ -126,11 +126,11 @@ function ct(t) {
126
126
  const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
127
127
  return y.xml.textToDom(e);
128
128
  }
129
- function ee(t) {
129
+ function Zt(t) {
130
130
  const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
131
131
  return y.xml.textToDom(e);
132
132
  }
133
- function ne(t) {
133
+ function te(t) {
134
134
  const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
135
135
  return y.xml.textToDom(e);
136
136
  }
@@ -141,11 +141,11 @@ function ai() {
141
141
  return y.xml.textToDom('<shadow type="object_create_v1"></shadow>');
142
142
  }
143
143
  function ci(t) {
144
- const e = `<shadow type="${me(t)}"></shadow>`;
144
+ const e = `<shadow type="${he(t)}"></shadow>`;
145
145
  return y.xml.textToDom(e);
146
146
  }
147
147
  function ui(t) {
148
- const e = `<shadow type="${me(t)}"></shadow>`;
148
+ const e = `<shadow type="${he(t)}"></shadow>`;
149
149
  return y.xml.textToDom(e);
150
150
  }
151
151
  function li(t) {
@@ -157,11 +157,11 @@ function ri() {
157
157
  }
158
158
  function dt(t) {
159
159
  let e = null;
160
- return t === "string" ? e = ct("") : t === "number" ? e = ee(0) : t === "boolean" ? e = ne(!1) : t === "array" ? e = si() : t === "object" ? e = ai() : console.assert(!1), e;
160
+ return t === "string" ? e = ct("") : t === "number" ? e = Zt(0) : t === "boolean" ? e = te(!1) : t === "array" ? e = si() : t === "object" ? e = ai() : console.assert(!1), e;
161
161
  }
162
162
  function _i(t) {
163
163
  let e = null;
164
- return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = ct(t.default) : t.ui === "numInput" ? e = ee(t.default) : t.ui === "switch" ? e = ne(t.default) : t.ui === "select" ? e = ci(t.items) : t.ui === "multiTypes" ? e = ui(t.types) : t.ui === "compSelect" ? e = ri() : t.ui === "colorPicker" ? e = li(t.default ?? "#ff0000") : console.assert(!1), e;
164
+ return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = ct(t.default) : t.ui === "numInput" ? e = Zt(t.default) : t.ui === "switch" ? e = te(t.default) : t.ui === "select" ? e = ci(t.items) : t.ui === "multiTypes" ? e = ui(t.types) : t.ui === "compSelect" ? e = ri() : t.ui === "colorPicker" ? e = li(t.default ?? "#ff0000") : console.assert(!1), e;
165
165
  }
166
166
  function pi() {
167
167
  const { activeObject: t, activePage: e } = E.app, n = [];
@@ -252,7 +252,7 @@ s.forBlock.get_page_argument_v1 = function(t) {
252
252
  return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, c.FUNCTION_CALL];
253
253
  };
254
254
  const fi = (t, e) => {
255
- const n = me(t), o = Zt(t);
255
+ const n = he(t), o = Qt(t);
256
256
  T[n] = {
257
257
  init: function() {
258
258
  this.appendDummyInput().appendField(
@@ -271,13 +271,13 @@ const fi = (t, e) => {
271
271
  return [a(u), c.ATOMIC];
272
272
  };
273
273
  };
274
- for (const t in qt) {
275
- const e = qt[t];
274
+ for (const t in Jt) {
275
+ const e = Jt[t];
276
276
  for (const n in e.items)
277
277
  fi(n, e.items[n]);
278
278
  }
279
279
  const mi = (t, e) => {
280
- const n = me(t), o = Zt(t);
280
+ const n = he(t), o = Qt(t);
281
281
  T[n] = {
282
282
  init: function() {
283
283
  this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
@@ -329,8 +329,8 @@ const mi = (t, e) => {
329
329
  i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
330
330
  let l, r;
331
331
  if (u.ui === "pixelInput") {
332
- const _ = Ho(this.value) ?? 0;
333
- l = new Ye(
332
+ const _ = $o(this.value) ?? 0;
333
+ l = new xe(
334
334
  _,
335
335
  u.min,
336
336
  u.max,
@@ -341,7 +341,7 @@ const mi = (t, e) => {
341
341
  ), r = "px";
342
342
  } else if (u.ui === "percentInput") {
343
343
  const _ = Go(this.value) ?? 0;
344
- l = new Ye(
344
+ l = new xe(
345
345
  _,
346
346
  u.min,
347
347
  u.max,
@@ -366,8 +366,8 @@ const mi = (t, e) => {
366
366
  return [a(i.value), c.ATOMIC];
367
367
  };
368
368
  };
369
- for (const t in qt) {
370
- const e = qt[t];
369
+ for (const t in Jt) {
370
+ const e = Jt[t];
371
371
  for (const n in e.types)
372
372
  mi(n, e.types[n]);
373
373
  }
@@ -519,18 +519,18 @@ function Ii() {
519
519
  t.push([o, n]);
520
520
  }), k(t);
521
521
  }
522
- function We(t) {
522
+ function $e(t) {
523
523
  const e = E.app.appList.find((n) => n.id === t);
524
524
  return e ? e.pages : [];
525
525
  }
526
- function De(t, e) {
526
+ function Pe(t, e) {
527
527
  const n = E.app.appList.find((o) => o.id === t);
528
528
  if (n)
529
529
  return n.pages.find((o) => o.id === e);
530
530
  }
531
531
  function Oi(t) {
532
532
  const e = [];
533
- return We(t).forEach(({ id: o, name: i }) => {
533
+ return $e(t).forEach(({ id: o, name: i }) => {
534
534
  e.push([i, o]);
535
535
  }), k(e);
536
536
  }
@@ -554,13 +554,13 @@ function vi() {
554
554
  o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
555
555
  }), k(e);
556
556
  }
557
- function Te(t) {
557
+ function fe(t) {
558
558
  const e = [];
559
559
  for (const { id: n, name: o, type: i } of t)
560
560
  e.push({ key: n, name: o, type: i });
561
561
  return e;
562
562
  }
563
- function je(t) {
563
+ function Ge(t) {
564
564
  const { props: e } = E.runtime, { activeObject: n, depends: o } = E.app, i = [], a = Nt(n.type, n.subtype);
565
565
  if (!a)
566
566
  return i;
@@ -572,17 +572,19 @@ function je(t) {
572
572
  return console.assert(!1, "invalid element", u.key), i;
573
573
  for (const { key: r, name: _, params: d } of l.events)
574
574
  i.push({
575
- id: jt("elementEvent", t, r),
575
+ id: Wt("elementEvent", t, r),
576
+ kind: "elementEvent",
576
577
  names: [_],
577
578
  params: d
578
579
  });
579
580
  if (e[l.key] && e[l.key][a])
580
581
  for (const { keys: r, names: _, raw: d } of e[l.key][a]) {
581
- if (te(r, d))
582
+ if (zt(r, d))
582
583
  continue;
583
- const h = Hn(d);
584
+ const h = $n(d);
584
585
  i.push({
585
- id: jt("elementPropertyChangeEvent", t, r),
586
+ id: Wt("elementPropertyChangeEvent", t, r),
587
+ kind: "elementPropertyChangeEvent",
586
588
  names: _,
587
589
  params: [
588
590
  { key: "newValue", name: "x-runtime-lib.newValue", type: h },
@@ -595,18 +597,19 @@ function je(t) {
595
597
  if (r)
596
598
  for (const { id: _, name: d, params: h } of r.meta.events)
597
599
  i.push({
598
- id: jt("refEvent", t, _),
600
+ id: Wt("refEvent", t, _),
601
+ kind: "refEvent",
599
602
  names: [d],
600
- params: Te(h)
603
+ params: fe(h)
601
604
  });
602
605
  }
603
606
  return l.key.startsWith("globality_v") && n.type, i;
604
607
  }
605
- function Me(t) {
608
+ function Re(t) {
606
609
  const { props: e } = E.runtime, { activeObject: n, depends: o } = E.app, i = Nt(n.type, n.subtype);
607
610
  if (!i)
608
611
  return;
609
- const { kind: a, nodeId: u, eventKey: l } = Qt(t), r = n.nodes.find((d) => d.id === u);
612
+ const { kind: a, nodeId: u, eventKey: l } = Qe(t), r = n.nodes.find((d) => d.id === u);
610
613
  if (!r)
611
614
  return;
612
615
  const _ = J[r.key];
@@ -619,6 +622,7 @@ function Me(t) {
619
622
  if (d)
620
623
  return {
621
624
  id: t,
625
+ kind: a,
622
626
  names: [d.name],
623
627
  params: d.params
624
628
  };
@@ -628,9 +632,10 @@ function Me(t) {
628
632
  (h) => h.keys === l
629
633
  );
630
634
  if (d) {
631
- const h = Hn(d.raw);
635
+ const h = $n(d.raw);
632
636
  return {
633
637
  id: t,
638
+ kind: a,
634
639
  names: d.names,
635
640
  params: [
636
641
  { key: "newValue", name: "x-runtime-lib.newValue", type: h },
@@ -647,17 +652,18 @@ function Me(t) {
647
652
  if (h)
648
653
  return {
649
654
  id: t,
655
+ kind: a,
650
656
  names: [h.name],
651
- params: Te(h.params)
657
+ params: fe(h.params)
652
658
  };
653
659
  }
654
660
  }
655
661
  } else a === "customEvent" && _.key.startsWith("globality_v") && n.type;
656
662
  }
657
663
  function Ci(t) {
658
- const e = [], n = je(t);
659
- for (const { id: o, names: i } of n)
660
- e.push([fe(o, i), o]);
664
+ const e = [], n = Ge(t);
665
+ for (const { id: o, kind: i, names: a } of n)
666
+ e.push([de(i, a), o]);
661
667
  return k(e);
662
668
  }
663
669
  function Jn() {
@@ -665,14 +671,15 @@ function Jn() {
665
671
  if (t.type === "comp")
666
672
  for (const { id: o, name: i, params: a } of e.meta.events)
667
673
  n.push({
668
- id: jt("customEvent", "globality", o),
674
+ id: Wt("customEvent", "globality", o),
675
+ kind: "customEvent",
669
676
  names: [i],
670
- params: Te(a)
677
+ params: fe(a)
671
678
  });
672
679
  return n;
673
680
  }
674
681
  function vn(t) {
675
- const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } = Qt(t);
682
+ const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } = Qe(t);
676
683
  if (o === "customEvent" && i === "globality" && e.type === "comp") {
677
684
  const u = n.meta.events.find(
678
685
  (l) => l.id === a
@@ -680,30 +687,31 @@ function vn(t) {
680
687
  if (u)
681
688
  return {
682
689
  id: t,
690
+ kind: o,
683
691
  names: [u.name],
684
- params: Te(u.params)
692
+ params: fe(u.params)
685
693
  };
686
694
  }
687
695
  }
688
696
  function yi() {
689
697
  const t = [], e = Jn();
690
- for (const { id: n, names: o } of e)
691
- t.push([fe(n, o), n]);
698
+ for (const { id: n, kind: o, names: i } of e)
699
+ t.push([de(o, i), n]);
692
700
  return k(t);
693
701
  }
694
- function Ee(t) {
702
+ function me(t) {
695
703
  const e = [];
696
704
  for (const { id: n, name: o, type: i } of t)
697
705
  e.push({ key: n, name: o, type: i });
698
706
  return e;
699
707
  }
700
- function ge(t) {
708
+ function Te(t) {
701
709
  const e = [];
702
710
  for (const { id: n, name: o, type: i } of t)
703
711
  e.push({ key: n, name: o, type: i });
704
712
  return e;
705
713
  }
706
- function Xe(t) {
714
+ function We(t) {
707
715
  const { activeObject: e, depends: n } = E.app, o = [], i = e.nodes.find((u) => u.id === t);
708
716
  if (!i)
709
717
  return o;
@@ -712,7 +720,8 @@ function Xe(t) {
712
720
  return console.assert(!1, "inavlid element", i.key), o;
713
721
  for (const { key: u, name: l, inputs: r, outputs: _ } of a.methods)
714
722
  o.push({
715
- id: Ke("elementMethod", t, u),
723
+ id: Ye("elementMethod", t, u),
724
+ kind: "elementMethod",
716
725
  names: [l],
717
726
  inputs: r,
718
727
  outputs: _
@@ -722,16 +731,17 @@ function Xe(t) {
722
731
  if (u)
723
732
  for (const { id: l, name: r, inputs: _, outputs: d } of u.meta.methods)
724
733
  o.push({
725
- id: Ke("refMethod", t, l),
734
+ id: Ye("refMethod", t, l),
735
+ kind: "refMethod",
726
736
  names: [r],
727
- inputs: Ee(_),
728
- outputs: ge(d)
737
+ inputs: me(_),
738
+ outputs: Te(d)
729
739
  });
730
740
  }
731
741
  return a.key.startsWith("globality_v") && e.type, o;
732
742
  }
733
- function Ue(t) {
734
- const { activeObject: e, depends: n } = E.app, { kind: o, nodeId: i, methodKey: a } = Dt(t), u = e.nodes.find((r) => r.id === i);
743
+ function De(t) {
744
+ const { activeObject: e, depends: n } = E.app, { kind: o, nodeId: i, methodKey: a } = ze(t), u = e.nodes.find((r) => r.id === i);
735
745
  if (!u)
736
746
  return;
737
747
  const l = J[u.key];
@@ -744,6 +754,7 @@ function Ue(t) {
744
754
  if (r)
745
755
  return {
746
756
  id: t,
757
+ kind: o,
747
758
  names: [r.name],
748
759
  inputs: r.inputs,
749
760
  outputs: r.outputs
@@ -758,18 +769,19 @@ function Ue(t) {
758
769
  if (_)
759
770
  return {
760
771
  id: t,
772
+ kind: o,
761
773
  names: [_.name],
762
- inputs: Ee(_.inputs),
763
- outputs: ge(_.outputs)
774
+ inputs: me(_.inputs),
775
+ outputs: Te(_.outputs)
764
776
  };
765
777
  }
766
778
  }
767
779
  } else o === "customMethod" && l.key.startsWith("globality_v") && e.type;
768
780
  }
769
781
  function ki(t) {
770
- const e = [], n = Xe(t);
771
- for (const { id: o, names: i } of n)
772
- e.push([Ze(o, i), o]);
782
+ const e = [], n = We(t);
783
+ for (const { id: o, kind: i, names: a } of n)
784
+ e.push([Ze(i, a), o]);
773
785
  return k(e);
774
786
  }
775
787
  function on() {
@@ -777,15 +789,16 @@ function on() {
777
789
  if (t.type === "comp")
778
790
  for (const { id: o, name: i, inputs: a, outputs: u } of e.meta.methods)
779
791
  n.push({
780
- id: Ke("customMethod", "globality", o),
792
+ id: Ye("customMethod", "globality", o),
793
+ kind: "customMethod",
781
794
  names: [i],
782
- inputs: Ee(a),
783
- outputs: ge(u)
795
+ inputs: me(a),
796
+ outputs: Te(u)
784
797
  });
785
798
  return n;
786
799
  }
787
800
  function kt(t) {
788
- const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, methodKey: a } = Dt(t);
801
+ const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, methodKey: a } = ze(t);
789
802
  if (o === "customMethod" && i === "globality" && e.type === "comp") {
790
803
  const u = n.meta.methods.find(
791
804
  (l) => l.id === a
@@ -793,29 +806,30 @@ function kt(t) {
793
806
  if (u)
794
807
  return {
795
808
  id: t,
809
+ kind: o,
796
810
  names: [u.name],
797
- inputs: Ee(u.inputs),
798
- outputs: ge(u.outputs)
811
+ inputs: me(u.inputs),
812
+ outputs: Te(u.outputs)
799
813
  };
800
814
  }
801
815
  }
802
816
  function qn() {
803
817
  const t = [], e = on();
804
- for (const { id: n, names: o } of e)
805
- t.push([Ze(n, o), n]);
818
+ for (const { id: n, kind: o, names: i } of e)
819
+ t.push([Ze(o, i), n]);
806
820
  return k(t);
807
821
  }
808
- function Je(t) {
822
+ function je(t) {
809
823
  const e = kt(t);
810
824
  return e ? e.outputs : [];
811
825
  }
812
- function Ve(t, e) {
826
+ function Me(t, e) {
813
827
  const n = kt(t);
814
828
  if (n)
815
829
  return n.outputs.find((o) => o.key === e);
816
830
  }
817
831
  function Ni(t) {
818
- const e = [], n = Je(t);
832
+ const e = [], n = je(t);
819
833
  for (const { name: o, key: i } of n)
820
834
  e.push([o, i]);
821
835
  return k(e);
@@ -829,7 +843,7 @@ function Qn(t, e, n) {
829
843
  return !1;
830
844
  if (t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), o[t.key] && o[t.key][e]) {
831
845
  for (const { keys: u, raw: l } of o[t.key][e])
832
- if (!te(u, l))
846
+ if (!zt(u, l))
833
847
  return !1;
834
848
  }
835
849
  return t.key.startsWith("globality_v") && i.type, !0;
@@ -839,7 +853,7 @@ function Qn(t, e, n) {
839
853
  if (n === "getProp") {
840
854
  if (o[t.key] && o[t.key][e]) {
841
855
  for (const { keys: u, raw: l } of o[t.key][e])
842
- if (!te(u, l))
856
+ if (!zt(u, l))
843
857
  return !1;
844
858
  }
845
859
  return t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), !(t.key.startsWith("globality_v") && i.type === "comp" && a.meta.properties.length > 0);
@@ -863,7 +877,7 @@ function W(t) {
863
877
  }
864
878
  return !1;
865
879
  }
866
- function Kt(t) {
880
+ function wt(t) {
867
881
  const { activeObject: e } = E.app, n = [], o = Nt(e.type, e.subtype);
868
882
  if (!o)
869
883
  return n;
@@ -898,15 +912,15 @@ function lt(t) {
898
912
  alias: n.alias
899
913
  };
900
914
  }
901
- function Ae(t) {
902
- const { i18n: e } = Et, n = [], o = Kt(t);
915
+ function Ee(t) {
916
+ const { i18n: e } = Et, n = [], o = wt(t);
903
917
  for (const { id: i, name: a, alias: u } of o) {
904
918
  let l = e.global.t(a);
905
919
  u && (l += " / " + u), n.push([l, i]);
906
920
  }
907
921
  return k(n);
908
922
  }
909
- function Vt(t, e) {
923
+ function Ut(t, e) {
910
924
  const { props: n } = E.runtime, { activeObject: o, activeComp: i, depends: a } = E.app, u = [], l = Nt(o.type, o.subtype);
911
925
  if (!l)
912
926
  return u;
@@ -918,8 +932,9 @@ function Vt(t, e) {
918
932
  return console.assert(!1, "invalid element", r.key), u;
919
933
  if (n[_.key] && n[_.key][l])
920
934
  for (const { keys: d, names: h, raw: f } of n[_.key][l])
921
- e === "write" && te(d, f) || u.push({
922
- id: Pe("elementProperty", t, d),
935
+ e === "write" && zt(d, f) || u.push({
936
+ id: Be("elementProperty", t, d),
937
+ kind: "elementProperty",
923
938
  names: h,
924
939
  meta: {
925
940
  element: !0,
@@ -931,7 +946,8 @@ function Vt(t, e) {
931
946
  if (d)
932
947
  for (const { id: h, name: f, type: v } of d.meta.properties)
933
948
  u.push({
934
- id: Pe("refProperty", t, h),
949
+ id: Be("refProperty", t, h),
950
+ kind: "refProperty",
935
951
  names: [f],
936
952
  meta: {
937
953
  raw: { type: v }
@@ -941,7 +957,8 @@ function Vt(t, e) {
941
957
  if (_.key.startsWith("globality_v") && o.type === "comp")
942
958
  for (const { id: d, name: h, type: f } of i.meta.properties)
943
959
  u.push({
944
- id: Pe("customProperty", t, d),
960
+ id: Be("customProperty", t, d),
961
+ kind: "customProperty",
945
962
  names: [h],
946
963
  meta: {
947
964
  raw: { type: f }
@@ -969,6 +986,7 @@ function Tt(t) {
969
986
  if (h)
970
987
  return {
971
988
  id: t,
989
+ kind: u,
972
990
  names: h.names,
973
991
  meta: {
974
992
  element: !0,
@@ -986,6 +1004,7 @@ function Tt(t) {
986
1004
  if (f)
987
1005
  return {
988
1006
  id: t,
1007
+ kind: u,
989
1008
  names: [f.name],
990
1009
  meta: {
991
1010
  raw: { type: f.type }
@@ -1001,6 +1020,7 @@ function Tt(t) {
1001
1020
  if (h)
1002
1021
  return {
1003
1022
  id: t,
1023
+ kind: u,
1004
1024
  names: [h.name],
1005
1025
  meta: {
1006
1026
  raw: { type: h.type }
@@ -1010,16 +1030,16 @@ function Tt(t) {
1010
1030
  } else u === "elementSlotProperty" ? console.log("elementSlotProperty not implemented") : u === "customSlotProperty" && console.log("customSlotProperty not implemented");
1011
1031
  }
1012
1032
  function zn(t, e) {
1013
- const n = [], o = Vt(t, e);
1014
- for (const { id: i, names: a } of o)
1015
- n.push([xn(i, a), i]);
1033
+ const n = [], o = Ut(t, e);
1034
+ for (const { id: i, kind: a, names: u } of o)
1035
+ n.push([xn(a, u), i]);
1016
1036
  return k(n);
1017
1037
  }
1018
1038
  function sn() {
1019
1039
  const { activeObject: t, activePage: e, activeComp: n } = E.app;
1020
1040
  return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
1021
1041
  }
1022
- function oe(t) {
1042
+ function ee(t) {
1023
1043
  const { activeObject: e, activePage: n, activeComp: o } = E.app;
1024
1044
  if (e.type === "page")
1025
1045
  return n.meta.states.find((i) => i.id === t);
@@ -1040,6 +1060,7 @@ const Li = {
1040
1060
  alias: ""
1041
1061
  }, this.event = {
1042
1062
  id: "",
1063
+ kind: "elementEvent",
1043
1064
  names: [],
1044
1065
  params: []
1045
1066
  }, this.appendDummyInput().appendField("%{BKY_APP_V1_ON_APP_EVENT_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(
@@ -1050,16 +1071,16 @@ const Li = {
1050
1071
  initData_: function() {
1051
1072
  if (this.node.id)
1052
1073
  return;
1053
- const t = Kt("onEvent")?.[0];
1074
+ const t = wt("onEvent")?.[0];
1054
1075
  if (!t)
1055
1076
  return;
1056
1077
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
1057
1078
  const e = this.getField("NODE");
1058
1079
  e.getOptions(!1), e.setValue(this.node.id);
1059
- const n = je(this.node.id)?.[0];
1080
+ const n = Ge(this.node.id)?.[0];
1060
1081
  if (!n)
1061
1082
  return;
1062
- this.event.id = n.id, this.event.names = n.names, this.event.params = n.params;
1083
+ this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
1063
1084
  const o = this.getField("EVENT");
1064
1085
  o.getOptions(!1), o.setValue(this.event.id);
1065
1086
  },
@@ -1070,12 +1091,12 @@ const Li = {
1070
1091
  };
1071
1092
  },
1072
1093
  loadExtraState: function(t) {
1073
- this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.event.id = t.event?.id ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params ?? [], this.updateShape_(), setTimeout(() => {
1094
+ this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params ?? [], this.updateShape_(), setTimeout(() => {
1074
1095
  this.ensureBlocks_(), this.checkWarning_();
1075
1096
  }, 0);
1076
1097
  },
1077
1098
  genNodeOpts_: function() {
1078
- return Ae("onEvent");
1099
+ return Ee("onEvent");
1079
1100
  },
1080
1101
  genEventOpts_: function() {
1081
1102
  return Ci(this.node.id);
@@ -1099,15 +1120,15 @@ const Li = {
1099
1120
  const n = this.node.key !== e.key;
1100
1121
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
1101
1122
  const o = this.getField("EVENT");
1102
- if (o.getOptions(!1), n || !Me(this.event.id)) {
1103
- const i = je(this.node.id)?.[0];
1123
+ if (o.getOptions(!1), n || !Re(this.event.id)) {
1124
+ const i = Ge(this.node.id)?.[0];
1104
1125
  o.setValue(i?.id ?? "");
1105
1126
  }
1106
1127
  this.onEventChange_(o.getValue());
1107
1128
  },
1108
1129
  onEventChange_: function(t) {
1109
- const e = Me(t);
1110
- e ? (this.event.id = e.id, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
1130
+ const e = Re(t);
1131
+ e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "elementEvent", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
1111
1132
  this.ensureBlocks_();
1112
1133
  }, 0);
1113
1134
  },
@@ -1118,7 +1139,7 @@ const Li = {
1118
1139
  }
1119
1140
  for (let e = 0; e < this.event.params.length; e++)
1120
1141
  this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
1121
- const { kind: t } = Qt(this.event.id);
1142
+ const { kind: t } = Qe(this.event.id);
1122
1143
  if (t === "refEvent")
1123
1144
  this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
1124
1145
  else if (this.getInput("REF_KEY")) {
@@ -1129,10 +1150,10 @@ const Li = {
1129
1150
  ensureBlocks_: function() {
1130
1151
  if (this.isInsertionMarker())
1131
1152
  return;
1132
- const { kind: t } = Qt(this.event.id), e = Wo(t), n = [];
1133
- t === "refEvent" && n.push(["REF_KEY", "refKey", "x-runtime-lib.refKey", e]), this.event.params.forEach(({ key: o, name: i }, a) => {
1134
- n.push(["PARAM" + a, o, i, e]);
1135
- }), n.length > 0 && F(this, n);
1153
+ const t = Wo(this.event.kind), e = [];
1154
+ this.event.kind === "refEvent" && e.push(["REF_KEY", "refKey", "x-runtime-lib.refKey", t]), this.event.params.forEach(({ key: n, name: o }, i) => {
1155
+ e.push(["PARAM" + i, n, o, t]);
1156
+ }), e.length > 0 && F(this, e);
1136
1157
  },
1137
1158
  checkWarning_: function() {
1138
1159
  const t = lt(this.node.id);
@@ -1145,11 +1166,15 @@ const Li = {
1145
1166
  return;
1146
1167
  }
1147
1168
  t.alias !== this.node.alias && (this.node.alias = t.alias);
1148
- const e = Me(this.event.id);
1169
+ const e = Re(this.event.id);
1149
1170
  if (!e) {
1150
1171
  this.setWarningText(p("WARN_EVENT_NOT_FOUND"));
1151
1172
  return;
1152
1173
  }
1174
+ if (e.kind !== this.event.kind) {
1175
+ this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
1176
+ return;
1177
+ }
1153
1178
  if (M(e.names, this.event.names) || (this.event.names = e.names), !M(e.params, this.event.params)) {
1154
1179
  this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
1155
1180
  return;
@@ -1173,6 +1198,7 @@ const Si = {
1173
1198
  init: function() {
1174
1199
  this.event = {
1175
1200
  id: "",
1201
+ kind: "elementEvent",
1176
1202
  names: [],
1177
1203
  params: []
1178
1204
  }, this.appendDummyInput().appendField("%{BKY_APP_V1_TRIGGER_APP_EVENT_TITLE}").appendField(
@@ -1186,7 +1212,7 @@ const Si = {
1186
1212
  const t = Jn()?.[0];
1187
1213
  if (!t)
1188
1214
  return;
1189
- this.event.id = t.id, this.event.names = t.names, this.event.params = t.params;
1215
+ this.event.id = t.id, this.event.kind = t.kind, this.event.names = t.names, this.event.params = t.params;
1190
1216
  const e = this.getField("EVENT");
1191
1217
  e.getOptions(!1), e.setValue(this.event.id);
1192
1218
  },
@@ -1196,7 +1222,7 @@ const Si = {
1196
1222
  };
1197
1223
  },
1198
1224
  loadExtraState: function(t) {
1199
- this.event.id = t.event?.id ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params ?? [], this.updateShape_(), this.updateShadows_(), setTimeout(() => {
1225
+ this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "elementEvent", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params ?? [], this.updateShape_(), this.updateShadows_(), setTimeout(() => {
1200
1226
  this.checkWarning_();
1201
1227
  }, 0);
1202
1228
  },
@@ -1215,7 +1241,7 @@ const Si = {
1215
1241
  },
1216
1242
  onEventChange_: function(t) {
1217
1243
  const e = vn(t);
1218
- e ? (this.event.id = e.id, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.names = [], this.event.params = []);
1244
+ e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "elementEvent", this.event.names = [], this.event.params = []);
1219
1245
  },
1220
1246
  updateShape_: function() {
1221
1247
  for (let t = this.event.params.length; this.getInput("PARAM" + t); t++) {
@@ -1246,6 +1272,10 @@ const Si = {
1246
1272
  this.setWarningText(p("WARN_EVENT_NOT_FOUND"));
1247
1273
  return;
1248
1274
  }
1275
+ if (t.kind !== this.event.kind) {
1276
+ this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
1277
+ return;
1278
+ }
1249
1279
  if (M(t.names, this.event.names) || (this.event.names = t.names), !M(t.params, this.event.params)) {
1250
1280
  this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
1251
1281
  return;
@@ -1420,6 +1450,7 @@ const Pi = {
1420
1450
  alias: ""
1421
1451
  }, this.method = {
1422
1452
  id: "",
1453
+ kind: "elementMethod",
1423
1454
  names: [],
1424
1455
  inputs: [],
1425
1456
  outputs: []
@@ -1431,16 +1462,16 @@ const Pi = {
1431
1462
  initData_: function() {
1432
1463
  if (this.node.id)
1433
1464
  return;
1434
- const t = Kt("callMethod")?.[0];
1465
+ const t = wt("callMethod")?.[0];
1435
1466
  if (!t)
1436
1467
  return;
1437
1468
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
1438
1469
  const e = this.getField("NODE");
1439
1470
  e.getOptions(!1), e.setValue(this.node.id);
1440
- const n = Xe(this.node.id)?.[0];
1471
+ const n = We(this.node.id)?.[0];
1441
1472
  if (!n)
1442
1473
  return;
1443
- this.method.id = n.id, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
1474
+ this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
1444
1475
  const o = this.getField("METHOD");
1445
1476
  o.getOptions(!1), o.setValue(this.method.id);
1446
1477
  },
@@ -1451,12 +1482,12 @@ const Pi = {
1451
1482
  };
1452
1483
  },
1453
1484
  loadExtraState: function(t) {
1454
- this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.method.id = t.method?.id ?? "", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs ?? [], this.method.outputs = t.method?.outputs ?? [], this.updateShape_(), this.updateShadow_(), setTimeout(() => {
1485
+ this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "elementMethod", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs ?? [], this.method.outputs = t.method?.outputs ?? [], this.updateShape_(), this.updateShadow_(), setTimeout(() => {
1455
1486
  this.ensureBlocks_(), this.checkWarning_();
1456
1487
  }, 0);
1457
1488
  },
1458
1489
  genNodeOpts_: function() {
1459
- return Ae("callMethod");
1490
+ return Ee("callMethod");
1460
1491
  },
1461
1492
  genMethodOpts_: function() {
1462
1493
  return ki(this.node.id);
@@ -1480,42 +1511,41 @@ const Pi = {
1480
1511
  const n = this.node.key !== e.key;
1481
1512
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
1482
1513
  const o = this.getField("METHOD");
1483
- if (o.getOptions(!1), n || !Ue(this.method.id)) {
1484
- const i = Xe(this.node.id)?.[0];
1514
+ if (o.getOptions(!1), n || !De(this.method.id)) {
1515
+ const i = We(this.node.id)?.[0];
1485
1516
  o.setValue(i?.id ?? "");
1486
1517
  }
1487
1518
  this.onMethodChange_(o.getValue());
1488
1519
  },
1489
1520
  onMethodChange_: function(t) {
1490
- const e = Ue(t);
1491
- e ? (this.method.id = e.id, this.method.names = e.names, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.id = "", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
1521
+ const e = De(t);
1522
+ e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.id = "", this.method.kind = "elementMethod", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
1492
1523
  this.ensureBlocks_();
1493
1524
  }, 0);
1494
1525
  },
1495
1526
  updateShape_: function() {
1496
1527
  this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
1497
- for (let e = this.method.outputs.length; this.getInput("OUTPUT" + e); e++) {
1498
- const n = this.getInput("OUTPUT" + e)?.connection?.targetBlock();
1499
- n && n.dispose(), this.removeInput("OUTPUT" + e);
1528
+ for (let t = this.method.outputs.length; this.getInput("OUTPUT" + t); t++) {
1529
+ const e = this.getInput("OUTPUT" + t)?.connection?.targetBlock();
1530
+ e && e.dispose(), this.removeInput("OUTPUT" + t);
1500
1531
  }
1501
- for (let e = 0; e < this.method.outputs.length; e++) {
1502
- if (this.getInput("OUTPUT" + e))
1532
+ for (let t = 0; t < this.method.outputs.length; t++) {
1533
+ if (this.getInput("OUTPUT" + t))
1503
1534
  continue;
1504
- const n = this.appendValueInput("OUTPUT" + e);
1505
- e === 0 && n.appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("OUTPUT" + e, "HANDLE");
1535
+ const e = this.appendValueInput("OUTPUT" + t);
1536
+ t === 0 && e.appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("OUTPUT" + t, "HANDLE");
1506
1537
  }
1507
- for (let e = this.method.inputs.length; this.getInput("INPUT" + e); e++)
1508
- this.removeInput("INPUT" + e);
1509
- for (let e = 0; e < this.method.inputs.length; e++) {
1510
- const n = this.method.inputs[e];
1511
- this.getInput("INPUT" + e) || (this.appendValueInput("INPUT" + e).setAlign(C.Align.RIGHT).appendField(Bn[n.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + e, "OUTPUT0"));
1538
+ for (let t = this.method.inputs.length; this.getInput("INPUT" + t); t++)
1539
+ this.removeInput("INPUT" + t);
1540
+ for (let t = 0; t < this.method.inputs.length; t++) {
1541
+ const e = this.method.inputs[t];
1542
+ this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(C.Align.RIGHT).appendField(Bn[e.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
1512
1543
  }
1513
- const { kind: t } = Dt(this.method.id);
1514
- if (t === "refMethod")
1544
+ if (this.method.kind === "refMethod")
1515
1545
  this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
1516
1546
  else if (this.getInput("REF_KEY")) {
1517
- const e = this.getInput("REF_KEY").connection.targetBlock();
1518
- e && e.dispose(), this.removeInput("REF_KEY");
1547
+ const t = this.getInput("REF_KEY").connection.targetBlock();
1548
+ t && t.dispose(), this.removeInput("REF_KEY");
1519
1549
  }
1520
1550
  },
1521
1551
  updateShadow_: function() {
@@ -1531,7 +1561,7 @@ const Pi = {
1531
1561
  ensureBlocks_: function() {
1532
1562
  if (this.isInsertionMarker())
1533
1563
  return;
1534
- const { kind: t } = Dt(this.method.id), e = Fn(t), n = [];
1564
+ const { kind: t } = ze(this.method.id), e = Fn(t), n = [];
1535
1565
  for (let o = 0; o < this.method.outputs.length; o++) {
1536
1566
  const { key: i, name: a } = this.method.outputs[o];
1537
1567
  n.push(["OUTPUT" + o, i, a, e]);
@@ -1549,11 +1579,15 @@ const Pi = {
1549
1579
  return;
1550
1580
  }
1551
1581
  t.alias !== this.node.alias && (this.node.alias = t.alias);
1552
- const e = Ue(this.method.id);
1582
+ const e = De(this.method.id);
1553
1583
  if (!e) {
1554
1584
  this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
1555
1585
  return;
1556
1586
  }
1587
+ if (e.kind !== this.method.kind) {
1588
+ this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
1589
+ return;
1590
+ }
1557
1591
  if (M(e.names, this.method.names) || (this.method.names = e.names), !M(e.inputs, this.method.inputs)) {
1558
1592
  this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
1559
1593
  return;
@@ -1582,6 +1616,7 @@ const Ri = {
1582
1616
  init: function() {
1583
1617
  this.method = {
1584
1618
  id: "",
1619
+ kind: "elementMethod",
1585
1620
  names: [],
1586
1621
  inputs: []
1587
1622
  }, this.appendDummyInput().appendField("%{BKY_APP_V1_IMPL_APP_METHOD_TITLE}").appendField(
@@ -1593,7 +1628,7 @@ const Ri = {
1593
1628
  const t = on()?.[0];
1594
1629
  if (!t)
1595
1630
  return;
1596
- this.method.id = t.id, this.method.names = t.names, this.method.inputs = t.inputs;
1631
+ this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names, this.method.inputs = t.inputs;
1597
1632
  const e = this.getField("METHOD");
1598
1633
  e.getOptions(!1), e.setValue(this.method.id);
1599
1634
  },
@@ -1603,7 +1638,7 @@ const Ri = {
1603
1638
  };
1604
1639
  },
1605
1640
  loadExtraState: function(t) {
1606
- this.method.id = t.method?.id ?? "", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs ?? [], this.updateShape_(), setTimeout(() => {
1641
+ this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "elementMethod", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs ?? [], this.updateShape_(), setTimeout(() => {
1607
1642
  this.ensureBlocks_(), this.checkWarning_();
1608
1643
  }, 0);
1609
1644
  },
@@ -1622,7 +1657,7 @@ const Ri = {
1622
1657
  },
1623
1658
  onMethodChange_: function(t) {
1624
1659
  const e = kt(t);
1625
- e ? (this.method.id = e.id, this.method.names = e.names, this.method.inputs = e.inputs) : (this.method.id = "", this.method.names = [], this.method.inputs = []), this.updateShape_(), setTimeout(() => {
1660
+ e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs) : (this.method.id = "", this.method.kind = "elementMethod", this.method.names = [], this.method.inputs = []), this.updateShape_(), setTimeout(() => {
1626
1661
  this.ensureBlocks_();
1627
1662
  }, 0);
1628
1663
  },
@@ -1637,12 +1672,12 @@ const Ri = {
1637
1672
  ensureBlocks_: function() {
1638
1673
  if (this.isInsertionMarker())
1639
1674
  return;
1640
- const { kind: t } = Dt(this.method.id), e = Fn(t), n = [];
1641
- for (let o = 0; o < this.method.inputs.length; o++) {
1642
- const { key: i, name: a } = this.method.inputs[o];
1643
- n.push(["INPUT" + o, i, a, e]);
1675
+ const t = Fn(this.method.kind), e = [];
1676
+ for (let n = 0; n < this.method.inputs.length; n++) {
1677
+ const { key: o, name: i } = this.method.inputs[n];
1678
+ e.push(["INPUT" + n, o, i, t]);
1644
1679
  }
1645
- F(this, n);
1680
+ F(this, e);
1646
1681
  },
1647
1682
  checkWarning_: function() {
1648
1683
  const t = kt(this.method.id);
@@ -1650,6 +1685,10 @@ const Ri = {
1650
1685
  this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
1651
1686
  return;
1652
1687
  }
1688
+ if (t.kind !== this.method.kind) {
1689
+ this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
1690
+ return;
1691
+ }
1653
1692
  if (M(t.names, this.method.names) || (this.method.names = t.names), !M(t.inputs, this.method.inputs)) {
1654
1693
  this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
1655
1694
  return;
@@ -1668,6 +1707,7 @@ const Di = {
1668
1707
  init: function() {
1669
1708
  this.method = {
1670
1709
  id: "",
1710
+ kind: "elementMethod",
1671
1711
  names: []
1672
1712
  }, this.output = {
1673
1713
  key: "",
@@ -1687,10 +1727,10 @@ const Di = {
1687
1727
  const t = on()?.[0];
1688
1728
  if (!t)
1689
1729
  return;
1690
- this.method.id = t.id, this.method.names = t.names;
1730
+ this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
1691
1731
  const e = this.getField("METHOD");
1692
1732
  e.getOptions(!1), e.setValue(this.method.id);
1693
- const n = Je(this.method.id)?.[0];
1733
+ const n = je(this.method.id)?.[0];
1694
1734
  if (!n)
1695
1735
  return;
1696
1736
  this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
@@ -1703,7 +1743,7 @@ const Di = {
1703
1743
  };
1704
1744
  },
1705
1745
  loadExtraState: function(t) {
1706
- this.method.id = t.method?.key ?? "", this.method.names = t.method?.names ?? [], this.output.key = t.output?.key ?? "", this.output.name = t.output?.name ?? "", this.output.type = t.output?.type ?? "", this.updateShape_(), this.updateShadows_(), setTimeout(() => {
1746
+ this.method.id = t.method?.key ?? "", this.method.kind = t.method?.kind ?? "elementMethod", this.method.names = t.method?.names ?? [], this.output.key = t.output?.key ?? "", this.output.name = t.output?.name ?? "", this.output.type = t.output?.type ?? "", this.updateShape_(), this.updateShadows_(), setTimeout(() => {
1707
1747
  this.checkWarning_();
1708
1748
  }, 0);
1709
1749
  },
@@ -1730,16 +1770,16 @@ const Di = {
1730
1770
  return;
1731
1771
  }
1732
1772
  const n = this.method.id !== e.id;
1733
- this.method.id = e.id, this.method.names = e.names;
1773
+ this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
1734
1774
  const o = this.getField("OUTPUT");
1735
- if (o.getOptions(!1), n || !Ve(this.method.id, this.output.key)) {
1736
- const i = Je(this.method.id)?.[0];
1775
+ if (o.getOptions(!1), n || !Me(this.method.id, this.output.key)) {
1776
+ const i = je(this.method.id)?.[0];
1737
1777
  o.setValue(i?.key ?? "");
1738
1778
  }
1739
1779
  this.onOutputChange_(o.getValue());
1740
1780
  },
1741
1781
  onOutputChange_: function(t) {
1742
- const e = Ve(this.method.id, t);
1782
+ const e = Me(this.method.id, t);
1743
1783
  e ? (this.output.key = e.key, this.output.name = e.name, this.output.type = e.type) : (this.output.key = "", this.output.name = "", this.output.type = "string");
1744
1784
  },
1745
1785
  updateShape_: function() {
@@ -1762,8 +1802,12 @@ const Di = {
1762
1802
  this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
1763
1803
  return;
1764
1804
  }
1805
+ if (t.kind !== this.method.kind) {
1806
+ this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
1807
+ return;
1808
+ }
1765
1809
  t.names !== this.method.names && (this.method.names = t.names);
1766
- const e = Ve(this.method.id, this.output.key);
1810
+ const e = Me(this.method.id, this.output.key);
1767
1811
  if (!e) {
1768
1812
  this.setWarningText(p("WARN_OUTPUT_NOT_FOUND"));
1769
1813
  return;
@@ -1844,7 +1888,7 @@ const Mi = {
1844
1888
  this.app.id = t.id, this.app.name = t.name;
1845
1889
  const e = this.getField("APP");
1846
1890
  e.getOptions(!1), e.setValue(this.app.id);
1847
- const n = We(this.app.id)?.[0];
1891
+ const n = $e(this.app.id)?.[0];
1848
1892
  if (!n)
1849
1893
  return;
1850
1894
  this.page.id = n.id, this.page.name = n.name;
@@ -1887,13 +1931,13 @@ const Mi = {
1887
1931
  const n = this.app.id !== e.id;
1888
1932
  this.app.id = e.id, this.app.name = e.name;
1889
1933
  const o = this.getField("PAGE");
1890
- if (o.getOptions(!1), n || !De(this.app.id, this.page.id)) {
1891
- const a = We(this.app.id)?.[0]?.id ?? "";
1934
+ if (o.getOptions(!1), n || !Pe(this.app.id, this.page.id)) {
1935
+ const a = $e(this.app.id)?.[0]?.id ?? "";
1892
1936
  o.setValue(a), this.page.id === a && this.onPageChange_(a);
1893
1937
  }
1894
1938
  },
1895
1939
  onPageChange_: function(t) {
1896
- const e = De(this.app.id, t);
1940
+ const e = Pe(this.app.id, t);
1897
1941
  e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
1898
1942
  },
1899
1943
  checkWarning_: function() {
@@ -1903,7 +1947,7 @@ const Mi = {
1903
1947
  return;
1904
1948
  }
1905
1949
  t.name !== this.app.name && (this.app.name = t.name);
1906
- const e = De(this.app.id, this.page.id);
1950
+ const e = Pe(this.app.id, this.page.id);
1907
1951
  if (!e) {
1908
1952
  this.setWarningText(p("WARN_PAGE_NOT_FOUND"));
1909
1953
  return;
@@ -1990,22 +2034,23 @@ const Vi = {
1990
2034
  alias: ""
1991
2035
  }, this.prop = {
1992
2036
  id: "",
2037
+ kind: "elementProperty",
1993
2038
  names: []
1994
2039
  }, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_APP_PROP_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(new I(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_GET_APP_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_GET_APP_PROP_HELPURL}"), this.initData_();
1995
2040
  },
1996
2041
  initData_: function() {
1997
2042
  if (this.node.id)
1998
2043
  return;
1999
- const t = Kt("getProp")?.[0];
2044
+ const t = wt("getProp")?.[0];
2000
2045
  if (!t)
2001
2046
  return;
2002
2047
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
2003
2048
  const e = this.getField("NODE");
2004
2049
  e.getOptions(!1), e.setValue(this.node.id);
2005
- const n = Vt(this.node.id, "read")?.[0];
2050
+ const n = Ut(this.node.id, "read")?.[0];
2006
2051
  if (!n)
2007
2052
  return;
2008
- this.prop.id = n.id, this.prop.names = n.names;
2053
+ this.prop.id = n.id, this.prop.kind = n.kind, this.prop.names = n.names;
2009
2054
  const o = this.getField("PROP");
2010
2055
  o.getOptions(!1), o.setValue(this.prop.id);
2011
2056
  },
@@ -2016,12 +2061,12 @@ const Vi = {
2016
2061
  };
2017
2062
  },
2018
2063
  loadExtraState: function(t) {
2019
- this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.names = t.prop?.names ?? [], setTimeout(() => {
2064
+ this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.kind = t.prop?.kind ?? "elementProperty", this.prop.names = t.prop?.names ?? [], setTimeout(() => {
2020
2065
  this.checkWarning_();
2021
2066
  }, 0);
2022
2067
  },
2023
2068
  genNodeOpts_: function() {
2024
- return Ae("getProp");
2069
+ return Ee("getProp");
2025
2070
  },
2026
2071
  genPropOpts_: function() {
2027
2072
  return zn(this.node.id, "read");
@@ -2046,14 +2091,14 @@ const Vi = {
2046
2091
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
2047
2092
  const o = this.getField("PROP");
2048
2093
  if (o.getOptions(!1), n || !Tt(this.prop.id)) {
2049
- const i = Vt(this.node.id, "read")?.[0];
2094
+ const i = Ut(this.node.id, "read")?.[0];
2050
2095
  o.setValue(i?.id ?? "");
2051
2096
  }
2052
2097
  this.onPropChange_(o.getValue());
2053
2098
  },
2054
2099
  onPropChange_: function(t) {
2055
2100
  const e = Tt(t);
2056
- e ? (this.prop.id = e.id, this.prop.names = e.names) : (this.prop.id = "", this.prop.names = []);
2101
+ e ? (this.prop.id = e.id, this.prop.kind = e.kind, this.prop.names = e.names) : (this.prop.id = "", this.prop.kind = "elementProperty", this.prop.names = []);
2057
2102
  },
2058
2103
  checkWarning_: function() {
2059
2104
  const t = lt(this.node.id);
@@ -2071,6 +2116,10 @@ const Vi = {
2071
2116
  this.setWarningText(p("WARN_PROP_NOT_FOUND"));
2072
2117
  return;
2073
2118
  }
2119
+ if (e.kind !== this.prop.kind) {
2120
+ this.setWarningText(p("WARN_PROP_HAS_CHANGED"));
2121
+ return;
2122
+ }
2074
2123
  M(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
2075
2124
  }
2076
2125
  };
@@ -2087,22 +2136,23 @@ const xi = {
2087
2136
  alias: ""
2088
2137
  }, this.prop = {
2089
2138
  id: "",
2139
+ kind: "elementProperty",
2090
2140
  names: []
2091
2141
  }, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_PROP_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(new I(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_PROP_HELPURL}"), this.initData_(), this.isInFlyout && this.updateShadow_();
2092
2142
  },
2093
2143
  initData_: function() {
2094
2144
  if (this.node.id)
2095
2145
  return;
2096
- const t = Kt("setProp")?.[0];
2146
+ const t = wt("setProp")?.[0];
2097
2147
  if (!t)
2098
2148
  return;
2099
2149
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
2100
2150
  const e = this.getField("NODE");
2101
2151
  e.getOptions(!1), e.setValue(this.node.id);
2102
- const n = Vt(this.node.id, "write")?.[0];
2152
+ const n = Ut(this.node.id, "write")?.[0];
2103
2153
  if (!n)
2104
2154
  return;
2105
- this.prop.id = n.id, this.prop.names = n.names;
2155
+ this.prop.id = n.id, this.prop.kind = n.kind, this.prop.names = n.names;
2106
2156
  const o = this.getField("PROP");
2107
2157
  o.getOptions(!1), o.setValue(this.prop.id);
2108
2158
  },
@@ -2113,12 +2163,12 @@ const xi = {
2113
2163
  };
2114
2164
  },
2115
2165
  loadExtraState: function(t) {
2116
- this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.names = t.prop?.names ?? [], setTimeout(() => {
2166
+ this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.kind = t.prop?.kind ?? "elementProperty", this.prop.names = t.prop?.names ?? [], setTimeout(() => {
2117
2167
  this.checkWarning_();
2118
2168
  }, 0);
2119
2169
  },
2120
2170
  genNodeOpts_: function() {
2121
- return Ae("setProp");
2171
+ return Ee("setProp");
2122
2172
  },
2123
2173
  genPropOpts_: function() {
2124
2174
  return zn(this.node.id, "write");
@@ -2143,14 +2193,14 @@ const xi = {
2143
2193
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
2144
2194
  const o = this.getField("PROP");
2145
2195
  if (o.getOptions(!1), n || !Tt(this.prop.id)) {
2146
- const i = Vt(this.node.id, "write")?.[0];
2196
+ const i = Ut(this.node.id, "write")?.[0];
2147
2197
  o.setValue(i?.id ?? "");
2148
2198
  }
2149
2199
  this.onPropChange_(o.getValue());
2150
2200
  },
2151
2201
  onPropChange_: function(t) {
2152
2202
  const e = Tt(t);
2153
- e ? (this.prop.id = e.id, this.prop.names = e.names) : (this.prop.id = "", this.prop.names = []), this.updateShadow_();
2203
+ e ? (this.prop.id = e.id, this.prop.kind = e.kind, this.prop.names = e.names) : (this.prop.id = "", this.prop.kind = "elementProperty", this.prop.names = []), this.updateShadow_();
2154
2204
  },
2155
2205
  updateShadow_: function() {
2156
2206
  if (this.isInsertionMarker())
@@ -2184,6 +2234,10 @@ const xi = {
2184
2234
  this.setWarningText(p("WARN_PROP_NOT_FOUND"));
2185
2235
  return;
2186
2236
  }
2237
+ if (e.kind !== this.prop.kind) {
2238
+ this.setWarningText(p("WARN_PROP_HAS_CHANGED"));
2239
+ return;
2240
+ }
2187
2241
  M(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
2188
2242
  }
2189
2243
  };
@@ -2236,11 +2290,11 @@ const Fi = {
2236
2290
  }
2237
2291
  },
2238
2292
  onStateChange_: function(t) {
2239
- const e = oe(t);
2293
+ const e = ee(t);
2240
2294
  e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string");
2241
2295
  },
2242
2296
  checkWarning_: function() {
2243
- const t = oe(this.state.id);
2297
+ const t = ee(this.state.id);
2244
2298
  if (!t) {
2245
2299
  this.setWarningText(p("WARN_STATE_NOT_FOUND"));
2246
2300
  return;
@@ -2296,7 +2350,7 @@ const Yi = {
2296
2350
  }
2297
2351
  },
2298
2352
  onStateChange_: function(t) {
2299
- const e = oe(t);
2353
+ const e = ee(t);
2300
2354
  e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string"), this.updateShadow_();
2301
2355
  },
2302
2356
  updateShadow_: function() {
@@ -2309,7 +2363,7 @@ const Yi = {
2309
2363
  this.getInput("VALUE").setCheck(e).setShadowDom(n);
2310
2364
  },
2311
2365
  checkWarning_: function() {
2312
- const t = oe(this.state.id);
2366
+ const t = ee(this.state.id);
2313
2367
  if (!t) {
2314
2368
  this.setWarningText(p("WARN_STATE_NOT_FOUND"));
2315
2369
  return;
@@ -3096,11 +3150,11 @@ const wi = y.xml, Ki = [
3096
3150
  inputs: ["SUCCESS", "MESSAGE", "DATA"]
3097
3151
  }
3098
3152
  ];
3099
- function $i(t, e) {
3153
+ function Hi(t, e) {
3100
3154
  const n = Ki.find((o) => o.type === t);
3101
3155
  return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
3102
3156
  }
3103
- const Hi = {
3157
+ const $i = {
3104
3158
  init: function() {
3105
3159
  this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
3106
3160
  },
@@ -3134,7 +3188,7 @@ const Hi = {
3134
3188
  },
3135
3189
  tryDuplicate_: function(t) {
3136
3190
  const e = this.workspace.getBlockById(t.oldParentId);
3137
- if (e && $i(e.type, t.oldInputName))
3191
+ if (e && Hi(e.type, t.oldInputName))
3138
3192
  try {
3139
3193
  A.disable();
3140
3194
  const n = e.getInput(t.oldInputName)?.connection;
@@ -3159,7 +3213,7 @@ const Hi = {
3159
3213
  this.setFieldValue(this.name, "LABEL");
3160
3214
  }
3161
3215
  };
3162
- T.parameter_v1 = Hi;
3216
+ T.parameter_v1 = $i;
3163
3217
  s.forBlock.parameter_v1 = function(t) {
3164
3218
  return [t.key, c.ATOMIC];
3165
3219
  };
@@ -3172,7 +3226,7 @@ s.forBlock.on_flow_state_event_v1 = function() {
3172
3226
  return `__onFlowStateEventV1__();
3173
3227
  `;
3174
3228
  };
3175
- function xt(t) {
3229
+ function Vt(t) {
3176
3230
  const e = E.compute.spaces.find((n) => n.id === t);
3177
3231
  return e ? e.funcs : [];
3178
3232
  }
@@ -3183,11 +3237,11 @@ function Ct(t, e) {
3183
3237
  }
3184
3238
  function to(t) {
3185
3239
  const e = [];
3186
- return xt(t).forEach(({ id: o, name: i }) => {
3240
+ return Vt(t).forEach(({ id: o, name: i }) => {
3187
3241
  e.push([i, o]);
3188
3242
  }), k(e);
3189
3243
  }
3190
- function qe() {
3244
+ function Xe() {
3191
3245
  return E.compute.activeFunc;
3192
3246
  }
3193
3247
  function Cn(t) {
@@ -3200,18 +3254,18 @@ function Wi() {
3200
3254
  t.push([o, n]);
3201
3255
  }), k(t);
3202
3256
  }
3203
- function $t(t) {
3257
+ function Kt(t) {
3204
3258
  const e = [];
3205
3259
  return E.compute.spaces.forEach((n) => {
3206
3260
  t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
3207
3261
  }), e;
3208
3262
  }
3209
- function ie(t) {
3263
+ function ne(t) {
3210
3264
  return E.compute.spaces.find((e) => e.id === t);
3211
3265
  }
3212
3266
  function eo(t) {
3213
3267
  const e = [];
3214
- return $t(t).forEach(({ id: o, name: i }) => {
3268
+ return Kt(t).forEach(({ id: o, name: i }) => {
3215
3269
  e.push([i, o]);
3216
3270
  }), k(e);
3217
3271
  }
@@ -3233,13 +3287,13 @@ const ji = {
3233
3287
  initData_: function() {
3234
3288
  if (this.space.id)
3235
3289
  return;
3236
- const t = $t("func")?.[0];
3290
+ const t = Kt("func")?.[0];
3237
3291
  if (!t)
3238
3292
  return;
3239
3293
  this.space.id = t.id, this.space.name = t.name;
3240
3294
  const e = this.getField("SPACE");
3241
3295
  e.getOptions(!1), e.setValue(this.space.id);
3242
- const n = xt(this.space.id)?.[0];
3296
+ const n = Vt(this.space.id)?.[0];
3243
3297
  if (!n)
3244
3298
  return;
3245
3299
  this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
@@ -3274,14 +3328,14 @@ const ji = {
3274
3328
  }
3275
3329
  },
3276
3330
  onSpaceChange_: function(t) {
3277
- const e = ie(t);
3331
+ const e = ne(t);
3278
3332
  if (!e) {
3279
3333
  console.assert(!1);
3280
3334
  return;
3281
3335
  }
3282
3336
  let n = !1;
3283
3337
  if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ct(this.space.id, this.func.id)) {
3284
- const i = xt(this.space.id)?.[0];
3338
+ const i = Vt(this.space.id)?.[0];
3285
3339
  this.setFieldValue(i?.id ?? "", "FUNC");
3286
3340
  }
3287
3341
  },
@@ -3340,7 +3394,7 @@ const ji = {
3340
3394
  F(this, t);
3341
3395
  },
3342
3396
  checkWarning_: function() {
3343
- const t = ie(this.space.id);
3397
+ const t = ne(this.space.id);
3344
3398
  if (!t) {
3345
3399
  this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
3346
3400
  return;
@@ -3407,13 +3461,13 @@ const Xi = {
3407
3461
  initData_: function() {
3408
3462
  if (this.space.id)
3409
3463
  return;
3410
- const t = $t("func")?.[0];
3464
+ const t = Kt("func")?.[0];
3411
3465
  if (!t)
3412
3466
  return;
3413
3467
  this.space.id = t.id, this.space.name = t.name;
3414
3468
  const e = this.getField("SPACE");
3415
3469
  e.getOptions(!1), e.setValue(this.space.id);
3416
- const n = xt(this.space.id)?.[0];
3470
+ const n = Vt(this.space.id)?.[0];
3417
3471
  if (!n)
3418
3472
  return;
3419
3473
  this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
@@ -3448,14 +3502,14 @@ const Xi = {
3448
3502
  }
3449
3503
  },
3450
3504
  onSpaceChange_: function(t) {
3451
- const e = ie(t);
3505
+ const e = ne(t);
3452
3506
  if (!e) {
3453
3507
  console.assert(!1);
3454
3508
  return;
3455
3509
  }
3456
3510
  let n = !1;
3457
3511
  if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ct(this.space.id, this.func.id)) {
3458
- const i = xt(this.space.id)?.[0];
3512
+ const i = Vt(this.space.id)?.[0];
3459
3513
  i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
3460
3514
  }
3461
3515
  },
@@ -3514,7 +3568,7 @@ const Xi = {
3514
3568
  F(this, t);
3515
3569
  },
3516
3570
  checkWarning_: function() {
3517
- const t = ie(this.space.id);
3571
+ const t = ne(this.space.id);
3518
3572
  if (!t) {
3519
3573
  this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
3520
3574
  return;
@@ -3576,7 +3630,7 @@ const Ji = {
3576
3630
  initData_: function() {
3577
3631
  if (this.func.id)
3578
3632
  return;
3579
- const { id: t, inputs: e } = qe();
3633
+ const { id: t, inputs: e } = Xe();
3580
3634
  this.func.id = t, this.func.inputs = e;
3581
3635
  },
3582
3636
  saveExtraState: function() {
@@ -3613,7 +3667,7 @@ const Ji = {
3613
3667
  F(this, t);
3614
3668
  },
3615
3669
  checkWarning_: function() {
3616
- const { id: t, inputs: e } = qe();
3670
+ const { id: t, inputs: e } = Xe();
3617
3671
  if (this.func.id !== t && (this.func.id = t), !M(e, this.func.inputs)) {
3618
3672
  this.setWarningText(p("WARN_FUNC_HAS_CHANGED"));
3619
3673
  return;
@@ -3645,7 +3699,7 @@ const qi = {
3645
3699
  initData_: function() {
3646
3700
  if (this.output.id)
3647
3701
  return;
3648
- const t = qe().outputs?.[0];
3702
+ const t = Xe().outputs?.[0];
3649
3703
  t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
3650
3704
  },
3651
3705
  saveExtraState: function() {
@@ -3788,13 +3842,13 @@ function rt(t) {
3788
3842
  const { spaces: e } = E.data;
3789
3843
  return e.find((n) => n.id === t);
3790
3844
  }
3791
- function Ie() {
3845
+ function ge() {
3792
3846
  const t = [];
3793
3847
  return q().forEach(({ id: n, name: o }) => {
3794
3848
  t.push([o, n]);
3795
3849
  }), k(t);
3796
3850
  }
3797
- function $(t) {
3851
+ function H(t) {
3798
3852
  const { spaces: e } = E.data, n = e.find((o) => o.id === t);
3799
3853
  return n ? n.tables : [];
3800
3854
  }
@@ -3803,20 +3857,20 @@ function j(t, e) {
3803
3857
  if (o)
3804
3858
  return o.tables.find((i) => i.id === e);
3805
3859
  }
3806
- function Oe(t) {
3860
+ function Ae(t) {
3807
3861
  const e = [];
3808
- return $(t).forEach(({ id: o, name: i }) => {
3862
+ return H(t).forEach(({ id: o, name: i }) => {
3809
3863
  e.push([i, o]);
3810
3864
  }), k(e);
3811
3865
  }
3812
- function se(t, e) {
3866
+ function oe(t, e) {
3813
3867
  const { spaces: n } = E.data, o = n.find((a) => a.id === t);
3814
3868
  if (!o)
3815
3869
  return [];
3816
3870
  const i = o.tables.find((a) => a.id === e);
3817
3871
  return i ? i.columns : [];
3818
3872
  }
3819
- function xe(t, e, n) {
3873
+ function Ue(t, e, n) {
3820
3874
  const { spaces: o } = E.data, i = o.find((u) => u.id === t);
3821
3875
  if (!i)
3822
3876
  return;
@@ -3826,7 +3880,7 @@ function xe(t, e, n) {
3826
3880
  }
3827
3881
  function Qi(t, e) {
3828
3882
  const n = [];
3829
- return se(t, e).forEach(({ id: i, name: a }) => {
3883
+ return oe(t, e).forEach(({ id: i, name: a }) => {
3830
3884
  n.push([a, i]);
3831
3885
  }), k(n);
3832
3886
  }
@@ -3837,7 +3891,7 @@ function zi(t) {
3837
3891
  let n, o;
3838
3892
  const i = q()?.[0];
3839
3893
  if (i) {
3840
- const l = $(i.id)?.[0];
3894
+ const l = H(i.id)?.[0];
3841
3895
  if (l) {
3842
3896
  n = {
3843
3897
  space: {
@@ -3970,11 +4024,11 @@ const es = {
3970
4024
  if (!t)
3971
4025
  return;
3972
4026
  this.space.id = t.id, this.space.name = t.name;
3973
- const e = $(this.space.id)?.[0];
4027
+ const e = H(this.space.id)?.[0];
3974
4028
  if (!e)
3975
4029
  return;
3976
4030
  this.table.id = e.id, this.table.name = e.name;
3977
- const n = se(this.space.id, this.table.id)?.[0];
4031
+ const n = oe(this.space.id, this.table.id)?.[0];
3978
4032
  n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
3979
4033
  },
3980
4034
  saveExtraState: function() {
@@ -3990,10 +4044,10 @@ const es = {
3990
4044
  }, 0);
3991
4045
  },
3992
4046
  genSpaceOpts_: function() {
3993
- return Ie();
4047
+ return ge();
3994
4048
  },
3995
4049
  genTableOpts_: function() {
3996
- return Oe(this.space.id);
4050
+ return Ae(this.space.id);
3997
4051
  },
3998
4052
  genColumnOpts_: function() {
3999
4053
  return Qi(this.space.id, this.table.id);
@@ -4016,7 +4070,7 @@ const es = {
4016
4070
  }
4017
4071
  const n = e.id !== this.space.id;
4018
4072
  if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
4019
- const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
4073
+ const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
4020
4074
  i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
4021
4075
  }
4022
4076
  },
@@ -4027,13 +4081,13 @@ const es = {
4027
4081
  return;
4028
4082
  }
4029
4083
  const n = e.id !== this.table.id;
4030
- if (this.table.id = e.id, this.table.name = e.name, n || !xe(this.space.id, this.table.id, this.column.id)) {
4031
- const o = se(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
4084
+ if (this.table.id = e.id, this.table.name = e.name, n || !Ue(this.space.id, this.table.id, this.column.id)) {
4085
+ const o = oe(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
4032
4086
  i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
4033
4087
  }
4034
4088
  },
4035
4089
  onColumnChange_: function(t) {
4036
- const e = xe(this.space.id, this.table.id, t);
4090
+ const e = Ue(this.space.id, this.table.id, t);
4037
4091
  e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
4038
4092
  },
4039
4093
  updateShape_: function() {
@@ -4052,7 +4106,7 @@ const es = {
4052
4106
  n && n.dispose();
4053
4107
  else if (n)
4054
4108
  return;
4055
- const o = Ge(this.workspace, this.column.type);
4109
+ const o = He(this.workspace, this.column.type);
4056
4110
  o && (e.setCheck(null), e.connect(o.outputConnection));
4057
4111
  },
4058
4112
  updateCheck_: function() {
@@ -4072,7 +4126,7 @@ const es = {
4072
4126
  return;
4073
4127
  }
4074
4128
  e.name !== this.table.name && (this.table.name = e.name);
4075
- const n = xe(
4129
+ const n = Ue(
4076
4130
  this.space.id,
4077
4131
  this.table.id,
4078
4132
  this.column.id
@@ -4200,7 +4254,7 @@ function ss(t) {
4200
4254
  const e = t.getInput("TABLE").connection;
4201
4255
  if (e.targetBlock())
4202
4256
  return;
4203
- const n = q()?.[0], o = $(n?.id ?? "")?.[0], i = {
4257
+ const n = q()?.[0], o = H(n?.id ?? "")?.[0], i = {
4204
4258
  type: "select_table_v1",
4205
4259
  extraState: {
4206
4260
  space: {
@@ -4219,7 +4273,7 @@ function as(t) {
4219
4273
  const e = t.getInput("CONDITION").connection;
4220
4274
  if (e.targetBlock())
4221
4275
  return;
4222
- const n = q()?.[0], o = $(n?.id ?? "")?.[0], i = se(n?.id, o?.id)?.[0], a = {
4276
+ const n = q()?.[0], o = H(n?.id ?? "")?.[0], i = oe(n?.id, o?.id)?.[0], a = {
4223
4277
  type: "cond_atomic_v1",
4224
4278
  extraState: {
4225
4279
  space: {
@@ -4331,7 +4385,7 @@ function ls(t) {
4331
4385
  let n, o;
4332
4386
  const i = q()?.[0];
4333
4387
  if (i) {
4334
- const l = $(i.id)?.[0];
4388
+ const l = H(i.id)?.[0];
4335
4389
  if (l) {
4336
4390
  n = {
4337
4391
  space: {
@@ -4582,7 +4636,7 @@ const ms = {
4582
4636
  this.space.id = t.id, this.space.name = t.name;
4583
4637
  const e = this.getField("SPACE");
4584
4638
  e.getOptions(!1), e.setValue(this.space.id, !1);
4585
- const n = $(this.space.id)?.[0];
4639
+ const n = H(this.space.id)?.[0];
4586
4640
  if (!n)
4587
4641
  return;
4588
4642
  this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
@@ -4602,10 +4656,10 @@ const ms = {
4602
4656
  }, 0);
4603
4657
  },
4604
4658
  genSpaceOpts_: function() {
4605
- return Ie();
4659
+ return ge();
4606
4660
  },
4607
4661
  genTableOpts_: function() {
4608
- return Oe(this.space.id);
4662
+ return Ae(this.space.id);
4609
4663
  },
4610
4664
  genColumnOpts_: function() {
4611
4665
  const t = [];
@@ -4643,7 +4697,7 @@ const ms = {
4643
4697
  }
4644
4698
  const n = e.id !== this.space.id;
4645
4699
  if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
4646
- const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
4700
+ const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
4647
4701
  i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
4648
4702
  }
4649
4703
  },
@@ -4797,7 +4851,7 @@ const Ts = {
4797
4851
  this.space.id = t.id, this.space.name = t.name;
4798
4852
  const e = this.getField("SPACE");
4799
4853
  e.getOptions(!1), e.setValue(this.space.id);
4800
- const n = $(this.space.id)?.[0];
4854
+ const n = H(this.space.id)?.[0];
4801
4855
  if (!n)
4802
4856
  return;
4803
4857
  this.table.id = n.id, this.table.name = n.name;
@@ -4814,10 +4868,10 @@ const Ts = {
4814
4868
  this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
4815
4869
  },
4816
4870
  genSpaceOpts_: function() {
4817
- return Ie();
4871
+ return ge();
4818
4872
  },
4819
4873
  genTableOpts_: function() {
4820
- return Oe(this.space.id);
4874
+ return Ae(this.space.id);
4821
4875
  },
4822
4876
  onchange: function(t) {
4823
4877
  if (t.type === b.STATE_CHANGE)
@@ -4837,7 +4891,7 @@ const Ts = {
4837
4891
  }
4838
4892
  let n = !1;
4839
4893
  if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !j(this.space.id, this.table.id)) {
4840
- const i = $(this.space.id)?.[0];
4894
+ const i = H(this.space.id)?.[0];
4841
4895
  i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
4842
4896
  }
4843
4897
  },
@@ -4978,7 +5032,7 @@ const Is = {
4978
5032
  this.space.id = t.id, this.space.name = t.name;
4979
5033
  const e = this.getField("SPACE");
4980
5034
  e.getOptions(!1), e.setValue(this.space.id, !1);
4981
- const n = $(this.space.id)?.[0];
5035
+ const n = H(this.space.id)?.[0];
4982
5036
  if (!n)
4983
5037
  return;
4984
5038
  this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
@@ -4998,10 +5052,10 @@ const Is = {
4998
5052
  }, 0);
4999
5053
  },
5000
5054
  genSpaceOpts_: function() {
5001
- return Ie();
5055
+ return ge();
5002
5056
  },
5003
5057
  genTableOpts_: function() {
5004
- return Oe(this.space.id);
5058
+ return Ae(this.space.id);
5005
5059
  },
5006
5060
  genColumnOpts_: function() {
5007
5061
  const t = [];
@@ -5039,7 +5093,7 @@ const Is = {
5039
5093
  }
5040
5094
  const n = e.id !== this.space.id;
5041
5095
  if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
5042
- const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
5096
+ const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
5043
5097
  i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
5044
5098
  }
5045
5099
  },
@@ -5068,7 +5122,7 @@ const Is = {
5068
5122
  }
5069
5123
  const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
5070
5124
  i && i.dispose();
5071
- const a = Ge(this.workspace, n.type);
5125
+ const a = He(this.workspace, n.type);
5072
5126
  a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
5073
5127
  },
5074
5128
  decompose: function(t) {
@@ -5159,7 +5213,7 @@ const Is = {
5159
5213
  if (!u)
5160
5214
  continue;
5161
5215
  n.setCheck(null);
5162
- const l = Ge(this.workspace, u.type);
5216
+ const l = He(this.workspace, u.type);
5163
5217
  l && o.connect(l.outputConnection);
5164
5218
  }
5165
5219
  },
@@ -5210,7 +5264,7 @@ function Os(t) {
5210
5264
  let n, o;
5211
5265
  const i = q()?.[0];
5212
5266
  if (i) {
5213
- const l = $(i.id)?.[0];
5267
+ const l = H(i.id)?.[0];
5214
5268
  if (l) {
5215
5269
  n = {
5216
5270
  space: {
@@ -5336,7 +5390,7 @@ const ks = y.xml, Ns = {
5336
5390
  this.isInFlyout || this.addEntry_(n);
5337
5391
  })
5338
5392
  ), n.appendField(new fn(String(t))), n.appendField(
5339
- new z(zt, 20, 20, void 0, () => {
5393
+ new z(qt, 20, 20, void 0, () => {
5340
5394
  this.isInFlyout || this.removeEntry_(n);
5341
5395
  })
5342
5396
  ), this.moveInputBefore(e, "ADD");
@@ -5355,7 +5409,7 @@ const ks = y.xml, Ns = {
5355
5409
  this.isInFlyout || this.addEntry_(n);
5356
5410
  })
5357
5411
  ), n.appendField(new fn(String(e))), n.appendField(
5358
- new z(zt, 20, 20, void 0, () => {
5412
+ new z(qt, 20, 20, void 0, () => {
5359
5413
  this.isInFlyout || this.removeEntry_(n);
5360
5414
  })
5361
5415
  ), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
@@ -5419,7 +5473,7 @@ const yn = y.xml, Ss = {
5419
5473
  this.isInFlyout || this.addEntry_(i);
5420
5474
  })
5421
5475
  ), i.appendField(new ut(n), "KEY" + e), i.appendField(
5422
- new z(zt, 20, 20, void 0, () => {
5476
+ new z(qt, 20, 20, void 0, () => {
5423
5477
  this.isInFlyout || this.removeEntry_(i);
5424
5478
  })
5425
5479
  ), this.moveInputBefore(o, "ADD");
@@ -5436,7 +5490,7 @@ const yn = y.xml, Ss = {
5436
5490
  this.isInFlyout || this.addEntry_(n);
5437
5491
  })
5438
5492
  ), n.appendField(new ut("key"), "KEY" + e), n.appendField(
5439
- new z(zt, 20, 20, void 0, () => {
5493
+ new z(qt, 20, 20, void 0, () => {
5440
5494
  this.isInFlyout || this.removeEntry_(n);
5441
5495
  })
5442
5496
  ), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
@@ -5453,7 +5507,7 @@ const yn = y.xml, Ss = {
5453
5507
  T.json_map_v1 = Ss;
5454
5508
  const Bs = {
5455
5509
  init: function() {
5456
- this.appendDummyInput().appendField(new Ye(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
5510
+ this.appendDummyInput().appendField(new xe(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
5457
5511
  }
5458
5512
  };
5459
5513
  T.json_number_v1 = Bs;
@@ -6249,7 +6303,7 @@ const Ks = /* @__PURE__ */ new Set([
6249
6303
  "for_each_v1",
6250
6304
  "for_v1",
6251
6305
  "while_until_v1"
6252
- ]), $s = {
6306
+ ]), Hs = {
6253
6307
  getSurroundLoop: function() {
6254
6308
  let t = this;
6255
6309
  do {
@@ -6274,7 +6328,7 @@ const Ks = /* @__PURE__ */ new Set([
6274
6328
  };
6275
6329
  B.registerMixin(
6276
6330
  "flow_control_in_loop_check_v1",
6277
- $s
6331
+ Hs
6278
6332
  );
6279
6333
  m([
6280
6334
  {
@@ -6576,7 +6630,7 @@ s.forBlock.while_until_v1 = function(t) {
6576
6630
  ${o}}
6577
6631
  `;
6578
6632
  };
6579
- const Hs = {
6633
+ const $s = {
6580
6634
  // math_arithmetic
6581
6635
  ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
6582
6636
  SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
@@ -6610,7 +6664,7 @@ const Hs = {
6610
6664
  };
6611
6665
  B.register(
6612
6666
  "math_op_tooltip_v1",
6613
- B.buildTooltipForDropdown("OP", Hs)
6667
+ B.buildTooltipForDropdown("OP", $s)
6614
6668
  );
6615
6669
  m([
6616
6670
  {
@@ -7551,7 +7605,7 @@ const kn = y.xml, Js = {
7551
7605
  T.procedure_def_container_v1 = Js;
7552
7606
  const qs = {
7553
7607
  init: function() {
7554
- const t = new ut(we.DEFAULT_ARG);
7608
+ const t = new ut(Fe.DEFAULT_ARG);
7555
7609
  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;
7556
7610
  },
7557
7611
  validator_: function(t) {
@@ -7576,9 +7630,9 @@ const Qs = {
7576
7630
  init: function() {
7577
7631
  this.withReturn = !1, this.args = [];
7578
7632
  const t = new ut(
7579
- we.findLegalName("", this)
7633
+ Fe.findLegalName("", this)
7580
7634
  );
7581
- t.setValidator(we.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
7635
+ t.setValidator(Fe.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
7582
7636
  new _t.MutatorIcon(
7583
7637
  ["procedure_def_item_v1"],
7584
7638
  this
@@ -7873,7 +7927,7 @@ const ia = {
7873
7927
  };
7874
7928
  },
7875
7929
  loadExtraState: function(t) {
7876
- this.space = be(t.space), this.dir = be(t.dir), this.resource = be(t.resource);
7930
+ this.space = Se(t.space), this.dir = Se(t.dir), this.resource = Se(t.resource);
7877
7931
  },
7878
7932
  genSpaceOpts_: function() {
7879
7933
  return oa();
@@ -7954,7 +8008,7 @@ s.forBlock.text_v1 = function(t) {
7954
8008
  return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
7955
8009
  };
7956
8010
  const aa = /^\s*'([^']|\\')*'\s*$/;
7957
- function Jt(t) {
8011
+ function Xt(t) {
7958
8012
  return aa.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
7959
8013
  }
7960
8014
  B.register(
@@ -7990,7 +8044,7 @@ s.forBlock.text_append_v1 = function(t) {
7990
8044
  t.getFieldValue("VAR"),
7991
8045
  Z.NameType.VARIABLE
7992
8046
  ), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
7993
- return `${e} += ${Jt(n)};
8047
+ return `${e} += ${Xt(n)};
7994
8048
  `;
7995
8049
  };
7996
8050
  m([
@@ -8282,11 +8336,11 @@ s.forBlock.text_join_v1 = function(t) {
8282
8336
  return ["''", c.ATOMIC];
8283
8337
  case 1: {
8284
8338
  const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
8285
- return Jt(n);
8339
+ return Xt(n);
8286
8340
  }
8287
8341
  case 2: {
8288
8342
  const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
8289
- return [Jt(n)[0] + " + " + Jt(o)[0], c.ADDITION];
8343
+ return [Xt(n)[0] + " + " + Xt(o)[0], c.ADDITION];
8290
8344
  }
8291
8345
  default: {
8292
8346
  const n = new Array(e.itemCount_);
@@ -8487,13 +8541,13 @@ const ra = {
8487
8541
  updateShadow_: function() {
8488
8542
  if (this.isInsertionMarker())
8489
8543
  return;
8490
- const t = ee(1e3);
8544
+ const t = Zt(1e3);
8491
8545
  this.getInput("INTERVAL")?.setShadowDom(t);
8492
- const e = ne(!1);
8546
+ const e = te(!1);
8493
8547
  this.getInput("LOOP")?.setShadowDom(e);
8494
- const n = ee(1);
8548
+ const n = Zt(1);
8495
8549
  this.getInput("COUNT")?.setShadowDom(n);
8496
- const o = ne(!1);
8550
+ const o = te(!1);
8497
8551
  this.getInput("IMMEDIATE")?.setShadowDom(o);
8498
8552
  }
8499
8553
  };
@@ -8632,7 +8686,7 @@ Rn.setConfirm(async (t, e) => {
8632
8686
  e(!!n);
8633
8687
  });
8634
8688
  Rn.setPrompt(async (t, e, n) => {
8635
- const o = await $o({
8689
+ const o = await Ho({
8636
8690
  title: "",
8637
8691
  value: e
8638
8692
  });
@@ -8664,13 +8718,13 @@ Ht.getText_ = function() {
8664
8718
  return `${o} / ${i}`;
8665
8719
  }
8666
8720
  } else if (this.name === "PROP") {
8667
- const { id: n, names: o } = e.prop;
8721
+ const { kind: n, names: o } = e.prop;
8668
8722
  return xn(n, o);
8669
8723
  } else if (this.name === "EVENT") {
8670
- const { id: n, names: o } = e.event;
8671
- return fe(n, o);
8724
+ const { kind: n, names: o } = e.event;
8725
+ return console.log(e.event), de(n, o);
8672
8726
  } else if (this.name === "METHOD") {
8673
- const { id: n, names: o } = e.method;
8727
+ const { kind: n, names: o } = e.method;
8674
8728
  return Ze(n, o);
8675
8729
  } else {
8676
8730
  if (this.name === "SPACE")
@@ -8734,7 +8788,7 @@ Ta.init({ contextMenu: !0, shortcut: !0 });
8734
8788
  const Ea = new ma();
8735
8789
  Ea.init();
8736
8790
  function an(t) {
8737
- const e = Ft();
8791
+ const e = xt();
8738
8792
  if (!e)
8739
8793
  return;
8740
8794
  const n = e.getBlockById(t);
@@ -8747,13 +8801,13 @@ function an(t) {
8747
8801
  e.scroll(-a, -u);
8748
8802
  }
8749
8803
  function ao() {
8750
- const t = Ft();
8804
+ const t = xt();
8751
8805
  if (!t)
8752
8806
  return;
8753
8807
  const e = t.getTopBlocks(!0)?.[0];
8754
8808
  e && an(e.id);
8755
8809
  }
8756
- he.Classic.blockStyles = {
8810
+ pe.Classic.blockStyles = {
8757
8811
  color_blocks: {
8758
8812
  colourPrimary: "#a5745b",
8759
8813
  colourSecondary: "#ede3de",
@@ -8839,7 +8893,7 @@ he.Classic.blockStyles = {
8839
8893
  hat: ""
8840
8894
  }
8841
8895
  };
8842
- he.Classic.categoryStyles = {
8896
+ pe.Classic.categoryStyles = {
8843
8897
  color_category: {
8844
8898
  colour: "#a5745b"
8845
8899
  },
@@ -8906,7 +8960,7 @@ he.Classic.categoryStyles = {
8906
8960
  };
8907
8961
  const ga = Dn.defineTheme("light", {
8908
8962
  name: "light",
8909
- base: he.Classic,
8963
+ base: pe.Classic,
8910
8964
  componentStyles: {
8911
8965
  workspaceBackgroundColour: "#ffffff",
8912
8966
  toolboxBackgroundColour: "#eeeeee",
@@ -8922,7 +8976,7 @@ const ga = Dn.defineTheme("light", {
8922
8976
  }
8923
8977
  }), Aa = Dn.defineTheme("dark", {
8924
8978
  name: "dark",
8925
- base: he.Classic,
8979
+ base: pe.Classic,
8926
8980
  componentStyles: {
8927
8981
  workspaceBackgroundColour: "#1e1e1e",
8928
8982
  toolboxBackgroundColour: "#272727",
@@ -8938,7 +8992,7 @@ const ga = Dn.defineTheme("light", {
8938
8992
  }
8939
8993
  });
8940
8994
  function Ia(t) {
8941
- const e = Ft();
8995
+ const e = xt();
8942
8996
  switch (t) {
8943
8997
  case "light":
8944
8998
  e.setTheme(ga);
@@ -8948,7 +9002,7 @@ function Ia(t) {
8948
9002
  break;
8949
9003
  }
8950
9004
  }
8951
- const Qe = ["get_app_prop_v1", "get_app_state_v1"];
9005
+ const Je = ["get_app_prop_v1", "get_app_state_v1"];
8952
9006
  function it(t, e) {
8953
9007
  return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
8954
9008
  }
@@ -8956,7 +9010,7 @@ function Oa(t) {
8956
9010
  const e = [];
8957
9011
  function n(o) {
8958
9012
  for (const i of o.getChildren(!0))
8959
- Qe.includes(i.type) && e.push(i), n(i);
9013
+ Je.includes(i.type) && e.push(i), n(i);
8960
9014
  }
8961
9015
  return n(t), e;
8962
9016
  }
@@ -8982,11 +9036,11 @@ function va(t) {
8982
9036
  function Ca(t) {
8983
9037
  const e = [];
8984
9038
  for (const n of t.getChildren(!0))
8985
- if (Qe.includes(n.type))
9039
+ if (Je.includes(n.type))
8986
9040
  e.push(n);
8987
9041
  else if (n.type === "object_get_v1") {
8988
9042
  const o = n.getInputTargetBlock("OBJECT");
8989
- o && Qe.includes(o.type) && e.push(n);
9043
+ o && Je.includes(o.type) && e.push(n);
8990
9044
  }
8991
9045
  return e;
8992
9046
  }
@@ -9092,7 +9146,7 @@ const La = /* @__PURE__ */ nt({
9092
9146
  lock: { type: Boolean }
9093
9147
  },
9094
9148
  setup(t, { expose: e }) {
9095
- const { t: n } = wt(), o = t, i = cn(), a = () => {
9149
+ const { t: n } = Yt(), o = t, i = cn(), a = () => {
9096
9150
  if (!i.workspace) {
9097
9151
  console.assert(!1);
9098
9152
  return;
@@ -9130,7 +9184,7 @@ const La = /* @__PURE__ */ nt({
9130
9184
  },
9131
9185
  emits: ["update:modelValue"],
9132
9186
  setup(t) {
9133
- const { t: e } = wt(), n = Mt(t, "modelValue");
9187
+ const { t: e } = Yt(), n = Dt(t, "modelValue");
9134
9188
  return (o, i) => {
9135
9189
  const a = D("v-btn"), u = D("v-tooltip");
9136
9190
  return S(), tt(u, {
@@ -9162,7 +9216,7 @@ const La = /* @__PURE__ */ nt({
9162
9216
  },
9163
9217
  emits: ["x-click"],
9164
9218
  setup(t, { emit: e }) {
9165
- const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Yt(), a = t, u = e, l = Ot(!1), r = Y(() => ({
9219
+ const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Ft(), a = t, u = e, l = Ot(!1), r = Y(() => ({
9166
9220
  position: "relative",
9167
9221
  background: l.value ? i.value : o.value,
9168
9222
  width: "100%",
@@ -9189,8 +9243,8 @@ const La = /* @__PURE__ */ nt({
9189
9243
  onMouseover: h[3] || (h[3] = (P) => l.value = !0)
9190
9244
  }, [
9191
9245
  w("div", Ba, [
9192
- w("span", ba, Ut(a.title), 1),
9193
- a.desc ? (S(), X("span", Pa, Ut(a.desc), 1)) : ot("", !0)
9246
+ w("span", ba, Mt(a.title), 1),
9247
+ a.desc ? (S(), X("span", Pa, Mt(a.desc), 1)) : ot("", !0)
9194
9248
  ]),
9195
9249
  L(f),
9196
9250
  L(v, {
@@ -9212,7 +9266,7 @@ const La = /* @__PURE__ */ nt({
9212
9266
  class: "text-caption text-grey"
9213
9267
  }, Ma = /* @__PURE__ */ nt({
9214
9268
  __name: "index",
9215
- props: /* @__PURE__ */ $e({
9269
+ props: /* @__PURE__ */ we({
9216
9270
  lock: { type: Boolean }
9217
9271
  }, {
9218
9272
  modelValue: { type: Boolean, required: !0 },
@@ -9220,7 +9274,7 @@ const La = /* @__PURE__ */ nt({
9220
9274
  }),
9221
9275
  emits: ["update:modelValue"],
9222
9276
  setup(t, { expose: e }) {
9223
- const { t: n } = wt(), o = Mt(t, "modelValue"), i = cn(), a = Ot([]);
9277
+ const { t: n } = Yt(), o = Dt(t, "modelValue"), i = cn(), a = Ot([]);
9224
9278
  e({ update: () => {
9225
9279
  if (!i.workspace) {
9226
9280
  console.assert(!1);
@@ -9232,7 +9286,7 @@ const La = /* @__PURE__ */ nt({
9232
9286
  let U = "";
9233
9287
  if (g.type.startsWith("on_app_event_v")) {
9234
9288
  const Q = g, gt = J[Q.node.key];
9235
- gt && (U = n(gt.name), Q.node.alias && (U += " / " + Q.node.alias), U += " - " + fe(Q.event.names, Q.event.from));
9289
+ gt && (U = n(gt.name), Q.node.alias && (U += " / " + Q.node.alias), U += " - " + de(Q.event.kind, Q.event.names));
9236
9290
  } else g.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : g.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : g.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
9237
9291
  const ht = g.getCommentText() ?? "";
9238
9292
  f.push({
@@ -9309,14 +9363,14 @@ const La = /* @__PURE__ */ nt({
9309
9363
  }, null, 8, ["id", "desc", "select", "title"]))), 128))
9310
9364
  ]),
9311
9365
  _: 1
9312
- }, 8, ["modelValue"])) : (S(), X("span", Da, Ut(R(n)("x-block-lib.noOption")), 1));
9366
+ }, 8, ["modelValue"])) : (S(), X("span", Da, Mt(R(n)("x-block-lib.noOption")), 1));
9313
9367
  }
9314
9368
  }), Ua = (t, e) => {
9315
9369
  const n = t.__vccOpts || t;
9316
9370
  for (const [o, i] of e)
9317
9371
  n[o] = i;
9318
9372
  return n;
9319
- }, Va = /* @__PURE__ */ Ua(Ma, [["__scopeId", "data-v-a998c1ee"]]), xa = /* @__PURE__ */ nt({
9373
+ }, Va = /* @__PURE__ */ Ua(Ma, [["__scopeId", "data-v-6cb62cd6"]]), xa = /* @__PURE__ */ nt({
9320
9374
  __name: "index",
9321
9375
  props: {
9322
9376
  modelValue: { type: Boolean, required: !0 },
@@ -9324,7 +9378,7 @@ const La = /* @__PURE__ */ nt({
9324
9378
  },
9325
9379
  emits: ["update:modelValue"],
9326
9380
  setup(t, { expose: e }) {
9327
- const n = Mt(t, "modelValue"), o = cn();
9381
+ const n = Dt(t, "modelValue"), o = cn();
9328
9382
  e({ update: () => {
9329
9383
  if (!o.workspace) {
9330
9384
  console.assert(!1);
@@ -9332,7 +9386,7 @@ const La = /* @__PURE__ */ nt({
9332
9386
  }
9333
9387
  } });
9334
9388
  const a = (u) => {
9335
- const l = Ft();
9389
+ const l = xt();
9336
9390
  if (!l) {
9337
9391
  console.assert(!1);
9338
9392
  return;
@@ -9351,7 +9405,7 @@ const La = /* @__PURE__ */ nt({
9351
9405
  lock: { type: Boolean }
9352
9406
  },
9353
9407
  setup(t, { expose: e }) {
9354
- const { t: n } = wt(), o = ei(), { sysBarAvail: i } = Vn(), { backgroundColor1: a } = Yt(), u = Y(() => {
9408
+ const { t: n } = Yt(), o = ei(), { sysBarAvail: i } = Vn(), { backgroundColor1: a } = Ft(), u = Y(() => {
9355
9409
  let v = "100%";
9356
9410
  return o.mdAndUp.value && (v = "400px"), {
9357
9411
  background: a.value,
@@ -9366,7 +9420,7 @@ const La = /* @__PURE__ */ nt({
9366
9420
  };
9367
9421
  }), r = Y(() => ({
9368
9422
  height: "60px"
9369
- })), { open: _ } = ze(`blocklyNavigatorDlg${He()}`);
9423
+ })), { open: _ } = qe(`blocklyNavigatorDlg${Ke()}`);
9370
9424
  zo(() => {
9371
9425
  _.value = !1;
9372
9426
  });
@@ -9378,19 +9432,19 @@ const La = /* @__PURE__ */ nt({
9378
9432
  return S(), X(Yn, null, [
9379
9433
  L(Q, {
9380
9434
  modelValue: R(_),
9381
- "onUpdate:modelValue": g[5] || (g[5] = (H) => Xt(_) ? _.value = H : null),
9435
+ "onUpdate:modelValue": g[5] || (g[5] = ($) => jt(_) ? _.value = $ : null),
9382
9436
  eager: "",
9383
9437
  fullscreen: "",
9384
9438
  "no-click-animation": "",
9385
9439
  persistent: "",
9386
9440
  transition: "scroll-x-reverse-transition",
9387
- onKeydown: g[6] || (g[6] = wn(Pt((H) => _.value = !1, ["stop", "prevent"]), ["esc"]))
9441
+ onKeydown: g[6] || (g[6] = wn(Pt(($) => _.value = !1, ["stop", "prevent"]), ["esc"]))
9388
9442
  }, {
9389
9443
  default: et(() => [
9390
9444
  w("div", {
9391
9445
  class: "w-100 h-100 d-flex flex-row-reverse",
9392
- onClick: g[3] || (g[3] = Pt((H) => _.value = !1, ["self"])),
9393
- onContextmenu: g[4] || (g[4] = Pt((H) => _.value = !1, ["self", "prevent"]))
9446
+ onClick: g[3] || (g[3] = Pt(($) => _.value = !1, ["self"])),
9447
+ onContextmenu: g[4] || (g[4] = Pt(($) => _.value = !1, ["self", "prevent"]))
9394
9448
  }, [
9395
9449
  w("div", {
9396
9450
  class: "elevation-2",
@@ -9411,9 +9465,9 @@ const La = /* @__PURE__ */ nt({
9411
9465
  density: "comfortable",
9412
9466
  icon: "mdi-close",
9413
9467
  variant: "text",
9414
- onClick: g[0] || (g[0] = (H) => _.value = !1)
9468
+ onClick: g[0] || (g[0] = ($) => _.value = !1)
9415
9469
  }),
9416
- w("span", Fa, Ut(R(n)("x-block-lib.navigator")), 1),
9470
+ w("span", Fa, Mt(R(n)("x-block-lib.navigator")), 1),
9417
9471
  L(ht)
9418
9472
  ]),
9419
9473
  _: 1
@@ -9427,14 +9481,14 @@ const La = /* @__PURE__ */ nt({
9427
9481
  ref_key: "blockList",
9428
9482
  ref: d,
9429
9483
  modelValue: R(_),
9430
- "onUpdate:modelValue": g[1] || (g[1] = (H) => Xt(_) ? _.value = H : null),
9484
+ "onUpdate:modelValue": g[1] || (g[1] = ($) => jt(_) ? _.value = $ : null),
9431
9485
  lock: t.lock
9432
9486
  }, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), tt(xa, {
9433
9487
  key: 1,
9434
9488
  ref_key: "blockTree",
9435
9489
  ref: h,
9436
9490
  modelValue: R(_),
9437
- "onUpdate:modelValue": g[2] || (g[2] = (H) => Xt(_) ? _.value = H : null)
9491
+ "onUpdate:modelValue": g[2] || (g[2] = ($) => jt(_) ? _.value = $ : null)
9438
9492
  }, null, 8, ["modelValue"])) : ot("", !0),
9439
9493
  w("div", {
9440
9494
  style: G(r.value)
@@ -9448,8 +9502,8 @@ const La = /* @__PURE__ */ nt({
9448
9502
  L(gt, {
9449
9503
  text: R(n)("x-block-lib.tip.hotkeyCtrlE")
9450
9504
  }, {
9451
- activator: et(({ props: H }) => [
9452
- L(U, en(H, {
9505
+ activator: et(({ props: $ }) => [
9506
+ L(U, en($, {
9453
9507
  density: "comfortable",
9454
9508
  icon: "mdi-navigation-variant",
9455
9509
  variant: "outlined",
@@ -9515,29 +9569,29 @@ function wa(t, e) {
9515
9569
  function Ka() {
9516
9570
  return E.app.activeObject.type === "comp" && E.app.activeComp.meta.events.length > 0;
9517
9571
  }
9518
- function $a() {
9572
+ function Ha() {
9519
9573
  return E.app.activeObject.type === "comp" && E.app.activeComp.meta.states.length > 0;
9520
9574
  }
9521
9575
  function Sn() {
9522
9576
  return E.app.activeObject.type === "comp" && E.app.activeComp.meta.methods.length > 0;
9523
9577
  }
9524
- function Ha() {
9578
+ function $a() {
9525
9579
  const t = [];
9526
9580
  return t.push(V(p("LABEL_EVENT"))), W("onEvent") && t.push(O("on_app_event_v1")), Ka() && t.push(O("trigger_app_event_v1")), t.push(
9527
9581
  O("app_bind_v1", [uo([{ key: "items", value: "2" }])])
9528
- ), t.push(O("watch_effect_v1")), (W("getProp") || W("setProp")) && t.push(V(p("LABEL_PROPERTY"))), W("getProp") && t.push(O("get_app_prop_v1")), W("setProp") && t.push(O("set_app_prop_v1")), $a() && (t.push(V(p("LABEL_STATE"))), t.push(O("get_app_state_v1")), t.push(O("set_app_state_v1"))), (W("callMethod") || Sn()) && t.push(V(p("LABEL_METHOD"))), W("callMethod") && t.push(O("call_app_method_v1")), Sn() && (t.push(O("impl_app_method_v1")), t.push(O("set_app_method_output_v1")), t.push(O("procedure_return_v1"))), t;
9582
+ ), t.push(O("watch_effect_v1")), (W("getProp") || W("setProp")) && t.push(V(p("LABEL_PROPERTY"))), W("getProp") && t.push(O("get_app_prop_v1")), W("setProp") && t.push(O("set_app_prop_v1")), Ha() && (t.push(V(p("LABEL_STATE"))), t.push(O("get_app_state_v1")), t.push(O("set_app_state_v1"))), (W("callMethod") || Sn()) && t.push(V(p("LABEL_METHOD"))), W("callMethod") && t.push(O("call_app_method_v1")), Sn() && (t.push(O("impl_app_method_v1")), t.push(O("set_app_method_output_v1")), t.push(O("procedure_return_v1"))), t;
9529
9583
  }
9530
- const lo = { name: "APP_COMP_CATEGORY", callback: Ha };
9584
+ const lo = { name: "APP_COMP_CATEGORY", callback: $a };
9531
9585
  function Ga() {
9532
9586
  const t = [];
9533
9587
  return t.push(V(p("LABEL_FUNC"))), t.push(V(p("LABEL_FLOW"))), t;
9534
9588
  }
9535
- const ae = { name: "APP_COMPUTE_CATEGORY", callback: Ga };
9589
+ const ie = { name: "APP_COMPUTE_CATEGORY", callback: Ga };
9536
9590
  function Wa() {
9537
9591
  const t = [];
9538
9592
  return t.push(O("app_debug_trace_v1", [yt("OBJECT")])), t.push(O("popup_message_v1", [yt("TEXT")])), t.push(O("open_confirm_dlg_v1")), t.push(O("open_prompt_dlg_v1")), t;
9539
9593
  }
9540
- const ce = { name: "APP_MESSAGE_CATEGORY", callback: Wa };
9594
+ const se = { name: "APP_MESSAGE_CATEGORY", callback: Wa };
9541
9595
  function ja() {
9542
9596
  for (const t of E.app.appList)
9543
9597
  if (t.pages.length > 0)
@@ -9548,7 +9602,7 @@ function Xa() {
9548
9602
  const t = [];
9549
9603
  return t.push(O("app_env_is_v1")), ja() && t.push(O("navigate_to_v1")), t;
9550
9604
  }
9551
- const ue = { name: "APP_MISC_CATEGORY", callback: Xa };
9605
+ const ae = { name: "APP_MISC_CATEGORY", callback: Xa };
9552
9606
  function Ja() {
9553
9607
  return E.app.activeObject.type === "page" && E.app.activePage.meta.states.length > 0;
9554
9608
  }
@@ -9566,7 +9620,7 @@ function za() {
9566
9620
  const t = [];
9567
9621
  return t.push(V(p("LABEL_RESOURCE"))), t.push(O("upload_resource_v1")), t;
9568
9622
  }
9569
- const le = { name: "APP_RESOURCE_CATEGORY", callback: za }, Bt = y.xml;
9623
+ const ce = { name: "APP_RESOURCE_CATEGORY", callback: za }, Bt = y.xml;
9570
9624
  function Za() {
9571
9625
  const t = [];
9572
9626
  {
@@ -9593,11 +9647,11 @@ function Za() {
9593
9647
  const st = {
9594
9648
  name: "PROCEDURE_CATEGORY",
9595
9649
  callback: Za
9596
- }, Wt = y.xml;
9650
+ }, Gt = y.xml;
9597
9651
  function tc() {
9598
- const t = Ft(), e = [];
9652
+ const t = xt(), e = [];
9599
9653
  {
9600
- const o = Wt.createElement("label");
9654
+ const o = Gt.createElement("label");
9601
9655
  o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
9602
9656
  }
9603
9657
  {
@@ -9616,16 +9670,16 @@ function tc() {
9616
9670
  return e;
9617
9671
  n.sort(It.compareByName);
9618
9672
  {
9619
- const o = Wt.createElement("label");
9673
+ const o = Gt.createElement("label");
9620
9674
  o.setAttribute("text", p("LABEL_CREATED")), e.push(o);
9621
9675
  }
9622
9676
  return n.forEach((o) => {
9623
9677
  {
9624
- const i = Wt.createElement("block");
9678
+ const i = Gt.createElement("block");
9625
9679
  i.setAttribute("type", "variable_get_v1"), i.appendChild(It.generateVariableFieldDom(o)), e.push(i);
9626
9680
  }
9627
9681
  {
9628
- const i = Wt.createElement("block");
9682
+ const i = Gt.createElement("block");
9629
9683
  i.setAttribute("type", "variable_set_v1"), i.appendChild(It.generateVariableFieldDom(o)), e.push(i);
9630
9684
  }
9631
9685
  }), e;
@@ -9656,30 +9710,30 @@ function ec() {
9656
9710
  }
9657
9711
  return t;
9658
9712
  }
9659
- const re = { name: "COMPUTE_DATA_CATEGORY", callback: ec };
9713
+ const ue = { name: "COMPUTE_DATA_CATEGORY", callback: ec };
9660
9714
  function nc() {
9661
- return $t("flow").length > 0;
9715
+ return Kt("flow").length > 0;
9662
9716
  }
9663
9717
  function oc() {
9664
9718
  const t = [];
9665
9719
  return E.compute.activeObject.type === "flow" && t.push(O("on_flow_state_event_v1")), nc() && console.assert(!0), t;
9666
9720
  }
9667
- const _e = { name: "COMPUTE_FLOW_CATEGORY", callback: oc };
9721
+ const le = { name: "COMPUTE_FLOW_CATEGORY", callback: oc };
9668
9722
  function ic() {
9669
- return $t("func").length > 0;
9723
+ return Kt("func").length > 0;
9670
9724
  }
9671
9725
  function sc() {
9672
9726
  const t = [];
9673
9727
  return E.compute.activeObject.type === "func" && (t.push(O("func_entry_v1")), E.compute.activeFunc.outputs.length > 0 && t.push(O("set_func_output_v1")), t.push(O("procedure_return_v1"))), ic() && t.push(O("call_func_internal_v1")), t;
9674
9728
  }
9675
- const pe = { name: "COMPUTE_FUNC_CATEGORY", callback: sc };
9729
+ const re = { name: "COMPUTE_FUNC_CATEGORY", callback: sc };
9676
9730
  function ac() {
9677
9731
  const t = [];
9678
9732
  return t.push(
9679
9733
  O("compute_debug_trace_v1", [yt("OBJECT")])
9680
9734
  ), t;
9681
9735
  }
9682
- const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
9736
+ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
9683
9737
  kind: "category",
9684
9738
  name: "%{BKY_CATEGORY_COLOR}",
9685
9739
  categorystyle: "color_category",
@@ -9753,7 +9807,7 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
9753
9807
  }
9754
9808
  }
9755
9809
  ]
9756
- }, Ce = {
9810
+ }, Oe = {
9757
9811
  kind: "category",
9758
9812
  name: "%{BKY_CATEGORY_LIST}",
9759
9813
  categorystyle: "list_category",
@@ -9868,7 +9922,7 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
9868
9922
  type: "list_reverse_v1"
9869
9923
  }
9870
9924
  ]
9871
- }, ye = {
9925
+ }, ve = {
9872
9926
  kind: "category",
9873
9927
  name: "%{BKY_CATEGORY_LOGIC}",
9874
9928
  categorystyle: "logic_category",
@@ -9910,7 +9964,7 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
9910
9964
  type: "logic_ternary_v1"
9911
9965
  }
9912
9966
  ]
9913
- }, ke = {
9967
+ }, Ce = {
9914
9968
  kind: "category",
9915
9969
  name: "%{BKY_CATEGORY_LOOP}",
9916
9970
  categorystyle: "loop_category",
@@ -9972,7 +10026,7 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
9972
10026
  type: "flow_control_v1"
9973
10027
  }
9974
10028
  ]
9975
- }, Ne = {
10029
+ }, ye = {
9976
10030
  kind: "category",
9977
10031
  name: "%{BKY_CATEGORY_MATH}",
9978
10032
  categorystyle: "math_category",
@@ -10127,7 +10181,7 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10127
10181
  type: "math_on_list_v1"
10128
10182
  }
10129
10183
  ]
10130
- }, Le = {
10184
+ }, ke = {
10131
10185
  kind: "category",
10132
10186
  name: "%{BKY_CATEGORY_OBJECT}",
10133
10187
  categorystyle: "object_category",
@@ -10195,7 +10249,7 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10195
10249
  }
10196
10250
  }
10197
10251
  ]
10198
- }, Se = {
10252
+ }, Ne = {
10199
10253
  kind: "category",
10200
10254
  name: "%{BKY_CATEGORY_TEXT}",
10201
10255
  categorystyle: "text_category",
@@ -10395,21 +10449,21 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10395
10449
  kind: "category",
10396
10450
  name: "%{BKY_CATEGORY_MESSAGE}",
10397
10451
  categorystyle: "misc_category",
10398
- custom: ce.name
10452
+ custom: se.name
10399
10453
  },
10400
10454
  {
10401
10455
  kind: "category",
10402
10456
  name: "%{BKY_CATEGORY_MISC}",
10403
10457
  categorystyle: "misc_category",
10404
- custom: ue.name
10458
+ custom: ae.name
10405
10459
  },
10406
- ke,
10407
- ye,
10408
- Ne,
10409
- Se,
10410
10460
  Ce,
10411
- Le,
10412
10461
  ve,
10462
+ ye,
10463
+ Ne,
10464
+ Oe,
10465
+ ke,
10466
+ Ie,
10413
10467
  _o,
10414
10468
  {
10415
10469
  kind: "category",
@@ -10427,13 +10481,13 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10427
10481
  kind: "category",
10428
10482
  name: "%{BKY_CATEGORY_RESOURCE}",
10429
10483
  categorystyle: "resource_category",
10430
- custom: le.name
10484
+ custom: ce.name
10431
10485
  },
10432
10486
  {
10433
10487
  kind: "category",
10434
10488
  name: "%{BKY_CATEGORY_COMPUTE}",
10435
10489
  categorystyle: "compute_category",
10436
- custom: ae.name
10490
+ custom: ie.name
10437
10491
  }
10438
10492
  ]
10439
10493
  }, uc = {
@@ -10443,33 +10497,33 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10443
10497
  kind: "category",
10444
10498
  name: "%{BKY_CATEGORY_FUNC}",
10445
10499
  categorystyle: "func_category",
10446
- custom: pe.name
10500
+ custom: re.name
10447
10501
  },
10448
10502
  {
10449
10503
  kind: "category",
10450
10504
  name: "%{BKY_CATEGORY_FLOW}",
10451
10505
  categorystyle: "flow_category",
10452
- custom: _e.name
10506
+ custom: le.name
10453
10507
  },
10454
10508
  {
10455
10509
  kind: "category",
10456
10510
  name: "%{BKY_CATEGORY_DATA}",
10457
10511
  categorystyle: "data_category",
10458
- custom: re.name
10512
+ custom: ue.name
10459
10513
  },
10460
10514
  {
10461
10515
  kind: "category",
10462
10516
  name: "%{BKY_CATEGORY_MISC}",
10463
10517
  categorystyle: "misc_category",
10464
- custom: de.name
10518
+ custom: _e.name
10465
10519
  },
10466
- ke,
10467
- ye,
10468
- Ne,
10469
- Se,
10470
10520
  Ce,
10471
- Le,
10472
10521
  ve,
10522
+ ye,
10523
+ Ne,
10524
+ Oe,
10525
+ ke,
10526
+ Ie,
10473
10527
  {
10474
10528
  kind: "category",
10475
10529
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -10490,33 +10544,33 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10490
10544
  kind: "category",
10491
10545
  name: "%{BKY_CATEGORY_FUNC}",
10492
10546
  categorystyle: "func_category",
10493
- custom: pe.name
10547
+ custom: re.name
10494
10548
  },
10495
10549
  {
10496
10550
  kind: "category",
10497
10551
  name: "%{BKY_CATEGORY_FLOW}",
10498
10552
  categorystyle: "flow_category",
10499
- custom: _e.name
10553
+ custom: le.name
10500
10554
  },
10501
10555
  {
10502
10556
  kind: "category",
10503
10557
  name: "%{BKY_CATEGORY_DATA}",
10504
10558
  categorystyle: "data_category",
10505
- custom: re.name
10559
+ custom: ue.name
10506
10560
  },
10507
10561
  {
10508
10562
  kind: "category",
10509
10563
  name: "%{BKY_CATEGORY_MISC}",
10510
10564
  categorystyle: "misc_category",
10511
- custom: de.name
10565
+ custom: _e.name
10512
10566
  },
10513
- ke,
10514
- ye,
10515
- Ne,
10516
- Se,
10517
10567
  Ce,
10518
- Le,
10519
10568
  ve,
10569
+ ye,
10570
+ Ne,
10571
+ Oe,
10572
+ ke,
10573
+ Ie,
10520
10574
  {
10521
10575
  kind: "category",
10522
10576
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -10574,21 +10628,21 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10574
10628
  kind: "category",
10575
10629
  name: "%{BKY_CATEGORY_MESSAGE}",
10576
10630
  categorystyle: "misc_category",
10577
- custom: ce.name
10631
+ custom: se.name
10578
10632
  },
10579
10633
  {
10580
10634
  kind: "category",
10581
10635
  name: "%{BKY_CATEGORY_MISC}",
10582
10636
  categorystyle: "misc_category",
10583
- custom: ue.name
10637
+ custom: ae.name
10584
10638
  },
10585
- ke,
10586
- ye,
10587
- Ne,
10588
- Se,
10589
10639
  Ce,
10590
- Le,
10591
10640
  ve,
10641
+ ye,
10642
+ Ne,
10643
+ Oe,
10644
+ ke,
10645
+ Ie,
10592
10646
  _o,
10593
10647
  {
10594
10648
  kind: "category",
@@ -10606,16 +10660,16 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10606
10660
  kind: "category",
10607
10661
  name: "%{BKY_CATEGORY_RESOURCE}",
10608
10662
  categorystyle: "resource_category",
10609
- custom: le.name
10663
+ custom: ce.name
10610
10664
  },
10611
10665
  {
10612
10666
  kind: "category",
10613
10667
  name: "%{BKY_CATEGORY_COMPUTE}",
10614
10668
  categorystyle: "compute_category",
10615
- custom: ae.name
10669
+ custom: ie.name
10616
10670
  }
10617
10671
  ]
10618
- }, Fe = {
10672
+ }, Ve = {
10619
10673
  grid: {
10620
10674
  length: 2,
10621
10675
  snap: !0,
@@ -10642,8 +10696,8 @@ const de = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, ve = {
10642
10696
  }
10643
10697
  };
10644
10698
  function pc(t, e, n, o) {
10645
- Fe.theme = o ? "dark" : "light", Fe.toolbox = dc(e, n);
10646
- const i = Do(t, Fe);
10699
+ Ve.theme = o ? "dark" : "light", Ve.toolbox = dc(e, n);
10700
+ const i = Do(t, Ve);
10647
10701
  return i.addChangeListener(Mo.shadowBlockConversionChangeListener), hc(i, e, n), fc(i), i;
10648
10702
  }
10649
10703
  function dc(t, e) {
@@ -10654,7 +10708,7 @@ function hc(t, e, n) {
10654
10708
  function o({ name: i, callback: a }) {
10655
10709
  t.registerToolboxCategoryCallback(i, () => a(e));
10656
10710
  }
10657
- e === "page" ? n === "v1" && (o(ro), o(ce), o(ue), o(at), o(st), o(le), o(ae)) : e === "comp" ? n === "v1" && (o(lo), o(ce), o(ue), o(at), o(st), o(le), o(ae)) : e === "func" ? n === "v1" && (o(pe), o(_e), o(re), o(de), o(at), o(st)) : e === "flow" && n === "v1" && (o(pe), o(_e), o(re), o(de), o(at), o(st));
10711
+ e === "page" ? n === "v1" && (o(ro), o(se), o(ae), o(at), o(st), o(ce), o(ie)) : e === "comp" ? n === "v1" && (o(lo), o(se), o(ae), o(at), o(st), o(ce), o(ie)) : e === "func" ? n === "v1" && (o(re), o(le), o(ue), o(_e), o(at), o(st)) : e === "flow" && n === "v1" && (o(re), o(le), o(ue), o(_e), o(at), o(st));
10658
10712
  }
10659
10713
  function fc(t) {
10660
10714
  const { router: e } = Et;
@@ -10750,7 +10804,7 @@ function Tc(t) {
10750
10804
  }
10751
10805
  const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10752
10806
  __name: "index",
10753
- props: /* @__PURE__ */ $e({
10807
+ props: /* @__PURE__ */ we({
10754
10808
  type: {},
10755
10809
  version: {},
10756
10810
  locale: {},
@@ -10761,9 +10815,9 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10761
10815
  scale: { required: !0 },
10762
10816
  scaleModifiers: {}
10763
10817
  }),
10764
- emits: /* @__PURE__ */ $e(["ready"], ["update:lock", "update:scale"]),
10818
+ emits: /* @__PURE__ */ we(["ready"], ["update:lock", "update:scale"]),
10765
10819
  setup(t, { expose: e, emit: n }) {
10766
- const { backgroundColor2: o } = Yt(), i = Mt(t, "lock"), a = Mt(t, "scale"), u = n, l = `blocklyEditor${He()}`, r = Ot(), _ = Rt("parentContainer"), d = Rt("clean"), h = Rt("navigator"), f = {};
10820
+ const { backgroundColor2: o } = Ft(), i = Dt(t, "lock"), a = Dt(t, "scale"), u = n, l = `blocklyEditor${Ke()}`, r = Ot(), _ = Rt("parentContainer"), d = Rt("clean"), h = Rt("navigator"), f = {};
10767
10821
  Na(f);
10768
10822
  const v = Ot(!0), g = Ot(!1), P = Y(() => t.type === "json" ? "tree" : "list"), U = Y(() => ({
10769
10823
  width: "100%",
@@ -10787,7 +10841,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10787
10841
  top: "0px",
10788
10842
  right: "0px",
10789
10843
  zIndex: 20
10790
- })), H = Y(() => ({
10844
+ })), $ = Y(() => ({
10791
10845
  position: "absolute",
10792
10846
  background: t.dark ? "#0000007f" : "#ffffff7f",
10793
10847
  top: "0px",
@@ -10808,7 +10862,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10808
10862
  top: 0,
10809
10863
  left: 0,
10810
10864
  zIndex: 3e3
10811
- })), { open: Lt } = ze(`blocklyEditorFlyout${He()}`);
10865
+ })), { open: Lt } = qe(`blocklyEditorFlyout${Ke()}`);
10812
10866
  mn(async () => {
10813
10867
  if (!r.value || !_.value) {
10814
10868
  console.assert(!1);
@@ -10816,9 +10870,9 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10816
10870
  }
10817
10871
  Uo(_.value), await En(t.locale), f.workspace = pc(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(A.disableOrphans), f.workspace.addChangeListener(ho);
10818
10872
  const N = document.querySelector(`#${l} .blocklyFlyout`);
10819
- new MutationObserver((Be) => {
10820
- Be.forEach((Gt) => {
10821
- Gt.type === "attributes" && Gt.attributeName === "style" && (Lt.value = f.workspace.getFlyout().isVisible());
10873
+ new MutationObserver((Le) => {
10874
+ Le.forEach(($t) => {
10875
+ $t.type === "attributes" && $t.attributeName === "style" && (Lt.value = f.workspace.getFlyout().isVisible());
10822
10876
  });
10823
10877
  }).observe(N, { attributes: !0 }), Lt.value = f.workspace.getFlyout().isVisible(), ln(), rn(), await Zo(), u("ready");
10824
10878
  }), Tn(() => {
@@ -10891,7 +10945,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10891
10945
  generateReactivity: Eo,
10892
10946
  fireStateChange: go
10893
10947
  }), (N, ft) => {
10894
- const Be = D("v-icon"), Gt = D("x-loading");
10948
+ const Le = D("v-icon"), $t = D("x-loading");
10895
10949
  return S(), X("div", Ec, [
10896
10950
  w("div", {
10897
10951
  id: l,
@@ -10909,7 +10963,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10909
10963
  class: "d-flex flex-column justify-center align-center",
10910
10964
  style: G(Q.value)
10911
10965
  }, [
10912
- L(Be, {
10966
+ L(Le, {
10913
10967
  icon: "mdi-delete",
10914
10968
  size: "x-large"
10915
10969
  })
@@ -10941,14 +10995,14 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10941
10995
  }, null, 4)) : ot("", !0),
10942
10996
  i.value ? (S(), X("div", {
10943
10997
  key: 3,
10944
- style: G(H.value)
10998
+ style: G($.value)
10945
10999
  }, null, 4)) : ot("", !0),
10946
11000
  w("div", {
10947
11001
  ref_key: "parentContainer",
10948
11002
  ref: _,
10949
11003
  style: G(po.value)
10950
11004
  }, null, 4),
10951
- L(Gt, {
11005
+ L($t, {
10952
11006
  open: v.value,
10953
11007
  "z-index": 99
10954
11008
  }, null, 8, ["open"])
@@ -10963,7 +11017,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10963
11017
  setup(t) {
10964
11018
  const e = t;
10965
11019
  Fo.registerLanguage("javascript", Yo);
10966
- const n = wo.component, { backgroundColor2: o } = Yt();
11020
+ const n = wo.component, { backgroundColor2: o } = Ft();
10967
11021
  return (i, a) => {
10968
11022
  const u = D("v-sheet");
10969
11023
  return S(), tt(u, {
@@ -10984,7 +11038,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10984
11038
  }), Ic = { class: "text-subtitle-1" }, Oc = { class: "w-100 h-100 overflow-auto" }, vc = /* @__PURE__ */ nt({
10985
11039
  __name: "index",
10986
11040
  setup(t) {
10987
- const { t: e } = wt(), { sysBarAvail: n } = Vn(), { backgroundColor0: o, backgroundColor2: i } = Yt(), a = Ot(""), u = Y(() => {
11041
+ const { t: e } = Yt(), { sysBarAvail: n } = Vn(), { backgroundColor0: o, backgroundColor2: i } = Ft(), a = Ot(""), u = Y(() => {
10988
11042
  let _ = 48;
10989
11043
  return n.value && (_ += 24), {
10990
11044
  position: "relative",
@@ -10992,12 +11046,12 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
10992
11046
  };
10993
11047
  }), l = (_) => {
10994
11048
  a.value = _.code;
10995
- }, { open: r } = ze("sourceDlg", l);
11049
+ }, { open: r } = qe("sourceDlg", l);
10996
11050
  return (_, d) => {
10997
11051
  const h = D("v-sheet"), f = D("v-btn"), v = D("v-spacer"), g = D("v-dialog");
10998
11052
  return S(), tt(g, {
10999
11053
  modelValue: R(r),
11000
- "onUpdate:modelValue": d[1] || (d[1] = (P) => Xt(r) ? r.value = P : null),
11054
+ "onUpdate:modelValue": d[1] || (d[1] = (P) => jt(r) ? r.value = P : null),
11001
11055
  fullscreen: "",
11002
11056
  "no-click-animation": "",
11003
11057
  persistent: "",
@@ -11028,7 +11082,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
11028
11082
  variant: "text",
11029
11083
  onClick: d[0] || (d[0] = (P) => r.value = !1)
11030
11084
  }),
11031
- w("span", Ic, Ut(R(e)("x-block-lib.dlg.source.title")), 1),
11085
+ w("span", Ic, Mt(R(e)("x-block-lib.dlg.source.title")), 1),
11032
11086
  L(v)
11033
11087
  ]),
11034
11088
  _: 1
@@ -11052,7 +11106,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
11052
11106
  t.component("XBlockly", gc), t.component("XSourceDlg", vc);
11053
11107
  };
11054
11108
  async function Pc(t) {
11055
- return (await $n(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
11109
+ return (await Hn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
11056
11110
  }
11057
11111
  const Rc = { install: Cc };
11058
11112
  export {