x-block-lib 0.1.1 → 0.1.2

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
@@ -1,471 +1,478 @@
1
- import { B as ge } from "./blockly-ByC0ID0H.js";
2
- import { getCurrentInstance as oe, inject as re, hasInjectionContext as _e, ref as O, watch as ne, reactive as Ee, markRaw as V, effectScope as ve, isRef as A, isReactive as z, toRef as B, toRaw as Ne, nextTick as J, computed as ae, getCurrentScope as Oe, onScopeDispose as Ce, toRefs as Z } from "vue";
1
+ import { B as ke } from "./blockly-ByC0ID0H.js";
2
+ import { getCurrentInstance as se, inject as G, hasInjectionContext as Oe, ref as O, watch as M, reactive as Ne, markRaw as V, effectScope as Ce, isRef as R, isReactive as H, toRef as F, toRaw as Se, nextTick as U, computed as X, getCurrentScope as Te, onScopeDispose as Pe, toRefs as ee, onMounted as ce, onBeforeUnmount as ie, defineComponent as we, openBlock as De, createElementBlock as Ve, withDirectives as xe, createElementVNode as Me } from "vue";
3
3
  const {
4
- ASTNode: Ge,
5
- BasicCursor: He,
6
- Block: qe,
7
- BlockSvg: Xe,
8
- Blocks: Ye,
9
- COLLAPSED_FIELD_NAME: Je,
10
- COLLAPSED_INPUT_NAME: Ze,
11
- COLLAPSE_CHARS: Qe,
12
- CodeGenerator: Ke,
13
- CollapsibleToolboxCategory: et,
14
- ComponentManager: tt,
15
- Connection: ot,
16
- ConnectionChecker: rt,
17
- ConnectionDB: nt,
18
- ConnectionType: at,
19
- ContextMenu: st,
20
- ContextMenuItems: ct,
21
- ContextMenuRegistry: it,
22
- Css: lt,
23
- Cursor: ut,
24
- DELETE_VARIABLE_ID: dt,
25
- DeleteArea: ft,
26
- DragTarget: mt,
27
- DropDownDiv: yt,
28
- Events: ht,
29
- Extensions: pt,
30
- Field: bt,
31
- FieldCheckbox: gt,
32
- FieldDropdown: _t,
33
- FieldImage: Et,
34
- FieldLabel: vt,
35
- FieldLabelSerializable: Nt,
36
- FieldNumber: Ot,
37
- FieldTextInput: Ct,
38
- FieldVariable: kt,
39
- Flyout: Tt,
40
- FlyoutButton: Pt,
41
- FlyoutMetricsManager: St,
42
- Generator: Dt,
43
- Gesture: Vt,
44
- Grid: wt,
45
- HorizontalFlyout: xt,
46
- INPUT_VALUE: At,
47
- Input: Mt,
48
- InsertionMarkerManager: It,
49
- InsertionMarkerPreviewer: jt,
50
- Marker: Rt,
51
- MarkerManager: Lt,
52
- Menu: Bt,
53
- MenuItem: Ft,
54
- MetricsManager: $t,
55
- Msg: Ut,
56
- NEXT_STATEMENT: Wt,
57
- Names: zt,
58
- OPPOSITE_TYPE: Gt,
59
- OUTPUT_VALUE: Ht,
60
- Options: qt,
61
- PREVIOUS_STATEMENT: Xt,
62
- PROCEDURE_CATEGORY_NAME: Yt,
63
- Procedures: Jt,
64
- RENAME_VARIABLE_ID: Zt,
65
- RenderedConnection: Qt,
66
- Scrollbar: Kt,
67
- ScrollbarPair: eo,
68
- ShortcutItems: to,
69
- ShortcutRegistry: oo,
70
- TOOLBOX_AT_BOTTOM: ro,
71
- TOOLBOX_AT_LEFT: no,
72
- TOOLBOX_AT_RIGHT: ao,
73
- TOOLBOX_AT_TOP: so,
74
- TabNavigateCursor: co,
75
- Theme: se,
76
- ThemeManager: io,
77
- Themes: R,
78
- Toolbox: lo,
79
- ToolboxCategory: uo,
80
- ToolboxItem: fo,
81
- ToolboxSeparator: mo,
82
- Tooltip: yo,
83
- Touch: ho,
84
- Trashcan: po,
85
- UnattachedFieldError: bo,
86
- VARIABLE_CATEGORY_NAME: go,
87
- VARIABLE_DYNAMIC_CATEGORY_NAME: _o,
88
- VERSION: Eo,
89
- VariableMap: vo,
90
- VariableModel: No,
91
- Variables: Oo,
92
- VariablesDynamic: Co,
93
- VerticalFlyout: ko,
94
- WidgetDiv: To,
95
- Workspace: Po,
96
- WorkspaceAudio: So,
97
- WorkspaceDragger: Do,
98
- WorkspaceSvg: Vo,
99
- Xml: wo,
100
- ZoomControls: xo,
101
- blockAnimations: Ao,
102
- blockRendering: Mo,
103
- browserEvents: Io,
104
- bubbles: jo,
105
- bumpObjects: Ro,
106
- clipboard: Lo,
107
- comments: Bo,
108
- common: Fo,
109
- config: $o,
110
- constants: Uo,
111
- defineBlocksWithJsonArray: Wo,
112
- dialog: ce,
113
- dragging: zo,
114
- fieldRegistry: Go,
115
- geras: Ho,
116
- getMainWorkspace: ke,
117
- getSelected: qo,
118
- hasBubble: Xo,
119
- hideChaff: Yo,
120
- icons: Jo,
121
- inject: Zo,
122
- inputs: Qo,
123
- isCopyable: Ko,
124
- isDeletable: er,
125
- isDraggable: tr,
126
- isIcon: or,
127
- isObservable: rr,
128
- isPaster: nr,
129
- isRenderedElement: ar,
130
- isSelectable: sr,
131
- isSerializable: cr,
132
- isVariableBackedParameterModel: ir,
133
- procedures: lr,
134
- registry: ur,
135
- renderManagement: dr,
136
- serialization: fr,
137
- setLocale: Te,
138
- setParentContainer: mr,
139
- svgResize: yr,
140
- thrasos: hr,
141
- uiPosition: pr,
142
- utils: br,
143
- zelos: gr
144
- } = ge;
145
- function Pe(e, r) {
146
- const o = oe();
4
+ ASTNode: mt,
5
+ BasicCursor: yt,
6
+ Block: ht,
7
+ BlockSvg: pt,
8
+ Blocks: bt,
9
+ COLLAPSED_FIELD_NAME: gt,
10
+ COLLAPSED_INPUT_NAME: _t,
11
+ COLLAPSE_CHARS: vt,
12
+ CodeGenerator: Et,
13
+ CollapsibleToolboxCategory: kt,
14
+ ComponentManager: Ot,
15
+ Connection: Nt,
16
+ ConnectionChecker: Ct,
17
+ ConnectionDB: St,
18
+ ConnectionType: Tt,
19
+ ContextMenu: Pt,
20
+ ContextMenuItems: wt,
21
+ ContextMenuRegistry: Dt,
22
+ Css: Vt,
23
+ Cursor: xt,
24
+ DELETE_VARIABLE_ID: Mt,
25
+ DeleteArea: At,
26
+ DragTarget: Rt,
27
+ DropDownDiv: It,
28
+ Events: Ae,
29
+ Extensions: jt,
30
+ Field: Lt,
31
+ FieldCheckbox: Bt,
32
+ FieldDropdown: Ft,
33
+ FieldImage: $t,
34
+ FieldLabel: zt,
35
+ FieldLabelSerializable: Ut,
36
+ FieldNumber: Wt,
37
+ FieldTextInput: qt,
38
+ FieldVariable: Gt,
39
+ Flyout: Ht,
40
+ FlyoutButton: Xt,
41
+ FlyoutMetricsManager: Yt,
42
+ Generator: Jt,
43
+ Gesture: Qt,
44
+ Grid: Zt,
45
+ HorizontalFlyout: Kt,
46
+ INPUT_VALUE: eo,
47
+ Input: to,
48
+ InsertionMarkerManager: oo,
49
+ InsertionMarkerPreviewer: ro,
50
+ Marker: no,
51
+ MarkerManager: ao,
52
+ Menu: so,
53
+ MenuItem: co,
54
+ MetricsManager: io,
55
+ Msg: lo,
56
+ NEXT_STATEMENT: uo,
57
+ Names: fo,
58
+ OPPOSITE_TYPE: mo,
59
+ OUTPUT_VALUE: yo,
60
+ Options: ho,
61
+ PREVIOUS_STATEMENT: po,
62
+ PROCEDURE_CATEGORY_NAME: bo,
63
+ Procedures: go,
64
+ RENAME_VARIABLE_ID: _o,
65
+ RenderedConnection: vo,
66
+ Scrollbar: Eo,
67
+ ScrollbarPair: ko,
68
+ ShortcutItems: Oo,
69
+ ShortcutRegistry: No,
70
+ TOOLBOX_AT_BOTTOM: Co,
71
+ TOOLBOX_AT_LEFT: So,
72
+ TOOLBOX_AT_RIGHT: To,
73
+ TOOLBOX_AT_TOP: Po,
74
+ TabNavigateCursor: wo,
75
+ Theme: le,
76
+ ThemeManager: Do,
77
+ Themes: B,
78
+ Toolbox: Vo,
79
+ ToolboxCategory: xo,
80
+ ToolboxItem: Mo,
81
+ ToolboxSeparator: Ao,
82
+ Tooltip: Ro,
83
+ Touch: Io,
84
+ Trashcan: jo,
85
+ UnattachedFieldError: Lo,
86
+ VARIABLE_CATEGORY_NAME: Bo,
87
+ VARIABLE_DYNAMIC_CATEGORY_NAME: Fo,
88
+ VERSION: $o,
89
+ VariableMap: zo,
90
+ VariableModel: Uo,
91
+ Variables: Wo,
92
+ VariablesDynamic: qo,
93
+ VerticalFlyout: Go,
94
+ WidgetDiv: Ho,
95
+ Workspace: Xo,
96
+ WorkspaceAudio: Yo,
97
+ WorkspaceDragger: Jo,
98
+ WorkspaceSvg: Qo,
99
+ Xml: Zo,
100
+ ZoomControls: Ko,
101
+ blockAnimations: er,
102
+ blockRendering: tr,
103
+ browserEvents: or,
104
+ bubbles: rr,
105
+ bumpObjects: nr,
106
+ clipboard: ar,
107
+ comments: sr,
108
+ common: cr,
109
+ config: ir,
110
+ constants: lr,
111
+ defineBlocksWithJsonArray: ur,
112
+ dialog: ue,
113
+ dragging: dr,
114
+ fieldRegistry: fr,
115
+ geras: mr,
116
+ getMainWorkspace: Re,
117
+ getSelected: yr,
118
+ hasBubble: hr,
119
+ hideChaff: pr,
120
+ icons: br,
121
+ inject: Ie,
122
+ inputs: gr,
123
+ isCopyable: _r,
124
+ isDeletable: vr,
125
+ isDraggable: Er,
126
+ isIcon: kr,
127
+ isObservable: Or,
128
+ isPaster: Nr,
129
+ isRenderedElement: Cr,
130
+ isSelectable: Sr,
131
+ isSerializable: Tr,
132
+ isVariableBackedParameterModel: Pr,
133
+ procedures: wr,
134
+ registry: Dr,
135
+ renderManagement: Vr,
136
+ serialization: xr,
137
+ setLocale: je,
138
+ setParentContainer: Mr,
139
+ svgResize: Le,
140
+ thrasos: Ar,
141
+ uiPosition: Rr,
142
+ utils: Ir,
143
+ zelos: jr
144
+ } = ke;
145
+ function Be(e, r) {
146
+ const o = se();
147
147
  if (!o)
148
148
  throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
149
149
  return o;
150
150
  }
