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

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