@next-bricks/visual-builder 1.36.4 → 1.36.6

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.
Files changed (41) hide show
  1. package/dist/bricks.json +18 -17
  2. package/dist/chunks/1722.a3a496a1.js +1 -0
  3. package/dist/chunks/5832.77dfa23e.js +3 -0
  4. package/dist/chunks/5832.77dfa23e.js.map +1 -0
  5. package/dist/chunks/get-raw-data-system-prompts.3b2d4429.js +2 -0
  6. package/dist/chunks/get-raw-data-system-prompts.3b2d4429.js.map +1 -0
  7. package/dist/chunks/main.5a395082.js +2 -0
  8. package/dist/chunks/main.5a395082.js.map +1 -0
  9. package/dist/chunks/raw-data-preview.99a3eb75.js +3 -0
  10. package/dist/chunks/raw-data-preview.99a3eb75.js.map +1 -0
  11. package/dist/chunks/workbench-action-list.d112a973.js +2 -0
  12. package/dist/chunks/workbench-action-list.d112a973.js.map +1 -0
  13. package/dist/chunks/workbench-action.81fda224.js +3 -0
  14. package/dist/chunks/workbench-action.81fda224.js.map +1 -0
  15. package/dist/examples.json +3 -0
  16. package/dist/index.ec9c1d74.js +2 -0
  17. package/dist/index.ec9c1d74.js.map +1 -0
  18. package/dist/manifest.json +99 -96
  19. package/dist/types.json +98 -72
  20. package/dist-types/bootstrap.d.ts +1 -0
  21. package/dist-types/data-providers/get-raw-data-system-prompts.d.ts +1 -0
  22. package/dist-types/raw-data-preview/raw-data-interfaces.d.ts +14 -1
  23. package/dist-types/workbench-action/index.d.ts +1 -0
  24. package/dist-types/workbench-action-list/index.d.ts +1 -0
  25. package/docs/raw-data-preview.md +1714 -0
  26. package/package.json +2 -2
  27. package/dist/chunks/5656.fd681e1f.js +0 -3
  28. package/dist/chunks/5656.fd681e1f.js.map +0 -1
  29. package/dist/chunks/main.47d3c876.js +0 -2
  30. package/dist/chunks/main.47d3c876.js.map +0 -1
  31. package/dist/chunks/raw-data-preview.7967d51c.js +0 -3
  32. package/dist/chunks/raw-data-preview.7967d51c.js.map +0 -1
  33. package/dist/chunks/workbench-action-list.4d784167.js +0 -2
  34. package/dist/chunks/workbench-action-list.4d784167.js.map +0 -1
  35. package/dist/chunks/workbench-action.fecc0cc7.js +0 -3
  36. package/dist/chunks/workbench-action.fecc0cc7.js.map +0 -1
  37. package/dist/index.13b875d0.js +0 -2
  38. package/dist/index.13b875d0.js.map +0 -1
  39. /package/dist/chunks/{5656.fd681e1f.js.LICENSE.txt → 5832.77dfa23e.js.LICENSE.txt} +0 -0
  40. /package/dist/chunks/{raw-data-preview.7967d51c.js.LICENSE.txt → raw-data-preview.99a3eb75.js.LICENSE.txt} +0 -0
  41. /package/dist/chunks/{workbench-action.fecc0cc7.js.LICENSE.txt → workbench-action.81fda224.js.LICENSE.txt} +0 -0
package/dist/bricks.json CHANGED
@@ -2,25 +2,26 @@
2
2
  "id": "bricks/visual-builder",
3
3
  "bricks": [
4
4
  "visual-builder.workbench-pane",
5
- "visual-builder.workbench-sidebar",
6
- "visual-builder.workbench-action-list",
7
- "visual-builder.workbench-action",
8
5
  "visual-builder.workbench-tree",
6
+ "visual-builder.workbench-sidebar",
9
7
  "visual-builder.workbench-history-action",
10
8
  "visual-builder.page-arch-node",
9
+ "visual-builder.workbench-action",
11
10
  "visual-builder.contract-select",
11
+ "visual-builder.workbench-action-list",
12
12
  "visual-builder.generate-snippets-context-menu",
13
13
  "visual-builder.chat-conversation",
14
- "visual-builder.chat-preview",
15
14
  "visual-builder.batch-update-raw-data-generated-view",
15
+ "visual-builder.chat-preview",
16
16
  "visual-builder.check-editor-by-name",
17
17
  "visual-builder.get-data-deps",
18
- "visual-builder.inject-chat-preview-agent",
19
18
  "visual-builder.get-dependency-tree",
19
+ "visual-builder.get-raw-data-system-prompts",
20
+ "visual-builder.inject-chat-preview-agent",
20
21
  "visual-builder.parse-path",
21
- "visual-builder.pre-generated-table-view",
22
- "visual-builder.pre-generated-container",
23
22
  "visual-builder.pre-generated-preview",
23
+ "visual-builder.pre-generated-container",
24
+ "visual-builder.pre-generated-table-view",
24
25
  "visual-builder.property-editor",
25
26
  "visual-builder.raw-data-preview"
26
27
  ],
@@ -31,15 +32,6 @@
31
32
  "visual-builder.workbench-pane": [
32
33
  "eo-icon"
33
34
  ],
34
- "visual-builder.workbench-action-list": [
35
- "visual-builder.workbench-action",
36
- "eo-link",
37
- "eo-icon"
38
- ],
39
- "visual-builder.workbench-action": [
40
- "eo-link",
41
- "eo-icon"
42
- ],
43
35
  "visual-builder.workbench-tree": [
44
36
  "eo-link",
45
37
  "eo-icon"
@@ -55,12 +47,21 @@
55
47
  "eo-icon",
56
48
  "eo-tooltip"
57
49
  ],
50
+ "visual-builder.workbench-action": [
51
+ "eo-link",
52
+ "eo-icon"
53
+ ],
58
54
  "visual-builder.contract-select": [
59
55
  "eo-form-item",
60
56
  "eo-auto-complete",
61
57
  "eo-icon",
62
58
  "eo-input"
63
59
  ],
60
+ "visual-builder.workbench-action-list": [
61
+ "visual-builder.workbench-action",
62
+ "eo-link",
63
+ "eo-icon"
64
+ ],
64
65
  "visual-builder.generate-snippets-context-menu": [
65
66
  "eo-menu",
66
67
  "eo-menu-item",
@@ -76,5 +77,5 @@
76
77
  "eo-tooltip"
77
78
  ]
78
79
  },