151
- const Se = Symbol.for("vuetify:theme");
152
- function De() {
153
- Pe("useTheme");
154
- const e = re(Se, null);
151
+ const Fe = Symbol.for("vuetify:locale");
152
+ function $e() {
153
+ const e = G(Fe);
154
+ if (!e)
155
+ throw new Error("[Vuetify] Could not find injected locale instance");
156
+ return e;
157
+ }
158
+ const ze = Symbol.for("vuetify:theme");
159
+ function de() {
160
+ Be("useTheme");
161
+ const e = G(ze, null);
155
162
  if (!e)
156
163
  throw new Error("Could not find Vuetify theme injection");
157
164
  return e;
158
165
  }
159
- var Ve = !1;
160
- function I(e, r, o) {
166
+ var Ue = !1;
167
+ function j(e, r, o) {
161
168
  return Array.isArray(e) ? (e.length = Math.max(e.length, r), e.splice(r, 1, o), o) : (e[r] = o, o);
162
169
  }
163
- function F(e, r) {
170
+ function $(e, r) {
164
171
  if (Array.isArray(e)) {
165
172
  e.splice(r, 1);
166
173
  return;
167
174
  }
168
175
  delete e[r];
169
176
  }
170
- var i = {};
171
- let w;
172
- const j = (e) => w = e, we = i.NODE_ENV !== "production" ? Symbol("pinia") : (
177
+ var u = {};
178
+ let x;
179
+ const L = (e) => x = e, We = u.NODE_ENV !== "production" ? Symbol("pinia") : (
173
180
  /* istanbul ignore next */
174
181
  Symbol()
175
182
  );
176
- function C(e) {
183
+ function T(e) {
177
184
  return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
178
185
  }
179
- var x;
186
+ var A;
180
187
  (function(e) {
181
188
  e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
182
- })(x || (x = {}));
183
- const G = typeof window < "u", $ = (i.NODE_ENV !== "production" || !1) && i.NODE_ENV !== "test" && G;
184
- function ie(e, r) {
189
+ })(A || (A = {}));
190
+ const Y = typeof window < "u", z = (u.NODE_ENV !== "production" || !1) && u.NODE_ENV !== "test" && Y;
191
+ function fe(e, r) {
185
192
  for (const o in r) {
186
193
  const t = r[o];
187
194
  if (!(o in e))
188
195
  continue;
189
- const s = e[o];
190
- C(s) && C(t) && !A(t) && !z(t) ? e[o] = ie(s, t) : e[o] = t;
196
+ const n = e[o];
197
+ T(n) && T(t) && !R(t) && !H(t) ? e[o] = fe(n, t) : e[o] = t;
191
198
  }
192
199
  return e;
193
200
  }
194
- const le = () => {
201
+ const me = () => {
195
202
  };
196
- function Q(e, r, o, t = le) {
203
+ function te(e, r, o, t = me) {
197
204
  e.push(r);
198
- const s = () => {
199
- const l = e.indexOf(r);
200
- l > -1 && (e.splice(l, 1), t());
205
+ const n = () => {
206
+ const i = e.indexOf(r);
207
+ i > -1 && (e.splice(i, 1), t());
201
208
  };
202
- return !o && Oe() && Ce(s), s;
209
+ return !o && Te() && Pe(n), n;
203
210
  }
204
- function T(e, ...r) {
211
+ function P(e, ...r) {
205
212
  e.slice().forEach((o) => {
206
213
  o(...r);
207
214
  });
208
215
  }
209
- const xe = (e) => e();
210
- function U(e, r) {
216
+ const qe = (e) => e();
217
+ function W(e, r) {
211
218
  e instanceof Map && r instanceof Map && r.forEach((o, t) => e.set(t, o)), e instanceof Set && r instanceof Set && r.forEach(e.add, e);
212
219
  for (const o in r) {
213
220
  if (!r.hasOwnProperty(o))
214
221
  continue;
215
- const t = r[o], s = e[o];
216
- C(s) && C(t) && e.hasOwnProperty(o) && !A(t) && !z(t) ? e[o] = U(s, t) : e[o] = t;
222
+ const t = r[o], n = e[o];
223
+ T(n) && T(t) && e.hasOwnProperty(o) && !R(t) && !H(t) ? e[o] = W(n, t) : e[o] = t;
217
224
  }
218
225
  return e;
219
226
  }
220
- const Ae = i.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
227
+ const Ge = u.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
221
228
  /* istanbul ignore next */
222
229
  Symbol()
223
230
  );
224
- function Me(e) {
225
- return !C(e) || !e.hasOwnProperty(Ae);
231
+ function He(e) {
232
+ return !T(e) || !e.hasOwnProperty(Ge);
226
233
  }
227
- const { assign: v } = Object;
228
- function K(e) {
229
- return !!(A(e) && e.effect);
234
+ const { assign: k } = Object;
235
+ function oe(e) {
236
+ return !!(R(e) && e.effect);
230
237
  }
231
- function ee(e, r, o, t) {
232
- const { state: s, actions: l, getters: h } = r, u = o.state.value[e];
233
- let f;
234
- function m() {
235
- !u && (i.NODE_ENV === "production" || !t) && (o.state.value[e] = s ? s() : {});
236
- const p = i.NODE_ENV !== "production" && t ? (
238
+ function re(e, r, o, t) {
239
+ const { state: n, actions: i, getters: h } = r, l = o.state.value[e];
240
+ let m;
241
+ function y() {
242
+ !l && (u.NODE_ENV === "production" || !t) && (o.state.value[e] = n ? n() : {});
243
+ const b = u.NODE_ENV !== "production" && t ? (
237
244
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
238
- Z(O(s ? s() : {}).value)
239
- ) : Z(o.state.value[e]);
240
- return v(p, l, Object.keys(h || {}).reduce((y, b) => (i.NODE_ENV !== "production" && b in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`), y[b] = V(ae(() => {
241
- j(o);
242
- const _ = o._s.get(e);
243
- return h[b].call(_, _);
244
- })), y), {}));
245
+ ee(O(n ? n() : {}).value)
246
+ ) : ee(o.state.value[e]);
247
+ return k(b, i, Object.keys(h || {}).reduce((p, g) => (u.NODE_ENV !== "production" && g in b && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = V(X(() => {
248
+ L(o);
249
+ const d = o._s.get(e);
250
+ return h[g].call(d, d);
251
+ })), p), {}));
245
252
  }
246
- return f = W(e, m, r, o, t, !0), f;
253
+ return m = q(e, y, r, o, t, !0), m;
247
254
  }
248
- function W(e, r, o = {}, t, s, l) {
255
+ function q(e, r, o = {}, t, n, i) {
249
256
  let h;
250
- const u = v({ actions: {} }, o);
251
- if (i.NODE_ENV !== "production" && !t._e.active)
257
+ const l = k({ actions: {} }, o);
258
+ if (u.NODE_ENV !== "production" && !t._e.active)
252
259
  throw new Error("Pinia destroyed");
253
- const f = {
260
+ const m = {
254
261
  deep: !0
255
262
  // flush: 'post',
256
263
  };
257
- i.NODE_ENV !== "production" && !Ve && (f.onTrigger = (a) => {
258
- m ? _ = a : m == !1 && !c._hotUpdating && (Array.isArray(_) ? _.push(a) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
264
+ u.NODE_ENV !== "production" && !Ue && (m.onTrigger = (s) => {
265
+ y ? d = s : y == !1 && !c._hotUpdating && (Array.isArray(d) ? d.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
259
266
  });
260
- let m, p, y = [], b = [], _;
261
- const k = t.state.value[e];
262
- !l && !k && (i.NODE_ENV === "production" || !s) && (t.state.value[e] = {});
263
- const L = O({});
264
- let H;
265
- function q(a) {
266
- let n;
267
- m = p = !1, i.NODE_ENV !== "production" && (_ = []), typeof a == "function" ? (a(t.state.value[e]), n = {
268
- type: x.patchFunction,
267
+ let y, b, p = [], g = [], d;
268
+ const _ = t.state.value[e];
269
+ !i && !_ && (u.NODE_ENV === "production" || !n) && (t.state.value[e] = {});
270
+ const S = O({});
271
+ let J;
272
+ function Q(s) {
273
+ let a;
274
+ y = b = !1, u.NODE_ENV !== "production" && (d = []), typeof s == "function" ? (s(t.state.value[e]), a = {
275
+ type: A.patchFunction,
269
276
  storeId: e,
270
- events: _
271
- }) : (U(t.state.value[e], a), n = {
272
- type: x.patchObject,
273
- payload: a,
277
+ events: d
278
+ }) : (W(t.state.value[e], s), a = {
279
+ type: A.patchObject,
280
+ payload: s,
274
281
  storeId: e,
275
- events: _
282
+ events: d
276
283
  });
277
- const d = H = Symbol();
278
- J().then(() => {
279
- H === d && (m = !0);
280
- }), p = !0, T(y, n, t.state.value[e]);
284
+ const f = J = Symbol();
285
+ U().then(() => {
286
+ J === f && (y = !0);
287
+ }), b = !0, P(p, a, t.state.value[e]);
281
288
  }
282
- const ye = l ? function() {
283
- const { state: n } = o, d = n ? n() : {};
284
- this.$patch((g) => {
285
- v(g, d);
289
+ const ge = i ? function() {
290
+ const { state: a } = o, f = a ? a() : {};
291
+ this.$patch((v) => {
292
+ k(v, f);
286
293
  });
287
294
  } : (
288
295
  /* istanbul ignore next */
289
- i.NODE_ENV !== "production" ? () => {
296
+ u.NODE_ENV !== "production" ? () => {
290
297
  throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
291
- } : le
298
+ } : me
292
299
  );
293
- function he() {
294
- h.stop(), y = [], b = [], t._s.delete(e);
300
+ function _e() {
301
+ h.stop(), p = [], g = [], t._s.delete(e);
295
302
  }
296
- function X(a, n) {
303
+ function Z(s, a) {
297
304
  return function() {
298
- j(t);
299
- const d = Array.from(arguments), g = [], S = [];
300
- function pe(E) {
301
- g.push(E);
305
+ L(t);
306
+ const f = Array.from(arguments), v = [], w = [];
307
+ function ve(E) {
308
+ v.push(E);
302
309
  }
303
- function be(E) {
304
- S.push(E);
310
+ function Ee(E) {
311
+ w.push(E);
305
312
  }
306
- T(b, {
307
- args: d,
308
- name: a,
313
+ P(g, {
314
+ args: f,
315
+ name: s,
309
316
  store: c,
310
- after: pe,
311
- onError: be
317
+ after: ve,
318
+ onError: Ee
312
319
  });
313
320
  let D;
314
321
  try {
315
- D = n.apply(this && this.$id === e ? this : c, d);
322
+ D = a.apply(this && this.$id === e ? this : c, f);
316
323
  } catch (E) {
317
- throw T(S, E), E;
324
+ throw P(w, E), E;
318
325
  }
319
- return D instanceof Promise ? D.then((E) => (T(g, E), E)).catch((E) => (T(S, E), Promise.reject(E))) : (T(g, D), D);
326
+ return D instanceof Promise ? D.then((E) => (P(v, E), E)).catch((E) => (P(w, E), Promise.reject(E))) : (P(v, D), D);
320
327
  };
321
328
  }
322
- const M = /* @__PURE__ */ V({
329
+ const I = /* @__PURE__ */ V({
323
330
  actions: {},
324
331
  getters: {},
325
332
  state: [],
326
- hotState: L
327
- }), Y = {
333
+ hotState: S
334
+ }), K = {
328
335
  _p: t,
329
336
  // _s: scope,
330
337
  $id: e,
331
- $onAction: Q.bind(null, b),
332
- $patch: q,
333
- $reset: ye,
334
- $subscribe(a, n = {}) {
335
- const d = Q(y, a, n.detached, () => g()), g = h.run(() => ne(() => t.state.value[e], (S) => {
336
- (n.flush === "sync" ? p : m) && a({
338
+ $onAction: te.bind(null, g),
339
+ $patch: Q,
340
+ $reset: ge,
341
+ $subscribe(s, a = {}) {
342
+ const f = te(p, s, a.detached, () => v()), v = h.run(() => M(() => t.state.value[e], (w) => {
343
+ (a.flush === "sync" ? b : y) && s({
337
344
  storeId: e,
338
- type: x.direct,
339
- events: _
340
- }, S);
341
- }, v({}, f, n)));
342
- return d;
345
+ type: A.direct,
346
+ events: d
347
+ }, w);
348
+ }, k({}, m, a)));
349
+ return f;
343
350
  },
344
- $dispose: he
345
- }, c = Ee(i.NODE_ENV !== "production" || $ ? v(
351
+ $dispose: _e
352
+ }, c = Ne(u.NODE_ENV !== "production" || z ? k(
346
353
  {
347
- _hmrPayload: M,
354
+ _hmrPayload: I,
348
355
  _customProperties: V(/* @__PURE__ */ new Set())
349
356
  // devtools custom properties
350
357
  },
351
- Y
358
+ K
352
359
  // must be added later
353
360
  // setupStore
354
- ) : Y);
361
+ ) : K);
355
362
  t._s.set(e, c);
356
- const N = (t._a && t._a.runWithContext || xe)(() => t._e.run(() => (h = ve()).run(r)));
357
- for (const a in N) {
358
- const n = N[a];
359
- if (A(n) && !K(n) || z(n))
360
- i.NODE_ENV !== "production" && s ? I(L.value, a, B(N, a)) : l || (k && Me(n) && (A(n) ? n.value = k[a] : U(n, k[a])), t.state.value[e][a] = n), i.NODE_ENV !== "production" && M.state.push(a);
361
- else if (typeof n == "function") {
362
- const d = i.NODE_ENV !== "production" && s ? n : X(a, n);
363
- N[a] = d, i.NODE_ENV !== "production" && (M.actions[a] = n), u.actions[a] = n;
363
+ const N = (t._a && t._a.runWithContext || qe)(() => t._e.run(() => (h = Ce()).run(r)));
364
+ for (const s in N) {
365
+ const a = N[s];
366
+ if (R(a) && !oe(a) || H(a))
367
+ u.NODE_ENV !== "production" && n ? j(S.value, s, F(N, s)) : i || (_ && He(a) && (R(a) ? a.value = _[s] : W(a, _[s])), t.state.value[e][s] = a), u.NODE_ENV !== "production" && I.state.push(s);
368
+ else if (typeof a == "function") {
369
+ const f = u.NODE_ENV !== "production" && n ? a : Z(s, a);
370
+ N[s] = f, u.NODE_ENV !== "production" && (I.actions[s] = a), l.actions[s] = a;
364
371
  } else
365
- i.NODE_ENV !== "production" && K(n) && (M.getters[a] = l ? (
372
+ u.NODE_ENV !== "production" && oe(a) && (I.getters[s] = i ? (
366
373
  // @ts-expect-error
367
- o.getters[a]
368
- ) : n, G && (N._getters || // @ts-expect-error: same
369
- (N._getters = V([]))).push(a));
374
+ o.getters[s]
375
+ ) : a, Y && (N._getters || // @ts-expect-error: same
376
+ (N._getters = V([]))).push(s));
370
377
  }
371
- if (v(c, N), v(Ne(c), N), Object.defineProperty(c, "$state", {
372
- get: () => i.NODE_ENV !== "production" && s ? L.value : t.state.value[e],
373
- set: (a) => {
374
- if (i.NODE_ENV !== "production" && s)
378
+ if (k(c, N), k(Se(c), N), Object.defineProperty(c, "$state", {
379
+ get: () => u.NODE_ENV !== "production" && n ? S.value : t.state.value[e],
380
+ set: (s) => {
381
+ if (u.NODE_ENV !== "production" && n)
375
382
  throw new Error("cannot set hotState");
376
- q((n) => {
377
- v(n, a);
383
+ Q((a) => {
384
+ k(a, s);
378
385
  });
379
386
  }
380
- }), i.NODE_ENV !== "production" && (c._hotUpdate = V((a) => {
381
- c._hotUpdating = !0, a._hmrPayload.state.forEach((n) => {
382
- if (n in c.$state) {
383
- const d = a.$state[n], g = c.$state[n];
384
- typeof d == "object" && C(d) && C(g) ? ie(d, g) : a.$state[n] = g;
387
+ }), u.NODE_ENV !== "production" && (c._hotUpdate = V((s) => {
388
+ c._hotUpdating = !0, s._hmrPayload.state.forEach((a) => {
389
+ if (a in c.$state) {
390
+ const f = s.$state[a], v = c.$state[a];
391
+ typeof f == "object" && T(f) && T(v) ? fe(f, v) : s.$state[a] = v;
385
392
  }
386
- I(c, n, B(a.$state, n));
387
- }), Object.keys(c.$state).forEach((n) => {
388
- n in a.$state || F(c, n);
389
- }), m = !1, p = !1, t.state.value[e] = B(a._hmrPayload, "hotState"), p = !0, J().then(() => {
390
- m = !0;
393
+ j(c, a, F(s.$state, a));
394
+ }), Object.keys(c.$state).forEach((a) => {
395
+ a in s.$state || $(c, a);
396
+ }), y = !1, b = !1, t.state.value[e] = F(s._hmrPayload, "hotState"), b = !0, U().then(() => {
397
+ y = !0;
391
398
  });
392
- for (const n in a._hmrPayload.actions) {
393
- const d = a[n];
394
- I(c, n, X(n, d));
399
+ for (const a in s._hmrPayload.actions) {
400
+ const f = s[a];
401
+ j(c, a, Z(a, f));
395
402
  }
396
- for (const n in a._hmrPayload.getters) {
397
- const d = a._hmrPayload.getters[n], g = l ? (
403
+ for (const a in s._hmrPayload.getters) {
404
+ const f = s._hmrPayload.getters[a], v = i ? (
398
405
  // special handling of options api
399
- ae(() => (j(t), d.call(c, c)))
400
- ) : d;
401
- I(c, n, g);
406
+ X(() => (L(t), f.call(c, c)))
407
+ ) : f;
408
+ j(c, a, v);
402
409
  }
403
- Object.keys(c._hmrPayload.getters).forEach((n) => {
404
- n in a._hmrPayload.getters || F(c, n);
405
- }), Object.keys(c._hmrPayload.actions).forEach((n) => {
406
- n in a._hmrPayload.actions || F(c, n);
407
- }), c._hmrPayload = a._hmrPayload, c._getters = a._getters, c._hotUpdating = !1;
408
- })), $) {
409
- const a = {
410
+ Object.keys(c._hmrPayload.getters).forEach((a) => {
411
+ a in s._hmrPayload.getters || $(c, a);
412
+ }), Object.keys(c._hmrPayload.actions).forEach((a) => {
413
+ a in s._hmrPayload.actions || $(c, a);
414
+ }), c._hmrPayload = s._hmrPayload, c._getters = s._getters, c._hotUpdating = !1;
415
+ })), z) {
416
+ const s = {
410
417
  writable: !0,
411
418
  configurable: !0,
412
419
  // avoid warning on devtools trying to display this property
413
420
  enumerable: !1
414
421
  };
415
- ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((n) => {
416
- Object.defineProperty(c, n, v({ value: c[n] }, a));
422
+ ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((a) => {
423
+ Object.defineProperty(c, a, k({ value: c[a] }, s));
417
424
  });
418
425
  }
419
- return t._p.forEach((a) => {
420
- if ($) {
421
- const n = h.run(() => a({
426
+ return t._p.forEach((s) => {
427
+ if (z) {
428
+ const a = h.run(() => s({
422
429
  store: c,
423
430
  app: t._a,
424
431
  pinia: t,
425
- options: u
432
+ options: l
426
433
  }));
427
- Object.keys(n || {}).forEach((d) => c._customProperties.add(d)), v(c, n);
434
+ Object.keys(a || {}).forEach((f) => c._customProperties.add(f)), k(c, a);
428
435
  } else
429
- v(c, h.run(() => a({
436
+ k(c, h.run(() => s({
430
437
  store: c,
431
438
  app: t._a,
432
439
  pinia: t,
433
- options: u
440
+ options: l
434
441
  })));
435
- }), i.NODE_ENV !== "production" && c.$state && typeof c.$state == "object" && typeof c.$state.constructor == "function" && !c.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
442
+ }), u.NODE_ENV !== "production" && c.$state && typeof c.$state == "object" && typeof c.$state.constructor == "function" && !c.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
436
443
  state: () => new MyClass()
437
- Found in store "${c.$id}".`), k && l && o.hydrate && o.hydrate(c.$state, k), m = !0, p = !0, c;
444
+ Found in store "${c.$id}".`), _ && i && o.hydrate && o.hydrate(c.$state, _), y = !0, b = !0, c;
438
445
  }
439
- function ue(e, r, o) {
440
- let t, s;
441
- const l = typeof r == "function";
446
+ function ye(e, r, o) {
447
+ let t, n;
448
+ const i = typeof r == "function";
442
449
  if (typeof e == "string")
443
- t = e, s = l ? o : r;
444
- else if (s = e, t = e.id, i.NODE_ENV !== "production" && typeof t != "string")
450
+ t = e, n = i ? o : r;
451
+ else if (n = e, t = e.id, u.NODE_ENV !== "production" && typeof t != "string")
445
452
  throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
446
- function h(u, f) {
447
- const m = _e();
448
- if (u = // in test mode, ignore the argument provided as we can always retrieve a
453
+ function h(l, m) {
454
+ const y = Oe();
455
+ if (l = // in test mode, ignore the argument provided as we can always retrieve a
449
456
  // pinia instance with getActivePinia()
450
- (i.NODE_ENV === "test" && w && w._testing ? null : u) || (m ? re(we, null) : null), u && j(u), i.NODE_ENV !== "production" && !w)
457
+ (u.NODE_ENV === "test" && x && x._testing ? null : l) || (y ? G(We, null) : null), l && L(l), u.NODE_ENV !== "production" && !x)
451
458
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
452
459
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
453
460
  This will fail in production.`);
454
- u = w, u._s.has(t) || (l ? W(t, r, s, u) : ee(t, s, u), i.NODE_ENV !== "production" && (h._pinia = u));
455
- const p = u._s.get(t);
456
- if (i.NODE_ENV !== "production" && f) {
457
- const y = "__hot:" + t, b = l ? W(y, r, s, u, !0) : ee(y, v({}, s), u, !0);
458
- f._hotUpdate(b), delete u.state.value[y], u._s.delete(y);
461
+ l = x, l._s.has(t) || (i ? q(t, r, n, l) : re(t, n, l), u.NODE_ENV !== "production" && (h._pinia = l));
462
+ const b = l._s.get(t);
463
+ if (u.NODE_ENV !== "production" && m) {
464
+ const p = "__hot:" + t, g = i ? q(p, r, n, l, !0) : re(p, k({}, n), l, !0);
465
+ m._hotUpdate(g), delete l.state.value[p], l._s.delete(p);
459
466
  }
460
- if (i.NODE_ENV !== "production" && G) {
461
- const y = oe();
462
- if (y && y.proxy && // avoid adding stores that are just built for hot module replacement
463
- !f) {
464
- const b = y.proxy, _ = "_pStores" in b ? b._pStores : b._pStores = {};
465
- _[t] = p;
467
+ if (u.NODE_ENV !== "production" && Y) {
468
+ const p = se();
469
+ if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
470
+ !m) {
471
+ const g = p.proxy, d = "_pStores" in g ? g._pStores : g._pStores = {};
472
+ d[t] = b;
466
473
  }
467
474
  }
468
- return p;
475
+ return b;
469
476
  }
470
477
  return h.$id = t, h;
471
478
  }
@@ -479,35 +486,35 @@ This will fail in production.`);
479
486
  console.error("vite-plugin-css-injected-by-js", r);
480
487
  }
481
488
  })();
482
- ue("viewMgr", () => {
489
+ const Xe = ye("viewMgr", () => {
483
490
  const e = O([]);
484
491
  function r() {
485
492
  return e.value.length <= 0;
486
493
  }
487
494
  function o() {
488
- const f = e.value.length;
489
- if (f > 0)
490
- return e.value[f - 1];
495
+ const m = e.value.length;
496
+ if (m > 0)
497
+ return e.value[m - 1];
491
498
  }
492
- function t(f) {
493
- return e.value.find((m) => m === f) !== void 0;
499
+ function t(m) {
500
+ return e.value.find((y) => y === m) !== void 0;
494
501
  }
495
- function s(f) {
496
- l(f), e.value.push(f);
502
+ function n(m) {
503
+ i(m), e.value.push(m);
497
504
  }
498
- function l(f) {
499
- const m = e.value.findIndex((p) => p === f);
500
- m !== -1 && e.value.splice(m, 1);
505
+ function i(m) {
506
+ const y = e.value.findIndex((b) => b === m);
507
+ y !== -1 && e.value.splice(y, 1);
501
508
  }
502
509
  function h() {
503
510
  e.value.pop();
504
511
  }
505
- function u() {
512
+ function l() {
506
513
  e.value = [];
507
514
  }
508
- return { isEmpty: r, lastView: o, hasView: t, addView: s, delView: l, popView: h, clearViews: u };
515
+ return { isEmpty: r, lastView: o, hasView: t, addView: n, delView: i, popView: h, clearViews: l };
509
516
  });
510
- function Ie(e) {
517
+ function Ye(e) {
511
518
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(r, o) {
512
519
  var t = e.get(r);
513
520
  t ? t.push(o) : e.set(r, [o]);
@@ -516,30 +523,47 @@ function Ie(e) {
516
523
  t && (o ? t.splice(t.indexOf(o) >>> 0, 1) : e.set(r, []));
517
524
  }, emit: function(r, o) {
518
525
  var t = e.get(r);
519
- t && t.slice().map(function(s) {
520
- s(o);
521
- }), (t = e.get("*")) && t.slice().map(function(s) {
522
- s(r, o);
526
+ t && t.slice().map(function(n) {
527
+ n(o);
528
+ }), (t = e.get("*")) && t.slice().map(function(n) {
529
+ n(r, o);
523
530
  });
524
531
  } };
525
532
  }
526
- const P = Ie();
527
- async function de(e, r, o) {
533
+ const C = Ye();
534
+ async function he(e, r, o) {
528
535
  return new Promise((t) => {
529
- const s = async () => {
530
- e() ? t(!0) : setTimeout(s, 30);
536
+ const n = async () => {
537
+ e() ? t(!0) : setTimeout(n, 30);
531
538
  };
532
- s();
539
+ n();
533
540
  });
534
541
  }
535
- ue(
542
+ function Je(e, r) {
543
+ const o = Xe(), t = X({
544
+ get() {
545
+ return o.hasView(e);
546
+ },
547
+ set(i) {
548
+ i ? o.addView(e) : o.delView(e);
549
+ }
550
+ }), n = (i) => {
551
+ t.value = !0;
552
+ };
553
+ return ce(() => {
554
+ C.on(e, n);
555
+ }), ie(() => {
556
+ C.off(e, n);
557
+ }), { open: t };
558
+ }
559
+ ye(
536
560
  "global",
537
561
  () => {
538
562
  const e = O();
539
- ne(
563
+ M(
540
564
  e,
541
- (s) => {
542
- De().global.name.value = s ? "dark" : "light";
565
+ (n) => {
566
+ de().global.name.value = n ? "dark" : "light";
543
567
  },
544
568
  {
545
569
  immediate: !0
@@ -563,60 +587,60 @@ ue(
563
587
  }
564
588
  );
565
589
  require("js-cookie");
566
- let te = Date.now();
567
- function fe() {
590
+ let ne = Date.now();
591
+ function pe() {
568
592
  const e = Date.now();
569
- return e - te > 500 ? (te = e, !0) : !1;
593
+ return e - ne > 500 ? (ne = e, !0) : !1;
570
594
  }
571
- let je = 0;
572
- function me() {
573
- return ++je;
595
+ let Qe = 0;
596
+ function be() {
597
+ return ++Qe;
574
598
  }
575
- async function Re(e) {
576
- if (!fe())
599
+ async function Ze(e) {
600
+ if (!pe())
577
601
  return;
578
602
  let r = !1, o;
579
- const t = (l) => {
580
- o = l, r = !0;
581
- }, s = me();
582
- return P.on("confirmDlgResult" + s, t), P.emit("confirmDlg", { ...e, seq: s }), await de(() => r), P.off("confirmDlgResult" + s, t), o;
603
+ const t = (i) => {
604
+ o = i, r = !0;
605
+ }, n = be();
606
+ return C.on("confirmDlgResult" + n, t), C.emit("confirmDlg", { ...e, seq: n }), await he(() => r), C.off("confirmDlgResult" + n, t), o;
583
607
  }
584
- async function Le(e) {
585
- if (!fe())
608
+ async function Ke(e) {
609
+ if (!pe())
586
610
  return;
587
611
  let r = !1, o;
588
- const t = (l) => {
589
- o = l, r = !0;
590
- }, s = me();
591
- return P.on("promptDlgResult" + s, t), P.emit("promptDlg", { ...e, seq: s }), await de(() => r), P.off("promptDlgResult" + s, t), o;
612
+ const t = (i) => {
613
+ o = i, r = !0;
614
+ }, n = be();
615
+ return C.on("promptDlgResult" + n, t), C.emit("promptDlg", { ...e, seq: n }), await he(() => r), C.off("promptDlgResult" + n, t), o;
592
616
  }
593
617
  require("js-cookie");
594
618
  O("");
595
- ce.setConfirm(async (e, r) => {
596
- const o = await Re({
619
+ ue.setConfirm(async (e, r) => {
620
+ const o = await Ze({
597
621
  title: "",
598
622
  text: e
599
623
  });
600
624
  r(!!o);
601
625
  });
602
- ce.setPrompt(async (e, r, o) => {
603
- const t = await Le({
626
+ ue.setPrompt(async (e, r, o) => {
627
+ const t = await Ke({
604
628
  title: "",
605
629
  value: r
606
630
  });
607
631
  o(t);
608
632
  });
609
- const Be = (e, r) => {
633
+ const et = (e, r) => {
610
634
  const o = e[r];
611
- return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((t, s) => {
612
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s.bind(null, new Error("Unknown variable dynamic import: " + r)));
635
+ return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((t, n) => {
636
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(n.bind(null, new Error("Unknown variable dynamic import: " + r)));
613
637
  });
614
638
  };
615
- async function _r(e) {
616
- const r = await Be(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./en-DYxpcVy9.js"), "./msg/zhHans.ts": () => import("./zhHans-DjWw6Iqb.js") }), `./msg/${e}.ts`);
617
- Te(r);
639
+ async function ae(e) {
640
+ const r = await et(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./en-DYxpcVy9.js"), "./msg/zhHans.ts": () => import("./zhHans-DjWw6Iqb.js") }), `./msg/${e}.ts`);
641
+ je(r);
618
642
  }
619
- R.Classic.blockStyles = {
643
+ B.Classic.blockStyles = {
620
644
  color_blocks: {
621
645
  colourPrimary: "#a5745b",
622
646
  colourSecondary: "#ede3de",
@@ -690,7 +714,7 @@ R.Classic.blockStyles = {
690
714
  hat: ""
691
715
  }
692
716
  };
693
- R.Classic.categoryStyles = {
717
+ B.Classic.categoryStyles = {
694
718
  calc_category: {
695
719
  colour: "#757575"
696
720
  },
@@ -740,9 +764,9 @@ R.Classic.categoryStyles = {
740
764
  colour: "#a55b80"
741
765
  }
742
766
  };
743
- const Fe = se.defineTheme("light", {
767
+ const tt = le.defineTheme("light", {
744
768
  name: "light",
745
- base: R.Classic,
769
+ base: B.Classic,
746
770
  componentStyles: {
747
771
  workspaceBackgroundColour: "#ffffff",
748
772
  toolboxBackgroundColour: "#eeeeee",
@@ -756,9 +780,9 @@ const Fe = se.defineTheme("light", {
756
780
  scrollbarOpacity: 0.4,
757
781
  cursorColour: ""
758
782
  }
759
- }), $e = se.defineTheme("dark", {
783
+ }), ot = le.defineTheme("dark", {
760
784
  name: "dark",
761
- base: R.Classic,
785
+ base: B.Classic,
762
786
  componentStyles: {
763
787
  workspaceBackgroundColour: "#1e1e1e",
764
788
  toolboxBackgroundColour: "#272727",
@@ -773,158 +797,257 @@ const Fe = se.defineTheme("light", {
773
797
  cursorColour: ""
774
798
  }
775
799
  });
776
- function Er(e) {
777
- const r = ke();
800
+ function rt(e) {
801
+ const r = Re();
778
802
  switch (console.log(r), e) {
779
803
  case "light":
780
- r.setTheme(Fe);
804
+ r.setTheme(tt);
781
805
  break;
782
806
  case "dark":
783
- r.setTheme($e);
807
+ r.setTheme(ot);
784
808
  break;
785
809
  }
786
810
  }
811
+ function nt(e, r) {
812
+ var n, i;
813
+ const o = r.value, t = {
814
+ passive: !((n = r.modifiers) != null && n.active)
815
+ };
816
+ window.addEventListener("resize", o, t), e._onResize = Object(e._onResize), e._onResize[r.instance.$.uid] = {
817
+ handler: o,
818
+ options: t
819
+ }, (i = r.modifiers) != null && i.quiet || o();
820
+ }
821
+ function at(e, r) {
822
+ var n;
823
+ if (!((n = e._onResize) != null && n[r.instance.$.uid]))
824
+ return;
825
+ const {
826
+ handler: o,
827
+ options: t
828
+ } = e._onResize[r.instance.$.uid];
829
+ window.removeEventListener("resize", o, t), delete e._onResize[r.instance.$.uid];
830
+ }
831
+ const st = {
832
+ mounted: nt,
833
+ unmounted: at
834
+ }, ct = { class: "position-relative w-100 h-100" }, it = /* @__PURE__ */ we({
835
+ __name: "index",
836
+ emits: ["ready", "change"],
837
+ setup(e, { emit: r }) {
838
+ const o = $e(), t = de(), { open: n } = Je("blocklyEditorFlyout"), i = r, h = O(null);
839
+ let l;
840
+ const m = {
841
+ grid: {
842
+ length: 2,
843
+ snap: !0,
844
+ spacing: 20
845
+ },
846
+ media: "https://cdn.z9os.com/lib/blockly/v10.4.2/media/",
847
+ move: {
848
+ drag: !0,
849
+ scrollbars: !0,
850
+ wheel: !0
851
+ },
852
+ theme: t.current.value.dark ? "dark" : "light",
853
+ trashcan: !1,
854
+ zoom: {
855
+ maxScale: 1,
856
+ minScale: 0.1,
857
+ scaleSpeed: 1.25,
858
+ startScale: 1,
859
+ wheel: !0
860
+ }
861
+ };
862
+ ce(async () => {
863
+ h.value && (await ae(o.current.value), l = Ie(h.value, m), l.addChangeListener(Ae.disableOrphans), l.addChangeListener(b), await U(), i("ready", l));
864
+ });
865
+ function y() {
866
+ l && Le(l);
867
+ }
868
+ function b(d) {
869
+ i("change", d);
870
+ }
871
+ ie(() => {
872
+ n.value = !1;
873
+ });
874
+ const p = new MutationObserver((d) => {
875
+ d.forEach((_) => {
876
+ if (_.type === "attributes" && _.attributeName === "style") {
877
+ const S = l.getFlyout();
878
+ n.value = (S == null ? void 0 : S.isVisible()) ?? !1;
879
+ }
880
+ });
881
+ }), g = document.querySelector("#blocklyEditor .blocklyFlyout");
882
+ return p.observe(g, { attributes: !0 }), M(n, (d) => {
883
+ var _;
884
+ d || (_ = l.getToolbox()) == null || _.clearSelection();
885
+ }), M(
886
+ () => o.current.value,
887
+ (d) => {
888
+ ae(d);
889
+ }
890
+ ), M(
891
+ () => t.current.value.dark,
892
+ (d) => {
893
+ rt(d ? "dark" : "light");
894
+ }
895
+ ), (d, _) => (De(), Ve("div", ct, [
896
+ xe(Me("div", {
897
+ class: "w-100 h-100",
898
+ ref_key: "blocklyDiv",
899
+ ref: h,
900
+ id: "blocklyEditor"
901
+ }, null, 512), [
902
+ [st, y]
903
+ ])
904
+ ]));
905
+ }
906
+ }), lt = (e) => {
907
+ e.component("x-blockly", it);
908
+ }, Lr = { install: lt };
787
909
  export {
788
- Ge as ASTNode,
789
- He as BasicCursor,
790
- qe as Block,
791
- Xe as BlockSvg,
792
- Ye as Blocks,
793
- Je as COLLAPSED_FIELD_NAME,
794
- Ze as COLLAPSED_INPUT_NAME,
795
- Qe as COLLAPSE_CHARS,
796
- Ke as CodeGenerator,
797
- et as CollapsibleToolboxCategory,
798
- tt as ComponentManager,
799
- ot as Connection,
800
- rt as ConnectionChecker,
801
- nt as ConnectionDB,
802
- at as ConnectionType,
803
- st as ContextMenu,
804
- ct as ContextMenuItems,
805
- it as ContextMenuRegistry,
806
- lt as Css,
807
- ut as Cursor,
808
- dt as DELETE_VARIABLE_ID,
809
- ft as DeleteArea,
810
- mt as DragTarget,
811
- yt as DropDownDiv,
812
- ht as Events,
813
- pt as Extensions,
814
- bt as Field,
815
- gt as FieldCheckbox,
816
- _t as FieldDropdown,
817
- Et as FieldImage,
818
- vt as FieldLabel,
819
- Nt as FieldLabelSerializable,
820
- Ot as FieldNumber,
821
- Ct as FieldTextInput,
822
- kt as FieldVariable,
823
- Tt as Flyout,
824
- Pt as FlyoutButton,
825
- St as FlyoutMetricsManager,
826
- Dt as Generator,
827
- Vt as Gesture,
828
- wt as Grid,
829
- xt as HorizontalFlyout,
830
- At as INPUT_VALUE,
831
- Mt as Input,
832
- It as InsertionMarkerManager,
833
- jt as InsertionMarkerPreviewer,
834
- Rt as Marker,
835
- Lt as MarkerManager,
836
- Bt as Menu,
837
- Ft as MenuItem,
838
- $t as MetricsManager,
839
- Ut as Msg,
840
- Wt as NEXT_STATEMENT,
841
- zt as Names,
842
- Gt as OPPOSITE_TYPE,
843
- Ht as OUTPUT_VALUE,
844
- qt as Options,
845
- Xt as PREVIOUS_STATEMENT,
846
- Yt as PROCEDURE_CATEGORY_NAME,
847
- Jt as Procedures,
848
- Zt as RENAME_VARIABLE_ID,
849
- Qt as RenderedConnection,
850
- Kt as Scrollbar,
851
- eo as ScrollbarPair,
852
- to as ShortcutItems,
853
- oo as ShortcutRegistry,
854
- ro as TOOLBOX_AT_BOTTOM,
855
- no as TOOLBOX_AT_LEFT,
856
- ao as TOOLBOX_AT_RIGHT,
857
- so as TOOLBOX_AT_TOP,
858
- co as TabNavigateCursor,
859
- se as Theme,
860
- io as ThemeManager,
861
- R as Themes,
862
- lo as Toolbox,
863
- uo as ToolboxCategory,
864
- fo as ToolboxItem,
865
- mo as ToolboxSeparator,
866
- yo as Tooltip,
867
- ho as Touch,
868
- po as Trashcan,
869
- bo as UnattachedFieldError,
870
- go as VARIABLE_CATEGORY_NAME,
871
- _o as VARIABLE_DYNAMIC_CATEGORY_NAME,
872
- Eo as VERSION,
873
- vo as VariableMap,
874
- No as VariableModel,
875
- Oo as Variables,
876
- Co as VariablesDynamic,
877
- ko as VerticalFlyout,
878
- To as WidgetDiv,
879
- Po as Workspace,
880
- So as WorkspaceAudio,
881
- Do as WorkspaceDragger,
882
- Vo as WorkspaceSvg,
883
- wo as Xml,
884
- xo as ZoomControls,
885
- Ao as blockAnimations,
886
- Mo as blockRendering,
887
- Io as browserEvents,
888
- jo as bubbles,
889
- Ro as bumpObjects,
890
- Lo as clipboard,
891
- Bo as comments,
892
- Fo as common,
893
- $o as config,
894
- Uo as constants,
895
- Wo as defineBlocksWithJsonArray,
896
- ce as dialog,
897
- zo as dragging,
898
- Go as fieldRegistry,
899
- Ho as geras,
900
- ke as getMainWorkspace,
901
- qo as getSelected,
902
- Xo as hasBubble,
903
- Yo as hideChaff,
904
- Jo as icons,
905
- Zo as inject,
906
- Qo as inputs,
907
- Ko as isCopyable,
908
- er as isDeletable,
909
- tr as isDraggable,
910
- or as isIcon,
911
- rr as isObservable,
912
- nr as isPaster,
913
- ar as isRenderedElement,
914
- sr as isSelectable,
915
- cr as isSerializable,
916
- ir as isVariableBackedParameterModel,
917
- lr as procedures,
918
- ur as registry,
919
- dr as renderManagement,
920
- fr as serialization,
921
- Te as setLocale,
922
- _r as setLocaleAsync,
923
- mr as setParentContainer,
924
- Er as setTheme,
925
- yr as svgResize,
926
- hr as thrasos,
927
- pr as uiPosition,
928
- br as utils,
929
- gr as zelos
910
+ mt as ASTNode,
911
+ yt as BasicCursor,
912
+ ht as Block,
913
+ pt as BlockSvg,
914
+ bt as Blocks,
915
+ gt as COLLAPSED_FIELD_NAME,
916
+ _t as COLLAPSED_INPUT_NAME,
917
+ vt as COLLAPSE_CHARS,
918
+ Et as CodeGenerator,
919
+ kt as CollapsibleToolboxCategory,
920
+ Ot as ComponentManager,
921
+ Nt as Connection,
922
+ Ct as ConnectionChecker,
923
+ St as ConnectionDB,
924
+ Tt as ConnectionType,
925
+ Pt as ContextMenu,
926
+ wt as ContextMenuItems,
927
+ Dt as ContextMenuRegistry,
928
+ Vt as Css,
929
+ xt as Cursor,
930
+ Mt as DELETE_VARIABLE_ID,
931
+ At as DeleteArea,
932
+ Rt as DragTarget,
933
+ It as DropDownDiv,
934
+ Ae as Events,
935
+ jt as Extensions,
936
+ Lt as Field,
937
+ Bt as FieldCheckbox,
938
+ Ft as FieldDropdown,
939
+ $t as FieldImage,
940
+ zt as FieldLabel,
941
+ Ut as FieldLabelSerializable,
942
+ Wt as FieldNumber,
943
+ qt as FieldTextInput,
944
+ Gt as FieldVariable,
945
+ Ht as Flyout,
946
+ Xt as FlyoutButton,
947
+ Yt as FlyoutMetricsManager,
948
+ Jt as Generator,
949
+ Qt as Gesture,
950
+ Zt as Grid,
951
+ Kt as HorizontalFlyout,
952
+ eo as INPUT_VALUE,
953
+ to as Input,
954
+ oo as InsertionMarkerManager,
955
+ ro as InsertionMarkerPreviewer,
956
+ no as Marker,
957
+ ao as MarkerManager,
958
+ so as Menu,
959
+ co as MenuItem,
960
+ io as MetricsManager,
961
+ lo as Msg,
962
+ uo as NEXT_STATEMENT,
963
+ fo as Names,
964
+ mo as OPPOSITE_TYPE,
965
+ yo as OUTPUT_VALUE,
966
+ ho as Options,
967
+ po as PREVIOUS_STATEMENT,
968
+ bo as PROCEDURE_CATEGORY_NAME,
969
+ go as Procedures,
970
+ _o as RENAME_VARIABLE_ID,
971
+ vo as RenderedConnection,
972
+ Eo as Scrollbar,
973
+ ko as ScrollbarPair,
974
+ Oo as ShortcutItems,
975
+ No as ShortcutRegistry,
976
+ Co as TOOLBOX_AT_BOTTOM,
977
+ So as TOOLBOX_AT_LEFT,
978
+ To as TOOLBOX_AT_RIGHT,
979
+ Po as TOOLBOX_AT_TOP,
980
+ wo as TabNavigateCursor,
981
+ le as Theme,
982
+ Do as ThemeManager,
983
+ B as Themes,
984
+ Vo as Toolbox,
985
+ xo as ToolboxCategory,
986
+ Mo as ToolboxItem,
987
+ Ao as ToolboxSeparator,
988
+ Ro as Tooltip,
989
+ Io as Touch,
990
+ jo as Trashcan,
991
+ Lo as UnattachedFieldError,
992
+ Bo as VARIABLE_CATEGORY_NAME,
993
+ Fo as VARIABLE_DYNAMIC_CATEGORY_NAME,
994
+ $o as VERSION,
995
+ zo as VariableMap,
996
+ Uo as VariableModel,
997
+ Wo as Variables,
998
+ qo as VariablesDynamic,
999
+ Go as VerticalFlyout,
1000
+ Ho as WidgetDiv,
1001
+ Xo as Workspace,
1002
+ Yo as WorkspaceAudio,
1003
+ Jo as WorkspaceDragger,
1004
+ Qo as WorkspaceSvg,
1005
+ Zo as Xml,
1006
+ Ko as ZoomControls,
1007
+ er as blockAnimations,
1008
+ tr as blockRendering,
1009
+ or as browserEvents,
1010
+ rr as bubbles,
1011
+ nr as bumpObjects,
1012
+ ar as clipboard,
1013
+ sr as comments,
1014
+ cr as common,
1015
+ ir as config,
1016
+ lr as constants,
1017
+ Lr as default,
1018
+ ur as defineBlocksWithJsonArray,
1019
+ ue as dialog,
1020
+ dr as dragging,
1021
+ fr as fieldRegistry,
1022
+ mr as geras,
1023
+ Re as getMainWorkspace,
1024
+ yr as getSelected,
1025
+ hr as hasBubble,
1026
+ pr as hideChaff,
1027
+ br as icons,
1028
+ Ie as inject,
1029
+ gr as inputs,
1030
+ _r as isCopyable,
1031
+ vr as isDeletable,
1032
+ Er as isDraggable,
1033
+ kr as isIcon,
1034
+ Or as isObservable,
1035
+ Nr as isPaster,
1036
+ Cr as isRenderedElement,
1037
+ Sr as isSelectable,
1038
+ Tr as isSerializable,
1039
+ Pr as isVariableBackedParameterModel,
1040
+ wr as procedures,
1041
+ Dr as registry,
1042
+ Vr as renderManagement,
1043
+ xr as serialization,
1044
+ je as setLocale,
1045
+ ae as setLocaleAsync,
1046
+ Mr as setParentContainer,
1047
+ rt as setTheme,
1048
+ Le as svgResize,
1049
+ Ar as thrasos,
1050
+ Rr as uiPosition,
1051
+ Ir as utils,
1052
+ jr as zelos
930
1053
  };