@tmagic/editor 1.5.21 → 1.5.24

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.
@@ -1,4 +1,4 @@
1
- import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, tMagicMessage, getDesignConfig, TMagicSelect, useZIndex, tMagicMessageBox, TMagicCascader, TMagicTooltip, TMagicTag, TMagicDialog, TMagicSwitch, TMagicInput, TMagicCollapse, TMagicCollapseItem, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar } from '@tmagic/design';
1
+ import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, tMagicMessage, getDesignConfig, TMagicSelect, useZIndex, tMagicMessageBox, TMagicCascader, TMagicTooltip, TMagicInput, TMagicTag, TMagicDialog, TMagicSwitch, TMagicCollapse, TMagicCollapseItem, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar } from '@tmagic/design';
2
2
  export * from '@tmagic/design';
3
3
  export { default as designPlugin } from '@tmagic/design';
4
4
  import formPlugin__default, { MContainer, defineFormConfig, MForm, filterFunction, createValues, MFormBox, MSelect, MGroupList, MPanel, createForm } from '@tmagic/form';
@@ -7,15 +7,15 @@ export { default as formPlugin } from '@tmagic/form';
7
7
  import tablePlugin__default, { MagicTable } from '@tmagic/table';
8
8
  export * from '@tmagic/table';
9
9
  export { default as tablePlugin } from '@tmagic/table';
10
- import { defineComponent, createBlock, createElementBlock, openBlock, unref, withCtx, createVNode, createElementVNode, normalizeClass, resolveDynamicComponent, toRaw, ref, useTemplateRef, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, shallowReactive, createTextVNode, isRef, createStaticVNode, watchEffect, markRaw, withDirectives, vModelText, vShow, shallowRef, withModifiers, toHandlers, createSlots, getCurrentInstance, Transition, resolveDirective, mergeDefaults } from 'vue';
10
+ import { defineComponent, createBlock, createElementBlock, openBlock, unref, withCtx, createVNode, createElementVNode, normalizeClass, resolveDynamicComponent, toRaw, ref, useTemplateRef, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, createCommentVNode, nextTick, computed, reactive, resolveComponent, inject, Fragment, renderList, mergeProps, mergeModels, useModel, provide, renderSlot, toDisplayString, shallowReactive, createTextVNode, isRef, createStaticVNode, watchEffect, markRaw, withDirectives, vModelText, vShow, shallowRef, withModifiers, toHandlers, createSlots, getCurrentInstance, onUnmounted, Transition, resolveDirective, mergeDefaults } from 'vue';
11
11
  import { Edit, FullScreen, View, Close, Coin, Delete, Plus, Grid, ArrowDown, ArrowLeftBold, ArrowRightBold, Files, Search, DocumentCopy, CaretBottom, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Document, Sugar, ArrowRight, CopyDocument, Hide, EditPen, List, Goods, CloseBold, Top, Bottom } from '@element-plus/icons-vue';
12
12
  import { throttle, isEmpty, isObject, cloneDeep, mergeWith, uniq, get, map, has, pick, keys } from 'lodash-es';
13
13
  import serialize from 'serialize-javascript';
14
14
  import { emmetHTML, emmetCSS } from 'emmet-monaco-es';
15
15
  import * as monaco from 'monaco-editor';
16
- import { HookCodeType, HookType, NODE_CONDS_KEY, Target, Watcher, NodeType, ActionType, DepTargetType, traverseTarget, createCodeBlockTarget, createDataSourceTarget, createDataSourceCondTarget, createDataSourceMethodTarget } from '@tmagic/core';
16
+ import { HookCodeType, HookType, NODE_DISABLE_CODE_BLOCK_KEY, NODE_DISABLE_DATA_SOURCE_KEY, NODE_CONDS_KEY, Target, Watcher, NodeType, ActionType, DepTargetType, traverseTarget, createCodeBlockTarget, createDataSourceTarget, createDataSourceCondTarget, createDataSourceMethodTarget, updateNode } from '@tmagic/core';
17
17
  export { DepTargetType } from '@tmagic/core';
18
- import { isPage, isPageFragment, isPop, getNodePath, isNumber, getElById, calcValueByFontsize, isValueIncludeDataSource, toLine, guid, getValueByKeyPath, setValueByKeyPath, getNodeInfo, DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, dataSourceTemplateRegExp, getKeysArray, getKeys, convertToNumber, getIdFromEl, traverseNode, getDefaultValueFromFields, DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX, removeClassName, addClassName, removeClassNameByClassName, getNodes } from '@tmagic/utils';
18
+ import { isPage, isPageFragment, isPop, getNodePath, isNumber, getElById, calcValueByFontsize, isValueIncludeDataSource, toLine, guid, getValueByKeyPath, setValueByKeyPath, getNodeInfo, DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, dataSourceTemplateRegExp, getKeysArray, getKeys, convertToNumber, getIdFromEl, traverseNode, getDefaultValueFromFields, DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX, removeClassName, addClassName, removeClassNameByClassName, getNodes, getDepNodeIds } from '@tmagic/utils';
19
19
  export * from '@tmagic/utils';
20
20
  import VanillaMoveable from 'moveable';
21
21
  import StageCore__default, { isFixed, GuidesType, getOffset, ContainerHighlightType, CONTAINER_HIGHLIGHT_CLASS_NAME, RenderType } from '@tmagic/stage';
@@ -27,7 +27,7 @@ import { detailedDiff } from 'deep-object-diff';
27
27
  import Sortable from 'sortablejs';
28
28
  import KeyController from 'keycon';
29
29
 
30
- const _hoisted_1$$ = ["src"];
30
+ const _hoisted_1$10 = ["src"];
31
31
  const _sfc_main$1r = /* @__PURE__ */ defineComponent({
32
32
  ...{
33
33
  name: "MEditorIcon"
@@ -53,7 +53,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
53
53
  class: "magic-editor-icon"
54
54
  }, {
55
55
  default: withCtx(() => [
56
- createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$$)
56
+ createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$10)
57
57
  ]),
58
58
  _: 1
59
59
  /* STABLE */
@@ -89,7 +89,7 @@ const getEditorConfig = (key) => $TMAGIC_EDITOR[key];
89
89
  emmetHTML(monaco);
90
90
  emmetCSS(monaco, ["css", "scss"]);
91
91
 
92
- const _hoisted_1$_ = {
92
+ const _hoisted_1$$ = {
93
93
  class: /* @__PURE__ */ normalizeClass(`magic-code-editor`)
94
94
  };
95
95
  const _hoisted_2$n = {
@@ -111,7 +111,8 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
111
111
  }) },
112
112
  height: {},
113
113
  autoSave: { type: Boolean, default: true },
114
- parse: { type: Boolean, default: false }
114
+ parse: { type: Boolean, default: false },
115
+ disabledFullScreen: { type: Boolean, default: false }
115
116
  },
116
117
  emits: ["initd", "save"],
117
118
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -171,6 +172,9 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
171
172
  const getEditorValue = () => (props.type === "diff" ? vsDiffEditor?.getModifiedEditor().getValue() : vsEditor?.getValue()) || "";
172
173
  const init = async () => {
173
174
  if (!codeEditorEl.value) return;
175
+ if (codeEditorEl.value.clientHeight === 0) {
176
+ await nextTick();
177
+ }
174
178
  const options = {
175
179
  value: values.value,
176
180
  language: props.language,
@@ -178,12 +182,11 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
178
182
  ...props.options
179
183
  };
180
184
  if (props.type === "diff") {
181
- vsDiffEditor = monaco.editor.createDiffEditor(codeEditorEl.value, options);
185
+ vsDiffEditor = getEditorConfig("customCreateMonacoDiffEditor")(monaco, codeEditorEl.value, options);
182
186
  } else {
183
- vsEditor = monaco.editor.create(codeEditorEl.value, options);
187
+ vsEditor = getEditorConfig("customCreateMonacoEditor")(monaco, codeEditorEl.value, options);
184
188
  }
185
189
  setEditorValue(props.initValues, props.modifiedValues);
186
- loading.value = false;
187
190
  emit("initd", vsEditor);
188
191
  codeEditorEl.value.addEventListener("keydown", (e) => {
189
192
  if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
@@ -217,12 +220,27 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
217
220
  immediate: true
218
221
  }
219
222
  );
223
+ watch(
224
+ () => props.options,
225
+ (v) => {
226
+ vsEditor?.updateOptions(v);
227
+ vsDiffEditor?.updateOptions(v);
228
+ },
229
+ {
230
+ deep: true
231
+ }
232
+ );
220
233
  onMounted(async () => {
221
234
  loading.value = true;
222
- init();
235
+ await init();
236
+ loading.value = false;
223
237
  });
224
238
  onBeforeUnmount(() => {
225
239
  resizeObserver.disconnect();
240
+ vsEditor?.dispose();
241
+ vsDiffEditor?.dispose();
242
+ vsEditor = null;
243
+ vsDiffEditor = null;
226
244
  });
227
245
  const fullScreen = ref(false);
228
246
  const fullScreenHandler = () => {
@@ -253,7 +271,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
253
271
  }
254
272
  });