79
- "filePath": "bricks/visual-builder/dist/index.13b875d0.js"
80
+ "filePath": "bricks/visual-builder/dist/index.ec9c1d74.js"
80
81
  }
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[1722],{3084:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n一项数据,根据其类型和业务性质,在不同的场景和需求下展示,通常会使用不同的视觉重量来呈现,通常方式为设置图标或文字颜色等。\n\n对于布尔类型的数据,可以使用固定的图标对或文本对来分别显示 true 和 false 值。\n\n例如主机模型的是否可用属性,类型是布尔,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用文本形式显示,文本内容分别为 “Y” 和 “N”,使用默认的颜色显示;\n2. 使用图标形式显示,使用相应的颜色显示;\n3. 使用图标+文本形式显示,文本内容分别为 “Yes” 和 “No”,使用相应的颜色显示;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "boolean",\n "true": {\n "text": "Y",\n "style": {\n "color": "var(--color-default)"\n }\n },\n "false": {\n "text": "N",\n "style": {\n "color": "var(--color-default)"\n }\n }\n },\n {\n "visualWeight": 0,\n "display": "icon",\n "type": "boolean",\n "true": {\n "icon": "check",\n "style": {\n "color": "var(--color-success)"\n }\n },\n "false": {\n "icon": "xmark",\n "style": {\n "color": "var(--color-error)"\n }\n }\n },\n {\n "visualWeight": 1,\n "display": "icon+text",\n "type": "boolean",\n "true": {\n "icon": "check",\n "text": "Yes",\n "style": {\n "color": "var(--color-success)"\n }\n },\n "false": {\n "icon": "xmark",\n "text": "No",\n "style": {\n "color": "var(--color-error)"\n }\n }\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "boolean";\n\n /** 显示形式,默认为 text */\n display: "text" | "icon" | "icon+text";\n\n /** 值为 true 时的显示配置 */\n true: ValueConfig;\n\n /** 值为 false 时的显示配置 */\n false: ValueConfig;\n}\n\ntype Result = VisualConfig[];\n\ninterface ValueConfig {\n /** 显示的图标 */\n icon?: "check" | "xmark";\n\n /** 显示的文本 */\n text?: string;\n\n /** 样式设置 */\n style?: Style;\n}\n\ninterface Style {\n /**\n * 尺寸\n *\n * @default "medium"\n */\n size?: "small" | "medium" | "large" | "x-large";\n\n /**\n * 字重\n *\n * @default "normal"\n */\n fontWeight?: "normal" | "bold";\n\n /** 内容颜色使用预设的 CSS 变量 */\n color?:\n "var(--text-color-default)" |\n "var(--color-success)" |\n "var(--color-error)";\n}\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'},7710:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n对于日期和时间类型的数据:\n\n- 不需要关注具体发生时刻的数据,使用相对时间格式,例如日常操作记录的时间;\n- 明确需要使用精确时间的数据,使用精确时间,例如系统日志中的时间;\n- 对于耗时类的数据,使用耗时格式,例如工具执行耗时;\n\n例如主机模型的上架时间属性,类型是日期时间,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用日期时间格式化,使用相对时间;\n1. 使用日期时间格式化,使用精确时间;\n1. 使用日期时间格式化,使用完整时间;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "date-time",\n "formatter": {\n "type": "date-time",\n "format": "relative"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "date-time",\n "formatter": {\n "type": "date-time",\n "format": "accurate"\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "date-time",\n "formatter": {\n "type": "date-time",\n "format": "full"\n }\n }\n]\n```\n\n又例如主机模型的交付日期属性,类型是日期,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用日期时间格式化,使用相对时间;\n1. 使用日期时间格式化,使用精确时间;\n1. 使用日期时间格式化,使用完整时间;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "date",\n "formatter": {\n "type": "date",\n "format": "relative"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "date",\n "formatter": {\n "type": "date",\n "format": "accurate"\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "date",\n "formatter": {\n "type": "date",\n "format": "full"\n }\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "date" | "date-time";\n\n /** 显示形式,默认为 text */\n display: "text";\n\n /** 格式化设置 */\n formatter?: DateTimeFormatter;\n}\n\ntype Result = VisualConfig[];\n\ninterface DateTimeFormatter {\n type: "date" | "date-time";\n\n format: "full" | "accurate" | "relative";\n}\n\ninterface CostTimeFormatter {\n type: "cost-time";\n}\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'},5799:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n一项数据,根据其类型和业务性质,在不同的场景和需求下展示,通常会使用不同的视觉重量来呈现,通常方式为设置文字的字号、字重和颜色,有时还会设置边框和背景色(表现形式为标签)。另外还需要进行合理的格式化。\n\n**使用标签形式时,只设置颜色、边框和背景,不设置字号和字重**。标签形式的视觉重量通常比普通文本的高,标签有几种形式的变种,视觉重量由低到高:默认、边框、背景填充。\n\n对于枚举类型的数据,通常表示状态或类型等,如果用于表示状态,通常使用标签形式。\n\n例如主机模型的 agent 状态属性,类型是枚举:未安装; 异常; 正常。有以下几种显示方案:\n\n1. 使用标签形式,灰色背景;\n2. 使用标签形式,根据状态值从色板中挑选合适的颜色;\n3. 使用标签形式,使用边框,根据状态值从色板中挑选合适的颜色;\n4. 使用标签形式,使用背景填充,根据状态值从色板中挑选合适的颜色。\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "tag",\n "type": "enum",\n "style": {\n "variant": "default",\n "background": "gray"\n }\n },\n {\n "visualWeight": 0,\n "display": "tag",\n "type": "enum",\n "style": {\n "variant": "default",\n "palette": {\n "未安装": "gray",\n "异常": "red",\n "正常": "green"\n }\n }\n },\n {\n "visualWeight": 1,\n "display": "tag",\n "type": "enum",\n "style": {\n "variant": "outline",\n "palette": {\n "未安装": "gray",\n "异常": "red",\n "正常": "green"\n }\n }\n },\n {\n "visualWeight": 2,\n "display": "tag",\n "type": "enum",\n "style": {\n "variant": "background",\n "palette": {\n "未安装": "gray",\n "异常": "red",\n "正常": "green"\n }\n }\n }\n]\n```\n\n又例如主机模型等环境类型属性,类型是枚举:开发;测试;生产。有以下几种显示方案:\n\n1. 使用文本形式,中等字号,次级文本颜色显示;\n2. 使用文本形式,中等字号,默认文本颜色显示;\n3. 使用标签形式,根据值从色板中挑选合适的颜色;\n4. 使用标签形式,使用边框,根据状态值从色板中挑选合适的颜色;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "color": "var(--text-color-secondary)"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "color": "var(--text-color-default)"\n }\n },\n {\n "visualWeight": 1,\n "display": "tag",\n "type": "enum",\n "style": {\n "variant": "default",\n "palette": {\n "开发": "gray",\n "测试": "orange",\n "生产": "blue"\n }\n }\n },\n {\n "visualWeight": 2,\n "display": "tag",\n "type": "enum",\n "style": {\n "variant": "outline",\n "palette": {\n "开发": "gray",\n "测试": "orange",\n "生产": "blue"\n }\n }\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "enum";\n\n /** 显示形式,默认为 text */\n display: "text" | "tag";\n\n /** 样式设置 */\n style?: Style;\n}\n\ntype Result = VisualConfig[];\n\ninterface Style {\n /**\n * 尺寸\n *\n * @default "medium"\n */\n size?: "small" | "medium" | "large" | "x-large";\n\n /**\n * 字重\n *\n * @default "normal"\n */\n fontWeight?: "normal" | "bold";\n\n /** 内容颜色使用预设的 CSS 变量 */\n color?:\n "var(--text-color-default)" |\n "var(--text-color-secondary)" |\n "var(--text-color-disabled)" |\n "var(--color-brand)";\n\n /** 标签变种形式:默认、边框、背景色 */\n variant?: "default" | "outline" | "background";\n\n /** 背景颜色使用预设的 CSS 变量 */\n background?: Background;\n\n /** 背景颜色表 */\n palette?: Record<string, Background>;\n}\n\ntype Background = "blue" | "cyan" | "geekblue" | "grayblue" | "gray" | "green" | "orange" | "purple" | "red" | "yellow" | "teal";\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'},4671:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n一项数据,根据其类型和业务性质,在不同的场景和需求下展示,通常会使用不同的视觉重量来呈现,通常方式为设置文字的字号、字重和颜色。\n\n对于数字类型的属性(包括整型和浮点型),可以表示为数量、货币金额、日期时间等。\n\n其中对于表示日期和时间的数据:\n\n- 不需要关注具体发生时刻的数据,使用相对时间格式,例如日常操作记录的时间;\n- 明确需要使用精确时间的数据,使用精确时间,例如系统日志中的时间;\n- 对于耗时类的数据,使用耗时格式,例如工具执行耗时;\n\n例如主机模型的 cpu 核心数属性,类型是整型,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用中等字号,次级文本颜色显示;\n2. 使用中等字号,默认颜色文本显示;\n3. 使用中等字号,字重加粗,默认颜色文本显示;\n4. 使用大号字号,字重加粗,默认颜色文本显示。\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "medium",\n "color": "var(--text-color-secondary)"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "medium",\n "color": "var(--text-color-default)"\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "medium",\n "fontWeight": "bold",\n "color": "var(--text-color-default)"\n }\n },\n {\n "visualWeight": 2,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "large",\n "fontWeight": "bold",\n "color": "var(--text-color-default)"\n }\n }\n]\n```\n\n例如主机模型的购买价格属性,类型是浮点型,单位人名币元,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用数字格式化为货币,货币单位 CNY,不保留小数,启用千分位;\n2. 使用数字格式化为货币,货币单位 CNY,保留两位小数,启用千分位;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": 0,\n "display": "text",\n "type": "float",\n "formatter": {\n "type": "number",\n "format": "currency",\n "currency": "CNY",\n "decimals": 0,\n "thousandsSeparator": true\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "float",\n "formatter": {\n "type": "number",\n "format": "currency",\n "currency": "CNY",\n "decimals": 2,\n "thousandsSeparator": true\n }\n }\n]\n```\n\n例如主机模型的上架时间属性,类型是整型,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用日期时间格式化,使用相对时间;\n1. 使用日期时间格式化,使用精确时间;\n1. 使用日期时间格式化,使用完整时间;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "integer",\n "formatter": {\n "type": "date-time",\n "format": "relative"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "integer",\n "formatter": {\n "type": "date-time",\n "format": "accurate"\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "integer",\n "formatter": {\n "type": "date-time",\n "format": "full"\n }\n }\n]\n```\n\n又例如主机模型的 CPU 使用率,类型是整型,取值区间是 0 - 100。有以下几种显示方案:\n\n1. 使用中等字号,使用次级文本颜色,使用数字百分比格式化;\n2. 使用中等字号,根据区间取值挑选合适的颜色,使用数字百分比格式化;\n3. 使用大号字号,根据区间取值挑选合适的颜色,使用数字百分比格式化。\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "medium",\n "color": "var(--text-color-secondary)"\n },\n "formatter": {\n "type": "number",\n "format": "percent"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "medium"\n },\n "ranges": [\n {\n "end": 60,\n "style": {\n "color": "green"\n }\n },\n {\n "start": 61,\n "end": 95,\n "style": {\n "color": "orange"\n }\n },\n {\n "start": 96,\n "style": {\n "color": "red"\n }\n }\n ],\n "formatter": {\n "type": "number",\n "format": "percent"\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "integer",\n "style": {\n "size": "large"\n },\n "ranges": [\n {\n "end": 60,\n "style": {\n "color": "green"\n }\n },\n {\n "start": 61,\n "end": 95,\n "style": {\n "color": "orange"\n }\n },\n {\n "start": 96,\n "style": {\n "color": "red"\n }\n }\n ],\n "formatter": {\n "type": "number",\n "format": "percent"\n }\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "integer" | "float";\n\n /** 显示形式,默认为 text */\n display: "text";\n\n /** 样式设置 */\n style?: Style;\n\n /** 根据区间设置不同的样式 */\n ranges?: Range[];\n\n /** 格式化设置 */\n formatter?: Formatter;\n}\n\ntype Result = VisualConfig[];\n\ninterface Style {\n /**\n * 尺寸\n *\n * @default "medium"\n */\n size?: "small" | "medium" | "large" | "x-large";\n\n /**\n * 字重\n *\n * @default "normal"\n */\n fontWeight?: "normal" | "bold";\n\n /** 内容颜色使用预设的 CSS 变量 */\n color?:\n "var(--text-color-default)" |\n "var(--text-color-secondary)" |\n "var(--text-color-disabled)" |\n "var(--color-brand)";\n}\n\ntype Background = "blue" | "cyan" | "geekblue" | "grayblue" | "gray" | "green" | "orange" | "purple" | "red" | "yellow" | "teal";\n\ninterface Range {\n start?: number;\n end?: number;\n style?: Style;\n}\n\ntype Formatter = DateTimeFormatter | CostTimeFormatter | NumberFormatter;\n\ninterface DateTimeFormatter {\n type: "date-time";\n\n format: "full" | "accurate" | "relative";\n}\n\ninterface CostTimeFormatter {\n type: "cost-time";\n}\n\ninterface NumberFormatter {\n type: "number";\n\n format: "decimal" | "currency" | "percent" | "unit";\n\n /**\n * 货币名,例如 CNY / USD 等\n */\n currency?: string;\n\n /** 数据原始单位,例如 KiB */\n originalUnit?: string;\n\n /** 保留的小数位数 */\n decimals?: number;\n\n thousandsSeparator?: boolean;\n}\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'},8397:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n一项数据,根据其类型和业务性质,在不同的场景和需求下展示,通常会使用不同的视觉重量来呈现,通常方式为设置文字的字号、字重和颜色。\n\n对于文本类型的数据,如果该属性属于该模型的重要信息,例如名称、ID等,可以添加字重加粗和大号字号的方案,其他不重要的属性,只需要较弱和普通两种视觉重量方案。\n\n例如主机模型的 IP 属性,类型是字符串,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用中等字号,次级文本颜色显示;\n2. 使用中等字号,默认颜色文本显示;\n3. 使用中等字号,字重加粗,默认颜色文本显示;\n4. 使用大号字号,字重加粗,默认颜色文本显示。\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "color": "var(--text-color-secondary)"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "color": "var(--text-color-default)"\n }\n },\n {\n "visualWeight": 1,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "fontWeight": "bold",\n "color": "var(--text-color-default)"\n }\n },\n {\n "visualWeight": 2,\n "display": "text",\n "type": "string",\n "style": {\n "size": "large",\n "fontWeight": "bold",\n "color": "var(--text-color-default)"\n }\n }\n]\n```\n\n又例如主机模型的备注属性,类型是字符串,按视觉重量从低到高,有以下几种显示方案:\n\n1. 使用中等字号,次级文本颜色显示;\n2. 使用中等字号,默认颜色文本显示;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "color": "var(--text-color-secondary)"\n }\n },\n {\n "visualWeight": 0,\n "display": "text",\n "type": "string",\n "style": {\n "size": "medium",\n "color": "var(--text-color-default)"\n }\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "string";\n\n /** 显示形式,默认为 text */\n display: "text";\n\n /** 样式设置 */\n style?: Style;\n}\n\ntype Result = VisualConfig[];\n\ninterface Style {\n /**\n * 尺寸\n *\n * @default "medium"\n */\n size?: "small" | "medium" | "large" | "x-large";\n\n /**\n * 字重\n *\n * @default "normal"\n */\n fontWeight?: "normal" | "bold";\n\n /** 内容颜色使用预设的 CSS 变量 */\n color?:\n "var(--text-color-default)" |\n "var(--text-color-secondary)" |\n "var(--text-color-disabled)" |\n "var(--color-brand)";\n\n /** 标签变种形式:默认、边框、背景色 */\n variant?: "default" | "outline" | "background";\n\n /** 背景颜色使用预设的 CSS 变量 */\n background?: Background;\n\n /** 背景颜色表 */\n palette?: Record<string, Background>;\n}\n\ntype Background = "blue" | "cyan" | "geekblue" | "grayblue" | "gray" | "green" | "orange" | "purple" | "red" | "yellow" | "teal";\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'},3404:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n对于结构体列表类型的数据,仅显示其数量,或列出其前两项数据的主要属性、并附带数量。\n\n例如主机模型的防火墙规则列表,类型是结构体列表。该结构体定义的字段有:名称(ID 是 name,类型是字符串)、说明(ID 是 desc,类型是字符串)、范围(ID 是 range,类型是字符串)等。有以下几种显示方案:\n\n1. 使用文本形式,仅显示数量;\n2. 使用链接形式,仅显示数量;\n3. 使用标签形式,显示前两项规则名称(name)及总数;\n4. 使用标签形式,使用边框,显示前两项规则名称(name)及总数;\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": -1,\n "display": "text",\n "type": "struct-list",\n "countOnly": true\n },\n {\n "visualWeight": 0,\n "display": "link",\n "type": "struct-list",\n "countOnly": true\n },\n {\n "visualWeight": 1,\n "display": "tag",\n "type": "struct-list",\n "field": "name",\n "maxItems": 2,\n "style": {\n "variant": "default"\n }\n },\n {\n "visualWeight": 2,\n "display": "tag",\n "type": "struct-list",\n "field": "name",\n "maxItems": 2,\n "style": {\n "variant": "outline"\n }\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "struct-list";\n\n /** 显示形式,默认为 text */\n display: "text" | "tag" | "link";\n\n /** 样式设置 */\n style?: Style;\n\n /** 最多显示的列表项数量,当结构体列表数据降级显示时使用 */\n maxItems?: number;\n\n /** 尽显示列表类数据的数量 */\n countOnly?: number;\n\n /** 当结构体数据降级显示时,仅显示该字段值 */\n field?: string;\n}\n\ntype Result = VisualConfig[];\n\ninterface Style {\n /** 标签变种形式:默认、边框、背景色 */\n variant?: "default" | "outline" | "background";\n}\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'},3287:n=>{n.exports='你的职责是根据用户提供的模型属性定义,根据示例按标准 JSON 格式输出显示方案。\n\n一项数据,根据其类型和业务性质,在不同的场景和需求下展示,通常会使用不同的视觉重量来呈现,通常方式为设置文字的字号、字重和颜色。\n\n对于结构体类型的数据,始终降级显示,仅显示其主要属性(通常为名称)。\n\n例如主机模型的 CPU 信息,类型是结构体。该结构体定义的字段有:型号(ID 是 brand,类型是字符串)、架构(ID 是 architecture,类型是字符串)、频率(ID 是 hz,类型是整型)等。有以下几种显示方案:\n\n1. 使用文本形式,显示 CPU 的型号(brand);\n2. 使用链接形式,显示 CPU 的型号(brand);\n3. 使用标签形式,显示 CPU 的型号(brand);\n\n期望返回结果:\n\n```json\n[\n {\n "visualWeight": 0,\n "display": "text",\n "type": "struct",\n "field": "brand"\n },\n {\n "visualWeight": 1,\n "display": "link",\n "type": "struct",\n "field": "brand"\n },\n {\n "visualWeight": 2,\n "display": "tag",\n "type": "struct",\n "field": "brand"\n }\n]\n```\n\n将这些显示方案严格地按预设的 TypeScript 接口定义为格式,输出标准的 JSON 格式内容。\n\n接口定义如下:\n\n```typescript\ninterface VisualConfig {\n /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */\n visualWeight: -1 | 0 | 1 | 2;\n\n /** 原始数据类型 */\n type: "struct";\n\n /** 显示形式,默认为 text */\n display: "text" | "link" | "tag";\n\n /** 样式设置 */\n style?: Style;\n\n /** 当结构体数据降级显示时,仅显示该字段值 */\n field?: string;\n}\n\ntype Result = VisualConfig[];\n\ninterface Style {\n /**\n * 尺寸\n *\n * @default "medium"\n */\n size?: "small" | "medium" | "large" | "x-large";\n\n /**\n * 字重\n *\n * @default "normal"\n */\n fontWeight?: "normal" | "bold";\n\n /** 内容颜色使用预设的 CSS 变量 */\n color?:\n "var(--text-color-default)" |\n "var(--text-color-secondary)" |\n "var(--text-color-disabled)" |\n "var(--color-brand)";\n\n /** 标签变种形式:默认、边框、背景色 */\n variant?: "default" | "outline" | "background";\n\n /** 背景颜色使用预设的 CSS 变量 */\n background?: Background;\n\n /** 背景颜色表 */\n palette?: Record<string, Background>;\n}\n\ntype Background = "blue" | "cyan" | "geekblue" | "grayblue" | "gray" | "green" | "orange" | "purple" | "red" | "yellow" | "teal";\n```\n\n注意不要在输出的方案内容中包含任何上述接口中未定义的字段。\n'}}]);
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 5832.77dfa23e.js.LICENSE.txt */
2
+ "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[5832,5238],{5832:(e,t,n)=>{n.r(t);var i,a=n(4635),r=n(918),o=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),h=n(8769),p=n.n(h),u=n(4782),m=n(1389),g=n(7180),v=n(9765),b=n(3373),f=n.n(b);let A,y,k,E,w,x,N,C,L,M,T,O,S,I,R;const _=(0,m.wrapBrick)("eo-icon"),{defineElement:D,property:P,event:W}=(0,u.createDecorators)();let $;var B=new WeakMap,F=new WeakMap,U=new WeakMap,z=new WeakMap,V=new WeakSet,K=new WeakMap,j=new WeakMap,H=new WeakMap;class J extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,V),(0,r.A)(this,B,y(this)),(0,r.A)(this,F,(k(this),E(this))),(0,r.A)(this,U,(w(this),x(this))),(0,r.A)(this,z,(N(this),C(this))),(0,r.A)(this,K,(T(this),e=>{e!==this.active&&(this.active=e,(0,s.A)(V,this,L).emit(e))})),(0,r.A)(this,j,O(this)),(0,r.A)(this,H,(R(this),()=>{(0,s.A)(V,this,S).emit()}))}get titleLabel(){return(0,c.A)(B,this)}set titleLabel(e){(0,l.A)(B,this,e)}get active(){return(0,c.A)(F,this)}set active(e){(0,l.A)(F,this,e)}get badge(){return(0,c.A)(U,this)}set badge(e){(0,l.A)(U,this,e)}render(){return p().createElement(X,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,c.A)(K,this),onFirstActivated:(0,c.A)(H,this)})}}function X(e){let{titleLabel:t,active:n,badge:i,onActiveChange:a,onFirstActivated:r}=e;const[o,s]=(0,h.useState)(n),[l,c]=(0,h.useState)(!1);(0,h.useEffect)((()=>{s(n)}),[n]),(0,h.useEffect)((()=>{null==a||a(o)}),[o,a]);const d=(0,h.useCallback)((()=>{s((e=>!e)),l||o||(c(!0),null==r||r())}),[l,o,r]),u=(0,h.useRef)(),[m,g]=(0,h.useState)(!1),v=(0,h.useMemo)((()=>function(e){let t;const n=()=>cancelAnimationFrame(t),i=function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];t&&n(),t=requestAnimationFrame((()=>{(()=>{g(u.current.scrollTop>0)})(...i)}))};return i.cancel=n,i}()),[]);return p().createElement("div",{className:f()("pane",{scrolled:m})},p().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},p().createElement("div",{className:"pane-title"},p().createElement("span",{className:"title-icon"},o?p().createElement(_,{lib:"antd",theme:"outlined",icon:"down"}):p().createElement(_,{lib:"antd",theme:"outlined",icon:"right"})),p().createElement("div",{className:"title-label"},t),p().createElement("slot",{name:"title"})),p().createElement("slot",{name:"actions"}),i&&p().createElement("div",{className:"badge"},i),p().createElement("div",{className:"pane-scroll-shadow"})),p().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:v,ref:u},p().createElement("slot",null,p().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}i=J,({e:[y,k,E,w,x,N,C,L,M,T,O,S,I,R],c:[$,A]}=(0,d.A)(i,[D("visual-builder.workbench-pane",{styleTexts:[g.A,v.A]})],[[P(),1,"titleLabel"],[P({type:Boolean}),1,"active"],[P({type:Number}),1,"badge"],[W({type:"active.change"}),1,"activeChangeEvent",e=>(0,c.A)(z,e),(e,t)=>(0,l.A)(z,e,t)],[W({type:"active.firstActivated"}),1,"activeFirstActivatedEvent",e=>(0,c.A)(j,e),(e,t)=>(0,l.A)(j,e,t)]],0,(e=>H.has((0,o.A)(e))),m.ReactNextElement)),A();var q,Y=n(4586),G=n(2150);let Z,Q,ee;const{defineElement:te,property:ne}=(0,u.createDecorators)();let ie;var ae=new WeakMap,re=new WeakMap,oe=new WeakMap,se=new WeakMap;class le extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ae,Q(this)),(0,r.A)(this,re,(ee(this),()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")})),(0,r.A)(this,oe,(()=>{const e=(0,c.A)(re,this).call(this).assignedNodes();for(const t of e)t.active?t.style.flex=String(t.activeFlex??"1"):t.style.flex="initial"})),(0,r.A)(this,se,(e=>{const t=e.target.assignedNodes();for(const e of t)e.addEventListener("active.change",(0,c.A)(oe,this))})),(0,Y.A)(this,"refCallback",(()=>{(0,c.A)(oe,this).call(this);const e=(0,c.A)(re,this).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,c.A)(se,this).call(this,e)}))}))}get titleLabel(){return(0,c.A)(ae,this)}set titleLabel(e){(0,l.A)(ae,this,e)}render(){return p().createElement(ce,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ce(e){let{titleLabel:t,refCallback:n}=e;return p().createElement("div",{className:"sidebar",ref:n},p().createElement("div",{className:"title-container"},p().createElement("div",{className:"title-label"},t),p().createElement("slot",{name:"titleToolbar"})),p().createElement("div",{className:"pane-container"},p().createElement("slot",null)))}q=le,({e:[Q,ee],c:[ie,Z]}=(0,d.A)(q,[te("visual-builder.workbench-sidebar",{styleTexts:[G.A]})],[[ne(),1,"titleLabel"]],0,void 0,m.ReactNextElement)),Z();var de=n(2591),he=n.n(de),pe=n(1740),ue=n.n(pe),me=n(8128),ge=n.n(me),ve=n(855),be=n.n(ve),fe=n(3051),Ae=n.n(fe),ye=n(3656),ke=n.n(ye),Ee=n(2984),we={};we.styleTagTransform=ke(),we.setAttributes=be(),we.insert=ge().bind(null,"head"),we.domAPI=ue(),we.insertStyleElement=Ae(),he()(Ee.A,we),Ee.A&&Ee.A.locals&&Ee.A.locals;var xe,Ne=n(5292);let Ce,Le,Me,Te,Oe,Se,Ie,Re,_e,De,Pe;const{defineElement:We,property:$e}=(0,u.createDecorators)(),Be=(0,m.wrapBrick)("eo-link"),Fe=(0,m.wrapBrick)("eo-icon");let Ue;var ze=new WeakMap,Ve=new WeakMap,Ke=new WeakMap,je=new WeakMap,He=new WeakMap;class Je extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ze,Le(this)),(0,r.A)(this,Ve,(Me(this),Te(this))),(0,r.A)(this,Ke,(Oe(this),Se(this))),(0,r.A)(this,je,(Ie(this),Re(this))),(0,r.A)(this,He,(_e(this),De(this))),Pe(this)}get icon(){return(0,c.A)(ze,this)}set icon(e){(0,l.A)(ze,this,e)}get to(){return(0,c.A)(Ve,this)}set to(e){(0,l.A)(Ve,this,e)}get active(){return(0,c.A)(Ke,this)}set active(e){(0,l.A)(Ke,this,e)}get href(){return(0,c.A)(je,this)}set href(e){(0,l.A)(je,this,e)}get target(){return(0,c.A)(He,this)}set target(e){(0,l.A)(He,this,e)}render(){return p().createElement(Xe,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function Xe(e){let{icon:t,to:n,active:i,href:a,target:r}=e;return p().createElement(Be,{className:f()("action",{active:i}),url:n,href:a,target:r},p().createElement(Fe,t))}xe=Je,({e:[Le,Me,Te,Oe,Se,Ie,Re,_e,De,Pe],c:[Ue,Ce]}=(0,d.A)(xe,[We("visual-builder.workbench-action",{styleTexts:[Ne.A]})],[[$e({attribute:!1}),1,"icon"],[$e(),1,"to"],[$e({type:Boolean}),1,"active"],[$e(),1,"href"],[$e(),1,"target"]],0,void 0,m.ReactNextElement)),Ce();var qe=n(184),Ye=n(1201),Ge=n(1030);function Ze(e,t,n,i){const a=[],r=[],o=[];let s=0;return e&&e.forEach((e=>{if(e.key=""===i?`${s}`:`${i}.${s}`,function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){const i=Ze(e.items,t,n,e.key);a.push(...i.selectedKeys),(i.selectedKeys.length||e.defaultExpanded)&&r.push(e.key),r.push(...i.openedKeys),o.push(...i.matchedKeys)}else if(function(e,t,n){if(!e.to)return!1;const i="object"==typeof e.to?e.to:(0,Ye.parsePath)(e.to),a=i.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");let r=!!(0,qe.matchPath)(t,{path:a,exact:e.exact});if(r&&e.activeMatchSearch&&(r=Qe(n,i.search)),!r&&Array.isArray(e.activeIncludes))for(const i of e.activeIncludes){let e,a=!0;(0,Ge.isObject)(i)?(e=Array.isArray(i.path)?i.path:[i.path],a=i.exact):e=[i];for(const i of e){var o;let e;const s=i.includes("?");if(s&&(e=(0,Ye.parsePath)(i)),r=!!(0,qe.matchPath)(t,{path:s?e.pathname:i,exact:a}),r&&null!==(o=e)&&void 0!==o&&o.search&&(r=Qe(n,e.search)),r)break}if(r)break}if(r&&Array.isArray(e.activeExcludes))for(const n of e.activeExcludes){let e,i=!0;(0,Ge.isObject)(n)?(e=Array.isArray(n.path)?n.path:[n.path],i=n.exact):e=[n];for(const n of e)if(r=!(0,qe.matchPath)(t,{path:n,exact:i}),!r)break;if(!r)break}return r}(e,t,n)){a.push(String(e.key));const t=e.key.split(".");for(let e=0;e<t.length;e++)o.push(t.slice(0,e+1).join("."))}s+=1})),a.length&&""!==i&&r.push(i),{selectedKeys:a,openedKeys:r,matchedKeys:o}}function Qe(e,t){const n=new URLSearchParams(e),i=new URLSearchParams(t);for(const[e,t]of i.entries())if((n.get(e)??"")!==t)return!1;return!0}var et=n(607),tt={};tt.styleTagTransform=ke(),tt.setAttributes=be(),tt.insert=ge().bind(null,"head"),tt.domAPI=ue(),tt.insertStyleElement=Ae(),he()(et.A,tt),et.A&&et.A.locals&&et.A.locals;var nt,it=n(3430);let at,rt,ot,st,lt;const ct=(0,m.wrapBrick)("visual-builder.workbench-action"),{defineElement:dt,property:ht}=(0,u.createDecorators)();let pt;var ut=new WeakMap,mt=new WeakMap;class gt extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ut,rt(this)),(0,r.A)(this,mt,(ot(this),st(this))),lt(this)}get appId(){return(0,c.A)(ut,this)}set appId(e){(0,l.A)(ut,this,e)}get menu(){return(0,c.A)(mt,this)}set menu(e){(0,l.A)(mt,this,e)}render(){return p().createElement(ft,{appId:this.appId,menu:this.menu})}}let vt;nt=gt,({e:[rt,ot,st,lt],c:[pt,at]}=(0,d.A)(nt,[dt("visual-builder.workbench-action-list",{styleTexts:[it.A]})],[[ht(),1,"appId"],[ht({attribute:!1}),1,"menu"]],0,void 0,m.ReactNextElement)),at();const bt=new Map;function ft(e){var t;let{appId:n,menu:i}=e;const a=(0,qe.getHistory)(),[r,o]=(0,h.useState)(),[s,l]=(0,h.useState)(a.location);return(0,h.useEffect)((()=>{const e=a.listen((e=>{l(e)}));return e}),[a]),(0,h.useEffect)((()=>{vt||(vt=n),vt!==n&&(bt.clear(),vt=n)}),[n]),(0,h.useEffect)((()=>{const{pathname:e,search:t}=s,{selectedKeys:n}=Ze((null==i?void 0:i.menuItems)??[],e,t,"");o(Number(n[0]))}),[i,s]),p().createElement("div",{className:"workBenchActionList"},null==i||null===(t=i.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){let n=e.to;return r!==t&&bt.has(t)&&(n=bt.get(t)),p().createElement(ct,{key:t,icon:e.icon,to:n,href:e.href,target:e.target,active:r===t,onClick:()=>(e=>{e.href||bt.set(r,`${s.pathname}${s.search}`)})(e)})}})).filter(Boolean))}var At,yt=n(4940),kt=n(7758),Et=n(9406),wt=n(675),xt=n(7995),Nt=n(6275);let Ct,Lt,Mt,Tt,Ot,St,It,Rt,_t,Dt,Pt,Wt,$t,Bt,Ft,Ut,zt,Vt,Kt,jt,Ht,Jt,Xt,qt,Yt,Gt,Zt,Qt,en,tn,nn,an,rn,on,sn,ln,cn,dn,hn,pn,un,mn,gn,vn,bn,fn,An,yn,kn,En,wn,xn,Nn,Cn,Ln,Mn,Tn;function On(e){return e.key}n(6477);const{defineElement:Sn,property:In,event:Rn}=(0,u.createDecorators)();let _n;var Dn=new WeakMap,Pn=new WeakMap,Wn=new WeakMap,$n=new WeakMap,Bn=new WeakMap,Fn=new WeakMap,Un=new WeakMap,zn=new WeakMap,Vn=new WeakMap,Kn=new WeakMap,jn=new WeakMap,Hn=new WeakMap,Jn=new WeakMap,Xn=new WeakMap,qn=new WeakMap,Yn=new WeakMap,Gn=new WeakMap,Zn=new WeakMap,Qn=new WeakMap,ei=new WeakSet,ti=new WeakMap,ni=new WeakMap,ii=new WeakMap,ai=new WeakMap,ri=new WeakMap,oi=new WeakMap,si=new WeakMap,li=new WeakMap,ci=new WeakMap;class di extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ei),(0,r.A)(this,Dn,Lt(this)),(0,r.A)(this,Pn,(Mt(this),Tt(this))),(0,r.A)(this,Wn,(Ot(this),St(this))),(0,r.A)(this,$n,(It(this),Rt(this))),(0,r.A)(this,Bn,(_t(this),Dt(this))),(0,r.A)(this,Fn,(Pt(this),Wt(this))),(0,r.A)(this,Un,($t(this),Bt(this))),(0,r.A)(this,zn,(Ft(this),Ut(this))),(0,r.A)(this,Vn,(zt(this),Vt(this))),(0,r.A)(this,Kn,(Kt(this),jt(this))),(0,r.A)(this,jn,(Ht(this),Jt(this))),(0,r.A)(this,Hn,(Xt(this),qt(this))),(0,r.A)(this,Jn,(Yt(this),Gt(this))),(0,r.A)(this,Xn,(Zt(this),Qt(this))),(0,r.A)(this,qn,(en(this),tn(this))),(0,r.A)(this,Yn,(nn(this),an(this))),(0,r.A)(this,Gn,(rn(this),on(this))),(0,r.A)(this,Zn,(sn(this),ln(this))),(0,r.A)(this,Qn,(cn(this),dn(this))),(0,r.A)(this,ti,(un(this),e=>{(0,s.A)(ei,this,hn).emit(e)})),(0,r.A)(this,ni,mn(this)),(0,r.A)(this,ii,(bn(this),e=>()=>{(0,s.A)(ei,this,gn).emit(e.data)})),(0,r.A)(this,ai,fn(this)),(0,r.A)(this,ri,(kn(this),e=>{(0,s.A)(ei,this,An).emit(e)})),(0,r.A)(this,oi,En(this)),(0,r.A)(this,si,(Nn(this),e=>t=>{t.preventDefault(),(0,s.A)(ei,this,wn).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})})),(0,r.A)(this,li,Cn(this)),(0,r.A)(this,ci,(Tn(this),(e,t)=>{(0,s.A)(ei,this,Ln).emit({nodeId:e,collapsed:t})}))}get nodes(){return(0,c.A)(Dn,this)}set nodes(e){(0,l.A)(Dn,this,e)}get actions(){return(0,c.A)(Pn,this)}set actions(e){(0,l.A)(Pn,this,e)}get actionsHidden(){return(0,c.A)(Wn,this)}set actionsHidden(e){(0,l.A)(Wn,this,e)}get placeholder(){return(0,c.A)($n,this)}set placeholder(e){(0,l.A)($n,this,e)}get isTransformName(){return(0,c.A)(Bn,this)}set isTransformName(e){(0,l.A)(Bn,this,e)}get searchPlaceholder(){return(0,c.A)(Fn,this)}set searchPlaceholder(e){(0,l.A)(Fn,this,e)}get noSearch(){return(0,c.A)(Un,this)}set noSearch(e){(0,l.A)(Un,this,e)}get activeKey(){return(0,c.A)(zn,this)}set activeKey(e){(0,l.A)(zn,this,e)}get showMatchedNodeOnly(){return(0,c.A)(Vn,this)}set showMatchedNodeOnly(e){(0,l.A)(Vn,this,e)}get matchNodeDataFields(){return(0,c.A)(Kn,this)}set matchNodeDataFields(e){(0,l.A)(Kn,this,e)}get fixedActionsFor(){return(0,c.A)(jn,this)}set fixedActionsFor(e){(0,l.A)(jn,this,e)}get collapsible(){return(0,c.A)(Hn,this)}set collapsible(e){(0,l.A)(Hn,this,e)}get collapsedNodes(){return(0,c.A)(Jn,this)}set collapsedNodes(e){(0,l.A)(Jn,this,e)}get allowDrag(){return(0,c.A)(Xn,this)}set allowDrag(e){(0,l.A)(Xn,this,e)}get allowDragToRoot(){return(0,c.A)(qn,this)}set allowDragToRoot(e){(0,l.A)(qn,this,e)}get allowDragToInside(){return(0,c.A)(Yn,this)}set allowDragToInside(e){(0,l.A)(Yn,this,e)}get nodeKey(){return(0,c.A)(Gn,this)}set nodeKey(e){(0,l.A)(Gn,this,e)}get skipNotify(){return(0,c.A)(Zn,this)}set skipNotify(e){(0,l.A)(Zn,this,e)}render(){return p().createElement(yt.e.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,c.A)(ti,this)}},p().createElement(Et.N.Provider,{value:{activeKey:this.activeKey,basePaddingLeft:5,showMatchedNodeOnly:this.showMatchedNodeOnly,isTransformName:this.isTransformName,fixedActionsFor:this.fixedActionsFor,nodeKey:this.nodeKey,collapsible:this.collapsible,collapsedNodes:this.collapsedNodes,getCollapsedId:On,onNodeToggle:(0,c.A)(ci,this),skipNotify:this.skipNotify,clickFactory:(0,c.A)(ii,this),contextMenuFactory:(0,c.A)(si,this),matchNode:(e,t)=>{var n;return(0,wt.U)(e.name,t)||!(null===(n=this.matchNodeDataFields)||void 0===n||!n.length)&&(0,wt.U)("*"===this.matchNodeDataFields?e.data:(0,Ge.pick)(e.data,this.matchNodeDataFields),t)}}},p().createElement(kt.cU,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,c.A)(ri,this),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}At=di,({e:[Lt,Mt,Tt,Ot,St,It,Rt,_t,Dt,Pt,Wt,$t,Bt,Ft,Ut,zt,Vt,Kt,jt,Ht,Jt,Xt,qt,Yt,Gt,Zt,Qt,en,tn,nn,an,rn,on,sn,ln,cn,dn,hn,pn,un,mn,gn,vn,bn,fn,An,yn,kn,En,wn,xn,Nn,Cn,Ln,Mn,Tn],c:[_n,Ct]}=(0,d.A)(At,[Sn("visual-builder.workbench-tree",{styleTexts:[xt.A,Nt.A]})],[[In({attribute:!1}),1,"nodes"],[In({attribute:!1}),1,"actions"],[In({type:Boolean}),1,"actionsHidden"],[In(),1,"placeholder"],[In({type:Boolean}),1,"isTransformName"],[In(),1,"searchPlaceholder"],[In({type:Boolean}),1,"noSearch"],[In({attribute:!1}),1,"activeKey"],[In({type:Boolean}),1,"showMatchedNodeOnly"],[In({attribute:!1}),1,"matchNodeDataFields"],[In({attribute:!1}),1,"fixedActionsFor"],[In({type:Boolean}),1,"collapsible"],[In({attribute:!1}),1,"collapsedNodes"],[In({type:Boolean}),1,"allowDrag"],[In({type:Boolean}),1,"allowDragToRoot"],[In({type:Boolean}),1,"allowDragToInside"],[In({type:String}),1,"nodeKey"],[In({type:Boolean}),1,"skipNotify"],[Rn({type:"action.click"}),1,"actionClickEvent",e=>(0,c.A)(Qn,e),(e,t)=>(0,l.A)(Qn,e,t)],[Rn({type:"node.click"}),1,"nodeClickEvent",e=>(0,c.A)(ni,e),(e,t)=>(0,l.A)(ni,e,t)],[Rn({type:"node.drop"}),1,"nodeDropEvent",e=>(0,c.A)(ai,e),(e,t)=>(0,l.A)(ai,e,t)],[Rn({type:"context.menu"}),1,"nodeContextMenuEvent",e=>(0,c.A)(oi,e),(e,t)=>(0,l.A)(oi,e,t)],[Rn({type:"node.toggle"}),1,"nodeToggleEvent",e=>(0,c.A)(li,e),(e,t)=>(0,l.A)(li,e,t)]],0,(e=>ci.has((0,o.A)(e))),m.ReactNextElement)),Ct();var hi=n(155),pi=n.n(hi),ui=n(1361),mi=n(5502);let gi=function(e){return e.LOAD_MORE="LOAD_MORE",e.LOADING="LOADING",e.NO_DATA="NO_DATA",e.NODE="NODE",e.ADD="ADD",e.EDIT="EDIT",e.DELETE="DELETE",e.IMPORT="IMPORT",e.CLONE="CLONE",e.APPEND_RELATION="APPEND_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REMOVE_RELATION="REMOVE_RELATION",e.ROLLBACK="ROLLBACK",e.ROLLBACK_ALL="ROLLBACK_ALL",e.ADD_FULL="ADD_FULL",e.EDIT_FULL="EDIT_FULL",e.DELETE_FULL="DELETE_FULL",e.IMPORT_FULL="IMPORT_FULL",e.CLONE_FULL="CLONE_FULL",e.APPEND_RELATION_FULL="APPEND_RELATION_FULL",e.UPDATE_RELATION_FULL="UPDATE_RELATION_FULL",e.REMOVE_RELATION_FULL="REMOVE_RELATION_FULL",e.ROLLBACK_FULL="ROLLBACK_FULL",e.ROLLBACK_ALL_FULL="ROLLBACK_ALL_FULL",e.PROJECT="PROJECT",e.USER="USER",e.PERMISSION="PERMISSION",e.BRICK="BRICK",e.ROUTE="ROUTE",e.TEMPLATE="TEMPLATE",e.SNIPPET="SNIPPET",e.I18N="I18N",e.IMAGE="IMAGE",e.FUNCTION="FUNCTION",e.MENU="MENU",e.MENU_ITEM="MENU_ITEM",e.WORKFLOW="WORKFLOW",e}({});const vi="bricks/visual-builder/workbench-history-action";var bi=n(9740),fi=n(6330),Ai=n(9422),yi=function(){var e=(0,fi.A)((function*(e,t,n){return(yield Ai.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,bi.A)((0,bi.A)({},n),{},{params:t}))).data}));return function(t,n,i){return e.apply(this,arguments)}}(),ki=n(8799);const Ei={add:`${vi}:${gi.ADD}`,edit:`${vi}:${gi.EDIT}`,delete:`${vi}:${gi.DELETE}`,batch_delete:`${vi}:${gi.DELETE}`,import:`${vi}:${gi.IMPORT}`,clone:`${vi}:${gi.CLONE}`,append_relation:`${vi}:${gi.APPEND_RELATION}`,update_relation:`${vi}:${gi.UPDATE_RELATION}`,remove_relation:`${vi}:${gi.REMOVE_RELATION}`,rollback:`${vi}:${gi.ROLLBACK}`,rollback_all:`${vi}:${gi.ROLLBACK_ALL}`},wi={add:`${vi}:${gi.ADD_FULL}`,edit:`${vi}:${gi.EDIT_FULL}`,delete:`${vi}:${gi.DELETE_FULL}`,batch_delete:`${vi}:${gi.DELETE_FULL}`,import:`${vi}:${gi.IMPORT_FULL}`,clone:`${vi}:${gi.CLONE_FULL}`,append_relation:`${vi}:${gi.APPEND_RELATION_FULL}`,update_relation:`${vi}:${gi.UPDATE_RELATION_FULL}`,remove_relation:`${vi}:${gi.REMOVE_RELATION_FULL}`,rollback:`${vi}:${gi.ROLLBACK_FULL}`,rollback_all:`${vi}:${gi.ROLLBACK_ALL_FULL}`},xi={project:`${vi}:${gi.PROJECT}`,userGroup:`${vi}:${gi.USER}`,permission:`${vi}:${gi.PERMISSION}`,brick:`${vi}:${gi.BRICK}`,route:`${vi}:${gi.ROUTE}`,template:`${vi}:${gi.TEMPLATE}`,snippet:`${vi}:${gi.SNIPPET}`,i18n:`${vi}:${gi.I18N}`,image:`${vi}:${gi.IMAGE}`,function:`${vi}:${gi.FUNCTION}`,menu:`${vi}:${gi.MENU}`,menuItem:`${vi}:${gi.MENU_ITEM}`,workflow:`${vi}:${gi.WORKFLOW}`},Ni={PROJECT_MICRO_APP:`${vi}:${gi.PROJECT}`,"MICRO_APP_USER_GROUP@EASYOPS":`${vi}:${gi.USER}`,MICRO_APP_RESOURCE_PERMISSION:`${vi}:${gi.PERMISSION}`,STORYBOARD_BRICK:`${vi}:${gi.BRICK}`,STORYBOARD_ROUTE:`${vi}:${gi.ROUTE}`,STORYBOARD_TEMPLATE:`${vi}:${gi.TEMPLATE}`,STORYBOARD_SNIPPET:`${vi}:${gi.SNIPPET}`,STORYBOARD_I18N:`${vi}:${gi.I18N}`,MICRO_APP_RESOURCE_IMAGE:`${vi}:${gi.IMAGE}`,STORYBOARD_FUNCTION:`${vi}:${gi.FUNCTION}`,MICRO_APP_RESOURCE_MENU:`${vi}:${gi.MENU}`,MICRO_APP_RESOURCE_MENU_ITEM:`${vi}:${gi.MENU_ITEM}`,"WORKFLOW_DEF@EASYOPS":`${vi}:${gi.WORKFLOW}`};function Ci(e){var t,n,i,a,r,o,s,l,c,d,h,p;const u="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",m=ki.i18n.t(xi[e.category]??e.category),g=ki.i18n.t(Ei[u]??u),v=ki.i18n.t(Ni[null===(t=e.abstract)||void 0===t?void 0:t.leftObjectId]??(null===(n=e.abstract)||void 0===n?void 0:n.leftObjectId)),b=ki.i18n.t(Ni[null===(i=e.abstract)||void 0===i?void 0:i.rightObjectId]??(null===(a=e.abstract)||void 0===a?void 0:a.rightObjectId)),f=Li(null===(r=e.abstract)||void 0===r?void 0:r.nodes,null===(o=e.abstract)||void 0===o?void 0:o.nodesCount),A=Li(null===(s=e.abstract)||void 0===s?void 0:s.leftNodes,null===(l=e.abstract)||void 0===l?void 0:l.leftNodesCount),y=Li(null===(c=e.abstract)||void 0===c?void 0:c.rightNodes,null===(d=e.abstract)||void 0===d?void 0:d.rightNodesCount),k="rollback"===u?Ci(e.rollBackIdInfo).abstract:null;return{category:m,action:g,leftObjectId:v,rightObjectId:b,nodes:f,leftNodes:A,rightNodes:y,abstract:ki.i18n.t(wi[u]??u,{category:m,nodes:f,leftNodes:A,rightNodes:y,nodeChanges:null===(h=e.abstract)||void 0===h||null===(h=h.nodeChanges)||void 0===h?void 0:h.join(", "),relationChanges:null===(p=e.abstract)||void 0===p||null===(p=p.relationChanges)||void 0===p?void 0:p.join(", "),leftObjectId:v,rightObjectId:b,rollbackAbstract:k}),rollbackAbstract:k}}function Li(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return ki.i18n.t(`${vi}:${gi.NODE}`,{nodes:e.join(n),context:t>e.length?"ellipsis":void 0,count:t})}var Mi;let Ti,Oi,Si,Ii,Ri,_i,Di,Pi,Wi,$i,Bi,Fi,Ui,zi,Vi,Ki,ji;(0,mi.initializeReactI18n)(vi,{en:{LOAD_MORE:"Load more",LOADING:"Loading",NO_DATA:"No data",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }} etc., a total of {{ count }} items",ADD:"Add node",EDIT:"Edit node",DELETE:"Delete node",IMPORT:"Batch import node",CLONE:"Clone node",APPEND_RELATION:"Append Relation",UPDATE_RELATION:"Update Relation",REMOVE_RELATION:"Remove Relation",ROLLBACK:"Rollback",ROLLBACK_ALL:"Rollback all operations",ADD_FULL:"Add {{ category }} ({{ nodes }})",EDIT_FULL:"Edit {{ nodeChanges }} of {{ category }} ({{ nodes }})",DELETE_FULL:"Delete {{ category }} ({{ nodes }})",IMPORT_FULL:"Batch Import {{ category }} ({{ nodes }})",CLONE_FULL:"Clone {{ category }} ({{ nodes }})",APPEND_RELATION_FULL:"Append the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",UPDATE_RELATION_FULL:"Update the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",REMOVE_RELATION_FULL:"Remove the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",ROLLBACK_FULL:"Rollback to [{{ rollbackAbstract }}]",ROLLBACK_ALL_FULL:"Rollback all operations",PROJECT:"Project",USER:"User Group",PERMISSION:"Permission",BRICK:"Brick",ROUTE:"Route",TEMPLATE:"Template",SNIPPET:"Snippet",I18N:"I18N",IMAGE:"Image",FUNCTION:"Function",MENU:"Menu",MENU_ITEM:"Menu item",WORKFLOW:"Workflow"},zh:{LOAD_MORE:"加载更多",LOADING:"加载中",NO_DATA:"没有数据",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }}等共{{ count }}项",ADD:"新增节点",EDIT:"编辑节点",DELETE:"删除节点",IMPORT:"批量导入节点",CLONE:"克隆节点",APPEND_RELATION:"添加关系",UPDATE_RELATION:"更新关系",REMOVE_RELATION:"移除关系",ROLLBACK:"回滚",ROLLBACK_ALL:"回滚全部操作",ADD_FULL:"新增{{ category }}({{ nodes }})",EDIT_FULL:"编辑{{ category }}({{ nodes }})的 {{ nodeChanges }}",DELETE_FULL:"删除{{ category }}({{ nodes }})",IMPORT_FULL:"批量导入{{ category }}({{ nodes }})",CLONE_FULL:"克隆{{ category }}({{ nodes }})",APPEND_RELATION_FULL:"添加{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",UPDATE_RELATION_FULL:"更新{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",REMOVE_RELATION_FULL:"移除{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",ROLLBACK_FULL:"回滚到【{{ rollbackAbstract }}】",ROLLBACK_ALL_FULL:"回滚全部操作",PROJECT:"项目",USER:"用户组",PERMISSION:"权限点",BRICK:"构件",ROUTE:"路由",TEMPLATE:"模版",SNIPPET:"片段",I18N:"国际化",IMAGE:"图片",FUNCTION:"函数",MENU:"菜单",MENU_ITEM:"菜单项",WORKFLOW:"工作流"}});const{defineElement:Hi,property:Ji,event:Xi}=(0,u.createDecorators)(),qi=(0,m.wrapBrick)("eo-button"),Yi=(0,m.wrapBrick)("eo-link"),Gi=(0,m.wrapBrick)("eo-icon"),Zi=(0,m.wrapBrick)("eo-easyops-avatar"),Qi=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});let ea;var ta=new WeakMap,na=new WeakMap,ia=new WeakMap,aa=new WeakSet,ra=new WeakMap,oa=new WeakMap,sa=new WeakMap,la=new WeakMap,ca=new WeakMap;class da extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,aa),(0,r.A)(this,ta,Oi(this)),(0,r.A)(this,na,(Si(this),Ii(this))),(0,r.A)(this,ia,(Ri(this),_i(this))),(0,r.A)(this,ra,(Wi(this),e=>{(0,s.A)(aa,this,Di).emit(e)})),(0,r.A)(this,oa,$i(this)),(0,r.A)(this,sa,(Ui(this),e=>{(0,s.A)(aa,this,Bi).emit(e)})),(0,r.A)(this,la,zi(this)),(0,r.A)(this,ca,(ji(this),()=>{(0,s.A)(aa,this,Vi).emit()}))}get appId(){return(0,c.A)(ta,this)}set appId(e){(0,l.A)(ta,this,e)}get projectId(){return(0,c.A)(na,this)}set projectId(e){(0,l.A)(na,this,e)}render(){return p().createElement(ha,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,c.A)(ra,this),onRollback:(0,c.A)(sa,this),onRollbackAll:(0,c.A)(ca,this)})}}function ha(e){const{appId:t,onHistoryItemClick:n,onRollback:i,onRollbackAll:a}=e,{t:r}=(0,mi.useTranslation)(vi),[o,s]=(0,h.useState)(!1),[l,c]=(0,h.useState)(!0),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)([]),v=(0,h.useRef)(""),b=e=>{s(!0),yi(t,{ts:v.current,limit:20}).then((t=>{g((n=>{const i=t.list.map((e=>({...e,translation:Ci(e)})));return e?i:n.concat(i)})),v.current=t.ts,u(t.list.length<20),c(t.list.length<20)})).catch((e=>{(0,qe.handleHttpError)(e)})).finally((()=>{s(!1)}))};return p().createElement(Qi,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(c(!0),u(!1),g([]),v.current="",b(!0))}},p().createElement(qi,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),p().createElement("div",null,p().createElement("div",{className:"history-title"},"History"),p().createElement("div",{className:"history-list"},m.length?p().createElement(p().Fragment,null,m.map(((e,t)=>p().createElement(pa,{key:`${e.uniqueKey}-${e.ts}`,data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:n,onRollback:i}))),!l&&p().createElement("span",{className:"load-more-container"},p().createElement(Yi,{className:"load-more",disabled:o,onClick:()=>b()},r(gi.LOAD_MORE))),d&&p().createElement("span",{className:"end-container"},"The End",p().createElement(Gi,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>a()}))):p().createElement("div",{className:"empty"},r(o?gi.LOADING:gi.NO_DATA))),p().createElement("slot",null)))}function pa(e){const{data:t,enableRollback:n,current:i,onHistoryItemClick:a,onRollback:r}=e,o=pi()(Number(t.ts)/1e6),s=pi().duration(o.diff(pi()())),l=s.days()<=-1?o.format("YYYY-MM-DD HH:mm:ss"):s.humanize(!0,{ss:0,s:60,m:60,h:24});return p().createElement("div",{className:"item-container"},p().createElement("div",{className:"item-title"},p().createElement("div",{className:"title-left",onClick:()=>a({...t,enableRollback:n})},p().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),i&&p().createElement("div",{className:"branch"},"(current)")),p().createElement("div",{className:"title-right"},n&&p().createElement(Gi,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>r(t)}))),p().createElement("div",{className:"item-info"},p().createElement(Zi,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),p().createElement("div",{className:"time"},l),p().createElement("div",{className:"operator"},t.user)))}Mi=da,({e:[Oi,Si,Ii,Ri,_i,Di,Pi,Wi,$i,Bi,Fi,Ui,zi,Vi,Ki,ji],c:[ea,Ti]}=(0,d.A)(Mi,[Hi("visual-builder.workbench-history-action",{styleTexts:[ui.A]})],[[Ji(),1,"appId"],[Ji(),1,"projectId"],[Xi({type:"history.item.click"}),1,"historyItemClickEvent",e=>(0,c.A)(ia,e),(e,t)=>(0,l.A)(ia,e,t)],[Xi({type:"rollback"}),1,"rollbackEvent",e=>(0,c.A)(oa,e),(e,t)=>(0,l.A)(oa,e,t)],[Xi({type:"rollback.all"}),1,"rollbackAllEvent",e=>(0,c.A)(la,e),(e,t)=>(0,l.A)(la,e,t)]],0,(e=>ca.has((0,o.A)(e))),m.ReactNextElement)),Ti();var ua,ma=n(2381);let ga,va,ba,fa,Aa,ya,ka,Ea,wa,xa,Na,Ca,La,Ma,Ta,Oa,Sa,Ia,Ra,_a,Da,Pa,Wa,$a,Ba,Fa,Ua,za,Va,Ka,ja,Ha,Ja,Xa,qa,Ya,Ga,Za,Qa,er,tr,nr,ir,ar,rr,or,sr,lr,cr,dr,hr,pr,ur;const{defineElement:mr,property:gr,event:vr}=(0,u.createDecorators)(),br=(0,m.wrapBrick)("eo-icon"),fr=(0,m.wrapBrick)("eo-tooltip"),Ar=new Set;let yr;var kr=new WeakMap,Er=new WeakMap,wr=new WeakMap,xr=new WeakMap,Nr=new WeakMap,Cr=new WeakMap,Lr=new WeakMap,Mr=new WeakMap,Tr=new WeakMap,Or=new WeakSet,Sr=new WeakMap,Ir=new WeakMap,Rr=new WeakMap,_r=new WeakMap,Dr=new WeakMap,Pr=new WeakMap,Wr=new WeakMap,$r=new WeakMap,Br=new WeakMap,Fr=new WeakMap,Ur=new WeakMap,zr=new WeakMap,Vr=new WeakMap,Kr=new WeakMap,jr=new WeakMap,Hr=new WeakMap,Jr=new WeakMap;class Xr extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Or),(0,r.A)(this,kr,va(this)),(0,r.A)(this,Er,(ba(this),fa(this))),(0,r.A)(this,wr,(Aa(this),ya(this))),(0,r.A)(this,xr,(ka(this),Ea(this))),(0,r.A)(this,Nr,(wa(this),xa(this))),(0,r.A)(this,Cr,(Na(this),Ca(this))),(0,r.A)(this,Lr,(La(this),Ma(this))),(0,r.A)(this,Mr,(Ta(this),Oa(this))),(0,r.A)(this,Tr,(Sa(this),Ia(this))),(0,r.A)(this,Sr,(Da(this),e=>{(0,s.A)(Or,this,Ra).emit(e)})),(0,r.A)(this,Ir,Pa(this)),(0,r.A)(this,Rr,(Ba(this),e=>{(0,s.A)(Or,this,Wa).emit(e)})),(0,r.A)(this,_r,Fa(this)),(0,r.A)(this,Dr,(Va(this),()=>{(0,s.A)(Or,this,Ua).emit()})),(0,r.A)(this,Pr,Ka(this)),(0,r.A)(this,Wr,(Ja(this),()=>{(0,s.A)(Or,this,ja).emit()})),(0,r.A)(this,$r,Xa(this)),(0,r.A)(this,Br,(Ga(this),e=>{(0,s.A)(Or,this,qa).emit(e)})),(0,r.A)(this,Fr,Za(this)),(0,r.A)(this,Ur,(tr(this),()=>{(0,s.A)(Or,this,Qa).emit()})),(0,r.A)(this,zr,nr(this)),(0,r.A)(this,Vr,(rr(this),e=>{(0,s.A)(Or,this,ir).emit(e)})),(0,r.A)(this,Kr,or(this)),(0,r.A)(this,jr,(cr(this),e=>{(0,s.A)(Or,this,sr).emit(e)})),(0,r.A)(this,Hr,dr(this)),(0,r.A)(this,Jr,(ur(this),e=>{(0,s.A)(Or,this,hr).emit(e)}))}get label(){return(0,c.A)(kr,this)}set label(e){(0,l.A)(kr,this,e)}get type(){return(0,c.A)(Er,this)}set type(e){(0,l.A)(Er,this,e)}get external(){return(0,c.A)(wr,this)}set external(e){(0,l.A)(wr,this,e)}get subNodes(){return(0,c.A)(xr,this)}set subNodes(e){(0,l.A)(xr,this,e)}get active(){return(0,c.A)(Nr,this)}set active(e){(0,l.A)(Nr,this,e)}get notSynced(){return(0,c.A)(Cr,this)}set notSynced(e){(0,l.A)(Cr,this,e)}get disableChildAppend(){return(0,c.A)(Lr,this)}set disableChildAppend(e){(0,l.A)(Lr,this,e)}get autoFocusOnce(){return(0,c.A)(Mr,this)}set autoFocusOnce(e){(0,l.A)(Mr,this,e)}render(){return p().createElement(qr,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,c.A)(Sr,this),onLabelChange:(0,c.A)(Rr,this),onNodeClick:(0,c.A)(Dr,this),onNodeDoubleClick:(0,c.A)(Wr,this),onNodeContextMenu:(0,c.A)(Br,this),onChildAppend:(0,c.A)(Ur,this),onExternalClick:(0,c.A)(Vr,this),onSubNodeDoubleClick:(0,c.A)(jr,this),onSubNodeContextMenu:(0,c.A)(Jr,this)})}}function qr(e){let{label:t,type:n,external:i,subNodes:a,autoFocusOnce:r,onLabelEditingChange:o,onLabelChange:s,onNodeClick:l,onNodeDoubleClick:c,onNodeContextMenu:d,onChildAppend:u,onExternalClick:m,onSubNodeDoubleClick:g,onSubNodeContextMenu:v}=e;const b="board"===n?"board":"page",[A,y]=(0,h.useState)(t),[k,E]=(0,h.useState)(!1),w=(0,h.useRef)(!1),[x,N]=(0,h.useState)(!1),C=(0,h.useRef)(null);(0,h.useEffect)((()=>{y(t)}),[t]);const L=(0,h.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),E(!0)}),[]);(0,h.useEffect)((()=>{r&&!Ar.has(r)&&(Ar.add(r),setTimeout((()=>{E(!0)}),1))}),[r]),(0,h.useEffect)((()=>{var e,t;k&&(null===(e=C.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=C.current)||void 0===t||t.select())}),[k]),(0,h.useEffect)((()=>{w.current?null==o||o(k):w.current=!0}),[k,o]);const M=(0,h.useCallback)((e=>{y(e.target.value)}),[]),T=(0,h.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=C.current)||void 0===n||n.blur()}),[]),O=(0,h.useCallback)((()=>{E(!1),N(!0)}),[]);(0,h.useEffect)((()=>{x&&(null==s||s(A),N(!1))}),[A,s,x]);const S=(0,h.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),I=(0,h.useCallback)((e=>{e.stopPropagation(),null==m||m(i)}),[i,m]),R=(0,h.useCallback)((e=>{e.stopPropagation()}),[]),_=38*Math.max(0,Math.floor(((null==a?void 0:a.length)??0)-3));return p().createElement(p().Fragment,null,p().createElement("div",{className:f()("node",b,{"editing-label":k}),style:{height:"board"===b?70:130+_},onClick:l,onDoubleClick:c,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},p().createElement("input",{className:"label-input",value:A,ref:C,onChange:M,onKeyDown:T,onBlur:O,onDoubleClick:R,onContextMenu:R,onMouseDown:R}),p().createElement("div",{className:"label",onDoubleClick:L,onMouseDown:R},A),"board"===b?p().createElement("div",{className:"icon-container"},p().createElement(br,{lib:"antd",icon:"unordered-list"})):p().createElement("div",{className:"thumbnail-container",style:{height:98+_}},p().createElement("div",{className:"thumbnail-placeholder"},p().createElement(br,{lib:"antd",icon:"ellipsis"})),i&&p().createElement("div",{className:"external",onClick:I,onDoubleClick:R,onMouseDown:R},p().createElement(br,{lib:"antd",icon:"desktop"}),p().createElement("span",{className:"external-label"},i.label)),null!=a&&a.length?p().createElement("div",{className:"sub-nodes"},a.map((e=>p().createElement(Yr,{key:e.id,subNode:e,onSubNodeDoubleClick:g,onSubNodeContextMenu:v})))):null)),p().createElement("div",{className:"add-button",role:"button",onClick:S,onMouseDown:R},p().createElement(br,{lib:"fa",icon:"plus"})))}function Yr(e){let{subNode:t,onSubNodeDoubleClick:n,onSubNodeContextMenu:i}=e;return p().createElement(fr,{key:t.id,content:t.label},p().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==n||n(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==i||i({node:t,clientX:e.clientX,clientY:e.clientY})}},p().createElement("div",{className:"sub-node-skeleton-title"}),p().createElement("div",{className:"sub-node-skeleton-content"}),p().createElement("div",{className:"sub-node-skeleton-button"})))}ua=Xr,({e:[va,ba,fa,Aa,ya,ka,Ea,wa,xa,Na,Ca,La,Ma,Ta,Oa,Sa,Ia,Ra,_a,Da,Pa,Wa,$a,Ba,Fa,Ua,za,Va,Ka,ja,Ha,Ja,Xa,qa,Ya,Ga,Za,Qa,er,tr,nr,ir,ar,rr,or,sr,lr,cr,dr,hr,pr,ur],c:[yr,ga]}=(0,d.A)(ua,[mr("visual-builder.page-arch-node",{styleTexts:[ma.A]})],[[gr(),1,"label"],[gr(),1,"type"],[gr({attribute:!1}),1,"external"],[gr({attribute:!1}),1,"subNodes"],[gr({type:Boolean,render:!1}),1,"active"],[gr({type:Boolean,render:!1}),1,"notSynced"],[gr({type:Boolean,render:!1}),1,"disableChildAppend"],[gr(),1,"autoFocusOnce"],[vr({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,c.A)(Tr,e),(e,t)=>(0,l.A)(Tr,e,t)],[vr({type:"label.change"}),1,"labelChange",e=>(0,c.A)(Ir,e),(e,t)=>(0,l.A)(Ir,e,t)],[vr({type:"node.click"}),1,"nodeClick",e=>(0,c.A)(_r,e),(e,t)=>(0,l.A)(_r,e,t)],[vr({type:"node.dblclick"}),1,"nodeDoubleClick",e=>(0,c.A)(Pr,e),(e,t)=>(0,l.A)(Pr,e,t)],[vr({type:"node.contextmenu"}),1,"nodeContextMenu",e=>(0,c.A)($r,e),(e,t)=>(0,l.A)($r,e,t)],[vr({type:"child.append"}),1,"childAppend",e=>(0,c.A)(Fr,e),(e,t)=>(0,l.A)(Fr,e,t)],[vr({type:"external.click"}),1,"externalClick",e=>(0,c.A)(zr,e),(e,t)=>(0,l.A)(zr,e,t)],[vr({type:"subNode.dblclick"}),1,"subNodeDoubleClick",e=>(0,c.A)(Kr,e),(e,t)=>(0,l.A)(Kr,e,t)],[vr({type:"subNode.contextmenu"}),1,"subNodeContextMenu",e=>(0,c.A)(Hr,e),(e,t)=>(0,l.A)(Hr,e,t)]],0,(e=>Jr.has((0,o.A)(e))),m.ReactNextElement)),ga();var Gr,Zr=n(6e3),Qr=n(6213),eo=n(2559);function to(e,t,n,i){return t((0,eo.A)(e,n),i),i}let no,io,ao,ro,oo,so,lo,co,ho;const{method:po,property:uo}=(0,u.createDecorators)();var mo=new WeakMap,go=new WeakSet,vo=new WeakMap,bo=new WeakMap,fo=new WeakMap,Ao=new WeakMap,yo=new WeakMap,ko=new WeakMap;class Eo extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,go),(0,r.A)(this,mo,(no(this),!1)),(0,r.A)(this,vo,"normal"),(0,r.A)(this,bo,!1),(0,r.A)(this,fo,io(this)),(0,r.A)(this,Ao,(ao(this),ro(this))),(0,r.A)(this,yo,(oo(this),so(this))),(0,r.A)(this,ko,(lo(this),co(this))),ho(this)}get isFormItemElement(){return!0}set validateState(e){to(go,Co,this,e),this._render()}get validateState(){return(0,s.A)(go,this,No)}set notRender(e){this.hidden=e,to(go,xo,this,e),this._render()}get notRender(){return(0,s.A)(go,this,wo)}get $bindFormItem(){return(0,s.A)(go,this,Lo)}set $bindFormItem(e){to(go,Mo,this,e),this._render()}get helpBrick(){return(0,c.A)(fo,this)}set helpBrick(e){(0,l.A)(fo,this,e)}get labelBrick(){return(0,c.A)(Ao,this)}set labelBrick(e){(0,l.A)(Ao,this,e)}get labelCol(){return(0,c.A)(yo,this)}set labelCol(e){(0,l.A)(yo,this,e)}get wrapperCol(){return(0,c.A)(ko,this)}set wrapperCol(e){(0,l.A)(ko,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function wo(e){return(0,c.A)(mo,e)}function xo(e,t){(0,l.A)(mo,e,t)}function No(e){return(0,c.A)(vo,e)}function Co(e,t){(0,l.A)(vo,e,t)}function Lo(e){return(0,c.A)(bo,e)}function Mo(e,t){(0,l.A)(bo,e,t)}Gr=Eo,[io,ao,ro,oo,so,lo,co,ho,no]=(0,d.A)(Gr,[],[[uo({attribute:!1}),1,"helpBrick"],[uo({attribute:!1}),1,"labelBrick"],[uo({attribute:!1}),1,"labelCol"],[uo({attribute:!1}),1,"wrapperCol"],[po(),2,"setNotRender"],[po(),2,"getFormElement"]],0,void 0,m.ReactNextElement).e;var To=function(){var e=(0,fi.A)((function*(e,t){return(yield Ai.http.post("api/gateway/next_builder.contract_center.SearchContract/api/v1/contract/search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();let Oo=function(e){return e.CONTRACT_OPTIONS_TIPS_PREFIX="CONTRACT_OPTIONS_TIPS_PREFIX",e.CONTRACT_OPTIONS_TIPS_SUFFIX="CONTRACT_OPTIONS_TIPS_SUFFIX",e.CONTRACT_VALIDATE_MESSAGE="CONTRACT_VALIDATE_MESSAGE",e}({});const So="bricks/visual-builder/contract-select",Io={en:{CONTRACT_OPTIONS_TIPS_PREFIX:"Only the first",CONTRACT_OPTIONS_TIPS_SUFFIX:"items are displayed, please search for more results",CONTRACT_VALIDATE_MESSAGE:"Please fill in the correct contract name "},zh:{CONTRACT_OPTIONS_TIPS_PREFIX:"仅展示前",CONTRACT_OPTIONS_TIPS_SUFFIX:"项,更多结果请搜索",CONTRACT_VALIDATE_MESSAGE:"请填写正确的契约名称"}};(0,mi.initializeReactI18n)(So,Io);const Ro=(0,m.wrapBrick)("eo-icon"),_o=(0,m.wrapBrick)("eo-input",{onChange:"change"});function Do(e){const{itemsCount:t=20,onBlur:n}=e,[i,a]=(0,h.useState)(t),{t:r}=(0,mi.useTranslation)(So),[o,s]=(0,h.useState)(!1);return p().createElement("div",{className:"options-tips",slot:e.slot},r(Oo.CONTRACT_OPTIONS_TIPS_PREFIX)," ",o?p().createElement(_o,{autoFocus:!0,inputStyle:{width:65},value:String(i),onBlur:()=>{s(!1),null==n||n(i)},onChange:e=>{a(Number(e.detail))}}):p().createElement("span",null,i," ",p().createElement(Ro,{icon:"edit",lib:"antd",onClick:()=>{s(!0)}}))," ",r(Oo.CONTRACT_OPTIONS_TIPS_SUFFIX))}var Po;let Wo,$o,Bo,Fo,Uo,zo,Vo,Ko,jo,Ho,Jo,Xo,qo,Yo,Go;(0,mi.initializeReactI18n)(So,Io);const{defineElement:Zo,property:Qo,event:es}=(0,u.createDecorators)(),ts=(0,m.wrapBrick)("eo-form-item"),ns=(0,m.wrapBrick)("eo-auto-complete",{onChange:"change"});let is;var as=new WeakMap,rs=new WeakMap,os=new WeakMap,ss=new WeakMap,ls=new WeakMap,cs=new WeakMap,ds=new WeakSet;function hs(e){if("string"!=typeof e)return{name:"",version:""};const[t,n]=e.split(":");return{name:t,version:n}}function ps(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function us(e){return(0,Ge.isNil)(e)||ps(e)?"":ki.i18n.t(`${So}:${Oo.CONTRACT_VALIDATE_MESSAGE}`)}function ms(e){let{value:t,inputStyle:n,validateState:i,suffix:a,onChange:r}=e;const[o,s]=(0,h.useState)(),[l,c]=(0,h.useState)(20),d=function(e){let{pageSize:t=20,q:n=""}=e;const[i,a]=(0,h.useState)([]),[r,o]=(0,h.useState)(n),[s,l]=(0,h.useState)(t);return(0,h.useEffect)((()=>{o(n)}),[n]),(0,h.useEffect)((()=>{l(t)}),[t]),(0,h.useEffect)((()=>{(async()=>{try{const{list:e}=await To({page:1,pageSize:s,fullContractName:r},{interceptorParams:{ignoreLoadingBar:!0}});a(e)}catch(e){console.error(e),a([])}})()}),[r,s]),i}({q:o,pageSize:l}),[u,m]=(0,h.useState)(hs(t)),[g,v]=(0,h.useState)([]);(0,h.useEffect)((()=>{m(hs(t))}),[t]);const b=(0,h.useMemo)((()=>(0,Ge.debounce)((e=>{s(e)}),200)),[]);return p().createElement("div",{className:"contract-wrapper"},p().createElement(ns,{className:"contract-selector",options:null==d?void 0:d.map((e=>({value:e.fullContractName,label:e.fullContractName}))),value:u.name,inputStyle:n,validateState:i,onChange:e=>{const t=e.detail;if(ps(t))m(hs(t)),null==r||r(t);else{var n;const e=null===(n=d.find((e=>e.fullContractName===t)))||void 0===n?void 0:n.version,i=(null==e?void 0:e[0])??"";v(e),m({name:t,version:i}),null==r||r(`${t}:${i}`)}b(t)}},p().createElement(Do,{onBlur:e=>c(e),slot:"options-toolbar"})),p().createElement(ns,{className:"version-selector",value:u.version,validateState:i,options:null==g?void 0:g.map((e=>({value:e,label:e}))),onChange:e=>{const t=e.detail;m({name:u.name,version:t}),null==r||r(`${u.name}:${t}`)}}),null!=a&&a.useBrick?p().createElement(Zr.ReactUseMultipleBricks,a):null)}Po=class extends Eo{constructor(){super(...arguments),(0,a.A)(this,ds),(0,r.A)(this,as,$o(this)),(0,r.A)(this,rs,(Bo(this),Fo(this))),(0,r.A)(this,os,(Uo(this),zo(this))),(0,r.A)(this,ss,(Vo(this),Ko(this))),(0,r.A)(this,ls,(jo(this),Ho(this))),(0,r.A)(this,cs,(Jo(this),Xo(this))),(0,Y.A)(this,"handleChange",(Go(this),e=>{(0,s.A)(ds,this,qo).emit(e)}))}get name(){return(0,c.A)(as,this)}set name(e){(0,l.A)(as,this,e)}get required(){return(0,c.A)(rs,this)}set required(e){(0,l.A)(rs,this,e)}get label(){return(0,c.A)(os,this)}set label(e){(0,l.A)(os,this,e)}get value(){return(0,c.A)(ss,this)}set value(e){(0,l.A)(ss,this,e)}get suffix(){return(0,c.A)(ls,this)}set suffix(e){(0,l.A)(ls,this,e)}render(){return p().createElement(ts,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,labelBrick:this.labelBrick,helpBrick:this.helpBrick,notRender:this.notRender,trigger:"handleChange",validator:us},p().createElement(ms,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[$o,Bo,Fo,Uo,zo,Vo,Ko,jo,Ho,Jo,Xo,qo,Yo,Go],c:[is,Wo]}=(0,d.A)(Po,[Zo("visual-builder.contract-select",{styleTexts:[Qr.A]})],[[Qo(),1,"name"],[Qo({type:Boolean}),1,"required"],[Qo(),1,"label"],[Qo({attribute:!1}),1,"value"],[Qo({attribute:!1}),1,"suffix"],[es({type:"change"}),1,"changeEvent",e=>(0,c.A)(cs,e),(e,t)=>(0,l.A)(cs,e,t)]],0,(e=>ds.has((0,o.A)(e))),Eo)),Wo();var gs=n(279);var vs,bs=n(7540);let fs,As,ys,ks,Es,ws,xs,Ns,Cs,Ls,Ms,Ts,Os,Ss,Is,Rs;const _s=(0,m.wrapBrick)("eo-menu"),Ds=(0,m.wrapBrick)("eo-menu-item"),Ps=(0,m.wrapBrick)("eo-tooltip"),Ws=(0,gs.unwrapProvider)("basic.lock-body-scroll");(0,mi.initializeReactI18n)("bricks/visual-builder/generate-snippets-context-menu",{en:{},zh:{}});const{defineElement:$s,property:Bs,event:Fs,method:Us}=(0,u.createDecorators)();let zs;var Vs=new WeakMap,Ks=new WeakMap,js=new WeakMap,Hs=new WeakMap,Js=new WeakSet,Xs=new WeakMap,qs=new WeakMap,Ys=new WeakMap;class Gs extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Js),(0,r.A)(this,Vs,(fs(this),ys(this))),(0,r.A)(this,Ks,(ks(this),Es(this))),(0,r.A)(this,js,(ws(this),xs(this))),(0,r.A)(this,Hs,(Ns(this),Cs(this))),(0,r.A)(this,Xs,(Ts(this),Os(this))),(0,r.A)(this,qs,(Rs(this),e=>{(0,s.A)(Js,this,Ls).emit(e)})),(0,r.A)(this,Ys,(e=>{(0,s.A)(Js,this,Ss).emit(e)}))}get options(){return(0,c.A)(Vs,this)}set options(e){(0,l.A)(Vs,this,e)}get active(){return(0,c.A)(Ks,this)}set active(e){(0,l.A)(Ks,this,e)}get position(){return(0,c.A)(js,this)}set position(e){(0,l.A)(js,this,e)}open(e){let{position:t}=e;this.active=!0,this.position=t}close(){this.active=!1,this.position=void 0}disconnectedCallback(){super.disconnectedCallback(),Ws(this,!1)}render(){return p().createElement(Zs,{active:this.active,element:this,position:this.position,onItemDragStart:(0,c.A)(qs,this),onItemDragEnd:(0,c.A)(Ys,this),options:this.options})}}function Zs(e){var t,n;let{element:i,active:a,onItemDragEnd:r,onItemDragStart:o,options:s,position:l}=e;const[c,d]=(0,h.useState)(!1),u=(0,h.useRef)(null),[m,g]=(0,h.useState)(null),v=(0,h.useCallback)((e=>{e.preventDefault(),null==i||i.close()}),[i]),b=(0,h.useCallback)(((e,t)=>{var n;d(!0),t.dragConf&&(null===(n=e.dataTransfer)||void 0===n||n.setData(t.dragConf.format,JSON.stringify(t.dragConf.data))),e.target.classList.add("dragging"),null==o||o(t)}),[o]),f=(0,h.useCallback)(((e,t)=>{d(!1),e.target.classList.remove("dragging"),null==i||i.close(),null==r||r(t)}),[i,r]);return(0,h.useEffect)((()=>{Ws(i,a)}),[a,i]),(0,h.useEffect)((()=>{if(a&&u.current&&l){const e=u.current.getBoundingClientRect(),t=e.width+8,n=e.height+8,{clientWidth:i,clientHeight:a}=document.documentElement,r=[...l];i>t&&l[0]+t>i&&(r[0]=l[0]-t),a>n&&l[1]+n>a&&(r[1]=a-n),g(r)}else g(null)}),[a,l]),p().createElement(p().Fragment,null,!c&&p().createElement("div",{className:"mask",onClick:v,onContextMenu:v}),p().createElement("div",{className:"container",ref:u,style:{left:null===(t=m??l)||void 0===t?void 0:t[0],top:null===(n=m??l)||void 0===n?void 0:n[1],visibility:m?"visible":"hidden"}},null==s?void 0:s.map(((e,t)=>{var n,i;return p().createElement("div",{key:t},p().createElement("div",{className:"title"},e.title),(null===(n=e.children)||void 0===n?void 0:n.length)&&p().createElement(_s,null,null===(i=e.children)||void 0===i?void 0:i.map(((e,t)=>p().createElement(Ps,{content:e.tooltip,hoist:!0,placement:"left",key:t},p().createElement(Ds,{disabled:e.disabled,icon:e.icon,draggable:!e.disabled,onDragStart:t=>b(t,e),onDragEnd:t=>f(t,e)},e.text))))))}))))}vs=Gs,({e:[ys,ks,Es,ws,xs,Ns,Cs,Ls,Ms,Ts,Os,Ss,Is,Rs,fs],c:[zs,As]}=(0,d.A)(vs,[$s("visual-builder.generate-snippets-context-menu",{styleTexts:[bs.A]})],[[Bs({attribute:!1}),1,"options"],[Bs({type:Boolean}),1,"active"],[Bs({attribute:!1}),1,"position"],[Fs({type:"item.drag.start"}),1,"itemDragStartEvent",e=>(0,c.A)(Hs,e),(e,t)=>(0,l.A)(Hs,e,t)],[Fs({type:"item.drag.end"}),1,"itemDragEndEvent",e=>(0,c.A)(Xs,e),(e,t)=>(0,l.A)(Xs,e,t)],[Us(),2,"open"],[Us(),2,"close"]],0,(e=>Ys.has((0,o.A)(e))),m.ReactNextElement)),As();var Qs=n(1085),el=n(3091),tl=n(7447),nl=n(3640),il=n(4360),al=n(3544),rl=n(4650),ol=n(9830);function sl(){function e(e,t,n){if(!n||"pre"!==n.tagName||"code"!==e.tagName)return;const i=function(e){const t=e.properties.className||[];for(const e of t)if("language-"===e.slice(0,9))return e.slice(9).toLowerCase();return null}(e);if(null===i)return;let a;try{n.properties.className=(n.properties.className||[]).concat("language-"+i),a=ol.L.highlight((0,rl.d)(e),i)}catch{return}e.children=a.children}return t=>{(0,al.YR)(t,"element",e)}}const ll={Fragment:Qs.Fragment,jsx:Qs.jsx,jsxs:Qs.jsxs};function cl(e){let{content:t}=e;const[n,i]=(0,h.useState)(null);return(0,h.useEffect)((()=>{let e=!1;return(0,el.l)().use(tl.A).use(nl.A).use([sl]).use(il.A,ll).process(t).then((t=>{e||i(t.result)})).catch((t=>{e||(console.error("Convert markdown failed:",t),i(null))})),()=>{e=!0}}),[t]),n}const dl=(0,m.wrapBrick)("eo-avatar");function hl(e){let{message:t}=e;const n=(0,h.useMemo)((()=>{const e=[];if("assistant"===t.role){const n=/(?:^|\n)```(easy_cmd_\S+)\n([\s\S]*?)\n```(?:$|\n)/gm;let i,a=0;for(;i=n.exec(t.content);){const[r,o,s]=i,l=i.index,c=t.content.slice(a,l).trim();c.length>0&&e.push({type:"markdown",content:c}),e.push({type:"command",command:o,content:s.trim(),raw:r}),a=n.lastIndex}const r=t.content.slice(a).trim();r.length>0&&e.push({type:"markdown",content:r})}else e.push({type:"plain",content:t.content});return e}),[t.content,t.role]),i=(0,h.useRef)(null);return(0,h.useEffect)((()=>{const e=i.current;e&&setTimeout((()=>{const n=e.parentElement.querySelectorAll(".texting");for(const e of n)e.classList.remove("texting");if(!t.partial)return;let i=e;for(;i;){const e=i.lastChild;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE||"DETAILS"===(null==e?void 0:e.tagName)&&!e.open){var a;if((null==e?void 0:e.nodeType)!==Node.TEXT_NODE||0!==e.textContent.trim().length||(null===(a=e.previousSibling)||void 0===a?void 0:a.nodeType)!==Node.ELEMENT_NODE)break;i=e.previousSibling}else i=e}i.classList.add("texting")}),1)}),[t.partial,t.content]),p().createElement("div",{className:f()("message",{failed:t.failed})},p().createElement("div",{className:"avatar"},p().createElement(dl,{icon:{lib:"easyops",icon:"assistant"===t.role?"robot":"account"},size:"small",className:`role-${t.role}`})),p().createElement("div",{className:"main"},p().createElement("div",{className:"label"},"assistant"===t.role?"Assistant":"You"),p().createElement("div",{className:"content",ref:i},n.map(((e,t)=>p().createElement(pl,{key:t,chunk:e}))))))}function pl(e){let{chunk:t}=e;return p().createElement(p().Fragment,null,"markdown"===t.type?p().createElement("div",{className:"markdown"},p().createElement(cl,{content:t.content})):"command"===t.type?p().createElement(p().Fragment,null,p().createElement("details",{className:"command"},p().createElement("summary",null,"```",t.command),p().createElement("pre",null,p().createElement("code",null,t.content)))):p().createElement("div",{className:"plain"},t.content))}var ul,ml=n(7236);let gl,vl,bl,fl,Al,yl,kl,El,wl;const{defineElement:xl,property:Nl,event:Cl}=(0,u.createDecorators)();let Ll;var Ml=new WeakMap,Tl=new WeakMap,Ol=new WeakMap,Sl=new WeakSet,Il=new WeakMap;class Rl extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Sl),(0,r.A)(this,Ml,vl(this)),(0,r.A)(this,Tl,(bl(this),fl(this))),(0,r.A)(this,Ol,(Al(this),yl(this))),(0,r.A)(this,Il,(wl(this),e=>{(0,s.A)(Sl,this,kl).emit(e)}))}get messages(){return(0,c.A)(Ml,this)}set messages(e){(0,l.A)(Ml,this,e)}get errorBoundary(){return(0,c.A)(Tl,this)}set errorBoundary(e){(0,l.A)(Tl,this,e)}render(){return p().createElement(_l,{host:this,messages:this.messages,errorBoundary:this.errorBoundary,onStoryboardUpdate:(0,c.A)(Il,this)})}}function _l(e){let{messages:t,host:n,errorBoundary:i,onStoryboardUpdate:a}=e;const r=(0,h.useMemo)((()=>/(?:^|\n)```easy_cmd_vb_block_(page|storyboard)\n([\s\S]*?)\n```(?:$|\n)/gm),[]),o=(0,h.useRef)(new Map),[s,l]=(0,h.useState)([]),c=(0,h.useRef)(!1);(0,h.useEffect)((()=>{for(const e of t??[]){if("assistant"!==e.role)continue;let t;r.lastIndex=o.current.get(e.key)??0;const n=[];let i=!1;for(;t=r.exec(e.content);){o.current.set(e.key,r.lastIndex);const[,a,s]=t;try{const e=JSON.parse(s);"page"===a?(i=!0,n.push(...e)):n.push({...e,type:"item"})}catch(e){console.error("parse storyboard failed:",e)}}i?l(n):n.length>0&&l((e=>[...e,...n]))}}),[r,t]);const[d,u]=(0,h.useState)([]);(0,h.useEffect)((()=>{const e=[],t=new Map;for(const n of s)"block"===n.type?e.push(n):n.storyboard&&t.set(n.uuid,n.storyboard);e.sort(((e,t)=>e.seq-t.seq));const n={brick:"eo-content-layout",children:[]},a={brick:"eo-main-view",children:[{brick:"eo-page-title",slot:"pageTitle",properties:{pageTitle:"测试页面"}}]};let r=!1;for(const o of e)if("全局操作区"===o.name)for(const e of o.children){const n=t.get(e);n&&(a.children.push({...n,properties:{...n.properties,slot:void 0},errorBoundary:i,slot:"toolbar",iid:`item:${e}`,meta:{type:"item",uuid:e,block:{uuid:o.uuid,name:o.name}}}),r=!0)}else{const e=t.get(o.uuid);if(e){const a={...e,children:[],errorBoundary:i,iid:`block:${o.uuid}`,meta:{type:"block",uuid:o.uuid,name:o.name}};r=!0,n.children.push(a);for(const e of o.children){const n=t.get(e);n&&a.children.push({...n,errorBoundary:i,iid:`item:${e}`,meta:{type:"item",uuid:e}})}}else if(!o.hasContainer)for(const e of o.children){const a=t.get(e);a&&(n.children.push({...a,errorBoundary:i,iid:`item:${e}`,meta:{type:"item",uuid:e}}),r=!0)}}a.children.push(n),u((e=>r?[a]:0===e.length?e:[]))}),[s,i]),(0,h.useEffect)((()=>{null==a||a(d)}),[a,d]);const m=(0,h.useMemo)((()=>{let e=n;for(;e;){const t=getComputedStyle(e,null).getPropertyValue("overflow-y");if("auto"===t||"scroll"===t)return e;if(e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else{if(!(e.parentNode instanceof Element))break;e=e.parentNode}}return document.scrollingElement||document.documentElement}),[n]);return(0,h.useEffect)((()=>{c.current||setTimeout((()=>{m.scrollTo(0,m.scrollHeight)}),1)}),[t,m]),(0,h.useEffect)((()=>{const e=()=>{c.current=m.scrollTop+m.clientHeight+6<m.scrollHeight};return m.addEventListener("scroll",e),()=>{m.removeEventListener("scroll",e)}}),[m]),p().createElement(p().Fragment,null,null==t?void 0:t.map(((e,t)=>p().createElement(hl,{key:e.key??`index-${t}`,message:e}))))}ul=Rl,({e:[vl,bl,fl,Al,yl,kl,El,wl],c:[Ll,gl]}=(0,d.A)(ul,[xl("visual-builder.chat-conversation",{styleTexts:[ml.A]})],[[Nl({attribute:!1}),1,"messages"],[Nl({type:Boolean}),1,"errorBoundary"],[Cl({type:"storyboard.update"}),1,"storyboardUpdate",e=>(0,c.A)(Ol,e),(e,t)=>(0,l.A)(Ol,e,t)]],0,(e=>Il.has((0,o.A)(e))),m.ReactNextElement)),gl();var Dl=n(9575),Pl=n(1732);function Wl(e){let{variant:t,width:n,height:i,left:a,top:r,label:o}=e;return p().createElement("div",{className:"outline "+t,style:{width:n+8,height:i+8,left:a-4,top:r-4}},p().createElement("div",{className:"label"},o))}var $l,Bl=n(1563);let Fl,Ul,zl,Vl,Kl,jl,Hl,Jl,Xl,ql,Yl,Gl,Zl,Ql,ec,tc;const{defineElement:nc,property:ic,event:ac,method:rc}=(0,u.createDecorators)();let oc;var sc=new WeakMap,lc=new WeakMap,cc=new WeakMap,dc=new WeakMap,hc=new WeakMap,pc=new WeakMap,uc=new WeakSet,mc=new WeakMap;class gc extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,uc),(0,r.A)(this,sc,(Fl(this),zl(this))),(0,r.A)(this,lc,(Vl(this),Kl(this))),(0,r.A)(this,cc,(jl(this),Hl(this))),(0,r.A)(this,dc,(Jl(this),Xl(this))),(0,r.A)(this,hc,(ql(this),Yl(this))),(0,r.A)(this,pc,(Gl(this),Zl(this))),(0,r.A)(this,mc,(tc(this),e=>{(0,s.A)(uc,this,Ql).emit(e)}))}get storyboard(){return(0,c.A)(sc,this)}set storyboard(e){(0,l.A)(sc,this,e)}get theme(){return(0,c.A)(lc,this)}set theme(e){(0,l.A)(lc,this,e)}get uiVersion(){return(0,c.A)(cc,this)}set uiVersion(e){(0,l.A)(cc,this,e)}get app(){return(0,c.A)(dc,this)}set app(e){(0,l.A)(dc,this,e)}get inspecting(){return(0,c.A)(hc,this)}set inspecting(e){(0,l.A)(hc,this,e)}select(e){var t;const n=null===(t=this.shadowRoot)||void 0===t||null===(t=t.querySelector("iframe"))||void 0===t?void 0:t.contentWindow;null==n||n.postMessage({channel:"chat-preview",type:"select",payload:e},location.origin)}render(){return p().createElement(vc,{storyboard:this.storyboard,theme:this.theme,uiVersion:this.uiVersion,app:this.app,inspecting:this.inspecting,onActiveTargetChange:(0,c.A)(mc,this)})}}function vc(e){let{storyboard:t,theme:n,uiVersion:i,app:a,inspecting:r,onActiveTargetChange:o}=e;const s=(0,h.useRef)(),[l,c]=(0,h.useState)(!1),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)({x:0,y:0}),[v,b]=(0,h.useState)([]),[A,y]=(0,h.useState)([]),[k,E]=(0,h.useState)([]),[w,x]=(0,h.useState)([]),N=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=s.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?c(!0):setTimeout(e,100)};e()}),[]);(0,h.useEffect)((()=>{var e;if(!l)return;const t=qe.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!t)throw new Error("Cannot find preview agent package: bricks/visual-builder");(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_inject)("visual-builder.inject-chat-preview-agent",{...t,filePath:`${location.origin}${(0,qe.getBasePath)()}${window.PUBLIC_ROOT??""}${t.filePath}`})}),[l]),(0,h.useEffect)((()=>{var e;if(!l)return;const r=null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;r&&r("yaml",{yaml:(0,Pl.safeDump)(t,{schema:Pl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:a,theme:n,uiVersion:i})}),[a,l,t,n,i]);const C=(0,h.useMemo)((()=>{if(d)return()=>{setTimeout((()=>{window.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}})}),100)}}),[d]);(0,h.useEffect)((()=>{const e=e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"initialized":u(!0);break;case"inspect-hover":b(e.data.payload.outlines);break;case"scroll":g(e.data.payload);break;case"inspect-active":y(e.data.payload.outlines)}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[]),(0,h.useEffect)((()=>{var e;d&&(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e||e.postMessage({channel:"chat-preview",type:"toggle-inspecting",payload:{inspecting:r}},location.origin))}),[d,r]);const L=(0,h.useCallback)((e=>e.map((e=>{var t,n;const i=(null==s||null===(t=s.current)||void 0===t?void 0:t.offsetLeft)??0,a=(null==s||null===(n=s.current)||void 0===n?void 0:n.offsetTop)??0,{width:r,height:o,left:l,top:c,...d}=e;return{width:1*r,height:1*o,left:1*(l-m.x)+i,top:1*(c-m.y)+a,...d}}))),[m.x,m.y]);return(0,h.useEffect)((()=>{o(A[0])}),[A,o]),(0,h.useEffect)((()=>{x(L(A))}),[A,L]),(0,h.useEffect)((()=>{E(L(v))}),[v,L]),p().createElement("div",{className:f()("container",{inspecting:r})},p().createElement("iframe",{ref:s,src:`${(0,qe.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:N,onMouseOut:C}),k.map(((e,t)=>p().createElement(Wl,(0,Dl.A)({key:t,variant:"hover"},e)))),w.map(((e,t)=>p().createElement(Wl,(0,Dl.A)({key:t,variant:"active"},e)))))}$l=gc,({e:[zl,Vl,Kl,jl,Hl,Jl,Xl,ql,Yl,Gl,Zl,Ql,ec,tc,Fl],c:[oc,Ul]}=(0,d.A)($l,[nc("visual-builder.chat-preview",{styleTexts:[Bl.A]})],[[ic({attribute:!1}),1,"storyboard"],[ic(),1,"theme"],[ic(),1,"uiVersion"],[ic(),1,"app"],[ic({type:Boolean}),1,"inspecting"],[ac({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(pc,e),(e,t)=>(0,l.A)(pc,e,t)],[rc(),2,"select"]],0,(e=>mc.has((0,o.A)(e))),m.ReactNextElement)),Ul();let bc=!1;const fc="item:";let Ac=null;function yc(e){e.preventDefault(),e.stopPropagation(),function(e){const t=Nc(e.composedPath());window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:t.map(Cc)}},location.origin)}(e)}function kc(e){e.preventDefault(),e.stopPropagation()}const Ec=(0,Ge.debounce)(((e,t,n)=>{let i=Nc(e);if(0===i.length)for(const a of e)if(a instanceof HTMLElement&&a.shadowRoot){i=Nc(a.shadowRoot.elementsFromPoint(t,n));break}const a=i.length>0?i[0].element:null;a!==Ac&&(Ac=a,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:i.map(Cc)}},location.origin))}),20,{leading:!0});function wc(e){Ec(e.composedPath(),e.clientX,e.clientY)}function xc(e){e.preventDefault(),e.stopPropagation(),Ac=null,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}},location.origin)}function Nc(e){const t=[];return e.forEach((e=>{let n;if(e.nodeType===Node.ELEMENT_NODE&&e instanceof HTMLElement&&(n=e.dataset.iid)&&n.startsWith(fc)){const i=n.substring(fc.length);t.push({type:"item",uuid:i,label:Lc(e),element:e})}})),t}function Cc(e){const{element:t,type:n,uuid:i,label:a}=e,{width:r,height:o,left:s,top:l}=t.getBoundingClientRect();return{width:r,height:o,left:s+window.scrollX,top:l+window.scrollY,type:n,uuid:i,label:a}}function Lc(e){return e.tagName.toLowerCase().split(".").pop()}let Mc=!1;function Tc(e){window.parent.postMessage({channel:"chat-preview",...e},location.origin)}customElements.define("visual-builder.inject-chat-preview-agent",(0,gs.createProviderClass)((async function(){Mc||(Mc=!0,n.e(2201).then(n.bind(n,2201)),Tc({type:"initialized"}),window.addEventListener("message",(e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"toggle-inspecting":!function(e){if(bc===e)return;bc=e;const t=e?"addEventListener":"removeEventListener";window[t]("click",yc,!0),window[t]("mousedown",kc,!0),window[t]("mouseover",kc,!0),window[t]("mouseup",kc,!0),window[t]("pointerdown",kc,!0),window[t]("pointerover",kc,!0),window[t]("pointerup",kc,!0),window[t]("pointerleave",xc,!0),window[t]("pointermove",wc,!0)}(e.data.payload.inspecting);break;case"select":!function(e){const t=function(e,t){const n=[];return function t(i){const a=i.querySelectorAll(`[data-iid="${e}"]`);if(n.push(...a),!(i===document&&a.length>0))for(const e of i.querySelectorAll("*"))e.shadowRoot&&t(e.shadowRoot)}(document),n}(`${e.type}:${e.uuid}`);window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:t.map((t=>Cc({...e,element:t,label:Lc(t)})))}},location.origin)}(e.data.payload)}})),window.addEventListener("scroll",(()=>{Tc({type:"scroll",payload:{x:window.scrollX,y:window.scrollY}})})))})));var Oc,Sc=n(4014),Ic=n(8918);let Rc,_c,Dc,Pc,Wc,$c,Bc,Fc,Uc,zc,Vc;const{defineElement:Kc,property:jc}=(0,u.createDecorators)();let Hc;var Jc=new WeakMap,Xc=new WeakMap,qc=new WeakMap,Yc=new WeakMap,Gc=new WeakMap;class Zc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Jc,_c(this)),(0,r.A)(this,Xc,(Dc(this),Pc(this))),(0,r.A)(this,qc,(Wc(this),$c(this))),(0,r.A)(this,Yc,(Bc(this),Fc(this))),(0,r.A)(this,Gc,(Uc(this),zc(this))),Vc(this)}get generations(){return(0,c.A)(Jc,this)}set generations(e){(0,l.A)(Jc,this,e)}get category(){return(0,c.A)(Xc,this)}set category(e){(0,l.A)(Xc,this,e)}get theme(){return(0,c.A)(qc,this)}set theme(e){(0,l.A)(qc,this,e)}get uiVersion(){return(0,c.A)(Yc,this)}set uiVersion(e){(0,l.A)(Yc,this,e)}get app(){return(0,c.A)(Gc,this)}set app(e){(0,l.A)(Gc,this,e)}render(){return p().createElement(Qc,{generations:this.generations,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app})}}function Qc(e){let{generations:t,category:n,theme:i,uiVersion:a,app:r}=e;const o=(0,h.useRef)(),[s,l]=(0,h.useState)(!1),[c,d]=(0,h.useState)(!1),u=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=o.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?l(!0):setTimeout(e,100)};e()}),[]);return(0,h.useEffect)((()=>{if(!s)return;const e=qe.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!e)throw new Error("Cannot find preview agent package: bricks/visual-builder");const t=o.current.contentWindow._preview_only_inject,n={...e,filePath:`${location.origin}${(0,qe.getBasePath)()}${window.PUBLIC_ROOT??""}${e.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>t(e,n,void 0,!0)))).then((()=>{d(!0)}))}),[s]),(0,h.useEffect)((()=>{var e;if(!c)return;const s=null===(e=o.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const l=new Map,d=new Map;for(const e of t){let t=l.get(e.propertyId);t||l.set(e.propertyId,t=new Map);let n=t.get(e.rwType);n||t.set(e.rwType,n=new Map),n.set(e.displayLevel??0,e),d.set(e.propertyId,e.mockData)}const h=[{brick:"div",properties:{textContent:"属性",className:"head-cell"}},{brick:"div",properties:{textContent:"类别",className:"head-cell"}},{brick:"div",properties:{textContent:"展示等级",className:"head-cell last-col-cell",style:{gridColumn:"span 5",textAlign:"center"}}}],p={brick:"visual-builder.pre-generated-table-view",properties:{style:{gridTemplateColumns:"120px 80px repeat(5, 1fr)"}},children:h};let u=0;for(const[e,t]of l){let i=0;const a=u===l.size-1;for(const[r,o]of t){if(0===i){let n;for(const t of o.values()){n=t.propertyName??e;break}h.push({brick:"div",properties:{textContent:n,className:f()("body-cell",{"last-row-cell":a}),style:{gridRow:`span ${t.size}`}}})}const s=a&&i===t.size-1;h.push({brick:"div",properties:{textContent:r,className:f()("body-cell",{"last-row-cell":s})}});for(let t=-2;t<3;t++){var m;const i=o.get(t),a=(null==i?void 0:i.category)??n;let r;if(null!=i&&null!==(m=i.mockData)&&void 0!==m&&m.length){const t=i.mockData[Math.floor(Math.random()*i.mockData.length)];switch(a){case"detail-item":case"form-item":case"card-item":r={[e]:t};break;case"table-column":r={cellData:t}}}const l=[].concat((null==i?void 0:i.storyboard)??[]).filter((e=>!!(0,gs.isObject)(e)||(console.error("Unexpected type of storyboard:",typeof e),!1)));let c;switch(l.forEach(ed),a){case"form-item":c={brick:"eo-form",properties:{layout:"inline",values:r,className:"form-container"},children:l.map((e=>({...e,errorBoundary:!0})))};break;case"card-item":c={brick:":forEach",dataSource:[r],children:l.map((e=>({...e,errorBoundary:!0})))};break;default:c={brick:"visual-builder.pre-generated-container",properties:{useBrick:l,dataSource:r},errorBoundary:!0}}h.push({brick:"div",properties:{className:f()("body-cell",{"last-col-cell":2===t,"last-row-cell":s})},children:[{...c,errorBoundary:!0}]})}i++}u++}s("yaml",{yaml:(0,Pl.safeDump)(p,{schema:Pl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:r,theme:i,uiVersion:a,styleText:Ic.A})}),[r,c,t,i,a,n]),p().createElement("div",{className:f()("container")},p().createElement("iframe",{ref:o,src:`${(0,qe.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:u}))}function ed(e){var t;null!==(t=e.properties)&&void 0!==t&&t.prefix&&(console.error("Unexpected readonly property of 'prefix' in:",e),delete e.properties.prefix)}Oc=Zc,({e:[_c,Dc,Pc,Wc,$c,Bc,Fc,Uc,zc,Vc],c:[Hc,Rc]}=(0,d.A)(Oc,[Kc("visual-builder.pre-generated-preview",{styleTexts:[Sc.A]})],[[jc({attribute:!1}),1,"generations"],[jc(),1,"category"],[jc(),1,"theme"],[jc(),1,"uiVersion"],[jc(),1,"app"]],0,void 0,m.ReactNextElement)),Rc();var td,nd=n(9216);let id;const{defineElement:ad}=(0,u.createDecorators)();let rd;class od extends m.ReactNextElement{render(){return p().createElement(sd,null)}}function sd(){return p().createElement("slot",null)}td=od,[rd,id]=(0,d.A)(td,[ad("visual-builder.pre-generated-table-view",{styleTexts:[nd.A]})],[],0,void 0,m.ReactNextElement).c,id();var ld,cd=n(4967);let dd,hd,pd,ud,md;const{defineElement:gd,property:vd}=(0,u.createDecorators)();let bd;var fd=new WeakMap,Ad=new WeakMap;class yd extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,fd,hd(this)),(0,r.A)(this,Ad,(pd(this),ud(this))),md(this)}get useBrick(){return(0,c.A)(fd,this)}set useBrick(e){(0,l.A)(fd,this,e)}get dataSource(){return(0,c.A)(Ad,this)}set dataSource(e){(0,l.A)(Ad,this,e)}render(){return p().createElement(kd,{useBrick:this.useBrick,dataSource:this.dataSource})}}function kd(e){let{useBrick:t,dataSource:n}=e;return p().createElement(Zr.ReactUseMultipleBricks,{useBrick:t,data:n,errorBoundary:!0})}ld=yd,({e:[hd,pd,ud,md],c:[bd,dd]}=(0,d.A)(ld,[gd("visual-builder.pre-generated-container",{styleTexts:[cd.A]})],[[vd({attribute:!1}),1,"useBrick"],[vd({attribute:!1}),1,"dataSource"]],0,void 0,m.ReactNextElement)),dd(),n(2080),customElements.define("visual-builder.check-editor-by-name",(0,gs.createProviderClass)((async function(e){try{await qe.__secret_internals.loadEditors([e])}catch{return!1}return!!qe.customEditors.get(e)})));var Ed=n(877);function wd(e,t){const n=new Map;for(const i of e){const e=(0,Ed.collectMemberUsage)([i.if,i.value,i.resolve],t);n.set(i,e)}return n}function xd(e,t){e.forEach((n=>{!function(e,t){var n;const{dependencyList:i,nodeList:a,parents:r,result:o}=t,s=(0,Ge.cloneDeep)(e);o.push(s);const l=i.find((e=>e.node.key===s.key));if(null!==(n=l.deps)&&void 0!==n&&n.length&&!r.some((e=>e.key===s.key))){const e=s.children=[];!function(e,t){const n=[];e.deps.forEach((e=>{const i=t.nodeList.filter((t=>t.name===e));n.push(...i)})),xd(n,t)}(l,{dependencyList:i,nodeList:a,parents:[...r,s],result:e})}}(n,{...t,nodeList:e})}))}function Nd(e,t){const n=`[${JSON.stringify(t)}]`;let i;switch(e.display){case"link":case"text":i=Ld(e,n),"struct-list"!==e.type||e.countOnly?"link"===e.display&&(i={brick:"eo-link",errorBoundary:!0,children:[i]}):i={brick:"eo-tag",errorBoundary:!0,children:[i]};break;case"tag":{var a,r,o,s,l;const t="background"===(null===(a=e.style)||void 0===a?void 0:a.variant)?"-inverse":"",c=Md(e,n);i={brick:"eo-tag",errorBoundary:!0,properties:{textContent:`<% ${c} %>`,size:Td(null===(r=e.style)||void 0===r?void 0:r.size),color:null!==(o=e.style)&&void 0!==o&&o.background?`${e.style.background}${t}`:null!==(s=e.style)&&void 0!==s&&s.palette?`<% \`\${(${JSON.stringify(e.style.palette)})[${c}] ?? "gray"}${t}\` %>`:`gray${t}`,outline:"outline"===(null===(l=e.style)||void 0===l?void 0:l.variant)}};break}case"icon":i=Cd(e,n);break;case"icon+text":i={brick:"span",errorBoundary:!0,properties:{style:{display:"inline-flex",alignItems:"center",gap:"0.5em"}},children:[Cd(e,n),Ld(e,n)]};break;default:return null}if("struct-list"!==e.type||e.countOnly)return i;const c=Number(e.maxItems)||3;return{brick:"span",errorBoundary:!0,properties:{style:{display:"inline-flex",alignItems:"center",gap:"0.5em"}},children:[{brick:":forEach",dataSource:`<% DATA${n}.slice(0, ${c}) %>`,children:[i]},{brick:"eo-link",if:`<% DATA${n}.length > ${c} %>`,properties:{textContent:`<% \`+ \${DATA${n}.length - ${c}} 项\` %>`}}]}}function Cd(e,t){if("boolean"===e.type){var n,i,a,r;const o=Md(e,t),s=(null===(n=e.true)||void 0===n?void 0:n.icon)??"check",l=(null===(i=e.false)||void 0===i?void 0:i.icon)??"xmark",c=Od(null===(a=e.true)||void 0===a?void 0:a.style),d=Od(null===(r=e.false)||void 0===r?void 0:r.style);return{brick:"eo-icon",errorBoundary:!0,properties:{lib:"fa",prefix:"fas",icon:`<% ${o} ? ${JSON.stringify(s)} : ${JSON.stringify(l)} %>`,style:`<% ${o} ? ${JSON.stringify(c)} : ${JSON.stringify(d)} %>`}}}return{brick:"eo-icon",errorBoundary:!0,properties:{lib:"fa",prefix:"fas",icon:e.icon}}}function Ld(e,t){var n;if("struct-list"===e.type&&e.countOnly)return{brick:"span",properties:{textContent:`<% \`\${DATA${t}.length}\` %>`}};const i=Md(e,t),a=`<% ${i} %>`;switch(null===(n=e.formatter)||void 0===n?void 0:n.type){case"number":return{brick:"eo-formatter-number",errorBoundary:!0,properties:{value:a,type:e.formatter.format,...(0,Ge.pick)(e.formatter,["currency","originalUnit","decimals","thousandsSeparator"])}};case"date":case"date-time":return{brick:"eo-humanize-time",errorBoundary:!0,properties:{value:a,type:"date"===e.type?"date":void 0,formatter:e.formatter.format}};case"cost-time":return{brick:"eo-humanize-time",errorBoundary:!0,properties:{value:a,isCostTime:!0}};default:{let t,n;if("boolean"===e.type){var r,o,s,l;const a=(null===(r=e.true)||void 0===r?void 0:r.text)??"Yes",c=(null===(o=e.false)||void 0===o?void 0:o.text)??"No",d=Od(null===(s=e.true)||void 0===s?void 0:s.style),h=Od(null===(l=e.false)||void 0===l?void 0:l.style);t=`<% ${i} ? ${JSON.stringify(a)} : ${JSON.stringify(c)} %>`,n=`<% ${i} ? ${JSON.stringify(d)} : ${JSON.stringify(h)} %>`}else t=a,n=Od(e.style);return{brick:"span",errorBoundary:!0,properties:{textContent:t,style:n}}}}}function Md(e,t){return"struct"!==e.type&&"struct-list"!==e.type||!e.field?`DATA${t}`:`${"struct"===e.type?`DATA${t}`:"ITEM"}[${JSON.stringify(e.field)}]`}function Td(e){switch(e){case"large":case"medium":case"small":return e;case"x-large":return"large"}}function Od(e){if(!e)return;const t={};switch(e.size){case"small":t.fontSize="var(--sub-title-font-size-small)";break;case"medium":t.fontSize="var(--normal-font-size)";break;case"large":t.fontSize="var(--card-title-font-size)";break;case"x-large":t.fontSize="var(--title-font-size-larger)"}switch(e.fontWeight){case"bold":case"normal":t.fontWeight=e.fontWeight}return e.color&&(t.color=e.color),t}customElements.define("visual-builder.get-data-deps",(0,gs.createProviderClass)(wd)),customElements.define("visual-builder.get-dependency-tree",(0,gs.createProviderClass)((function(e,t){const n=e,i=wd(n.map((e=>e.data)),t.dataType),a=[];for(const[e,t]of i)a.push({deps:Array.from(t.usedProperties),node:n.find((t=>t.data===e))});const r=[];return xd(n,{result:r,dependencyList:a,parents:[]}),r})));var Sd,Id=n(9034),Rd=n(4162);let _d,Dd,Pd,Wd,$d,Bd,Fd,Ud,zd,Vd,Kd,jd,Hd,Jd,Xd,qd,Yd,Gd,Zd,Qd,eh;const{defineElement:th,property:nh,event:ih}=(0,u.createDecorators)();let ah;var rh=new WeakMap,oh=new WeakMap,sh=new WeakMap,lh=new WeakMap,ch=new WeakMap,dh=new WeakMap,hh=new WeakMap,ph=new WeakMap,uh=new WeakMap,mh=new WeakSet,gh=new WeakMap;class vh extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,mh),(0,r.A)(this,rh,Dd(this)),(0,r.A)(this,oh,(Pd(this),Wd(this))),(0,r.A)(this,sh,($d(this),Bd(this))),(0,r.A)(this,lh,(Fd(this),Ud(this))),(0,r.A)(this,ch,(zd(this),Vd(this))),(0,r.A)(this,dh,(Kd(this),jd(this))),(0,r.A)(this,hh,(Hd(this),Jd(this))),(0,r.A)(this,ph,(Xd(this),qd(this))),(0,r.A)(this,uh,(Yd(this),Gd(this))),(0,r.A)(this,gh,(eh(this),e=>{(0,s.A)(mh,this,Zd).emit(e)}))}get previewUrl(){return(0,c.A)(rh,this)}set previewUrl(e){(0,l.A)(rh,this,e)}get generations(){return(0,c.A)(oh,this)}set generations(e){(0,l.A)(oh,this,e)}get mocks(){return(0,c.A)(sh,this)}set mocks(e){(0,l.A)(sh,this,e)}get busy(){return(0,c.A)(lh,this)}set busy(e){(0,l.A)(lh,this,e)}get category(){return(0,c.A)(ch,this)}set category(e){(0,l.A)(ch,this,e)}get theme(){return(0,c.A)(dh,this)}set theme(e){(0,l.A)(dh,this,e)}get uiVersion(){return(0,c.A)(hh,this)}set uiVersion(e){(0,l.A)(hh,this,e)}get app(){return(0,c.A)(ph,this)}set app(e){(0,l.A)(ph,this,e)}render(){return p().createElement(bh,{previewUrl:this.previewUrl,generations:this.generations,mocks:this.mocks,busy:this.busy,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app,onComment:(0,c.A)(gh,this)})}}function bh(e){let{previewUrl:t,generations:n,mocks:i,busy:a,category:r,theme:o,uiVersion:s,app:l,onComment:c}=e;const d=(0,h.useRef)(),[u,m]=(0,h.useState)(!1),[g,v]=(0,h.useState)(!1),b=(0,h.useRef)([]),A=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=d.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?m(!0):setTimeout(e,100)};e()}),[]);return(0,h.useEffect)((()=>{u&&d.current.contentWindow.postMessage({channel:"raw-data-preview",type:"busy",payload:a},location.origin)}),[a,u]),(0,h.useEffect)((()=>{if(u){const e=d.current.contentWindow,t=e=>{let{data:t}=e;if("raw-data-preview"===(null==t?void 0:t.channel))switch(t.type){case"comment":c(t.payload);break;case"updatePropertyToggleState":b.current=t.payload}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t)}}}),[c,u]),(0,h.useEffect)((()=>{if(!u)return;const e=qe.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!e)throw new Error("Cannot find preview agent package: bricks/visual-builder");const n=d.current.contentWindow._preview_only_inject,i={...e,filePath:t?new URL(e.filePath,new URL(t,location.origin)).toString():`${location.origin}${(0,qe.getBasePath)()}${window.PUBLIC_ROOT??""}${e.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>n(e,i,void 0,!0)))).then((()=>{v(!0)}))}),[t,u]),(0,h.useEffect)((()=>{var e;if(!g)return;const t=null===(e=d.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!t)return;const a=[{brick:"div",properties:{textContent:"属性",className:"head-cell"}},{brick:"div",properties:{textContent:"",className:"head-cell"}},{brick:"div",properties:{textContent:"原始数据",className:"head-cell"}},{brick:"div",properties:{textContent:"视觉重量 (由低至高)",className:"head-cell",style:{gridColumn:"span 4",textAlign:"center"}}},{brick:"div",properties:{textContent:"批注",className:"head-cell last-col-cell"},children:[{brick:"span",properties:{textContent:"批注"}},{brick:"span",properties:{className:"tips",textContent:"(补充提示词,按住 ⌘ 或 ctrl + 回车提交)"}}]}],r={brick:"visual-builder.pre-generated-table-view",context:[{name:"propertyToggleState",value:b.current,onChange:{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"updatePropertyToggleState",payload:"<% CTX.propertyToggleState %>"}]}},{name:"busy"}],properties:{style:{gridTemplateColumns:"auto 32px repeat(6, 1fr)"}},children:a};for(let e=0,t=n.length;e<t;e++){var c;const r=n[e],o=e===t-1,s=new Map;for(const e of r.candidates??[])s.set(e.visualWeight??0,e);a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o}),style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},children:[{brick:"span",properties:{textContent:`${r.propertyName??r.propertyId}`}},{brick:"eo-button",properties:{type:"text",icon:`<%=\n {\n lib: "fa",\n prefix: "fas",\n icon: CTX.propertyToggleState.includes(${JSON.stringify(r.propertyId)}) ? "chevron-up" : "chevron-down",\n }\n %>`},events:{click:{action:"context.replace",args:["propertyToggleState",`<%\n CTX.propertyToggleState.includes(${JSON.stringify(r.propertyId)})\n ? CTX.propertyToggleState.filter((id) => id !== ${JSON.stringify(r.propertyId)})\n : CTX.propertyToggleState.concat(${JSON.stringify(r.propertyId)})\n %>`]}}}]},{brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:null!==(c=r.candidates)&&void 0!==c&&c.length?[{brick:"eo-icon",properties:{lib:"fa",...r.generationId?{prefix:"far",icon:"circle-check",style:{color:"var(--palette-green-6)"}}:{prefix:"fas",icon:"circle",style:{color:"var(--palette-gray-6)",transformOrigin:"center center",transform:"scale(0.5)"}}}}]:void 0});const l=(r.mockData??i??[]).slice();l.sort(((e,t)=>{const n=null==e?void 0:e[r.propertyId],i=null==t?void 0:t[r.propertyId],a=Array.isArray(n),o=Array.isArray(i);if(a||o)return(o?i.length:-1)-(a?n.length:-1);const s=null==n,l=null==i;if(s||l)return(l?0:1)-(s?0:1);const c="string"==typeof n&&0===n.length,d="string"==typeof i&&0===i.length;return c||d?(d?0:1)-(c?0:1):0})),a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:[{brick:"div",properties:{className:"list"},children:l.map(((e,t)=>{let{[r.propertyId]:n}=e;return{brick:"div",if:0===t||`<%= CTX.propertyToggleState.includes(${JSON.stringify(r.propertyId)}) %>`,properties:{className:"raw-content",textContent:void 0===n?"":"string"==typeof n?n:JSON.stringify(n,null,2)}}}))}]});for(let e=-1;e<3;e++){const t=s.get(e);let n;t&&(n=Nd(t,r.propertyId)),a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:[{brick:"div",properties:{className:"list"},children:n?l.map(((e,t)=>({brick:"visual-builder.pre-generated-container",if:0===t||`<%= CTX.propertyToggleState.includes(${JSON.stringify(r.propertyId)}) %>`,properties:{useBrick:[n],dataSource:e},errorBoundary:!0}))):void 0}]})}a.push({brick:"div",properties:{className:f()("body-cell",{"last-col-cell":!0,"last-row-cell":o})},children:r.candidates?[{brick:"eo-textarea",properties:{value:r.comment?`<% ${JSON.stringify(r.comment)} %>`:void 0,autoSize:!0,style:{width:"100%"},disabled:"<%= CTX.busy %>"},events:{keydown:{if:"<% EVENT.code === 'Enter' && (EVENT.metaKey || EVENT.ctrlKey) %>",action:"window.postMessage",args:[{channel:"raw-data-preview",type:"comment",payload:{comment:"<% EVENT.target.value %>",propertyInstanceId:r.propertyInstanceId}}]}}}]:void 0})}t("yaml",{yaml:(0,Pl.safeDump)([r,{brick:"eo-message-listener",properties:{sameOrigin:!0},events:{message:{if:"<% EVENT.detail.data?.channel === 'raw-data-preview' && EVENT.detail.data.type === 'busy' %>",action:"context.replace",args:["busy","<% EVENT.detail.data.payload %>"]}},portal:!0,errorBoundary:!0}],{schema:Pl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:l,theme:o,uiVersion:s,styleText:Rd.A})}),[l,g,n,o,s,r,i]),p().createElement("div",{className:f()("container")},p().createElement("iframe",{ref:d,src:t??`${(0,qe.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:A}))}Sd=vh,({e:[Dd,Pd,Wd,$d,Bd,Fd,Ud,zd,Vd,Kd,jd,Hd,Jd,Xd,qd,Yd,Gd,Zd,Qd,eh],c:[ah,_d]}=(0,d.A)(Sd,[th("visual-builder.raw-data-preview",{styleTexts:[Id.A]})],[[nh(),1,"previewUrl"],[nh({attribute:!1}),1,"generations"],[nh({attribute:!1}),1,"mocks"],[nh({type:Boolean}),1,"busy"],[nh(),1,"category"],[nh(),1,"theme"],[nh(),1,"uiVersion"],[nh(),1,"app"],[ih({type:"comment"}),1,"commentEvent",e=>(0,c.A)(uh,e),(e,t)=>(0,l.A)(uh,e,t)]],0,(e=>gh.has((0,o.A)(e))),m.ReactNextElement)),_d();var fh=n(264);customElements.define("visual-builder.parse-path",(0,gs.createProviderClass)((async function(e,t){const n=[];return{regexp:(0,fh.MM)(e,n,(0,Ge.defaults)(t,{end:!1,strict:!1,sensitive:!0})),keys:n}})));var Ah=function(){var e=(0,fi.A)((function*(e,t,n){return(yield Ai.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(e,"/instance"),t,n)).data}));return function(t,n,i){return e.apply(this,arguments)}}();customElements.define("visual-builder.batch-update-raw-data-generated-view",(0,gs.createProviderClass)((async function(e){return Promise.allSettled(e.map((e=>{let{attrInstanceId:t,...n}=e;return Ah("RAW_DATA_GENERATED_VIEW@EASYOPS",{...n,attr:[t]})})))})));var yh=n(3084),kh=n(7710),Eh=n(5799),wh=n(4671),xh=n(8397),Nh=n(3404),Ch=n(3287);customElements.define("visual-builder.get-raw-data-system-prompts",(0,gs.createProviderClass)((function(){return{boolean:yh,"date-time":kh,enum:Eh,number:wh,others:xh,"struct-list":Nh,struct:Ch}})))},2080:(e,t,n)=>{n.d(t,{ADVANCED_CHANGE_KEY:()=>Me,SchemaField:()=>Te});var i,a=n(4635),r=n(918),o=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),h=n(8769),p=n.n(h),u=n(4782),m=n(1389),g=(n(6477),n(5908)),v=n(7091),b=n(8788),f=n(6768),A=n(6257),y=n(9708),k=n(6e3),E=n(3768),w=n(2803),x=n(3824),N=n(2513),C=n(5067),L=n(1477),M=n(4287),T=n(966),O=n(5768),S=n(6110),I=n(5944),R=n(8409),_=n(184),D=n(3995),P=(n(74),n(1030)),W=n.n(P);let $,B,F,U,z,V,K,j,H,J,X,q,Y,G,Z,Q,ee,te,ne,ie,ae,re,oe,se,le,ce,de,he,pe,ue,me,ge,ve,be,fe,Ae,ye,ke;const{defineElement:Ee,property:we,method:xe,event:Ne}=(0,u.createDecorators)(),Ce=p().forwardRef(et),Le="before_submit",Me="on_advanced_change",Te=(0,v.Uy)({components:{FormLayout:y.Hb,Input:y.pd,FormItem:w.M,FormItemWithoutAdvanced:y.eI,FormCollapse:y.w9,NumberPicker:y.Y_,Radio:y.sx,Select:y.l6,Switch:y.dO,CategoryTitle:E.H,CodeEditor:x.S,IconSelect:N.r,ColorPicker:C.h,UseChildrenSelect:O._,InputWithUrl:L.r,InputWithUnit:T.U,TextAlignRadio:M.p,CustomOptions:I.F,BoxSize:S.i,CustomTab:R.v}});let Oe,Se;var Ie=new WeakMap,Re=new WeakMap,_e=new WeakMap,De=new WeakMap,Pe=new WeakMap,We=new WeakMap,$e=new WeakMap,Be=new WeakMap,Fe=new WeakMap,Ue=new WeakMap,ze=new WeakSet,Ve=new WeakMap,Ke=new WeakMap,je=new WeakMap,He=new WeakMap,Je=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Ye=new WeakMap,Ge=new WeakMap,Ze=new WeakMap;class Qe extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ze),(0,r.A)(this,Ie,($(this),(0,h.createRef)())),(0,r.A)(this,Re,F(this)),(0,r.A)(this,_e,(U(this),z(this))),(0,r.A)(this,De,(V(this),K(this))),(0,r.A)(this,Pe,(j(this),H(this))),(0,r.A)(this,We,(J(this),X(this))),(0,r.A)(this,$e,(q(this),Y(this))),(0,r.A)(this,Be,(G(this),Z(this))),(0,r.A)(this,Fe,(Q(this),ee(this))),(0,r.A)(this,Ue,(te(this),ne(this))),(0,r.A)(this,Ve,(re(this),oe(this))),(0,r.A)(this,Ke,(ce(this),de(this))),(0,r.A)(this,je,(ue(this),e=>{(0,s.A)(ze,this,he).emit(e)})),(0,r.A)(this,He,me(this)),(0,r.A)(this,Je,(be(this),e=>{(0,s.A)(ze,this,ge).emit(e)})),(0,r.A)(this,Xe,void 0),(0,r.A)(this,qe,(0,g.fA)(Le,((e,t)=>n=>{(0,l.A)(Xe,this,n(e,t))}))),(0,r.A)(this,Ye,fe(this)),(0,r.A)(this,Ge,(ke(this),e=>{(0,s.A)(ze,this,Ae).emit(e)})),(0,r.A)(this,Ze,(e=>{const t="string"==typeof e&&"undefined"===e?void 0:(0,P.omit)(e,["dataset.testid"]),n=[];(0,P.isEmpty)(null==t?void 0:t.dataset)&&n.push("dataset"),(0,P.isEmpty)(null==t?void 0:t.style)&&n.push("style");const i=(0,P.omit)(t,n);if(!(0,P.isEmpty)(i))return i}))}get editorName(){return(0,c.A)(Re,this)}set editorName(e){(0,l.A)(Re,this,e)}get values(){return(0,c.A)(_e,this)}set values(e){(0,l.A)(_e,this,e)}get advancedMode(){return(0,c.A)(De,this)}set advancedMode(e){(0,l.A)(De,this,e)}get dataList(){return(0,c.A)(Pe,this)}set dataList(e){(0,l.A)(Pe,this,e)}get editorPackages(){return(0,c.A)(We,this)}set editorPackages(e){(0,l.A)(We,this,e)}get links(){return(0,c.A)($e,this)}set links(e){(0,l.A)($e,this,e)}get extraLibs(){return(0,c.A)(Be,this)}set extraLibs(e){(0,l.A)(Be,this,e)}get childSlots(){return(0,c.A)(Fe,this)}set childSlots(e){(0,l.A)(Fe,this,e)}validate(){var e;const t=null===(e=(0,c.A)(Ie,this).current)||void 0===e?void 0:e.getFormInstance();(0,l.A)(Xe,this,null),t.validate().then((()=>{if(this.advancedMode)(0,s.A)(ze,this,ie).emit(t.values[D.qZ]);else{const e=W().omit(t.values,[D.qZ]);t.notify(Le,e),(0,s.A)(ze,this,ie).emit((0,c.A)(Xe,this)??e)}})).catch((e=>{(0,s.A)(ze,this,se).emit(e)}))}render(){return p().createElement(Ce,{ref:(0,c.A)(Ie,this),editorName:this.editorName,values:(0,c.A)(Ze,this).call(this,this.values),advancedMode:this.advancedMode,dataList:this.dataList,extraLibs:this.extraLibs,links:this.links,childSlots:this.childSlots,editorPackages:this.editorPackages,handleValuesChange:(0,c.A)(je,this),handleTokenClick:(0,c.A)(Je,this),handleTriggerAction:(0,c.A)(Ge,this),onSubmitEffect:(0,c.A)(qe,this)})}}function et(e,t){let{advancedMode:n,values:i,editorName:a,dataList:r,editorPackages:o,extraLibs:s,childSlots:l,links:c,handleValuesChange:d,handleTokenClick:u,handleTriggerAction:m,onSubmitEffect:y}=e;const[E,w]=(0,h.useState)(Oe),x=(0,k.useCurrentTheme)(),N=(0,h.useMemo)((()=>(0,A.VC)()),[]),C=(0,h.useMemo)((()=>(0,g.DG)()),[E]),L=(0,h.useRef)(null),M=(0,h.useRef)(!1),T=(0,h.useMemo)((()=>(0,g.fA)(Me,((e,t)=>n=>{const i=!e&&t.values[D.qZ]?t.values[D.qZ]:t.values;L.current=n(e,t,i)}))),[]);(0,h.useImperativeHandle)(t,(()=>({getFormInstance:()=>C})));const O=(0,h.useCallback)((async()=>{_.customEditors.get(a)?w((()=>{var e;return null===(e=_.customEditors.get(a))||void 0===e?void 0:e(p())})):(await _.__secret_internals.loadEditors([a],o),Oe=()=>{var e;return null===(e=_.customEditors.get(a))||void 0===e?void 0:e(p())},w(Oe))}),[a,o]),S=(0,h.useCallback)(((e,t)=>{if(t){const t=W().omit(e,[D.qZ]);return{[D.qZ]:W().isEmpty(t)?"":t}}return e[D.qZ]??e}),[]);return(0,h.useEffect)((()=>{O()}),[O]),(0,h.useEffect)((()=>{E&&C.setInitialValues(i,"overwrite")}),[E,C]),(0,h.useEffect)((()=>{M.current=!0,L.current=null,C.notify(Me,n),C.query(D.N4).take((e=>{e.display=n?"hidden":"visible"})),C.query(D.qZ).take((e=>{e.display=n?"visible":"hidden"}));const e=C.getState().values,t=S(L.current??e,n);C.setValues(t,"overwrite"),M.current=!1}),[n,C,S,E]),(0,h.useEffect)((()=>{C.addEffects("onValueChange",(()=>{(0,g.A$)((e=>{M.current||d(e.values)}))}))}),[C,d]),E?p().createElement("div",{className:"property-form-wrapper"},p().createElement(b.Ay,{prefixCls:"antdV5",theme:{algorithm:"dark-v2"===x?f.A.darkAlgorithm:f.A.defaultAlgorithm,components:{InputNumber:{handleVisible:!0}}},getPopupContainer:e=>e},p().createElement(A.N7,{cache:N},p().createElement(v.Op,{form:C},p().createElement(E,{advancedMode:n,SchemaFieldComponent:Te,form:C,scope:{dataList:r,advancedMode:n,childSlots:l,extraLibs:s,links:c,tokenClick:e=>u(e.detail),triggerAction:m},effects:{onFieldInit:g.yd,onFieldValueChange:g.$l,onFieldInitialValueChange:g.J4,onFormInitialValuesChange:g.oJ,onFormValidateSuccess:g.zu,onFormValuesChange:g.A$,onSubmit:y,onAdvancedChange:T},formilySchemaFormatter:D.cV}))))):null}i=Qe,({e:[F,U,z,V,K,j,H,J,X,q,Y,G,Z,Q,ee,te,ne,ie,ae,re,oe,se,le,ce,de,he,pe,ue,me,ge,ve,be,fe,Ae,ye,ke,$],c:[Se,B]}=(0,d.A)(i,[Ee("visual-builder.property-editor",{shadowOptions:!1,dependencies:["eo-icon-select","vs.code-editor","eo-tooltip"]})],[[we(),1,"editorName"],[we({attribute:!1}),1,"values"],[we({type:Boolean}),1,"advancedMode"],[we({attribute:!1}),1,"dataList"],[we({attribute:!1}),1,"editorPackages"],[we({attribute:!1}),1,"links"],[we({attribute:!1}),1,"extraLibs"],[we({attribute:!1}),1,"childSlots"],[Ne({type:"validate.success"}),1,"successEvent",e=>(0,c.A)(Ue,e),(e,t)=>(0,l.A)(Ue,e,t)],[Ne({type:"validate.error"}),1,"errorEvent",e=>(0,c.A)(Ve,e),(e,t)=>(0,l.A)(Ve,e,t)],[xe(),2,"validate"],[Ne({type:"values.change"}),1,"valuesChangeEvent",e=>(0,c.A)(Ke,e),(e,t)=>(0,l.A)(Ke,e,t)],[Ne({type:"token.click"}),1,"tokenClick",e=>(0,c.A)(He,e),(e,t)=>(0,l.A)(He,e,t)],[Ne({type:"trigger.action"}),1,"triggerActionEvent",e=>(0,c.A)(Ye,e),(e,t)=>(0,l.A)(Ye,e,t)]],0,(e=>Ze.has((0,o.A)(e))),m.ReactNextElement)),B()},607:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,':root{--vb-workbench-action-list-background:#f8f8f8}html[data-theme="dark"],\nhtml[data-theme="dark-v2"]{--vb-workbench-action-list-background:#323237}',""]);const s=o},2984:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,':root{--vb-workbench-action-color:#616161;--vb-workbench-action-active-color:#1f1f1f;--vb-workbench-action-active-border-color:#005fb8}html[data-theme="dark"],\nhtml[data-theme="dark-v2"]{--vb-workbench-action-color:rgba(255,255,255,0.4);--vb-workbench-action-active-color:#fff;--vb-workbench-action-active-border-color:#fff}',""]);const s=o},7236:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r),s=n(6131),l=o()(a());l.i(s.A),l.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.message{display:flex;gap:8px}.main{flex:1;min-width:0}.label{font-weight:bold;line-height:28px}.message:not(:last-child){margin-bottom:2em}.invisible-dots{opacity:0}.failed .content{color:var(--color-error)}.command:not(:first-child){margin-top:1em}.command:not(:last-child){margin-bottom:1em}pre{white-space:pre-wrap;background-color:var(--palette-gray-3);border-radius:6px;padding:1em}.markdown > :first-child{margin-top:0}.markdown > :last-child{margin-bottom:0}.avatar{align-self:flex-start;display:flex;align-items:center;justify-content:center}.texting::after{content:" ";animation:texting 2s infinite;white-space:pre}@keyframes texting{0%{content:" "}25%{content:". "}50%{content:".. "}75%{content:"..."}100%{content:" "}}pre[class*="language-"]{overflow:visible}pre[class*="language-"],\ncode[class*="language-"]{white-space:pre-wrap}eo-avatar.role-assistant::part(avatar-icon){background-color:var(--palette-blue-5)}.content{word-wrap:break-word}.plain{white-space:pre-wrap}',""]);const c=l.toString()},1563:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative;box-shadow:rgba(204,204,204,0.2) 0px 0px 0px 1px}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}.outline{position:absolute;border-style:solid;border-width:2px;border-radius:0 4px 4px;pointer-events:none}.label{position:absolute;left:-2px;top:-20px;height:18px;line-height:16px;padding:2px 5px 0;font-size:12px;border-radius:4px 4px 0 0;white-space:nowrap}.outline.hover{border-color:rgba(var(--palette-blue-6-channel),0.3)}.outline.hover .label{background:rgba(var(--palette-blue-6-channel),0.3)}.outline.active{border-color:var(--palette-blue-6)}.outline.active .label{background:var(--palette-blue-6)}.container:not(.inspecting) .outline{display:none}",""]);const s=o.toString()},6213:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.contract-wrapper{display:flex;gap:4px}.contract-selector{flex:1}.version-selector{width:100px}.options-tips{padding:0px 10px;font-weight:400;color:#999;white-space:nowrap;font-style:italic}",""]);const s=o.toString()},7540:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.mask,\n.container{display:none;position:fixed;z-index:1}.mask{top:0;bottom:0;left:0;right:0;z-index:1}:host([active]) .mask,\n:host([active]) .container{display:block}.container{background:var(--antd-dropdown-menu-bg);border-radius:var(--medius-border-radius);padding:5px}.container .title{padding:5px 12px;cursor:default;color:var(--color-secondary-text);border-bottom:1px solid var(--color-text-divider-line)}.container eo-menu{border:none;padding:5px 0}.container eo-menu eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.container eo-menu eo-menu-item[disabled]::part(menu-item){cursor:not-allowed}.container eo-menu eo-menu-item::part(menu-item){cursor:grab;padding:5px 12px;border-radius:var(--medius-border-radius);min-width:max-content}.container eo-menu eo-menu-item.dragging{opacity:0.5}.container eo-menu eo-tooltip{display:block}",""]);const s=o.toString()},2381:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{--local-node-outline-style:solid;display:block}:host([hidden]){display:none}:host([not-synced]){--local-node-outline-style:dashed}*{box-sizing:border-box}.node{width:168px;max-width:none;height:130px;position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.node.board{height:70px;max-width:168px;width:-moz-fit-content;width:fit-content;padding-bottom:4px}.label,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:18px;font-size:var(--sub-title-font-size-small);color:var(--color-header-text);font-weight:var(--font-weight-500);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.node.editing-label .label{height:0}.node:not(.editing-label) .label-input{display:none}.add-button,\n.icon-container,\n.thumbnail-container,\n.thumbnail-placeholder{display:flex;align-items:center;justify-content:center}.thumbnail-container{height:98px;outline:1px var(--local-node-outline-style) var(--palette-gray-4);opacity:1;border:4px solid transparent;border-radius:4px;width:100%;position:relative;flex-direction:column}.thumbnail-placeholder{color:var(--palette-gray-5);font-size:36px;flex:1}.icon-container{font-size:20px;background-color:var(--palette-teal-6);color:var(--palette-gray-4);width:36px;height:36px;border-radius:50%;outline-offset:4px}:host([active]) .thumbnail-container,\n:host([active]) .icon-container{outline:2px var(--local-node-outline-style) var(--palette-blue-3)}:host(:not([active])) .node:hover .thumbnail-container,\n:host(:not([active])) .node:hover .icon-container{outline:1px var(--local-node-outline-style) var(--palette-blue-3)}.add-button{position:absolute;bottom:-26px;left:calc(50% - 12px);width:24px;height:24px;background:var(--palette-gray-3);color:var(--palette-gray-6);border-radius:50%;cursor:pointer}:host([not-synced]) .add-button,\n:host([disable-child-append]) .add-button,\n:host(:not([active])) .add-button{display:none}.add-button:hover{background:var(--palette-blue-5);color:var(--palette-gray-2)}.external{position:absolute;top:4px;left:4px;padding:0 10px;display:flex;align-items:center;gap:6px;background:var(--palette-purple-4);font-size:12px;line-height:20px;height:22px;cursor:pointer;color:var(--palette-gray-1);border-radius:9999px;right:4px;max-width:-moz-fit-content;max-width:fit-content}.external-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.external:hover{background:var(--palette-purple-5)}.sub-nodes{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%}.sub-node{background-color:var(--palette-gray-2);border-radius:4px;padding:6px;display:flex;flex-direction:column;justify-content:space-between;height:32px}.sub-node-skeleton-title{width:18px;height:4px;border-radius:2px;align-self:flex-start;background-color:var(--palette-gray-4)}.sub-node-skeleton-content{width:100%;height:4px;border-radius:2px;background-color:var(--palette-gray-4)}.sub-node-skeleton-button{width:18px;height:4px;border-radius:2px;align-self:flex-end;background-color:var(--palette-blue-3)}.sub-node:hover{background-color:var(--palette-gray-3)}.sub-node:hover .sub-node-skeleton-title,\n.sub-node:hover .sub-node-skeleton-content{background-color:var(--palette-gray-5)}.sub-node:hover .sub-node-skeleton-button{background-color:var(--palette-blue-4)}",""]);const s=o.toString()},4967:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}",""]);const s=o.toString()},8918:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,"body{background-color:transparent}#preview-root{padding:0;height:auto;max-height:100vh;overflow-y:auto;border:1px solid var(--theme-gray-border-color);border-radius:4px;background:var(--body-background)}.head-cell{position:sticky;top:0;z-index:1;font-weight:bold}.head-cell,\n.body-cell{background:var(--body-background)}.last-col-cell{border-right-color:transparent}.last-row-cell{border-bottom-color:transparent}.form-container > ::part(message){display:none}",""]);const s=o.toString()},4014:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=o.toString()},9216:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:grid;width:100%}:host([hidden]){display:none}::slotted(*){padding:4px 8px;border:1px solid var(--theme-gray-border-color);border-left-color:transparent;border-top-color:transparent;min-width:0;word-break:break-word}",""]);const s=o.toString()},4162:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,"body{background-color:transparent}#preview-root{padding:0;height:auto;max-height:100vh;overflow-y:auto;border:1px solid var(--theme-gray-border-color);border-radius:4px;background:var(--body-background)}.head-cell{position:sticky;top:0;z-index:1;font-weight:bold}.head-cell,\n.body-cell{background:var(--body-background)}.body-cell{display:flex;align-items:center}.last-col-cell{border-right-color:transparent}.last-row-cell{border-bottom-color:transparent}.form-container > ::part(message){display:none}.list{display:flex;flex-direction:column;gap:8px}.raw-content{white-space:pre-wrap;color:var(--text-color-secondary)}.tips{color:var(--text-color-secondary);font-weight:normal}",""]);const s=o.toString()},9034:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=o.toString()},9765:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,".custom-scrollbar-container{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.03)}.custom-scrollbar-container::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;position:absolute}.custom-scrollbar-container::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0);border-radius:4px}.custom-scrollbar-container:hover::-webkit-scrollbar-track{background-color:rgba(255,255,255,0.03)}.custom-scrollbar-container:hover::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.15)}",""]);const s=o.toString()},3430:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,".workBenchActionList{display:flex;flex-direction:column;width:min-content;height:100%;background-color:var(--vb-workbench-action-list-background)}",""]);const s=o.toString()},5292:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:var(--vb-workbench-action-color);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:var(--vb-workbench-action-active-border-color)}.action.active::part(link),\n.action::part(link):hover{color:var(--vb-workbench-active-color)}',""]);const s=o.toString()},1361:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}eo-popover::part(popup){width:800px;max-width:60vw;padding:10px;background:var(--color-fill-bg-container-4);border-radius:var(--medius-border-radius);box-shadow:var(--feedback-container-shadow);z-index:1000}.history-title{font-size:var(--title-font-size);font-weight:var(--font-weight-500);color:var(--color-strong-text);margin-bottom:5px}.history-list{max-height:500px;overflow-y:auto}.item-container{padding:10px 0;display:flex;flex-direction:column;gap:5px}.empty{padding:5px 0 10px 0;font-size:14px;color:var(--text-color-secondary);text-align:center}.item-container:not(:last-of-type){border-bottom:1px solid var(--color-border-divider-line)}.item-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.title-left,\n.title-right{display:flex;align-items:center}.title-left{cursor:pointer;overflow:hidden;gap:5px}.topic{font-size:14px;color:var(--text-color-title);font-weight:var(--font-weight-500);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.branch{font-size:14px;color:var(--text-color-secondary)}.rollback{margin-right:5px;font-size:14px;color:var(--text-color-secondary);cursor:pointer}.rollback:hover{color:var(--color-brand)}.item-info{display:flex;align-items:center;gap:5px}.time,\n.operator{font-size:14px;color:var(--text-color-secondary)}.load-more-container{display:block;text-align:center}.end-container{display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;color:var(--color-brand)}.rollback-all{cursor:pointer}",""]);const s=o.toString()},7180:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,':host{display:block;--pane-color:#595959}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--pane-color:#ccc}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.pane{display:flex;flex-direction:column;color:var(--pane-color);height:100%}.pane-header{display:flex;align-items:center;cursor:pointer;border-top:1px solid transparent;position:relative}.pane-header:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#007fd4}:host(:not(:first-child)) .pane-header{border-top-color:rgba(204,204,204,0.2)}.pane-scroll-shadow{display:none;position:absolute;bottom:-3px;left:0;right:0;height:3px;box-shadow:#000000 0 6px 6px -6px inset;z-index:1}.scrolled .pane-scroll-shadow{display:block}.pane-title{display:flex;align-items:center;font-size:13px;line-height:24px;height:25px;min-width:0;flex:1}.title-icon{display:flex;justify-content:center;align-items:center;width:24px;padding-right:2px;line-height:1;flex-shrink:0}.title-label{text-transform:uppercase;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-body{flex-grow:1;min-height:0;display:none;overflow:hidden;overflow-y:auto;overflow-y:overlay}:host([active]) .pane-body{display:initial}:host(:not(:hover)) ::slotted([slot="actions"]){display:none}.badge{background-color:rgb(77,77,77);color:rgb(255,255,255);border-radius:11px;height:18px;padding:3px 6px;line-height:13px;margin:0 3px;font-size:12px}',""]);const s=o.toString()},2150:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r)()(a());o.push([e.id,':host{--sidebar-background:#fff;--title-container-background:#fff;--title-container-color:#595959;display:block;outline-color:rgba(83,89,93,0.5);background-color:var(--sidebar-background);height:100%}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--sidebar-background:#181818;--title-container-background:#181818;--title-container-color:rgb(187,187,187);background-color:var(--sidebar-background)}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.sidebar{display:flex;flex-direction:column;height:100%}.title-container{display:flex;padding:0 8px 8px 8px;color:var(--title-container-color);background:var(--title-container-background)}.title-label{font-weight:300;line-height:44px;padding-left:12px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-container{flex-grow:1;min-height:0;display:flex;flex-direction:column}::slotted([slot="panes"]){transition:flex 0.2s;min-height:25px}',""]);const s=o.toString()},6131:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(6758),a=n.n(i),r=n(935),o=n.n(r),s=n(7745),l=o()(a());l.i(s.A),l.push([e.id,"",""]);const c=l.toString()},264:(e,t,n)=>{function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function a(e){return e&&e.sensitive?"":"i"}function r(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,s=n.start,l=void 0===s||s,c=n.end,d=void 0===c||c,h=n.encode,p=void 0===h?function(e){return e}:h,u=n.delimiter,m=void 0===u?"/#?":u,g=n.endsWith,v="[".concat(i(void 0===g?"":g),"]|$"),b="[".concat(i(m),"]"),f=l?"^":"",A=0,y=e;A<y.length;A++){var k=y[A];if("string"==typeof k)f+=i(p(k));else{var E=i(p(k.prefix)),w=i(p(k.suffix));if(k.pattern)if(t&&t.push(k),E||w)if("+"===k.modifier||"*"===k.modifier){var x="*"===k.modifier?"?":"";f+="(?:".concat(E,"((?:").concat(k.pattern,")(?:").concat(w).concat(E,"(?:").concat(k.pattern,"))*)").concat(w,")").concat(x)}else f+="(?:".concat(E,"(").concat(k.pattern,")").concat(w,")").concat(k.modifier);else"+"===k.modifier||"*"===k.modifier?f+="((?:".concat(k.pattern,")").concat(k.modifier,")"):f+="(".concat(k.pattern,")").concat(k.modifier);else f+="(?:".concat(E).concat(w,")").concat(k.modifier)}}if(d)o||(f+="".concat(b,"?")),f+=n.endsWith?"(?=".concat(v,")"):"$";else{var N=e[e.length-1],C="string"==typeof N?b.indexOf(N[N.length-1])>-1:void 0===N;o||(f+="(?:".concat(b,"(?=").concat(v,"))?")),C||(f+="(?=".concat(b,"|").concat(v,")"))}return new RegExp(f,a(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var i=e[n];if("*"!==i&&"+"!==i&&"?"!==i)if("\\"!==i)if("{"!==i)if("}"!==i)if(":"!==i)if("("!==i)t.push({type:"CHAR",index:n,value:e[n++]});else{var a=1,r="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--a){s++;break}}else if("("===e[s]&&(a++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));r+=e[s++]}else r+=e[s++]+e[s++];if(a)throw new TypeError("Unbalanced pattern at ".concat(n));if(!r)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:r}),n=s}else{for(var o="",s=n+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:o}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),a=t.prefixes,r=void 0===a?"./":a,o="[^".concat(i(t.delimiter||"/#?"),"]+?"),s=[],l=0,c=0,d="",h=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},p=function(e){var t=h(e);if(void 0!==t)return t;var i=n[c],a=i.type,r=i.index;throw new TypeError("Unexpected ".concat(a," at ").concat(r,", expected ").concat(e))},u=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var m=h("CHAR"),g=h("NAME"),v=h("PATTERN");if(g||v){var b=m||"";-1===r.indexOf(b)&&(d+=b,b=""),d&&(s.push(d),d=""),s.push({name:g||l++,prefix:b,suffix:"",pattern:v||o,modifier:h("MODIFIER")||""})}else{var f=m||h("ESCAPED_CHAR");if(f)d+=f;else if(d&&(s.push(d),d=""),h("OPEN")){b=u();var A=h("NAME")||"",y=h("PATTERN")||"",k=u();p("CLOSE"),s.push({name:A||(y?l++:""),pattern:A&&!y?o:y,prefix:b,suffix:k,modifier:h("MODIFIER")||""})}else p("END")}}return s}(e,n),t,n)}function o(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,i=0,a=n.exec(e.source);a;)t.push({name:a[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),a=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var i=e.map((function(e){return o(e,t,n).source}));return new RegExp("(?:".concat(i.join("|"),")"),a(n))}(e,t,n):r(e,t,n)}n.d(t,{MM:()=>o})}}]);
3
+ //# sourceMappingURL=5832.77dfa23e.js.map