@opentiny/tiny-engine-setting-events 2.7.0-alpha.0 → 2.7.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,72 +1,955 @@
1
1
  import "./style.css";
2
- import { ref as Ve, reactive as we, provide as tt, nextTick as rt, resolveComponent as M, createBlock as te, openBlock as B, withCtx as I, createElementVNode as v, createVNode as b, resolveDynamicComponent as Ge, createTextVNode as ke, unref as S, createElementBlock as J, Fragment as Oe, withDirectives as qe, renderList as ze, normalizeClass as Ne, toDisplayString as Y, createCommentVNode as Se, vShow as Ye, computed as Me, watchEffect as nt, watch as Ze, inject as ot } from "vue";
3
- import { callEntry as h, META_APP as C, getMetaApi as k, getOptions as X, useLayout as V, useHistory as K, useCanvas as y, getMergeMeta as P, useBlock as ue, useMaterial as fe, useModal as _e, useMessage as he, useProperties as z } from "@opentiny/tiny-engine-meta-register";
4
- import { TinyAlert as mt, DialogBox as it, Button as Te, Form as gt, FormItem as We, Input as Fe, Popover as pt, Tooltip as vt, Collapse as ut, CollapseItem as Qe, Checkbox as ft, Search as _t } from "@opentiny/vue";
5
- import be from "@opentiny/tiny-engine-common/js/i18n";
6
- import { SvgButton as Ee, BlockLinkEvent as ye, PluginPanel as ht, VueMonaco as Ae } from "@opentiny/tiny-engine-common";
7
- import { iconChevronDown as xe } from "@opentiny/vue-icon";
8
- import { string2Ast as R, ast2String as H } from "@opentiny/tiny-engine-common/js/ast";
9
- import { CodeConfigurator as ae, InputConfigurator as se, VariableConfigurator as le, SwitchConfigurator as de } from "@opentiny/tiny-engine-configurator";
10
- import { PROP_DATA_TYPE as G } from "@opentiny/tiny-engine-common/js/constants";
11
- import { constants as me, utils as ge } from "@opentiny/tiny-engine-utils";
12
- const U = {
2
+ import { ref as Ye, reactive as rt, provide as St, nextTick as Ot, resolveComponent as X, createBlock as Ce, openBlock as U, withCtx as J, createElementVNode as _, createVNode as N, resolveDynamicComponent as _t, createTextVNode as Fe, unref as Z, createElementBlock as re, Fragment as at, withDirectives as Et, renderList as pt, normalizeClass as He, toDisplayString as me, createCommentVNode as dt, vShow as yt, computed as it, watchEffect as Nt, watch as Ct, inject as At } from "vue";
3
+ import { callEntry as D, META_APP as O, getMetaApi as V, getOptions as ae, useLayout as z, useHistory as de, useCanvas as I, getMergeMeta as q, useBlock as Oe, useMaterial as Ve, useModal as Me, useMessage as Re, useProperties as oe } from "@opentiny/tiny-engine-meta-register";
4
+ import { TinyAlert as Vt, DialogBox as It, Button as ct, Form as Mt, FormItem as xt, Input as mt, Popover as Rt, Tooltip as Tt, Collapse as Ut, CollapseItem as wt, Checkbox as jt, Search as $t } from "@opentiny/vue";
5
+ import Te from "@opentiny/tiny-engine-common/js/i18n";
6
+ import { SvgButton as Ue, BlockLinkEvent as je, PluginPanel as zt, VueMonaco as Xe } from "@opentiny/tiny-engine-common";
7
+ import { iconChevronDown as $e } from "@opentiny/vue-icon";
8
+ import { string2Ast as ce } from "@opentiny/tiny-engine-common/js/ast";
9
+ import { CodeConfigurator as xe, InputConfigurator as we, VariableConfigurator as ke, SwitchConfigurator as De } from "@opentiny/tiny-engine-configurator";
10
+ import { PROP_DATA_TYPE as fe } from "@opentiny/tiny-engine-common/js/constants";
11
+ import { constants as Ae, utils as Ie } from "@opentiny/tiny-engine-utils";
12
+ const Q = {
13
13
  id: "engine.setting.event",
14
14
  title: "高级",
15
15
  type: "plugins",
16
16
  name: "event",
17
17
  icon: "target"
18
- }, Ie = (d, n) => {
19
- const o = d.__vccOpts || d;
20
- for (const [e, i] of n)
21
- o[e] = i;
22
- return o;
23
- }, j = Ve(!1), L = h(() => {
24
- j.value = !0;
18
+ };
19
+ var Jt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
20
+ function Ft(h) {
21
+ throw new Error('Could not dynamically require "' + h + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
22
+ }
23
+ var vt = { exports: {} };
24
+ (function(h, e) {
25
+ (function(n, t, o, i) {
26
+ t(Ft, e, h);
27
+ })(Jt, function(n, t, o) {
28
+ var i = Object.defineProperty, l = Object.getOwnPropertyDescriptor, d = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, c = (f, u) => {
29
+ for (var r in u)
30
+ i(f, r, { get: u[r], enumerable: !0 });
31
+ }, b = (f, u, r, p) => {
32
+ if (u && typeof u == "object" || typeof u == "function")
33
+ for (let C of d(u))
34
+ !a.call(f, C) && C !== r && i(f, C, { get: () => u[C], enumerable: !(p = l(u, C)) || p.enumerable });
35
+ return f;
36
+ }, s = (f) => b(i({}, "__esModule", { value: !0 }), f), m = {};
37
+ c(m, {
38
+ decode: () => W,
39
+ decodeGeneratedRanges: () => be,
40
+ decodeOriginalScopes: () => ne,
41
+ encode: () => ut,
42
+ encodeGeneratedRanges: () => pe,
43
+ encodeOriginalScopes: () => ve
44
+ }), o.exports = s(m);
45
+ var g = 44, v = 59, w = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", S = new Uint8Array(64), A = new Uint8Array(128);
46
+ for (let f = 0; f < w.length; f++) {
47
+ const u = w.charCodeAt(f);
48
+ S[f] = u, A[u] = f;
49
+ }
50
+ function y(f, u) {
51
+ let r = 0, p = 0, C = 0;
52
+ do {
53
+ const L = f.next();
54
+ C = A[L], r |= (C & 31) << p, p += 5;
55
+ } while (C & 32);
56
+ const P = r & 1;
57
+ return r >>>= 1, P && (r = -2147483648 | -r), u + r;
58
+ }
59
+ function E(f, u, r) {
60
+ let p = u - r;
61
+ p = p < 0 ? -p << 1 | 1 : p << 1;
62
+ do {
63
+ let C = p & 31;
64
+ p >>>= 5, p > 0 && (C |= 32), f.write(S[C]);
65
+ } while (p > 0);
66
+ return u;
67
+ }
68
+ function x(f, u) {
69
+ return f.pos >= u ? !1 : f.peek() !== g;
70
+ }
71
+ var k = 1024 * 16, B = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
72
+ decode(f) {
73
+ return Buffer.from(f.buffer, f.byteOffset, f.byteLength).toString();
74
+ }
75
+ } : {
76
+ decode(f) {
77
+ let u = "";
78
+ for (let r = 0; r < f.length; r++)
79
+ u += String.fromCharCode(f[r]);
80
+ return u;
81
+ }
82
+ }, $ = class {
83
+ constructor() {
84
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(k);
85
+ }
86
+ write(f) {
87
+ const { buffer: u } = this;
88
+ u[this.pos++] = f, this.pos === k && (this.out += B.decode(u), this.pos = 0);
89
+ }
90
+ flush() {
91
+ const { buffer: f, out: u, pos: r } = this;
92
+ return r > 0 ? u + B.decode(f.subarray(0, r)) : u;
93
+ }
94
+ }, he = class {
95
+ constructor(f) {
96
+ this.pos = 0, this.buffer = f;
97
+ }
98
+ next() {
99
+ return this.buffer.charCodeAt(this.pos++);
100
+ }
101
+ peek() {
102
+ return this.buffer.charCodeAt(this.pos);
103
+ }
104
+ indexOf(f) {
105
+ const { buffer: u, pos: r } = this, p = u.indexOf(f, r);
106
+ return p === -1 ? u.length : p;
107
+ }
108
+ }, le = [];
109
+ function ne(f) {
110
+ const { length: u } = f, r = new he(f), p = [], C = [];
111
+ let P = 0;
112
+ for (; r.pos < u; r.pos++) {
113
+ P = y(r, P);
114
+ const L = y(r, 0);
115
+ if (!x(r, u)) {
116
+ const H = C.pop();
117
+ H[2] = P, H[3] = L;
118
+ continue;
119
+ }
120
+ const M = y(r, 0), T = y(r, 0) & 1 ? [P, L, 0, 0, M, y(r, 0)] : [P, L, 0, 0, M];
121
+ let K = le;
122
+ if (x(r, u)) {
123
+ K = [];
124
+ do {
125
+ const H = y(r, 0);
126
+ K.push(H);
127
+ } while (x(r, u));
128
+ }
129
+ T.vars = K, p.push(T), C.push(T);
130
+ }
131
+ return p;
132
+ }
133
+ function ve(f) {
134
+ const u = new $();
135
+ for (let r = 0; r < f.length; )
136
+ r = ge(f, r, u, [0]);
137
+ return u.flush();
138
+ }
139
+ function ge(f, u, r, p) {
140
+ const C = f[u], { 0: P, 1: L, 2: M, 3: j, 4: F, vars: T } = C;
141
+ u > 0 && r.write(g), p[0] = E(r, P, p[0]), E(r, L, 0), E(r, F, 0);
142
+ const K = C.length === 6 ? 1 : 0;
143
+ E(r, K, 0), C.length === 6 && E(r, C[5], 0);
144
+ for (const H of T)
145
+ E(r, H, 0);
146
+ for (u++; u < f.length; ) {
147
+ const H = f[u], { 0: R, 1: Y } = H;
148
+ if (R > M || R === M && Y >= j)
149
+ break;
150
+ u = ge(f, u, r, p);
151
+ }
152
+ return r.write(g), p[0] = E(r, M, p[0]), E(r, j, 0), u;
153
+ }
154
+ function be(f) {
155
+ const { length: u } = f, r = new he(f), p = [], C = [];
156
+ let P = 0, L = 0, M = 0, j = 0, F = 0, T = 0, K = 0, H = 0;
157
+ do {
158
+ const R = r.indexOf(";");
159
+ let Y = 0;
160
+ for (; r.pos < R; r.pos++) {
161
+ if (Y = y(r, Y), !x(r, R)) {
162
+ const ue = C.pop();
163
+ ue[2] = P, ue[3] = Y;
164
+ continue;
165
+ }
166
+ const Ee = y(r, 0), lt = Ee & 1, Qe = Ee & 2, et = Ee & 4;
167
+ let bt = null, ft = le, Pe;
168
+ if (lt) {
169
+ const ue = y(r, L);
170
+ M = y(
171
+ r,
172
+ L === ue ? M : 0
173
+ ), L = ue, Pe = [P, Y, 0, 0, ue, M];
174
+ } else
175
+ Pe = [P, Y, 0, 0];
176
+ if (Pe.isScope = !!et, Qe) {
177
+ const ue = j, qe = F;
178
+ j = y(r, j);
179
+ const tt = ue === j;
180
+ F = y(r, tt ? F : 0), T = y(
181
+ r,
182
+ tt && qe === F ? T : 0
183
+ ), bt = [j, F, T];
184
+ }
185
+ if (Pe.callsite = bt, x(r, R)) {
186
+ ft = [];
187
+ do {
188
+ K = P, H = Y;
189
+ const ue = y(r, 0);
190
+ let qe;
191
+ if (ue < -1) {
192
+ qe = [[y(r, 0)]];
193
+ for (let tt = -1; tt > ue; tt--) {
194
+ const Bt = K;
195
+ K = y(r, K), H = y(r, K === Bt ? H : 0);
196
+ const Pt = y(r, 0);
197
+ qe.push([Pt, K, H]);
198
+ }
199
+ } else
200
+ qe = [[ue]];
201
+ ft.push(qe);
202
+ } while (x(r, R));
203
+ }
204
+ Pe.bindings = ft, p.push(Pe), C.push(Pe);
205
+ }
206
+ P++, r.pos = R + 1;
207
+ } while (r.pos < u);
208
+ return p;
209
+ }
210
+ function pe(f) {
211
+ if (f.length === 0) return "";
212
+ const u = new $();
213
+ for (let r = 0; r < f.length; )
214
+ r = Le(f, r, u, [0, 0, 0, 0, 0, 0, 0]);
215
+ return u.flush();
216
+ }
217
+ function Le(f, u, r, p) {
218
+ const C = f[u], {
219
+ 0: P,
220
+ 1: L,
221
+ 2: M,
222
+ 3: j,
223
+ isScope: F,
224
+ callsite: T,
225
+ bindings: K
226
+ } = C;
227
+ p[0] < P ? (_e(r, p[0], P), p[0] = P, p[1] = 0) : u > 0 && r.write(g), p[1] = E(r, C[1], p[1]);
228
+ const H = (C.length === 6 ? 1 : 0) | (T ? 2 : 0) | (F ? 4 : 0);
229
+ if (E(r, H, 0), C.length === 6) {
230
+ const { 4: R, 5: Y } = C;
231
+ R !== p[2] && (p[3] = 0), p[2] = E(r, R, p[2]), p[3] = E(r, Y, p[3]);
232
+ }
233
+ if (T) {
234
+ const { 0: R, 1: Y, 2: Ee } = C.callsite;
235
+ R !== p[4] ? (p[5] = 0, p[6] = 0) : Y !== p[5] && (p[6] = 0), p[4] = E(r, R, p[4]), p[5] = E(r, Y, p[5]), p[6] = E(r, Ee, p[6]);
236
+ }
237
+ if (K)
238
+ for (const R of K) {
239
+ R.length > 1 && E(r, -R.length, 0);
240
+ const Y = R[0][0];
241
+ E(r, Y, 0);
242
+ let Ee = P, lt = L;
243
+ for (let Qe = 1; Qe < R.length; Qe++) {
244
+ const et = R[Qe];
245
+ Ee = E(r, et[1], Ee), lt = E(r, et[2], lt), E(r, et[0], 0);
246
+ }
247
+ }
248
+ for (u++; u < f.length; ) {
249
+ const R = f[u], { 0: Y, 1: Ee } = R;
250
+ if (Y > M || Y === M && Ee >= j)
251
+ break;
252
+ u = Le(f, u, r, p);
253
+ }
254
+ return p[0] < M ? (_e(r, p[0], M), p[0] = M, p[1] = 0) : r.write(g), p[1] = E(r, j, p[1]), u;
255
+ }
256
+ function _e(f, u, r) {
257
+ do
258
+ f.write(v);
259
+ while (++u < r);
260
+ }
261
+ function W(f) {
262
+ const { length: u } = f, r = new he(f), p = [];
263
+ let C = 0, P = 0, L = 0, M = 0, j = 0;
264
+ do {
265
+ const F = r.indexOf(";"), T = [];
266
+ let K = !0, H = 0;
267
+ for (C = 0; r.pos < F; ) {
268
+ let R;
269
+ C = y(r, C), C < H && (K = !1), H = C, x(r, F) ? (P = y(r, P), L = y(r, L), M = y(r, M), x(r, F) ? (j = y(r, j), R = [C, P, L, M, j]) : R = [C, P, L, M]) : R = [C], T.push(R), r.pos++;
270
+ }
271
+ K || Be(T), p.push(T), r.pos = F + 1;
272
+ } while (r.pos <= u);
273
+ return p;
274
+ }
275
+ function Be(f) {
276
+ f.sort(Ze);
277
+ }
278
+ function Ze(f, u) {
279
+ return f[0] - u[0];
280
+ }
281
+ function ut(f) {
282
+ const u = new $();
283
+ let r = 0, p = 0, C = 0, P = 0;
284
+ for (let L = 0; L < f.length; L++) {
285
+ const M = f[L];
286
+ if (L > 0 && u.write(v), M.length === 0) continue;
287
+ let j = 0;
288
+ for (let F = 0; F < M.length; F++) {
289
+ const T = M[F];
290
+ F > 0 && u.write(g), j = E(u, T[0], j), T.length !== 1 && (r = E(u, T[1], r), p = E(u, T[2], p), C = E(u, T[3], C), T.length !== 4 && (P = E(u, T[4], P)));
291
+ }
292
+ }
293
+ return u.flush();
294
+ }
295
+ });
296
+ })(vt, vt.exports);
297
+ var qt = vt.exports;
298
+ class ht {
299
+ constructor(e) {
300
+ this.bits = e instanceof ht ? e.bits.slice() : [];
301
+ }
302
+ add(e) {
303
+ this.bits[e >> 5] |= 1 << (e & 31);
304
+ }
305
+ has(e) {
306
+ return !!(this.bits[e >> 5] & 1 << (e & 31));
307
+ }
308
+ }
309
+ class st {
310
+ constructor(e, n, t) {
311
+ this.start = e, this.end = n, this.original = t, this.intro = "", this.outro = "", this.content = t, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
312
+ }
313
+ appendLeft(e) {
314
+ this.outro += e;
315
+ }
316
+ appendRight(e) {
317
+ this.intro = this.intro + e;
318
+ }
319
+ clone() {
320
+ const e = new st(this.start, this.end, this.original);
321
+ return e.intro = this.intro, e.outro = this.outro, e.content = this.content, e.storeName = this.storeName, e.edited = this.edited, e;
322
+ }
323
+ contains(e) {
324
+ return this.start < e && e < this.end;
325
+ }
326
+ eachNext(e) {
327
+ let n = this;
328
+ for (; n; )
329
+ e(n), n = n.next;
330
+ }
331
+ eachPrevious(e) {
332
+ let n = this;
333
+ for (; n; )
334
+ e(n), n = n.previous;
335
+ }
336
+ edit(e, n, t) {
337
+ return this.content = e, t || (this.intro = "", this.outro = ""), this.storeName = n, this.edited = !0, this;
338
+ }
339
+ prependLeft(e) {
340
+ this.outro = e + this.outro;
341
+ }
342
+ prependRight(e) {
343
+ this.intro = e + this.intro;
344
+ }
345
+ reset() {
346
+ this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
347
+ }
348
+ split(e) {
349
+ const n = e - this.start, t = this.original.slice(0, n), o = this.original.slice(n);
350
+ this.original = t;
351
+ const i = new st(e, this.end, o);
352
+ return i.outro = this.outro, this.outro = "", this.end = e, this.edited ? (i.edit("", !1), this.content = "") : this.content = t, i.next = this.next, i.next && (i.next.previous = i), i.previous = this, this.next = i, i;
353
+ }
354
+ toString() {
355
+ return this.intro + this.content + this.outro;
356
+ }
357
+ trimEnd(e) {
358
+ if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
359
+ const n = this.content.replace(e, "");
360
+ if (n.length)
361
+ return n !== this.content && (this.split(this.start + n.length).edit("", void 0, !0), this.edited && this.edit(n, this.storeName, !0)), !0;
362
+ if (this.edit("", void 0, !0), this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
363
+ }
364
+ trimStart(e) {
365
+ if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
366
+ const n = this.content.replace(e, "");
367
+ if (n.length) {
368
+ if (n !== this.content) {
369
+ const t = this.split(this.end - n.length);
370
+ this.edited && t.edit(n, this.storeName, !0), this.edit("", void 0, !0);
371
+ }
372
+ return !0;
373
+ } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
374
+ }
375
+ }
376
+ function Xt() {
377
+ return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (h) => globalThis.btoa(unescape(encodeURIComponent(h))) : typeof Buffer == "function" ? (h) => Buffer.from(h, "utf-8").toString("base64") : () => {
378
+ throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
379
+ };
380
+ }
381
+ const Gt = /* @__PURE__ */ Xt();
382
+ class Kt {
383
+ constructor(e) {
384
+ this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = qt.encode(e.mappings), typeof e.x_google_ignoreList < "u" && (this.x_google_ignoreList = e.x_google_ignoreList), typeof e.debugId < "u" && (this.debugId = e.debugId);
385
+ }
386
+ toString() {
387
+ return JSON.stringify(this);
388
+ }
389
+ toUrl() {
390
+ return "data:application/json;charset=utf-8;base64," + Gt(this.toString());
391
+ }
392
+ }
393
+ function Ht(h) {
394
+ const e = h.split(`
395
+ `), n = e.filter((i) => /^\t+/.test(i)), t = e.filter((i) => /^ {2,}/.test(i));
396
+ if (n.length === 0 && t.length === 0)
397
+ return null;
398
+ if (n.length >= t.length)
399
+ return " ";
400
+ const o = t.reduce((i, l) => {
401
+ const d = /^ +/.exec(l)[0].length;
402
+ return Math.min(d, i);
403
+ }, 1 / 0);
404
+ return new Array(o + 1).join(" ");
405
+ }
406
+ function Yt(h, e) {
407
+ const n = h.split(/[/\\]/), t = e.split(/[/\\]/);
408
+ for (n.pop(); n[0] === t[0]; )
409
+ n.shift(), t.shift();
410
+ if (n.length) {
411
+ let o = n.length;
412
+ for (; o--; ) n[o] = "..";
413
+ }
414
+ return n.concat(t).join("/");
415
+ }
416
+ const Wt = Object.prototype.toString;
417
+ function Zt(h) {
418
+ return Wt.call(h) === "[object Object]";
419
+ }
420
+ function kt(h) {
421
+ const e = h.split(`
422
+ `), n = [];
423
+ for (let t = 0, o = 0; t < e.length; t++)
424
+ n.push(o), o += e[t].length + 1;
425
+ return function(o) {
426
+ let i = 0, l = n.length;
427
+ for (; i < l; ) {
428
+ const c = i + l >> 1;
429
+ o < n[c] ? l = c : i = c + 1;
430
+ }
431
+ const d = i - 1, a = o - n[d];
432
+ return { line: d, column: a };
433
+ };
434
+ }
435
+ const Qt = /\w/;
436
+ class en {
437
+ constructor(e) {
438
+ this.hires = e, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
439
+ }
440
+ addEdit(e, n, t, o) {
441
+ if (n.length) {
442
+ const i = n.length - 1;
443
+ let l = n.indexOf(`
444
+ `, 0), d = -1;
445
+ for (; l >= 0 && i > l; ) {
446
+ const c = [this.generatedCodeColumn, e, t.line, t.column];
447
+ o >= 0 && c.push(o), this.rawSegments.push(c), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, d = l, l = n.indexOf(`
448
+ `, l + 1);
449
+ }
450
+ const a = [this.generatedCodeColumn, e, t.line, t.column];
451
+ o >= 0 && a.push(o), this.rawSegments.push(a), this.advance(n.slice(d + 1));
452
+ } else this.pending && (this.rawSegments.push(this.pending), this.advance(n));
453
+ this.pending = null;
454
+ }
455
+ addUneditedChunk(e, n, t, o, i) {
456
+ let l = n.start, d = !0, a = !1;
457
+ for (; l < n.end; ) {
458
+ if (t[l] === `
459
+ `)
460
+ o.line += 1, o.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, d = !0, a = !1;
461
+ else {
462
+ if (this.hires || d || i.has(l)) {
463
+ const c = [this.generatedCodeColumn, e, o.line, o.column];
464
+ this.hires === "boundary" ? Qt.test(t[l]) ? a || (this.rawSegments.push(c), a = !0) : (this.rawSegments.push(c), a = !1) : this.rawSegments.push(c);
465
+ }
466
+ o.column += 1, this.generatedCodeColumn += 1, d = !1;
467
+ }
468
+ l += 1;
469
+ }
470
+ this.pending = null;
471
+ }
472
+ advance(e) {
473
+ if (!e) return;
474
+ const n = e.split(`
475
+ `);
476
+ if (n.length > 1) {
477
+ for (let t = 0; t < n.length - 1; t++)
478
+ this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
479
+ this.generatedCodeColumn = 0;
480
+ }
481
+ this.generatedCodeColumn += n[n.length - 1].length;
482
+ }
483
+ }
484
+ const nt = `
485
+ `, Ge = {
486
+ insertLeft: !1,
487
+ insertRight: !1,
488
+ storeName: !1
489
+ };
490
+ class ee {
491
+ constructor(e, n = {}) {
492
+ const t = new st(0, e.length, e);
493
+ Object.defineProperties(this, {
494
+ original: { writable: !0, value: e },
495
+ outro: { writable: !0, value: "" },
496
+ intro: { writable: !0, value: "" },
497
+ firstChunk: { writable: !0, value: t },
498
+ lastChunk: { writable: !0, value: t },
499
+ lastSearchedChunk: { writable: !0, value: t },
500
+ byStart: { writable: !0, value: {} },
501
+ byEnd: { writable: !0, value: {} },
502
+ filename: { writable: !0, value: n.filename },
503
+ indentExclusionRanges: { writable: !0, value: n.indentExclusionRanges },
504
+ sourcemapLocations: { writable: !0, value: new ht() },
505
+ storedNames: { writable: !0, value: {} },
506
+ indentStr: { writable: !0, value: void 0 },
507
+ ignoreList: { writable: !0, value: n.ignoreList },
508
+ offset: { writable: !0, value: n.offset || 0 }
509
+ }), this.byStart[0] = t, this.byEnd[e.length] = t;
510
+ }
511
+ addSourcemapLocation(e) {
512
+ this.sourcemapLocations.add(e);
513
+ }
514
+ append(e) {
515
+ if (typeof e != "string") throw new TypeError("outro content must be a string");
516
+ return this.outro += e, this;
517
+ }
518
+ appendLeft(e, n) {
519
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
520
+ this._split(e);
521
+ const t = this.byEnd[e];
522
+ return t ? t.appendLeft(n) : this.intro += n, this;
523
+ }
524
+ appendRight(e, n) {
525
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
526
+ this._split(e);
527
+ const t = this.byStart[e];
528
+ return t ? t.appendRight(n) : this.outro += n, this;
529
+ }
530
+ clone() {
531
+ const e = new ee(this.original, { filename: this.filename, offset: this.offset });
532
+ let n = this.firstChunk, t = e.firstChunk = e.lastSearchedChunk = n.clone();
533
+ for (; n; ) {
534
+ e.byStart[t.start] = t, e.byEnd[t.end] = t;
535
+ const o = n.next, i = o && o.clone();
536
+ i && (t.next = i, i.previous = t, t = i), n = o;
537
+ }
538
+ return e.lastChunk = t, this.indentExclusionRanges && (e.indentExclusionRanges = this.indentExclusionRanges.slice()), e.sourcemapLocations = new ht(this.sourcemapLocations), e.intro = this.intro, e.outro = this.outro, e;
539
+ }
540
+ generateDecodedMap(e) {
541
+ e = e || {};
542
+ const n = 0, t = Object.keys(this.storedNames), o = new en(e.hires), i = kt(this.original);
543
+ return this.intro && o.advance(this.intro), this.firstChunk.eachNext((l) => {
544
+ const d = i(l.start);
545
+ l.intro.length && o.advance(l.intro), l.edited ? o.addEdit(
546
+ n,
547
+ l.content,
548
+ d,
549
+ l.storeName ? t.indexOf(l.original) : -1
550
+ ) : o.addUneditedChunk(n, l, this.original, d, this.sourcemapLocations), l.outro.length && o.advance(l.outro);
551
+ }), {
552
+ file: e.file ? e.file.split(/[/\\]/).pop() : void 0,
553
+ sources: [
554
+ e.source ? Yt(e.file || "", e.source) : e.file || ""
555
+ ],
556
+ sourcesContent: e.includeContent ? [this.original] : void 0,
557
+ names: t,
558
+ mappings: o.raw,
559
+ x_google_ignoreList: this.ignoreList ? [n] : void 0
560
+ };
561
+ }
562
+ generateMap(e) {
563
+ return new Kt(this.generateDecodedMap(e));
564
+ }
565
+ _ensureindentStr() {
566
+ this.indentStr === void 0 && (this.indentStr = Ht(this.original));
567
+ }
568
+ _getRawIndentString() {
569
+ return this._ensureindentStr(), this.indentStr;
570
+ }
571
+ getIndentString() {
572
+ return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
573
+ }
574
+ indent(e, n) {
575
+ const t = /^[^\r\n]/gm;
576
+ if (Zt(e) && (n = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
577
+ n = n || {};
578
+ const o = {};
579
+ n.exclude && (typeof n.exclude[0] == "number" ? [n.exclude] : n.exclude).forEach((b) => {
580
+ for (let s = b[0]; s < b[1]; s += 1)
581
+ o[s] = !0;
582
+ });
583
+ let i = n.indentStart !== !1;
584
+ const l = (c) => i ? `${e}${c}` : (i = !0, c);
585
+ this.intro = this.intro.replace(t, l);
586
+ let d = 0, a = this.firstChunk;
587
+ for (; a; ) {
588
+ const c = a.end;
589
+ if (a.edited)
590
+ o[d] || (a.content = a.content.replace(t, l), a.content.length && (i = a.content[a.content.length - 1] === `
591
+ `));
592
+ else
593
+ for (d = a.start; d < c; ) {
594
+ if (!o[d]) {
595
+ const b = this.original[d];
596
+ b === `
597
+ ` ? i = !0 : b !== "\r" && i && (i = !1, d === a.start || (this._splitChunk(a, d), a = a.next), a.prependRight(e));
598
+ }
599
+ d += 1;
600
+ }
601
+ d = a.end, a = a.next;
602
+ }
603
+ return this.outro = this.outro.replace(t, l), this;
604
+ }
605
+ insert() {
606
+ throw new Error(
607
+ "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
608
+ );
609
+ }
610
+ insertLeft(e, n) {
611
+ return Ge.insertLeft || (console.warn(
612
+ "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
613
+ ), Ge.insertLeft = !0), this.appendLeft(e, n);
614
+ }
615
+ insertRight(e, n) {
616
+ return Ge.insertRight || (console.warn(
617
+ "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
618
+ ), Ge.insertRight = !0), this.prependRight(e, n);
619
+ }
620
+ move(e, n, t) {
621
+ if (e = e + this.offset, n = n + this.offset, t = t + this.offset, t >= e && t <= n) throw new Error("Cannot move a selection inside itself");
622
+ this._split(e), this._split(n), this._split(t);
623
+ const o = this.byStart[e], i = this.byEnd[n], l = o.previous, d = i.next, a = this.byStart[t];
624
+ if (!a && i === this.lastChunk) return this;
625
+ const c = a ? a.previous : this.lastChunk;
626
+ return l && (l.next = d), d && (d.previous = l), c && (c.next = o), a && (a.previous = i), o.previous || (this.firstChunk = i.next), i.next || (this.lastChunk = o.previous, this.lastChunk.next = null), o.previous = c, i.next = a || null, c || (this.firstChunk = o), a || (this.lastChunk = i), this;
627
+ }
628
+ overwrite(e, n, t, o) {
629
+ return o = o || {}, this.update(e, n, t, { ...o, overwrite: !o.contentOnly });
630
+ }
631
+ update(e, n, t, o) {
632
+ if (e = e + this.offset, n = n + this.offset, typeof t != "string") throw new TypeError("replacement content must be a string");
633
+ if (this.original.length !== 0) {
634
+ for (; e < 0; ) e += this.original.length;
635
+ for (; n < 0; ) n += this.original.length;
636
+ }
637
+ if (n > this.original.length) throw new Error("end is out of bounds");
638
+ if (e === n)
639
+ throw new Error(
640
+ "Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
641
+ );
642
+ this._split(e), this._split(n), o === !0 && (Ge.storeName || (console.warn(
643
+ "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
644
+ ), Ge.storeName = !0), o = { storeName: !0 });
645
+ const i = o !== void 0 ? o.storeName : !1, l = o !== void 0 ? o.overwrite : !1;
646
+ if (i) {
647
+ const c = this.original.slice(e, n);
648
+ Object.defineProperty(this.storedNames, c, {
649
+ writable: !0,
650
+ value: !0,
651
+ enumerable: !0
652
+ });
653
+ }
654
+ const d = this.byStart[e], a = this.byEnd[n];
655
+ if (d) {
656
+ let c = d;
657
+ for (; c !== a; ) {
658
+ if (c.next !== this.byStart[c.end])
659
+ throw new Error("Cannot overwrite across a split point");
660
+ c = c.next, c.edit("", !1);
661
+ }
662
+ d.edit(t, i, !l);
663
+ } else {
664
+ const c = new st(e, n, "").edit(t, i);
665
+ a.next = c, c.previous = a;
666
+ }
667
+ return this;
668
+ }
669
+ prepend(e) {
670
+ if (typeof e != "string") throw new TypeError("outro content must be a string");
671
+ return this.intro = e + this.intro, this;
672
+ }
673
+ prependLeft(e, n) {
674
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
675
+ this._split(e);
676
+ const t = this.byEnd[e];
677
+ return t ? t.prependLeft(n) : this.intro = n + this.intro, this;
678
+ }
679
+ prependRight(e, n) {
680
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
681
+ this._split(e);
682
+ const t = this.byStart[e];
683
+ return t ? t.prependRight(n) : this.outro = n + this.outro, this;
684
+ }
685
+ remove(e, n) {
686
+ if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
687
+ for (; e < 0; ) e += this.original.length;
688
+ for (; n < 0; ) n += this.original.length;
689
+ }
690
+ if (e === n) return this;
691
+ if (e < 0 || n > this.original.length) throw new Error("Character is out of bounds");
692
+ if (e > n) throw new Error("end must be greater than start");
693
+ this._split(e), this._split(n);
694
+ let t = this.byStart[e];
695
+ for (; t; )
696
+ t.intro = "", t.outro = "", t.edit(""), t = n > t.end ? this.byStart[t.end] : null;
697
+ return this;
698
+ }
699
+ reset(e, n) {
700
+ if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
701
+ for (; e < 0; ) e += this.original.length;
702
+ for (; n < 0; ) n += this.original.length;
703
+ }
704
+ if (e === n) return this;
705
+ if (e < 0 || n > this.original.length) throw new Error("Character is out of bounds");
706
+ if (e > n) throw new Error("end must be greater than start");
707
+ this._split(e), this._split(n);
708
+ let t = this.byStart[e];
709
+ for (; t; )
710
+ t.reset(), t = n > t.end ? this.byStart[t.end] : null;
711
+ return this;
712
+ }
713
+ lastChar() {
714
+ if (this.outro.length) return this.outro[this.outro.length - 1];
715
+ let e = this.lastChunk;
716
+ do {
717
+ if (e.outro.length) return e.outro[e.outro.length - 1];
718
+ if (e.content.length) return e.content[e.content.length - 1];
719
+ if (e.intro.length) return e.intro[e.intro.length - 1];
720
+ } while (e = e.previous);
721
+ return this.intro.length ? this.intro[this.intro.length - 1] : "";
722
+ }
723
+ lastLine() {
724
+ let e = this.outro.lastIndexOf(nt);
725
+ if (e !== -1) return this.outro.substr(e + 1);
726
+ let n = this.outro, t = this.lastChunk;
727
+ do {
728
+ if (t.outro.length > 0) {
729
+ if (e = t.outro.lastIndexOf(nt), e !== -1) return t.outro.substr(e + 1) + n;
730
+ n = t.outro + n;
731
+ }
732
+ if (t.content.length > 0) {
733
+ if (e = t.content.lastIndexOf(nt), e !== -1) return t.content.substr(e + 1) + n;
734
+ n = t.content + n;
735
+ }
736
+ if (t.intro.length > 0) {
737
+ if (e = t.intro.lastIndexOf(nt), e !== -1) return t.intro.substr(e + 1) + n;
738
+ n = t.intro + n;
739
+ }
740
+ } while (t = t.previous);
741
+ return e = this.intro.lastIndexOf(nt), e !== -1 ? this.intro.substr(e + 1) + n : this.intro + n;
742
+ }
743
+ slice(e = 0, n = this.original.length - this.offset) {
744
+ if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
745
+ for (; e < 0; ) e += this.original.length;
746
+ for (; n < 0; ) n += this.original.length;
747
+ }
748
+ let t = "", o = this.firstChunk;
749
+ for (; o && (o.start > e || o.end <= e); ) {
750
+ if (o.start < n && o.end >= n)
751
+ return t;
752
+ o = o.next;
753
+ }
754
+ if (o && o.edited && o.start !== e)
755
+ throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);
756
+ const i = o;
757
+ for (; o; ) {
758
+ o.intro && (i !== o || o.start === e) && (t += o.intro);
759
+ const l = o.start < n && o.end >= n;
760
+ if (l && o.edited && o.end !== n)
761
+ throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);
762
+ const d = i === o ? e - o.start : 0, a = l ? o.content.length + n - o.end : o.content.length;
763
+ if (t += o.content.slice(d, a), o.outro && (!l || o.end === n) && (t += o.outro), l)
764
+ break;
765
+ o = o.next;
766
+ }
767
+ return t;
768
+ }
769
+ // TODO deprecate this? not really very useful
770
+ snip(e, n) {
771
+ const t = this.clone();
772
+ return t.remove(0, e), t.remove(n, t.original.length), t;
773
+ }
774
+ _split(e) {
775
+ if (this.byStart[e] || this.byEnd[e]) return;
776
+ let n = this.lastSearchedChunk;
777
+ const t = e > n.end;
778
+ for (; n; ) {
779
+ if (n.contains(e)) return this._splitChunk(n, e);
780
+ n = t ? this.byStart[n.end] : this.byEnd[n.start];
781
+ }
782
+ }
783
+ _splitChunk(e, n) {
784
+ if (e.edited && e.content.length) {
785
+ const o = kt(this.original)(n);
786
+ throw new Error(
787
+ `Cannot split a chunk that has already been edited (${o.line}:${o.column} – "${e.original}")`
788
+ );
789
+ }
790
+ const t = e.split(n);
791
+ return this.byEnd[n] = e, this.byStart[n] = t, this.byEnd[t.end] = t, e === this.lastChunk && (this.lastChunk = t), this.lastSearchedChunk = e, !0;
792
+ }
793
+ toString() {
794
+ let e = this.intro, n = this.firstChunk;
795
+ for (; n; )
796
+ e += n.toString(), n = n.next;
797
+ return e + this.outro;
798
+ }
799
+ isEmpty() {
800
+ let e = this.firstChunk;
801
+ do
802
+ if (e.intro.length && e.intro.trim() || e.content.length && e.content.trim() || e.outro.length && e.outro.trim())
803
+ return !1;
804
+ while (e = e.next);
805
+ return !0;
806
+ }
807
+ length() {
808
+ let e = this.firstChunk, n = 0;
809
+ do
810
+ n += e.intro.length + e.content.length + e.outro.length;
811
+ while (e = e.next);
812
+ return n;
813
+ }
814
+ trimLines() {
815
+ return this.trim("[\\r\\n]");
816
+ }
817
+ trim(e) {
818
+ return this.trimStart(e).trimEnd(e);
819
+ }
820
+ trimEndAborted(e) {
821
+ const n = new RegExp((e || "\\s") + "+$");
822
+ if (this.outro = this.outro.replace(n, ""), this.outro.length) return !0;
823
+ let t = this.lastChunk;
824
+ do {
825
+ const o = t.end, i = t.trimEnd(n);
826
+ if (t.end !== o && (this.lastChunk === t && (this.lastChunk = t.next), this.byEnd[t.end] = t, this.byStart[t.next.start] = t.next, this.byEnd[t.next.end] = t.next), i) return !0;
827
+ t = t.previous;
828
+ } while (t);
829
+ return !1;
830
+ }
831
+ trimEnd(e) {
832
+ return this.trimEndAborted(e), this;
833
+ }
834
+ trimStartAborted(e) {
835
+ const n = new RegExp("^" + (e || "\\s") + "+");
836
+ if (this.intro = this.intro.replace(n, ""), this.intro.length) return !0;
837
+ let t = this.firstChunk;
838
+ do {
839
+ const o = t.end, i = t.trimStart(n);
840
+ if (t.end !== o && (t === this.lastChunk && (this.lastChunk = t.next), this.byEnd[t.end] = t, this.byStart[t.next.start] = t.next, this.byEnd[t.next.end] = t.next), i) return !0;
841
+ t = t.next;
842
+ } while (t);
843
+ return !1;
844
+ }
845
+ trimStart(e) {
846
+ return this.trimStartAborted(e), this;
847
+ }
848
+ hasChanged() {
849
+ return this.original !== this.toString();
850
+ }
851
+ _replaceRegexp(e, n) {
852
+ function t(i, l) {
853
+ return typeof n == "string" ? n.replace(/\$(\$|&|\d+)/g, (d, a) => a === "$" ? "$" : a === "&" ? i[0] : +a < i.length ? i[+a] : `$${a}`) : n(...i, i.index, l, i.groups);
854
+ }
855
+ function o(i, l) {
856
+ let d;
857
+ const a = [];
858
+ for (; d = i.exec(l); )
859
+ a.push(d);
860
+ return a;
861
+ }
862
+ if (e.global)
863
+ o(e, this.original).forEach((l) => {
864
+ if (l.index != null) {
865
+ const d = t(l, this.original);
866
+ d !== l[0] && this.overwrite(l.index, l.index + l[0].length, d);
867
+ }
868
+ });
869
+ else {
870
+ const i = this.original.match(e);
871
+ if (i && i.index != null) {
872
+ const l = t(i, this.original);
873
+ l !== i[0] && this.overwrite(i.index, i.index + i[0].length, l);
874
+ }
875
+ }
876
+ return this;
877
+ }
878
+ _replaceString(e, n) {
879
+ const { original: t } = this, o = t.indexOf(e);
880
+ return o !== -1 && this.overwrite(o, o + e.length, n), this;
881
+ }
882
+ replace(e, n) {
883
+ return typeof e == "string" ? this._replaceString(e, n) : this._replaceRegexp(e, n);
884
+ }
885
+ _replaceAllString(e, n) {
886
+ const { original: t } = this, o = e.length;
887
+ for (let i = t.indexOf(e); i !== -1; i = t.indexOf(e, i + o))
888
+ t.slice(i, i + o) !== n && this.overwrite(i, i + o, n);
889
+ return this;
890
+ }
891
+ replaceAll(e, n) {
892
+ if (typeof e == "string")
893
+ return this._replaceAllString(e, n);
894
+ if (!e.global)
895
+ throw new TypeError(
896
+ "MagicString.prototype.replaceAll called with a non-global RegExp argument"
897
+ );
898
+ return this._replaceRegexp(e, n);
899
+ }
900
+ }
901
+ const We = (h, e) => {
902
+ const n = h.__vccOpts || h;
903
+ for (const [t, o] of e)
904
+ n[t] = o;
905
+ return n;
906
+ }, te = Ye(!1), G = D(() => {
907
+ te.value = !0;
25
908
  }, {
26
909
  metaData: {
27
910
  id: "engine.setting.event.BindEventsDialog.open"
28
911
  },
29
912
  ctx: () => ({
30
- ast2String: H,
31
- string2Ast: R,
32
- getMergeMeta: P,
33
- useCanvas: y,
34
- useHistory: K,
35
- useLayout: V,
36
- getOptions: X,
37
- getMetaApi: k,
38
- META_APP: C,
39
- meta: U,
40
- dialogVisible: j,
41
- open: L,
42
- close: $
913
+ string2Ast: ce,
914
+ getMergeMeta: q,
915
+ useCanvas: I,
916
+ useHistory: de,
917
+ useLayout: z,
918
+ getOptions: ae,
919
+ getMetaApi: V,
920
+ META_APP: O,
921
+ MagicString: ee,
922
+ meta: Q,
923
+ dialogVisible: te,
924
+ open: G,
925
+ close: se
43
926
  })
44
- }), $ = h(() => {
45
- j.value = !1;
927
+ }), se = D(() => {
928
+ te.value = !1;
46
929
  }, {
47
930
  metaData: {
48
931
  id: "engine.setting.event.BindEventsDialog.close"
49
932
  },
50
933
  ctx: () => ({
51
- ast2String: H,
52
- string2Ast: R,
53
- getMergeMeta: P,
54
- useCanvas: y,
55
- useHistory: K,
56
- useLayout: V,
57
- getOptions: X,
58
- getMetaApi: k,
59
- META_APP: C,
60
- meta: U,
61
- dialogVisible: j,
62
- open: L,
63
- close: $
934
+ string2Ast: ce,
935
+ getMergeMeta: q,
936
+ useCanvas: I,
937
+ useHistory: de,
938
+ useLayout: z,
939
+ getOptions: ae,
940
+ getMetaApi: V,
941
+ META_APP: O,
942
+ MagicString: ee,
943
+ meta: Q,
944
+ dialogVisible: te,
945
+ open: G,
946
+ close: se
64
947
  })
65
- }), bt = {
948
+ }), tn = {
66
949
  components: {
67
- TinyButton: Te,
68
- TinyDialogBox: it,
69
- TinyAlert: mt
950
+ TinyButton: ct,
951
+ TinyDialogBox: It,
952
+ TinyAlert: Vt
70
953
  },
71
954
  inheritAttrs: !1,
72
955
  props: {
@@ -75,20 +958,20 @@ const U = {
75
958
  default: () => ({})
76
959
  }
77
960
  },
78
- setup(d) {
961
+ setup(h) {
79
962
  const {
80
- BindEventsDialogSidebar: n,
81
- BindEventsDialogContent: o
82
- } = P(U.id).components, {
83
- PLUGIN_NAME: e,
84
- activePlugin: i
85
- } = V(), {
86
- pageState: g
87
- } = y(), {
88
- getMethods: p,
89
- saveMethod: a,
90
- highlightMethod: l
91
- } = k(C.Page), s = we({
963
+ BindEventsDialogSidebar: e,
964
+ BindEventsDialogContent: n
965
+ } = q(Q.id).components, {
966
+ PLUGIN_NAME: t,
967
+ activePlugin: o
968
+ } = z(), {
969
+ pageState: i
970
+ } = I(), {
971
+ getMethods: l,
972
+ saveMethod: d,
973
+ highlightMethod: a
974
+ } = V(O.Page), c = rt({
92
975
  editorContent: "",
93
976
  bindMethodInfo: {},
94
977
  tip: "",
@@ -96,297 +979,297 @@ const U = {
96
979
  enableExtraParams: !1,
97
980
  isValidParams: !0
98
981
  });
99
- tt("context", s);
100
- const u = h((E) => {
101
- s.bindMethodInfo = E;
982
+ St("context", c);
983
+ const b = D((x) => {
984
+ c.bindMethodInfo = x;
102
985
  }, {
103
986
  metaData: {
104
987
  id: "engine.setting.event.BindEventsDialog.selectMethod"
105
988
  },
106
989
  ctx: () => ({
107
- props: d,
108
- BindEventsDialogSidebar: n,
109
- BindEventsDialogContent: o,
110
- PLUGIN_NAME: e,
111
- activePlugin: i,
112
- pageState: g,
113
- getMethods: p,
114
- saveMethod: a,
115
- highlightMethod: l,
116
- state: s,
117
- selectMethod: u,
118
- bindMethod: t,
119
- resetTipError: r,
120
- getExtraParams: c,
121
- getFormatParams: m,
122
- getFunctionBody: f,
123
- activePagePlugin: x,
124
- confirm: D,
125
- openedDialog: N,
126
- closeDialog: w,
127
- ast2String: H,
128
- string2Ast: R,
129
- getMergeMeta: P,
130
- useCanvas: y,
131
- useHistory: K,
132
- useLayout: V,
133
- getOptions: X,
134
- getMetaApi: k,
135
- META_APP: C,
136
- meta: U,
137
- dialogVisible: j,
138
- open: L,
139
- close: $
990
+ props: h,
991
+ BindEventsDialogSidebar: e,
992
+ BindEventsDialogContent: n,
993
+ PLUGIN_NAME: t,
994
+ activePlugin: o,
995
+ pageState: i,
996
+ getMethods: l,
997
+ saveMethod: d,
998
+ highlightMethod: a,
999
+ state: c,
1000
+ selectMethod: b,
1001
+ bindMethod: s,
1002
+ resetTipError: m,
1003
+ getExtraParams: g,
1004
+ getFormatParams: v,
1005
+ rewriteMethodParams: w,
1006
+ activePagePlugin: S,
1007
+ confirm: A,
1008
+ openedDialog: y,
1009
+ closeDialog: E,
1010
+ string2Ast: ce,
1011
+ getMergeMeta: q,
1012
+ useCanvas: I,
1013
+ useHistory: de,
1014
+ useLayout: z,
1015
+ getOptions: ae,
1016
+ getMetaApi: V,
1017
+ META_APP: O,
1018
+ MagicString: ee,
1019
+ meta: Q,
1020
+ dialogVisible: te,
1021
+ open: G,
1022
+ close: se
140
1023
  })
141
- }), t = h((E) => {
142
- var Z, q;
143
- if (!E)
1024
+ }), s = D((x) => {
1025
+ var le, ne;
1026
+ if (!x)
144
1027
  return;
145
- const _ = (Z = d.eventBinding) == null ? void 0 : Z.eventName;
146
- if (!_)
1028
+ const k = (le = h.eventBinding) == null ? void 0 : le.eventName;
1029
+ if (!k)
147
1030
  return;
148
- const A = (q = g == null ? void 0 : g.currentSchema) == null ? void 0 : q.props;
149
- if (!A)
1031
+ const B = (ne = i == null ? void 0 : i.currentSchema) == null ? void 0 : ne.props;
1032
+ if (!B)
150
1033
  return;
151
1034
  const {
152
- name: O,
153
- extra: W
154
- } = E;
155
- d[_] || (A[_] = {
1035
+ name: $,
1036
+ extra: he
1037
+ } = x;
1038
+ h[k] || (B[k] = {
156
1039
  type: "JSExpression",
157
1040
  value: ""
158
- }), W && s.enableExtraParams && (A[_].params = W), A[_].value = `this.${O}`, K().addHistory();
1041
+ }), he && c.enableExtraParams && (B[k].params = he), B[k].value = `this.${$}`, de().addHistory();
159
1042
  }, {
160
1043
  metaData: {
161
1044
  id: "engine.setting.event.BindEventsDialog.bindMethod"
162
1045
  },
163
1046
  ctx: () => ({
164
- props: d,
165
- BindEventsDialogSidebar: n,
166
- BindEventsDialogContent: o,
167
- PLUGIN_NAME: e,
168
- activePlugin: i,
169
- pageState: g,
170
- getMethods: p,
171
- saveMethod: a,
172
- highlightMethod: l,
173
- state: s,
174
- selectMethod: u,
175
- bindMethod: t,
176
- resetTipError: r,
177
- getExtraParams: c,
178
- getFormatParams: m,
179
- getFunctionBody: f,
180
- activePagePlugin: x,
181
- confirm: D,
182
- openedDialog: N,
183
- closeDialog: w,
184
- ast2String: H,
185
- string2Ast: R,
186
- getMergeMeta: P,
187
- useCanvas: y,
188
- useHistory: K,
189
- useLayout: V,
190
- getOptions: X,
191
- getMetaApi: k,
192
- META_APP: C,
193
- meta: U,
194
- dialogVisible: j,
195
- open: L,
196
- close: $
1047
+ props: h,
1048
+ BindEventsDialogSidebar: e,
1049
+ BindEventsDialogContent: n,
1050
+ PLUGIN_NAME: t,
1051
+ activePlugin: o,
1052
+ pageState: i,
1053
+ getMethods: l,
1054
+ saveMethod: d,
1055
+ highlightMethod: a,
1056
+ state: c,
1057
+ selectMethod: b,
1058
+ bindMethod: s,
1059
+ resetTipError: m,
1060
+ getExtraParams: g,
1061
+ getFormatParams: v,
1062
+ rewriteMethodParams: w,
1063
+ activePagePlugin: S,
1064
+ confirm: A,
1065
+ openedDialog: y,
1066
+ closeDialog: E,
1067
+ string2Ast: ce,
1068
+ getMergeMeta: q,
1069
+ useCanvas: I,
1070
+ useHistory: de,
1071
+ useLayout: z,
1072
+ getOptions: ae,
1073
+ getMetaApi: V,
1074
+ META_APP: O,
1075
+ MagicString: ee,
1076
+ meta: Q,
1077
+ dialogVisible: te,
1078
+ open: G,
1079
+ close: se
197
1080
  })
198
- }), r = h(() => {
199
- s.tipError = !1, s.tip = "", s.isValidParams = !0;
1081
+ }), m = D(() => {
1082
+ c.tipError = !1, c.tip = "", c.isValidParams = !0;
200
1083
  }, {
201
1084
  metaData: {
202
1085
  id: "engine.setting.event.BindEventsDialog.resetTipError"
203
1086
  },
204
1087
  ctx: () => ({
205
- props: d,
206
- BindEventsDialogSidebar: n,
207
- BindEventsDialogContent: o,
208
- PLUGIN_NAME: e,
209
- activePlugin: i,
210
- pageState: g,
211
- getMethods: p,
212
- saveMethod: a,
213
- highlightMethod: l,
214
- state: s,
215
- selectMethod: u,
216
- bindMethod: t,
217
- resetTipError: r,
218
- getExtraParams: c,
219
- getFormatParams: m,
220
- getFunctionBody: f,
221
- activePagePlugin: x,
222
- confirm: D,
223
- openedDialog: N,
224
- closeDialog: w,
225
- ast2String: H,
226
- string2Ast: R,
227
- getMergeMeta: P,
228
- useCanvas: y,
229
- useHistory: K,
230
- useLayout: V,
231
- getOptions: X,
232
- getMetaApi: k,
233
- META_APP: C,
234
- meta: U,
235
- dialogVisible: j,
236
- open: L,
237
- close: $
1088
+ props: h,
1089
+ BindEventsDialogSidebar: e,
1090
+ BindEventsDialogContent: n,
1091
+ PLUGIN_NAME: t,
1092
+ activePlugin: o,
1093
+ pageState: i,
1094
+ getMethods: l,
1095
+ saveMethod: d,
1096
+ highlightMethod: a,
1097
+ state: c,
1098
+ selectMethod: b,
1099
+ bindMethod: s,
1100
+ resetTipError: m,
1101
+ getExtraParams: g,
1102
+ getFormatParams: v,
1103
+ rewriteMethodParams: w,
1104
+ activePagePlugin: S,
1105
+ confirm: A,
1106
+ openedDialog: y,
1107
+ closeDialog: E,
1108
+ string2Ast: ce,
1109
+ getMergeMeta: q,
1110
+ useCanvas: I,
1111
+ useHistory: de,
1112
+ useLayout: z,
1113
+ getOptions: ae,
1114
+ getMetaApi: V,
1115
+ META_APP: O,
1116
+ MagicString: ee,
1117
+ meta: Q,
1118
+ dialogVisible: te,
1119
+ open: G,
1120
+ close: se
238
1121
  })
239
- }), c = h(() => {
240
- let E = "";
241
- if (s.enableExtraParams)
1122
+ }), g = D(() => {
1123
+ let x = "";
1124
+ if (c.enableExtraParams)
242
1125
  try {
243
- E = JSON.parse(s.editorContent), s.isValidParams = Array.isArray(E);
1126
+ x = JSON.parse(c.editorContent), c.isValidParams = Array.isArray(x);
244
1127
  } catch {
245
- s.isValidParams = !1;
1128
+ c.isValidParams = !1;
246
1129
  }
247
- return E;
1130
+ return x;
248
1131
  }, {
249
1132
  metaData: {
250
1133
  id: "engine.setting.event.BindEventsDialog.getExtraParams"
251
1134
  },
252
1135
  ctx: () => ({
253
- props: d,
254
- BindEventsDialogSidebar: n,
255
- BindEventsDialogContent: o,
256
- PLUGIN_NAME: e,
257
- activePlugin: i,
258
- pageState: g,
259
- getMethods: p,
260
- saveMethod: a,
261
- highlightMethod: l,
262
- state: s,
263
- selectMethod: u,
264
- bindMethod: t,
265
- resetTipError: r,
266
- getExtraParams: c,
267
- getFormatParams: m,
268
- getFunctionBody: f,
269
- activePagePlugin: x,
270
- confirm: D,
271
- openedDialog: N,
272
- closeDialog: w,
273
- ast2String: H,
274
- string2Ast: R,
275
- getMergeMeta: P,
276
- useCanvas: y,
277
- useHistory: K,
278
- useLayout: V,
279
- getOptions: X,
280
- getMetaApi: k,
281
- META_APP: C,
282
- meta: U,
283
- dialogVisible: j,
284
- open: L,
285
- close: $
1136
+ props: h,
1137
+ BindEventsDialogSidebar: e,
1138
+ BindEventsDialogContent: n,
1139
+ PLUGIN_NAME: t,
1140
+ activePlugin: o,
1141
+ pageState: i,
1142
+ getMethods: l,
1143
+ saveMethod: d,
1144
+ highlightMethod: a,
1145
+ state: c,
1146
+ selectMethod: b,
1147
+ bindMethod: s,
1148
+ resetTipError: m,
1149
+ getExtraParams: g,
1150
+ getFormatParams: v,
1151
+ rewriteMethodParams: w,
1152
+ activePagePlugin: S,
1153
+ confirm: A,
1154
+ openedDialog: y,
1155
+ closeDialog: E,
1156
+ string2Ast: ce,
1157
+ getMergeMeta: q,
1158
+ useCanvas: I,
1159
+ useHistory: de,
1160
+ useLayout: z,
1161
+ getOptions: ae,
1162
+ getMetaApi: V,
1163
+ META_APP: O,
1164
+ MagicString: ee,
1165
+ meta: Q,
1166
+ dialogVisible: te,
1167
+ open: G,
1168
+ close: se
286
1169
  })
287
- }), m = h((E) => Array.from({
288
- length: E.length
289
- }, (_, A) => `args${A}`).join(","), {
1170
+ }), v = D((x) => Array.from({
1171
+ length: x.length
1172
+ }, (k, B) => `args${B}`).join(","), {
290
1173
  metaData: {
291
1174
  id: "engine.setting.event.BindEventsDialog.getFormatParams"
292
1175
  },
293
1176
  ctx: () => ({
294
- props: d,
295
- BindEventsDialogSidebar: n,
296
- BindEventsDialogContent: o,
297
- PLUGIN_NAME: e,
298
- activePlugin: i,
299
- pageState: g,
300
- getMethods: p,
301
- saveMethod: a,
302
- highlightMethod: l,
303
- state: s,
304
- selectMethod: u,
305
- bindMethod: t,
306
- resetTipError: r,
307
- getExtraParams: c,
308
- getFormatParams: m,
309
- getFunctionBody: f,
310
- activePagePlugin: x,
311
- confirm: D,
312
- openedDialog: N,
313
- closeDialog: w,
314
- ast2String: H,
315
- string2Ast: R,
316
- getMergeMeta: P,
317
- useCanvas: y,
318
- useHistory: K,
319
- useLayout: V,
320
- getOptions: X,
321
- getMetaApi: k,
322
- META_APP: C,
323
- meta: U,
324
- dialogVisible: j,
325
- open: L,
326
- close: $
1177
+ props: h,
1178
+ BindEventsDialogSidebar: e,
1179
+ BindEventsDialogContent: n,
1180
+ PLUGIN_NAME: t,
1181
+ activePlugin: o,
1182
+ pageState: i,
1183
+ getMethods: l,
1184
+ saveMethod: d,
1185
+ highlightMethod: a,
1186
+ state: c,
1187
+ selectMethod: b,
1188
+ bindMethod: s,
1189
+ resetTipError: m,
1190
+ getExtraParams: g,
1191
+ getFormatParams: v,
1192
+ rewriteMethodParams: w,
1193
+ activePagePlugin: S,
1194
+ confirm: A,
1195
+ openedDialog: y,
1196
+ closeDialog: E,
1197
+ string2Ast: ce,
1198
+ getMergeMeta: q,
1199
+ useCanvas: I,
1200
+ useHistory: de,
1201
+ useLayout: z,
1202
+ getOptions: ae,
1203
+ getMetaApi: V,
1204
+ META_APP: O,
1205
+ MagicString: ee,
1206
+ meta: Q,
1207
+ dialogVisible: te,
1208
+ open: G,
1209
+ close: se
327
1210
  })
328
- }), f = h(() => {
329
- var W, Z, q, ne, oe, ie, Q, Le;
330
- let E = (Z = (W = p()) == null ? void 0 : W[s.bindMethodInfo.name]) == null ? void 0 : Z.value, _ = "{}", A = !1, O = !1;
331
- if (E) {
332
- let T = {};
333
- try {
334
- T = R(E);
335
- } catch {
336
- E = E.replace("function", `function ${s.bindMethodInfo.name}`), T = R(E);
337
- }
338
- (ne = (q = T == null ? void 0 : T.program) == null ? void 0 : q.body[0]) != null && ne.body && (_ = H(T.program.body[0].body)), (ie = (oe = T == null ? void 0 : T.program) == null ? void 0 : oe.body[0]) != null && ie.async && (A = !0), (Le = (Q = T == null ? void 0 : T.program) == null ? void 0 : Q.body[0]) != null && Le.generator && (O = !0);
1211
+ }), w = D((x, k, B, $, he) => {
1212
+ var ve, ge, be, pe, Le;
1213
+ const le = he && $.length ? `event,${B}` : B, ne = `function ${k} (${le}) {
1214
+ }
1215
+ `;
1216
+ if (!x)
1217
+ return ne;
1218
+ try {
1219
+ const _e = new ee(x), W = ce(x);
1220
+ if (((ge = (ve = W == null ? void 0 : W.program) == null ? void 0 : ve.body[0]) == null ? void 0 : ge.type) !== "FunctionDeclaration")
1221
+ return ne;
1222
+ if (((be = W == null ? void 0 : W.program) == null ? void 0 : be.body[0].params.length) === $.length + 1)
1223
+ return x;
1224
+ const Be = (pe = W == null ? void 0 : W.program) == null ? void 0 : pe.body[0].id.end, Ze = (Le = W == null ? void 0 : W.program) == null ? void 0 : Le.body[0].body.start;
1225
+ return _e.remove(Be, Ze), _e.appendLeft(Be, `(${le})`), _e.toString();
1226
+ } catch {
1227
+ return ne;
339
1228
  }
340
- return {
341
- preBody: _ || `{
342
- }`,
343
- isAsync: A,
344
- isGenerator: O
345
- };
346
1229
  }, {
347
1230
  metaData: {
348
- id: "engine.setting.event.BindEventsDialog.getFunctionBody"
1231
+ id: "engine.setting.event.BindEventsDialog.rewriteMethodParams"
349
1232
  },
350
1233
  ctx: () => ({
351
- props: d,
352
- BindEventsDialogSidebar: n,
353
- BindEventsDialogContent: o,
354
- PLUGIN_NAME: e,
355
- activePlugin: i,
356
- pageState: g,
357
- getMethods: p,
358
- saveMethod: a,
359
- highlightMethod: l,
360
- state: s,
361
- selectMethod: u,
362
- bindMethod: t,
363
- resetTipError: r,
364
- getExtraParams: c,
365
- getFormatParams: m,
366
- getFunctionBody: f,
367
- activePagePlugin: x,
368
- confirm: D,
369
- openedDialog: N,
370
- closeDialog: w,
371
- ast2String: H,
372
- string2Ast: R,
373
- getMergeMeta: P,
374
- useCanvas: y,
375
- useHistory: K,
376
- useLayout: V,
377
- getOptions: X,
378
- getMetaApi: k,
379
- META_APP: C,
380
- meta: U,
381
- dialogVisible: j,
382
- open: L,
383
- close: $
1234
+ props: h,
1235
+ BindEventsDialogSidebar: e,
1236
+ BindEventsDialogContent: n,
1237
+ PLUGIN_NAME: t,
1238
+ activePlugin: o,
1239
+ pageState: i,
1240
+ getMethods: l,
1241
+ saveMethod: d,
1242
+ highlightMethod: a,
1243
+ state: c,
1244
+ selectMethod: b,
1245
+ bindMethod: s,
1246
+ resetTipError: m,
1247
+ getExtraParams: g,
1248
+ getFormatParams: v,
1249
+ rewriteMethodParams: w,
1250
+ activePagePlugin: S,
1251
+ confirm: A,
1252
+ openedDialog: y,
1253
+ closeDialog: E,
1254
+ string2Ast: ce,
1255
+ getMergeMeta: q,
1256
+ useCanvas: I,
1257
+ useHistory: de,
1258
+ useLayout: z,
1259
+ getOptions: ae,
1260
+ getMetaApi: V,
1261
+ META_APP: O,
1262
+ MagicString: ee,
1263
+ meta: Q,
1264
+ dialogVisible: te,
1265
+ open: G,
1266
+ close: se
384
1267
  })
385
- }), x = h(() => {
386
- i(e.Page).then(() => {
387
- rt(() => {
388
- var E;
389
- l && l((E = s.bindMethodInfo) == null ? void 0 : E.name);
1268
+ }), S = D(() => {
1269
+ o(t.Page).then(() => {
1270
+ Ot(() => {
1271
+ var x;
1272
+ a && a((x = c.bindMethodInfo) == null ? void 0 : x.name);
390
1273
  });
391
1274
  });
392
1275
  }, {
@@ -394,255 +1277,252 @@ const U = {
394
1277
  id: "engine.setting.event.BindEventsDialog.activePagePlugin"
395
1278
  },
396
1279
  ctx: () => ({
397
- props: d,
398
- BindEventsDialogSidebar: n,
399
- BindEventsDialogContent: o,
400
- PLUGIN_NAME: e,
401
- activePlugin: i,
402
- pageState: g,
403
- getMethods: p,
404
- saveMethod: a,
405
- highlightMethod: l,
406
- state: s,
407
- selectMethod: u,
408
- bindMethod: t,
409
- resetTipError: r,
410
- getExtraParams: c,
411
- getFormatParams: m,
412
- getFunctionBody: f,
413
- activePagePlugin: x,
414
- confirm: D,
415
- openedDialog: N,
416
- closeDialog: w,
417
- ast2String: H,
418
- string2Ast: R,
419
- getMergeMeta: P,
420
- useCanvas: y,
421
- useHistory: K,
422
- useLayout: V,
423
- getOptions: X,
424
- getMetaApi: k,
425
- META_APP: C,
426
- meta: U,
427
- dialogVisible: j,
428
- open: L,
429
- close: $
1280
+ props: h,
1281
+ BindEventsDialogSidebar: e,
1282
+ BindEventsDialogContent: n,
1283
+ PLUGIN_NAME: t,
1284
+ activePlugin: o,
1285
+ pageState: i,
1286
+ getMethods: l,
1287
+ saveMethod: d,
1288
+ highlightMethod: a,
1289
+ state: c,
1290
+ selectMethod: b,
1291
+ bindMethod: s,
1292
+ resetTipError: m,
1293
+ getExtraParams: g,
1294
+ getFormatParams: v,
1295
+ rewriteMethodParams: w,
1296
+ activePagePlugin: S,
1297
+ confirm: A,
1298
+ openedDialog: y,
1299
+ closeDialog: E,
1300
+ string2Ast: ce,
1301
+ getMergeMeta: q,
1302
+ useCanvas: I,
1303
+ useHistory: de,
1304
+ useLayout: z,
1305
+ getOptions: ae,
1306
+ getMetaApi: V,
1307
+ META_APP: O,
1308
+ MagicString: ee,
1309
+ meta: Q,
1310
+ dialogVisible: te,
1311
+ open: G,
1312
+ close: se
430
1313
  })
431
- }), D = h(async () => {
432
- if (s.tipError)
1314
+ }), A = D(async () => {
1315
+ var ge, be;
1316
+ if (c.tipError)
433
1317
  return;
434
- let E = "event";
435
- const _ = c();
436
- let A = E;
437
- if (!s.isValidParams)
1318
+ let x = "event";
1319
+ const k = g();
1320
+ let B = x;
1321
+ if (!c.isValidParams)
438
1322
  return;
439
- _ && (E = _.join(","), A = m(_)), t({
440
- ...s.bindMethodInfo,
441
- params: E,
442
- extra: _
1323
+ k && (x = k.join(","), B = v(k)), s({
1324
+ ...c.bindMethodInfo,
1325
+ params: x,
1326
+ extra: k
443
1327
  });
444
1328
  const {
445
- preBody: O,
446
- isAsync: W,
447
- isGenerator: Z
448
- } = f(), {
449
- name: q
450
- } = s.bindMethodInfo, ne = `${W ? "async" : ""} function${Z ? "*" : ""} ${q}`, oe = {
451
- name: q,
452
- content: s.enableExtraParams ? `${ne}(eventArgs,${A}) ${O}` : `${ne}(${A}) ${O}`
1329
+ name: $
1330
+ } = c.bindMethodInfo, he = (be = (ge = l()) == null ? void 0 : ge[c.bindMethodInfo.name]) == null ? void 0 : be.value, le = w(he, $, B, k, c.enableExtraParams), ne = {
1331
+ name: $,
1332
+ content: le
453
1333
  }, {
454
- beforeSaveMethod: ie
455
- } = X(U.id);
456
- typeof ie == "function" && await ie(oe, s.bindMethodInfo), a == null || a(oe), x(), $();
1334
+ beforeSaveMethod: ve
1335
+ } = ae(Q.id);
1336
+ typeof ve == "function" && await ve(ne, c.bindMethodInfo), d == null || d(ne), S(), se();
457
1337
  }, {
458
1338
  metaData: {
459
1339
  id: "engine.setting.event.BindEventsDialog.confirm"
460
1340
  },
461
1341
  ctx: () => ({
462
- props: d,
463
- BindEventsDialogSidebar: n,
464
- BindEventsDialogContent: o,
465
- PLUGIN_NAME: e,
466
- activePlugin: i,
467
- pageState: g,
468
- getMethods: p,
469
- saveMethod: a,
470
- highlightMethod: l,
471
- state: s,
472
- selectMethod: u,
473
- bindMethod: t,
474
- resetTipError: r,
475
- getExtraParams: c,
476
- getFormatParams: m,
477
- getFunctionBody: f,
478
- activePagePlugin: x,
479
- confirm: D,
480
- openedDialog: N,
481
- closeDialog: w,
482
- ast2String: H,
483
- string2Ast: R,
484
- getMergeMeta: P,
485
- useCanvas: y,
486
- useHistory: K,
487
- useLayout: V,
488
- getOptions: X,
489
- getMetaApi: k,
490
- META_APP: C,
491
- meta: U,
492
- dialogVisible: j,
493
- open: L,
494
- close: $
1342
+ props: h,
1343
+ BindEventsDialogSidebar: e,
1344
+ BindEventsDialogContent: n,
1345
+ PLUGIN_NAME: t,
1346
+ activePlugin: o,
1347
+ pageState: i,
1348
+ getMethods: l,
1349
+ saveMethod: d,
1350
+ highlightMethod: a,
1351
+ state: c,
1352
+ selectMethod: b,
1353
+ bindMethod: s,
1354
+ resetTipError: m,
1355
+ getExtraParams: g,
1356
+ getFormatParams: v,
1357
+ rewriteMethodParams: w,
1358
+ activePagePlugin: S,
1359
+ confirm: A,
1360
+ openedDialog: y,
1361
+ closeDialog: E,
1362
+ string2Ast: ce,
1363
+ getMergeMeta: q,
1364
+ useCanvas: I,
1365
+ useHistory: de,
1366
+ useLayout: z,
1367
+ getOptions: ae,
1368
+ getMetaApi: V,
1369
+ META_APP: O,
1370
+ MagicString: ee,
1371
+ meta: Q,
1372
+ dialogVisible: te,
1373
+ open: G,
1374
+ close: se
495
1375
  })
496
- }), N = h(() => {
497
- var E, _, A;
498
- s.enableExtraParams = !!((_ = (E = d.eventBinding) == null ? void 0 : E.params) != null && _.length), s.editorContent = JSON.stringify(((A = d.eventBinding) == null ? void 0 : A.params) || [], null, 2), r();
1376
+ }), y = D(() => {
1377
+ var x, k, B;
1378
+ c.enableExtraParams = !!((k = (x = h.eventBinding) == null ? void 0 : x.params) != null && k.length), c.editorContent = JSON.stringify(((B = h.eventBinding) == null ? void 0 : B.params) || [], null, 2), m();
499
1379
  }, {
500
1380
  metaData: {
501
1381
  id: "engine.setting.event.BindEventsDialog.openedDialog"
502
1382
  },
503
1383
  ctx: () => ({
504
- props: d,
505
- BindEventsDialogSidebar: n,
506
- BindEventsDialogContent: o,
507
- PLUGIN_NAME: e,
508
- activePlugin: i,
509
- pageState: g,
510
- getMethods: p,
511
- saveMethod: a,
512
- highlightMethod: l,
513
- state: s,
514
- selectMethod: u,
515
- bindMethod: t,
516
- resetTipError: r,
517
- getExtraParams: c,
518
- getFormatParams: m,
519
- getFunctionBody: f,
520
- activePagePlugin: x,
521
- confirm: D,
522
- openedDialog: N,
523
- closeDialog: w,
524
- ast2String: H,
525
- string2Ast: R,
526
- getMergeMeta: P,
527
- useCanvas: y,
528
- useHistory: K,
529
- useLayout: V,
530
- getOptions: X,
531
- getMetaApi: k,
532
- META_APP: C,
533
- meta: U,
534
- dialogVisible: j,
535
- open: L,
536
- close: $
1384
+ props: h,
1385
+ BindEventsDialogSidebar: e,
1386
+ BindEventsDialogContent: n,
1387
+ PLUGIN_NAME: t,
1388
+ activePlugin: o,
1389
+ pageState: i,
1390
+ getMethods: l,
1391
+ saveMethod: d,
1392
+ highlightMethod: a,
1393
+ state: c,
1394
+ selectMethod: b,
1395
+ bindMethod: s,
1396
+ resetTipError: m,
1397
+ getExtraParams: g,
1398
+ getFormatParams: v,
1399
+ rewriteMethodParams: w,
1400
+ activePagePlugin: S,
1401
+ confirm: A,
1402
+ openedDialog: y,
1403
+ closeDialog: E,
1404
+ string2Ast: ce,
1405
+ getMergeMeta: q,
1406
+ useCanvas: I,
1407
+ useHistory: de,
1408
+ useLayout: z,
1409
+ getOptions: ae,
1410
+ getMetaApi: V,
1411
+ META_APP: O,
1412
+ MagicString: ee,
1413
+ meta: Q,
1414
+ dialogVisible: te,
1415
+ open: G,
1416
+ close: se
537
1417
  })
538
- }), w = h(() => {
539
- r(), $();
1418
+ }), E = D(() => {
1419
+ m(), se();
540
1420
  }, {
541
1421
  metaData: {
542
1422
  id: "engine.setting.event.BindEventsDialog.closeDialog"
543
1423
  },
544
1424
  ctx: () => ({
545
- props: d,
546
- BindEventsDialogSidebar: n,
547
- BindEventsDialogContent: o,
548
- PLUGIN_NAME: e,
549
- activePlugin: i,
550
- pageState: g,
551
- getMethods: p,
552
- saveMethod: a,
553
- highlightMethod: l,
554
- state: s,
555
- selectMethod: u,
556
- bindMethod: t,
557
- resetTipError: r,
558
- getExtraParams: c,
559
- getFormatParams: m,
560
- getFunctionBody: f,
561
- activePagePlugin: x,
562
- confirm: D,
563
- openedDialog: N,
564
- closeDialog: w,
565
- ast2String: H,
566
- string2Ast: R,
567
- getMergeMeta: P,
568
- useCanvas: y,
569
- useHistory: K,
570
- useLayout: V,
571
- getOptions: X,
572
- getMetaApi: k,
573
- META_APP: C,
574
- meta: U,
575
- dialogVisible: j,
576
- open: L,
577
- close: $
1425
+ props: h,
1426
+ BindEventsDialogSidebar: e,
1427
+ BindEventsDialogContent: n,
1428
+ PLUGIN_NAME: t,
1429
+ activePlugin: o,
1430
+ pageState: i,
1431
+ getMethods: l,
1432
+ saveMethod: d,
1433
+ highlightMethod: a,
1434
+ state: c,
1435
+ selectMethod: b,
1436
+ bindMethod: s,
1437
+ resetTipError: m,
1438
+ getExtraParams: g,
1439
+ getFormatParams: v,
1440
+ rewriteMethodParams: w,
1441
+ activePagePlugin: S,
1442
+ confirm: A,
1443
+ openedDialog: y,
1444
+ closeDialog: E,
1445
+ string2Ast: ce,
1446
+ getMergeMeta: q,
1447
+ useCanvas: I,
1448
+ useHistory: de,
1449
+ useLayout: z,
1450
+ getOptions: ae,
1451
+ getMetaApi: V,
1452
+ META_APP: O,
1453
+ MagicString: ee,
1454
+ meta: Q,
1455
+ dialogVisible: te,
1456
+ open: G,
1457
+ close: se
578
1458
  })
579
1459
  });
580
1460
  return {
581
- BindEventsDialogSidebar: n,
582
- BindEventsDialogContent: o,
583
- state: s,
584
- dialogVisible: j,
585
- confirm: D,
586
- closeDialog: w,
587
- openedDialog: N,
588
- selectMethod: u
1461
+ BindEventsDialogSidebar: e,
1462
+ BindEventsDialogContent: n,
1463
+ state: c,
1464
+ dialogVisible: te,
1465
+ confirm: A,
1466
+ closeDialog: E,
1467
+ openedDialog: y,
1468
+ selectMethod: b
589
1469
  };
590
1470
  }
591
- }, Et = { class: "bind-event-dialog-tip" }, yt = { class: "bind-event-dialog-content" }, xt = { class: "bind-dialog-footer" };
592
- function Dt(d, n, o, e, i, g) {
593
- const p = M("tiny-alert"), a = M("tiny-button"), l = M("tiny-dialog-box");
594
- return B(), te(l, {
595
- visible: e.dialogVisible,
1471
+ }, nn = { class: "bind-event-dialog-tip" }, on = { class: "bind-event-dialog-content" }, sn = { class: "bind-dialog-footer" };
1472
+ function rn(h, e, n, t, o, i) {
1473
+ const l = X("tiny-alert"), d = X("tiny-button"), a = X("tiny-dialog-box");
1474
+ return U(), Ce(a, {
1475
+ visible: t.dialogVisible,
596
1476
  title: "事件绑定",
597
1477
  width: "50%",
598
1478
  "dialog-class": "bind-event-dialog",
599
1479
  draggable: "",
600
1480
  "append-to-body": !0,
601
- onClose: e.closeDialog,
602
- onOpened: e.openedDialog
1481
+ onClose: t.closeDialog,
1482
+ onOpened: t.openedDialog
603
1483
  }, {
604
- footer: I(() => [
605
- v("div", xt, [
606
- b(a, { onClick: e.closeDialog }, {
607
- default: I(() => n[0] || (n[0] = [
608
- ke("取 消")
1484
+ footer: J(() => [
1485
+ _("div", sn, [
1486
+ N(d, { onClick: t.closeDialog }, {
1487
+ default: J(() => e[0] || (e[0] = [
1488
+ Fe("取 消")
609
1489
  ])),
610
1490
  _: 1,
611
1491
  __: [0]
612
1492
  }, 8, ["onClick"]),
613
- b(a, {
1493
+ N(d, {
614
1494
  type: "info",
615
- onClick: e.confirm
1495
+ onClick: t.confirm
616
1496
  }, {
617
- default: I(() => n[1] || (n[1] = [
618
- ke("确 定")
1497
+ default: J(() => e[1] || (e[1] = [
1498
+ Fe("确 定")
619
1499
  ])),
620
1500
  _: 1,
621
1501
  __: [1]
622
1502
  }, 8, ["onClick"])
623
1503
  ])
624
1504
  ]),
625
- default: I(() => [
626
- v("div", Et, [
627
- b(p, {
1505
+ default: J(() => [
1506
+ _("div", nn, [
1507
+ N(l, {
628
1508
  type: "info",
629
1509
  description: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)。",
630
1510
  class: "header-alert",
631
1511
  closable: !1
632
1512
  })
633
1513
  ]),
634
- v("div", yt, [
635
- (B(), te(Ge(e.BindEventsDialogSidebar), {
636
- dialogVisible: e.dialogVisible,
637
- eventBinding: o.eventBinding
1514
+ _("div", on, [
1515
+ (U(), Ce(_t(t.BindEventsDialogSidebar), {
1516
+ dialogVisible: t.dialogVisible,
1517
+ eventBinding: n.eventBinding
638
1518
  }, null, 8, ["dialogVisible", "eventBinding"])),
639
- (B(), te(Ge(e.BindEventsDialogContent), { dialogVisible: e.dialogVisible }, null, 8, ["dialogVisible"]))
1519
+ (U(), Ce(_t(t.BindEventsDialogContent), { dialogVisible: t.dialogVisible }, null, 8, ["dialogVisible"]))
640
1520
  ])
641
1521
  ]),
642
1522
  _: 1
643
1523
  }, 8, ["visible", "onClose", "onOpened"]);
644
1524
  }
645
- const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-03166656"]]), at = {
1525
+ const ze = /* @__PURE__ */ We(tn, [["render", rn], ["__scopeId", "data-v-84897b97"]]), Lt = {
646
1526
  onClick: {
647
1527
  label: {
648
1528
  zh_CN: "点击事件"
@@ -699,19 +1579,19 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
699
1579
  },
700
1580
  defaultValue: ""
701
1581
  }
702
- }, et = ["onabort", "onafterprint", "onanimationend", "onanimationiteration", "onanimationstart", "onappinstalled", "onauxclick", "onbeforeinstallprompt", "onbeforeprint", "onbeforeunload", "onbeforexrselect", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "ongotpointercapture", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onoffline", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerrawupdate", "onpointerup", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onsearch", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], Pe = h((d) => !!et.map((o) => {
703
- const e = o[2].toUpperCase();
704
- return `${o.substring(0, 2)}${e}${o.substring(3)}`;
705
- }).includes(d), {
1582
+ }, Dt = ["onabort", "onafterprint", "onanimationend", "onanimationiteration", "onanimationstart", "onappinstalled", "onauxclick", "onbeforeinstallprompt", "onbeforeprint", "onbeforeunload", "onbeforexrselect", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "ongotpointercapture", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onoffline", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerrawupdate", "onpointerup", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onsearch", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], ot = D((h) => !!Dt.map((n) => {
1583
+ const t = n[2].toUpperCase();
1584
+ return `${n.substring(0, 2)}${t}${n.substring(3)}`;
1585
+ }).includes(h), {
706
1586
  metaData: {
707
1587
  id: "engine.setting.event.commonjs-events.checkEvent"
708
1588
  },
709
1589
  ctx: () => ({
710
- commonEvents: at,
711
- allEvents: et,
712
- checkEvent: Pe
1590
+ commonEvents: Lt,
1591
+ allEvents: Dt,
1592
+ checkEvent: ot
713
1593
  })
714
- }), Ct = { class: "footer" }, kt = {
1594
+ }), ln = { class: "footer" }, an = {
715
1595
  __name: "AddEventsDialog",
716
1596
  props: {
717
1597
  visible: {
@@ -724,36 +1604,36 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
724
1604
  }
725
1605
  },
726
1606
  emits: ["closeDialog", "addEvent"],
727
- setup(d, { emit: n }) {
728
- const o = d, e = n, i = we({
1607
+ setup(h, { emit: e }) {
1608
+ const n = h, t = e, o = rt({
729
1609
  eventDescription: "",
730
1610
  eventName: ""
731
- }), g = Ve(null), p = h((u, t, r) => {
732
- if (o.componentEvents[i.eventName]) {
733
- r(new Error("事件名已存在"));
1611
+ }), i = Ye(null), l = D((b, s, m) => {
1612
+ if (n.componentEvents[o.eventName]) {
1613
+ m(new Error("事件名已存在"));
734
1614
  return;
735
1615
  }
736
- if (!Pe(i.eventName)) {
737
- r(new Error("请输入正确的浏览器事件名"));
1616
+ if (!ot(o.eventName)) {
1617
+ m(new Error("请输入正确的浏览器事件名"));
738
1618
  return;
739
1619
  }
740
- r();
1620
+ m();
741
1621
  }, {
742
1622
  metaData: {
743
1623
  id: "engine.setting.event.AddEventsDialog.eventNameValidator"
744
1624
  },
745
1625
  ctx: () => ({
746
- checkEvent: Pe,
747
- props: o,
748
- emits: e,
749
- formData: i,
750
- ruleForm: g,
751
- eventNameValidator: p,
752
- rules: a,
753
- closeDialog: l,
754
- addMethod: s
1626
+ checkEvent: ot,
1627
+ props: n,
1628
+ emits: t,
1629
+ formData: o,
1630
+ ruleForm: i,
1631
+ eventNameValidator: l,
1632
+ rules: d,
1633
+ closeDialog: a,
1634
+ addMethod: c
755
1635
  })
756
- }), a = {
1636
+ }), d = {
757
1637
  eventDescription: [{
758
1638
  required: !0,
759
1639
  message: "必填"
@@ -762,36 +1642,36 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
762
1642
  required: !0,
763
1643
  message: "必填"
764
1644
  }, {
765
- validator: p
1645
+ validator: l
766
1646
  }]
767
- }, l = h(() => {
768
- e("closeDialog");
1647
+ }, a = D(() => {
1648
+ t("closeDialog");
769
1649
  }, {
770
1650
  metaData: {
771
1651
  id: "engine.setting.event.AddEventsDialog.closeDialog"
772
1652
  },
773
1653
  ctx: () => ({
774
- checkEvent: Pe,
775
- props: o,
776
- emits: e,
777
- formData: i,
778
- ruleForm: g,
779
- eventNameValidator: p,
780
- rules: a,
781
- closeDialog: l,
782
- addMethod: s
1654
+ checkEvent: ot,
1655
+ props: n,
1656
+ emits: t,
1657
+ formData: o,
1658
+ ruleForm: i,
1659
+ eventNameValidator: l,
1660
+ rules: d,
1661
+ closeDialog: a,
1662
+ addMethod: c
783
1663
  })
784
- }), s = h(() => {
785
- g.value && g.value.validate((u) => {
786
- if (!u)
1664
+ }), c = D(() => {
1665
+ i.value && i.value.validate((b) => {
1666
+ if (!b)
787
1667
  return;
788
1668
  const {
789
- eventName: t,
790
- eventDescription: r
791
- } = i;
792
- e("addEvent", {
793
- eventName: t,
794
- eventDescription: r
1669
+ eventName: s,
1670
+ eventDescription: m
1671
+ } = o;
1672
+ t("addEvent", {
1673
+ eventName: s,
1674
+ eventDescription: m
795
1675
  });
796
1676
  });
797
1677
  }, {
@@ -799,82 +1679,82 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
799
1679
  id: "engine.setting.event.AddEventsDialog.addMethod"
800
1680
  },
801
1681
  ctx: () => ({
802
- checkEvent: Pe,
803
- props: o,
804
- emits: e,
805
- formData: i,
806
- ruleForm: g,
807
- eventNameValidator: p,
808
- rules: a,
809
- closeDialog: l,
810
- addMethod: s
1682
+ checkEvent: ot,
1683
+ props: n,
1684
+ emits: t,
1685
+ formData: o,
1686
+ ruleForm: i,
1687
+ eventNameValidator: l,
1688
+ rules: d,
1689
+ closeDialog: a,
1690
+ addMethod: c
811
1691
  })
812
1692
  });
813
- return (u, t) => (B(), te(S(it), {
814
- visible: d.visible,
1693
+ return (b, s) => (U(), Ce(Z(It), {
1694
+ visible: h.visible,
815
1695
  title: "添加新事件",
816
1696
  width: "400px",
817
1697
  "append-to-body": !0,
818
1698
  "close-on-click-modal": !1,
819
- onClose: S(l)
1699
+ onClose: Z(a)
820
1700
  }, {
821
- footer: I(() => [
822
- v("div", Ct, [
823
- b(S(Te), { onClick: S(l) }, {
824
- default: I(() => t[2] || (t[2] = [
825
- ke(" 取消")
1701
+ footer: J(() => [
1702
+ _("div", ln, [
1703
+ N(Z(ct), { onClick: Z(a) }, {
1704
+ default: J(() => s[2] || (s[2] = [
1705
+ Fe(" 取消")
826
1706
  ])),
827
1707
  _: 1,
828
1708
  __: [2]
829
1709
  }, 8, ["onClick"]),
830
- b(S(Te), {
1710
+ N(Z(ct), {
831
1711
  type: "primary",
832
- onClick: S(s)
1712
+ onClick: Z(c)
833
1713
  }, {
834
- default: I(() => t[3] || (t[3] = [
835
- ke(" 确定")
1714
+ default: J(() => s[3] || (s[3] = [
1715
+ Fe(" 确定")
836
1716
  ])),
837
1717
  _: 1,
838
1718
  __: [3]
839
1719
  }, 8, ["onClick"])
840
1720
  ])
841
1721
  ]),
842
- default: I(() => [
843
- b(S(gt), {
1722
+ default: J(() => [
1723
+ N(Z(Mt), {
844
1724
  ref_key: "ruleForm",
845
- ref: g,
846
- model: i,
847
- rules: a,
1725
+ ref: i,
1726
+ model: o,
1727
+ rules: d,
848
1728
  "label-width": "80px",
849
1729
  "inline-message": !0,
850
1730
  "validate-type": "text",
851
1731
  "label-position": "left",
852
1732
  class: "add-custom-event-form"
853
1733
  }, {
854
- default: I(() => [
855
- b(S(We), {
1734
+ default: J(() => [
1735
+ N(Z(xt), {
856
1736
  label: "事件函数名",
857
1737
  prop: "eventName",
858
1738
  required: ""
859
1739
  }, {
860
- default: I(() => [
861
- b(S(Fe), {
862
- modelValue: i.eventName,
863
- "onUpdate:modelValue": t[0] || (t[0] = (r) => i.eventName = r),
1740
+ default: J(() => [
1741
+ N(Z(mt), {
1742
+ modelValue: o.eventName,
1743
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => o.eventName = m),
864
1744
  placeholder: "小驼峰格式,如:onDrag"
865
1745
  }, null, 8, ["modelValue"])
866
1746
  ]),
867
1747
  _: 1
868
1748
  }),
869
- b(S(We), {
1749
+ N(Z(xt), {
870
1750
  label: "事件描述",
871
1751
  prop: "eventDescription",
872
1752
  required: ""
873
1753
  }, {
874
- default: I(() => [
875
- b(S(Fe), {
876
- modelValue: i.eventDescription,
877
- "onUpdate:modelValue": t[1] || (t[1] = (r) => i.eventDescription = r)
1754
+ default: J(() => [
1755
+ N(Z(mt), {
1756
+ modelValue: o.eventDescription,
1757
+ "onUpdate:modelValue": s[1] || (s[1] = (m) => o.eventDescription = m)
878
1758
  }, null, 8, ["modelValue"])
879
1759
  ]),
880
1760
  _: 1
@@ -886,128 +1766,128 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
886
1766
  _: 1
887
1767
  }, 8, ["visible", "onClose"]));
888
1768
  }
889
- }, Ce = /* @__PURE__ */ Ie(kt, [["__scopeId", "data-v-2ed7fac6"]]), At = {
1769
+ }, Je = /* @__PURE__ */ We(an, [["__scopeId", "data-v-2ed7fac6"]]), dn = {
890
1770
  components: {
891
- BlockLinkEvent: ye,
892
- BindEventsDialog: De,
893
- TinyPopover: pt,
894
- TinyButton: Te,
895
- IconChevronDown: xe(),
896
- SvgButton: Ee,
897
- AddEventsDialog: Ce
1771
+ BlockLinkEvent: je,
1772
+ BindEventsDialog: ze,
1773
+ TinyPopover: Rt,
1774
+ TinyButton: ct,
1775
+ IconChevronDown: $e(),
1776
+ SvgButton: Ue,
1777
+ AddEventsDialog: Je
898
1778
  },
899
1779
  inheritAttrs: !1,
900
1780
  setup() {
901
1781
  const {
902
- PLUGIN_NAME: d,
903
- activePlugin: n
904
- } = V(), {
905
- pageState: o
906
- } = y(), {
907
- getBlockEvents: e,
908
- getCurrentBlock: i,
909
- removeEventLink: g
910
- } = ue(), {
911
- getMaterial: p
912
- } = fe(), {
913
- confirm: a
914
- } = _e(), l = be.global.locale.value, {
915
- highlightMethod: s
916
- } = k(C.Page), {
917
- commonEvents: u = {}
918
- } = P("engine.setting.event").options, t = we({
1782
+ PLUGIN_NAME: h,
1783
+ activePlugin: e
1784
+ } = z(), {
1785
+ pageState: n
1786
+ } = I(), {
1787
+ getBlockEvents: t,
1788
+ getCurrentBlock: o,
1789
+ removeEventLink: i
1790
+ } = Oe(), {
1791
+ getMaterial: l
1792
+ } = Ve(), {
1793
+ confirm: d
1794
+ } = Me(), a = Te.global.locale.value, {
1795
+ highlightMethod: c
1796
+ } = V(O.Page), {
1797
+ commonEvents: b = {}
1798
+ } = q("engine.setting.event").options, s = rt({
919
1799
  eventName: "",
920
1800
  // 事件名称
921
1801
  eventBinding: null,
922
1802
  // 事件绑定的处理方法对象
923
1803
  componentEvent: {},
924
- customEvents: u,
1804
+ customEvents: b,
925
1805
  bindActions: {},
926
1806
  showBindEventDialog: !1
927
- }), r = Me(() => !!o.isBlock), c = Me(() => Object.keys(t.bindActions).length === 0), m = Me(() => ({
928
- ...t.componentEvent,
929
- ...t.customEvents
1807
+ }), m = it(() => !!n.isBlock), g = it(() => Object.keys(s.bindActions).length === 0), v = it(() => ({
1808
+ ...s.componentEvent,
1809
+ ...s.customEvents
930
1810
  }));
931
- nt(() => {
932
- var Z, q, ne, oe, ie;
933
- const _ = (Z = o == null ? void 0 : o.currentSchema) == null ? void 0 : Z.componentName, A = p(_);
934
- t.componentEvent = ((ne = (q = A == null ? void 0 : A.content) == null ? void 0 : q.schema) == null ? void 0 : ne.events) || ((oe = A == null ? void 0 : A.schema) == null ? void 0 : oe.events) || {};
935
- const O = ((ie = o == null ? void 0 : o.currentSchema) == null ? void 0 : ie.props) || {}, W = Object.keys(O);
936
- t.bindActions = {}, Object.entries(m.value).forEach(([Q, Le]) => {
937
- var T, Ue, Re;
938
- if (W.indexOf(Q) > -1) {
939
- const st = O[Q], {
940
- value: lt,
941
- params: $e
942
- } = st, dt = !$e && ((Ue = (T = lt.match(/\((.+)\)$/)) == null ? void 0 : T[1]) == null ? void 0 : Ue.split(",")) || $e, pe = {
943
- eventName: Q,
1811
+ Nt(() => {
1812
+ var le, ne, ve, ge, be;
1813
+ const k = (le = n == null ? void 0 : n.currentSchema) == null ? void 0 : le.componentName, B = l(k);
1814
+ s.componentEvent = ((ve = (ne = B == null ? void 0 : B.content) == null ? void 0 : ne.schema) == null ? void 0 : ve.events) || ((ge = B == null ? void 0 : B.schema) == null ? void 0 : ge.events) || {};
1815
+ const $ = ((be = n == null ? void 0 : n.currentSchema) == null ? void 0 : be.props) || {}, he = Object.keys($);
1816
+ s.bindActions = {}, Object.entries(v.value).forEach(([pe, Le]) => {
1817
+ var _e, W, Be;
1818
+ if (he.indexOf(pe) > -1) {
1819
+ const Ze = $[pe], {
1820
+ value: ut,
1821
+ params: f
1822
+ } = Ze, u = !f && ((W = (_e = ut.match(/\((.+)\)$/)) == null ? void 0 : _e[1]) == null ? void 0 : W.split(",")) || f, r = {
1823
+ eventName: pe,
944
1824
  ref: "",
945
- event: O[Q],
946
- params: dt
1825
+ event: $[pe],
1826
+ params: u
947
1827
  };
948
- if (pe.event.type === "JSExpression" && (pe.ref = pe.event.value.replace("this.", "").replace(/\(.*\)$/, "")), o.isBlock) {
949
- pe.metaEvent = Le;
950
- const Je = e(i()), Xe = (Re = o == null ? void 0 : o.currentSchema) == null ? void 0 : Re.id;
951
- Xe && Je && Object.entries(Je).forEach(([ct, ve]) => {
952
- var Ke, He;
953
- Xe === ((Ke = ve == null ? void 0 : ve.linked) == null ? void 0 : Ke.id) && Q === ((He = ve == null ? void 0 : ve.linked) == null ? void 0 : He.event) && (pe.linked = ve.linked, pe.linkedEventName = ct);
1828
+ if (r.event.type === "JSExpression" && (r.ref = r.event.value.replace("this.", "").replace(/\(.*\)$/, "")), n.isBlock) {
1829
+ r.metaEvent = Le;
1830
+ const p = t(o()), C = (Be = n == null ? void 0 : n.currentSchema) == null ? void 0 : Be.id;
1831
+ C && p && Object.entries(p).forEach(([P, L]) => {
1832
+ var M, j;
1833
+ C === ((M = L == null ? void 0 : L.linked) == null ? void 0 : M.id) && pe === ((j = L == null ? void 0 : L.linked) == null ? void 0 : j.event) && (r.linked = L.linked, r.linkedEventName = P);
954
1834
  });
955
1835
  }
956
- t.bindActions[Q] = pe;
1836
+ s.bindActions[pe] = r;
957
1837
  }
958
1838
  });
959
1839
  });
960
- const f = h((_, A) => {
961
- A && t.bindActions[_.eventName] || (t.eventBinding = _, L());
1840
+ const w = D((k, B) => {
1841
+ B && s.bindActions[k.eventName] || (s.eventBinding = k, G());
962
1842
  }, {
963
1843
  metaData: {
964
1844
  id: "engine.setting.event.BindEvents.openActionDialog"
965
1845
  },
966
1846
  ctx: () => ({
967
- PLUGIN_NAME: d,
968
- activePlugin: n,
969
- pageState: o,
970
- getBlockEvents: e,
971
- getCurrentBlock: i,
972
- removeEventLink: g,
973
- getMaterial: p,
974
- confirm: a,
975
- locale: l,
976
- highlightMethod: s,
977
- commonEvents: u,
978
- state: t,
979
- isBlock: r,
980
- isEmpty: c,
981
- renderEventList: m,
982
- openActionDialog: f,
983
- deleteAction: x,
984
- delEvent: D,
985
- openCodePanel: N,
986
- handleToggleAddEventDialog: w,
987
- handleAddEvent: E,
988
- useModal: _e,
989
- getMergeMeta: P,
990
- useCanvas: y,
991
- useLayout: V,
992
- useBlock: ue,
993
- useMaterial: fe,
994
- getMetaApi: k,
995
- META_APP: C,
996
- useMessage: he,
997
- i18n: be,
998
- BlockLinkEvent: ye,
999
- SvgButton: Ee,
1000
- iconChevronDown: xe,
1001
- BindEventsDialog: De,
1002
- openDialog: L,
1003
- AddEventsDialog: Ce
1847
+ PLUGIN_NAME: h,
1848
+ activePlugin: e,
1849
+ pageState: n,
1850
+ getBlockEvents: t,
1851
+ getCurrentBlock: o,
1852
+ removeEventLink: i,
1853
+ getMaterial: l,
1854
+ confirm: d,
1855
+ locale: a,
1856
+ highlightMethod: c,
1857
+ commonEvents: b,
1858
+ state: s,
1859
+ isBlock: m,
1860
+ isEmpty: g,
1861
+ renderEventList: v,
1862
+ openActionDialog: w,
1863
+ deleteAction: S,
1864
+ delEvent: A,
1865
+ openCodePanel: y,
1866
+ handleToggleAddEventDialog: E,
1867
+ handleAddEvent: x,
1868
+ useModal: Me,
1869
+ getMergeMeta: q,
1870
+ useCanvas: I,
1871
+ useLayout: z,
1872
+ useBlock: Oe,
1873
+ useMaterial: Ve,
1874
+ getMetaApi: V,
1875
+ META_APP: O,
1876
+ useMessage: Re,
1877
+ i18n: Te,
1878
+ BlockLinkEvent: je,
1879
+ SvgButton: Ue,
1880
+ iconChevronDown: $e,
1881
+ BindEventsDialog: ze,
1882
+ openDialog: G,
1883
+ AddEventsDialog: Je
1004
1884
  })
1005
- }), x = h((_) => {
1006
- var O;
1007
- Object.keys(((O = o == null ? void 0 : o.currentSchema) == null ? void 0 : O.props) || {}).indexOf(_.eventName) > -1 && (delete o.currentSchema.props[_.eventName], he().publish({
1885
+ }), S = D((k) => {
1886
+ var $;
1887
+ Object.keys((($ = n == null ? void 0 : n.currentSchema) == null ? void 0 : $.props) || {}).indexOf(k.eventName) > -1 && (delete n.currentSchema.props[k.eventName], Re().publish({
1008
1888
  topic: "schemaChange",
1009
1889
  data: {
1010
- props: o.currentSchema.props
1890
+ props: n.currentSchema.props
1011
1891
  }
1012
1892
  }));
1013
1893
  }, {
@@ -1015,52 +1895,52 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
1015
1895
  id: "engine.setting.event.BindEvents.deleteAction"
1016
1896
  },
1017
1897
  ctx: () => ({
1018
- PLUGIN_NAME: d,
1019
- activePlugin: n,
1020
- pageState: o,
1021
- getBlockEvents: e,
1022
- getCurrentBlock: i,
1023
- removeEventLink: g,
1024
- getMaterial: p,
1025
- confirm: a,
1026
- locale: l,
1027
- highlightMethod: s,
1028
- commonEvents: u,
1029
- state: t,
1030
- isBlock: r,
1031
- isEmpty: c,
1032
- renderEventList: m,
1033
- openActionDialog: f,
1034
- deleteAction: x,
1035
- delEvent: D,
1036
- openCodePanel: N,
1037
- handleToggleAddEventDialog: w,
1038
- handleAddEvent: E,
1039
- useModal: _e,
1040
- getMergeMeta: P,
1041
- useCanvas: y,
1042
- useLayout: V,
1043
- useBlock: ue,
1044
- useMaterial: fe,
1045
- getMetaApi: k,
1046
- META_APP: C,
1047
- useMessage: he,
1048
- i18n: be,
1049
- BlockLinkEvent: ye,
1050
- SvgButton: Ee,
1051
- iconChevronDown: xe,
1052
- BindEventsDialog: De,
1053
- openDialog: L,
1054
- AddEventsDialog: Ce
1898
+ PLUGIN_NAME: h,
1899
+ activePlugin: e,
1900
+ pageState: n,
1901
+ getBlockEvents: t,
1902
+ getCurrentBlock: o,
1903
+ removeEventLink: i,
1904
+ getMaterial: l,
1905
+ confirm: d,
1906
+ locale: a,
1907
+ highlightMethod: c,
1908
+ commonEvents: b,
1909
+ state: s,
1910
+ isBlock: m,
1911
+ isEmpty: g,
1912
+ renderEventList: v,
1913
+ openActionDialog: w,
1914
+ deleteAction: S,
1915
+ delEvent: A,
1916
+ openCodePanel: y,
1917
+ handleToggleAddEventDialog: E,
1918
+ handleAddEvent: x,
1919
+ useModal: Me,
1920
+ getMergeMeta: q,
1921
+ useCanvas: I,
1922
+ useLayout: z,
1923
+ useBlock: Oe,
1924
+ useMaterial: Ve,
1925
+ getMetaApi: V,
1926
+ META_APP: O,
1927
+ useMessage: Re,
1928
+ i18n: Te,
1929
+ BlockLinkEvent: je,
1930
+ SvgButton: Ue,
1931
+ iconChevronDown: $e,
1932
+ BindEventsDialog: ze,
1933
+ openDialog: G,
1934
+ AddEventsDialog: Je
1055
1935
  })
1056
- }), D = h((_) => {
1057
- a({
1936
+ }), A = D((k) => {
1937
+ d({
1058
1938
  title: "提示",
1059
- message: `您确定要删除事件 ${_.eventName} 吗?`,
1939
+ message: `您确定要删除事件 ${k.eventName} 吗?`,
1060
1940
  exec() {
1061
- o.isBlock && g({
1062
- linked: _.linked
1063
- }), x(_);
1941
+ n.isBlock && i({
1942
+ linked: k.linked
1943
+ }), S(k);
1064
1944
  }
1065
1945
  });
1066
1946
  }, {
@@ -1068,148 +1948,148 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
1068
1948
  id: "engine.setting.event.BindEvents.delEvent"
1069
1949
  },
1070
1950
  ctx: () => ({
1071
- PLUGIN_NAME: d,
1072
- activePlugin: n,
1073
- pageState: o,
1074
- getBlockEvents: e,
1075
- getCurrentBlock: i,
1076
- removeEventLink: g,
1077
- getMaterial: p,
1078
- confirm: a,
1079
- locale: l,
1080
- highlightMethod: s,
1081
- commonEvents: u,
1082
- state: t,
1083
- isBlock: r,
1084
- isEmpty: c,
1085
- renderEventList: m,
1086
- openActionDialog: f,
1087
- deleteAction: x,
1088
- delEvent: D,
1089
- openCodePanel: N,
1090
- handleToggleAddEventDialog: w,
1091
- handleAddEvent: E,
1092
- useModal: _e,
1093
- getMergeMeta: P,
1094
- useCanvas: y,
1095
- useLayout: V,
1096
- useBlock: ue,
1097
- useMaterial: fe,
1098
- getMetaApi: k,
1099
- META_APP: C,
1100
- useMessage: he,
1101
- i18n: be,
1102
- BlockLinkEvent: ye,
1103
- SvgButton: Ee,
1104
- iconChevronDown: xe,
1105
- BindEventsDialog: De,
1106
- openDialog: L,
1107
- AddEventsDialog: Ce
1951
+ PLUGIN_NAME: h,
1952
+ activePlugin: e,
1953
+ pageState: n,
1954
+ getBlockEvents: t,
1955
+ getCurrentBlock: o,
1956
+ removeEventLink: i,
1957
+ getMaterial: l,
1958
+ confirm: d,
1959
+ locale: a,
1960
+ highlightMethod: c,
1961
+ commonEvents: b,
1962
+ state: s,
1963
+ isBlock: m,
1964
+ isEmpty: g,
1965
+ renderEventList: v,
1966
+ openActionDialog: w,
1967
+ deleteAction: S,
1968
+ delEvent: A,
1969
+ openCodePanel: y,
1970
+ handleToggleAddEventDialog: E,
1971
+ handleAddEvent: x,
1972
+ useModal: Me,
1973
+ getMergeMeta: q,
1974
+ useCanvas: I,
1975
+ useLayout: z,
1976
+ useBlock: Oe,
1977
+ useMaterial: Ve,
1978
+ getMetaApi: V,
1979
+ META_APP: O,
1980
+ useMessage: Re,
1981
+ i18n: Te,
1982
+ BlockLinkEvent: je,
1983
+ SvgButton: Ue,
1984
+ iconChevronDown: $e,
1985
+ BindEventsDialog: ze,
1986
+ openDialog: G,
1987
+ AddEventsDialog: Je
1108
1988
  })
1109
- }), N = h((_) => {
1110
- _ && n(d.Page).then(() => {
1111
- s && s(_.ref);
1989
+ }), y = D((k) => {
1990
+ k && e(h.Page).then(() => {
1991
+ c && c(k.ref);
1112
1992
  });
1113
1993
  }, {
1114
1994
  metaData: {
1115
1995
  id: "engine.setting.event.BindEvents.openCodePanel"
1116
1996
  },
1117
1997
  ctx: () => ({
1118
- PLUGIN_NAME: d,
1119
- activePlugin: n,
1120
- pageState: o,
1121
- getBlockEvents: e,
1122
- getCurrentBlock: i,
1123
- removeEventLink: g,
1124
- getMaterial: p,
1125
- confirm: a,
1126
- locale: l,
1127
- highlightMethod: s,
1128
- commonEvents: u,
1129
- state: t,
1130
- isBlock: r,
1131
- isEmpty: c,
1132
- renderEventList: m,
1133
- openActionDialog: f,
1134
- deleteAction: x,
1135
- delEvent: D,
1136
- openCodePanel: N,
1137
- handleToggleAddEventDialog: w,
1138
- handleAddEvent: E,
1139
- useModal: _e,
1140
- getMergeMeta: P,
1141
- useCanvas: y,
1142
- useLayout: V,
1143
- useBlock: ue,
1144
- useMaterial: fe,
1145
- getMetaApi: k,
1146
- META_APP: C,
1147
- useMessage: he,
1148
- i18n: be,
1149
- BlockLinkEvent: ye,
1150
- SvgButton: Ee,
1151
- iconChevronDown: xe,
1152
- BindEventsDialog: De,
1153
- openDialog: L,
1154
- AddEventsDialog: Ce
1998
+ PLUGIN_NAME: h,
1999
+ activePlugin: e,
2000
+ pageState: n,
2001
+ getBlockEvents: t,
2002
+ getCurrentBlock: o,
2003
+ removeEventLink: i,
2004
+ getMaterial: l,
2005
+ confirm: d,
2006
+ locale: a,
2007
+ highlightMethod: c,
2008
+ commonEvents: b,
2009
+ state: s,
2010
+ isBlock: m,
2011
+ isEmpty: g,
2012
+ renderEventList: v,
2013
+ openActionDialog: w,
2014
+ deleteAction: S,
2015
+ delEvent: A,
2016
+ openCodePanel: y,
2017
+ handleToggleAddEventDialog: E,
2018
+ handleAddEvent: x,
2019
+ useModal: Me,
2020
+ getMergeMeta: q,
2021
+ useCanvas: I,
2022
+ useLayout: z,
2023
+ useBlock: Oe,
2024
+ useMaterial: Ve,
2025
+ getMetaApi: V,
2026
+ META_APP: O,
2027
+ useMessage: Re,
2028
+ i18n: Te,
2029
+ BlockLinkEvent: je,
2030
+ SvgButton: Ue,
2031
+ iconChevronDown: $e,
2032
+ BindEventsDialog: ze,
2033
+ openDialog: G,
2034
+ AddEventsDialog: Je
1155
2035
  })
1156
- }), w = h((_) => {
1157
- t.showBindEventDialog = _;
2036
+ }), E = D((k) => {
2037
+ s.showBindEventDialog = k;
1158
2038
  }, {
1159
2039
  metaData: {
1160
2040
  id: "engine.setting.event.BindEvents.handleToggleAddEventDialog"
1161
2041
  },
1162
2042
  ctx: () => ({
1163
- PLUGIN_NAME: d,
1164
- activePlugin: n,
1165
- pageState: o,
1166
- getBlockEvents: e,
1167
- getCurrentBlock: i,
1168
- removeEventLink: g,
1169
- getMaterial: p,
1170
- confirm: a,
1171
- locale: l,
1172
- highlightMethod: s,
1173
- commonEvents: u,
1174
- state: t,
1175
- isBlock: r,
1176
- isEmpty: c,
1177
- renderEventList: m,
1178
- openActionDialog: f,
1179
- deleteAction: x,
1180
- delEvent: D,
1181
- openCodePanel: N,
1182
- handleToggleAddEventDialog: w,
1183
- handleAddEvent: E,
1184
- useModal: _e,
1185
- getMergeMeta: P,
1186
- useCanvas: y,
1187
- useLayout: V,
1188
- useBlock: ue,
1189
- useMaterial: fe,
1190
- getMetaApi: k,
1191
- META_APP: C,
1192
- useMessage: he,
1193
- i18n: be,
1194
- BlockLinkEvent: ye,
1195
- SvgButton: Ee,
1196
- iconChevronDown: xe,
1197
- BindEventsDialog: De,
1198
- openDialog: L,
1199
- AddEventsDialog: Ce
2043
+ PLUGIN_NAME: h,
2044
+ activePlugin: e,
2045
+ pageState: n,
2046
+ getBlockEvents: t,
2047
+ getCurrentBlock: o,
2048
+ removeEventLink: i,
2049
+ getMaterial: l,
2050
+ confirm: d,
2051
+ locale: a,
2052
+ highlightMethod: c,
2053
+ commonEvents: b,
2054
+ state: s,
2055
+ isBlock: m,
2056
+ isEmpty: g,
2057
+ renderEventList: v,
2058
+ openActionDialog: w,
2059
+ deleteAction: S,
2060
+ delEvent: A,
2061
+ openCodePanel: y,
2062
+ handleToggleAddEventDialog: E,
2063
+ handleAddEvent: x,
2064
+ useModal: Me,
2065
+ getMergeMeta: q,
2066
+ useCanvas: I,
2067
+ useLayout: z,
2068
+ useBlock: Oe,
2069
+ useMaterial: Ve,
2070
+ getMetaApi: V,
2071
+ META_APP: O,
2072
+ useMessage: Re,
2073
+ i18n: Te,
2074
+ BlockLinkEvent: je,
2075
+ SvgButton: Ue,
2076
+ iconChevronDown: $e,
2077
+ BindEventsDialog: ze,
2078
+ openDialog: G,
2079
+ AddEventsDialog: Je
1200
2080
  })
1201
- }), E = h((_) => {
2081
+ }), x = D((k) => {
1202
2082
  const {
1203
- eventName: A,
1204
- eventDescription: O
1205
- } = _;
1206
- Object.assign(t.customEvents, {
1207
- [A]: {
2083
+ eventName: B,
2084
+ eventDescription: $
2085
+ } = k;
2086
+ Object.assign(s.customEvents, {
2087
+ [B]: {
1208
2088
  label: {
1209
- zh_CN: O
2089
+ zh_CN: $
1210
2090
  },
1211
2091
  description: {
1212
- zh_CN: `${O}的回调函数`
2092
+ zh_CN: `${$}的回调函数`
1213
2093
  },
1214
2094
  type: "event",
1215
2095
  functionInfo: {
@@ -1218,71 +2098,71 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
1218
2098
  },
1219
2099
  defaultValue: ""
1220
2100
  }
1221
- }), t.showBindEventDialog = !1;
2101
+ }), s.showBindEventDialog = !1;
1222
2102
  }, {
1223
2103
  metaData: {
1224
2104
  id: "engine.setting.event.BindEvents.handleAddEvent"
1225
2105
  },
1226
2106
  ctx: () => ({
1227
- PLUGIN_NAME: d,
1228
- activePlugin: n,
1229
- pageState: o,
1230
- getBlockEvents: e,
1231
- getCurrentBlock: i,
1232
- removeEventLink: g,
1233
- getMaterial: p,
1234
- confirm: a,
1235
- locale: l,
1236
- highlightMethod: s,
1237
- commonEvents: u,
1238
- state: t,
1239
- isBlock: r,
1240
- isEmpty: c,
1241
- renderEventList: m,
1242
- openActionDialog: f,
1243
- deleteAction: x,
1244
- delEvent: D,
1245
- openCodePanel: N,
1246
- handleToggleAddEventDialog: w,
1247
- handleAddEvent: E,
1248
- useModal: _e,
1249
- getMergeMeta: P,
1250
- useCanvas: y,
1251
- useLayout: V,
1252
- useBlock: ue,
1253
- useMaterial: fe,
1254
- getMetaApi: k,
1255
- META_APP: C,
1256
- useMessage: he,
1257
- i18n: be,
1258
- BlockLinkEvent: ye,
1259
- SvgButton: Ee,
1260
- iconChevronDown: xe,
1261
- BindEventsDialog: De,
1262
- openDialog: L,
1263
- AddEventsDialog: Ce
2107
+ PLUGIN_NAME: h,
2108
+ activePlugin: e,
2109
+ pageState: n,
2110
+ getBlockEvents: t,
2111
+ getCurrentBlock: o,
2112
+ removeEventLink: i,
2113
+ getMaterial: l,
2114
+ confirm: d,
2115
+ locale: a,
2116
+ highlightMethod: c,
2117
+ commonEvents: b,
2118
+ state: s,
2119
+ isBlock: m,
2120
+ isEmpty: g,
2121
+ renderEventList: v,
2122
+ openActionDialog: w,
2123
+ deleteAction: S,
2124
+ delEvent: A,
2125
+ openCodePanel: y,
2126
+ handleToggleAddEventDialog: E,
2127
+ handleAddEvent: x,
2128
+ useModal: Me,
2129
+ getMergeMeta: q,
2130
+ useCanvas: I,
2131
+ useLayout: z,
2132
+ useBlock: Oe,
2133
+ useMaterial: Ve,
2134
+ getMetaApi: V,
2135
+ META_APP: O,
2136
+ useMessage: Re,
2137
+ i18n: Te,
2138
+ BlockLinkEvent: je,
2139
+ SvgButton: Ue,
2140
+ iconChevronDown: $e,
2141
+ BindEventsDialog: ze,
2142
+ openDialog: G,
2143
+ AddEventsDialog: Je
1264
2144
  })
1265
2145
  });
1266
2146
  return {
1267
- state: t,
1268
- isBlock: r,
1269
- isEmpty: c,
1270
- delEvent: D,
1271
- openCodePanel: N,
1272
- openActionDialog: f,
1273
- handleAddEvent: E,
1274
- handleToggleAddEventDialog: w,
1275
- renderEventList: m,
1276
- locale: l
2147
+ state: s,
2148
+ isBlock: m,
2149
+ isEmpty: g,
2150
+ delEvent: A,
2151
+ openCodePanel: y,
2152
+ openActionDialog: w,
2153
+ handleAddEvent: x,
2154
+ handleToggleAddEventDialog: E,
2155
+ renderEventList: v,
2156
+ locale: a
1277
2157
  };
1278
2158
  }
1279
- }, Bt = { class: "bind-action-list" }, Nt = { class: "popover-head" }, Vt = { class: "bind-event-list" }, It = ["onClick"], Pt = { class: "bind-actions" }, Mt = { class: "action-item bind-action-item" }, wt = ["onClick"], Lt = { class: "event-bind" }, Ot = { class: "action-buttons" }, St = { class: "empty-action" }, Tt = { class: "icon" };
1280
- function Ut(d, n, o, e, i, g) {
1281
- const p = M("icon-chevron-down"), a = M("tiny-button"), l = M("tiny-popover"), s = M("svg-icon"), u = M("block-link-event"), t = M("svg-button"), r = M("bind-events-dialog"), c = M("add-events-dialog");
1282
- return B(), J(Oe, null, [
1283
- v("div", Bt, [
1284
- v("div", Nt, [
1285
- b(l, {
2159
+ }, cn = { class: "bind-action-list" }, hn = { class: "popover-head" }, un = { class: "bind-event-list" }, fn = ["onClick"], gn = { class: "bind-actions" }, pn = { class: "action-item bind-action-item" }, mn = ["onClick"], vn = { class: "event-bind" }, bn = { class: "action-buttons" }, _n = { class: "empty-action" }, En = { class: "icon" };
2160
+ function yn(h, e, n, t, o, i) {
2161
+ const l = X("icon-chevron-down"), d = X("tiny-button"), a = X("tiny-popover"), c = X("svg-icon"), b = X("block-link-event"), s = X("svg-button"), m = X("bind-events-dialog"), g = X("add-events-dialog");
2162
+ return U(), re(at, null, [
2163
+ _("div", cn, [
2164
+ _("div", hn, [
2165
+ N(a, {
1286
2166
  popperClass: "option-popper setting-advanced-bind-event-list",
1287
2167
  placement: "bottom-start",
1288
2168
  trigger: "hover",
@@ -1290,340 +2170,340 @@ function Ut(d, n, o, e, i, g) {
1290
2170
  width: "256",
1291
2171
  "visible-arrow": !1
1292
2172
  }, {
1293
- reference: I(() => [
1294
- b(a, { class: "bind-event-btn" }, {
1295
- default: I(() => [
1296
- n[2] || (n[2] = v("span", null, "绑定事件", -1)),
1297
- b(p, { class: "icon-chevron-down bind-event-btn-icon" })
2173
+ reference: J(() => [
2174
+ N(d, { class: "bind-event-btn" }, {
2175
+ default: J(() => [
2176
+ e[2] || (e[2] = _("span", null, "绑定事件", -1)),
2177
+ N(l, { class: "icon-chevron-down bind-event-btn-icon" })
1298
2178
  ]),
1299
2179
  _: 1,
1300
2180
  __: [2]
1301
2181
  })
1302
2182
  ]),
1303
- default: I(() => [
1304
- v("ul", Vt, [
1305
- (B(!0), J(Oe, null, ze(e.renderEventList, (m, f) => {
1306
- var x;
1307
- return B(), J("li", {
1308
- key: f,
1309
- class: Ne(["bind-event-list-item", { "bind-event-list-item-notallow": e.state.bindActions[f] }]),
1310
- onClick: (D) => e.openActionDialog({ eventName: f }, !0)
2183
+ default: J(() => [
2184
+ _("ul", un, [
2185
+ (U(!0), re(at, null, pt(t.renderEventList, (v, w) => {
2186
+ var S;
2187
+ return U(), re("li", {
2188
+ key: w,
2189
+ class: He(["bind-event-list-item", { "bind-event-list-item-notallow": t.state.bindActions[w] }]),
2190
+ onClick: (A) => t.openActionDialog({ eventName: w }, !0)
1311
2191
  }, [
1312
- v("div", null, Y(f) + "  |  " + Y(((x = m == null ? void 0 : m.label) == null ? void 0 : x[e.locale]) || f), 1)
1313
- ], 10, It);
2192
+ _("div", null, me(w) + "  |  " + me(((S = v == null ? void 0 : v.label) == null ? void 0 : S[t.locale]) || w), 1)
2193
+ ], 10, fn);
1314
2194
  }), 128))
1315
2195
  ])
1316
2196
  ]),
1317
2197
  _: 1
1318
2198
  }),
1319
- b(a, {
2199
+ N(d, {
1320
2200
  class: "title add-custom-event-button bind-action-button-item",
1321
- onClick: n[0] || (n[0] = (m) => e.handleToggleAddEventDialog(!0))
2201
+ onClick: e[0] || (e[0] = (v) => t.handleToggleAddEventDialog(!0))
1322
2202
  }, {
1323
- default: I(() => [
1324
- b(s, {
2203
+ default: J(() => [
2204
+ N(c, {
1325
2205
  name: "add",
1326
2206
  class: "custom-event-button-icon"
1327
2207
  }),
1328
- n[3] || (n[3] = v("span", { class: "custom-event-button-text" }, "添加新事件", -1))
2208
+ e[3] || (e[3] = _("span", { class: "custom-event-button-text" }, "添加新事件", -1))
1329
2209
  ]),
1330
2210
  _: 1,
1331
2211
  __: [3]
1332
2212
  })
1333
2213
  ]),
1334
- qe(v("ul", Pt, [
1335
- (B(!0), J(Oe, null, ze(e.state.bindActions, (m) => {
1336
- var f, x;
1337
- return B(), J("li", {
1338
- key: m.eventName
2214
+ Et(_("ul", gn, [
2215
+ (U(!0), re(at, null, pt(t.state.bindActions, (v) => {
2216
+ var w, S;
2217
+ return U(), re("li", {
2218
+ key: v.eventName
1339
2219
  }, [
1340
- v("div", Mt, [
1341
- v("div", {
2220
+ _("div", pn, [
2221
+ _("div", {
1342
2222
  class: "binding-name",
1343
- onClick: (D) => e.openActionDialog(m)
2223
+ onClick: (A) => t.openActionDialog(v)
1344
2224
  }, [
1345
- v("div", null, [
1346
- ke(Y(m.eventName), 1),
1347
- v("span", null, Y((x = (f = e.renderEventList[m.eventName]) == null ? void 0 : f.label) == null ? void 0 : x[e.locale]), 1)
2225
+ _("div", null, [
2226
+ Fe(me(v.eventName), 1),
2227
+ _("span", null, me((S = (w = t.renderEventList[v.eventName]) == null ? void 0 : w.label) == null ? void 0 : S[t.locale]), 1)
1348
2228
  ]),
1349
- v("div", {
1350
- class: Ne({ linked: m.linked })
1351
- }, Y(m.linkedEventName), 3),
1352
- v("span", Lt, Y(m.ref), 1)
1353
- ], 8, wt),
1354
- v("div", Ot, [
1355
- e.isBlock ? (B(), te(u, {
2229
+ _("div", {
2230
+ class: He({ linked: v.linked })
2231
+ }, me(v.linkedEventName), 3),
2232
+ _("span", vn, me(v.ref), 1)
2233
+ ], 8, mn),
2234
+ _("div", bn, [
2235
+ t.isBlock ? (U(), Ce(b, {
1356
2236
  key: 0,
1357
- data: m
1358
- }, null, 8, ["data"])) : Se("", !0),
1359
- b(t, {
2237
+ data: v
2238
+ }, null, 8, ["data"])) : dt("", !0),
2239
+ N(s, {
1360
2240
  name: "plugin-icon-page-schema",
1361
2241
  tips: "定位到代码",
1362
2242
  placement: "top",
1363
2243
  hoverBgColor: !1,
1364
- onClick: (D) => e.openCodePanel(m)
2244
+ onClick: (A) => t.openCodePanel(v)
1365
2245
  }, null, 8, ["onClick"]),
1366
- b(t, {
2246
+ N(s, {
1367
2247
  name: "setting",
1368
2248
  hoverBgColor: !1,
1369
- onClick: (D) => e.openActionDialog(m, !1)
2249
+ onClick: (A) => t.openActionDialog(v, !1)
1370
2250
  }, null, 8, ["onClick"]),
1371
- b(t, {
2251
+ N(s, {
1372
2252
  name: "delete",
1373
2253
  hoverBgColor: !1,
1374
- onClick: (D) => e.delEvent(m)
2254
+ onClick: (A) => t.delEvent(v)
1375
2255
  }, null, 8, ["onClick"])
1376
2256
  ])
1377
2257
  ])
1378
2258
  ]);
1379
2259
  }), 128))
1380
2260
  ], 512), [
1381
- [Ye, !e.isEmpty]
2261
+ [yt, !t.isEmpty]
1382
2262
  ]),
1383
- qe(v("div", St, [
1384
- v("div", Tt, [
1385
- b(s, {
2263
+ Et(_("div", _n, [
2264
+ _("div", En, [
2265
+ N(c, {
1386
2266
  name: "empty-action",
1387
2267
  class: "empty-action-icon"
1388
2268
  })
1389
2269
  ]),
1390
- n[4] || (n[4] = v("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
2270
+ e[4] || (e[4] = _("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
1391
2271
  ], 512), [
1392
- [Ye, e.isEmpty]
2272
+ [yt, t.isEmpty]
1393
2273
  ])
1394
2274
  ]),
1395
- b(r, {
1396
- eventBinding: e.state.eventBinding
2275
+ N(m, {
2276
+ eventBinding: t.state.eventBinding
1397
2277
  }, null, 8, ["eventBinding"]),
1398
- b(c, {
1399
- visible: e.state.showBindEventDialog,
1400
- componentEvents: e.renderEventList,
1401
- onCloseDialog: n[1] || (n[1] = (m) => e.handleToggleAddEventDialog(!1)),
1402
- onAddEvent: e.handleAddEvent
2278
+ N(g, {
2279
+ visible: t.state.showBindEventDialog,
2280
+ componentEvents: t.renderEventList,
2281
+ onCloseDialog: e[1] || (e[1] = (v) => t.handleToggleAddEventDialog(!1)),
2282
+ onAddEvent: t.handleAddEvent
1403
2283
  }, null, 8, ["visible", "componentEvents", "onAddEvent"])
1404
2284
  ], 64);
1405
2285
  }
1406
- const jt = /* @__PURE__ */ Ie(At, [["render", Ut], ["__scopeId", "data-v-64f96b67"]]), {
1407
- DEFAULT_LOOP_NAME: F
1408
- } = me, {
1409
- string2Obj: ce
1410
- } = ge, zt = {
2286
+ const Cn = /* @__PURE__ */ We(dn, [["render", yn], ["__scopeId", "data-v-64f96b67"]]), {
2287
+ DEFAULT_LOOP_NAME: ie
2288
+ } = Ae, {
2289
+ string2Obj: Se
2290
+ } = Ie, xn = {
1411
2291
  components: {
1412
- SwitchConfigurator: de,
1413
- TinyTooltip: vt,
1414
- VariableConfigurator: le,
1415
- InputConfigurator: se,
1416
- CodeConfigurator: ae
2292
+ SwitchConfigurator: De,
2293
+ TinyTooltip: Tt,
2294
+ VariableConfigurator: ke,
2295
+ InputConfigurator: we,
2296
+ CodeConfigurator: xe
1417
2297
  },
1418
2298
  inheritAttrs: !1,
1419
2299
  setup() {
1420
2300
  const {
1421
- pageState: d
1422
- } = y(), n = Ve(!1), o = Me(() => {
1423
- var t;
1424
- return ((t = n.value) == null ? void 0 : t.type) === G.JSEXPRESSION;
1425
- }), e = h(() => {
1426
- var t, r;
1427
- return ((r = (t = z().getSchema()) == null ? void 0 : t.loopArgs) == null ? void 0 : r[1]) || F.INDEX;
2301
+ pageState: h
2302
+ } = I(), e = Ye(!1), n = it(() => {
2303
+ var s;
2304
+ return ((s = e.value) == null ? void 0 : s.type) === fe.JSEXPRESSION;
2305
+ }), t = D(() => {
2306
+ var s, m;
2307
+ return ((m = (s = oe().getSchema()) == null ? void 0 : s.loopArgs) == null ? void 0 : m[1]) || ie.INDEX;
1428
2308
  }, {
1429
2309
  metaData: {
1430
2310
  id: "engine.setting.event.AdvanceConfig.getIndexName"
1431
2311
  },
1432
2312
  ctx: () => ({
1433
- pageState: d,
1434
- condition: n,
1435
- isBind: o,
1436
- getIndexName: e,
1437
- state: i,
1438
- setLoopKey: g,
1439
- openEditor: p,
1440
- setConfig: a,
1441
- setLoopIndex: l,
1442
- setLoop: s,
1443
- setLoopItem: u,
1444
- CodeConfigurator: ae,
1445
- InputConfigurator: se,
1446
- SwitchConfigurator: de,
1447
- VariableConfigurator: le,
1448
- useProperties: z,
1449
- useCanvas: y,
1450
- PROP_DATA_TYPE: G,
1451
- constants: me,
1452
- utils: ge,
1453
- DEFAULT_LOOP_NAME: F,
1454
- string2Obj: ce
2313
+ pageState: h,
2314
+ condition: e,
2315
+ isBind: n,
2316
+ getIndexName: t,
2317
+ state: o,
2318
+ setLoopKey: i,
2319
+ openEditor: l,
2320
+ setConfig: d,
2321
+ setLoopIndex: a,
2322
+ setLoop: c,
2323
+ setLoopItem: b,
2324
+ CodeConfigurator: xe,
2325
+ InputConfigurator: we,
2326
+ SwitchConfigurator: De,
2327
+ VariableConfigurator: ke,
2328
+ useProperties: oe,
2329
+ useCanvas: I,
2330
+ PROP_DATA_TYPE: fe,
2331
+ constants: Ae,
2332
+ utils: Ie,
2333
+ DEFAULT_LOOP_NAME: ie,
2334
+ string2Obj: Se
1455
2335
  })
1456
- }), i = we({
2336
+ }), o = rt({
1457
2337
  loopData: {
1458
- type: G.JSEXPRESSION,
2338
+ type: fe.JSEXPRESSION,
1459
2339
  value: "[]"
1460
2340
  },
1461
2341
  loopItem: "item",
1462
2342
  loopIndex: "index",
1463
- isLoop: Me(() => {
1464
- var t;
1465
- return ((t = i.loopData) == null ? void 0 : t.type) === G.JSEXPRESSION;
2343
+ isLoop: it(() => {
2344
+ var s;
2345
+ return ((s = o.loopData) == null ? void 0 : s.type) === fe.JSEXPRESSION;
1466
2346
  }),
1467
2347
  loopKey: "",
1468
2348
  shouldUpdate: !1
1469
2349
  });
1470
- Ze(() => [d == null ? void 0 : d.currentSchema, i.shouldUpdate], ([t]) => {
1471
- var r, c, m, f;
1472
- n.value = (t == null ? void 0 : t.condition) === void 0 ? !0 : t == null ? void 0 : t.condition, i.loopData = t == null ? void 0 : t.loop, i.loopItem = ((r = t == null ? void 0 : t.loopArgs) == null ? void 0 : r[0]) || "", i.loopIndex = ((c = t == null ? void 0 : t.loopArgs) == null ? void 0 : c[1]) || "", i.loopKey = ((f = (m = t == null ? void 0 : t.props) == null ? void 0 : m.key) == null ? void 0 : f.value) || "";
2350
+ Ct(() => [h == null ? void 0 : h.currentSchema, o.shouldUpdate], ([s]) => {
2351
+ var m, g, v, w;
2352
+ e.value = (s == null ? void 0 : s.condition) === void 0 ? !0 : s == null ? void 0 : s.condition, o.loopData = s == null ? void 0 : s.loop, o.loopItem = ((m = s == null ? void 0 : s.loopArgs) == null ? void 0 : m[0]) || "", o.loopIndex = ((g = s == null ? void 0 : s.loopArgs) == null ? void 0 : g[1]) || "", o.loopKey = ((w = (v = s == null ? void 0 : s.props) == null ? void 0 : v.key) == null ? void 0 : w.value) || "";
1473
2353
  });
1474
- const g = h((t = "") => {
1475
- var D;
1476
- t = t.replace(/\s*/g, "");
2354
+ const i = D((s = "") => {
2355
+ var A;
2356
+ s = s.replace(/\s*/g, "");
1477
2357
  const {
1478
- getSchema: r,
1479
- setProp: c
1480
- } = z(), m = r();
1481
- if (!m)
2358
+ getSchema: m,
2359
+ setProp: g
2360
+ } = oe(), v = m();
2361
+ if (!v)
1482
2362
  return;
1483
- const f = Number(t).toString() !== "NaN";
1484
- let x = (D = m.props) == null ? void 0 : D.key;
1485
- t && !f && (x = {
1486
- type: G.JSEXPRESSION,
1487
- value: t
1488
- }), t || (i.isLoop ? x = {
1489
- type: G.JSEXPRESSION,
1490
- value: e()
1491
- } : x = ""), c("key", x);
2363
+ const w = Number(s).toString() !== "NaN";
2364
+ let S = (A = v.props) == null ? void 0 : A.key;
2365
+ s && !w && (S = {
2366
+ type: fe.JSEXPRESSION,
2367
+ value: s
2368
+ }), s || (o.isLoop ? S = {
2369
+ type: fe.JSEXPRESSION,
2370
+ value: t()
2371
+ } : S = ""), g("key", S);
1492
2372
  }, {
1493
2373
  metaData: {
1494
2374
  id: "engine.setting.event.AdvanceConfig.setLoopKey"
1495
2375
  },
1496
2376
  ctx: () => ({
1497
- pageState: d,
1498
- condition: n,
1499
- isBind: o,
1500
- getIndexName: e,
1501
- state: i,
1502
- setLoopKey: g,
1503
- openEditor: p,
1504
- setConfig: a,
1505
- setLoopIndex: l,
1506
- setLoop: s,
1507
- setLoopItem: u,
1508
- CodeConfigurator: ae,
1509
- InputConfigurator: se,
1510
- SwitchConfigurator: de,
1511
- VariableConfigurator: le,
1512
- useProperties: z,
1513
- useCanvas: y,
1514
- PROP_DATA_TYPE: G,
1515
- constants: me,
1516
- utils: ge,
1517
- DEFAULT_LOOP_NAME: F,
1518
- string2Obj: ce
2377
+ pageState: h,
2378
+ condition: e,
2379
+ isBind: n,
2380
+ getIndexName: t,
2381
+ state: o,
2382
+ setLoopKey: i,
2383
+ openEditor: l,
2384
+ setConfig: d,
2385
+ setLoopIndex: a,
2386
+ setLoop: c,
2387
+ setLoopItem: b,
2388
+ CodeConfigurator: xe,
2389
+ InputConfigurator: we,
2390
+ SwitchConfigurator: De,
2391
+ VariableConfigurator: ke,
2392
+ useProperties: oe,
2393
+ useCanvas: I,
2394
+ PROP_DATA_TYPE: fe,
2395
+ constants: Ae,
2396
+ utils: Ie,
2397
+ DEFAULT_LOOP_NAME: ie,
2398
+ string2Obj: Se
1519
2399
  })
1520
2400
  });
1521
- Ze([() => i.isLoop, () => i.loopIndex], () => {
1522
- !i.loopKey && i.isLoop && g(e()), i.isLoop || g("");
2401
+ Ct([() => o.isLoop, () => o.loopIndex], () => {
2402
+ !o.loopKey && o.isLoop && i(t()), o.isLoop || i("");
1523
2403
  });
1524
- const p = h(() => {
1525
- var t;
1526
- i.loopData = (t = z().getSchema()) == null ? void 0 : t.loop;
2404
+ const l = D(() => {
2405
+ var s;
2406
+ o.loopData = (s = oe().getSchema()) == null ? void 0 : s.loop;
1527
2407
  }, {
1528
2408
  metaData: {
1529
2409
  id: "engine.setting.event.AdvanceConfig.openEditor"
1530
2410
  },
1531
2411
  ctx: () => ({
1532
- pageState: d,
1533
- condition: n,
1534
- isBind: o,
1535
- getIndexName: e,
1536
- state: i,
1537
- setLoopKey: g,
1538
- openEditor: p,
1539
- setConfig: a,
1540
- setLoopIndex: l,
1541
- setLoop: s,
1542
- setLoopItem: u,
1543
- CodeConfigurator: ae,
1544
- InputConfigurator: se,
1545
- SwitchConfigurator: de,
1546
- VariableConfigurator: le,
1547
- useProperties: z,
1548
- useCanvas: y,
1549
- PROP_DATA_TYPE: G,
1550
- constants: me,
1551
- utils: ge,
1552
- DEFAULT_LOOP_NAME: F,
1553
- string2Obj: ce
2412
+ pageState: h,
2413
+ condition: e,
2414
+ isBind: n,
2415
+ getIndexName: t,
2416
+ state: o,
2417
+ setLoopKey: i,
2418
+ openEditor: l,
2419
+ setConfig: d,
2420
+ setLoopIndex: a,
2421
+ setLoop: c,
2422
+ setLoopItem: b,
2423
+ CodeConfigurator: xe,
2424
+ InputConfigurator: we,
2425
+ SwitchConfigurator: De,
2426
+ VariableConfigurator: ke,
2427
+ useProperties: oe,
2428
+ useCanvas: I,
2429
+ PROP_DATA_TYPE: fe,
2430
+ constants: Ae,
2431
+ utils: Ie,
2432
+ DEFAULT_LOOP_NAME: ie,
2433
+ string2Obj: Se
1554
2434
  })
1555
- }), a = h((t) => {
2435
+ }), d = D((s) => {
1556
2436
  const {
1557
- getSchema: r
1558
- } = z(), c = r();
1559
- if (!c)
2437
+ getSchema: m
2438
+ } = oe(), g = m();
2439
+ if (!g)
1560
2440
  return;
1561
2441
  const {
1562
- operateNode: m
1563
- } = y();
1564
- if (t === !1 || t != null && t.type)
1565
- m({
2442
+ operateNode: v
2443
+ } = I();
2444
+ if (s === !1 || s != null && s.type)
2445
+ v({
1566
2446
  type: "updateAttributes",
1567
- id: c.id,
2447
+ id: g.id,
1568
2448
  value: {
1569
- condition: t
2449
+ condition: s
1570
2450
  }
1571
2451
  });
1572
2452
  else {
1573
2453
  const {
1574
- condition: f,
1575
- children: x,
1576
- ...D
1577
- } = c;
1578
- m({
2454
+ condition: w,
2455
+ children: S,
2456
+ ...A
2457
+ } = g;
2458
+ v({
1579
2459
  type: "updateAttributes",
1580
- id: c.id,
2460
+ id: g.id,
1581
2461
  value: {
1582
- ...D
2462
+ ...A
1583
2463
  },
1584
2464
  overwrite: !0
1585
2465
  });
1586
2466
  }
1587
- y().canvasApi.value.updateRect(), n.value = t;
2467
+ I().canvasApi.value.updateRect(), e.value = s;
1588
2468
  }, {
1589
2469
  metaData: {
1590
2470
  id: "engine.setting.event.AdvanceConfig.setConfig"
1591
2471
  },
1592
2472
  ctx: () => ({
1593
- pageState: d,
1594
- condition: n,
1595
- isBind: o,
1596
- getIndexName: e,
1597
- state: i,
1598
- setLoopKey: g,
1599
- openEditor: p,
1600
- setConfig: a,
1601
- setLoopIndex: l,
1602
- setLoop: s,
1603
- setLoopItem: u,
1604
- CodeConfigurator: ae,
1605
- InputConfigurator: se,
1606
- SwitchConfigurator: de,
1607
- VariableConfigurator: le,
1608
- useProperties: z,
1609
- useCanvas: y,
1610
- PROP_DATA_TYPE: G,
1611
- constants: me,
1612
- utils: ge,
1613
- DEFAULT_LOOP_NAME: F,
1614
- string2Obj: ce
2473
+ pageState: h,
2474
+ condition: e,
2475
+ isBind: n,
2476
+ getIndexName: t,
2477
+ state: o,
2478
+ setLoopKey: i,
2479
+ openEditor: l,
2480
+ setConfig: d,
2481
+ setLoopIndex: a,
2482
+ setLoop: c,
2483
+ setLoopItem: b,
2484
+ CodeConfigurator: xe,
2485
+ InputConfigurator: we,
2486
+ SwitchConfigurator: De,
2487
+ VariableConfigurator: ke,
2488
+ useProperties: oe,
2489
+ useCanvas: I,
2490
+ PROP_DATA_TYPE: fe,
2491
+ constants: Ae,
2492
+ utils: Ie,
2493
+ DEFAULT_LOOP_NAME: ie,
2494
+ string2Obj: Se
1615
2495
  })
1616
- }), l = h((t) => {
1617
- const r = z().getSchema();
1618
- let c = r.loopArgs;
2496
+ }), a = D((s) => {
2497
+ const m = oe().getSchema();
2498
+ let g = m.loopArgs;
1619
2499
  const {
1620
- operateNode: m
1621
- } = y();
1622
- c ? c[1] = t || F.INDEX : c = [F.ITEM, t], m({
2500
+ operateNode: v
2501
+ } = I();
2502
+ g ? g[1] = s || ie.INDEX : g = [ie.ITEM, s], v({
1623
2503
  type: "updateAttributes",
1624
- id: r.id,
2504
+ id: m.id,
1625
2505
  value: {
1626
- loopArgs: c
2506
+ loopArgs: g
1627
2507
  }
1628
2508
  });
1629
2509
  }, {
@@ -1631,99 +2511,99 @@ const jt = /* @__PURE__ */ Ie(At, [["render", Ut], ["__scopeId", "data-v-64f96b6
1631
2511
  id: "engine.setting.event.AdvanceConfig.setLoopIndex"
1632
2512
  },
1633
2513
  ctx: () => ({
1634
- pageState: d,
1635
- condition: n,
1636
- isBind: o,
1637
- getIndexName: e,
1638
- state: i,
1639
- setLoopKey: g,
1640
- openEditor: p,
1641
- setConfig: a,
1642
- setLoopIndex: l,
1643
- setLoop: s,
1644
- setLoopItem: u,
1645
- CodeConfigurator: ae,
1646
- InputConfigurator: se,
1647
- SwitchConfigurator: de,
1648
- VariableConfigurator: le,
1649
- useProperties: z,
1650
- useCanvas: y,
1651
- PROP_DATA_TYPE: G,
1652
- constants: me,
1653
- utils: ge,
1654
- DEFAULT_LOOP_NAME: F,
1655
- string2Obj: ce
2514
+ pageState: h,
2515
+ condition: e,
2516
+ isBind: n,
2517
+ getIndexName: t,
2518
+ state: o,
2519
+ setLoopKey: i,
2520
+ openEditor: l,
2521
+ setConfig: d,
2522
+ setLoopIndex: a,
2523
+ setLoop: c,
2524
+ setLoopItem: b,
2525
+ CodeConfigurator: xe,
2526
+ InputConfigurator: we,
2527
+ SwitchConfigurator: De,
2528
+ VariableConfigurator: ke,
2529
+ useProperties: oe,
2530
+ useCanvas: I,
2531
+ PROP_DATA_TYPE: fe,
2532
+ constants: Ae,
2533
+ utils: Ie,
2534
+ DEFAULT_LOOP_NAME: ie,
2535
+ string2Obj: Se
1656
2536
  })
1657
- }), s = h((t) => {
2537
+ }), c = D((s) => {
1658
2538
  const {
1659
- operateNode: r
1660
- } = y(), {
1661
- getSchema: c
1662
- } = z(), m = c();
1663
- if (t) {
1664
- const f = t != null && t.type ? t : ce(t);
1665
- r({
2539
+ operateNode: m
2540
+ } = I(), {
2541
+ getSchema: g
2542
+ } = oe(), v = g();
2543
+ if (s) {
2544
+ const w = s != null && s.type ? s : Se(s);
2545
+ m({
1666
2546
  type: "updateAttributes",
1667
- id: m.id,
2547
+ id: v.id,
1668
2548
  value: {
1669
- loop: f
2549
+ loop: w
1670
2550
  }
1671
- }), l(F.INDEX);
2551
+ }), a(ie.INDEX);
1672
2552
  } else {
1673
- g();
2553
+ i();
1674
2554
  const {
1675
- loop: f,
1676
- loopArgs: x,
1677
- children: D,
1678
- ...N
1679
- } = m;
1680
- r({
2555
+ loop: w,
2556
+ loopArgs: S,
2557
+ children: A,
2558
+ ...y
2559
+ } = v;
2560
+ m({
1681
2561
  type: "updateAttributes",
1682
- id: m.id,
1683
- value: N,
2562
+ id: v.id,
2563
+ value: y,
1684
2564
  overwrite: !0
1685
2565
  });
1686
2566
  }
1687
- i.shouldUpdate = !i.shouldUpdate;
2567
+ o.shouldUpdate = !o.shouldUpdate;
1688
2568
  }, {
1689
2569
  metaData: {
1690
2570
  id: "engine.setting.event.AdvanceConfig.setLoop"
1691
2571
  },
1692
2572
  ctx: () => ({
1693
- pageState: d,
1694
- condition: n,
1695
- isBind: o,
1696
- getIndexName: e,
1697
- state: i,
1698
- setLoopKey: g,
1699
- openEditor: p,
1700
- setConfig: a,
1701
- setLoopIndex: l,
1702
- setLoop: s,
1703
- setLoopItem: u,
1704
- CodeConfigurator: ae,
1705
- InputConfigurator: se,
1706
- SwitchConfigurator: de,
1707
- VariableConfigurator: le,
1708
- useProperties: z,
1709
- useCanvas: y,
1710
- PROP_DATA_TYPE: G,
1711
- constants: me,
1712
- utils: ge,
1713
- DEFAULT_LOOP_NAME: F,
1714
- string2Obj: ce
2573
+ pageState: h,
2574
+ condition: e,
2575
+ isBind: n,
2576
+ getIndexName: t,
2577
+ state: o,
2578
+ setLoopKey: i,
2579
+ openEditor: l,
2580
+ setConfig: d,
2581
+ setLoopIndex: a,
2582
+ setLoop: c,
2583
+ setLoopItem: b,
2584
+ CodeConfigurator: xe,
2585
+ InputConfigurator: we,
2586
+ SwitchConfigurator: De,
2587
+ VariableConfigurator: ke,
2588
+ useProperties: oe,
2589
+ useCanvas: I,
2590
+ PROP_DATA_TYPE: fe,
2591
+ constants: Ae,
2592
+ utils: Ie,
2593
+ DEFAULT_LOOP_NAME: ie,
2594
+ string2Obj: Se
1715
2595
  })
1716
- }), u = h((t) => {
1717
- const r = z().getSchema();
1718
- let c = r.loopArgs;
2596
+ }), b = D((s) => {
2597
+ const m = oe().getSchema();
2598
+ let g = m.loopArgs;
1719
2599
  const {
1720
- operateNode: m
1721
- } = y();
1722
- c ? c[0] = t || F.ITEM : c = [t, F.INDEX], m({
2600
+ operateNode: v
2601
+ } = I();
2602
+ g ? g[0] = s || ie.ITEM : g = [s, ie.INDEX], v({
1723
2603
  type: "updateAttributes",
1724
- id: r.id,
2604
+ id: m.id,
1725
2605
  value: {
1726
- loopArgs: c
2606
+ loopArgs: g
1727
2607
  }
1728
2608
  });
1729
2609
  }, {
@@ -1731,139 +2611,139 @@ const jt = /* @__PURE__ */ Ie(At, [["render", Ut], ["__scopeId", "data-v-64f96b6
1731
2611
  id: "engine.setting.event.AdvanceConfig.setLoopItem"
1732
2612
  },
1733
2613
  ctx: () => ({
1734
- pageState: d,
1735
- condition: n,
1736
- isBind: o,
1737
- getIndexName: e,
1738
- state: i,
1739
- setLoopKey: g,
1740
- openEditor: p,
1741
- setConfig: a,
1742
- setLoopIndex: l,
1743
- setLoop: s,
1744
- setLoopItem: u,
1745
- CodeConfigurator: ae,
1746
- InputConfigurator: se,
1747
- SwitchConfigurator: de,
1748
- VariableConfigurator: le,
1749
- useProperties: z,
1750
- useCanvas: y,
1751
- PROP_DATA_TYPE: G,
1752
- constants: me,
1753
- utils: ge,
1754
- DEFAULT_LOOP_NAME: F,
1755
- string2Obj: ce
2614
+ pageState: h,
2615
+ condition: e,
2616
+ isBind: n,
2617
+ getIndexName: t,
2618
+ state: o,
2619
+ setLoopKey: i,
2620
+ openEditor: l,
2621
+ setConfig: d,
2622
+ setLoopIndex: a,
2623
+ setLoop: c,
2624
+ setLoopItem: b,
2625
+ CodeConfigurator: xe,
2626
+ InputConfigurator: we,
2627
+ SwitchConfigurator: De,
2628
+ VariableConfigurator: ke,
2629
+ useProperties: oe,
2630
+ useCanvas: I,
2631
+ PROP_DATA_TYPE: fe,
2632
+ constants: Ae,
2633
+ utils: Ie,
2634
+ DEFAULT_LOOP_NAME: ie,
2635
+ string2Obj: Se
1756
2636
  })
1757
2637
  });
1758
2638
  return {
1759
- condition: n,
1760
- setConfig: a,
1761
- isBind: o,
1762
- state: i,
1763
- setLoop: s,
1764
- setLoopItem: u,
1765
- DEFAULT_LOOP_NAME: F,
1766
- openEditor: p,
1767
- setLoopIndex: l,
1768
- setLoopKey: g,
1769
- getIndexName: e
2639
+ condition: e,
2640
+ setConfig: d,
2641
+ isBind: n,
2642
+ state: o,
2643
+ setLoop: c,
2644
+ setLoopItem: b,
2645
+ DEFAULT_LOOP_NAME: ie,
2646
+ openEditor: l,
2647
+ setLoopIndex: a,
2648
+ setLoopKey: i,
2649
+ getIndexName: t
1770
2650
  };
1771
2651
  }
1772
- }, Ft = { class: "advanced-config-container" }, Rt = { class: "advnce-config" }, $t = { class: "advanced-config-form-item" }, Jt = ["title"], Xt = { class: "advnce-config loop-data-item" }, Kt = { class: "advanced-config-form-item" }, Ht = ["title"], Gt = { class: "advnce-config" }, qt = { class: "advanced-config-form-item" }, Yt = { class: "advnce-config" }, Zt = { class: "advanced-config-form-item" }, Wt = { class: "advnce-config" }, Qt = { class: "advanced-config-form-item" };
1773
- function en(d, n, o, e, i, g) {
1774
- var t, r;
1775
- const p = M("switch-configurator"), a = M("variable-configurator"), l = M("code-configurator"), s = M("input-configurator"), u = M("tiny-tooltip");
1776
- return B(), J("div", Ft, [
1777
- v("div", Rt, [
1778
- n[6] || (n[6] = v("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
1779
- v("div", $t, [
1780
- e.isBind ? (B(), J("div", {
2652
+ }, wn = { class: "advanced-config-container" }, kn = { class: "advnce-config" }, Dn = { class: "advanced-config-form-item" }, Sn = ["title"], Nn = { class: "advnce-config loop-data-item" }, An = { class: "advanced-config-form-item" }, In = ["title"], Ln = { class: "advnce-config" }, Bn = { class: "advanced-config-form-item" }, Pn = { class: "advnce-config" }, On = { class: "advanced-config-form-item" }, Vn = { class: "advnce-config" }, Mn = { class: "advanced-config-form-item" };
2653
+ function Rn(h, e, n, t, o, i) {
2654
+ var s, m;
2655
+ const l = X("switch-configurator"), d = X("variable-configurator"), a = X("code-configurator"), c = X("input-configurator"), b = X("tiny-tooltip");
2656
+ return U(), re("div", wn, [
2657
+ _("div", kn, [
2658
+ e[6] || (e[6] = _("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
2659
+ _("div", Dn, [
2660
+ t.isBind ? (U(), re("div", {
1781
2661
  key: 1,
1782
2662
  class: "binding-state text-ellipsis-multiple",
1783
- title: e.condition.value
1784
- }, " 已绑定:" + Y(e.condition.value), 9, Jt)) : (B(), te(p, {
2663
+ title: t.condition.value
2664
+ }, " 已绑定:" + me(t.condition.value), 9, Sn)) : (U(), Ce(l, {
1785
2665
  key: 0,
1786
- modelValue: e.condition,
1787
- "onUpdate:modelValue": e.setConfig
2666
+ modelValue: t.condition,
2667
+ "onUpdate:modelValue": t.setConfig
1788
2668
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
1789
- b(a, {
1790
- modelValue: e.condition,
2669
+ N(d, {
2670
+ modelValue: t.condition,
1791
2671
  "onUpdate:modelValue": [
1792
- n[0] || (n[0] = (c) => e.condition = c),
1793
- e.setConfig
2672
+ e[0] || (e[0] = (g) => t.condition = g),
2673
+ t.setConfig
1794
2674
  ],
1795
2675
  name: "advance"
1796
2676
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
1797
2677
  ])
1798
2678
  ]),
1799
- v("div", Xt, [
1800
- n[7] || (n[7] = v("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
1801
- v("div", Kt, [
1802
- e.state.isLoop ? (B(), J("div", {
2679
+ _("div", Nn, [
2680
+ e[7] || (e[7] = _("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
2681
+ _("div", An, [
2682
+ t.state.isLoop ? (U(), re("div", {
1803
2683
  key: 1,
1804
2684
  class: "binding-state text-ellipsis-multiple",
1805
- title: (t = e.state.loopData) == null ? void 0 : t.value
1806
- }, " 已绑定:" + Y((r = e.state.loopData) == null ? void 0 : r.value), 9, Ht)) : (B(), te(l, {
2685
+ title: (s = t.state.loopData) == null ? void 0 : s.value
2686
+ }, " 已绑定:" + me((m = t.state.loopData) == null ? void 0 : m.value), 9, In)) : (U(), Ce(a, {
1807
2687
  key: 0,
1808
- modelValue: e.state.loopData,
2688
+ modelValue: t.state.loopData,
1809
2689
  "onUpdate:modelValue": [
1810
- n[1] || (n[1] = (c) => e.state.loopData = c),
1811
- e.setLoop
2690
+ e[1] || (e[1] = (g) => t.state.loopData = g),
2691
+ t.setLoop
1812
2692
  ],
1813
2693
  "data-type": "JSExpression",
1814
- onOpen: e.openEditor
2694
+ onOpen: t.openEditor
1815
2695
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onOpen"])),
1816
- b(a, {
1817
- modelValue: e.state.loopData,
2696
+ N(d, {
2697
+ modelValue: t.state.loopData,
1818
2698
  "onUpdate:modelValue": [
1819
- n[2] || (n[2] = (c) => e.state.loopData = c),
1820
- e.setLoop
2699
+ e[2] || (e[2] = (g) => t.state.loopData = g),
2700
+ t.setLoop
1821
2701
  ],
1822
2702
  name: "advance"
1823
2703
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
1824
2704
  ])
1825
2705
  ]),
1826
- v("div", Gt, [
1827
- n[8] || (n[8] = v("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
1828
- v("div", qt, [
1829
- b(s, {
1830
- modelValue: e.state.loopItem,
2706
+ _("div", Ln, [
2707
+ e[8] || (e[8] = _("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
2708
+ _("div", Bn, [
2709
+ N(c, {
2710
+ modelValue: t.state.loopItem,
1831
2711
  "onUpdate:modelValue": [
1832
- n[3] || (n[3] = (c) => e.state.loopItem = c),
1833
- e.setLoopItem
2712
+ e[3] || (e[3] = (g) => t.state.loopItem = g),
2713
+ t.setLoopItem
1834
2714
  ],
1835
- placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
2715
+ placeholder: `默认值为:${t.DEFAULT_LOOP_NAME.ITEM}`
1836
2716
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
1837
2717
  ])
1838
2718
  ]),
1839
- v("div", Yt, [
1840
- n[9] || (n[9] = v("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
1841
- v("div", Zt, [
1842
- b(s, {
1843
- modelValue: e.state.loopIndex,
2719
+ _("div", Pn, [
2720
+ e[9] || (e[9] = _("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
2721
+ _("div", On, [
2722
+ N(c, {
2723
+ modelValue: t.state.loopIndex,
1844
2724
  "onUpdate:modelValue": [
1845
- n[4] || (n[4] = (c) => e.state.loopIndex = c),
1846
- e.setLoopIndex
2725
+ e[4] || (e[4] = (g) => t.state.loopIndex = g),
2726
+ t.setLoopIndex
1847
2727
  ],
1848
- placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
2728
+ placeholder: `默认值为:${t.DEFAULT_LOOP_NAME.INDEX}`
1849
2729
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
1850
2730
  ])
1851
2731
  ]),
1852
- v("div", Wt, [
1853
- n[10] || (n[10] = v("label", { class: "text-ellipsis-multiple" }, "key", -1)),
1854
- v("div", Qt, [
1855
- b(u, {
2732
+ _("div", Vn, [
2733
+ e[10] || (e[10] = _("label", { class: "text-ellipsis-multiple" }, "key", -1)),
2734
+ _("div", Mn, [
2735
+ N(b, {
1856
2736
  content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存",
1857
2737
  effect: "light"
1858
2738
  }, {
1859
- default: I(() => [
1860
- b(s, {
1861
- modelValue: e.state.loopKey,
2739
+ default: J(() => [
2740
+ N(c, {
2741
+ modelValue: t.state.loopKey,
1862
2742
  "onUpdate:modelValue": [
1863
- n[5] || (n[5] = (c) => e.state.loopKey = c),
1864
- e.setLoopKey
2743
+ e[5] || (e[5] = (g) => t.state.loopKey = g),
2744
+ t.setLoopKey
1865
2745
  ],
1866
- placeholder: `默认为索引名:${e.getIndexName()}`
2746
+ placeholder: `默认为索引名:${t.getIndexName()}`
1867
2747
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
1868
2748
  ]),
1869
2749
  _: 1
@@ -1872,46 +2752,46 @@ function en(d, n, o, e, i, g) {
1872
2752
  ])
1873
2753
  ]);
1874
2754
  }
1875
- const tn = /* @__PURE__ */ Ie(zt, [["render", en], ["__scopeId", "data-v-275ffc6c"]]), nn = {
2755
+ const Tn = /* @__PURE__ */ We(xn, [["render", Rn], ["__scopeId", "data-v-275ffc6c"]]), Un = {
1876
2756
  __name: "Main",
1877
2757
  props: {
1878
2758
  fixedPanels: Array
1879
2759
  },
1880
2760
  emits: [],
1881
- setup(d, { emit: n }) {
1882
- const o = Ve(["bindEvent", "advancedConfig"]), {
1883
- PLUGIN_NAME: e
1884
- } = V(), g = we({
1885
- emitEvent: n
2761
+ setup(h, { emit: e }) {
2762
+ const n = Ye(["bindEvent", "advancedConfig"]), {
2763
+ PLUGIN_NAME: t
2764
+ } = z(), i = rt({
2765
+ emitEvent: e
1886
2766
  });
1887
- return tt("panelState", g), (p, a) => (B(), te(S(ht), {
2767
+ return St("panelState", i), (l, d) => (U(), Ce(Z(zt), {
1888
2768
  title: "高级",
1889
- "fixed-panels": d.fixedPanels,
1890
- "fixed-name": S(e).Event,
2769
+ "fixed-panels": h.fixedPanels,
2770
+ "fixed-name": Z(t).Event,
1891
2771
  "header-margin-bottom": 0,
1892
- onClose: a[1] || (a[1] = (l) => p.$emit("close"))
2772
+ onClose: d[1] || (d[1] = (a) => l.$emit("close"))
1893
2773
  }, {
1894
- content: I(() => [
1895
- b(S(ut), {
1896
- modelValue: o.value,
1897
- "onUpdate:modelValue": a[0] || (a[0] = (l) => o.value = l)
2774
+ content: J(() => [
2775
+ N(Z(Ut), {
2776
+ modelValue: n.value,
2777
+ "onUpdate:modelValue": d[0] || (d[0] = (a) => n.value = a)
1898
2778
  }, {
1899
- default: I(() => [
1900
- b(S(Qe), {
2779
+ default: J(() => [
2780
+ N(Z(wt), {
1901
2781
  title: "事件绑定",
1902
2782
  name: "bindEvent"
1903
2783
  }, {
1904
- default: I(() => [
1905
- b(jt)
2784
+ default: J(() => [
2785
+ N(Cn)
1906
2786
  ]),
1907
2787
  _: 1
1908
2788
  }),
1909
- b(S(Qe), {
2789
+ N(Z(wt), {
1910
2790
  title: "高级配置",
1911
2791
  name: "advancedConfig"
1912
2792
  }, {
1913
- default: I(() => [
1914
- b(tn)
2793
+ default: J(() => [
2794
+ N(Tn)
1915
2795
  ]),
1916
2796
  _: 1
1917
2797
  })
@@ -1922,222 +2802,222 @@ const tn = /* @__PURE__ */ Ie(zt, [["render", en], ["__scopeId", "data-v-275ffc6
1922
2802
  _: 1
1923
2803
  }, 8, ["fixed-panels", "fixed-name"]));
1924
2804
  }
1925
- }, ee = "newMethod", je = /[^0-9a-zA-Z_$]/, Be = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, re = {
2805
+ }, ye = "newMethod", gt = /[^0-9a-zA-Z_$]/, Ke = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, Ne = {
1926
2806
  default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
1927
2807
  exist: "方法名称已存在",
1928
2808
  ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
1929
2809
  empty: "方法名称不能为空"
1930
- }, on = {
2810
+ }, jn = {
1931
2811
  components: {
1932
- MonacoEditor: Ae,
1933
- TinyInput: Fe,
1934
- TinyCheckbox: ft
2812
+ MonacoEditor: Xe,
2813
+ TinyInput: mt,
2814
+ TinyCheckbox: jt
1935
2815
  },
1936
2816
  props: {
1937
2817
  dialogVisible: Boolean
1938
2818
  },
1939
2819
  setup() {
1940
2820
  const {
1941
- getMethodNameList: d
1942
- } = k(C.Page), n = ot("context"), o = {
2821
+ getMethodNameList: h
2822
+ } = V(O.Page), e = At("context"), n = {
1943
2823
  language: "json",
1944
2824
  lineNumbers: !1,
1945
2825
  minimap: {
1946
2826
  enabled: !1
1947
2827
  }
1948
- }, e = h((l) => {
1949
- n.editorContent = l;
2828
+ }, t = D((a) => {
2829
+ e.editorContent = a;
1950
2830
  }, {
1951
2831
  metaData: {
1952
2832
  id: "engine.setting.event.BindEventsDialogContent.editorContentChange"
1953
2833
  },
1954
2834
  ctx: () => ({
1955
- getMethodNameList: d,
1956
- context: n,
1957
- editorOptions: o,
1958
- editorContentChange: e,
1959
- validMethodNameEmpty: i,
1960
- validMethodNameExist: g,
1961
- invalidMethodName: p,
1962
- change: a,
1963
- VueMonaco: Ae,
1964
- getMetaApi: k,
1965
- META_APP: C,
1966
- METHOD_TIPS_MAP: re,
1967
- NEW_METHOD_TYPE: ee,
1968
- VALID_VARNAME_RE: Be
2835
+ getMethodNameList: h,
2836
+ context: e,
2837
+ editorOptions: n,
2838
+ editorContentChange: t,
2839
+ validMethodNameEmpty: o,
2840
+ validMethodNameExist: i,
2841
+ invalidMethodName: l,
2842
+ change: d,
2843
+ VueMonaco: Xe,
2844
+ getMetaApi: V,
2845
+ META_APP: O,
2846
+ METHOD_TIPS_MAP: Ne,
2847
+ NEW_METHOD_TYPE: ye,
2848
+ VALID_VARNAME_RE: Ke
1969
2849
  })
1970
- }), i = h((l) => !l, {
2850
+ }), o = D((a) => !a, {
1971
2851
  metaData: {
1972
2852
  id: "engine.setting.event.BindEventsDialogContent.validMethodNameEmpty"
1973
2853
  },
1974
2854
  ctx: () => ({
1975
- getMethodNameList: d,
1976
- context: n,
1977
- editorOptions: o,
1978
- editorContentChange: e,
1979
- validMethodNameEmpty: i,
1980
- validMethodNameExist: g,
1981
- invalidMethodName: p,
1982
- change: a,
1983
- VueMonaco: Ae,
1984
- getMetaApi: k,
1985
- META_APP: C,
1986
- METHOD_TIPS_MAP: re,
1987
- NEW_METHOD_TYPE: ee,
1988
- VALID_VARNAME_RE: Be
2855
+ getMethodNameList: h,
2856
+ context: e,
2857
+ editorOptions: n,
2858
+ editorContentChange: t,
2859
+ validMethodNameEmpty: o,
2860
+ validMethodNameExist: i,
2861
+ invalidMethodName: l,
2862
+ change: d,
2863
+ VueMonaco: Xe,
2864
+ getMetaApi: V,
2865
+ META_APP: O,
2866
+ METHOD_TIPS_MAP: Ne,
2867
+ NEW_METHOD_TYPE: ye,
2868
+ VALID_VARNAME_RE: Ke
1989
2869
  })
1990
- }), g = h((l) => d == null ? void 0 : d().includes(l), {
2870
+ }), i = D((a) => h == null ? void 0 : h().includes(a), {
1991
2871
  metaData: {
1992
2872
  id: "engine.setting.event.BindEventsDialogContent.validMethodNameExist"
1993
2873
  },
1994
2874
  ctx: () => ({
1995
- getMethodNameList: d,
1996
- context: n,
1997
- editorOptions: o,
1998
- editorContentChange: e,
1999
- validMethodNameEmpty: i,
2000
- validMethodNameExist: g,
2001
- invalidMethodName: p,
2002
- change: a,
2003
- VueMonaco: Ae,
2004
- getMetaApi: k,
2005
- META_APP: C,
2006
- METHOD_TIPS_MAP: re,
2007
- NEW_METHOD_TYPE: ee,
2008
- VALID_VARNAME_RE: Be
2875
+ getMethodNameList: h,
2876
+ context: e,
2877
+ editorOptions: n,
2878
+ editorContentChange: t,
2879
+ validMethodNameEmpty: o,
2880
+ validMethodNameExist: i,
2881
+ invalidMethodName: l,
2882
+ change: d,
2883
+ VueMonaco: Xe,
2884
+ getMetaApi: V,
2885
+ META_APP: O,
2886
+ METHOD_TIPS_MAP: Ne,
2887
+ NEW_METHOD_TYPE: ye,
2888
+ VALID_VARNAME_RE: Ke
2009
2889
  })
2010
- }), p = h((l) => !Be.test(l), {
2890
+ }), l = D((a) => !Ke.test(a), {
2011
2891
  metaData: {
2012
2892
  id: "engine.setting.event.BindEventsDialogContent.invalidMethodName"
2013
2893
  },
2014
2894
  ctx: () => ({
2015
- getMethodNameList: d,
2016
- context: n,
2017
- editorOptions: o,
2018
- editorContentChange: e,
2019
- validMethodNameEmpty: i,
2020
- validMethodNameExist: g,
2021
- invalidMethodName: p,
2022
- change: a,
2023
- VueMonaco: Ae,
2024
- getMetaApi: k,
2025
- META_APP: C,
2026
- METHOD_TIPS_MAP: re,
2027
- NEW_METHOD_TYPE: ee,
2028
- VALID_VARNAME_RE: Be
2895
+ getMethodNameList: h,
2896
+ context: e,
2897
+ editorOptions: n,
2898
+ editorContentChange: t,
2899
+ validMethodNameEmpty: o,
2900
+ validMethodNameExist: i,
2901
+ invalidMethodName: l,
2902
+ change: d,
2903
+ VueMonaco: Xe,
2904
+ getMetaApi: V,
2905
+ META_APP: O,
2906
+ METHOD_TIPS_MAP: Ne,
2907
+ NEW_METHOD_TYPE: ye,
2908
+ VALID_VARNAME_RE: Ke
2029
2909
  })
2030
- }), a = h((l) => {
2031
- const s = [{
2032
- validator: i,
2033
- tip: re.empty
2910
+ }), d = D((a) => {
2911
+ const c = [{
2912
+ validator: o,
2913
+ tip: Ne.empty
2034
2914
  }, {
2035
- validator: g,
2036
- tip: re.exist
2915
+ validator: i,
2916
+ tip: Ne.exist
2037
2917
  }, {
2038
- validator: p,
2039
- tip: re.ruleInvalid
2918
+ validator: l,
2919
+ tip: Ne.ruleInvalid
2040
2920
  }];
2041
- for (let u = 0; u < s.length; u++) {
2042
- const t = s[u];
2043
- if (t.validator(l)) {
2044
- n.tipError = !0, n.tip = t.tip;
2921
+ for (let b = 0; b < c.length; b++) {
2922
+ const s = c[b];
2923
+ if (s.validator(a)) {
2924
+ e.tipError = !0, e.tip = s.tip;
2045
2925
  return;
2046
2926
  }
2047
2927
  }
2048
- n.tipError = !1, n.tip = "";
2928
+ e.tipError = !1, e.tip = "";
2049
2929
  }, {
2050
2930
  metaData: {
2051
2931
  id: "engine.setting.event.BindEventsDialogContent.change"
2052
2932
  },
2053
2933
  ctx: () => ({
2054
- getMethodNameList: d,
2055
- context: n,
2056
- editorOptions: o,
2057
- editorContentChange: e,
2058
- validMethodNameEmpty: i,
2059
- validMethodNameExist: g,
2060
- invalidMethodName: p,
2061
- change: a,
2062
- VueMonaco: Ae,
2063
- getMetaApi: k,
2064
- META_APP: C,
2065
- METHOD_TIPS_MAP: re,
2066
- NEW_METHOD_TYPE: ee,
2067
- VALID_VARNAME_RE: Be
2934
+ getMethodNameList: h,
2935
+ context: e,
2936
+ editorOptions: n,
2937
+ editorContentChange: t,
2938
+ validMethodNameEmpty: o,
2939
+ validMethodNameExist: i,
2940
+ invalidMethodName: l,
2941
+ change: d,
2942
+ VueMonaco: Xe,
2943
+ getMetaApi: V,
2944
+ META_APP: O,
2945
+ METHOD_TIPS_MAP: Ne,
2946
+ NEW_METHOD_TYPE: ye,
2947
+ VALID_VARNAME_RE: Ke
2068
2948
  })
2069
2949
  });
2070
2950
  return {
2071
- NEW_METHOD_TYPE: ee,
2072
- context: n,
2073
- editorOptions: o,
2074
- change: a,
2075
- editorContentChange: e
2951
+ NEW_METHOD_TYPE: ye,
2952
+ context: e,
2953
+ editorOptions: n,
2954
+ change: d,
2955
+ editorContentChange: t
2076
2956
  };
2077
2957
  }
2078
- }, an = { class: "content-right" }, sn = { class: "new-action-tip" }, ln = { class: "content-right-title" }, dn = { class: "set-params-tip" }, cn = { class: "content-right-monaco" }, rn = {
2958
+ }, $n = { class: "content-right" }, zn = { class: "new-action-tip" }, Jn = { class: "content-right-title" }, Fn = { class: "set-params-tip" }, qn = { class: "content-right-monaco" }, Xn = {
2079
2959
  key: 1,
2080
2960
  class: "mark"
2081
- }, mn = {
2961
+ }, Gn = {
2082
2962
  key: 0,
2083
2963
  class: "params-tip"
2084
2964
  };
2085
- function gn(d, n, o, e, i, g) {
2086
- const p = M("tiny-input"), a = M("tiny-checkbox"), l = M("monaco-editor");
2087
- return B(), J("div", an, [
2088
- v("div", {
2089
- class: Ne(["content-right-top", { "tip-error": e.context.tipError }])
2965
+ function Kn(h, e, n, t, o, i) {
2966
+ const l = X("tiny-input"), d = X("tiny-checkbox"), a = X("monaco-editor");
2967
+ return U(), re("div", $n, [
2968
+ _("div", {
2969
+ class: He(["content-right-top", { "tip-error": t.context.tipError }])
2090
2970
  }, [
2091
- n[2] || (n[2] = v("div", { class: "content-right-title" }, "方法名称", -1)),
2092
- b(p, {
2093
- modelValue: e.context.bindMethodInfo.name,
2971
+ e[2] || (e[2] = _("div", { class: "content-right-title" }, "方法名称", -1)),
2972
+ N(l, {
2973
+ modelValue: t.context.bindMethodInfo.name,
2094
2974
  "onUpdate:modelValue": [
2095
- n[0] || (n[0] = (s) => e.context.bindMethodInfo.name = s),
2096
- e.change
2975
+ e[0] || (e[0] = (c) => t.context.bindMethodInfo.name = c),
2976
+ t.change
2097
2977
  ],
2098
- disabled: e.context.bindMethodInfo.type !== e.NEW_METHOD_TYPE,
2099
- class: Ne([{ "status-error": e.context.tipError }]),
2978
+ disabled: t.context.bindMethodInfo.type !== t.NEW_METHOD_TYPE,
2979
+ class: He([{ "status-error": t.context.tipError }]),
2100
2980
  placeholder: "请从左侧选择一个方法进行绑定,或者选择添加新方法,输入自定义方法名称。"
2101
2981
  }, null, 8, ["modelValue", "disabled", "class", "onUpdate:modelValue"]),
2102
- v("div", sn, Y(e.context.tip), 1)
2982
+ _("div", zn, me(t.context.tip), 1)
2103
2983
  ], 2),
2104
- v("div", {
2105
- class: Ne(["content-right-bottom", { "tip-error": !e.context.isValidParams }])
2984
+ _("div", {
2985
+ class: He(["content-right-bottom", { "tip-error": !t.context.isValidParams }])
2106
2986
  }, [
2107
- v("div", ln, [
2108
- b(a, {
2109
- modelValue: e.context.enableExtraParams,
2110
- "onUpdate:modelValue": n[1] || (n[1] = (s) => e.context.enableExtraParams = s),
2987
+ _("div", Jn, [
2988
+ N(d, {
2989
+ modelValue: t.context.enableExtraParams,
2990
+ "onUpdate:modelValue": e[1] || (e[1] = (c) => t.context.enableExtraParams = c),
2111
2991
  name: "tiny-checkbox"
2112
2992
  }, {
2113
- default: I(() => n[3] || (n[3] = [
2114
- ke("扩展参数设置")
2993
+ default: J(() => e[3] || (e[3] = [
2994
+ Fe("扩展参数设置")
2115
2995
  ])),
2116
2996
  _: 1,
2117
2997
  __: [3]
2118
2998
  }, 8, ["modelValue"]),
2119
- v("div", dn, [
2120
- n[4] || (n[4] = v("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
2121
- ke(" 如: " + Y(e.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
2999
+ _("div", Fn, [
3000
+ e[4] || (e[4] = _("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
3001
+ Fe(" 如: " + me(t.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
2122
3002
  ])
2123
3003
  ]),
2124
- v("div", cn, [
2125
- o.dialogVisible ? (B(), te(l, {
3004
+ _("div", qn, [
3005
+ n.dialogVisible ? (U(), Ce(a, {
2126
3006
  key: 0,
2127
- value: e.context.editorContent,
2128
- options: e.editorOptions,
2129
- onChange: e.editorContentChange,
3007
+ value: t.context.editorContent,
3008
+ options: t.editorOptions,
3009
+ onChange: t.editorContentChange,
2130
3010
  class: "monaco-editor"
2131
- }, null, 8, ["value", "options", "onChange"])) : Se("", !0),
2132
- e.context.enableExtraParams ? Se("", !0) : (B(), J("div", rn))
3011
+ }, null, 8, ["value", "options", "onChange"])) : dt("", !0),
3012
+ t.context.enableExtraParams ? dt("", !0) : (U(), re("div", Xn))
2133
3013
  ]),
2134
- !e.context.isValidParams && e.context.enableExtraParams ? (B(), J("div", mn, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : Se("", !0)
3014
+ !t.context.isValidParams && t.context.enableExtraParams ? (U(), re("div", Gn, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : dt("", !0)
2135
3015
  ], 2)
2136
3016
  ]);
2137
3017
  }
2138
- const pn = /* @__PURE__ */ Ie(on, [["render", gn], ["__scopeId", "data-v-fc0b367d"]]), vn = {
3018
+ const Hn = /* @__PURE__ */ We(jn, [["render", Kn], ["__scopeId", "data-v-fc0b367d"]]), Yn = {
2139
3019
  components: {
2140
- TinySearch: _t
3020
+ TinySearch: $t
2141
3021
  },
2142
3022
  props: {
2143
3023
  eventBinding: {
@@ -2145,110 +3025,110 @@ const pn = /* @__PURE__ */ Ie(on, [["render", gn], ["__scopeId", "data-v-fc0b367
2145
3025
  default: () => ({})
2146
3026
  }
2147
3027
  },
2148
- setup(d) {
3028
+ setup(h) {
2149
3029
  const {
2150
- getMethodNameList: n
2151
- } = k(C.Page), o = Ve(""), e = Ve([]), i = ot("context"), g = h((a, l) => {
2152
- const s = a.map((r) => {
2153
- var c;
2154
- return Number.parseInt((c = r.match(/\d+$/)) == null ? void 0 : c[0]) || 0;
2155
- }).sort((r, c) => r - c).pop();
2156
- let t = `${(l == null ? void 0 : l.replace(je, "_")) || ""}New`;
2157
- return s > -1 && (t += `${s + 1}`), t;
3030
+ getMethodNameList: e
3031
+ } = V(O.Page), n = Ye(""), t = Ye([]), o = At("context"), i = D((d, a) => {
3032
+ const c = d.map((m) => {
3033
+ var g;
3034
+ return Number.parseInt((g = m.match(/\d+$/)) == null ? void 0 : g[0]) || 0;
3035
+ }).sort((m, g) => m - g).pop();
3036
+ let s = `${(a == null ? void 0 : a.replace(gt, "_")) || ""}New`;
3037
+ return c > -1 && (s += `${c + 1}`), s;
2158
3038
  }, {
2159
3039
  metaData: {
2160
3040
  id: "engine.setting.event.BindEventsDialogSidebar.generateMethodName"
2161
3041
  },
2162
3042
  ctx: () => ({
2163
- props: d,
2164
- getMethodNameList: n,
2165
- searchValue: o,
2166
- filteredMethodList: e,
2167
- context: i,
2168
- generateMethodName: g,
2169
- selectMethod: p,
2170
- getMetaApi: k,
2171
- META_APP: C,
2172
- INVALID_VARNAME_CHAR_RE: je,
2173
- NEW_METHOD_TYPE: ee
3043
+ props: h,
3044
+ getMethodNameList: e,
3045
+ searchValue: n,
3046
+ filteredMethodList: t,
3047
+ context: o,
3048
+ generateMethodName: i,
3049
+ selectMethod: l,
3050
+ getMetaApi: V,
3051
+ META_APP: O,
3052
+ INVALID_VARNAME_CHAR_RE: gt,
3053
+ NEW_METHOD_TYPE: ye
2174
3054
  })
2175
- }), p = h((a) => {
2176
- i.bindMethodInfo = a;
3055
+ }), l = D((d) => {
3056
+ o.bindMethodInfo = d;
2177
3057
  }, {
2178
3058
  metaData: {
2179
3059
  id: "engine.setting.event.BindEventsDialogSidebar.selectMethod"
2180
3060
  },
2181
3061
  ctx: () => ({
2182
- props: d,
2183
- getMethodNameList: n,
2184
- searchValue: o,
2185
- filteredMethodList: e,
2186
- context: i,
2187
- generateMethodName: g,
2188
- selectMethod: p,
2189
- getMetaApi: k,
2190
- META_APP: C,
2191
- INVALID_VARNAME_CHAR_RE: je,
2192
- NEW_METHOD_TYPE: ee
3062
+ props: h,
3063
+ getMethodNameList: e,
3064
+ searchValue: n,
3065
+ filteredMethodList: t,
3066
+ context: o,
3067
+ generateMethodName: i,
3068
+ selectMethod: l,
3069
+ getMetaApi: V,
3070
+ META_APP: O,
3071
+ INVALID_VARNAME_CHAR_RE: gt,
3072
+ NEW_METHOD_TYPE: ye
2193
3073
  })
2194
3074
  });
2195
- return nt(() => {
2196
- var r, c;
2197
- const a = (r = d.eventBinding) == null ? void 0 : r.eventName, l = (n == null ? void 0 : n().filter((m) => m.includes(a))) || [], u = {
3075
+ return Nt(() => {
3076
+ var m, g;
3077
+ const d = (m = h.eventBinding) == null ? void 0 : m.eventName, a = (e == null ? void 0 : e().filter((v) => v.includes(d))) || [], b = {
2198
3078
  title: "添加新方法",
2199
- name: g(l, a),
2200
- type: ee
3079
+ name: i(a, d),
3080
+ type: ye
2201
3081
  };
2202
- (c = d.eventBinding) != null && c.ref ? p({
2203
- name: d.eventBinding.ref
2204
- }) : p(u);
2205
- const t = (n == null ? void 0 : n().filter((m) => m.includes(o.value)).map((m) => ({
2206
- name: m
3082
+ (g = h.eventBinding) != null && g.ref ? l({
3083
+ name: h.eventBinding.ref
3084
+ }) : l(b);
3085
+ const s = (e == null ? void 0 : e().filter((v) => v.includes(n.value)).map((v) => ({
3086
+ name: v
2207
3087
  }))) || [];
2208
- e.value = [u, ...t];
3088
+ t.value = [b, ...s];
2209
3089
  }), {
2210
- context: i,
2211
- searchValue: o,
2212
- filteredMethodList: e,
2213
- selectMethod: p
3090
+ context: o,
3091
+ searchValue: n,
3092
+ filteredMethodList: t,
3093
+ selectMethod: l
2214
3094
  };
2215
3095
  }
2216
- }, un = { class: "dialog-content-left" }, fn = { class: "left-list-wrap" }, _n = { class: "left-action-list" }, hn = { class: "action-list-wrap" }, bn = ["onClick"];
2217
- function En(d, n, o, e, i, g) {
2218
- const p = M("tiny-search");
2219
- return B(), J("div", un, [
2220
- n[1] || (n[1] = v("div", { class: "left-title" }, "响应方法", -1)),
2221
- v("div", fn, [
2222
- v("div", _n, [
2223
- b(p, {
2224
- modelValue: e.searchValue,
2225
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.searchValue = a),
3096
+ }, Wn = { class: "dialog-content-left" }, Zn = { class: "left-list-wrap" }, Qn = { class: "left-action-list" }, eo = { class: "action-list-wrap" }, to = ["onClick"];
3097
+ function no(h, e, n, t, o, i) {
3098
+ const l = X("tiny-search");
3099
+ return U(), re("div", Wn, [
3100
+ e[1] || (e[1] = _("div", { class: "left-title" }, "响应方法", -1)),
3101
+ _("div", Zn, [
3102
+ _("div", Qn, [
3103
+ N(l, {
3104
+ modelValue: t.searchValue,
3105
+ "onUpdate:modelValue": e[0] || (e[0] = (d) => t.searchValue = d),
2226
3106
  placeholder: "搜索"
2227
3107
  }, null, 8, ["modelValue"]),
2228
- v("ul", hn, [
2229
- (B(!0), J(Oe, null, ze(e.filteredMethodList, (a) => (B(), J("li", {
2230
- key: a.name,
2231
- onClick: (l) => e.selectMethod(a)
3108
+ _("ul", eo, [
3109
+ (U(!0), re(at, null, pt(t.filteredMethodList, (d) => (U(), re("li", {
3110
+ key: d.name,
3111
+ onClick: (a) => t.selectMethod(d)
2232
3112
  }, [
2233
- v("div", {
2234
- class: Ne(["action-name", { active: a.name === e.context.bindMethodInfo.name }])
2235
- }, Y(a.title || a.name), 3)
2236
- ], 8, bn))), 128))
3113
+ _("div", {
3114
+ class: He(["action-name", { active: d.name === t.context.bindMethodInfo.name }])
3115
+ }, me(d.title || d.name), 3)
3116
+ ], 8, to))), 128))
2237
3117
  ])
2238
3118
  ])
2239
3119
  ])
2240
3120
  ]);
2241
3121
  }
2242
- const yn = /* @__PURE__ */ Ie(vn, [["render", En], ["__scopeId", "data-v-9bcc2645"]]), wn = {
2243
- ...U,
2244
- entry: nn,
2245
- options: { commonEvents: at },
3122
+ const oo = /* @__PURE__ */ We(Yn, [["render", no], ["__scopeId", "data-v-9bcc2645"]]), mo = {
3123
+ ...Q,
3124
+ entry: Un,
3125
+ options: { commonEvents: Lt },
2246
3126
  components: {
2247
- BindEventsDialogSidebar: yn,
2248
- BindEventsDialogContent: pn
3127
+ BindEventsDialogSidebar: oo,
3128
+ BindEventsDialogContent: Hn
2249
3129
  }
2250
3130
  };
2251
3131
  export {
2252
- wn as default
3132
+ mo as default
2253
3133
  };
2254
3134
  //# sourceMappingURL=index.js.map