255
273
  return (_ctx, _cache) => {
256
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
274
+ return openBlock(), createElementBlock("div", _hoisted_1$$, [
257
275
  (openBlock(), createBlock(Teleport, {
258
276
  to: "body",
259
277
  disabled: !fullScreen.value
@@ -265,7 +283,8 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
265
283
  style: normalizeStyle(!fullScreen.value && _ctx.height ? `height: ${_ctx.height}` : "100%")
266
284
  },
267
285
  [
268
- createVNode(unref(TMagicButton), {
286
+ !_ctx.disabledFullScreen ? (openBlock(), createBlock(unref(TMagicButton), {
287
+ key: 0,
269
288
  class: "magic-code-editor-full-screen-icon",
270
289
  circle: "",
271
290
  size: "small",
@@ -276,7 +295,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
276
295
  ]),
277
296
  _: 1
278
297
  /* STABLE */
279
- }),
298
+ })) : createCommentVNode("v-if", true),
280
299
  createElementVNode(
281
300
  "div",
282
301
  _hoisted_2$n,
@@ -642,6 +661,20 @@ const advancedTabConfig = {
642
661
  title: "高级",
643
662
  lazy: true,
644
663
  items: [
664
+ {
665
+ name: NODE_DISABLE_CODE_BLOCK_KEY,
666
+ text: "禁用代码块",
667
+ type: "switch",
668
+ defaultValue: false,
669
+ extra: "开启后,配置的代码块将不会被执行"
670
+ },
671
+ {
672
+ name: NODE_DISABLE_DATA_SOURCE_KEY,
673
+ text: "禁用数据源",
674
+ type: "switch",
675
+ defaultValue: false,
676
+ extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
677
+ },
645
678
  {
646
679
  name: "created",
647
680
  text: "created",
@@ -677,7 +710,11 @@ const displayTabConfig = {
677
710
  }
678
711
  ]
679
712
  };
680
- const fillConfig$1 = (config = [], labelWidth = "80px") => {
713
+ const fillConfig$1 = (config = [], {
714
+ labelWidth = "80px",
715
+ disabledDataSource = false,
716
+ disabledCodeBlock = false
717
+ } = {}) => {
681
718
  const propsConfig = [];
682
719
  if (!config.find((item) => item.name === "type")) {
683
720
  propsConfig.push({
@@ -711,22 +748,31 @@ const fillConfig$1 = (config = [], labelWidth = "80px") => {
711
748
  text: "组件名称"
712
749
  });
713
750
  }
714
- return [
715
- {
716
- type: "tab",
717
- labelWidth,
718
- items: [
719
- {
720
- title: "属性",
721
- items: [...propsConfig, ...config]
722
- },
723
- { ...styleTabConfig },
724
- { ...eventTabConfig },
725
- { ...advancedTabConfig },
726
- { ...displayTabConfig }
727
- ]
728
- }
729
- ];
751
+ const noCodeAdvancedTabItems = advancedTabConfig.items.filter((item) => item.type !== "code-select");
752
+ if (noCodeAdvancedTabItems.length > 0 && disabledCodeBlock) {
753
+ advancedTabConfig.items = noCodeAdvancedTabItems;
754
+ }
755
+ const tabConfig = {
756
+ type: "tab",
757
+ labelWidth,
758
+ items: [
759
+ {
760
+ title: "属性",
761
+ items: [...propsConfig, ...config]
762
+ },
763
+ { ...styleTabConfig },
764
+ { ...eventTabConfig }
765
+ ]
766
+ };
767
+ if (!disabledCodeBlock) {
768
+ tabConfig.items.push({ ...advancedTabConfig });
769
+ } else if (noCodeAdvancedTabItems.length > 0) {
770
+ tabConfig.items.push({ ...advancedTabConfig });
771
+ }
772
+ if (!disabledDataSource) {
773
+ tabConfig.items.push({ ...displayTabConfig });
774
+ }
775
+ return [tabConfig];
730
776
  };
731
777
 
732
778
  const log = (...args) => {
@@ -1181,22 +1227,29 @@ class BaseService extends EventEmitter {
1181
1227
  * @deprecated 请使用usePlugin代替
1182
1228
  */
1183
1229
  use(options) {
1184
- Object.entries(options).forEach(([methodName2, method]) => {
1230
+ for (const [methodName2, method] of Object.entries(options)) {
1185
1231
  if (typeof method === "function") this.middleware[methodName2].push(method);
1186
- });
1232
+ }
1187
1233
  }
1188
1234
  usePlugin(options) {
1189
- Object.entries(options).forEach(([methodName2, method]) => {
1235
+ for (const [methodName2, method] of Object.entries(options)) {
1190
1236
  if (typeof method === "function") this.pluginOptionsList[methodName2].push(method);
1191
- });
1237
+ }
1238
+ }
1239
+ removePlugin(options) {
1240
+ for (const [methodName2, method] of Object.entries(options)) {
1241
+ if (Array.isArray(this.pluginOptionsList[methodName2])) {
1242
+ this.pluginOptionsList[methodName2] = this.pluginOptionsList[methodName2].filter((item) => item !== method);
1243
+ }
1244
+ }
1192
1245
  }
1193
1246
  removeAllPlugins() {
1194
- Object.keys(this.pluginOptionsList).forEach((key) => {
1247
+ for (const key of Object.keys(this.pluginOptionsList)) {
1195
1248
  this.pluginOptionsList[key] = [];
1196
- });
1197
- Object.keys(this.middleware).forEach((key) => {
1249
+ }
1250
+ for (const key of Object.keys(this.middleware)) {
1198
1251
  this.middleware[key] = [];
1199
- });
1252
+ }
1200
1253
  }
1201
1254
  async doTask() {
1202
1255
  this.doingTask = true;
@@ -1224,7 +1277,11 @@ class Props extends BaseService {
1224
1277
  state = reactive({
1225
1278
  propsConfigMap: {},
1226
1279
  propsValueMap: {},
1227
- relateIdMap: {}
1280
+ relateIdMap: {},
1281
+ /** 禁用数据源 */
1282
+ disabledDataSource: false,
1283
+ /** 禁用代码块 */
1284
+ disabledCodeBlock: false
1228
1285
  });
1229
1286
  constructor() {
1230
1287
  super([
@@ -1232,6 +1289,18 @@ class Props extends BaseService {
1232
1289
  ...canUsePluginMethods$7.sync.map((methodName) => ({ name: methodName, isAsync: false }))
1233
1290
  ]);
1234
1291
  }
1292
+ setDisabledDataSource(disabled) {
1293
+ this.state.disabledDataSource = disabled;
1294
+ }
1295
+ setDisabledCodeBlock(disabled) {
1296
+ this.state.disabledCodeBlock = disabled;
1297
+ }
1298
+ getDisabledDataSource() {
1299
+ return this.state.disabledDataSource;
1300
+ }
1301
+ getDisabledCodeBlock() {
1302
+ return this.state.disabledCodeBlock;
1303
+ }
1235
1304
  setPropsConfigs(configs) {
1236
1305
  Object.keys(configs).forEach((type) => {
1237
1306
  this.setPropsConfig(toLine(type), configs[type]);
@@ -1239,7 +1308,11 @@ class Props extends BaseService {
1239
1308
  this.emit("props-configs-change");
1240
1309
  }
1241
1310
  async fillConfig(config, labelWidth) {
1242
- return fillConfig$1(config, typeof labelWidth !== "function" ? labelWidth : "80px");
1311
+ return fillConfig$1(config, {
1312
+ labelWidth: typeof labelWidth !== "function" ? labelWidth : "80px",
1313
+ disabledDataSource: this.getDisabledDataSource(),
1314
+ disabledCodeBlock: this.getDisabledCodeBlock()
1315
+ });
1243
1316
  }
1244
1317
  async setPropsConfig(type, config) {
1245
1318
  let c = config;
@@ -3159,7 +3232,7 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
3159
3232
  }
3160
3233
  });
3161
3234
 
3162
- const _hoisted_1$Z = { class: "m-fields-code-select-col" };
3235
+ const _hoisted_1$_ = { class: "m-fields-code-select-col" };
3163
3236
  const _hoisted_2$m = { class: "code-select-container" };
3164
3237
  const _sfc_main$1l = /* @__PURE__ */ defineComponent({
3165
3238
  ...{
@@ -3260,7 +3333,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
3260
3333
  eventBus?.emit("edit-code", id);
3261
3334
  };
3262
3335
  return (_ctx, _cache) => {
3263
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
3336
+ return openBlock(), createElementBlock("div", _hoisted_1$_, [
3264
3337
  createElementVNode("div", _hoisted_2$m, [
3265
3338
  createCommentVNode(" 代码块下拉框 "),
3266
3339
  createVNode(unref(MContainer), {
@@ -3372,9 +3445,9 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
3372
3445
  mergeProps(
3373
3446
  {
3374
3447
  class: "tmagic-design-option",
3375
- key: option.value,
3376
- ref_for: true
3448
+ key: option.value
3377
3449
  },
3450
+ { ref_for: true },
3378
3451
  unref(optionComponent)?.props({
3379
3452
  label: option.text,
3380
3453
  value: option.value
@@ -3399,7 +3472,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
3399
3472
  }
3400
3473
  });
3401
3474
 
3402
- const _hoisted_1$Y = {
3475
+ const _hoisted_1$Z = {
3403
3476
  ref: "title",
3404
3477
  class: "m-editor-float-box-title"
3405
3478
  };
@@ -3547,7 +3620,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
3547
3620
  [
3548
3621
  createElementVNode(
3549
3622
  "div",
3550
- _hoisted_1$Y,
3623
+ _hoisted_1$Z,
3551
3624
  [
3552
3625
  renderSlot(_ctx.$slots, "title", {}, () => [
3553
3626
  createElementVNode(
@@ -3781,7 +3854,8 @@ const useStage = (stageOptions) => {
3781
3854
  moveableOptions: stageOptions.moveableOptions,
3782
3855
  updateDragEl: stageOptions.updateDragEl,
3783
3856
  guidesOptions: stageOptions.guidesOptions,
3784
- disabledMultiSelect: stageOptions.disabledMultiSelect
3857
+ disabledMultiSelect: stageOptions.disabledMultiSelect,
3858
+ disabledRule: stageOptions.disabledRule
3785
3859
  });
3786
3860
  watch(
3787
3861
  () => editorService.get("disabledMultiSelect"),
@@ -3989,10 +4063,12 @@ const useFilter = (nodeData, nodeStatusMap, filterNodeMethod) => {
3989
4063
  const visible = filterIsMatch(text, node2);
3990
4064
  if (visible && parents.length) {
3991
4065
  parents.forEach((parent) => {
3992
- updateStatus(nodeStatusMap.value, parent.id, {
3993
- visible,
3994
- expand: true
3995
- });
4066
+ if (text || text.length) {
4067
+ updateStatus(nodeStatusMap.value, parent.id, {
4068
+ visible,
4069
+ expand: true
4070
+ });
4071
+ }
3996
4072
  });
3997
4073
  }
3998
4074
  updateStatus(nodeStatusMap.value, node2.id, {
@@ -4093,7 +4169,7 @@ const useNodeStatus$1 = (nodeData) => {
4093
4169
  };
4094
4170
  };
4095
4171
 
4096
- const _hoisted_1$X = { class: "m-editor-data-source-fields" };
4172
+ const _hoisted_1$Y = { class: "m-editor-data-source-fields" };
4097
4173
  const _hoisted_2$l = { class: "m-editor-data-source-fields-footer" };
4098
4174
  const _sfc_main$1i = /* @__PURE__ */ defineComponent({
4099
4175
  ...{
@@ -4360,10 +4436,11 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
4360
4436
  const parentFloating = inject("parentFloating", ref(null));
4361
4437
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
4362
4438
  return (_ctx, _cache) => {
4363
- return openBlock(), createElementBlock("div", _hoisted_1$X, [
4439
+ return openBlock(), createElementBlock("div", _hoisted_1$Y, [
4364
4440
  createVNode(unref(MagicTable), {
4365
4441
  data: _ctx.model[_ctx.name],
4366
- columns: fieldColumns
4442
+ columns: fieldColumns,
4443
+ border: true
4367
4444
  }, null, 8, ["data"]),
4368
4445
  createElementVNode("div", _hoisted_2$l, [
4369
4446
  createVNode(unref(TMagicButton), {
@@ -4375,8 +4452,8 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
4375
4452
  default: withCtx(() => _cache[8] || (_cache[8] = [
4376
4453
  createTextVNode("快速添加")
4377
4454
  ])),
4378
- _: 1
4379
- /* STABLE */
4455
+ _: 1,
4456
+ __: [8]
4380
4457
  }, 8, ["disabled"]),
4381
4458
  createVNode(unref(TMagicButton), {
4382
4459
  size: "small",
@@ -4388,8 +4465,8 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
4388
4465
  default: withCtx(() => _cache[9] || (_cache[9] = [
4389
4466
  createTextVNode("添加")
4390
4467
  ])),
4391
- _: 1
4392
- /* STABLE */
4468
+ _: 1,
4469
+ __: [9]
4393
4470
  }, 8, ["disabled"])
4394
4471
  ]),
4395
4472
  createVNode(_sfc_main$1j, {
@@ -4442,7 +4519,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
4442
4519
  }
4443
4520
  });
4444
4521
 
4445
- const _hoisted_1$W = { class: "m-editor-data-source-field-select" };
4522
+ const _hoisted_1$X = { class: "m-editor-data-source-field-select" };
4446
4523
  const _sfc_main$1h = /* @__PURE__ */ defineComponent({
4447
4524
  __name: "FieldSelect",
4448
4525
  props: /* @__PURE__ */ mergeModels({
@@ -4451,7 +4528,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
4451
4528
  checkStrictly: { type: Boolean },
4452
4529
  size: {},
4453
4530
  dataSourceFieldType: {},
4454
- notEditable: { type: Boolean }
4531
+ notEditable: { type: [Boolean, Function] }
4455
4532
  }, {
4456
4533
  "modelValue": { default: [] },
4457
4534
  "modelModifiers": {}
@@ -4524,7 +4601,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
4524
4601
  eventBus?.emit("edit-data-source", removeDataSourceFieldPrefix(id));
4525
4602
  };
4526
4603
  return (_ctx, _cache) => {
4527
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
4604
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
4528
4605
  _ctx.checkStrictly ? (openBlock(), createElementBlock(
4529
4606
  Fragment,
4530
4607
  { key: 0 },
@@ -4547,9 +4624,9 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
4547
4624
  mergeProps(
4548
4625
  {
4549
4626
  class: "tmagic-design-option",
4550
- key: option.value,
4551
- ref_for: true
4627
+ key: option.value
4552
4628
  },
4629
+ { ref_for: true },
4553
4630
  unref(optionComponent)?.props({
4554
4631
  label: option.text,
4555
4632
  value: option.value,
@@ -4627,7 +4704,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
4627
4704
  }
4628
4705
  });
4629
4706
 
4630
- const _hoisted_1$V = { class: "m-fields-data-source-field-select" };
4707
+ const _hoisted_1$W = { class: "m-fields-data-source-field-select" };
4631
4708
  const _sfc_main$1g = /* @__PURE__ */ defineComponent({
4632
4709
  ...{
4633
4710
  name: "MFieldsDataSourceFieldSelect"
@@ -4662,9 +4739,10 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
4662
4739
  immediate: true
4663
4740
  }
4664
4741
  );
4665
- const { dataSourceService } = useServices();
4742
+ const { dataSourceService, propsService } = useServices();
4666
4743
  const mForm = inject("mForm");
4667
4744
  const dataSources = computed(() => dataSourceService.get("dataSources") || []);
4745
+ const disabledDataSource = computed(() => propsService.getDisabledDataSource());
4668
4746
  const type = computed(() => {
4669
4747
  let type2 = props.config.fieldConfig?.type;
4670
4748
  if (typeof type2 === "function") {
@@ -4729,8 +4807,8 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
4729
4807
  }
4730
4808
  };
4731
4809
  return (_ctx, _cache) => {
4732
- return openBlock(), createElementBlock("div", _hoisted_1$V, [
4733
- showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (openBlock(), createBlock(_sfc_main$1h, {
4810
+ return openBlock(), createElementBlock("div", _hoisted_1$W, [
4811
+ !disabledDataSource.value && (showDataSourceFieldSelect.value || !_ctx.config.fieldConfig) ? (openBlock(), createBlock(_sfc_main$1h, {
4734
4812
  key: 0,
4735
4813
  "model-value": _ctx.model[_ctx.name],
4736
4814
  disabled: _ctx.disabled,
@@ -4752,7 +4830,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
4752
4830
  prop: _ctx.prop,
4753
4831
  onChange: onChangeHandler
4754
4832
  }, null, 40, ["config", "model", "name", "disabled", "size", "last-values", "init-values", "values", "prop"])),
4755
- _ctx.config.fieldConfig ? (openBlock(), createBlock(unref(TMagicTooltip), {
4833
+ _ctx.config.fieldConfig && !disabledDataSource.value ? (openBlock(), createBlock(unref(TMagicTooltip), {
4756
4834
  key: 2,
4757
4835
  disabled: showDataSourceFieldSelect.value,
4758
4836
  content: "选择数据源"
@@ -4779,7 +4857,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
4779
4857
  }
4780
4858
  });
4781
4859
 
4782
- const _hoisted_1$U = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
4860
+ const _hoisted_1$V = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
4783
4861
  const _hoisted_2$k = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
4784
4862
  const _hoisted_3$7 = { class: "el-input__inner t-input__inner" };
4785
4863
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
@@ -4802,13 +4880,14 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
4802
4880
  setup(__props, { emit: __emit }) {
4803
4881
  const props = __props;
4804
4882
  const emit = __emit;
4805
- const { dataSourceService } = useServices();
4883
+ const { dataSourceService, propsService } = useServices();
4806
4884
  const autocompleteRef = useTemplateRef("autocomplete");
4807
4885
  const isFocused = ref(false);
4808
4886
  const state = ref("");
4809
4887
  const displayState = ref([]);
4810
4888
  const input = computed(() => autocompleteRef.value?.inputRef?.input);
4811
4889
  const dataSources = computed(() => dataSourceService.get("dataSources"));
4890
+ const disabledDataSource = computed(() => propsService.getDisabledDataSource());
4812
4891
  const setDisplayState = () => {
4813
4892
  displayState.value = getDisplayField(dataSources.value, state.value);
4814
4893
  };
@@ -4958,13 +5037,21 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
4958
5037
  changeHandler(state.value);
4959
5038
  };
4960
5039
  return (_ctx, _cache) => {
4961
- return _ctx.disabled || isFocused.value ? (openBlock(), createBlock(resolveDynamicComponent(unref(getDesignConfig)("components")?.autocomplete.component || "el-autocomplete"), mergeProps(
5040
+ return disabledDataSource.value ? (openBlock(), createBlock(unref(TMagicInput), {
5041
+ key: 0,
5042
+ modelValue: state.value,
5043
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event),
5044
+ disabled: _ctx.disabled,
5045
+ size: _ctx.size,
5046
+ clearable: true,
5047
+ onChange: changeHandler
5048
+ }, null, 8, ["modelValue", "disabled", "size"])) : _ctx.disabled || isFocused.value ? (openBlock(), createBlock(resolveDynamicComponent(unref(getDesignConfig)("components")?.autocomplete.component || "el-autocomplete"), mergeProps(
4962
5049
  {
4963
- key: 0,
5050
+ key: 1,
4964
5051
  class: "tmagic-design-auto-complete",
4965
5052
  ref: "autocomplete",
4966
5053
  modelValue: state.value,
4967
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event)
5054
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.value = $event)
4968
5055
  },
4969
5056
  unref(getDesignConfig)("components")?.autocomplete.props({
4970
5057
  disabled: _ctx.disabled,
@@ -4984,7 +5071,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
4984
5071
  createVNode(_sfc_main$1r, { icon: unref(Coin) }, null, 8, ["icon"])
4985
5072
  ]),
4986
5073
  default: withCtx(({ item }) => [
4987
- createElementVNode("div", _hoisted_1$U, [
5074
+ createElementVNode("div", _hoisted_1$V, [
4988
5075
  createElementVNode(
4989
5076
  "div",
4990
5077
  null,
@@ -5006,7 +5093,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
5006
5093
  }, 16, ["modelValue"])) : (openBlock(), createElementBlock(
5007
5094
  "div",
5008
5095
  {
5009
- key: 1,
5096
+ key: 2,
5010
5097
  class: normalizeClass(`tmagic-data-source-input-text el-input t-input t-size-${_ctx.size?.[0]} el-input--${_ctx.size}`),
5011
5098
  onMouseup: mouseupHandler
5012
5099
  },
@@ -5075,7 +5162,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
5075
5162
  }
5076
5163
  });
5077
5164
 
5078
- const _hoisted_1$T = { style: { "display": "flex", "margin-bottom": "10px" } };
5165
+ const _hoisted_1$U = { style: { "display": "flex", "margin-bottom": "10px" } };
5079
5166
  const _hoisted_2$j = { style: { "flex": "1" } };
5080
5167
  const _hoisted_3$6 = { style: { "flex": "1" } };
5081
5168
  const _hoisted_4$5 = { class: "dialog-footer" };
@@ -5303,8 +5390,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5303
5390
  default: withCtx(() => _cache[6] || (_cache[6] = [
5304
5391
  createTextVNode("查看修改")
5305
5392
  ])),
5306
- _: 1
5307
- /* STABLE */
5393
+ _: 1,
5394
+ __: [6]
5308
5395
  })) : createCommentVNode("v-if", true)
5309
5396
  ]),
5310
5397
  _: 1
@@ -5319,7 +5406,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5319
5406
  title: "查看修改",
5320
5407
  modelValue: difVisible.value,
5321
5408
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => difVisible.value = $event),
5322
- fullscreen: ""
5409
+ fullscreen: "",
5410
+ "destroy-on-close": ""
5323
5411
  }, {
5324
5412
  footer: withCtx(() => [
5325
5413
  createElementVNode("span", _hoisted_4$5, [
@@ -5330,8 +5418,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5330
5418
  default: withCtx(() => _cache[9] || (_cache[9] = [
5331
5419
  createTextVNode("取消")
5332
5420
  ])),
5333
- _: 1
5334
- /* STABLE */
5421
+ _: 1,
5422
+ __: [9]
5335
5423
  }),
5336
5424
  createVNode(unref(TMagicButton), {
5337
5425
  size: "small",
@@ -5341,13 +5429,13 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5341
5429
  default: withCtx(() => _cache[10] || (_cache[10] = [
5342
5430
  createTextVNode("确定")
5343
5431
  ])),
5344
- _: 1
5345
- /* STABLE */
5432
+ _: 1,
5433
+ __: [10]
5346
5434
  })
5347
5435
  ])
5348
5436
  ]),
5349
5437
  default: withCtx(() => [
5350
- createElementVNode("div", _hoisted_1$T, [
5438
+ createElementVNode("div", _hoisted_1$U, [
5351
5439
  createElementVNode("div", _hoisted_2$j, [
5352
5440
  createVNode(unref(TMagicTag), {
5353
5441
  size: "small",
@@ -5356,8 +5444,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5356
5444
  default: withCtx(() => _cache[7] || (_cache[7] = [
5357
5445
  createTextVNode("修改前")
5358
5446
  ])),
5359
- _: 1
5360
- /* STABLE */
5447
+ _: 1,
5448
+ __: [7]
5361
5449
  })
5362
5450
  ]),
5363
5451
  createElementVNode("div", _hoisted_3$6, [
@@ -5368,20 +5456,20 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5368
5456
  default: withCtx(() => _cache[8] || (_cache[8] = [
5369
5457
  createTextVNode("修改后")
5370
5458
  ])),
5371
- _: 1
5372
- /* STABLE */
5459
+ _: 1,
5460
+ __: [8]
5373
5461
  })
5374
5462
  ])
5375
5463
  ]),
5376
- difVisible.value ? (openBlock(), createBlock(_sfc_main$1q, {
5377
- key: 0,
5464
+ createVNode(_sfc_main$1q, {
5378
5465
  ref: "magicVsEditor",
5379
5466
  type: "diff",
5380
5467
  language: "json",
5468
+ "disabled-full-screen": true,
5381
5469
  initValues: _ctx.content.content,
5382
- modifiedValues: unref(formBox)?.form?.values.content,
5383
- style: normalizeStyle(`height: ${unref(windowRect).height - 150}px`)
5384
- }, null, 8, ["initValues", "modifiedValues", "style"])) : createCommentVNode("v-if", true)
5470
+ modifiedValues: formBox.value?.form?.values.content,
5471
+ height: `${unref(windowRect).height - 150}px`
5472
+ }, null, 8, ["initValues", "modifiedValues", "height"])
5385
5473
  ]),
5386
5474
  _: 1
5387
5475
  /* STABLE */
@@ -5395,7 +5483,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
5395
5483
  }
5396
5484
  });
5397
5485
 
5398
- const _hoisted_1$S = { class: "m-editor-data-source-methods" };
5486
+ const _hoisted_1$T = { class: "m-editor-data-source-methods" };
5399
5487
  const _hoisted_2$i = { class: "m-editor-data-source-methods-footer" };
5400
5488
  const _sfc_main$1d = /* @__PURE__ */ defineComponent({
5401
5489
  ...{
@@ -5514,10 +5602,11 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
5514
5602
  codeBlockEditorRef.value?.hide();
5515
5603
  };
5516
5604
  return (_ctx, _cache) => {
5517
- return openBlock(), createElementBlock("div", _hoisted_1$S, [
5605
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
5518
5606
  createVNode(unref(MagicTable), {
5519
5607
  data: _ctx.model[_ctx.name],
5520
- columns: methodColumns
5608
+ columns: methodColumns,
5609
+ border: true
5521
5610
  }, null, 8, ["data"]),
5522
5611
  createElementVNode("div", _hoisted_2$i, [
5523
5612
  createVNode(unref(TMagicButton), {
@@ -5530,8 +5619,8 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
5530
5619
  default: withCtx(() => _cache[0] || (_cache[0] = [
5531
5620
  createTextVNode("添加")
5532
5621
  ])),
5533
- _: 1
5534
- /* STABLE */
5622
+ _: 1,
5623
+ __: [0]
5535
5624
  }, 8, ["disabled"])
5536
5625
  ]),
5537
5626
  codeConfig.value ? (openBlock(), createBlock(_sfc_main$1e, {
@@ -5548,7 +5637,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
5548
5637
  }
5549
5638
  });
5550
5639
 
5551
- const _hoisted_1$R = { class: "m-fields-data-source-method-select" };
5640
+ const _hoisted_1$S = { class: "m-fields-data-source-method-select" };
5552
5641
  const _hoisted_2$h = { class: "data-source-method-select-container" };
5553
5642
  const _sfc_main$1c = /* @__PURE__ */ defineComponent({
5554
5643
  ...{
@@ -5635,7 +5724,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
5635
5724
  eventBus?.emit("edit-data-source", id);
5636
5725
  };
5637
5726
  return (_ctx, _cache) => {
5638
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
5727
+ return openBlock(), createElementBlock("div", _hoisted_1$S, [
5639
5728
  createElementVNode("div", _hoisted_2$h, [
5640
5729
  createVNode(unref(MContainer), {
5641
5730
  class: "select",
@@ -5681,7 +5770,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
5681
5770
  }
5682
5771
  });
5683
5772
 
5684
- const _hoisted_1$Q = { class: "m-editor-data-source-fields" };
5773
+ const _hoisted_1$R = { class: "m-editor-data-source-fields" };
5685
5774
  const _hoisted_2$g = { class: "m-editor-data-source-fields-footer" };
5686
5775
  const _sfc_main$1b = /* @__PURE__ */ defineComponent({
5687
5776
  ...{
@@ -5887,7 +5976,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
5887
5976
  const parentFloating = inject("parentFloating", ref(null));
5888
5977
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
5889
5978
  return (_ctx, _cache) => {
5890
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
5979
+ return openBlock(), createElementBlock("div", _hoisted_1$R, [
5891
5980
  createVNode(unref(MagicTable), {
5892
5981
  data: _ctx.model[_ctx.name],
5893
5982
  columns
@@ -5903,8 +5992,8 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
5903
5992
  default: withCtx(() => _cache[4] || (_cache[4] = [
5904
5993
  createTextVNode("添加")
5905
5994
  ])),
5906
- _: 1
5907
- /* STABLE */
5995
+ _: 1,
5996
+ __: [4]
5908
5997
  }, 8, ["disabled"])
5909
5998
  ]),
5910
5999
  createVNode(_sfc_main$1j, {
@@ -5935,7 +6024,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
5935
6024
  }
5936
6025
  });
5937
6026
 
5938
- const _hoisted_1$P = { class: "m-fields-data-source-select" };
6027
+ const _hoisted_1$Q = { class: "m-fields-data-source-select" };
5939
6028
  const _sfc_main$1a = /* @__PURE__ */ defineComponent({
5940
6029
  ...{
5941
6030
  name: "MFieldsDataSourceSelect"
@@ -5993,7 +6082,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
5993
6082
  eventBus?.emit("edit-data-source", id);
5994
6083
  };
5995
6084
  return (_ctx, _cache) => {
5996
- return openBlock(), createElementBlock("div", _hoisted_1$P, [
6085
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
5997
6086
  createVNode(unref(MSelect), {
5998
6087
  model: _ctx.model,
5999
6088
  name: _ctx.name,
@@ -6163,7 +6252,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
6163
6252
  }
6164
6253
  });
6165
6254
 
6166
- const _hoisted_1$O = { class: "m-fields-event-select" };
6255
+ const _hoisted_1$P = { class: "m-fields-event-select" };
6167
6256
  const _hoisted_2$f = {
6168
6257
  key: 1,
6169
6258
  class: "fullWidth"
@@ -6188,7 +6277,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
6188
6277
  setup(__props, { emit: __emit }) {
6189
6278
  const props = __props;
6190
6279
  const emit = __emit;
6191
- const { editorService, dataSourceService, eventsService, codeBlockService } = useServices();
6280
+ const { editorService, dataSourceService, eventsService, codeBlockService, propsService } = useServices();
6192
6281
  const eventNameConfig = computed(() => {
6193
6282
  const defaultEventNameConfig = {
6194
6283
  name: "name",
@@ -6260,24 +6349,31 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
6260
6349
  text: "联动类型",
6261
6350
  type: "select",
6262
6351
  defaultValue: ActionType.COMP,
6263
- options: () => [
6264
- {
6265
- text: "组件",
6266
- label: "组件",
6267
- value: ActionType.COMP
6268
- },
6269
- {
6270
- text: "代码",
6271
- label: "代码",
6272
- disabled: !Object.keys(codeBlockService.getCodeDsl() || {}).length,
6273
- value: ActionType.CODE
6274
- },
6275
- {
6276
- text: "数据源",
6277
- label: "数据源",
6278
- value: ActionType.DATA_SOURCE
6352
+ options: () => {
6353
+ const o = [
6354
+ {
6355
+ text: "组件",
6356
+ label: "组件",
6357
+ value: ActionType.COMP
6358
+ }
6359
+ ];
6360
+ if (!propsService.getDisabledCodeBlock()) {
6361
+ o.push({
6362
+ text: "代码",
6363
+ label: "代码",
6364
+ disabled: !Object.keys(codeBlockService.getCodeDsl() || {}).length,
6365
+ value: ActionType.CODE
6366
+ });
6279
6367
  }
6280
- ]
6368
+ if (!propsService.getDisabledDataSource()) {
6369
+ o.push({
6370
+ text: "数据源",
6371
+ label: "数据源",
6372
+ value: ActionType.DATA_SOURCE
6373
+ });
6374
+ }
6375
+ return o;
6376
+ }
6281
6377
  };
6282
6378
  return { ...defaultActionTypeConfig, ...props.config.actionTypeConfig };
6283
6379
  });
@@ -6438,7 +6534,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
6438
6534
  const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
6439
6535
  return (_ctx, _cache) => {
6440
6536
  const _component_m_form_table = resolveComponent("m-form-table");
6441
- return openBlock(), createElementBlock("div", _hoisted_1$O, [
6537
+ return openBlock(), createElementBlock("div", _hoisted_1$P, [
6442
6538
  isOldVersion.value ? (openBlock(), createBlock(_component_m_form_table, {
6443
6539
  key: 0,
6444
6540
  name: "events",
@@ -6458,8 +6554,8 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
6458
6554
  default: withCtx(() => _cache[1] || (_cache[1] = [
6459
6555
  createTextVNode("添加事件")
6460
6556
  ])),
6461
- _: 1
6462
- /* STABLE */
6557
+ _: 1,
6558
+ __: [1]
6463
6559
  }, 8, ["size", "disabled"]),
6464
6560
  (openBlock(true), createElementBlock(
6465
6561
  Fragment,
@@ -6507,7 +6603,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
6507
6603
  }
6508
6604
  });
6509
6605
 
6510
- const _hoisted_1$N = {
6606
+ const _hoisted_1$O = {
6511
6607
  viewBox: "0 0 32 32",
6512
6608
  version: "1.1",
6513
6609
  xmlns: "http://www.w3.org/2000/svg",
@@ -6520,14 +6616,14 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
6520
6616
  __name: "CodeIcon",
6521
6617
  setup(__props) {
6522
6618
  return (_ctx, _cache) => {
6523
- return openBlock(), createElementBlock("svg", _hoisted_1$N, _cache[0] || (_cache[0] = [
6619
+ return openBlock(), createElementBlock("svg", _hoisted_1$O, _cache[0] || (_cache[0] = [
6524
6620
  createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2)
6525
6621
  ]));
6526
6622
  };
6527
6623
  }
6528
6624
  });
6529
6625
 
6530
- const _hoisted_1$M = { class: "m-fields-key-value" };
6626
+ const _hoisted_1$N = { class: "m-fields-key-value" };
6531
6627
  const _hoisted_2$e = { key: 0 };
6532
6628
  const _sfc_main$16 = /* @__PURE__ */ defineComponent({
6533
6629
  ...{
@@ -6591,7 +6687,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
6591
6687
  emit("change", v);
6592
6688
  };
6593
6689
  return (_ctx, _cache) => {
6594
- return openBlock(), createElementBlock("div", _hoisted_1$M, [
6690
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
6595
6691
  !showCode.value ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
6596
6692
  (openBlock(true), createElementBlock(
6597
6693
  Fragment,
@@ -6614,7 +6710,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
6614
6710
  { class: "m-fields-key-value-delimiter" },
6615
6711
  ":",
6616
6712
  -1
6617
- /* HOISTED */
6713
+ /* CACHED */
6618
6714
  )),
6619
6715
  createVNode(unref(TMagicInput), {
6620
6716
  placeholder: "value",
@@ -6650,8 +6746,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
6650
6746
  default: withCtx(() => _cache[2] || (_cache[2] = [
6651
6747
  createTextVNode("添加")
6652
6748
  ])),
6653
- _: 1
6654
- /* STABLE */
6749
+ _: 1,
6750
+ __: [2]
6655
6751
  }, 8, ["size", "disabled", "icon"])
6656
6752
  ])) : createCommentVNode("v-if", true),
6657
6753
  _ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$1q, {
@@ -6678,7 +6774,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
6678
6774
  }
6679
6775
  });
6680
6776
 
6681
- const _hoisted_1$L = { class: "m-fields-page-fragment-select" };
6777
+ const _hoisted_1$M = { class: "m-fields-page-fragment-select" };
6682
6778
  const _hoisted_2$d = { class: "page-fragment-select-container" };
6683
6779
  const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6684
6780
  ...{
@@ -6726,7 +6822,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6726
6822
  };
6727
6823
  return (_ctx, _cache) => {
6728
6824
  const _component_m_form_container = resolveComponent("m-form-container");
6729
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
6825
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [
6730
6826
  createElementVNode("div", _hoisted_2$d, [
6731
6827
  createCommentVNode(" 页面片下拉框 "),
6732
6828
  createVNode(_component_m_form_container, {
@@ -6749,7 +6845,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6749
6845
  }
6750
6846
  });
6751
6847
 
6752
- const _hoisted_1$K = { class: "background-position-container" };
6848
+ const _hoisted_1$L = { class: "background-position-container" };
6753
6849
  const _hoisted_2$c = { class: "presets-value-list" };
6754
6850
  const _hoisted_3$5 = { class: "custom-value" };
6755
6851
  const _sfc_main$14 = /* @__PURE__ */ defineComponent({
@@ -6807,7 +6903,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
6807
6903
  emit("change", v);
6808
6904
  };
6809
6905
  return (_ctx, _cache) => {
6810
- return openBlock(), createElementBlock("div", _hoisted_1$K, [
6906
+ return openBlock(), createElementBlock("div", _hoisted_1$L, [
6811
6907
  createElementVNode("div", _hoisted_2$c, [
6812
6908
  (openBlock(true), createElementBlock(
6813
6909
  Fragment,
@@ -6863,13 +6959,13 @@ const _export_sfc = (sfc, props) => {
6863
6959
 
6864
6960
  const _sfc_main$13 = { };
6865
6961
 
6866
- const _hoisted_1$J = {
6962
+ const _hoisted_1$K = {
6867
6963
  xmlns: "http://www.w3.org/2000/svg",
6868
6964
  viewBox: "0 0 1024 1024"
6869
6965
  };
6870
6966
 
6871
6967
  function _sfc_render$k(_ctx, _cache) {
6872
- return (openBlock(), createElementBlock("svg", _hoisted_1$J, _cache[0] || (_cache[0] = [
6968
+ return (openBlock(), createElementBlock("svg", _hoisted_1$K, _cache[0] || (_cache[0] = [
6873
6969
  createStaticVNode("<path d=\"M884.736 102.4l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456C696.32 311.296 712.704 327.68 733.184 327.68l147.456 0c20.48 0 36.864-16.384 36.864-36.864L917.504 139.264C921.6 118.784 905.216 102.4 884.736 102.4zM884.736 290.816l-147.456 0L737.28 139.264l147.456 0L884.736 290.816z\"></path><path d=\"M884.736 696.32l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C921.6 712.704 905.216 696.32 884.736 696.32zM884.736 884.736l-147.456 0 0-147.456 147.456 0L884.736 884.736z\"></path><path d=\"M884.736 401.408l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C921.6 417.792 905.216 401.408 884.736 401.408zM884.736 585.728l-147.456 0 0-147.456 147.456 0L884.736 585.728z\"></path><path d=\"M585.728 401.408l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C622.592 417.792 606.208 401.408 585.728 401.408zM585.728 585.728l-147.456 0 0-147.456 147.456 0L585.728 585.728z\"></path><path d=\"M585.728 102.4l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864L622.592 139.264C622.592 118.784 606.208 102.4 585.728 102.4zM585.728 290.816l-147.456 0L438.272 139.264l147.456 0L585.728 290.816z\"></path><path d=\"M585.728 696.32l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C622.592 712.704 606.208 696.32 585.728 696.32zM585.728 884.736l-147.456 0 0-147.456 147.456 0L585.728 884.736z\"></path><path d=\"M290.816 696.32 139.264 696.32c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C327.68 712.704 311.296 696.32 290.816 696.32zM290.816 884.736 139.264 884.736l0-147.456 147.456 0L286.72 884.736z\"></path><path d=\"M290.816 401.408 139.264 401.408c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C327.68 417.792 311.296 401.408 290.816 401.408zM290.816 585.728 139.264 585.728l0-147.456 147.456 0L286.72 585.728z\"></path><path d=\"M290.816 102.4 139.264 102.4c-20.48 0-36.864 16.384-36.864 36.864l0 147.456C102.4 311.296 118.784 327.68 139.264 327.68l147.456 0C311.296 327.68 327.68 311.296 327.68 290.816L327.68 139.264C327.68 118.784 311.296 102.4 290.816 102.4zM290.816 290.816 139.264 290.816 139.264 139.264l147.456 0L286.72 290.816z\"></path>", 9)
6874
6970
  ])))
6875
6971
  }
@@ -6877,51 +6973,51 @@ const BackgroundRepeat = /*#__PURE__*/_export_sfc(_sfc_main$13, [['render',_sfc_
6877
6973
 
6878
6974
  const _sfc_main$12 = { };
6879
6975
 
6880
- const _hoisted_1$I = {
6976
+ const _hoisted_1$J = {
6881
6977
  xmlns: "http://www.w3.org/2000/svg",
6882
6978
  viewBox: "0 0 1024 1024"
6883
6979
  };
6884
6980
 
6885
6981
  function _sfc_render$j(_ctx, _cache) {
6886
- return (openBlock(), createElementBlock("svg", _hoisted_1$I, _cache[0] || (_cache[0] = [
6982
+ return (openBlock(), createElementBlock("svg", _hoisted_1$J, _cache[0] || (_cache[0] = [
6887
6983
  createElementVNode("path", {
6888
6984
  d: "M796.444444 170.666667h-227.555555v682.666666h227.555555V170.666667z m-56.888888 625.777777h-113.777778V227.555556h113.777778v568.888888zM455.111111 170.666667H227.555556v682.666666h227.555555V170.666667zM398.222222 796.444444H284.444444V227.555556h113.777778v568.888888zM910.222222 56.888889h56.888889v910.222222h-56.888889zM56.888889 56.888889h56.888889v910.222222H56.888889z",
6889
6985
  fill: "#333333"
6890
- }, null, -1 /* HOISTED */)
6986
+ }, null, -1 /* CACHED */)
6891
6987
  ])))
6892
6988
  }
6893
6989
  const BackgroundRepeatX = /*#__PURE__*/_export_sfc(_sfc_main$12, [['render',_sfc_render$j]]);
6894
6990
 
6895
6991
  const _sfc_main$11 = { };
6896
6992
 
6897
- const _hoisted_1$H = {
6993
+ const _hoisted_1$I = {
6898
6994
  xmlns: "http://www.w3.org/2000/svg",
6899
6995
  viewBox: "0 0 1024 1024"
6900
6996
  };
6901
6997
 
6902
6998
  function _sfc_render$i(_ctx, _cache) {
6903
- return (openBlock(), createElementBlock("svg", _hoisted_1$H, _cache[0] || (_cache[0] = [
6999
+ return (openBlock(), createElementBlock("svg", _hoisted_1$I, _cache[0] || (_cache[0] = [
6904
7000
  createElementVNode("path", {
6905
7001
  d: "M170.666667 227.555556v227.555555h682.666666V227.555556H170.666667z m625.777777 56.888888v113.777778H227.555556V284.444444h568.888888zM170.666667 568.888889v227.555555h682.666666v-227.555555H170.666667z m625.777777 56.888889v113.777778H227.555556v-113.777778h568.888888zM56.888889 56.888889h910.222222v56.888889H56.888889zM56.888889 910.222222h910.222222v56.888889H56.888889z",
6906
7002
  fill: "#333333"
6907
- }, null, -1 /* HOISTED */)
7003
+ }, null, -1 /* CACHED */)
6908
7004
  ])))
6909
7005
  }
6910
7006
  const BackgroundRepeatY = /*#__PURE__*/_export_sfc(_sfc_main$11, [['render',_sfc_render$i]]);
6911
7007
 
6912
7008
  const _sfc_main$10 = { };
6913
7009
 
6914
- const _hoisted_1$G = {
7010
+ const _hoisted_1$H = {
6915
7011
  xmlns: "http://www.w3.org/2000/svg",
6916
7012
  viewBox: "0 0 1024 1024"
6917
7013
  };
6918
7014
 
6919
7015
  function _sfc_render$h(_ctx, _cache) {
6920
- return (openBlock(), createElementBlock("svg", _hoisted_1$G, _cache[0] || (_cache[0] = [
7016
+ return (openBlock(), createElementBlock("svg", _hoisted_1$H, _cache[0] || (_cache[0] = [
6921
7017
  createElementVNode("path", {
6922
7018
  d: "M912.526651 867.741144 555.540144 510.712681l356.986507-357.000833c11.171434-11.18576 11.171434-29.257348 0-40.443108-11.20111-11.18576-29.272697-11.18576-40.444131 0L515.096013 470.267527 158.096203 113.267716c-11.187807-11.159154-29.258371-11.159154-40.444131 0-11.186783 11.186783-11.186783 29.286 0 40.47176L474.623229 510.712681 117.623419 867.741144c-11.159154 11.172457-11.159154 29.216415 0 40.443108 11.18576 11.17348 29.284977 11.17348 40.47176 0l357.000833-357.027439 356.985484 357.027439c11.171434 11.17348 29.243021 11.17348 40.444131 0C923.698085 896.957559 923.725714 878.913601 912.526651 867.741144z",
6923
7019
  fill: "#5D5D5D"
6924
- }, null, -1 /* HOISTED */)
7020
+ }, null, -1 /* CACHED */)
6925
7021
  ])))
6926
7022
  }
6927
7023
  const BackgroundNoRepeat = /*#__PURE__*/_export_sfc(_sfc_main$10, [['render',_sfc_render$h]]);
@@ -7003,42 +7099,42 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
7003
7099
 
7004
7100
  const _sfc_main$_ = { };
7005
7101
 
7006
- const _hoisted_1$F = {
7102
+ const _hoisted_1$G = {
7007
7103
  xmlns: "http://www.w3.org/2000/svg",
7008
7104
  viewBox: "0 0 1024 1024"
7009
7105
  };
7010
7106
 
7011
7107
  function _sfc_render$g(_ctx, _cache) {
7012
- return (openBlock(), createElementBlock("svg", _hoisted_1$F, _cache[0] || (_cache[0] = [
7013
- createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m0-170.666667h512v85.333333H128z m0-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m0 170.666667h512v85.333333H128z" }, null, -1 /* HOISTED */)
7108
+ return (openBlock(), createElementBlock("svg", _hoisted_1$G, _cache[0] || (_cache[0] = [
7109
+ createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m0-170.666667h512v85.333333H128z m0-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m0 170.666667h512v85.333333H128z" }, null, -1 /* CACHED */)
7014
7110
  ])))
7015
7111
  }
7016
7112
  const AlignLeft = /*#__PURE__*/_export_sfc(_sfc_main$_, [['render',_sfc_render$g]]);
7017
7113
 
7018
7114
  const _sfc_main$Z = { };
7019
7115
 
7020
- const _hoisted_1$E = {
7116
+ const _hoisted_1$F = {
7021
7117
  xmlns: "http://www.w3.org/2000/svg",
7022
7118
  viewBox: "0 0 1024 1024"
7023
7119
  };
7024
7120
 
7025
7121
  function _sfc_render$f(_ctx, _cache) {
7026
- return (openBlock(), createElementBlock("svg", _hoisted_1$E, _cache[0] || (_cache[0] = [
7027
- createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m128-170.666667h512v85.333333H256z m-128-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m128 170.666667h512v85.333333H256z" }, null, -1 /* HOISTED */)
7122
+ return (openBlock(), createElementBlock("svg", _hoisted_1$F, _cache[0] || (_cache[0] = [
7123
+ createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m128-170.666667h512v85.333333H256z m-128-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m128 170.666667h512v85.333333H256z" }, null, -1 /* CACHED */)
7028
7124
  ])))
7029
7125
  }
7030
7126
  const AlignCenter = /*#__PURE__*/_export_sfc(_sfc_main$Z, [['render',_sfc_render$f]]);
7031
7127
 
7032
7128
  const _sfc_main$Y = { };
7033
7129
 
7034
- const _hoisted_1$D = {
7130
+ const _hoisted_1$E = {
7035
7131
  xmlns: "http://www.w3.org/2000/svg",
7036
7132
  viewBox: "0 0 1024 1024"
7037
7133
  };
7038
7134
 
7039
7135
  function _sfc_render$e(_ctx, _cache) {
7040
- return (openBlock(), createElementBlock("svg", _hoisted_1$D, _cache[0] || (_cache[0] = [
7041
- createElementVNode("path", { d: "M128 128h768v85.333333H128z m0 682.666667h768v85.333333H128z m213.333333-170.666667h554.666667v85.333333H341.333333z m-213.333333-170.666667h768v85.333334H128z m213.333333-170.666666h554.666667v85.333333H341.333333z" }, null, -1 /* HOISTED */)
7136
+ return (openBlock(), createElementBlock("svg", _hoisted_1$E, _cache[0] || (_cache[0] = [
7137
+ createElementVNode("path", { d: "M128 128h768v85.333333H128z m0 682.666667h768v85.333333H128z m213.333333-170.666667h554.666667v85.333333H341.333333z m-213.333333-170.666667h768v85.333334H128z m213.333333-170.666666h554.666667v85.333333H341.333333z" }, null, -1 /* CACHED */)
7042
7138
  ])))
7043
7139
  }
7044
7140
  const AlignRight = /*#__PURE__*/_export_sfc(_sfc_main$Y, [['render',_sfc_render$e]]);
@@ -7127,7 +7223,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7127
7223
  }
7128
7224
  });
7129
7225
 
7130
- const _hoisted_1$C = { class: "layout-box-container" };
7226
+ const _hoisted_1$D = { class: "layout-box-container" };
7131
7227
  const _hoisted_2$b = {
7132
7228
  key: 0,
7133
7229
  class: "help-txt"
@@ -7184,7 +7280,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
7184
7280
  });
7185
7281
  };
7186
7282
  return (_ctx, _cache) => {
7187
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
7283
+ return openBlock(), createElementBlock("div", _hoisted_1$D, [
7188
7284
  (openBlock(), createElementBlock(
7189
7285
  Fragment,
7190
7286
  null,
@@ -7228,196 +7324,196 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
7228
7324
 
7229
7325
  const _sfc_main$V = { };
7230
7326
 
7231
- const _hoisted_1$B = {
7327
+ const _hoisted_1$C = {
7232
7328
  xmlns: "http://www.w3.org/2000/svg",
7233
7329
  viewBox: "0 0 1024 1024"
7234
7330
  };
7235
7331
 
7236
7332
  function _sfc_render$d(_ctx, _cache) {
7237
- return (openBlock(), createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
7238
- createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-96 64a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h704z" }, null, -1 /* HOISTED */)
7333
+ return (openBlock(), createElementBlock("svg", _hoisted_1$C, _cache[0] || (_cache[0] = [
7334
+ createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-96 64a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h704z" }, null, -1 /* CACHED */)
7239
7335
  ])))
7240
7336
  }
7241
7337
  const DisplayBlock = /*#__PURE__*/_export_sfc(_sfc_main$V, [['render',_sfc_render$d]]);
7242
7338
 
7243
7339
  const _sfc_main$U = { };
7244
7340
 
7245
- const _hoisted_1$A = {
7341
+ const _hoisted_1$B = {
7246
7342
  xmlns: "http://www.w3.org/2000/svg",
7247
7343
  viewBox: "0 0 1024 1024"
7248
7344
  };
7249
7345
 
7250
7346
  function _sfc_render$c(_ctx, _cache) {
7251
- return (openBlock(), createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
7252
- createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM352 256v512H160V256h192z m256 0v512h-192V256h192z m256 0v512h-192V256h192z" }, null, -1 /* HOISTED */)
7347
+ return (openBlock(), createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
7348
+ createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM352 256v512H160V256h192z m256 0v512h-192V256h192z m256 0v512h-192V256h192z" }, null, -1 /* CACHED */)
7253
7349
  ])))
7254
7350
  }
7255
7351
  const DisplayFlex = /*#__PURE__*/_export_sfc(_sfc_main$U, [['render',_sfc_render$c]]);
7256
7352
 
7257
7353
  const _sfc_main$T = { };
7258
7354
 
7259
- const _hoisted_1$z = {
7355
+ const _hoisted_1$A = {
7260
7356
  xmlns: "http://www.w3.org/2000/svg",
7261
7357
  viewBox: "0 0 1024 1024"
7262
7358
  };
7263
7359
 
7264
7360
  function _sfc_render$b(_ctx, _cache) {
7265
- return (openBlock(), createElementBlock("svg", _hoisted_1$z, _cache[0] || (_cache[0] = [
7266
- createElementVNode("path", { d: "M787.616 651.36a142.72 142.72 0 0 0 52.864 31.904 205.504 205.504 0 0 0 67.264 10.848 245.76 245.76 0 0 0 38.784-2.4c9.504-1.6 19.36-4 30.208-7.04 8.16-2.24 15.968-5.12 23.36-8.32l23.392-10.816V587.52h-8.736c-3.968 3.424-8.96 7.648-15.104 12.544a190.272 190.272 0 0 1-19.936 13.504 120.32 120.32 0 0 1-27.616 12.544 102.528 102.528 0 0 1-62.72-0.576 80 80 0 0 1-29.824-17.088 89.28 89.28 0 0 1-21.664-32.512c-5.696-13.664-8.64-30.784-8.64-51.296 0-19.744 2.72-36.384 7.968-50.08 5.248-13.664 12.384-24.896 20.992-33.056 9.12-8.832 18.816-14.816 29.632-18.816a101.824 101.824 0 0 1 63.68-0.736c9.408 3.136 18.08 7.04 26.112 11.68 13.024 7.808 25.28 16.768 36.672 26.784H1024v-78.72c-6.08-2.88-13.12-6.08-21.12-9.6a205.984 205.984 0 0 0-57.152-15.36 270.016 270.016 0 0 0-37.056-2.304c-24.864 0-47.744 4-68.704 11.84-20.992 7.776-38.432 18.784-52.64 33.6a144.256 144.256 0 0 0-33.632 54.176 207.68 207.68 0 0 0-12.48 70.176c0 27.84 3.968 52.352 12.16 73.568a146.08 146.08 0 0 0 34.176 53.184l0.064 0.416z m-186.112 34.656a122.912 122.912 0 0 0 42.784-21.504c11.2-8.32 20.224-19.296 26.24-31.936 6.56-13.664 9.888-28.704 9.664-43.904 0-22.784-6.272-41.024-18.912-54.72-12.544-13.92-29.664-23.04-51.104-27.36v-2.304c14.4-6.24 26.688-16.448 35.52-29.408 8.384-12.544 12.544-27.008 12.544-43.52 0-14.24-2.944-26.784-9.12-37.6a65.696 65.696 0 0 0-27.936-26.24 117.44 117.44 0 0 0-36.48-12.096A437.312 437.312 0 0 0 526.656 352h-127.552v340.384h143.392c23.84 0 43.52-2.112 59.008-6.4z m-118.112-271.584h7.968c16.544 0 29.472 0.128 38.656 0.352 9.248 0.576 16.864 1.728 23.04 4a26.24 26.24 0 0 1 14.4 13.12c2.656 5.28 4.064 11.072 4.128 16.96 0.16 6.656-1.056 13.248-3.52 19.392a28.064 28.064 0 0 1-15.04 13.696c-7.04 2.912-14.56 4.48-22.208 4.576-9.472 0.32-20.864 0.544-34.24 0.544h-13.184v-72.64z m6.144 215.52h-6.144v-84.8h18.464c12.64 0 24.736 0 36.384 0.256 9.216-0.16 18.432 0.896 27.36 3.2 9.696 2.848 16.544 7.232 20.512 13.12 4 5.92 6.08 14.24 6.08 25.088 0 8.192-1.728 15.488-4.992 21.824-3.232 6.336-9.696 11.392-18.24 15.392-8.544 4-18.24 5.696-28.48 6.272-10.304 0.224-27.392 0.224-51.328 0.224l0.384-0.576z m-378.56-6.016h124.672l23.36 68.416H348.8L224.32 353.728H124.416L0 692.384h87.52l23.488-68.416-0.064-0.032z m62.336-183.552l41.472 121.44h-82.88l41.408-121.44z" }, null, -1 /* HOISTED */)
7361
+ return (openBlock(), createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
7362
+ createElementVNode("path", { d: "M787.616 651.36a142.72 142.72 0 0 0 52.864 31.904 205.504 205.504 0 0 0 67.264 10.848 245.76 245.76 0 0 0 38.784-2.4c9.504-1.6 19.36-4 30.208-7.04 8.16-2.24 15.968-5.12 23.36-8.32l23.392-10.816V587.52h-8.736c-3.968 3.424-8.96 7.648-15.104 12.544a190.272 190.272 0 0 1-19.936 13.504 120.32 120.32 0 0 1-27.616 12.544 102.528 102.528 0 0 1-62.72-0.576 80 80 0 0 1-29.824-17.088 89.28 89.28 0 0 1-21.664-32.512c-5.696-13.664-8.64-30.784-8.64-51.296 0-19.744 2.72-36.384 7.968-50.08 5.248-13.664 12.384-24.896 20.992-33.056 9.12-8.832 18.816-14.816 29.632-18.816a101.824 101.824 0 0 1 63.68-0.736c9.408 3.136 18.08 7.04 26.112 11.68 13.024 7.808 25.28 16.768 36.672 26.784H1024v-78.72c-6.08-2.88-13.12-6.08-21.12-9.6a205.984 205.984 0 0 0-57.152-15.36 270.016 270.016 0 0 0-37.056-2.304c-24.864 0-47.744 4-68.704 11.84-20.992 7.776-38.432 18.784-52.64 33.6a144.256 144.256 0 0 0-33.632 54.176 207.68 207.68 0 0 0-12.48 70.176c0 27.84 3.968 52.352 12.16 73.568a146.08 146.08 0 0 0 34.176 53.184l0.064 0.416z m-186.112 34.656a122.912 122.912 0 0 0 42.784-21.504c11.2-8.32 20.224-19.296 26.24-31.936 6.56-13.664 9.888-28.704 9.664-43.904 0-22.784-6.272-41.024-18.912-54.72-12.544-13.92-29.664-23.04-51.104-27.36v-2.304c14.4-6.24 26.688-16.448 35.52-29.408 8.384-12.544 12.544-27.008 12.544-43.52 0-14.24-2.944-26.784-9.12-37.6a65.696 65.696 0 0 0-27.936-26.24 117.44 117.44 0 0 0-36.48-12.096A437.312 437.312 0 0 0 526.656 352h-127.552v340.384h143.392c23.84 0 43.52-2.112 59.008-6.4z m-118.112-271.584h7.968c16.544 0 29.472 0.128 38.656 0.352 9.248 0.576 16.864 1.728 23.04 4a26.24 26.24 0 0 1 14.4 13.12c2.656 5.28 4.064 11.072 4.128 16.96 0.16 6.656-1.056 13.248-3.52 19.392a28.064 28.064 0 0 1-15.04 13.696c-7.04 2.912-14.56 4.48-22.208 4.576-9.472 0.32-20.864 0.544-34.24 0.544h-13.184v-72.64z m6.144 215.52h-6.144v-84.8h18.464c12.64 0 24.736 0 36.384 0.256 9.216-0.16 18.432 0.896 27.36 3.2 9.696 2.848 16.544 7.232 20.512 13.12 4 5.92 6.08 14.24 6.08 25.088 0 8.192-1.728 15.488-4.992 21.824-3.232 6.336-9.696 11.392-18.24 15.392-8.544 4-18.24 5.696-28.48 6.272-10.304 0.224-27.392 0.224-51.328 0.224l0.384-0.576z m-378.56-6.016h124.672l23.36 68.416H348.8L224.32 353.728H124.416L0 692.384h87.52l23.488-68.416-0.064-0.032z m62.336-183.552l41.472 121.44h-82.88l41.408-121.44z" }, null, -1 /* CACHED */)
7267
7363
  ])))
7268
7364
  }
7269
7365
  const DisplayInline = /*#__PURE__*/_export_sfc(_sfc_main$T, [['render',_sfc_render$b]]);
7270
7366
 
7271
7367
  const _sfc_main$S = { };
7272
7368
 
7273
- const _hoisted_1$y = {
7369
+ const _hoisted_1$z = {
7274
7370
  xmlns: "http://www.w3.org/2000/svg",
7275
7371
  viewBox: "0 0 1024 1024"
7276
7372
  };
7277
7373
 
7278
7374
  function _sfc_render$a(_ctx, _cache) {
7279
- return (openBlock(), createElementBlock("svg", _hoisted_1$y, _cache[0] || (_cache[0] = [
7280
- createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-131.936 158.496c65.984 1.824 109.024 32.512 129.184 92.064l-65.952 15.136-1.856-5.664c-9.984-27.52-30.432-42.112-61.376-43.84-46.72 2.784-71.456 35.296-74.208 97.6 1.856 63.2 26.56 96.64 74.24 100.32 37.536-0.928 59.52-23.36 65.92-67.328L960 559.36l-1.792 7.232c-16.96 63.872-60.352 95.84-130.144 95.84-93.44-4.608-142.464-56.8-147.04-156.672 4.576-98.048 53.6-149.792 147.04-155.296z m-568.928 4.128l114.08 302.336H297.6l-22.016-65.984H160.192L138.24 656.96H64l112.672-302.336h82.464z m278.976 0l7.68 0.32c62.816 3.36 96 27.104 99.52 71.136 0 35.744-19.712 59.552-59.104 71.456 42.144 9.184 65.952 32.544 71.456 70.08 0 59.552-37.568 89.344-112.672 89.344h-148.416v-302.336h141.536z m-4.128 173.152H465.28v81.088h67.328c33.92 0 51.296-13.76 52.224-41.248-2.752-25.632-19.68-38.912-50.848-39.84zM217.92 408.224h-1.376l-0.96 7.36c-1.184 7.232-3.168 13.92-5.92 20.128l-34.336 103.04h87.936l-38.464-104.416-2.624-9.024c-1.6-5.888-3.04-11.584-4.256-17.088z m309.184-2.752H465.28v71.456h61.824c29.344-0.928 44.448-13.76 45.376-38.464-0.96-22.016-16.032-32.992-45.376-32.992z" }, null, -1 /* HOISTED */)
7375
+ return (openBlock(), createElementBlock("svg", _hoisted_1$z, _cache[0] || (_cache[0] = [
7376
+ createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-131.936 158.496c65.984 1.824 109.024 32.512 129.184 92.064l-65.952 15.136-1.856-5.664c-9.984-27.52-30.432-42.112-61.376-43.84-46.72 2.784-71.456 35.296-74.208 97.6 1.856 63.2 26.56 96.64 74.24 100.32 37.536-0.928 59.52-23.36 65.92-67.328L960 559.36l-1.792 7.232c-16.96 63.872-60.352 95.84-130.144 95.84-93.44-4.608-142.464-56.8-147.04-156.672 4.576-98.048 53.6-149.792 147.04-155.296z m-568.928 4.128l114.08 302.336H297.6l-22.016-65.984H160.192L138.24 656.96H64l112.672-302.336h82.464z m278.976 0l7.68 0.32c62.816 3.36 96 27.104 99.52 71.136 0 35.744-19.712 59.552-59.104 71.456 42.144 9.184 65.952 32.544 71.456 70.08 0 59.552-37.568 89.344-112.672 89.344h-148.416v-302.336h141.536z m-4.128 173.152H465.28v81.088h67.328c33.92 0 51.296-13.76 52.224-41.248-2.752-25.632-19.68-38.912-50.848-39.84zM217.92 408.224h-1.376l-0.96 7.36c-1.184 7.232-3.168 13.92-5.92 20.128l-34.336 103.04h87.936l-38.464-104.416-2.624-9.024c-1.6-5.888-3.04-11.584-4.256-17.088z m309.184-2.752H465.28v71.456h61.824c29.344-0.928 44.448-13.76 45.376-38.464-0.96-22.016-16.032-32.992-45.376-32.992z" }, null, -1 /* CACHED */)
7281
7377
  ])))
7282
7378
  }
7283
7379
  const DisplayInlineBlock = /*#__PURE__*/_export_sfc(_sfc_main$S, [['render',_sfc_render$a]]);
7284
7380
 
7285
7381
  const _sfc_main$R = { };
7286
7382
 
7287
- const _hoisted_1$x = {
7383
+ const _hoisted_1$y = {
7288
7384
  xmlns: "http://www.w3.org/2000/svg",
7289
7385
  viewBox: "0 0 1024 1024"
7290
7386
  };
7291
7387
 
7292
7388
  function _sfc_render$9(_ctx, _cache) {
7293
- return (openBlock(), createElementBlock("svg", _hoisted_1$x, _cache[0] || (_cache[0] = [
7294
- createElementVNode("path", { d: "M931.37 477.14c-43.94-69.49-93.39-125.03-147.99-166.35L663.31 441.46c8.79 21.36 13.63 44.91 13.63 69.62 0 96.27-73.84 174.32-164.95 174.32-21.63 0-42.28-4.39-61.32-12.47l-94.09 102.52a455.097 455.097 0 0 0 155.41 26.2c172.62 0 312.43-85.54 419.59-256.63 12.83-20.43 12.72-47.45-0.21-67.88zM795.52 127.99L682.24 252.82C627.73 231 570.1 220.04 512.11 220.5c-171.15 0-310.99 85.66-419.48 256.75-12.93 20.43-13.04 47.33-0.2 67.78 46.95 75.15 100.3 133.68 160.01 175.82L131.9 853.65l38.9 42.36 663.6-725.76-38.88-42.26zM519.68 438.37c-3.72-0.59-7.46-0.81-11.27-0.81-45.63 0-82.43 39.03-82.43 87.16 0 4.97 0.42 9.81 1.14 14.54l-57.15 60.14-5.92 8.33c-13.15-24.94-20.5-53.68-20.5-84.28 0-96.3 73.84-174.45 164.95-174.45 27.2 0 52.76 6.93 75.4 19.29l-64.22 70.08z m52.05 135.53c21.74-23.26 27.17-55.48 16.31-81.39l-96.42 103.16c26.59 9.08 58.38 1.48 80.11-21.77z" }, null, -1 /* HOISTED */)
7389
+ return (openBlock(), createElementBlock("svg", _hoisted_1$y, _cache[0] || (_cache[0] = [
7390
+ createElementVNode("path", { d: "M931.37 477.14c-43.94-69.49-93.39-125.03-147.99-166.35L663.31 441.46c8.79 21.36 13.63 44.91 13.63 69.62 0 96.27-73.84 174.32-164.95 174.32-21.63 0-42.28-4.39-61.32-12.47l-94.09 102.52a455.097 455.097 0 0 0 155.41 26.2c172.62 0 312.43-85.54 419.59-256.63 12.83-20.43 12.72-47.45-0.21-67.88zM795.52 127.99L682.24 252.82C627.73 231 570.1 220.04 512.11 220.5c-171.15 0-310.99 85.66-419.48 256.75-12.93 20.43-13.04 47.33-0.2 67.78 46.95 75.15 100.3 133.68 160.01 175.82L131.9 853.65l38.9 42.36 663.6-725.76-38.88-42.26zM519.68 438.37c-3.72-0.59-7.46-0.81-11.27-0.81-45.63 0-82.43 39.03-82.43 87.16 0 4.97 0.42 9.81 1.14 14.54l-57.15 60.14-5.92 8.33c-13.15-24.94-20.5-53.68-20.5-84.28 0-96.3 73.84-174.45 164.95-174.45 27.2 0 52.76 6.93 75.4 19.29l-64.22 70.08z m52.05 135.53c21.74-23.26 27.17-55.48 16.31-81.39l-96.42 103.16c26.59 9.08 58.38 1.48 80.11-21.77z" }, null, -1 /* CACHED */)
7295
7391
  ])))
7296
7392
  }
7297
7393
  const DisplayNone = /*#__PURE__*/_export_sfc(_sfc_main$R, [['render',_sfc_render$9]]);
7298
7394
 
7299
7395
  const _sfc_main$Q = { };
7300
7396
 
7301
- const _hoisted_1$w = {
7397
+ const _hoisted_1$x = {
7302
7398
  xmlns: "http://www.w3.org/2000/svg",
7303
7399
  viewBox: "0 0 1024 1024"
7304
7400
  };
7305
7401
 
7306
7402
  function _sfc_render$8(_ctx, _cache) {
7307
- return (openBlock(), createElementBlock("svg", _hoisted_1$w, _cache[0] || (_cache[0] = [
7308
- createElementVNode("path", { d: "M896 320H128V0h768v320z m0 320H128v-256h768v256z m-128 192l-256 192-256-192 192-0.032V704h128v128h192z" }, null, -1 /* HOISTED */)
7403
+ return (openBlock(), createElementBlock("svg", _hoisted_1$x, _cache[0] || (_cache[0] = [
7404
+ createElementVNode("path", { d: "M896 320H128V0h768v320z m0 320H128v-256h768v256z m-128 192l-256 192-256-192 192-0.032V704h128v128h192z" }, null, -1 /* CACHED */)
7309
7405
  ])))
7310
7406
  }
7311
7407
  const FlexDirectionColumn = /*#__PURE__*/_export_sfc(_sfc_main$Q, [['render',_sfc_render$8]]);
7312
7408
 
7313
7409
  const _sfc_main$P = { };
7314
7410
 
7315
- const _hoisted_1$v = {
7411
+ const _hoisted_1$w = {
7316
7412
  xmlns: "http://www.w3.org/2000/svg",
7317
7413
  viewBox: "0 0 1024 1024"
7318
7414
  };
7319
7415
 
7320
7416
  function _sfc_render$7(_ctx, _cache) {
7321
- return (openBlock(), createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
7322
- createElementVNode("path", { d: "M896 704H128v320h768V704z m0-320H128v256h768v-256z m-128-192l-256-192-256 192 192 0.032V320h128V192h192z" }, null, -1 /* HOISTED */)
7417
+ return (openBlock(), createElementBlock("svg", _hoisted_1$w, _cache[0] || (_cache[0] = [
7418
+ createElementVNode("path", { d: "M896 704H128v320h768V704z m0-320H128v256h768v-256z m-128-192l-256-192-256 192 192 0.032V320h128V192h192z" }, null, -1 /* CACHED */)
7323
7419
  ])))
7324
7420
  }
7325
7421
  const FlexDirectionColumnReverse = /*#__PURE__*/_export_sfc(_sfc_main$P, [['render',_sfc_render$7]]);
7326
7422
 
7327
7423
  const _sfc_main$O = { };
7328
7424
 
7329
- const _hoisted_1$u = {
7425
+ const _hoisted_1$v = {
7330
7426
  xmlns: "http://www.w3.org/2000/svg",
7331
7427
  viewBox: "0 0 1024 1024"
7332
7428
  };
7333
7429
 
7334
7430
  function _sfc_render$6(_ctx, _cache) {
7335
- return (openBlock(), createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
7336
- createElementVNode("path", { d: "M320 128v768H0V128h320z m320 0v768h-256V128h256z m192 128l192 256-192 256-0.032-192H704v-128h128V256z" }, null, -1 /* HOISTED */)
7431
+ return (openBlock(), createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
7432
+ createElementVNode("path", { d: "M320 128v768H0V128h320z m320 0v768h-256V128h256z m192 128l192 256-192 256-0.032-192H704v-128h128V256z" }, null, -1 /* CACHED */)
7337
7433
  ])))
7338
7434
  }
7339
7435
  const FlexDirectionRow = /*#__PURE__*/_export_sfc(_sfc_main$O, [['render',_sfc_render$6]]);
7340
7436
 
7341
7437
  const _sfc_main$N = { };
7342
7438
 
7343
- const _hoisted_1$t = {
7439
+ const _hoisted_1$u = {
7344
7440
  xmlns: "http://www.w3.org/2000/svg",
7345
7441
  viewBox: "0 0 1024 1024"
7346
7442
  };
7347
7443
 
7348
7444
  function _sfc_render$5(_ctx, _cache) {
7349
- return (openBlock(), createElementBlock("svg", _hoisted_1$t, _cache[0] || (_cache[0] = [
7350
- createElementVNode("path", { d: "M704 128v768h320V128H704zM384 128v768h256V128h-256zM192 256l-192 256 192 256 0.032-192H320v-128H192V256z" }, null, -1 /* HOISTED */)
7445
+ return (openBlock(), createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
7446
+ createElementVNode("path", { d: "M704 128v768h320V128H704zM384 128v768h256V128h-256zM192 256l-192 256 192 256 0.032-192H320v-128H192V256z" }, null, -1 /* CACHED */)
7351
7447
  ])))
7352
7448
  }
7353
7449
  const FlexDirectionRowReverse = /*#__PURE__*/_export_sfc(_sfc_main$N, [['render',_sfc_render$5]]);
7354
7450
 
7355
7451
  const _sfc_main$M = { };
7356
7452
 
7357
- const _hoisted_1$s = {
7453
+ const _hoisted_1$t = {
7358
7454
  xmlns: "http://www.w3.org/2000/svg",
7359
7455
  viewBox: "0 0 1024 1024"
7360
7456
  };
7361
7457
 
7362
7458
  function _sfc_render$4(_ctx, _cache) {
7363
- return (openBlock(), createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
7364
- createElementVNode("path", { d: "M480 1024V0h64v1024h-64z m128-64V64h320v896H608zM96 960V64h320v896H96z" }, null, -1 /* HOISTED */)
7459
+ return (openBlock(), createElementBlock("svg", _hoisted_1$t, _cache[0] || (_cache[0] = [
7460
+ createElementVNode("path", { d: "M480 1024V0h64v1024h-64z m128-64V64h320v896H608zM96 960V64h320v896H96z" }, null, -1 /* CACHED */)
7365
7461
  ])))
7366
7462
  }
7367
7463
  const JustifyContentCenter = /*#__PURE__*/_export_sfc(_sfc_main$M, [['render',_sfc_render$4]]);
7368
7464
 
7369
7465
  const _sfc_main$L = { };
7370
7466
 
7371
- const _hoisted_1$r = {
7467
+ const _hoisted_1$s = {
7372
7468
  xmlns: "http://www.w3.org/2000/svg",
7373
7469
  viewBox: "0 0 1024 1024"
7374
7470
  };
7375
7471
 
7376
7472
  function _sfc_render$3(_ctx, _cache) {
7377
- return (openBlock(), createElementBlock("svg", _hoisted_1$r, _cache[0] || (_cache[0] = [
7378
- createElementVNode("path", { d: "M416 160H96v704h320V160z m384 0H480v704h320V160z m128-160h-64v1024h64V0z" }, null, -1 /* HOISTED */)
7473
+ return (openBlock(), createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
7474
+ createElementVNode("path", { d: "M416 160H96v704h320V160z m384 0H480v704h320V160z m128-160h-64v1024h64V0z" }, null, -1 /* CACHED */)
7379
7475
  ])))
7380
7476
  }
7381
7477
  const JustifyContentFlexEnd = /*#__PURE__*/_export_sfc(_sfc_main$L, [['render',_sfc_render$3]]);
7382
7478
 
7383
7479
  const _sfc_main$K = { };
7384
7480
 
7385
- const _hoisted_1$q = {
7481
+ const _hoisted_1$r = {
7386
7482
  xmlns: "http://www.w3.org/2000/svg",
7387
7483
  viewBox: "0 0 1024 1024"
7388
7484
  };
7389
7485
 
7390
7486
  function _sfc_render$2(_ctx, _cache) {
7391
- return (openBlock(), createElementBlock("svg", _hoisted_1$q, _cache[0] || (_cache[0] = [
7392
- createElementVNode("path", { d: "M608 160h320v704H608V160zM224 160h320v704H224V160zM96 0h64v1024H96V0z" }, null, -1 /* HOISTED */)
7487
+ return (openBlock(), createElementBlock("svg", _hoisted_1$r, _cache[0] || (_cache[0] = [
7488
+ createElementVNode("path", { d: "M608 160h320v704H608V160zM224 160h320v704H224V160zM96 0h64v1024H96V0z" }, null, -1 /* CACHED */)
7393
7489
  ])))
7394
7490
  }
7395
7491
  const JustifyContentFlexStart = /*#__PURE__*/_export_sfc(_sfc_main$K, [['render',_sfc_render$2]]);
7396
7492
 
7397
7493
  const _sfc_main$J = { };
7398
7494
 
7399
- const _hoisted_1$p = {
7495
+ const _hoisted_1$q = {
7400
7496
  xmlns: "http://www.w3.org/2000/svg",
7401
7497
  viewBox: "0 0 1024 1024"
7402
7498
  };
7403
7499
 
7404
7500
  function _sfc_render$1(_ctx, _cache) {
7405
- return (openBlock(), createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
7406
- createElementVNode("path", { d: "M320 864H192v160H128v-160H0V160h128V0h64v160h128v704z m704 0h-128v160h-64v-160h-128V160h128V0h64v160h128v704z" }, null, -1 /* HOISTED */)
7501
+ return (openBlock(), createElementBlock("svg", _hoisted_1$q, _cache[0] || (_cache[0] = [
7502
+ createElementVNode("path", { d: "M320 864H192v160H128v-160H0V160h128V0h64v160h128v704z m704 0h-128v160h-64v-160h-128V160h128V0h64v160h128v704z" }, null, -1 /* CACHED */)
7407
7503
  ])))
7408
7504
  }
7409
7505
  const JustifyContentSpaceAround = /*#__PURE__*/_export_sfc(_sfc_main$J, [['render',_sfc_render$1]]);
7410
7506
 
7411
7507
  const _sfc_main$I = { };
7412
7508
 
7413
- const _hoisted_1$o = {
7509
+ const _hoisted_1$p = {
7414
7510
  xmlns: "http://www.w3.org/2000/svg",
7415
7511
  viewBox: "0 0 1024 1024"
7416
7512
  };
7417
7513
 
7418
7514
  function _sfc_render(_ctx, _cache) {
7419
- return (openBlock(), createElementBlock("svg", _hoisted_1$o, _cache[0] || (_cache[0] = [
7420
- createElementVNode("path", { d: "M64 1024H0V0h64v1024z m384-160H128V160h320v704z m448 0H576V160h320v704z m128 160h-64V0h64v1024z" }, null, -1 /* HOISTED */)
7515
+ return (openBlock(), createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
7516
+ createElementVNode("path", { d: "M64 1024H0V0h64v1024z m384-160H128V160h320v704z m448 0H576V160h320v704z m128 160h-64V0h64v1024z" }, null, -1 /* CACHED */)
7421
7517
  ])))
7422
7518
  }
7423
7519
  const JustifyContentSpaceBetween = /*#__PURE__*/_export_sfc(_sfc_main$I, [['render',_sfc_render]]);
@@ -7605,6 +7701,13 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
7605
7701
  setup(__props, { emit: __emit }) {
7606
7702
  const props = __props;
7607
7703
  const emit = __emit;
7704
+ const positionText = {
7705
+ static: "不定位",
7706
+ relative: "相对定位",
7707
+ absolute: "绝对定位",
7708
+ fixed: "固定定位",
7709
+ sticky: "粘性定位"
7710
+ };
7608
7711
  const config = {
7609
7712
  items: [
7610
7713
  {
@@ -7614,9 +7717,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
7614
7717
  type: "data-source-field-select",
7615
7718
  fieldConfig: {
7616
7719
  type: "select",
7617
- options: ["static", "relative", "absolute", "fixed", "sticky"].map((item) => ({
7720
+ options: Object.keys(positionText).map((item) => ({
7618
7721
  value: item,
7619
- text: item
7722
+ text: `${item}(${positionText[item]})`
7620
7723
  }))
7621
7724
  }
7622
7725
  },
@@ -7690,7 +7793,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
7690
7793
  }
7691
7794
  });
7692
7795
 
7693
- const _hoisted_1$n = { class: "border-box-container" };
7796
+ const _hoisted_1$o = { class: "border-box-container" };
7694
7797
  const _hoisted_2$a = { class: "border-icon-container" };
7695
7798
  const _hoisted_3$3 = { class: "border-icon-container-row" };
7696
7799
  const _hoisted_4$3 = { class: "border-icon-container-row" };
@@ -7749,7 +7852,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
7749
7852
  });
7750
7853
  };
7751
7854
  return (_ctx, _cache) => {
7752
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
7855
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
7753
7856
  createElementVNode("div", _hoisted_2$a, [
7754
7857
  createElementVNode("div", _hoisted_3$3, [
7755
7858
  createElementVNode(
@@ -7866,7 +7969,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
7866
7969
  }
7867
7970
  });
7868
7971
 
7869
- const _hoisted_1$m = { class: "m-fields-style-setter" };
7972
+ const _hoisted_1$n = { class: "m-fields-style-setter" };
7870
7973
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
7871
7974
  ...{
7872
7975
  name: "MFieldsStyleSetter"
@@ -7920,7 +8023,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
7920
8023
  emit("change", v, eventData);
7921
8024
  };
7922
8025
  return (_ctx, _cache) => {
7923
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
8026
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
7924
8027
  createVNode(unref(TMagicCollapse), { "model-value": collapseValue.value }, {
7925
8028
  default: withCtx(() => [
7926
8029
  (openBlock(), createElementBlock(
@@ -7962,7 +8065,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
7962
8065
  }
7963
8066
  });
7964
8067
 
7965
- const _hoisted_1$l = {
8068
+ const _hoisted_1$m = {
7966
8069
  key: 1,
7967
8070
  class: "m-fields-ui-select",
7968
8071
  style: { "display": "flex" }
@@ -8058,10 +8161,10 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
8058
8161
  default: withCtx(() => _cache[2] || (_cache[2] = [
8059
8162
  createTextVNode("取消")
8060
8163
  ])),
8061
- _: 1
8062
- /* STABLE */
8164
+ _: 1,
8165
+ __: [2]
8063
8166
  }, 8, ["icon", "disabled", "size"])
8064
- ])) : (openBlock(), createElementBlock("div", _hoisted_1$l, [
8167
+ ])) : (openBlock(), createElementBlock("div", _hoisted_1$m, [
8065
8168
  val.value ? (openBlock(), createElementBlock(
8066
8169
  Fragment,
8067
8170
  { key: 0 },
@@ -8131,8 +8234,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
8131
8234
  default: withCtx(() => _cache[3] || (_cache[3] = [
8132
8235
  createTextVNode("点击此处选择")
8133
8236
  ])),
8134
- _: 1
8135
- /* STABLE */
8237
+ _: 1,
8238
+ __: [3]
8136
8239
  }, 8, ["disabled", "size"])
8137
8240
  ]),
8138
8241
  _: 1
@@ -8370,7 +8473,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
8370
8473
  }
8371
8474
  });
8372
8475
 
8373
- const _hoisted_1$k = {
8476
+ const _hoisted_1$l = {
8374
8477
  key: 1,
8375
8478
  class: "menu-item-text"
8376
8479
  };
@@ -8451,7 +8554,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
8451
8554
  direction: _ctx.data.direction || "vertical"
8452
8555
  }, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock(
8453
8556
  "div",
8454
- _hoisted_1$k,
8557
+ _hoisted_1$l,
8455
8558
  toDisplayString(_ctx.data.text),
8456
8559
  1
8457
8560
  /* TEXT */
@@ -8585,7 +8688,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
8585
8688
  }
8586
8689
  });
8587
8690
 
8588
- const _hoisted_1$j = {
8691
+ const _hoisted_1$k = {
8589
8692
  key: 0,
8590
8693
  id: "m-editor-page-bar-add-icon",
8591
8694
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
@@ -8613,7 +8716,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
8613
8716
  editorService.add(pageConfig);
8614
8717
  };
8615
8718
  return (_ctx, _cache) => {
8616
- return showAddPageButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
8719
+ return showAddPageButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
8617
8720
  createVNode(unref(TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
8618
8721
  reference: withCtx(() => [
8619
8722
  createVNode(_sfc_main$1r, { icon: unref(Plus) }, null, 8, ["icon"])
@@ -8646,7 +8749,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
8646
8749
  }
8647
8750
  });
8648
8751
 
8649
- const _hoisted_1$i = {
8752
+ const _hoisted_1$j = {
8650
8753
  class: "m-editor-page-bar",
8651
8754
  ref: "pageBar"
8652
8755
  };
@@ -8686,6 +8789,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
8686
8789
  });
8687
8790
  onMounted(() => {
8688
8791
  pageBarEl.value && resizeObserver.observe(pageBarEl.value);
8792
+ itemsContainerEl.value && resizeObserver.observe(itemsContainerEl.value);
8689
8793
  });
8690
8794
  onBeforeUnmount(() => {
8691
8795
  resizeObserver.disconnect();
@@ -8733,7 +8837,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
8733
8837
  let beforeDragList = [];
8734
8838
  const options = {
8735
8839
  ...{
8736
- dataIdAttr: "page-id",
8840
+ dataIdAttr: "data-page-id",
8737
8841
  // 获取排序后的数据
8738
8842
  onStart: async (event) => {
8739
8843
  if (typeof props.pageBarSortOptions?.beforeStart === "function") {
@@ -8775,7 +8879,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
8775
8879
  return (_ctx, _cache) => {
8776
8880
  return openBlock(), createElementBlock(
8777
8881
  "div",
8778
- _hoisted_1$i,
8882
+ _hoisted_1$j,
8779
8883
  [
8780
8884
  renderSlot(_ctx.$slots, "prepend"),
8781
8885
  _ctx.length ? (openBlock(), createElementBlock(
@@ -8809,7 +8913,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
8809
8913
  }
8810
8914
  });
8811
8915
 
8812
- const _hoisted_1$h = {
8916
+ const _hoisted_1$i = {
8813
8917
  key: 0,
8814
8918
  id: "m-editor-page-bar-list-icon",
8815
8919
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
@@ -8830,7 +8934,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
8830
8934
  await editorService.select(id);
8831
8935
  };
8832
8936
  return (_ctx, _cache) => {
8833
- return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
8937
+ return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
8834
8938
  createVNode(unref(TMagicPopover), {
8835
8939
  "popper-class": "page-bar-popover",
8836
8940
  placement: "top",
@@ -8878,7 +8982,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
8878
8982
  }
8879
8983
  });
8880
8984
 
8881
- const _hoisted_1$g = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
8985
+ const _hoisted_1$h = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
8882
8986
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
8883
8987
  __name: "Search",
8884
8988
  props: {
@@ -8917,7 +9021,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
8917
9021
  emit("search", values);
8918
9022
  };
8919
9023
  return (_ctx, _cache) => {
8920
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
9024
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
8921
9025
  createVNode(_sfc_main$1r, {
8922
9026
  icon: unref(Search),
8923
9027
  onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
@@ -8942,7 +9046,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
8942
9046
  }
8943
9047
  });
8944
9048
 
8945
- const _hoisted_1$f = { class: "m-editor-page-bar-tabs" };
9049
+ const _hoisted_1$g = { class: "m-editor-page-bar-tabs" };
8946
9050
  const _hoisted_2$6 = ["data-page-id", "onClick"];
8947
9051
  const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
8948
9052
  const _hoisted_4$2 = ["title"];
@@ -9021,7 +9125,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
9021
9125
  }
9022
9126
  });
9023
9127
  return (_ctx, _cache) => {
9024
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
9128
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
9025
9129
  createVNode(_sfc_main$x, {
9026
9130
  ref: "pageBarScrollContainer",
9027
9131
  "page-bar-sort-options": _ctx.pageBarSortOptions,
@@ -9124,7 +9228,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
9124
9228
  }
9125
9229
  });
9126
9230
 
9127
- const _hoisted_1$e = { class: "m-editor-empty-panel" };
9231
+ const _hoisted_1$f = { class: "m-editor-empty-panel" };
9128
9232
  const _hoisted_2$5 = { class: "m-editor-empty-content" };
9129
9233
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
9130
9234
  ...{
@@ -9146,7 +9250,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
9146
9250
  });
9147
9251
  };
9148
9252
  return (_ctx, _cache) => {
9149
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
9253
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
9150
9254
  createElementVNode("div", _hoisted_2$5, [
9151
9255
  createElementVNode("div", {
9152
9256
  class: "m-editor-empty-button",
@@ -9160,7 +9264,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
9160
9264
  null,
9161
9265
  "新增页面",
9162
9266
  -1
9163
- /* HOISTED */
9267
+ /* CACHED */
9164
9268
  ))
9165
9269
  ]),
9166
9270
  !_ctx.disabledPageFragment ? (openBlock(), createElementBlock("div", {
@@ -9176,7 +9280,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
9176
9280
  null,
9177
9281
  "新增页面片",
9178
9282
  -1
9179
- /* HOISTED */
9283
+ /* CACHED */
9180
9284
  ))
9181
9285
  ])) : createCommentVNode("v-if", true)
9182
9286
  ])
@@ -9185,7 +9289,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
9185
9289
  }
9186
9290
  });
9187
9291
 
9188
- const _hoisted_1$d = {
9292
+ const _hoisted_1$e = {
9189
9293
  class: "m-editor",
9190
9294
  ref: "content",
9191
9295
  style: { "min-width": "900px" }
@@ -9256,7 +9360,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
9256
9360
  return (_ctx, _cache) => {
9257
9361
  return openBlock(), createElementBlock(
9258
9362
  "div",
9259
- _hoisted_1$d,
9363
+ _hoisted_1$e,
9260
9364
  [
9261
9365
  renderSlot(_ctx.$slots, "header"),
9262
9366
  renderSlot(_ctx.$slots, "nav"),
@@ -9550,7 +9654,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
9550
9654
  }
9551
9655
  });
9552
9656
 
9553
- const _hoisted_1$c = { class: "m-editor-props-form-panel" };
9657
+ const _hoisted_1$d = { class: "m-editor-props-form-panel" };
9554
9658
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
9555
9659
  ...{
9556
9660
  name: "MEditorFormPanel"
@@ -9565,7 +9669,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
9565
9669
  labelPosition: {},
9566
9670
  extendState: { type: Function }
9567
9671
  },
9568
- emits: ["submit", "submit-error", "form-error", "mounted"],
9672
+ emits: ["submit", "submit-error", "form-error", "mounted", "unmounted"],
9569
9673
  setup(__props, { expose: __expose, emit: __emit }) {
9570
9674
  const props = __props;
9571
9675
  const emit = __emit;
@@ -9587,6 +9691,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
9587
9691
  onMounted(() => {
9588
9692
  emit("mounted", internalInstance?.proxy);
9589
9693
  });
9694
+ onUnmounted(() => {
9695
+ emit("unmounted");
9696
+ });
9590
9697
  const submit = async (v, eventData) => {
9591
9698
  try {
9592
9699
  const values = await configFormRef.value?.submitForm();
@@ -9603,7 +9710,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
9603
9710
  };
9604
9711
  __expose({ configForm: configFormRef, submit });
9605
9712
  return (_ctx, _cache) => {
9606
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
9713
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
9607
9714
  renderSlot(_ctx.$slots, "props-form-panel-header"),
9608
9715
  createVNode(unref(TMagicScrollbar), null, {
9609
9716
  default: withCtx(() => [
@@ -9698,7 +9805,7 @@ const useStylePanel = ({ uiService, storageService }, propsPanelWidth) => {
9698
9805
  };
9699
9806
  };
9700
9807
 
9701
- const _hoisted_1$b = {
9808
+ const _hoisted_1$c = {
9702
9809
  ref: "propsPanel",
9703
9810
  class: "m-editor-props-panel"
9704
9811
  };
@@ -9712,7 +9819,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
9712
9819
  disabledShowSrc: { type: Boolean },
9713
9820
  extendState: { type: Function }
9714
9821
  },
9715
- emits: ["submit-error", "form-error", "mounted"],
9822
+ emits: ["submit-error", "form-error", "mounted", "unmounted"],
9716
9823
  setup(__props, { expose: __expose, emit: __emit }) {
9717
9824
  const emit = __emit;
9718
9825
  const { editorService, uiService, propsService, storageService } = useServices();
@@ -9774,6 +9881,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
9774
9881
  emit("mounted", propertyFormPanelRef.value);
9775
9882
  }
9776
9883
  };
9884
+ const unmountedHandler = () => {
9885
+ emit("unmounted");
9886
+ };
9777
9887
  const propsPanelEl = useTemplateRef("propsPanel");
9778
9888
  const propsPanelWidth = ref(
9779
9889
  storageService.getItem(PROPS_PANEL_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) || 300
@@ -9815,7 +9925,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
9815
9925
  return (_ctx, _cache) => {
9816
9926
  return withDirectives((openBlock(), createElementBlock(
9817
9927
  "div",
9818
- _hoisted_1$b,
9928
+ _hoisted_1$c,
9819
9929
  [
9820
9930
  renderSlot(_ctx.$slots, "props-panel-header"),
9821
9931
  createVNode(_sfc_main$q, {
@@ -9828,7 +9938,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
9828
9938
  onSubmit: submit,
9829
9939
  onSubmitError: errorHandler,
9830
9940
  onFormError: errorHandler,
9831
- onMounted: mountedHandler
9941
+ onMounted: mountedHandler,
9942
+ onUnmounted: unmountedHandler
9832
9943
  }, null, 8, ["class", "config", "values", "disabledShowSrc", "extendState"]),
9833
9944
  unref(showStylePanel) ? (openBlock(), createBlock(_sfc_main$B, {
9834
9945
  key: 0,
@@ -9854,7 +9965,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
9854
9965
  null,
9855
9966
  "样式",
9856
9967
  -1
9857
- /* HOISTED */
9968
+ /* CACHED */
9858
9969
  )),
9859
9970
  createElementVNode("div", null, [
9860
9971
  createVNode(unref(TMagicButton), {
@@ -10119,7 +10230,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
10119
10230
  }
10120
10231
  });
10121
10232
 
10122
- const _hoisted_1$a = ["draggable", "data-node-id", "data-parent-id", "data-parents-id", "data-is-container"];
10233
+ const _hoisted_1$b = ["draggable", "data-node-id", "data-parent-id", "data-parents-id", "data-is-container"];
10123
10234
  const _hoisted_2$3 = { class: "tree-node-label" };
10124
10235
  const _hoisted_3$1 = { class: "tree-node-tool" };
10125
10236
  const _hoisted_4$1 = {
@@ -10262,14 +10373,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
10262
10373
  /* KEYED_FRAGMENT */
10263
10374
  ))
10264
10375
  ])) : createCommentVNode("v-if", true)
10265
- ], 40, _hoisted_1$a)), [
10376
+ ], 40, _hoisted_1$b)), [
10266
10377
  [vShow, visible.value]
10267
10378
  ]);
10268
10379
  };
10269
10380
  }
10270
10381
  });
10271
10382
 
10272
- const _hoisted_1$9 = {
10383
+ const _hoisted_1$a = {
10273
10384
  key: 1,
10274
10385
  class: "m-editor-tree-empty"
10275
10386
  };
@@ -10326,7 +10437,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
10326
10437
  }),
10327
10438
  128
10328
10439
  /* KEYED_FRAGMENT */
10329
- )) : (openBlock(), createElementBlock("div", _hoisted_1$9, [
10440
+ )) : (openBlock(), createElementBlock("div", _hoisted_1$a, [
10330
10441
  createElementVNode(
10331
10442
  "p",
10332
10443
  null,
@@ -10589,7 +10700,7 @@ const useContentMenu$1 = (deleteCode) => {
10589
10700
  };
10590
10701
  };
10591
10702
 
10592
- const _hoisted_1$8 = { class: "search-wrapper" };
10703
+ const _hoisted_1$9 = { class: "search-wrapper" };
10593
10704
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
10594
10705
  ...{
10595
10706
  name: "MEditorCodeBlockListPanel"
@@ -10644,7 +10755,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
10644
10755
  createVNode(unref(TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
10645
10756
  default: withCtx(() => [
10646
10757
  renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
10647
- createElementVNode("div", _hoisted_1$8, [
10758
+ createElementVNode("div", _hoisted_1$9, [
10648
10759
  createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
10649
10760
  editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
10650
10761
  key: 0,
@@ -10656,8 +10767,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
10656
10767
  default: withCtx(() => _cache[0] || (_cache[0] = [
10657
10768
  createTextVNode("新增")
10658
10769
  ])),
10659
- _: 1
10660
- /* STABLE */
10770
+ _: 1,
10771
+ __: [0]
10661
10772
  }, 8, ["onClick"])) : createCommentVNode("v-if", true),
10662
10773
  renderSlot(_ctx.$slots, "code-block-panel-search")
10663
10774
  ])
@@ -11063,7 +11174,7 @@ const useContentMenu = () => {
11063
11174
  };
11064
11175
  };
11065
11176
 
11066
- const _hoisted_1$7 = { class: "search-wrapper" };
11177
+ const _hoisted_1$8 = { class: "search-wrapper" };
11067
11178
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
11068
11179
  ...{
11069
11180
  name: "MEditorDataSourceListPanel"
@@ -11143,7 +11254,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11143
11254
  [
11144
11255
  createVNode(unref(TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
11145
11256
  default: withCtx(() => [
11146
- createElementVNode("div", _hoisted_1$7, [
11257
+ createElementVNode("div", _hoisted_1$8, [
11147
11258
  createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
11148
11259
  unref(editable) ? (openBlock(), createBlock(unref(TMagicPopover), {
11149
11260
  key: 0,
@@ -11160,8 +11271,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11160
11271
  default: withCtx(() => _cache[0] || (_cache[0] = [
11161
11272
  createTextVNode("新增")
11162
11273
  ])),
11163
- _: 1
11164
- /* STABLE */
11274
+ _: 1,
11275
+ __: [0]
11165
11276
  })
11166
11277
  ]),
11167
11278
  default: withCtx(() => [
@@ -11228,7 +11339,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11228
11339
  }
11229
11340
  });
11230
11341
 
11231
- const _hoisted_1$6 = {
11342
+ const _hoisted_1$7 = {
11232
11343
  width: "1em",
11233
11344
  height: "1em",
11234
11345
  viewBox: "0 0 16 16",
@@ -11243,7 +11354,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11243
11354
  __name: "FolderMinusIcon",
11244
11355
  setup(__props) {
11245
11356
  return (_ctx, _cache) => {
11246
- return openBlock(), createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [
11357
+ return openBlock(), createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
11247
11358
  createElementVNode(
11248
11359
  "path",
11249
11360
  {
@@ -11252,7 +11363,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11252
11363
  },
11253
11364
  null,
11254
11365
  -1
11255
- /* HOISTED */
11366
+ /* CACHED */
11256
11367
  ),
11257
11368
  createElementVNode(
11258
11369
  "path",
@@ -11262,7 +11373,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11262
11373
  },
11263
11374
  null,
11264
11375
  -1
11265
- /* HOISTED */
11376
+ /* CACHED */
11266
11377
  )
11267
11378
  ]));
11268
11379
  };
@@ -12046,7 +12157,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
12046
12157
  }
12047
12158
  });
12048
12159
 
12049
- const _hoisted_1$5 = ["onClick", "onDragstart"];
12160
+ const _hoisted_1$6 = ["onClick", "onDragstart"];
12050
12161
  const _hoisted_2$2 = ["title"];
12051
12162
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
12052
12163
  ...{
@@ -12181,7 +12292,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12181
12292
  title: item.text
12182
12293
  }, toDisplayString(item.text), 9, _hoisted_2$2)
12183
12294
  ])
12184
- ], 40, _hoisted_1$5);
12295
+ ], 40, _hoisted_1$6);
12185
12296
  }),
12186
12297
  128
12187
12298
  /* KEYED_FRAGMENT */
@@ -12211,7 +12322,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12211
12322
  }
12212
12323
  });
12213
12324
 
12214
- const _hoisted_1$4 = {
12325
+ const _hoisted_1$5 = {
12215
12326
  key: 0,
12216
12327
  class: "m-editor-sidebar"
12217
12328
  };
@@ -12244,7 +12355,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
12244
12355
  },
12245
12356
  setup(__props, { expose: __expose }) {
12246
12357
  const props = __props;
12247
- const { depService, uiService } = useServices();
12358
+ const { depService, uiService, propsService } = useServices();
12248
12359
  const collecting = computed(() => depService.get("collecting"));
12249
12360
  const taskLength = computed(() => depService.get("taskLength"));
12250
12361
  const tipsBarVisible = ref(true);
@@ -12319,7 +12430,17 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
12319
12430
  };
12320
12431
  return typeof data === "string" ? map[data] : data;
12321
12432
  };
12322
- const sideBarItems = computed(() => props.data.items.map((item) => getItemConfig(item)));
12433
+ const sideBarItems = computed(
12434
+ () => props.data.items.map((item) => getItemConfig(item)).filter((item) => {
12435
+ if (item.$key === SideItemKey.DATA_SOURCE) {
12436
+ return !propsService.getDisabledDataSource();
12437
+ }
12438
+ if (item.$key === SideItemKey.CODE_BLOCK) {
12439
+ return !propsService.getDisabledCodeBlock();
12440
+ }
12441
+ return true;
12442
+ })
12443
+ );
12323
12444
  watch(
12324
12445
  sideBarItems,
12325
12446
  (items) => {
@@ -12370,7 +12491,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
12370
12491
  Fragment,
12371
12492
  null,
12372
12493
  [
12373
- _ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
12494
+ _ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
12374
12495
  createElementVNode("div", _hoisted_2$1, [
12375
12496
  (openBlock(true), createElementBlock(
12376
12497
  Fragment,
@@ -12724,7 +12845,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
12724
12845
  }
12725
12846
  });
12726
12847
 
12727
- const _hoisted_1$3 = {
12848
+ const _hoisted_1$4 = {
12728
12849
  class: "m-editor-scroll-viewer-container",
12729
12850
  ref: "container"
12730
12851
  };
@@ -12803,7 +12924,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
12803
12924
  return (_ctx, _cache) => {
12804
12925
  return openBlock(), createElementBlock(
12805
12926
  "div",
12806
- _hoisted_1$3,
12927
+ _hoisted_1$4,
12807
12928
  [
12808
12929
  createElementVNode(
12809
12930
  "div",
@@ -12957,19 +13078,25 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12957
13078
  }
12958
13079
  });
12959
13080
 
13081
+ const _hoisted_1$3 = {
13082
+ key: 0,
13083
+ class: "m-editor-stage-overlay"
13084
+ };
12960
13085
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
12961
13086
  __name: "StageOverlay",
12962
13087
  setup(__props) {
12963
- const { stageOverlayService, editorService } = useServices();
13088
+ const { stageOverlayService, editorService, uiService } = useServices();
12964
13089
  const stageOptions = inject("stageOptions");
12965
13090
  const stageOverlayEl = useTemplateRef("stageOverlay");
12966
13091
  const stageOverlayVisible = computed(() => stageOverlayService.get("stageOverlayVisible"));
12967
13092
  const wrapWidth = computed(() => stageOverlayService.get("wrapWidth"));
12968
13093
  const wrapHeight = computed(() => stageOverlayService.get("wrapHeight"));
12969
13094
  const stage = computed(() => editorService.get("stage"));
13095
+ const zoom = computed(() => uiService.get("zoom"));
13096
+ const columnWidth = computed(() => uiService.get("columnWidth"));
13097
+ const frameworkRect = computed(() => uiService.get("frameworkRect"));
12970
13098
  const style = computed(() => ({
12971
- width: `${wrapWidth.value}px`,
12972
- height: `${wrapHeight.value}px`
13099
+ transform: `scale(${zoom.value})`
12973
13100
  }));
12974
13101
  watch(stage, (stage2) => {
12975
13102
  if (stage2) {
@@ -12981,6 +13108,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
12981
13108
  stageOverlayService.closeOverlay();
12982
13109
  }
12983
13110
  });
13111
+ watch(zoom, (zoom2) => {
13112
+ const stage2 = stageOverlayService.get("stage");
13113
+ if (!stage2 || !zoom2) return;
13114
+ stage2.setZoom(zoom2);
13115
+ });
12984
13116
  watch(stageOverlayEl, (stageOverlay) => {
12985
13117
  const subStage = stageOverlayService.createStage(stageOptions);
12986
13118
  stageOverlayService.set("stage", subStage);
@@ -13001,14 +13133,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13001
13133
  stageOverlayService.closeOverlay();
13002
13134
  };
13003
13135
  return (_ctx, _cache) => {
13004
- return stageOverlayVisible.value ? (openBlock(), createElementBlock("div", {
13005
- key: 0,
13006
- class: "m-editor-stage-overlay",
13007
- onClick: closeOverlayHandler
13008
- }, [
13136
+ return stageOverlayVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
13009
13137
  createVNode(unref(TMagicIcon), {
13010
13138
  class: "m-editor-stage-overlay-close",
13011
- size: "20",
13139
+ size: "30",
13012
13140
  onClick: closeOverlayHandler
13013
13141
  }, {
13014
13142
  default: withCtx(() => [
@@ -13017,19 +13145,30 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13017
13145
  _: 1
13018
13146
  /* STABLE */
13019
13147
  }),
13020
- createElementVNode(
13021
- "div",
13022
- {
13023
- ref: "stageOverlay",
13024
- class: "m-editor-stage-overlay-container",
13025
- style: normalizeStyle(style.value),
13026
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
13027
- }, ["stop"]))
13028
- },
13029
- null,
13030
- 4
13031
- /* STYLE */
13032
- )
13148
+ createVNode(_sfc_main$8, {
13149
+ class: "m-editor-stage",
13150
+ width: wrapWidth.value,
13151
+ height: wrapHeight.value,
13152
+ "wrap-width": columnWidth.value.center,
13153
+ "wrap-height": frameworkRect.value.height,
13154
+ zoom: zoom.value
13155
+ }, {
13156
+ default: withCtx(() => [
13157
+ createElementVNode(
13158
+ "div",
13159
+ {
13160
+ ref: "stageOverlay",
13161
+ class: "m-editor-stage-container",
13162
+ style: normalizeStyle(style.value)
13163
+ },
13164
+ null,
13165
+ 4
13166
+ /* STYLE */
13167
+ )
13168
+ ]),
13169
+ _: 1
13170
+ /* STABLE */
13171
+ }, 8, ["width", "height", "wrap-width", "wrap-height", "zoom"])
13033
13172
  ])) : createCommentVNode("v-if", true);
13034
13173
  };
13035
13174
  }
@@ -13059,7 +13198,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13059
13198
  },
13060
13199
  null,
13061
13200
  -1
13062
- /* HOISTED */
13201
+ /* CACHED */
13063
13202
  ),
13064
13203
  createElementVNode(
13065
13204
  "path",
@@ -13072,7 +13211,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13072
13211
  },
13073
13212
  null,
13074
13213
  -1
13075
- /* HOISTED */
13214
+ /* CACHED */
13076
13215
  ),
13077
13216
  createElementVNode(
13078
13217
  "path",
@@ -13085,7 +13224,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13085
13224
  },
13086
13225
  null,
13087
13226
  -1
13088
- /* HOISTED */
13227
+ /* CACHED */
13089
13228
  )
13090
13229
  ]));
13091
13230
  };
@@ -13262,11 +13401,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13262
13401
  }
13263
13402
  stage.on("runtime-ready", (rt) => {
13264
13403
  runtime = rt;
13265
- root.value && runtime?.updateRootConfig?.(cloneDeep(toRaw(root.value)));
13266
- page.value?.id && runtime?.updatePageId?.(page.value.id);
13267
- setTimeout(() => {
13268
- node.value && stage?.select(toRaw(node.value.id));
13269
- });
13270
13404
  });
13271
13405
  });
13272
13406
  onBeforeUnmount(() => {
@@ -13289,17 +13423,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13289
13423
  timeoutId = null;
13290
13424
  }, 3e3);
13291
13425
  runtime.updatePageId?.(page2.id);
13292
- nextTick(() => {
13293
- stage?.select(page2.id);
13294
- });
13426
+ const unWatch = watch(
13427
+ stageLoading,
13428
+ () => {
13429
+ if (stageLoading.value) {
13430
+ return;
13431
+ }
13432
+ nextTick(() => {
13433
+ stage?.select(page2.id);
13434
+ unWatch();
13435
+ });
13436
+ },
13437
+ {
13438
+ immediate: true
13439
+ }
13440
+ );
13295
13441
  }
13296
13442
  });
13297
- const rootChangeHandler = (root2) => {
13298
- if (runtime && root2) {
13299
- runtime.updateRootConfig?.(cloneDeep(toRaw(root2)));
13300
- }
13301
- };
13302
- editorService.on("root-change", rootChangeHandler);
13303
13443
  const resizeObserver = new ResizeObserver((entries) => {
13304
13444
  for (const { contentRect } of entries) {
13305
13445
  uiService.set("stageContainerRect", {
@@ -13316,10 +13456,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13316
13456
  });
13317
13457
  onBeforeUnmount(() => {
13318
13458
  stage?.destroy();
13459
+ stage = null;
13319
13460
  resizeObserver.disconnect();
13320
13461
  editorService.set("stage", null);
13321
13462
  keybindingService.unregisterEl("stage");
13322
- editorService.off("root-change", rootChangeHandler);
13323
13463
  });
13324
13464
  const parseDSL = getEditorConfig("parseDSL");
13325
13465
  const contextmenuHandler = (e) => {
@@ -13395,7 +13535,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13395
13535
  width: 60,
13396
13536
  height: 50
13397
13537
  },
13398
- onClick: _cache[0] || (_cache[0] = ($event) => unref(stageWrapRef)?.container?.focus())
13538
+ onClick: _cache[0] || (_cache[0] = ($event) => stageWrapRef.value?.container?.focus())
13399
13539
  }, {
13400
13540
  content: withCtx(() => [
13401
13541
  !_ctx.disabledStageOverlay ? (openBlock(), createBlock(_sfc_main$6, { key: 0 })) : createCommentVNode("v-if", true),
@@ -13953,33 +14093,1074 @@ class DataSource extends BaseService {
13953
14093
  }
13954
14094
  const dataSourceService = new DataSource();
13955
14095
 
13956
- const jsContent = "(function () {\n 'use strict';\n\n var events = {exports: {}};\n\n var hasRequiredEvents;\n\n function requireEvents () {\n \tif (hasRequiredEvents) return events.exports;\n \thasRequiredEvents = 1;\n\n \tvar R = typeof Reflect === 'object' ? Reflect : null;\n \tvar ReflectApply = R && typeof R.apply === 'function'\n \t ? R.apply\n \t : function ReflectApply(target, receiver, args) {\n \t return Function.prototype.apply.call(target, receiver, args);\n \t };\n\n \tvar ReflectOwnKeys;\n \tif (R && typeof R.ownKeys === 'function') {\n \t ReflectOwnKeys = R.ownKeys;\n \t} else if (Object.getOwnPropertySymbols) {\n \t ReflectOwnKeys = function ReflectOwnKeys(target) {\n \t return Object.getOwnPropertyNames(target)\n \t .concat(Object.getOwnPropertySymbols(target));\n \t };\n \t} else {\n \t ReflectOwnKeys = function ReflectOwnKeys(target) {\n \t return Object.getOwnPropertyNames(target);\n \t };\n \t}\n\n \tfunction ProcessEmitWarning(warning) {\n \t if (console && console.warn) console.warn(warning);\n \t}\n\n \tvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n \t return value !== value;\n \t};\n\n \tfunction EventEmitter() {\n \t EventEmitter.init.call(this);\n \t}\n \tevents.exports = EventEmitter;\n \tevents.exports.once = once;\n\n \t// Backwards-compat with node 0.10.x\n \tEventEmitter.EventEmitter = EventEmitter;\n\n \tEventEmitter.prototype._events = undefined;\n \tEventEmitter.prototype._eventsCount = 0;\n \tEventEmitter.prototype._maxListeners = undefined;\n\n \t// By default EventEmitters will print a warning if more than 10 listeners are\n \t// added to it. This is a useful default which helps finding memory leaks.\n \tvar defaultMaxListeners = 10;\n\n \tfunction checkListener(listener) {\n \t if (typeof listener !== 'function') {\n \t throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n \t }\n \t}\n\n \tObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n \t enumerable: true,\n \t get: function() {\n \t return defaultMaxListeners;\n \t },\n \t set: function(arg) {\n \t if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n \t throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n \t }\n \t defaultMaxListeners = arg;\n \t }\n \t});\n\n \tEventEmitter.init = function() {\n\n \t if (this._events === undefined ||\n \t this._events === Object.getPrototypeOf(this)._events) {\n \t this._events = Object.create(null);\n \t this._eventsCount = 0;\n \t }\n\n \t this._maxListeners = this._maxListeners || undefined;\n \t};\n\n \t// Obviously not all Emitters should be limited to 10. This function allows\n \t// that to be increased. Set to zero for unlimited.\n \tEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n \t if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n \t throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n \t }\n \t this._maxListeners = n;\n \t return this;\n \t};\n\n \tfunction _getMaxListeners(that) {\n \t if (that._maxListeners === undefined)\n \t return EventEmitter.defaultMaxListeners;\n \t return that._maxListeners;\n \t}\n\n \tEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n \t return _getMaxListeners(this);\n \t};\n\n \tEventEmitter.prototype.emit = function emit(type) {\n \t var args = [];\n \t for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n \t var doError = (type === 'error');\n\n \t var events = this._events;\n \t if (events !== undefined)\n \t doError = (doError && events.error === undefined);\n \t else if (!doError)\n \t return false;\n\n \t // If there is no 'error' event listener then throw.\n \t if (doError) {\n \t var er;\n \t if (args.length > 0)\n \t er = args[0];\n \t if (er instanceof Error) {\n \t // Note: The comments on the `throw` lines are intentional, they show\n \t // up in Node's output if this results in an unhandled exception.\n \t throw er; // Unhandled 'error' event\n \t }\n \t // At least give some kind of context to the user\n \t var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n \t err.context = er;\n \t throw err; // Unhandled 'error' event\n \t }\n\n \t var handler = events[type];\n\n \t if (handler === undefined)\n \t return false;\n\n \t if (typeof handler === 'function') {\n \t ReflectApply(handler, this, args);\n \t } else {\n \t var len = handler.length;\n \t var listeners = arrayClone(handler, len);\n \t for (var i = 0; i < len; ++i)\n \t ReflectApply(listeners[i], this, args);\n \t }\n\n \t return true;\n \t};\n\n \tfunction _addListener(target, type, listener, prepend) {\n \t var m;\n \t var events;\n \t var existing;\n\n \t checkListener(listener);\n\n \t events = target._events;\n \t if (events === undefined) {\n \t events = target._events = Object.create(null);\n \t target._eventsCount = 0;\n \t } else {\n \t // To avoid recursion in the case that type === \"newListener\"! Before\n \t // adding it to the listeners, first emit \"newListener\".\n \t if (events.newListener !== undefined) {\n \t target.emit('newListener', type,\n \t listener.listener ? listener.listener : listener);\n\n \t // Re-assign `events` because a newListener handler could have caused the\n \t // this._events to be assigned to a new object\n \t events = target._events;\n \t }\n \t existing = events[type];\n \t }\n\n \t if (existing === undefined) {\n \t // Optimize the case of one listener. Don't need the extra array object.\n \t existing = events[type] = listener;\n \t ++target._eventsCount;\n \t } else {\n \t if (typeof existing === 'function') {\n \t // Adding the second element, need to change to array.\n \t existing = events[type] =\n \t prepend ? [listener, existing] : [existing, listener];\n \t // If we've already got an array, just append.\n \t } else if (prepend) {\n \t existing.unshift(listener);\n \t } else {\n \t existing.push(listener);\n \t }\n\n \t // Check for listener leak\n \t m = _getMaxListeners(target);\n \t if (m > 0 && existing.length > m && !existing.warned) {\n \t existing.warned = true;\n \t // No error code for this since it is a Warning\n \t // eslint-disable-next-line no-restricted-syntax\n \t var w = new Error('Possible EventEmitter memory leak detected. ' +\n \t existing.length + ' ' + String(type) + ' listeners ' +\n \t 'added. Use emitter.setMaxListeners() to ' +\n \t 'increase limit');\n \t w.name = 'MaxListenersExceededWarning';\n \t w.emitter = target;\n \t w.type = type;\n \t w.count = existing.length;\n \t ProcessEmitWarning(w);\n \t }\n \t }\n\n \t return target;\n \t}\n\n \tEventEmitter.prototype.addListener = function addListener(type, listener) {\n \t return _addListener(this, type, listener, false);\n \t};\n\n \tEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\n \tEventEmitter.prototype.prependListener =\n \t function prependListener(type, listener) {\n \t return _addListener(this, type, listener, true);\n \t };\n\n \tfunction onceWrapper() {\n \t if (!this.fired) {\n \t this.target.removeListener(this.type, this.wrapFn);\n \t this.fired = true;\n \t if (arguments.length === 0)\n \t return this.listener.call(this.target);\n \t return this.listener.apply(this.target, arguments);\n \t }\n \t}\n\n \tfunction _onceWrap(target, type, listener) {\n \t var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n \t var wrapped = onceWrapper.bind(state);\n \t wrapped.listener = listener;\n \t state.wrapFn = wrapped;\n \t return wrapped;\n \t}\n\n \tEventEmitter.prototype.once = function once(type, listener) {\n \t checkListener(listener);\n \t this.on(type, _onceWrap(this, type, listener));\n \t return this;\n \t};\n\n \tEventEmitter.prototype.prependOnceListener =\n \t function prependOnceListener(type, listener) {\n \t checkListener(listener);\n \t this.prependListener(type, _onceWrap(this, type, listener));\n \t return this;\n \t };\n\n \t// Emits a 'removeListener' event if and only if the listener was removed.\n \tEventEmitter.prototype.removeListener =\n \t function removeListener(type, listener) {\n \t var list, events, position, i, originalListener;\n\n \t checkListener(listener);\n\n \t events = this._events;\n \t if (events === undefined)\n \t return this;\n\n \t list = events[type];\n \t if (list === undefined)\n \t return this;\n\n \t if (list === listener || list.listener === listener) {\n \t if (--this._eventsCount === 0)\n \t this._events = Object.create(null);\n \t else {\n \t delete events[type];\n \t if (events.removeListener)\n \t this.emit('removeListener', type, list.listener || listener);\n \t }\n \t } else if (typeof list !== 'function') {\n \t position = -1;\n\n \t for (i = list.length - 1; i >= 0; i--) {\n \t if (list[i] === listener || list[i].listener === listener) {\n \t originalListener = list[i].listener;\n \t position = i;\n \t break;\n \t }\n \t }\n\n \t if (position < 0)\n \t return this;\n\n \t if (position === 0)\n \t list.shift();\n \t else {\n \t spliceOne(list, position);\n \t }\n\n \t if (list.length === 1)\n \t events[type] = list[0];\n\n \t if (events.removeListener !== undefined)\n \t this.emit('removeListener', type, originalListener || listener);\n \t }\n\n \t return this;\n \t };\n\n \tEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\n \tEventEmitter.prototype.removeAllListeners =\n \t function removeAllListeners(type) {\n \t var listeners, events, i;\n\n \t events = this._events;\n \t if (events === undefined)\n \t return this;\n\n \t // not listening for removeListener, no need to emit\n \t if (events.removeListener === undefined) {\n \t if (arguments.length === 0) {\n \t this._events = Object.create(null);\n \t this._eventsCount = 0;\n \t } else if (events[type] !== undefined) {\n \t if (--this._eventsCount === 0)\n \t this._events = Object.create(null);\n \t else\n \t delete events[type];\n \t }\n \t return this;\n \t }\n\n \t // emit removeListener for all listeners on all events\n \t if (arguments.length === 0) {\n \t var keys = Object.keys(events);\n \t var key;\n \t for (i = 0; i < keys.length; ++i) {\n \t key = keys[i];\n \t if (key === 'removeListener') continue;\n \t this.removeAllListeners(key);\n \t }\n \t this.removeAllListeners('removeListener');\n \t this._events = Object.create(null);\n \t this._eventsCount = 0;\n \t return this;\n \t }\n\n \t listeners = events[type];\n\n \t if (typeof listeners === 'function') {\n \t this.removeListener(type, listeners);\n \t } else if (listeners !== undefined) {\n \t // LIFO order\n \t for (i = listeners.length - 1; i >= 0; i--) {\n \t this.removeListener(type, listeners[i]);\n \t }\n \t }\n\n \t return this;\n \t };\n\n \tfunction _listeners(target, type, unwrap) {\n \t var events = target._events;\n\n \t if (events === undefined)\n \t return [];\n\n \t var evlistener = events[type];\n \t if (evlistener === undefined)\n \t return [];\n\n \t if (typeof evlistener === 'function')\n \t return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n \t return unwrap ?\n \t unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n \t}\n\n \tEventEmitter.prototype.listeners = function listeners(type) {\n \t return _listeners(this, type, true);\n \t};\n\n \tEventEmitter.prototype.rawListeners = function rawListeners(type) {\n \t return _listeners(this, type, false);\n \t};\n\n \tEventEmitter.listenerCount = function(emitter, type) {\n \t if (typeof emitter.listenerCount === 'function') {\n \t return emitter.listenerCount(type);\n \t } else {\n \t return listenerCount.call(emitter, type);\n \t }\n \t};\n\n \tEventEmitter.prototype.listenerCount = listenerCount;\n \tfunction listenerCount(type) {\n \t var events = this._events;\n\n \t if (events !== undefined) {\n \t var evlistener = events[type];\n\n \t if (typeof evlistener === 'function') {\n \t return 1;\n \t } else if (evlistener !== undefined) {\n \t return evlistener.length;\n \t }\n \t }\n\n \t return 0;\n \t}\n\n \tEventEmitter.prototype.eventNames = function eventNames() {\n \t return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n \t};\n\n \tfunction arrayClone(arr, n) {\n \t var copy = new Array(n);\n \t for (var i = 0; i < n; ++i)\n \t copy[i] = arr[i];\n \t return copy;\n \t}\n\n \tfunction spliceOne(list, index) {\n \t for (; index + 1 < list.length; index++)\n \t list[index] = list[index + 1];\n \t list.pop();\n \t}\n\n \tfunction unwrapListeners(arr) {\n \t var ret = new Array(arr.length);\n \t for (var i = 0; i < ret.length; ++i) {\n \t ret[i] = arr[i].listener || arr[i];\n \t }\n \t return ret;\n \t}\n\n \tfunction once(emitter, name) {\n \t return new Promise(function (resolve, reject) {\n \t function errorListener(err) {\n \t emitter.removeListener(name, resolver);\n \t reject(err);\n \t }\n\n \t function resolver() {\n \t if (typeof emitter.removeListener === 'function') {\n \t emitter.removeListener('error', errorListener);\n \t }\n \t resolve([].slice.call(arguments));\n \t }\n \t eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n \t if (name !== 'error') {\n \t addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n \t }\n \t });\n \t}\n\n \tfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n \t if (typeof emitter.on === 'function') {\n \t eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n \t }\n \t}\n\n \tfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n \t if (typeof emitter.on === 'function') {\n \t if (flags.once) {\n \t emitter.once(name, listener);\n \t } else {\n \t emitter.on(name, listener);\n \t }\n \t } else if (typeof emitter.addEventListener === 'function') {\n \t // EventTarget does not have `error` event semantics like Node\n \t // EventEmitters, we do not listen for `error` events here.\n \t emitter.addEventListener(name, function wrapListener(arg) {\n \t // IE does not have builtin `{ once: true }` support so we\n \t // have to do it manually.\n \t if (flags.once) {\n \t emitter.removeEventListener(name, wrapListener);\n \t }\n \t listener(arg);\n \t });\n \t } else {\n \t throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n \t }\n \t}\n \treturn events.exports;\n }\n\n requireEvents();\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation.\r\n\r\n Permission to use, copy, modify, and/or distribute this software for any\r\n purpose with or without fee is hereby granted.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n PERFORMANCE OF THIS SOFTWARE.\r\n ***************************************************************************** */\r\n\r\n\n let cachedTextEncoder = new TextEncoder(\"utf-8\");\n\n typeof cachedTextEncoder.encodeInto === \"function\"\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n }\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length,\n };\n };\n\n const NODE_CONDS_KEY = \"displayConds\";\n var HookType = /* @__PURE__ */ ((HookType2) => {\n HookType2[\"CODE\"] = \"code\";\n return HookType2;\n })(HookType || {});\n\n const isObject = (obj) => Object.prototype.toString.call(obj) === \"[object Object]\";\n const getKeysArray = (keys) => (\n // 将 array[0] 转成 array.0\n `${keys}`.replaceAll(/\\[(\\d+)\\]/g, \".$1\").split(\".\")\n );\n const DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX = \"ds-field::\";\n const dataSourceTemplateRegExp = /\\$\\{([\\s\\S]+?)\\}/g;\n\n var DepTargetType = /* @__PURE__ */ ((DepTargetType2) => {\n DepTargetType2[\"DEFAULT\"] = \"default\";\n DepTargetType2[\"CODE_BLOCK\"] = \"code-block\";\n DepTargetType2[\"DATA_SOURCE\"] = \"data-source\";\n DepTargetType2[\"DATA_SOURCE_METHOD\"] = \"data-source-method\";\n DepTargetType2[\"DATA_SOURCE_COND\"] = \"data-source-cond\";\n return DepTargetType2;\n })(DepTargetType || {});\n\n class Target {\n /**\n * 如何识别目标\n */\n isTarget;\n /**\n * 目标id,不可重复\n * 例如目标是代码块,则为代码块id\n */\n id;\n /**\n * 目标名称,用于显示在依赖列表中\n */\n name;\n /**\n * 不同的目标可以进行分类,例如代码块,数据源可以为两个不同的type\n */\n type = DepTargetType.DEFAULT;\n /**\n * 依赖详情\n * 实例:{ 'node_id': { name: 'node_name', keys: [ created, mounted ] } }\n */\n deps = {};\n /**\n * 是否默认收集,默认为true,当值为false时需要传入type参数给collect方法才会被收集\n */\n isCollectByDefault;\n constructor(options) {\n this.isTarget = options.isTarget;\n this.id = options.id;\n this.name = options.name;\n this.isCollectByDefault = options.isCollectByDefault ?? true;\n if (options.type) {\n this.type = options.type;\n }\n if (options.initialDeps) {\n this.deps = options.initialDeps;\n }\n }\n /**\n * 更新依赖\n * @param option 节点配置\n * @param key 哪个key配置了这个目标的id\n */\n updateDep({ id, name, key, data }) {\n const dep = this.deps[id] || {\n name,\n keys: []\n };\n dep.name = name;\n dep.data = data;\n this.deps[id] = dep;\n if (dep.keys.indexOf(key) === -1) {\n dep.keys.push(key);\n }\n }\n /**\n * 删除依赖\n * @param node 哪个节点的依赖需要移除,如果为空,则移除所有依赖\n * @param key 节点下哪个key需要移除,如果为空,则移除改节点下的所有依赖key\n * @returns void\n */\n removeDep(id, key) {\n if (typeof id === \"undefined\") {\n Object.keys(this.deps).forEach((depKey) => {\n delete this.deps[depKey];\n });\n return;\n }\n const dep = this.deps[id];\n if (!dep) return;\n if (key) {\n const index = dep.keys.indexOf(key);\n dep.keys.splice(index, 1);\n if (dep.keys.length === 0) {\n delete this.deps[id];\n }\n } else {\n delete this.deps[id];\n }\n }\n /**\n * 判断指定节点下的指定key是否存在在依赖列表中\n * @param node 哪个节点\n * @param key 哪个key\n * @returns boolean\n */\n hasDep(id, key) {\n const dep = this.deps[id];\n return Boolean(dep?.keys.find((d) => d === key));\n }\n destroy() {\n this.deps = {};\n }\n }\n\n const createCodeBlockTarget = (id, codeBlock, initialDeps = {}) => new Target({\n type: DepTargetType.CODE_BLOCK,\n id,\n initialDeps,\n name: codeBlock.name,\n isTarget: (_key, value) => {\n if (id === value) {\n return true;\n }\n if (value?.hookType === HookType.CODE && Array.isArray(value.hookData)) {\n const index = value.hookData.findIndex((item) => item.codeId === id);\n return Boolean(index > -1);\n }\n return false;\n }\n });\n const isIncludeArrayField = (keys, fields) => {\n let f = fields;\n return keys.some((key, index) => {\n const field = f.find(({ name }) => name === key);\n f = field?.fields || [];\n return field && field.type === \"array\" && // 不是整数\n /^(?!\\d+$).*$/.test(`${keys[index + 1]}`) && index < keys.length - 1;\n });\n };\n const isDataSourceTemplate = (value, ds, hasArray = false) => {\n const templates = value.match(dataSourceTemplateRegExp) || [];\n if (templates.length <= 0) {\n return false;\n }\n const arrayFieldTemplates = [];\n const fieldTemplates = [];\n templates.forEach((tpl) => {\n const expression = tpl.substring(2, tpl.length - 1);\n const keys = getKeysArray(expression);\n const dsId = keys.shift();\n if (!dsId || dsId !== ds.id) {\n return;\n }\n if (isIncludeArrayField(keys, ds.fields)) {\n arrayFieldTemplates.push(tpl);\n } else {\n fieldTemplates.push(tpl);\n }\n });\n if (hasArray) {\n return arrayFieldTemplates.length > 0;\n }\n return fieldTemplates.length > 0;\n };\n const isSpecificDataSourceTemplate = (value, dsId) => value?.isBindDataSourceField && value.dataSourceId && value.dataSourceId === dsId && typeof value.template === \"string\";\n const isUseDataSourceField = (value, id) => {\n if (!Array.isArray(value) || typeof value[0] !== \"string\") {\n return false;\n }\n const [prefixId] = value;\n const prefixIndex = prefixId.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);\n if (prefixIndex === -1) {\n return false;\n }\n const dsId = prefixId.substring(prefixIndex + DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length);\n return dsId === id;\n };\n const isDataSourceTarget = (ds, key, value, hasArray = false) => {\n if (!value || ![\"string\", \"object\"].includes(typeof value)) {\n return false;\n }\n if (`${key}`.startsWith(NODE_CONDS_KEY)) {\n return false;\n }\n if (typeof value === \"string\") {\n return isDataSourceTemplate(value, ds, hasArray);\n }\n if (isObject(value) && value?.isBindDataSource && value.dataSourceId && value.dataSourceId === ds.id) {\n return true;\n }\n if (isSpecificDataSourceTemplate(value, ds.id)) {\n return true;\n }\n if (isUseDataSourceField(value, ds.id)) {\n const [, ...keys] = value;\n const includeArray = isIncludeArrayField(keys, ds.fields);\n if (hasArray) {\n return includeArray;\n }\n return !includeArray;\n }\n return false;\n };\n const isDataSourceCondTarget = (ds, key, value, hasArray = false) => {\n if (!Array.isArray(value) || !ds) {\n return false;\n }\n const [dsId, ...keys] = value;\n if (dsId !== ds.id || !`${key}`.startsWith(NODE_CONDS_KEY)) {\n return false;\n }\n if (ds.fields?.find((field) => field.name === keys[0])) {\n const includeArray = isIncludeArrayField(keys, ds.fields);\n if (hasArray) {\n return includeArray;\n }\n return !includeArray;\n }\n return false;\n };\n const createDataSourceTarget = (ds, initialDeps = {}) => new Target({\n type: DepTargetType.DATA_SOURCE,\n id: ds.id,\n initialDeps,\n isTarget: (key, value) => isDataSourceTarget(ds, key, value)\n });\n const createDataSourceCondTarget = (ds, initialDeps = {}) => new Target({\n type: DepTargetType.DATA_SOURCE_COND,\n id: ds.id,\n initialDeps,\n isTarget: (key, value) => isDataSourceCondTarget(ds, key, value)\n });\n const createDataSourceMethodTarget = (ds, initialDeps = {}) => new Target({\n type: DepTargetType.DATA_SOURCE_METHOD,\n id: ds.id,\n initialDeps,\n isTarget: (_key, value) => {\n if (!Array.isArray(value)) {\n return false;\n }\n const [dsId, methodName] = value;\n if (!methodName || dsId !== ds.id) {\n return false;\n }\n if (ds.methods?.find((method) => method.name === methodName)) {\n return true;\n }\n if (ds.fields?.find((field) => field.name === methodName)) {\n return false;\n }\n return true;\n }\n });\n const traverseTarget = (targetsList, cb, type) => {\n for (const targets of Object.values(targetsList)) {\n for (const target of Object.values(targets)) {\n if (type && target.type !== type) {\n continue;\n }\n cb(target);\n }\n }\n };\n\n class Watcher {\n targetsList = {};\n childrenProp = \"items\";\n idProp = \"id\";\n nameProp = \"name\";\n constructor(options) {\n if (options?.initialTargets) {\n this.targetsList = options.initialTargets;\n }\n if (options?.childrenProp) {\n this.childrenProp = options.childrenProp;\n }\n }\n getTargetsList() {\n return this.targetsList;\n }\n /**\n * 获取指定类型中的所有target\n * @param type 分类\n * @returns Target[]\n */\n getTargets(type = DepTargetType.DEFAULT) {\n return this.targetsList[type] || {};\n }\n /**\n * 添加新的目标\n * @param target Target\n */\n addTarget(target) {\n const targets = this.getTargets(target.type) || {};\n this.targetsList[target.type] = targets;\n targets[target.id] = target;\n }\n /**\n * 获取指定id的target\n * @param id target id\n * @returns Target\n */\n getTarget(id, type = DepTargetType.DEFAULT) {\n return this.getTargets(type)[id];\n }\n /**\n * 判断是否存在指定id的target\n * @param id target id\n * @returns boolean\n */\n hasTarget(id, type = DepTargetType.DEFAULT) {\n return Boolean(this.getTarget(id, type));\n }\n /**\n * 判断是否存在指定类型的target\n * @param type target type\n * @returns boolean\n */\n hasSpecifiedTypeTarget(type = DepTargetType.DEFAULT) {\n return Object.keys(this.getTargets(type)).length > 0;\n }\n /**\n * 删除指定id的target\n * @param id target id\n */\n removeTarget(id, type = DepTargetType.DEFAULT) {\n const targets = this.getTargets(type);\n if (targets[id]) {\n targets[id].destroy();\n delete targets[id];\n }\n }\n /**\n * 删除指定分类的所有target\n * @param type 分类\n * @returns void\n */\n removeTargets(type = DepTargetType.DEFAULT) {\n const targets = this.targetsList[type];\n if (!targets) return;\n for (const target of Object.values(targets)) {\n target.destroy();\n }\n delete this.targetsList[type];\n }\n /**\n * 删除所有target\n */\n clearTargets() {\n for (const key of Object.keys(this.targetsList)) {\n delete this.targetsList[key];\n }\n }\n /**\n * 收集依赖\n * @param nodes 需要收集的节点\n * @param deep 是否需要收集子节点\n * @param type 强制收集指定类型的依赖\n */\n collect(nodes, depExtendedData = {}, deep = false, type) {\n this.collectByCallback(nodes, type, ({ node, target }) => {\n this.removeTargetDep(target, node);\n this.collectItem(node, target, depExtendedData, deep);\n });\n }\n collectByCallback(nodes, type, cb) {\n traverseTarget(\n this.targetsList,\n (target) => {\n if (!type && !target.isCollectByDefault) {\n return;\n }\n for (const node of nodes) {\n cb({ node, target });\n }\n },\n type\n );\n }\n /**\n * 清除所有目标的依赖\n * @param nodes 需要清除依赖的节点\n */\n clear(nodes, type) {\n let { targetsList } = this;\n if (type) {\n targetsList = {\n [type]: this.getTargets(type)\n };\n }\n const clearedItemsNodeIds = [];\n traverseTarget(targetsList, (target) => {\n if (nodes) {\n for (const node of nodes) {\n target.removeDep(node[this.idProp]);\n if (Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length && !clearedItemsNodeIds.includes(node[this.idProp])) {\n clearedItemsNodeIds.push(node[this.idProp]);\n this.clear(node[this.childrenProp]);\n }\n }\n } else {\n target.removeDep();\n }\n });\n }\n /**\n * 清除指定类型的依赖\n * @param type 类型\n * @param nodes 需要清除依赖的节点\n */\n clearByType(type, nodes) {\n this.clear(nodes, type);\n }\n collectItem(node, target, depExtendedData = {}, deep = false) {\n const collectTarget = (config, prop = \"\") => {\n const doCollect = (key, value) => {\n const keyIsItems = key === this.childrenProp;\n const fullKey = prop ? `${prop}.${key}` : key;\n if (target.isTarget(fullKey, value)) {\n target.updateDep({\n id: node[this.idProp],\n name: `${node[this.nameProp] || node[this.idProp]}`,\n data: depExtendedData,\n key: fullKey\n });\n } else if (!keyIsItems && Array.isArray(value)) {\n for (let i = 0, l = value.length; i < l; i++) {\n const item = value[i];\n if (isObject(item)) {\n collectTarget(item, `${fullKey}[${i}]`);\n }\n }\n } else if (isObject(value)) {\n collectTarget(value, fullKey);\n }\n if (keyIsItems && deep && Array.isArray(value)) {\n for (const child of value) {\n this.collectItem(child, target, depExtendedData, deep);\n }\n }\n };\n for (const [key, value] of Object.entries(config)) {\n if (typeof value === \"undefined\" || value === \"\") continue;\n doCollect(key, value);\n }\n };\n collectTarget(node);\n }\n removeTargetDep(target, node, key) {\n target.removeDep(node[this.idProp], key);\n if (typeof key === \"undefined\" && Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length) {\n for (const item of node[this.childrenProp]) {\n this.removeTargetDep(target, item, key);\n }\n }\n }\n }\n\n const error = (...args) => {\n if (process.env.NODE_ENV === \"development\") {\n console.error(\"magic editor: \", ...args);\n }\n };\n\n onmessage = (e) => {\n const watcher = new Watcher({ initialTargets: {} });\n const { dsl } = e.data;\n try {\n const mApp = eval(`(${dsl})`);\n if (!mApp) {\n postMessage({});\n }\n watcher.clearTargets();\n if (mApp.codeBlocks) {\n for (const [id, code] of Object.entries(mApp.codeBlocks)) {\n watcher.addTarget(createCodeBlockTarget(id, code));\n }\n }\n if (mApp.dataSources) {\n for (const ds of mApp.dataSources) {\n watcher.addTarget(createDataSourceTarget(ds, {}));\n watcher.addTarget(createDataSourceMethodTarget(ds, {}));\n watcher.addTarget(createDataSourceCondTarget(ds, {}));\n }\n }\n watcher.collectByCallback(mApp.items, void 0, ({ node, target }) => {\n watcher.collectItem(node, target, { pageId: node.id }, true);\n });\n const data = {\n [DepTargetType.DATA_SOURCE]: {},\n [DepTargetType.DATA_SOURCE_METHOD]: {},\n [DepTargetType.DATA_SOURCE_COND]: {},\n [DepTargetType.CODE_BLOCK]: {}\n };\n traverseTarget(watcher.getTargetsList(), (target) => {\n data[target.type][target.id] = target.deps;\n });\n postMessage(data);\n } catch (e2) {\n error(e2);\n postMessage({});\n }\n };\n\n})();\n";
13957
- const blob = typeof self !== "undefined" && self.Blob && new Blob([jsContent], { type: "text/javascript;charset=utf-8" });
13958
- function WorkerWrapper(options) {
13959
- let objURL;
13960
- try {
13961
- objURL = blob && (self.URL || self.webkitURL).createObjectURL(blob);
13962
- if (!objURL) throw ''
13963
- const worker = new Worker(objURL, {
13964
-
13965
- name: options?.name
14096
+ const jsContent = `(function () {
14097
+ 'use strict';
14098
+
14099
+ var events = {exports: {}};
14100
+
14101
+ var hasRequiredEvents;
14102
+
14103
+ function requireEvents () {
14104
+ if (hasRequiredEvents) return events.exports;
14105
+ hasRequiredEvents = 1;
14106
+
14107
+ var R = typeof Reflect === 'object' ? Reflect : null;
14108
+ var ReflectApply = R && typeof R.apply === 'function'
14109
+ ? R.apply
14110
+ : function ReflectApply(target, receiver, args) {
14111
+ return Function.prototype.apply.call(target, receiver, args);
14112
+ };
14113
+
14114
+ var ReflectOwnKeys;
14115
+ if (R && typeof R.ownKeys === 'function') {
14116
+ ReflectOwnKeys = R.ownKeys;
14117
+ } else if (Object.getOwnPropertySymbols) {
14118
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
14119
+ return Object.getOwnPropertyNames(target)
14120
+ .concat(Object.getOwnPropertySymbols(target));
14121
+ };
14122
+ } else {
14123
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
14124
+ return Object.getOwnPropertyNames(target);
14125
+ };
14126
+ }
14127
+
14128
+ function ProcessEmitWarning(warning) {
14129
+ if (console && console.warn) console.warn(warning);
14130
+ }
14131
+
14132
+ var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
14133
+ return value !== value;
14134
+ };
14135
+
14136
+ function EventEmitter() {
14137
+ EventEmitter.init.call(this);
14138
+ }
14139
+ events.exports = EventEmitter;
14140
+ events.exports.once = once;
14141
+
14142
+ // Backwards-compat with node 0.10.x
14143
+ EventEmitter.EventEmitter = EventEmitter;
14144
+
14145
+ EventEmitter.prototype._events = undefined;
14146
+ EventEmitter.prototype._eventsCount = 0;
14147
+ EventEmitter.prototype._maxListeners = undefined;
14148
+
14149
+ // By default EventEmitters will print a warning if more than 10 listeners are
14150
+ // added to it. This is a useful default which helps finding memory leaks.
14151
+ var defaultMaxListeners = 10;
14152
+
14153
+ function checkListener(listener) {
14154
+ if (typeof listener !== 'function') {
14155
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
14156
+ }
14157
+ }
14158
+
14159
+ Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
14160
+ enumerable: true,
14161
+ get: function() {
14162
+ return defaultMaxListeners;
14163
+ },
14164
+ set: function(arg) {
14165
+ if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
14166
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
14167
+ }
14168
+ defaultMaxListeners = arg;
14169
+ }
14170
+ });
14171
+
14172
+ EventEmitter.init = function() {
14173
+
14174
+ if (this._events === undefined ||
14175
+ this._events === Object.getPrototypeOf(this)._events) {
14176
+ this._events = Object.create(null);
14177
+ this._eventsCount = 0;
14178
+ }
14179
+
14180
+ this._maxListeners = this._maxListeners || undefined;
14181
+ };
14182
+
14183
+ // Obviously not all Emitters should be limited to 10. This function allows
14184
+ // that to be increased. Set to zero for unlimited.
14185
+ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
14186
+ if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
14187
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
14188
+ }
14189
+ this._maxListeners = n;
14190
+ return this;
14191
+ };
14192
+
14193
+ function _getMaxListeners(that) {
14194
+ if (that._maxListeners === undefined)
14195
+ return EventEmitter.defaultMaxListeners;
14196
+ return that._maxListeners;
14197
+ }
14198
+
14199
+ EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
14200
+ return _getMaxListeners(this);
14201
+ };
14202
+
14203
+ EventEmitter.prototype.emit = function emit(type) {
14204
+ var args = [];
14205
+ for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
14206
+ var doError = (type === 'error');
14207
+
14208
+ var events = this._events;
14209
+ if (events !== undefined)
14210
+ doError = (doError && events.error === undefined);
14211
+ else if (!doError)
14212
+ return false;
14213
+
14214
+ // If there is no 'error' event listener then throw.
14215
+ if (doError) {
14216
+ var er;
14217
+ if (args.length > 0)
14218
+ er = args[0];
14219
+ if (er instanceof Error) {
14220
+ // Note: The comments on the \`throw\` lines are intentional, they show
14221
+ // up in Node's output if this results in an unhandled exception.
14222
+ throw er; // Unhandled 'error' event
14223
+ }
14224
+ // At least give some kind of context to the user
14225
+ var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
14226
+ err.context = er;
14227
+ throw err; // Unhandled 'error' event
14228
+ }
14229
+
14230
+ var handler = events[type];
14231
+
14232
+ if (handler === undefined)
14233
+ return false;
14234
+
14235
+ if (typeof handler === 'function') {
14236
+ ReflectApply(handler, this, args);
14237
+ } else {
14238
+ var len = handler.length;
14239
+ var listeners = arrayClone(handler, len);
14240
+ for (var i = 0; i < len; ++i)
14241
+ ReflectApply(listeners[i], this, args);
14242
+ }
14243
+
14244
+ return true;
14245
+ };
14246
+
14247
+ function _addListener(target, type, listener, prepend) {
14248
+ var m;
14249
+ var events;
14250
+ var existing;
14251
+
14252
+ checkListener(listener);
14253
+
14254
+ events = target._events;
14255
+ if (events === undefined) {
14256
+ events = target._events = Object.create(null);
14257
+ target._eventsCount = 0;
14258
+ } else {
14259
+ // To avoid recursion in the case that type === "newListener"! Before
14260
+ // adding it to the listeners, first emit "newListener".
14261
+ if (events.newListener !== undefined) {
14262
+ target.emit('newListener', type,
14263
+ listener.listener ? listener.listener : listener);
14264
+
14265
+ // Re-assign \`events\` because a newListener handler could have caused the
14266
+ // this._events to be assigned to a new object
14267
+ events = target._events;
14268
+ }
14269
+ existing = events[type];
14270
+ }
14271
+
14272
+ if (existing === undefined) {
14273
+ // Optimize the case of one listener. Don't need the extra array object.
14274
+ existing = events[type] = listener;
14275
+ ++target._eventsCount;
14276
+ } else {
14277
+ if (typeof existing === 'function') {
14278
+ // Adding the second element, need to change to array.
14279
+ existing = events[type] =
14280
+ prepend ? [listener, existing] : [existing, listener];
14281
+ // If we've already got an array, just append.
14282
+ } else if (prepend) {
14283
+ existing.unshift(listener);
14284
+ } else {
14285
+ existing.push(listener);
14286
+ }
14287
+
14288
+ // Check for listener leak
14289
+ m = _getMaxListeners(target);
14290
+ if (m > 0 && existing.length > m && !existing.warned) {
14291
+ existing.warned = true;
14292
+ // No error code for this since it is a Warning
14293
+ // eslint-disable-next-line no-restricted-syntax
14294
+ var w = new Error('Possible EventEmitter memory leak detected. ' +
14295
+ existing.length + ' ' + String(type) + ' listeners ' +
14296
+ 'added. Use emitter.setMaxListeners() to ' +
14297
+ 'increase limit');
14298
+ w.name = 'MaxListenersExceededWarning';
14299
+ w.emitter = target;
14300
+ w.type = type;
14301
+ w.count = existing.length;
14302
+ ProcessEmitWarning(w);
14303
+ }
14304
+ }
14305
+
14306
+ return target;
14307
+ }
14308
+
14309
+ EventEmitter.prototype.addListener = function addListener(type, listener) {
14310
+ return _addListener(this, type, listener, false);
14311
+ };
14312
+
14313
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
14314
+
14315
+ EventEmitter.prototype.prependListener =
14316
+ function prependListener(type, listener) {
14317
+ return _addListener(this, type, listener, true);
14318
+ };
14319
+
14320
+ function onceWrapper() {
14321
+ if (!this.fired) {
14322
+ this.target.removeListener(this.type, this.wrapFn);
14323
+ this.fired = true;
14324
+ if (arguments.length === 0)
14325
+ return this.listener.call(this.target);
14326
+ return this.listener.apply(this.target, arguments);
14327
+ }
14328
+ }
14329
+
14330
+ function _onceWrap(target, type, listener) {
14331
+ var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
14332
+ var wrapped = onceWrapper.bind(state);
14333
+ wrapped.listener = listener;
14334
+ state.wrapFn = wrapped;
14335
+ return wrapped;
14336
+ }
14337
+
14338
+ EventEmitter.prototype.once = function once(type, listener) {
14339
+ checkListener(listener);
14340
+ this.on(type, _onceWrap(this, type, listener));
14341
+ return this;
14342
+ };
14343
+
14344
+ EventEmitter.prototype.prependOnceListener =
14345
+ function prependOnceListener(type, listener) {
14346
+ checkListener(listener);
14347
+ this.prependListener(type, _onceWrap(this, type, listener));
14348
+ return this;
14349
+ };
14350
+
14351
+ // Emits a 'removeListener' event if and only if the listener was removed.
14352
+ EventEmitter.prototype.removeListener =
14353
+ function removeListener(type, listener) {
14354
+ var list, events, position, i, originalListener;
14355
+
14356
+ checkListener(listener);
14357
+
14358
+ events = this._events;
14359
+ if (events === undefined)
14360
+ return this;
14361
+
14362
+ list = events[type];
14363
+ if (list === undefined)
14364
+ return this;
14365
+
14366
+ if (list === listener || list.listener === listener) {
14367
+ if (--this._eventsCount === 0)
14368
+ this._events = Object.create(null);
14369
+ else {
14370
+ delete events[type];
14371
+ if (events.removeListener)
14372
+ this.emit('removeListener', type, list.listener || listener);
14373
+ }
14374
+ } else if (typeof list !== 'function') {
14375
+ position = -1;
14376
+
14377
+ for (i = list.length - 1; i >= 0; i--) {
14378
+ if (list[i] === listener || list[i].listener === listener) {
14379
+ originalListener = list[i].listener;
14380
+ position = i;
14381
+ break;
14382
+ }
14383
+ }
14384
+
14385
+ if (position < 0)
14386
+ return this;
14387
+
14388
+ if (position === 0)
14389
+ list.shift();
14390
+ else {
14391
+ spliceOne(list, position);
14392
+ }
14393
+
14394
+ if (list.length === 1)
14395
+ events[type] = list[0];
14396
+
14397
+ if (events.removeListener !== undefined)
14398
+ this.emit('removeListener', type, originalListener || listener);
14399
+ }
14400
+
14401
+ return this;
14402
+ };
14403
+
14404
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
14405
+
14406
+ EventEmitter.prototype.removeAllListeners =
14407
+ function removeAllListeners(type) {
14408
+ var listeners, events, i;
14409
+
14410
+ events = this._events;
14411
+ if (events === undefined)
14412
+ return this;
14413
+
14414
+ // not listening for removeListener, no need to emit
14415
+ if (events.removeListener === undefined) {
14416
+ if (arguments.length === 0) {
14417
+ this._events = Object.create(null);
14418
+ this._eventsCount = 0;
14419
+ } else if (events[type] !== undefined) {
14420
+ if (--this._eventsCount === 0)
14421
+ this._events = Object.create(null);
14422
+ else
14423
+ delete events[type];
14424
+ }
14425
+ return this;
14426
+ }
14427
+
14428
+ // emit removeListener for all listeners on all events
14429
+ if (arguments.length === 0) {
14430
+ var keys = Object.keys(events);
14431
+ var key;
14432
+ for (i = 0; i < keys.length; ++i) {
14433
+ key = keys[i];
14434
+ if (key === 'removeListener') continue;
14435
+ this.removeAllListeners(key);
14436
+ }
14437
+ this.removeAllListeners('removeListener');
14438
+ this._events = Object.create(null);
14439
+ this._eventsCount = 0;
14440
+ return this;
14441
+ }
14442
+
14443
+ listeners = events[type];
14444
+
14445
+ if (typeof listeners === 'function') {
14446
+ this.removeListener(type, listeners);
14447
+ } else if (listeners !== undefined) {
14448
+ // LIFO order
14449
+ for (i = listeners.length - 1; i >= 0; i--) {
14450
+ this.removeListener(type, listeners[i]);
14451
+ }
14452
+ }
14453
+
14454
+ return this;
14455
+ };
14456
+
14457
+ function _listeners(target, type, unwrap) {
14458
+ var events = target._events;
14459
+
14460
+ if (events === undefined)
14461
+ return [];
14462
+
14463
+ var evlistener = events[type];
14464
+ if (evlistener === undefined)
14465
+ return [];
14466
+
14467
+ if (typeof evlistener === 'function')
14468
+ return unwrap ? [evlistener.listener || evlistener] : [evlistener];
14469
+
14470
+ return unwrap ?
14471
+ unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
14472
+ }
14473
+
14474
+ EventEmitter.prototype.listeners = function listeners(type) {
14475
+ return _listeners(this, type, true);
14476
+ };
14477
+
14478
+ EventEmitter.prototype.rawListeners = function rawListeners(type) {
14479
+ return _listeners(this, type, false);
14480
+ };
14481
+
14482
+ EventEmitter.listenerCount = function(emitter, type) {
14483
+ if (typeof emitter.listenerCount === 'function') {
14484
+ return emitter.listenerCount(type);
14485
+ } else {
14486
+ return listenerCount.call(emitter, type);
14487
+ }
14488
+ };
14489
+
14490
+ EventEmitter.prototype.listenerCount = listenerCount;
14491
+ function listenerCount(type) {
14492
+ var events = this._events;
14493
+
14494
+ if (events !== undefined) {
14495
+ var evlistener = events[type];
14496
+
14497
+ if (typeof evlistener === 'function') {
14498
+ return 1;
14499
+ } else if (evlistener !== undefined) {
14500
+ return evlistener.length;
14501
+ }
14502
+ }
14503
+
14504
+ return 0;
14505
+ }
14506
+
14507
+ EventEmitter.prototype.eventNames = function eventNames() {
14508
+ return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
14509
+ };
14510
+
14511
+ function arrayClone(arr, n) {
14512
+ var copy = new Array(n);
14513
+ for (var i = 0; i < n; ++i)
14514
+ copy[i] = arr[i];
14515
+ return copy;
14516
+ }
14517
+
14518
+ function spliceOne(list, index) {
14519
+ for (; index + 1 < list.length; index++)
14520
+ list[index] = list[index + 1];
14521
+ list.pop();
14522
+ }
14523
+
14524
+ function unwrapListeners(arr) {
14525
+ var ret = new Array(arr.length);
14526
+ for (var i = 0; i < ret.length; ++i) {
14527
+ ret[i] = arr[i].listener || arr[i];
14528
+ }
14529
+ return ret;
14530
+ }
14531
+
14532
+ function once(emitter, name) {
14533
+ return new Promise(function (resolve, reject) {
14534
+ function errorListener(err) {
14535
+ emitter.removeListener(name, resolver);
14536
+ reject(err);
14537
+ }
14538
+
14539
+ function resolver() {
14540
+ if (typeof emitter.removeListener === 'function') {
14541
+ emitter.removeListener('error', errorListener);
14542
+ }
14543
+ resolve([].slice.call(arguments));
14544
+ }
14545
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
14546
+ if (name !== 'error') {
14547
+ addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
14548
+ }
14549
+ });
14550
+ }
14551
+
14552
+ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
14553
+ if (typeof emitter.on === 'function') {
14554
+ eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
14555
+ }
14556
+ }
14557
+
14558
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
14559
+ if (typeof emitter.on === 'function') {
14560
+ if (flags.once) {
14561
+ emitter.once(name, listener);
14562
+ } else {
14563
+ emitter.on(name, listener);
14564
+ }
14565
+ } else if (typeof emitter.addEventListener === 'function') {
14566
+ // EventTarget does not have \`error\` event semantics like Node
14567
+ // EventEmitters, we do not listen for \`error\` events here.
14568
+ emitter.addEventListener(name, function wrapListener(arg) {
14569
+ // IE does not have builtin \`{ once: true }\` support so we
14570
+ // have to do it manually.
14571
+ if (flags.once) {
14572
+ emitter.removeEventListener(name, wrapListener);
14573
+ }
14574
+ listener(arg);
14575
+ });
14576
+ } else {
14577
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
14578
+ }
14579
+ }
14580
+ return events.exports;
14581
+ }
14582
+
14583
+ requireEvents();
14584
+
14585
+ /*! *****************************************************************************\r
14586
+ Copyright (c) Microsoft Corporation.\r
14587
+ \r
14588
+ Permission to use, copy, modify, and/or distribute this software for any\r
14589
+ purpose with or without fee is hereby granted.\r
14590
+ \r
14591
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r
14592
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r
14593
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r
14594
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r
14595
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r
14596
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r
14597
+ PERFORMANCE OF THIS SOFTWARE.\r
14598
+ ***************************************************************************** */\r
14599
+ \r
14600
+
14601
+ let cachedTextEncoder = new TextEncoder("utf-8");
14602
+
14603
+ typeof cachedTextEncoder.encodeInto === "function"
14604
+ ? function (arg, view) {
14605
+ return cachedTextEncoder.encodeInto(arg, view);
14606
+ }
14607
+ : function (arg, view) {
14608
+ const buf = cachedTextEncoder.encode(arg);
14609
+ view.set(buf);
14610
+ return {
14611
+ read: arg.length,
14612
+ written: buf.length,
14613
+ };
14614
+ };
14615
+
14616
+ const NODE_CONDS_KEY = "displayConds";
14617
+ const NODE_DISABLE_DATA_SOURCE_KEY = "_tmagic_node_disabled_data_source";
14618
+ const NODE_DISABLE_CODE_BLOCK_KEY = "_tmagic_node_disabled_code_block";
14619
+ var HookType = /* @__PURE__ */ ((HookType2) => {
14620
+ HookType2["CODE"] = "code";
14621
+ return HookType2;
14622
+ })(HookType || {});
14623
+
14624
+ const isObject = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
14625
+ const getKeysArray = (keys) => (
14626
+ // 将 array[0] 转成 array.0
14627
+ \`\${keys}\`.replace(/\\[(\\d+)\\]/g, ".$1").split(".")
14628
+ );
14629
+ const DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX = "ds-field::";
14630
+ const dataSourceTemplateRegExp = /\\$\\{([\\s\\S]+?)\\}/g;
14631
+
14632
+ var DepTargetType = /* @__PURE__ */ ((DepTargetType2) => {
14633
+ DepTargetType2["DEFAULT"] = "default";
14634
+ DepTargetType2["CODE_BLOCK"] = "code-block";
14635
+ DepTargetType2["DATA_SOURCE"] = "data-source";
14636
+ DepTargetType2["DATA_SOURCE_METHOD"] = "data-source-method";
14637
+ DepTargetType2["DATA_SOURCE_COND"] = "data-source-cond";
14638
+ return DepTargetType2;
14639
+ })(DepTargetType || {});
14640
+
14641
+ class Target {
14642
+ /**
14643
+ * 如何识别目标
14644
+ */
14645
+ isTarget;
14646
+ /**
14647
+ * 目标id,不可重复
14648
+ * 例如目标是代码块,则为代码块id
14649
+ */
14650
+ id;
14651
+ /**
14652
+ * 目标名称,用于显示在依赖列表中
14653
+ */
14654
+ name;
14655
+ /**
14656
+ * 不同的目标可以进行分类,例如代码块,数据源可以为两个不同的type
14657
+ */
14658
+ type = DepTargetType.DEFAULT;
14659
+ /**
14660
+ * 依赖详情
14661
+ * 实例:{ 'node_id': { name: 'node_name', keys: [ created, mounted ] } }
14662
+ */
14663
+ deps = {};
14664
+ /**
14665
+ * 是否默认收集,默认为true,当值为false时需要传入type参数给collect方法才会被收集
14666
+ */
14667
+ isCollectByDefault;
14668
+ constructor(options) {
14669
+ this.isTarget = options.isTarget;
14670
+ this.id = options.id;
14671
+ this.name = options.name;
14672
+ this.isCollectByDefault = options.isCollectByDefault ?? true;
14673
+ if (options.type) {
14674
+ this.type = options.type;
14675
+ }
14676
+ if (options.initialDeps) {
14677
+ this.deps = options.initialDeps;
14678
+ }
14679
+ }
14680
+ /**
14681
+ * 更新依赖
14682
+ * @param option 节点配置
14683
+ * @param key 哪个key配置了这个目标的id
14684
+ */
14685
+ updateDep({ id, name, key, data }) {
14686
+ const dep = this.deps[id] || {
14687
+ name,
14688
+ keys: []
14689
+ };
14690
+ dep.name = name;
14691
+ dep.data = data;
14692
+ this.deps[id] = dep;
14693
+ if (dep.keys.indexOf(key) === -1) {
14694
+ dep.keys.push(key);
14695
+ }
14696
+ }
14697
+ /**
14698
+ * 删除依赖
14699
+ * @param node 哪个节点的依赖需要移除,如果为空,则移除所有依赖
14700
+ * @param key 节点下哪个key需要移除,如果为空,则移除改节点下的所有依赖key
14701
+ * @returns void
14702
+ */
14703
+ removeDep(id, key) {
14704
+ if (typeof id === "undefined") {
14705
+ Object.keys(this.deps).forEach((depKey) => {
14706
+ delete this.deps[depKey];
14707
+ });
14708
+ return;
14709
+ }
14710
+ const dep = this.deps[id];
14711
+ if (!dep) return;
14712
+ if (key) {
14713
+ const index = dep.keys.indexOf(key);
14714
+ dep.keys.splice(index, 1);
14715
+ if (dep.keys.length === 0) {
14716
+ delete this.deps[id];
14717
+ }
14718
+ } else {
14719
+ delete this.deps[id];
14720
+ }
14721
+ }
14722
+ /**
14723
+ * 判断指定节点下的指定key是否存在在依赖列表中
14724
+ * @param node 哪个节点
14725
+ * @param key 哪个key
14726
+ * @returns boolean
14727
+ */
14728
+ hasDep(id, key) {
14729
+ const dep = this.deps[id];
14730
+ return Boolean(dep?.keys.find((d) => d === key));
14731
+ }
14732
+ destroy() {
14733
+ this.deps = {};
14734
+ }
14735
+ }
14736
+
14737
+ const createCodeBlockTarget = (id, codeBlock, initialDeps = {}) => new Target({
14738
+ type: DepTargetType.CODE_BLOCK,
14739
+ id,
14740
+ initialDeps,
14741
+ name: codeBlock.name,
14742
+ isTarget: (_key, value) => {
14743
+ if (id === value) {
14744
+ return true;
14745
+ }
14746
+ if (value?.hookType === HookType.CODE && Array.isArray(value.hookData)) {
14747
+ const index = value.hookData.findIndex((item) => item.codeId === id);
14748
+ return Boolean(index > -1);
14749
+ }
14750
+ return false;
14751
+ }
14752
+ });
14753
+ const isIncludeArrayField = (keys, fields) => {
14754
+ let f = fields;
14755
+ return keys.some((key, index) => {
14756
+ const field = f.find(({ name }) => name === key);
14757
+ f = field?.fields || [];
14758
+ return field && field.type === "array" && // 不是整数
14759
+ /^(?!\\d+$).*$/.test(\`\${keys[index + 1]}\`) && index < keys.length - 1;
14760
+ });
14761
+ };
14762
+ const isDataSourceTemplate = (value, ds, hasArray = false) => {
14763
+ const templates = value.match(dataSourceTemplateRegExp) || [];
14764
+ if (templates.length <= 0) {
14765
+ return false;
14766
+ }
14767
+ const arrayFieldTemplates = [];
14768
+ const fieldTemplates = [];
14769
+ templates.forEach((tpl) => {
14770
+ const expression = tpl.substring(2, tpl.length - 1);
14771
+ const keys = getKeysArray(expression);
14772
+ const dsId = keys.shift();
14773
+ if (!dsId || dsId !== ds.id) {
14774
+ return;
14775
+ }
14776
+ if (isIncludeArrayField(keys, ds.fields)) {
14777
+ arrayFieldTemplates.push(tpl);
14778
+ } else {
14779
+ fieldTemplates.push(tpl);
14780
+ }
14781
+ });
14782
+ if (hasArray) {
14783
+ return arrayFieldTemplates.length > 0;
14784
+ }
14785
+ return fieldTemplates.length > 0;
14786
+ };
14787
+ const isSpecificDataSourceTemplate = (value, dsId) => value?.isBindDataSourceField && value.dataSourceId && value.dataSourceId === dsId && typeof value.template === "string";
14788
+ const isUseDataSourceField = (value, id) => {
14789
+ if (!Array.isArray(value) || typeof value[0] !== "string") {
14790
+ return false;
14791
+ }
14792
+ const [prefixId] = value;
14793
+ const prefixIndex = prefixId.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);
14794
+ if (prefixIndex === -1) {
14795
+ return false;
14796
+ }
14797
+ const dsId = prefixId.substring(prefixIndex + DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length);
14798
+ return dsId === id;
14799
+ };
14800
+ const isDataSourceTarget = (ds, key, value, hasArray = false) => {
14801
+ if (!value || !["string", "object"].includes(typeof value)) {
14802
+ return false;
14803
+ }
14804
+ if (\`\${key}\`.startsWith(NODE_CONDS_KEY)) {
14805
+ return false;
14806
+ }
14807
+ if (typeof value === "string") {
14808
+ return isDataSourceTemplate(value, ds, hasArray);
14809
+ }
14810
+ if (isObject(value) && value?.isBindDataSource && value.dataSourceId && value.dataSourceId === ds.id) {
14811
+ return true;
14812
+ }
14813
+ if (isSpecificDataSourceTemplate(value, ds.id)) {
14814
+ return true;
14815
+ }
14816
+ if (isUseDataSourceField(value, ds.id)) {
14817
+ const [, ...keys] = value;
14818
+ const includeArray = isIncludeArrayField(keys, ds.fields);
14819
+ if (hasArray) {
14820
+ return includeArray;
14821
+ }
14822
+ return !includeArray;
14823
+ }
14824
+ return false;
14825
+ };
14826
+ const isDataSourceCondTarget = (ds, key, value, hasArray = false) => {
14827
+ if (!Array.isArray(value) || !ds) {
14828
+ return false;
14829
+ }
14830
+ const [dsId, ...keys] = value;
14831
+ if (dsId !== ds.id || !\`\${key}\`.startsWith(NODE_CONDS_KEY)) {
14832
+ return false;
14833
+ }
14834
+ if (ds.fields?.find((field) => field.name === keys[0])) {
14835
+ const includeArray = isIncludeArrayField(keys, ds.fields);
14836
+ if (hasArray) {
14837
+ return includeArray;
14838
+ }
14839
+ return !includeArray;
14840
+ }
14841
+ return false;
14842
+ };
14843
+ const createDataSourceTarget = (ds, initialDeps = {}) => new Target({
14844
+ type: DepTargetType.DATA_SOURCE,
14845
+ id: ds.id,
14846
+ initialDeps,
14847
+ isTarget: (key, value) => isDataSourceTarget(ds, key, value)
14848
+ });
14849
+ const createDataSourceCondTarget = (ds, initialDeps = {}) => new Target({
14850
+ type: DepTargetType.DATA_SOURCE_COND,
14851
+ id: ds.id,
14852
+ initialDeps,
14853
+ isTarget: (key, value) => isDataSourceCondTarget(ds, key, value)
14854
+ });
14855
+ const createDataSourceMethodTarget = (ds, initialDeps = {}) => new Target({
14856
+ type: DepTargetType.DATA_SOURCE_METHOD,
14857
+ id: ds.id,
14858
+ initialDeps,
14859
+ isTarget: (_key, value) => {
14860
+ if (!Array.isArray(value)) {
14861
+ return false;
14862
+ }
14863
+ const [dsId, methodName] = value;
14864
+ if (!methodName || dsId !== ds.id) {
14865
+ return false;
14866
+ }
14867
+ if (ds.methods?.find((method) => method.name === methodName)) {
14868
+ return true;
14869
+ }
14870
+ if (ds.fields?.find((field) => field.name === methodName)) {
14871
+ return false;
14872
+ }
14873
+ return true;
14874
+ }
14875
+ });
14876
+ const traverseTarget = (targetsList, cb, type) => {
14877
+ for (const targets of Object.values(targetsList)) {
14878
+ for (const target of Object.values(targets)) {
14879
+ if (type && target.type !== type) {
14880
+ continue;
14881
+ }
14882
+ cb(target);
14883
+ }
14884
+ }
14885
+ };
14886
+
14887
+ class Watcher {
14888
+ targetsList = {};
14889
+ childrenProp = "items";
14890
+ idProp = "id";
14891
+ nameProp = "name";
14892
+ constructor(options) {
14893
+ if (options?.initialTargets) {
14894
+ this.targetsList = options.initialTargets;
14895
+ }
14896
+ if (options?.childrenProp) {
14897
+ this.childrenProp = options.childrenProp;
14898
+ }
14899
+ }
14900
+ getTargetsList() {
14901
+ return this.targetsList;
14902
+ }
14903
+ /**
14904
+ * 获取指定类型中的所有target
14905
+ * @param type 分类
14906
+ * @returns Target[]
14907
+ */
14908
+ getTargets(type = DepTargetType.DEFAULT) {
14909
+ return this.targetsList[type] || {};
14910
+ }
14911
+ /**
14912
+ * 添加新的目标
14913
+ * @param target Target
14914
+ */
14915
+ addTarget(target) {
14916
+ const targets = this.getTargets(target.type) || {};
14917
+ this.targetsList[target.type] = targets;
14918
+ targets[target.id] = target;
14919
+ }
14920
+ /**
14921
+ * 获取指定id的target
14922
+ * @param id target id
14923
+ * @returns Target
14924
+ */
14925
+ getTarget(id, type = DepTargetType.DEFAULT) {
14926
+ return this.getTargets(type)[id];
14927
+ }
14928
+ /**
14929
+ * 判断是否存在指定id的target
14930
+ * @param id target id
14931
+ * @returns boolean
14932
+ */
14933
+ hasTarget(id, type = DepTargetType.DEFAULT) {
14934
+ return Boolean(this.getTarget(id, type));
14935
+ }
14936
+ /**
14937
+ * 判断是否存在指定类型的target
14938
+ * @param type target type
14939
+ * @returns boolean
14940
+ */
14941
+ hasSpecifiedTypeTarget(type = DepTargetType.DEFAULT) {
14942
+ return Object.keys(this.getTargets(type)).length > 0;
14943
+ }
14944
+ /**
14945
+ * 删除指定id的target
14946
+ * @param id target id
14947
+ */
14948
+ removeTarget(id, type = DepTargetType.DEFAULT) {
14949
+ const targets = this.getTargets(type);
14950
+ if (targets[id]) {
14951
+ targets[id].destroy();
14952
+ delete targets[id];
14953
+ }
14954
+ }
14955
+ /**
14956
+ * 删除指定分类的所有target
14957
+ * @param type 分类
14958
+ * @returns void
14959
+ */
14960
+ removeTargets(type = DepTargetType.DEFAULT) {
14961
+ const targets = this.targetsList[type];
14962
+ if (!targets) return;
14963
+ for (const target of Object.values(targets)) {
14964
+ target.destroy();
14965
+ }
14966
+ delete this.targetsList[type];
14967
+ }
14968
+ /**
14969
+ * 删除所有target
14970
+ */
14971
+ clearTargets() {
14972
+ for (const key of Object.keys(this.targetsList)) {
14973
+ delete this.targetsList[key];
14974
+ }
14975
+ }
14976
+ /**
14977
+ * 收集依赖
14978
+ * @param nodes 需要收集的节点
14979
+ * @param deep 是否需要收集子节点
14980
+ * @param type 强制收集指定类型的依赖
14981
+ */
14982
+ collect(nodes, depExtendedData = {}, deep = false, type) {
14983
+ this.collectByCallback(nodes, type, ({ node, target }) => {
14984
+ this.removeTargetDep(target, node);
14985
+ this.collectItem(node, target, depExtendedData, deep);
13966
14986
  });
13967
- worker.addEventListener("error", () => {
13968
- (self.URL || self.webkitURL).revokeObjectURL(objURL);
13969
- });
13970
- return worker;
13971
- } catch(e) {
13972
- return new Worker(
13973
- 'data:text/javascript;charset=utf-8,' + encodeURIComponent(jsContent),
13974
- {
13975
-
13976
- name: options?.name
14987
+ }
14988
+ collectByCallback(nodes, type, cb) {
14989
+ traverseTarget(
14990
+ this.targetsList,
14991
+ (target) => {
14992
+ if (!type && !target.isCollectByDefault) {
14993
+ return;
14994
+ }
14995
+ for (const node of nodes) {
14996
+ cb({ node, target });
14997
+ }
14998
+ },
14999
+ type
15000
+ );
15001
+ }
15002
+ /**
15003
+ * 清除所有目标的依赖
15004
+ * @param nodes 需要清除依赖的节点
15005
+ */
15006
+ clear(nodes, type) {
15007
+ let { targetsList } = this;
15008
+ if (type) {
15009
+ targetsList = {
15010
+ [type]: this.getTargets(type)
15011
+ };
13977
15012
  }
13978
- );
13979
- } finally {
13980
- objURL && (self.URL || self.webkitURL).revokeObjectURL(objURL);
13981
- }
15013
+ const clearedItemsNodeIds = [];
15014
+ traverseTarget(targetsList, (target) => {
15015
+ if (nodes) {
15016
+ for (const node of nodes) {
15017
+ target.removeDep(node[this.idProp]);
15018
+ if (Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length && !clearedItemsNodeIds.includes(node[this.idProp])) {
15019
+ clearedItemsNodeIds.push(node[this.idProp]);
15020
+ this.clear(node[this.childrenProp]);
15021
+ }
15022
+ }
15023
+ } else {
15024
+ target.removeDep();
15025
+ }
15026
+ });
15027
+ }
15028
+ /**
15029
+ * 清除指定类型的依赖
15030
+ * @param type 类型
15031
+ * @param nodes 需要清除依赖的节点
15032
+ */
15033
+ clearByType(type, nodes) {
15034
+ this.clear(nodes, type);
15035
+ }
15036
+ collectItem(node, target, depExtendedData = {}, deep = false) {
15037
+ const dataSourceTargetTypes = [
15038
+ DepTargetType.DATA_SOURCE,
15039
+ DepTargetType.DATA_SOURCE_COND,
15040
+ DepTargetType.DATA_SOURCE_METHOD
15041
+ ];
15042
+ if (node[NODE_DISABLE_DATA_SOURCE_KEY] && dataSourceTargetTypes.includes(target.type)) {
15043
+ return;
15044
+ }
15045
+ if (node[NODE_DISABLE_CODE_BLOCK_KEY] && target.type === DepTargetType.CODE_BLOCK) {
15046
+ return;
15047
+ }
15048
+ const collectTarget = (config, prop = "") => {
15049
+ const doCollect = (key, value) => {
15050
+ const keyIsItems = key === this.childrenProp;
15051
+ const fullKey = prop ? \`\${prop}.\${key}\` : key;
15052
+ if (target.isTarget(fullKey, value)) {
15053
+ target.updateDep({
15054
+ id: node[this.idProp],
15055
+ name: \`\${node[this.nameProp] || node[this.idProp]}\`,
15056
+ data: depExtendedData,
15057
+ key: fullKey
15058
+ });
15059
+ } else if (!keyIsItems && Array.isArray(value)) {
15060
+ for (let i = 0, l = value.length; i < l; i++) {
15061
+ const item = value[i];
15062
+ if (isObject(item)) {
15063
+ collectTarget(item, \`\${fullKey}[\${i}]\`);
15064
+ }
15065
+ }
15066
+ } else if (isObject(value)) {
15067
+ collectTarget(value, fullKey);
15068
+ }
15069
+ if (keyIsItems && deep && Array.isArray(value)) {
15070
+ for (const child of value) {
15071
+ this.collectItem(child, target, depExtendedData, deep);
15072
+ }
13982
15073
  }
15074
+ };
15075
+ for (const [key, value] of Object.entries(config)) {
15076
+ if (typeof value === "undefined" || value === "") continue;
15077
+ doCollect(key, value);
15078
+ }
15079
+ };
15080
+ collectTarget(node);
15081
+ }
15082
+ removeTargetDep(target, node, key) {
15083
+ target.removeDep(node[this.idProp], key);
15084
+ if (typeof key === "undefined" && Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length) {
15085
+ for (const item of node[this.childrenProp]) {
15086
+ this.removeTargetDep(target, item, key);
15087
+ }
15088
+ }
15089
+ }
15090
+ }
15091
+
15092
+ const error = (...args) => {
15093
+ if (process.env.NODE_ENV === "development") {
15094
+ console.error("magic editor: ", ...args);
15095
+ }
15096
+ };
15097
+
15098
+ onmessage = (e) => {
15099
+ const watcher = new Watcher({ initialTargets: {} });
15100
+ const { dsl } = e.data;
15101
+ try {
15102
+ const mApp = eval(\`(\${dsl})\`);
15103
+ if (!mApp) {
15104
+ postMessage({});
15105
+ }
15106
+ watcher.clearTargets();
15107
+ if (mApp.codeBlocks) {
15108
+ for (const [id, code] of Object.entries(mApp.codeBlocks)) {
15109
+ watcher.addTarget(createCodeBlockTarget(id, code));
15110
+ }
15111
+ }
15112
+ if (mApp.dataSources) {
15113
+ for (const ds of mApp.dataSources) {
15114
+ watcher.addTarget(createDataSourceTarget(ds, {}));
15115
+ watcher.addTarget(createDataSourceMethodTarget(ds, {}));
15116
+ watcher.addTarget(createDataSourceCondTarget(ds, {}));
15117
+ }
15118
+ }
15119
+ watcher.collectByCallback(mApp.items, void 0, ({ node, target }) => {
15120
+ watcher.collectItem(node, target, { pageId: node.id }, true);
15121
+ });
15122
+ const data = {
15123
+ [DepTargetType.DATA_SOURCE]: {},
15124
+ [DepTargetType.DATA_SOURCE_METHOD]: {},
15125
+ [DepTargetType.DATA_SOURCE_COND]: {},
15126
+ [DepTargetType.CODE_BLOCK]: {}
15127
+ };
15128
+ traverseTarget(watcher.getTargetsList(), (target) => {
15129
+ data[target.type][target.id] = target.deps;
15130
+ });
15131
+ postMessage(data);
15132
+ } catch (e2) {
15133
+ error(e2);
15134
+ postMessage({});
15135
+ }
15136
+ };
15137
+
15138
+ })();
15139
+ `;
15140
+ const blob = typeof self !== "undefined" && self.Blob && new Blob([jsContent], { type: "text/javascript;charset=utf-8" });
15141
+ function WorkerWrapper(options) {
15142
+ let objURL;
15143
+ try {
15144
+ objURL = blob && (self.URL || self.webkitURL).createObjectURL(blob);
15145
+ if (!objURL) throw "";
15146
+ const worker = new Worker(objURL, {
15147
+ name: options?.name
15148
+ });
15149
+ worker.addEventListener("error", () => {
15150
+ (self.URL || self.webkitURL).revokeObjectURL(objURL);
15151
+ });
15152
+ return worker;
15153
+ } catch (e) {
15154
+ return new Worker(
15155
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(jsContent),
15156
+ {
15157
+ name: options?.name
15158
+ }
15159
+ );
15160
+ } finally {
15161
+ objURL && (self.URL || self.webkitURL).revokeObjectURL(objURL);
15162
+ }
15163
+ }
13983
15164
 
13984
15165
  class Dep extends BaseService {
13985
15166
  state = shallowReactive({
@@ -14341,6 +15522,11 @@ class Keybinding extends BaseService {
14341
15522
  const { command, keybinding, when } = keybindingItem;
14342
15523
  for (const [type = "", eventType = "keydown"] of when) {
14343
15524
  const cacheItem = { type, command, keybinding, eventType, bound: false };
15525
+ if (this.bindingList.find(
15526
+ (item) => item.command === command && item.eventType === eventType && item.type === type && item.keybinding === keybinding
15527
+ )) {
15528
+ continue;
15529
+ }
14344
15530
  this.bindingList.push(cacheItem);
14345
15531
  }
14346
15532
  }
@@ -14464,9 +15650,9 @@ class StageOverlay extends BaseService {
14464
15650
  createStage(stageOptions = {}) {
14465
15651
  return useStage({
14466
15652
  ...stageOptions,
14467
- zoom: 1,
14468
15653
  runtimeUrl: "",
14469
15654
  autoScrollIntoView: false,
15655
+ disabledRule: true,
14470
15656
  render: async (stage) => {
14471
15657
  this.copyDocumentElement();
14472
15658
  const rootEls = stage.renderer?.getDocument()?.body.children;
@@ -14568,6 +15754,8 @@ const defaultEditorProps = {
14568
15754
  containerHighlightDuration: 800,
14569
15755
  containerHighlightType: ContainerHighlightType.DEFAULT,
14570
15756
  disabledShowSrc: false,
15757
+ disabledDataSource: false,
15758
+ disabledCodeBlock: false,
14571
15759
  componentGroupList: () => [],
14572
15760
  datasourceList: () => [],
14573
15761
  menu: () => ({ left: [], right: [] }),
@@ -14724,6 +15912,20 @@ const initServiceState = (props, {
14724
15912
  immediate: true
14725
15913
  }
14726
15914
  );
15915
+ watch(
15916
+ () => props.disabledCodeBlock,
15917
+ (disabledCodeBlock) => propsService.setDisabledCodeBlock(disabledCodeBlock ?? false),
15918
+ {
15919
+ immediate: true
15920
+ }
15921
+ );
15922
+ watch(
15923
+ () => props.disabledDataSource,
15924
+ (disabledDataSource) => propsService.setDisabledDataSource(disabledDataSource ?? false),
15925
+ {
15926
+ immediate: true
15927
+ }
15928
+ );
14727
15929
  onBeforeUnmount(() => {
14728
15930
  editorService.resetState();
14729
15931
  historyService.resetState();
@@ -14737,13 +15939,14 @@ const initServiceState = (props, {
14737
15939
  };
14738
15940
  const initServiceEvents = (props, emit, { editorService, codeBlockService, dataSourceService, depService }) => {
14739
15941
  let getTMagicAppPrimise = null;
14740
- const getTMagicApp = () => {
14741
- const renderer = editorService.get("stage")?.renderer;
15942
+ const getTMagicApp = async () => {
15943
+ const stage = await getStage();
15944
+ const { renderer } = stage;
14742
15945
  if (!renderer) {
14743
- return Promise.resolve(void 0);
15946
+ return void 0;
14744
15947
  }
14745
15948
  if (renderer.runtime) {
14746
- return Promise.resolve(renderer.runtime.getApp?.());
15949
+ return renderer.runtime.getApp?.();
14747
15950
  }
14748
15951
  if (getTMagicAppPrimise) {
14749
15952
  return getTMagicAppPrimise;
@@ -14825,6 +16028,50 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
14825
16028
  });
14826
16029
  }
14827
16030
  );
16031
+ const getStage = () => {
16032
+ const stage = editorService.get("stage");
16033
+ if (stage) {
16034
+ return Promise.resolve(stage);
16035
+ }
16036
+ return new Promise((resolve) => {
16037
+ const unWatch = watch(
16038
+ () => editorService.get("stage"),
16039
+ (stage2) => {
16040
+ if (stage2) {
16041
+ resolve(stage2);
16042
+ nextTick(() => {
16043
+ unWatch();
16044
+ });
16045
+ }
16046
+ }
16047
+ );
16048
+ });
16049
+ };
16050
+ const updateStageDsl = async (value) => {
16051
+ const stage = await getStage();
16052
+ const runtime = await stage.renderer?.getRuntime();
16053
+ const app = await getTMagicApp();
16054
+ if (!app?.dataSourceManager) {
16055
+ runtime?.updateRootConfig?.(cloneDeep(toRaw(value)));
16056
+ }
16057
+ const page = editorService.get("page");
16058
+ const node = editorService.get("node");
16059
+ page?.id && runtime?.updatePageId?.(page.id);
16060
+ setTimeout(() => {
16061
+ node && stage?.select(toRaw(node.id));
16062
+ });
16063
+ if (value) {
16064
+ depService.clearIdleTasks();
16065
+ const dsl = cloneDeep(toRaw(value));
16066
+ await (typeof Worker === "undefined" ? collectIdle(dsl.items, true) : depService.collectByWorker(dsl));
16067
+ if (dsl.dataSources && dsl.dataSourceDeps && app?.dataSourceManager) {
16068
+ for (const node2 of getNodes(getDepNodeIds(dsl.dataSourceDeps), dsl.items)) {
16069
+ updateNode(app.dataSourceManager.compiledNode(node2), dsl);
16070
+ }
16071
+ }
16072
+ runtime?.updateRootConfig?.(dsl);
16073
+ }
16074
+ };
14828
16075
  const initDataSourceDepTarget = (ds) => {
14829
16076
  depService.addTarget(createDataSourceTarget(ds, reactive({})));
14830
16077
  depService.addTarget(createDataSourceMethodTarget(ds, reactive({})));
@@ -14844,10 +16091,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
14844
16091
  initDataSourceDepTarget(ds);
14845
16092
  }
14846
16093
  if (Array.isArray(value.items)) {
14847
- depService.clearIdleTasks();
14848
- (typeof Worker === "undefined" ? collectIdle(value.items, true) : depService.collectByWorker(value)).then(() => {
14849
- updateStageNodes(value.items);
14850
- });
16094
+ updateStageDsl(value);
14851
16095
  } else {
14852
16096
  depService.clear();
14853
16097
  delete value.dataSourceDeps;
@@ -15140,6 +16384,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15140
16384
  disabledPageFragment: { type: Boolean },
15141
16385
  disabledStageOverlay: { type: Boolean },
15142
16386
  disabledShowSrc: { type: Boolean },
16387
+ disabledDataSource: { type: Boolean },
16388
+ disabledCodeBlock: { type: Boolean },
15143
16389
  treeIndent: {},
15144
16390
  treeNextLevelIndentIncrement: {},
15145
16391
  render: { type: Function },
@@ -15151,7 +16397,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15151
16397
  pageBarSortOptions: {},
15152
16398
  pageFilterFunction: { type: Function }
15153
16399
  }, defaultEditorProps),
15154
- emits: ["props-panel-mounted", "update:modelValue", "props-form-error", "props-submit-error"],
16400
+ emits: ["props-panel-mounted", "props-panel-unmounted", "update:modelValue", "props-form-error", "props-submit-error"],
15155
16401
  setup(__props, { expose: __expose, emit: __emit }) {
15156
16402
  const emit = __emit;
15157
16403
  const props = __props;
@@ -15210,6 +16456,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15210
16456
  const propsPanelMountedHandler = (e) => {
15211
16457
  emit("props-panel-mounted", e);
15212
16458
  };
16459
+ const propsPanelUnmountedHandler = () => {
16460
+ emit("props-panel-unmounted");
16461
+ };
15213
16462
  const propsPanelSubmitErrorHandler = (e) => {
15214
16463
  emit("props-submit-error", e);
15215
16464
  };
@@ -15314,6 +16563,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15314
16563
  "extend-state": _ctx.extendFormState,
15315
16564
  "disabled-show-src": _ctx.disabledShowSrc,
15316
16565
  onMounted: propsPanelMountedHandler,
16566
+ onUnmounted: propsPanelUnmountedHandler,
15317
16567
  onFormError: propsPanelFormErrorHandler,
15318
16568
  onSubmitError: propsPanelSubmitErrorHandler
15319
16569
  }, {
@@ -15358,7 +16608,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15358
16608
 
15359
16609
  const defaultInstallOpt = {
15360
16610
  // eslint-disable-next-line no-eval
15361
- parseDSL: (dsl) => eval(dsl)
16611
+ parseDSL: (dsl) => eval(dsl),
16612
+ customCreateMonacoEditor: (monaco, codeEditorEl, options) => monaco.editor.create(codeEditorEl, options),
16613
+ customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options)
15362
16614
  };
15363
16615
  const index = {
15364
16616
  install: (app, opt) => {