@next-bricks/visual-builder 1.36.30 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +26 -23
- package/dist/chunks/1304.a8196a2e.js +2 -0
- package/dist/chunks/1304.a8196a2e.js.map +1 -0
- package/dist/chunks/2464.b7163b41.js +2 -0
- package/dist/chunks/2464.b7163b41.js.map +1 -0
- package/dist/chunks/5522.ab1061cc.js +3 -0
- package/dist/chunks/{6297.cc718d3b.js.LICENSE.txt → 5522.ab1061cc.js.LICENSE.txt} +2 -0
- package/dist/chunks/5522.ab1061cc.js.map +1 -0
- package/dist/chunks/6117.7ee90157.js +1 -0
- package/dist/chunks/get-config-by-data-for-ai.3ce1ddd1.js +3 -0
- package/dist/chunks/get-config-by-data-for-ai.3ce1ddd1.js.LICENSE.txt +1 -0
- package/dist/chunks/get-config-by-data-for-ai.3ce1ddd1.js.map +1 -0
- package/dist/chunks/get-raw-data-system-prompts.e7339ae7.js +2 -0
- package/dist/chunks/get-raw-data-system-prompts.e7339ae7.js.map +1 -0
- package/dist/chunks/main.c8c9b11f.js +2 -0
- package/dist/chunks/main.c8c9b11f.js.map +1 -0
- package/dist/chunks/pre-generated-config-preview.dccb8a89.js +2 -0
- package/dist/chunks/pre-generated-config-preview.dccb8a89.js.map +1 -0
- package/dist/chunks/pre-generated-config.2339bb56.js +2 -0
- package/dist/chunks/pre-generated-config.2339bb56.js.map +1 -0
- package/dist/chunks/pre-generated-container.7a8711cd.js +2 -0
- package/dist/chunks/pre-generated-container.7a8711cd.js.map +1 -0
- package/dist/chunks/raw-data-preview.79a5f278.js +3 -0
- package/dist/chunks/raw-data-preview.79a5f278.js.map +1 -0
- package/dist/examples.json +6 -3
- package/dist/index.c58723df.js +2 -0
- package/dist/index.c58723df.js.map +1 -0
- package/dist/manifest.json +165 -92
- package/dist/types.json +1614 -805
- package/dist-types/bootstrap.d.ts +3 -0
- package/dist-types/data-providers/get-config-by-data-for-ai.d.ts +30 -0
- package/dist-types/data-providers/get-config-by-data-for-ai.spec.d.ts +1 -0
- package/dist-types/pre-generated-config/convertToBrickConf.d.ts +3 -0
- package/dist-types/pre-generated-config/i18n.d.ts +14 -0
- package/dist-types/pre-generated-config/index.d.ts +48 -0
- package/dist-types/pre-generated-config/index.spec.d.ts +1 -0
- package/dist-types/pre-generated-config-preview/index.d.ts +31 -0
- package/dist-types/pre-generated-config-preview/index.spec.d.ts +1 -0
- package/dist-types/raw-data-preview/convert.d.ts +1 -0
- package/dist-types/raw-data-preview/raw-data-interfaces.d.ts +1 -1
- package/dist-types/shared/getMemberAccessor.d.ts +1 -0
- package/dist-types/shared/getMemberAccessor.spec.d.ts +1 -0
- package/docs/pre-generated-config.md +3512 -0
- package/package.json +2 -2
- package/dist/chunks/1525.43329bb3.js +0 -2
- package/dist/chunks/1525.43329bb3.js.map +0 -1
- package/dist/chunks/1722.59f0e4b2.js +0 -1
- package/dist/chunks/6297.cc718d3b.js +0 -3
- package/dist/chunks/6297.cc718d3b.js.map +0 -1
- package/dist/chunks/get-raw-data-system-prompts.e306ead0.js +0 -2
- package/dist/chunks/get-raw-data-system-prompts.e306ead0.js.map +0 -1
- package/dist/chunks/main.f970ebdd.js +0 -2
- package/dist/chunks/main.f970ebdd.js.map +0 -1
- package/dist/chunks/pre-generated-container.a2840dd1.js +0 -2
- package/dist/chunks/pre-generated-container.a2840dd1.js.map +0 -1
- package/dist/chunks/raw-data-preview.39456503.js +0 -3
- package/dist/chunks/raw-data-preview.39456503.js.map +0 -1
- package/dist/index.80eef55c.js +0 -2
- package/dist/index.80eef55c.js.map +0 -1
- /package/dist/chunks/{raw-data-preview.39456503.js.LICENSE.txt → raw-data-preview.79a5f278.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bricks/visual-builder",
|
|
3
3
|
"bricks": [
|
|
4
|
+
"visual-builder.workbench-sidebar",
|
|
4
5
|
"visual-builder.workbench-pane",
|
|
5
6
|
"visual-builder.workbench-action",
|
|
6
|
-
"visual-builder.workbench-
|
|
7
|
+
"visual-builder.workbench-action-list",
|
|
7
8
|
"visual-builder.workbench-tree",
|
|
8
|
-
"visual-builder.page-arch-node",
|
|
9
9
|
"visual-builder.workbench-history-action",
|
|
10
|
-
"visual-builder.
|
|
10
|
+
"visual-builder.page-arch-node",
|
|
11
11
|
"visual-builder.contract-select",
|
|
12
|
+
"visual-builder.generate-snippets-context-menu",
|
|
12
13
|
"visual-builder.chat-conversation",
|
|
13
14
|
"visual-builder.chat-preview",
|
|
14
15
|
"visual-builder.batch-update-raw-data-generated-view",
|
|
15
|
-
"visual-builder.pre-generated-preview",
|
|
16
16
|
"visual-builder.check-editor-by-name",
|
|
17
|
+
"visual-builder.get-config-by-data-for-ai",
|
|
17
18
|
"visual-builder.get-data-deps",
|
|
18
19
|
"visual-builder.get-dependency-tree",
|
|
19
20
|
"visual-builder.get-raw-data-system-prompts",
|
|
20
21
|
"visual-builder.inject-chat-preview-agent",
|
|
21
22
|
"visual-builder.parse-path",
|
|
22
|
-
"visual-builder.pre-generated-
|
|
23
|
+
"visual-builder.pre-generated-preview",
|
|
23
24
|
"visual-builder.pre-generated-table-view",
|
|
25
|
+
"visual-builder.pre-generated-container",
|
|
24
26
|
"visual-builder.property-editor",
|
|
25
|
-
"visual-builder.
|
|
26
|
-
"visual-builder.
|
|
27
|
+
"visual-builder.raw-data-preview",
|
|
28
|
+
"visual-builder.pre-generated-config-preview",
|
|
29
|
+
"visual-builder.pre-generated-config"
|
|
27
30
|
],
|
|
28
31
|
"elements": [],
|
|
29
32
|
"processors": [],
|
|
@@ -37,14 +40,16 @@
|
|
|
37
40
|
"eo-icon",
|
|
38
41
|
"eo-tooltip"
|
|
39
42
|
],
|
|
40
|
-
"visual-builder.workbench-
|
|
43
|
+
"visual-builder.workbench-action-list": [
|
|
44
|
+
"visual-builder.workbench-action",
|
|
41
45
|
"eo-link",
|
|
42
|
-
"eo-icon"
|
|
43
|
-
],
|
|
44
|
-
"visual-builder.page-arch-node": [
|
|
45
46
|
"eo-icon",
|
|
46
47
|
"eo-tooltip"
|
|
47
48
|
],
|
|
49
|
+
"visual-builder.workbench-tree": [
|
|
50
|
+
"eo-link",
|
|
51
|
+
"eo-icon"
|
|
52
|
+
],
|
|
48
53
|
"visual-builder.workbench-history-action": [
|
|
49
54
|
"eo-button",
|
|
50
55
|
"eo-link",
|
|
@@ -52,11 +57,9 @@
|
|
|
52
57
|
"eo-easyops-avatar",
|
|
53
58
|
"eo-popover"
|
|
54
59
|
],
|
|
55
|
-
"visual-builder.
|
|
56
|
-
"eo-
|
|
57
|
-
"eo-
|
|
58
|
-
"eo-tooltip",
|
|
59
|
-
"basic.lock-body-scroll"
|
|
60
|
+
"visual-builder.page-arch-node": [
|
|
61
|
+
"eo-icon",
|
|
62
|
+
"eo-tooltip"
|
|
60
63
|
],
|
|
61
64
|
"visual-builder.contract-select": [
|
|
62
65
|
"eo-form-item",
|
|
@@ -64,6 +67,12 @@
|
|
|
64
67
|
"eo-icon",
|
|
65
68
|
"eo-input"
|
|
66
69
|
],
|
|
70
|
+
"visual-builder.generate-snippets-context-menu": [
|
|
71
|
+
"eo-menu",
|
|
72
|
+
"eo-menu-item",
|
|
73
|
+
"eo-tooltip",
|
|
74
|
+
"basic.lock-body-scroll"
|
|
75
|
+
],
|
|
67
76
|
"visual-builder.chat-conversation": [
|
|
68
77
|
"eo-avatar"
|
|
69
78
|
],
|
|
@@ -71,13 +80,7 @@
|
|
|
71
80
|
"eo-icon-select",
|
|
72
81
|
"vs.code-editor",
|
|
73
82
|
"eo-tooltip"
|
|
74
|
-
],
|
|
75
|
-
"visual-builder.workbench-action-list": [
|
|
76
|
-
"visual-builder.workbench-action",
|
|
77
|
-
"eo-link",
|
|
78
|
-
"eo-icon",
|
|
79
|
-
"eo-tooltip"
|
|
80
83
|
]
|
|
81
84
|
},
|
|
82
|
-
"filePath": "bricks/visual-builder/dist/index.
|
|
85
|
+
"filePath": "bricks/visual-builder/dist/index.c58723df.js"
|
|
83
86
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[1304],{1304:(u,A,F)=>{F.d(A,{m:()=>C,w:()=>B});var D=F(1030),E=F(8027);function B(u,A){return C(u,(0,E._)(A))}function C(u,A){let F;switch(u.display){case"link":case"text":F=t(u,A),"struct-list"!==u.type||u.countOnly?"link"===u.display&&(F={brick:"eo-link",errorBoundary:!0,children:[F]}):F={brick:"eo-tag",errorBoundary:!0,children:[F]};break;case"tag":{var D,E,B,C,n;const e="background"===(null===(D=u.style)||void 0===D?void 0:D.variant)?"-inverse":"",t=r(u,A);F={brick:"eo-tag",errorBoundary:!0,properties:{textContent:`<% ${t} %>`,size:i(null===(E=u.style)||void 0===E?void 0:E.size),color:null!==(B=u.style)&&void 0!==B&&B.background?`${u.style.background}${e}`:null!==(C=u.style)&&void 0!==C&&C.palette?`<%\n \`\${new Map(Object.entries(${JSON.stringify(u.style.palette,null,2).replaceAll("\n","\n ")})).get(${t}) ?? "gray"}${e}\`\n%>`:`gray${e}`,outline:"outline"===(null===(n=u.style)||void 0===n?void 0:n.variant)}};break}case"icon":F=e(u,A);break;case"icon+text":F={brick:"span",errorBoundary:!0,properties:{style:{display:"inline-flex",alignItems:"center",gap:"0.5em"}},children:[e(u,A),t(u,A)]};break;default:return null}if("struct-list"!==u.type||u.countOnly)return F;const o=Number(u.maxItems)||3;return{brick:"span",errorBoundary:!0,properties:{style:{display:"inline-flex",alignItems:"center",gap:"0.5em"}},children:[{brick:":forEach",dataSource:`<% DATA${A}.slice(0, ${o}) %>`,children:[F]},{brick:"eo-link",if:`<% DATA${A}.length > ${o} %>`,properties:{textContent:`<% \`+ \${DATA${A}.length - ${o}}\` %>`}}]}}function e(u,A){if("boolean"===u.type){var F,D,E,B,C,e;const t=r(u,A),i=null!==(F=null===(D=u.true)||void 0===D?void 0:D.icon)&&void 0!==F?F:"check",o=null!==(E=null===(B=u.false)||void 0===B?void 0:B.icon)&&void 0!==E?E:"xmark",l=n(null===(C=u.true)||void 0===C?void 0:C.style),s=n(null===(e=u.false)||void 0===e?void 0:e.style);return{brick:"eo-icon",errorBoundary:!0,properties:{lib:"fa",prefix:"fas",icon:`<% ${t} ? ${JSON.stringify(i)} : ${JSON.stringify(o)} %>`,style:`<% ${t} ? ${JSON.stringify(l)} : ${JSON.stringify(s)} %>`}}}if("json"===u.type){const F=r(u,A);return{brick:"eo-icon",errorBoundary:!0,properties:{lib:`<% ${F}?.lib %>`,prefix:`<% ${F}?.prefix %>`,category:`<% ${F}?.category %>`,theme:`<% ${F}?.theme %>`,icon:`<% ${F}?.icon %>`,style:n(u.style)}}}return{brick:"eo-icon",errorBoundary:!0,properties:{lib:"fa",prefix:"fas",icon:u.icon,style:n(u.style)}}}function t(u,A){var F;if("struct-list"===u.type&&u.countOnly)return{brick:"span",properties:{textContent:`<% \`\${DATA${A}.length}\` %>`}};const E=r(u,A),B=`<% ${E} %>`;switch(null===(F=u.formatter)||void 0===F?void 0:F.type){case"number":return{brick:"eo-formatter-number",errorBoundary:!0,properties:{value:B,type:u.formatter.format,...(0,D.pick)(u.formatter,["currency","originalUnit","decimals","thousandsSeparator"]),style:n(u.style)}};case"date":case"date-time":return{brick:"eo-humanize-time",errorBoundary:!0,properties:{value:B,type:"date"===u.type?"date":void 0,formatter:u.formatter.format,style:n(u.style)}};case"cost-time":return{brick:"eo-humanize-time",errorBoundary:!0,properties:{value:B,isCostTime:!0,style:n(u.style)}};default:{let A,F,D="span";if("boolean"===u.type){var C,e,t,i,o,l;const D=null!==(C=null===(e=u.true)||void 0===e?void 0:e.text)&&void 0!==C?C:"Yes",B=null!==(t=null===(i=u.false)||void 0===i?void 0:i.text)&&void 0!==t?t:"No",r=n(null===(o=u.true)||void 0===o?void 0:o.style),s=n(null===(l=u.false)||void 0===l?void 0:l.style);A=`<% ${E} ? ${JSON.stringify(D)} : ${JSON.stringify(B)} %>`,F=`<% ${E} ? ${JSON.stringify(r)} : ${JSON.stringify(s)} %>`}else F=n(u.style),"json"===u.type?"link"===u.display?A='<% I18N("VIEW", "查看") %>':(D="pre",A=`<% PIPES.jsonStringify(${E}) %>`):A=B;return{brick:D,errorBoundary:!0,properties:{textContent:A,style:F}}}}}function r(u,A){return"struct"!==u.type&&"struct-list"!==u.type||!u.field?`DATA${A}`:`${"struct"===u.type?`DATA${A}`:"ITEM"}${(0,E._)(u.field)}`}function i(u){switch(u){case"large":case"medium":case"small":return u;case"x-large":return"large"}}function n(u){if(!u)return;const A={};switch(u.size){case"small":A.fontSize="var(--sub-title-font-size-small)";break;case"medium":A.fontSize="var(--normal-font-size)";break;case"large":A.fontSize="var(--card-title-font-size)";break;case"x-large":A.fontSize="var(--title-font-size-larger)"}switch(u.fontWeight){case"bold":case"normal":A.fontWeight=u.fontWeight}return u.color&&(A.color=u.color),A}},8027:(u,A,F)=>{F.d(A,{_:()=>E});const D=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10140}-\u{10174}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{1031F}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10860}-\u{10876}\u{10880}-\u{1089E}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{10900}-\u{10915}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BE}\u{109BF}\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A60}-\u{10A7C}\u{10A80}-\u{10A9C}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B60}-\u{10B72}\u{10B80}-\u{10B91}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10D00}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F1C}\u{10F27}\u{10F30}-\u{10F45}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FC4}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{11103}-\u{11126}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111DA}\u{111DC}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11680}-\u{116AA}\u{116B8}\u{11700}-\u{1171A}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118DF}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11FB0}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A70}-\u{16ABE}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16E40}-\u{16E7F}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E4D0}-\u{1E4EB}\u{1E5D0}-\u{1E5ED}\u{1E5F0}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E900}-\u{1E943}\u{1E94B}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}][\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0897-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF65-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10140}-\u{10174}\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}\u{10300}-\u{1031F}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10860}-\u{10876}\u{10880}-\u{1089E}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{10900}-\u{10915}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BE}\u{109BF}\u{10A00}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}\u{10A60}-\u{10A7C}\u{10A80}-\u{10A9C}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B60}-\u{10B72}\u{10B80}-\u{10B91}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10D00}-\u{10D27}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D69}-\u{10D6D}\u{10D6F}-\u{10D85}\u{10E80}-\u{10EA9}\u{10EAB}\u{10EAC}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10EFC}-\u{10F1C}\u{10F27}\u{10F30}-\u{10F50}\u{10F70}-\u{10F85}\u{10FB0}-\u{10FC4}\u{10FE0}-\u{10FF6}\u{11000}-\u{11046}\u{11066}-\u{11075}\u{1107F}-\u{110BA}\u{110C2}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{1113F}\u{11144}-\u{11147}\u{11150}-\u{11173}\u{11176}\u{11180}-\u{111C4}\u{111C9}-\u{111CC}\u{111CE}-\u{111DA}\u{111DC}\u{11200}-\u{11211}\u{11213}-\u{11237}\u{1123E}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D3}\u{113E1}\u{113E2}\u{11400}-\u{1144A}\u{11450}-\u{11459}\u{1145E}-\u{11461}\u{11480}-\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115C0}\u{115D8}-\u{115DD}\u{11600}-\u{11640}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116B8}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11739}\u{11740}-\u{11746}\u{11800}-\u{1183A}\u{118A0}-\u{118E9}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11943}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E1}\u{119E3}\u{119E4}\u{11A00}-\u{11A3E}\u{11A47}\u{11A50}-\u{11A99}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C40}\u{11C50}-\u{11C59}\u{11C72}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF6}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F42}\u{11F50}-\u{11F5A}\u{11FB0}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13440}-\u{13455}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF4}\u{16B00}-\u{16B36}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16D70}-\u{16D79}\u{16E40}-\u{16E7F}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9D}\u{1BC9E}\u{1CCF0}-\u{1CCF9}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E4D0}-\u{1E4F9}\u{1E5D0}-\u{1E5FA}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8D0}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0100}-\u{E01EF}]*$/u;function E(u){const A=String(u);return D.test(A)?`.${A}`:`[${JSON.stringify(A)}]`}}}]);
|
|
2
|
+
//# sourceMappingURL=1304.a8196a2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/1304.a8196a2e.js","mappings":"uMAMO,SAASA,EACdC,EACAC,GAEA,OAAOC,EAA4BF,GAAQG,EAAAA,EAAAA,GAAkBF,GAC/D,CAEO,SAASC,EACdF,EACAI,GAEA,IAAIC,EAEJ,OAAQL,EAAOM,SACb,IAAK,OACL,IAAK,OACHD,EAAYE,EAAcP,EAAQI,GACd,gBAAhBJ,EAAOQ,MAA2BR,EAAOS,UAMf,SAAnBT,EAAOM,UAChBD,EAAY,CACVK,MAAO,UACPC,eAAe,EACfC,SAAU,CAACP,KATbA,EAAY,CACVK,MAAO,SACPC,eAAe,EACfC,SAAU,CAACP,IASf,MAEF,IAAK,MAAO,KAAAQ,EAAAC,EAAAC,EAAAC,EAAAC,EACV,MAAMC,EACsB,gBAAd,QAAZL,EAAAb,EAAOmB,aAAK,IAAAN,OAAA,EAAZA,EAAcO,SAA2B,WAAa,GAClDC,EAAgBC,EAAiBtB,EAAQI,GAC/CC,EAAY,CACVK,MAAO,SACPC,eAAe,EACfY,WAAY,CACVC,YAAa,MAAMH,OACnBI,KAAMC,EAAuB,QAAbZ,EAACd,EAAOmB,aAAK,IAAAL,OAAA,EAAZA,EAAcW,MAC/BE,MAAmB,QAAZZ,EAAAf,EAAOmB,aAAK,IAAAJ,GAAZA,EAAca,WACjB,GAAG5B,EAAOmB,MAAMS,aAAaV,IACjB,QAAZF,EAAAhB,EAAOmB,aAAK,IAAAH,GAAZA,EAAca,QACZ,qCACgBC,KAAKC,UACjC/B,EAAOmB,MAAMU,QACb,KACA,GACAG,WAAW,KAAM,iBAAiBX,gBAA4BH,UAElD,OAAOA,IACbe,QAAmC,aAAd,QAAZhB,EAAAjB,EAAOmB,aAAK,IAAAF,OAAA,EAAZA,EAAcG,WAG3B,KACF,CACA,IAAK,OACHf,EAAY6B,EAAalC,EAAQI,GACjC,MAEF,IAAK,YAGHC,EAAY,CACVK,MAAO,OACPC,eAAe,EACfY,WAAY,CACVJ,MAAO,CACLb,QAAS,cACT6B,WAAY,SACZC,IAAK,UAGTxB,SAAU,CAZMsB,EAAalC,EAAQI,GACrBG,EAAcP,EAAQI,KAaxC,MAEF,QACE,OAAO,KAGX,GAAoB,gBAAhBJ,EAAOQ,MAA0BR,EAAOS,UAC1C,OAAOJ,EAGT,MAAMgC,EAAWC,OAAOtC,EAAOqC,WAAa,EAC5C,MAAO,CACL3B,MAAO,OACPC,eAAe,EACfY,WAAY,CACVJ,MAAO,CACLb,QAAS,cACT6B,WAAY,SACZC,IAAK,UAGTxB,SAAU,CACR,CACEF,MAAO,WACP6B,WAAY,UAAUnC,cAAyBiC,QAC/CzB,SAAU,CAACP,IAEb,CACEK,MAAO,UACP8B,GAAI,UAAUpC,cAAyBiC,OACvCd,WAAY,CACVC,YAAa,iBAAiBpB,cAAyBiC,aAKjE,CAEA,SAASH,EAAalC,EAAsBI,GAC1C,GAAoB,YAAhBJ,EAAOQ,KAAoB,KAAAiC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAC7B,MAAMzB,EAAgBC,EAAiBtB,EAAQI,GACzC2C,EAA4B,QAApBN,EAAc,QAAdC,EAAG1C,EAAOgD,YAAI,IAAAN,OAAA,EAAXA,EAAaO,YAAI,IAAAR,EAAAA,EAAI,QAChCS,EAA8B,QAArBP,EAAe,QAAfC,EAAG5C,EAAOmD,aAAK,IAAAP,OAAA,EAAZA,EAAcK,YAAI,IAAAN,EAAAA,EAAI,QAClCS,EAAYC,EAAyB,QAAZR,EAAC7C,EAAOgD,YAAI,IAAAH,OAAA,EAAXA,EAAa1B,OACvCmC,EAAaD,EAA0B,QAAbP,EAAC9C,EAAOmD,aAAK,IAAAL,OAAA,EAAZA,EAAc3B,OAC/C,MAAO,CACLT,MAAO,UACPC,eAAe,EACfY,WAAY,CACVgC,IAAK,KACLC,OAAQ,MACRP,KAAM,MAAM5B,OAAmBS,KAAKC,UAAUgB,QAAejB,KAAKC,UAAUmB,QAC5E/B,MAAO,MAAME,OAAmBS,KAAKC,UAAUqB,QAAgBtB,KAAKC,UAAUuB,SAGpF,CAEA,GAAoB,SAAhBtD,EAAOQ,KAAiB,CAC1B,MAAMa,EAAgBC,EAAiBtB,EAAQI,GAC/C,MAAO,CACLM,MAAO,UACPC,eAAe,EACfY,WAAY,CACVgC,IAAK,MAAMlC,YACXmC,OAAQ,MAAMnC,eACdoC,SAAU,MAAMpC,iBAChBqC,MAAO,MAAMrC,cACb4B,KAAM,MAAM5B,aACZF,MAAOkC,EAAcrD,EAAOmB,QAGlC,CAEA,MAAO,CACLT,MAAO,UACPC,eAAe,EACfY,WAAY,CACVgC,IAAK,KACLC,OAAQ,MACRP,KAAMjD,EAAOiD,KACb9B,MAAOkC,EAAcrD,EAAOmB,QAGlC,CAEA,SAASZ,EAAcP,EAAsBI,GAAiC,IAAAuD,EAC5E,GAAoB,gBAAhB3D,EAAOQ,MAA0BR,EAAOS,UAC1C,MAAO,CACLC,MAAO,OACPa,WAAY,CACVC,YAAa,eAAepB,mBAKlC,MAAMiB,EAAgBC,EAAiBtB,EAAQI,GACzCwD,EAAQ,MAAMvC,OACpB,OAAwB,QAAxBsC,EAAQ3D,EAAO6D,iBAAS,IAAAF,OAAA,EAAhBA,EAAkBnD,MACxB,IAAK,SACH,MAAO,CACLE,MAAO,sBACPC,eAAe,EACfY,WAAY,CACVqC,QACApD,KAAMR,EAAO6D,UAAUC,WACpBC,EAAAA,EAAAA,MAAK/D,EAAO6D,UAAW,CACxB,WAEA,eACA,WACA,uBAEF1C,MAAOkC,EAAcrD,EAAOmB,SAGlC,IAAK,OACL,IAAK,YACH,MAAO,CACLT,MAAO,mBACPC,eAAe,EACfY,WAAY,CACVqC,QACApD,KAAsB,SAAhBR,EAAOQ,KAAkB,YAASwD,EACxCH,UAAW7D,EAAO6D,UAAUC,OAC5B3C,MAAOkC,EAAcrD,EAAOmB,SAGlC,IAAK,YACH,MAAO,CACLT,MAAO,mBACPC,eAAe,EACfY,WAAY,CACVqC,QACAK,YAAY,EACZ9C,MAAOkC,EAAcrD,EAAOmB,SAGlC,QAAS,CACP,IAAIK,EACAL,EACA+C,EAAM,OACV,GAAoB,YAAhBlE,EAAOQ,KAAoB,KAAA2D,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAC7B,MAAMC,EAA+B,QAApBN,EAAc,QAAdC,EAAGpE,EAAOgD,YAAI,IAAAoB,OAAA,EAAXA,EAAaM,YAAI,IAAAP,EAAAA,EAAI,MACnCQ,EAAiC,QAArBN,EAAe,QAAfC,EAAGtE,EAAOmD,aAAK,IAAAmB,OAAA,EAAZA,EAAcI,YAAI,IAAAL,EAAAA,EAAI,KACrCjB,EAAYC,EAAyB,QAAZkB,EAACvE,EAAOgD,YAAI,IAAAuB,OAAA,EAAXA,EAAapD,OACvCmC,EAAaD,EAA0B,QAAbmB,EAACxE,EAAOmD,aAAK,IAAAqB,OAAA,EAAZA,EAAcrD,OAC/CK,EAAc,MAAMH,OAAmBS,KAAKC,UAAU0C,QAAkB3C,KAAKC,UAAU4C,QACvFxD,EAAQ,MAAME,OAAmBS,KAAKC,UAAUqB,QAAgBtB,KAAKC,UAAUuB,OACjF,MACEnC,EAAQkC,EAAcrD,EAAOmB,OACT,SAAhBnB,EAAOQ,KACc,SAAnBR,EAAOM,QACTkB,EAAc,4BAEd0C,EAAM,MACN1C,EAAc,0BAA0BH,SAG1CG,EAAcoC,EAGlB,MAAO,CACLlD,MAAOwD,EACPvD,eAAe,EACfY,WAAY,CACVC,cACAL,SAGN,EAEJ,CAEA,SAASG,EAAiBtB,EAAsBI,GAC9C,MACmB,WAAhBJ,EAAOQ,MAAqC,gBAAhBR,EAAOQ,OACpCR,EAAO4E,MAIF,OAAOxE,IAFL,GAAmB,WAAhBJ,EAAOQ,KAAoB,OAAOJ,IAAiB,UAASD,EAAAA,EAAAA,GAAkBH,EAAO4E,QAGnG,CAEA,SAASlD,EAAWD,GAClB,OAAQA,GACN,IAAK,QACL,IAAK,SACL,IAAK,QACH,OAAOA,EACT,IAAK,UACH,MAAO,QAIb,CAEA,SAAS4B,EACPwB,GAEA,IAAKA,EACH,OAEF,MAAM1D,EAAuB,CAAC,EAC9B,OAAQ0D,EAAYpD,MAElB,IAAK,QACHN,EAAM2D,SAAW,mCACjB,MACF,IAAK,SACH3D,EAAM2D,SAAW,0BACjB,MACF,IAAK,QACH3D,EAAM2D,SAAW,8BACjB,MACF,IAAK,UACH3D,EAAM2D,SAAW,gCAGrB,OAAQD,EAAYE,YAClB,IAAK,OACL,IAAK,SACH5D,EAAM4D,WAAaF,EAAYE,WAKnC,OAHIF,EAAYlD,QACdR,EAAMQ,MAAQkD,EAAYlD,OAErBR,CACT,C,kCCtTA,MAAM6D,EAAuB,yxoBAEtB,SAAS7E,EAAkB8E,GAChC,MAAMC,EAAcC,OAAOF,GAC3B,OAAOD,EAAqBI,KAAKF,GAC7B,IAAIA,IACJ,IAAIpD,KAAKC,UAAUmD,KACzB,C","sources":["webpack:///./src/raw-data-preview/convert.ts","webpack:///./src/shared/getMemberAccessor.ts"],"sourcesContent":["import type { BrickConf } from \"@next-core/types\";\nimport { pick } from \"lodash\";\nimport type { CSSProperties } from \"react\";\nimport type { VisualConfig, VisualStyle } from \"./raw-data-interfaces\";\nimport { getMemberAccessor } from \"../shared/getMemberAccessor\";\n\nexport function convertToStoryboard(\n config: VisualConfig,\n attr: string\n): BrickConf | null {\n return lowLevelConvertToStoryboard(config, getMemberAccessor(attr));\n}\n\nexport function lowLevelConvertToStoryboard(\n config: VisualConfig,\n attrAccessor: string\n): BrickConf | null {\n let brickItem: BrickConf;\n\n switch (config.display) {\n case \"link\":\n case \"text\": {\n brickItem = getPlainBrick(config, attrAccessor);\n if (config.type === \"struct-list\" && !config.countOnly) {\n brickItem = {\n brick: \"eo-tag\",\n errorBoundary: true,\n children: [brickItem],\n };\n } else if (config.display === \"link\") {\n brickItem = {\n brick: \"eo-link\",\n errorBoundary: true,\n children: [brickItem],\n };\n }\n break;\n }\n case \"tag\": {\n const colorSuffix =\n config.style?.variant === \"background\" ? \"-inverse\" : \"\";\n const valueAccessor = getValueAccessor(config, attrAccessor);\n brickItem = {\n brick: \"eo-tag\",\n errorBoundary: true,\n properties: {\n textContent: `<% ${valueAccessor} %>`,\n size: getTagSize(config.style?.size),\n color: config.style?.background\n ? `${config.style.background}${colorSuffix}`\n : config.style?.palette\n ? `<%\n \\`\\${new Map(Object.entries(${JSON.stringify(\n config.style.palette,\n null,\n 2\n ).replaceAll(\"\\n\", \"\\n \")})).get(${valueAccessor}) ?? \"gray\"}${colorSuffix}\\`\n%>`\n : `gray${colorSuffix}`,\n outline: config.style?.variant === \"outline\",\n },\n };\n break;\n }\n case \"icon\": {\n brickItem = getIconBrick(config, attrAccessor);\n break;\n }\n case \"icon+text\": {\n const iconBrick = getIconBrick(config, attrAccessor);\n const textBrick = getPlainBrick(config, attrAccessor);\n brickItem = {\n brick: \"span\",\n errorBoundary: true,\n properties: {\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"0.5em\",\n },\n },\n children: [iconBrick, textBrick],\n };\n break;\n }\n default:\n return null;\n }\n\n if (config.type !== \"struct-list\" || config.countOnly) {\n return brickItem;\n }\n\n const maxItems = Number(config.maxItems) || 3;\n return {\n brick: \"span\",\n errorBoundary: true,\n properties: {\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"0.5em\",\n },\n },\n children: [\n {\n brick: \":forEach\",\n dataSource: `<% DATA${attrAccessor}.slice(0, ${maxItems}) %>`,\n children: [brickItem],\n },\n {\n brick: \"eo-link\",\n if: `<% DATA${attrAccessor}.length > ${maxItems} %>`,\n properties: {\n textContent: `<% \\`+ \\${DATA${attrAccessor}.length - ${maxItems}}\\` %>`,\n },\n },\n ],\n };\n}\n\nfunction getIconBrick(config: VisualConfig, attrAccessor: string): BrickConf {\n if (config.type === \"boolean\") {\n const valueAccessor = getValueAccessor(config, attrAccessor);\n const trueIcon = config.true?.icon ?? \"check\";\n const falseIcon = config.false?.icon ?? \"xmark\";\n const trueStyle = getPlainStyle(config.true?.style);\n const falseStyle = getPlainStyle(config.false?.style);\n return {\n brick: \"eo-icon\",\n errorBoundary: true,\n properties: {\n lib: \"fa\",\n prefix: \"fas\",\n icon: `<% ${valueAccessor} ? ${JSON.stringify(trueIcon)} : ${JSON.stringify(falseIcon)} %>`,\n style: `<% ${valueAccessor} ? ${JSON.stringify(trueStyle)} : ${JSON.stringify(falseStyle)} %>`,\n },\n };\n }\n\n if (config.type === \"json\") {\n const valueAccessor = getValueAccessor(config, attrAccessor);\n return {\n brick: \"eo-icon\",\n errorBoundary: true,\n properties: {\n lib: `<% ${valueAccessor}?.lib %>`,\n prefix: `<% ${valueAccessor}?.prefix %>`,\n category: `<% ${valueAccessor}?.category %>`,\n theme: `<% ${valueAccessor}?.theme %>`,\n icon: `<% ${valueAccessor}?.icon %>`,\n style: getPlainStyle(config.style),\n },\n };\n }\n\n return {\n brick: \"eo-icon\",\n errorBoundary: true,\n properties: {\n lib: \"fa\",\n prefix: \"fas\",\n icon: config.icon,\n style: getPlainStyle(config.style),\n },\n };\n}\n\nfunction getPlainBrick(config: VisualConfig, attrAccessor: string): BrickConf {\n if (config.type === \"struct-list\" && config.countOnly) {\n return {\n brick: \"span\",\n properties: {\n textContent: `<% \\`\\${DATA${attrAccessor}.length}\\` %>`,\n },\n };\n }\n\n const valueAccessor = getValueAccessor(config, attrAccessor);\n const value = `<% ${valueAccessor} %>`;\n switch (config.formatter?.type) {\n case \"number\":\n return {\n brick: \"eo-formatter-number\",\n errorBoundary: true,\n properties: {\n value,\n type: config.formatter.format,\n ...pick(config.formatter, [\n \"currency\",\n // \"unit\",\n \"originalUnit\",\n \"decimals\",\n \"thousandsSeparator\",\n ]),\n style: getPlainStyle(config.style),\n },\n };\n case \"date\":\n case \"date-time\":\n return {\n brick: \"eo-humanize-time\",\n errorBoundary: true,\n properties: {\n value,\n type: config.type === \"date\" ? \"date\" : undefined,\n formatter: config.formatter.format,\n style: getPlainStyle(config.style),\n },\n };\n case \"cost-time\":\n return {\n brick: \"eo-humanize-time\",\n errorBoundary: true,\n properties: {\n value,\n isCostTime: true,\n style: getPlainStyle(config.style),\n },\n };\n default: {\n let textContent: string | undefined;\n let style: CSSProperties | string | undefined;\n let tag = \"span\";\n if (config.type === \"boolean\") {\n const trueContent = config.true?.text ?? \"Yes\";\n const falseContent = config.false?.text ?? \"No\";\n const trueStyle = getPlainStyle(config.true?.style);\n const falseStyle = getPlainStyle(config.false?.style);\n textContent = `<% ${valueAccessor} ? ${JSON.stringify(trueContent)} : ${JSON.stringify(falseContent)} %>`;\n style = `<% ${valueAccessor} ? ${JSON.stringify(trueStyle)} : ${JSON.stringify(falseStyle)} %>`;\n } else {\n style = getPlainStyle(config.style);\n if (config.type === \"json\") {\n if (config.display === \"link\") {\n textContent = `<% I18N(\"VIEW\", \"查看\") %>`;\n } else {\n tag = \"pre\";\n textContent = `<% PIPES.jsonStringify(${valueAccessor}) %>`;\n }\n } else {\n textContent = value;\n }\n }\n return {\n brick: tag,\n errorBoundary: true,\n properties: {\n textContent,\n style,\n },\n };\n }\n }\n}\n\nfunction getValueAccessor(config: VisualConfig, attrAccessor: string): string {\n if (\n (config.type === \"struct\" || config.type === \"struct-list\") &&\n config.field\n ) {\n return `${config.type === \"struct\" ? `DATA${attrAccessor}` : \"ITEM\"}${getMemberAccessor(config.field)}`;\n }\n return `DATA${attrAccessor}`;\n}\n\nfunction getTagSize(size: VisualStyle[\"size\"]): string | undefined {\n switch (size) {\n case \"large\":\n case \"medium\":\n case \"small\":\n return size;\n case \"x-large\":\n return \"large\";\n // case \"x-small\":\n // return \"xs\";\n }\n}\n\nfunction getPlainStyle(\n configStyle: VisualStyle | undefined\n): CSSProperties | undefined {\n if (!configStyle) {\n return;\n }\n const style: CSSProperties = {};\n switch (configStyle.size) {\n // case \"x-small\":\n case \"small\":\n style.fontSize = \"var(--sub-title-font-size-small)\";\n break;\n case \"medium\":\n style.fontSize = \"var(--normal-font-size)\";\n break;\n case \"large\":\n style.fontSize = \"var(--card-title-font-size)\";\n break;\n case \"x-large\":\n style.fontSize = \"var(--title-font-size-larger)\";\n break;\n }\n switch (configStyle.fontWeight) {\n case \"bold\":\n case \"normal\":\n style.fontWeight = configStyle.fontWeight;\n }\n if (configStyle.color) {\n style.color = configStyle.color;\n }\n return style;\n}\n","const VALID_IDENTIFIER_REG = /^[$_\\p{ID_Start}][$\\p{ID_Continue}]*$/u;\n\nexport function getMemberAccessor(property: unknown): string {\n const propertyStr = String(property);\n return VALID_IDENTIFIER_REG.test(propertyStr)\n ? `.${propertyStr}`\n : `[${JSON.stringify(propertyStr)}]`;\n}\n"],"names":["convertToStoryboard","config","attr","lowLevelConvertToStoryboard","getMemberAccessor","attrAccessor","brickItem","display","getPlainBrick","type","countOnly","brick","errorBoundary","children","_config$style","_config$style2","_config$style3","_config$style4","_config$style5","colorSuffix","style","variant","valueAccessor","getValueAccessor","properties","textContent","size","getTagSize","color","background","palette","JSON","stringify","replaceAll","outline","getIconBrick","alignItems","gap","maxItems","Number","dataSource","if","_config$true$icon","_config$true","_config$false$icon","_config$false","_config$true2","_config$false2","trueIcon","true","icon","falseIcon","false","trueStyle","getPlainStyle","falseStyle","lib","prefix","category","theme","_config$formatter","value","formatter","format","pick","undefined","isCostTime","tag","_config$true$text","_config$true3","_config$false$text","_config$false3","_config$true4","_config$false4","trueContent","text","falseContent","field","configStyle","fontSize","fontWeight","VALID_IDENTIFIER_REG","property","propertyStr","String","test"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[2464,5238],{2464:(e,t,n)=>{var i,a=n(4635),r=n(918),o=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),p=n(8769),h=n.n(p),u=n(1123),m=n(9006),g=n(7180),v=n(9765),b=n(8013),A=n(3373),f=n.n(A);let y,w,k,E,x,N,C,M,T,L,I,S,O,_,R;const W=(0,m.wrapBrick)("eo-icon"),{defineElement:D,property:P,event:$}=(0,u.createDecorators)();let B;var U=new WeakMap,F=new WeakMap,V=new WeakMap,j=new WeakMap,z=new WeakSet,X=new WeakMap,K=new WeakMap,J=new WeakMap;class H extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,z),(0,r.A)(this,U,w(this)),(0,r.A)(this,F,(k(this),E(this))),(0,r.A)(this,V,(x(this),N(this))),(0,r.A)(this,j,(C(this),M(this))),(0,r.A)(this,X,(I(this),e=>{e!==this.active&&(this.active=e,(0,s.A)(z,this,T).emit(e))})),(0,r.A)(this,K,S(this)),(0,r.A)(this,J,(R(this),()=>{(0,s.A)(z,this,O).emit()}))}get titleLabel(){return(0,c.A)(U,this)}set titleLabel(e){(0,l.A)(U,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)(V,this)}set badge(e){(0,l.A)(V,this,e)}render(){return h().createElement(q,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,c.A)(X,this),onFirstActivated:(0,c.A)(J,this)})}}function q(e){let{titleLabel:t,active:n,badge:i,onActiveChange:a,onFirstActivated:r}=e;const[o,s]=(0,p.useState)(n),[l,c]=(0,p.useState)(!1);(0,p.useEffect)((()=>{s(n)}),[n]),(0,p.useEffect)((()=>{null==a||a(o)}),[o,a]);const d=(0,p.useCallback)((()=>{s((e=>!e)),l||o||(c(!0),null==r||r())}),[l,o,r]),u=(0,p.useRef)(),[m,g]=(0,p.useState)(!1),v=(0,p.useMemo)((()=>(0,b.G)((()=>{g(u.current.scrollTop>0)}))),[]);return h().createElement("div",{className:f()("pane",{scrolled:m})},h().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},h().createElement("div",{className:"pane-title"},h().createElement("span",{className:"title-icon"},o?h().createElement(W,{lib:"antd",theme:"outlined",icon:"down"}):h().createElement(W,{lib:"antd",theme:"outlined",icon:"right"})),h().createElement("div",{className:"title-label"},t),h().createElement("slot",{name:"title"})),h().createElement("slot",{name:"actions"}),i&&h().createElement("div",{className:"badge"},i),h().createElement("div",{className:"pane-scroll-shadow"})),h().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:v,ref:u},h().createElement("slot",null,h().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}i=H,({e:[w,k,E,x,N,C,M,T,L,I,S,O,_,R],c:[B,y]}=(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"],[$({type:"active.change"}),1,"activeChangeEvent",e=>(0,c.A)(j,e),(e,t)=>(0,l.A)(j,e,t)],[$({type:"active.firstActivated"}),1,"activeFirstActivatedEvent",e=>(0,c.A)(K,e),(e,t)=>(0,l.A)(K,e,t)]],0,(e=>J.has((0,o.A)(e))),m.ReactNextElement)),y();var Y,G=n(4586),Z=n(2150);let Q,ee,te;const{defineElement:ne,property:ie}=(0,u.createDecorators)();let ae;var re=new WeakMap,oe=new WeakMap,se=new WeakMap,le=new WeakMap;class ce extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,re,ee(this)),(0,r.A)(this,oe,(te(this),()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")})),(0,r.A)(this,se,(()=>{const e=(0,c.A)(oe,this).call(this).assignedNodes();for(const n of e){var t;n.active?n.style.flex=String(null!==(t=n.activeFlex)&&void 0!==t?t:"1"):n.style.flex="initial"}})),(0,r.A)(this,le,(e=>{const t=e.target.assignedNodes();for(const e of t)e.addEventListener("active.change",(0,c.A)(se,this))})),(0,G.A)(this,"refCallback",(()=>{(0,c.A)(se,this).call(this);const e=(0,c.A)(oe,this).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,c.A)(le,this).call(this,e)}))}))}get titleLabel(){return(0,c.A)(re,this)}set titleLabel(e){(0,l.A)(re,this,e)}render(){return h().createElement(de,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function de(e){let{titleLabel:t,refCallback:n}=e;return h().createElement("div",{className:"sidebar",ref:n},h().createElement("div",{className:"title-container"},h().createElement("div",{className:"title-label"},t),h().createElement("slot",{name:"titleToolbar"})),h().createElement("div",{className:"pane-container"},h().createElement("slot",null)))}Y=ce,({e:[ee,te],c:[ae,Q]}=(0,d.A)(Y,[ne("visual-builder.workbench-sidebar",{styleTexts:[Z.A]})],[[ie(),1,"titleLabel"]],0,void 0,m.ReactNextElement)),Q();var pe=n(2591),he=n.n(pe),ue=n(1740),me=n.n(ue),ge=n(8128),ve=n.n(ge),be=n(855),Ae=n.n(be),fe=n(3051),ye=n.n(fe),we=n(3656),ke=n.n(we),Ee=n(2984),xe={};xe.styleTagTransform=ke(),xe.setAttributes=Ae(),xe.insert=ve().bind(null,"head"),xe.domAPI=me(),xe.insertStyleElement=ye(),he()(Ee.A,xe),Ee.A&&Ee.A.locals&&Ee.A.locals;var Ne,Ce=n(5292);let Me,Te,Le,Ie,Se,Oe,_e,Re,We,De,Pe,$e,Be;const{defineElement:Ue,property:Fe}=(0,u.createDecorators)(),Ve=(0,m.wrapBrick)("eo-link"),je=(0,m.wrapBrick)("eo-icon"),ze=(0,m.wrapBrick)("eo-tooltip");let Xe;var Ke=new WeakMap,Je=new WeakMap,He=new WeakMap,qe=new WeakMap,Ye=new WeakMap,Ge=new WeakMap;class Ze extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Ke,Te(this)),(0,r.A)(this,Je,(Le(this),Ie(this))),(0,r.A)(this,He,(Se(this),Oe(this))),(0,r.A)(this,qe,(_e(this),Re(this))),(0,r.A)(this,Ye,(We(this),De(this))),(0,r.A)(this,Ge,(Pe(this),$e(this))),Be(this)}get icon(){return(0,c.A)(Ke,this)}set icon(e){(0,l.A)(Ke,this,e)}get to(){return(0,c.A)(Je,this)}set to(e){(0,l.A)(Je,this,e)}get active(){return(0,c.A)(He,this)}set active(e){(0,l.A)(He,this,e)}get href(){return(0,c.A)(qe,this)}set href(e){(0,l.A)(qe,this,e)}get target(){return(0,c.A)(Ye,this)}set target(e){(0,l.A)(Ye,this,e)}get tooltip(){return(0,c.A)(Ge,this)}set tooltip(e){(0,l.A)(Ge,this,e)}render(){return h().createElement(Qe,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target,tooltip:this.tooltip})}}function Qe(e){let{icon:t,to:n,active:i,href:a,target:r,tooltip:o}=e;return h().createElement(ze,{content:o,placement:"right"},h().createElement(Ve,{className:f()("action",{active:i}),url:n,href:a,target:r},h().createElement(je,t)))}Ne=Ze,({e:[Te,Le,Ie,Se,Oe,_e,Re,We,De,Pe,$e,Be],c:[Xe,Me]}=(0,d.A)(Ne,[Ue("visual-builder.workbench-action",{styleTexts:[Ce.A]})],[[Fe({attribute:!1}),1,"icon"],[Fe(),1,"to"],[Fe({type:Boolean}),1,"active"],[Fe(),1,"href"],[Fe(),1,"target"],[Fe(),1,"tooltip"]],0,void 0,m.ReactNextElement)),Me();var et=n(2716),tt=n(63),nt=n(607),it={};it.styleTagTransform=ke(),it.setAttributes=Ae(),it.insert=ve().bind(null,"head"),it.domAPI=me(),it.insertStyleElement=ye(),he()(nt.A,it),nt.A&&nt.A.locals&&nt.A.locals;var at,rt=n(3430);let ot,st,lt,ct,dt;const pt=(0,m.wrapBrick)("visual-builder.workbench-action"),{defineElement:ht,property:ut}=(0,u.createDecorators)();let mt;var gt=new WeakMap,vt=new WeakMap;class bt extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,gt,st(this)),(0,r.A)(this,vt,(lt(this),ct(this))),dt(this)}get appId(){return(0,c.A)(gt,this)}set appId(e){(0,l.A)(gt,this,e)}get menu(){return(0,c.A)(vt,this)}set menu(e){(0,l.A)(vt,this,e)}render(){return h().createElement(yt,{appId:this.appId,menu:this.menu})}}let At;at=bt,({e:[st,lt,ct,dt],c:[mt,ot]}=(0,d.A)(at,[ht("visual-builder.workbench-action-list",{styleTexts:[rt.A]})],[[ut(),1,"appId"],[ut({attribute:!1}),1,"menu"]],0,void 0,m.ReactNextElement)),ot();const ft=new Map;function yt(e){var t;let{appId:n,menu:i}=e;const a=(0,et.getHistory)(),[r,o]=(0,p.useState)(),[s,l]=(0,p.useState)(a.location);return(0,p.useEffect)((()=>{const e=a.listen((e=>{l(e)}));return e}),[a]),(0,p.useEffect)((()=>{At||(At=n),At!==n&&(ft.clear(),At=n)}),[n]),(0,p.useEffect)((()=>{var e;const{pathname:t,search:n}=s,{selectedKeys:a}=(0,tt.LP)(null!==(e=null==i?void 0:i.menuItems)&&void 0!==e?e:[],t,n,"");o(Number(a[0]))}),[i,s]),h().createElement(h().Fragment,null,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&&ft.has(t)&&(n=ft.get(t)),h().createElement(pt,{key:t,icon:e.icon,to:n,href:e.href,target:e.target,tooltip:e.text,active:r===t,onClick:()=>(e=>{e.href||ft.set(r,`${s.pathname}${s.search}`)})(e)})}})).filter(Boolean))}var wt,kt=n(1030),Et=n(4940),xt=n(7758),Nt=n(9406),Ct=n(675),Mt=n(7995),Tt=n(6275);let Lt,It,St,Ot,_t,Rt,Wt,Dt,Pt,$t,Bt,Ut,Ft,Vt,jt,zt,Xt,Kt,Jt,Ht,qt,Yt,Gt,Zt,Qt,en,tn,nn,an,rn,on,sn,ln,cn,dn,pn,hn,un,mn,gn,vn,bn,An,fn,yn,wn,kn,En,xn,Nn,Cn,Mn,Tn,Ln,In,Sn,On;function _n(e){return e.key}n(6477);const{defineElement:Rn,property:Wn,event:Dn}=(0,u.createDecorators)();let Pn;var $n=new WeakMap,Bn=new WeakMap,Un=new WeakMap,Fn=new WeakMap,Vn=new WeakMap,jn=new WeakMap,zn=new WeakMap,Xn=new WeakMap,Kn=new WeakMap,Jn=new WeakMap,Hn=new WeakMap,qn=new WeakMap,Yn=new WeakMap,Gn=new WeakMap,Zn=new WeakMap,Qn=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ii=new WeakSet,ai=new WeakMap,ri=new WeakMap,oi=new WeakMap,si=new WeakMap,li=new WeakMap,ci=new WeakMap,di=new WeakMap,pi=new WeakMap,hi=new WeakMap;class ui extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ii),(0,r.A)(this,$n,It(this)),(0,r.A)(this,Bn,(St(this),Ot(this))),(0,r.A)(this,Un,(_t(this),Rt(this))),(0,r.A)(this,Fn,(Wt(this),Dt(this))),(0,r.A)(this,Vn,(Pt(this),$t(this))),(0,r.A)(this,jn,(Bt(this),Ut(this))),(0,r.A)(this,zn,(Ft(this),Vt(this))),(0,r.A)(this,Xn,(jt(this),zt(this))),(0,r.A)(this,Kn,(Xt(this),Kt(this))),(0,r.A)(this,Jn,(Jt(this),Ht(this))),(0,r.A)(this,Hn,(qt(this),Yt(this))),(0,r.A)(this,qn,(Gt(this),Zt(this))),(0,r.A)(this,Yn,(Qt(this),en(this))),(0,r.A)(this,Gn,(tn(this),nn(this))),(0,r.A)(this,Zn,(an(this),rn(this))),(0,r.A)(this,Qn,(on(this),sn(this))),(0,r.A)(this,ei,(ln(this),cn(this))),(0,r.A)(this,ti,(dn(this),pn(this))),(0,r.A)(this,ni,(hn(this),un(this))),(0,r.A)(this,ai,(vn(this),e=>{(0,s.A)(ii,this,mn).emit(e)})),(0,r.A)(this,ri,bn(this)),(0,r.A)(this,oi,(yn(this),e=>()=>{(0,s.A)(ii,this,An).emit(e.data)})),(0,r.A)(this,si,wn(this)),(0,r.A)(this,li,(xn(this),e=>{(0,s.A)(ii,this,kn).emit(e)})),(0,r.A)(this,ci,Nn(this)),(0,r.A)(this,di,(Tn(this),e=>t=>{t.preventDefault(),(0,s.A)(ii,this,Cn).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})})),(0,r.A)(this,pi,Ln(this)),(0,r.A)(this,hi,(On(this),(e,t)=>{(0,s.A)(ii,this,In).emit({nodeId:e,collapsed:t})}))}get nodes(){return(0,c.A)($n,this)}set nodes(e){(0,l.A)($n,this,e)}get actions(){return(0,c.A)(Bn,this)}set actions(e){(0,l.A)(Bn,this,e)}get actionsHidden(){return(0,c.A)(Un,this)}set actionsHidden(e){(0,l.A)(Un,this,e)}get placeholder(){return(0,c.A)(Fn,this)}set placeholder(e){(0,l.A)(Fn,this,e)}get isTransformName(){return(0,c.A)(Vn,this)}set isTransformName(e){(0,l.A)(Vn,this,e)}get searchPlaceholder(){return(0,c.A)(jn,this)}set searchPlaceholder(e){(0,l.A)(jn,this,e)}get noSearch(){return(0,c.A)(zn,this)}set noSearch(e){(0,l.A)(zn,this,e)}get activeKey(){return(0,c.A)(Xn,this)}set activeKey(e){(0,l.A)(Xn,this,e)}get showMatchedNodeOnly(){return(0,c.A)(Kn,this)}set showMatchedNodeOnly(e){(0,l.A)(Kn,this,e)}get matchNodeDataFields(){return(0,c.A)(Jn,this)}set matchNodeDataFields(e){(0,l.A)(Jn,this,e)}get fixedActionsFor(){return(0,c.A)(Hn,this)}set fixedActionsFor(e){(0,l.A)(Hn,this,e)}get collapsible(){return(0,c.A)(qn,this)}set collapsible(e){(0,l.A)(qn,this,e)}get collapsedNodes(){return(0,c.A)(Yn,this)}set collapsedNodes(e){(0,l.A)(Yn,this,e)}get allowDrag(){return(0,c.A)(Gn,this)}set allowDrag(e){(0,l.A)(Gn,this,e)}get allowDragToRoot(){return(0,c.A)(Zn,this)}set allowDragToRoot(e){(0,l.A)(Zn,this,e)}get allowDragToInside(){return(0,c.A)(Qn,this)}set allowDragToInside(e){(0,l.A)(Qn,this,e)}get nodeKey(){return(0,c.A)(ei,this)}set nodeKey(e){(0,l.A)(ei,this,e)}get skipNotify(){return(0,c.A)(ti,this)}set skipNotify(e){(0,l.A)(ti,this,e)}render(){return h().createElement(Et.e.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,c.A)(ai,this)}},h().createElement(Nt.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:_n,onNodeToggle:(0,c.A)(hi,this),skipNotify:this.skipNotify,clickFactory:(0,c.A)(oi,this),contextMenuFactory:(0,c.A)(di,this),matchNode:(e,t)=>{var n;return(0,Ct.U)(e.name,t)||!(null===(n=this.matchNodeDataFields)||void 0===n||!n.length)&&(0,Ct.U)("*"===this.matchNodeDataFields?e.data:(0,kt.pick)(e.data,this.matchNodeDataFields),t)}}},h().createElement(xt.cU,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,c.A)(li,this),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}wt=ui,({e:[It,St,Ot,_t,Rt,Wt,Dt,Pt,$t,Bt,Ut,Ft,Vt,jt,zt,Xt,Kt,Jt,Ht,qt,Yt,Gt,Zt,Qt,en,tn,nn,an,rn,on,sn,ln,cn,dn,pn,hn,un,mn,gn,vn,bn,An,fn,yn,wn,kn,En,xn,Nn,Cn,Mn,Tn,Ln,In,Sn,On],c:[Pn,Lt]}=(0,d.A)(wt,[Rn("visual-builder.workbench-tree",{styleTexts:[Mt.A,Tt.A]})],[[Wn({attribute:!1}),1,"nodes"],[Wn({attribute:!1}),1,"actions"],[Wn({type:Boolean}),1,"actionsHidden"],[Wn(),1,"placeholder"],[Wn({type:Boolean}),1,"isTransformName"],[Wn(),1,"searchPlaceholder"],[Wn({type:Boolean}),1,"noSearch"],[Wn({attribute:!1}),1,"activeKey"],[Wn({type:Boolean}),1,"showMatchedNodeOnly"],[Wn({attribute:!1}),1,"matchNodeDataFields"],[Wn({attribute:!1}),1,"fixedActionsFor"],[Wn({type:Boolean}),1,"collapsible"],[Wn({attribute:!1}),1,"collapsedNodes"],[Wn({type:Boolean}),1,"allowDrag"],[Wn({type:Boolean}),1,"allowDragToRoot"],[Wn({type:Boolean}),1,"allowDragToInside"],[Wn({type:String}),1,"nodeKey"],[Wn({type:Boolean}),1,"skipNotify"],[Dn({type:"action.click"}),1,"actionClickEvent",e=>(0,c.A)(ni,e),(e,t)=>(0,l.A)(ni,e,t)],[Dn({type:"node.click"}),1,"nodeClickEvent",e=>(0,c.A)(ri,e),(e,t)=>(0,l.A)(ri,e,t)],[Dn({type:"node.drop"}),1,"nodeDropEvent",e=>(0,c.A)(si,e),(e,t)=>(0,l.A)(si,e,t)],[Dn({type:"context.menu"}),1,"nodeContextMenuEvent",e=>(0,c.A)(ci,e),(e,t)=>(0,l.A)(ci,e,t)],[Dn({type:"node.toggle"}),1,"nodeToggleEvent",e=>(0,c.A)(pi,e),(e,t)=>(0,l.A)(pi,e,t)]],0,(e=>hi.has((0,o.A)(e))),m.ReactNextElement)),Lt();var mi=n(155),gi=n.n(mi),vi=n(1361),bi=n(9704);let Ai=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 fi="bricks/visual-builder/workbench-history-action";var yi=n(4107),wi=n(9733);const ki={add:`${fi}:${Ai.ADD}`,edit:`${fi}:${Ai.EDIT}`,delete:`${fi}:${Ai.DELETE}`,batch_delete:`${fi}:${Ai.DELETE}`,import:`${fi}:${Ai.IMPORT}`,clone:`${fi}:${Ai.CLONE}`,append_relation:`${fi}:${Ai.APPEND_RELATION}`,update_relation:`${fi}:${Ai.UPDATE_RELATION}`,remove_relation:`${fi}:${Ai.REMOVE_RELATION}`,rollback:`${fi}:${Ai.ROLLBACK}`,rollback_all:`${fi}:${Ai.ROLLBACK_ALL}`},Ei={add:`${fi}:${Ai.ADD_FULL}`,edit:`${fi}:${Ai.EDIT_FULL}`,delete:`${fi}:${Ai.DELETE_FULL}`,batch_delete:`${fi}:${Ai.DELETE_FULL}`,import:`${fi}:${Ai.IMPORT_FULL}`,clone:`${fi}:${Ai.CLONE_FULL}`,append_relation:`${fi}:${Ai.APPEND_RELATION_FULL}`,update_relation:`${fi}:${Ai.UPDATE_RELATION_FULL}`,remove_relation:`${fi}:${Ai.REMOVE_RELATION_FULL}`,rollback:`${fi}:${Ai.ROLLBACK_FULL}`,rollback_all:`${fi}:${Ai.ROLLBACK_ALL_FULL}`},xi={project:`${fi}:${Ai.PROJECT}`,userGroup:`${fi}:${Ai.USER}`,permission:`${fi}:${Ai.PERMISSION}`,brick:`${fi}:${Ai.BRICK}`,route:`${fi}:${Ai.ROUTE}`,template:`${fi}:${Ai.TEMPLATE}`,snippet:`${fi}:${Ai.SNIPPET}`,i18n:`${fi}:${Ai.I18N}`,image:`${fi}:${Ai.IMAGE}`,function:`${fi}:${Ai.FUNCTION}`,menu:`${fi}:${Ai.MENU}`,menuItem:`${fi}:${Ai.MENU_ITEM}`,workflow:`${fi}:${Ai.WORKFLOW}`},Ni={PROJECT_MICRO_APP:`${fi}:${Ai.PROJECT}`,"MICRO_APP_USER_GROUP@EASYOPS":`${fi}:${Ai.USER}`,MICRO_APP_RESOURCE_PERMISSION:`${fi}:${Ai.PERMISSION}`,STORYBOARD_BRICK:`${fi}:${Ai.BRICK}`,STORYBOARD_ROUTE:`${fi}:${Ai.ROUTE}`,STORYBOARD_TEMPLATE:`${fi}:${Ai.TEMPLATE}`,STORYBOARD_SNIPPET:`${fi}:${Ai.SNIPPET}`,STORYBOARD_I18N:`${fi}:${Ai.I18N}`,MICRO_APP_RESOURCE_IMAGE:`${fi}:${Ai.IMAGE}`,STORYBOARD_FUNCTION:`${fi}:${Ai.FUNCTION}`,MICRO_APP_RESOURCE_MENU:`${fi}:${Ai.MENU}`,MICRO_APP_RESOURCE_MENU_ITEM:`${fi}:${Ai.MENU_ITEM}`,"WORKFLOW_DEF@EASYOPS":`${fi}:${Ai.WORKFLOW}`};function Ci(e){var t,n,i,a,r,o,s,l,c,d,p,h,u,m,g,v,b;const A="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",f=wi.i18n.t(null!==(t=xi[e.category])&&void 0!==t?t:e.category),y=wi.i18n.t(null!==(n=ki[A])&&void 0!==n?n:A),w=wi.i18n.t(null!==(i=Ni[null===(a=e.abstract)||void 0===a?void 0:a.leftObjectId])&&void 0!==i?i:null===(r=e.abstract)||void 0===r?void 0:r.leftObjectId),k=wi.i18n.t(null!==(o=Ni[null===(s=e.abstract)||void 0===s?void 0:s.rightObjectId])&&void 0!==o?o:null===(l=e.abstract)||void 0===l?void 0:l.rightObjectId),E=Mi(null===(c=e.abstract)||void 0===c?void 0:c.nodes,null===(d=e.abstract)||void 0===d?void 0:d.nodesCount),x=Mi(null===(p=e.abstract)||void 0===p?void 0:p.leftNodes,null===(h=e.abstract)||void 0===h?void 0:h.leftNodesCount),N=Mi(null===(u=e.abstract)||void 0===u?void 0:u.rightNodes,null===(m=e.abstract)||void 0===m?void 0:m.rightNodesCount),C="rollback"===A?Ci(e.rollBackIdInfo).abstract:null;return{category:f,action:y,leftObjectId:w,rightObjectId:k,nodes:E,leftNodes:x,rightNodes:N,abstract:wi.i18n.t(null!==(g=Ei[A])&&void 0!==g?g:A,{category:f,nodes:E,leftNodes:x,rightNodes:N,nodeChanges:null===(v=e.abstract)||void 0===v||null===(v=v.nodeChanges)||void 0===v?void 0:v.join(", "),relationChanges:null===(b=e.abstract)||void 0===b||null===(b=b.relationChanges)||void 0===b?void 0:b.join(", "),leftObjectId:w,rightObjectId:k,rollbackAbstract:C}),rollbackAbstract:C}}function Mi(){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 wi.i18n.t(`${fi}:${Ai.NODE}`,{nodes:e.join(n),context:t>e.length?"ellipsis":void 0,count:t})}var Ti;let Li,Ii,Si,Oi,_i,Ri,Wi,Di,Pi,$i,Bi,Ui,Fi,Vi,ji,zi,Xi;(0,bi.initializeReactI18n)(fi,{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:Ki,property:Ji,event:Hi}=(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",onBeforeVisibleChange:"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,Ii(this)),(0,r.A)(this,na,(Si(this),Oi(this))),(0,r.A)(this,ia,(_i(this),Ri(this))),(0,r.A)(this,ra,(Pi(this),e=>{(0,s.A)(aa,this,Wi).emit(e)})),(0,r.A)(this,oa,$i(this)),(0,r.A)(this,sa,(Fi(this),e=>{(0,s.A)(aa,this,Bi).emit(e)})),(0,r.A)(this,la,Vi(this)),(0,r.A)(this,ca,(Xi(this),()=>{(0,s.A)(aa,this,ji).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 h().createElement(pa,{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 pa(e){const{appId:t,onHistoryItemClick:n,onRollback:i,onRollbackAll:a}=e,{t:r}=(0,bi.useTranslation)(fi),[o,s]=(0,p.useState)(!1),[l,c]=(0,p.useState)(!0),[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)([]),v=(0,p.useRef)(""),b=e=>{s(!0),(0,yi.R)(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,et.handleHttpError)(e)})).finally((()=>{s(!1)}))};return h().createElement(Qi,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",onBeforeVisibleChange:e=>{e.detail&&(c(!0),u(!1),g([]),v.current="",b(!0))}},h().createElement(qi,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),h().createElement("div",null,h().createElement("div",{className:"history-title"},"History"),h().createElement("div",{className:"history-list"},m.length?h().createElement(h().Fragment,null,m.map(((e,t)=>h().createElement(ha,{key:`${e.uniqueKey}-${e.ts}`,data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:n,onRollback:i}))),!l&&h().createElement("span",{className:"load-more-container"},h().createElement(Yi,{className:"load-more",disabled:o,onClick:()=>b()},r(Ai.LOAD_MORE))),d&&h().createElement("span",{className:"end-container"},"The End",h().createElement(Gi,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>a()}))):h().createElement("div",{className:"empty"},r(o?Ai.LOADING:Ai.NO_DATA))),h().createElement("slot",null)))}function ha(e){const{data:t,enableRollback:n,current:i,onHistoryItemClick:a,onRollback:r}=e,o=gi()(Number(t.ts)/1e6),s=gi().duration(o.diff(gi()())),l=s.days()<=-1?o.format("YYYY-MM-DD HH:mm:ss"):s.humanize(!0,{ss:0,s:60,m:60,h:24});return h().createElement("div",{className:"item-container"},h().createElement("div",{className:"item-title"},h().createElement("div",{className:"title-left",onClick:()=>a({...t,enableRollback:n})},h().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),i&&h().createElement("div",{className:"branch"},"(current)")),h().createElement("div",{className:"title-right"},n&&h().createElement(Gi,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>r(t)}))),h().createElement("div",{className:"item-info"},h().createElement(Zi,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),h().createElement("div",{className:"time"},l),h().createElement("div",{className:"operator"},t.user)))}Ti=da,({e:[Ii,Si,Oi,_i,Ri,Wi,Di,Pi,$i,Bi,Ui,Fi,Vi,ji,zi,Xi],c:[ea,Li]}=(0,d.A)(Ti,[Ki("visual-builder.workbench-history-action",{styleTexts:[vi.A]})],[[Ji(),1,"appId"],[Ji(),1,"projectId"],[Hi({type:"history.item.click"}),1,"historyItemClickEvent",e=>(0,c.A)(ia,e),(e,t)=>(0,l.A)(ia,e,t)],[Hi({type:"rollback"}),1,"rollbackEvent",e=>(0,c.A)(oa,e),(e,t)=>(0,l.A)(oa,e,t)],[Hi({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)),Li();var ua,ma=n(2381);let ga,va,ba,Aa,fa,ya,wa,ka,Ea,xa,Na,Ca,Ma,Ta,La,Ia,Sa,Oa,_a,Ra,Wa,Da,Pa,$a,Ba,Ua,Fa,Va,ja,za,Xa,Ka,Ja,Ha,qa,Ya,Ga,Za,Qa,er,tr,nr,ir,ar,rr,or,sr,lr,cr,dr,pr,hr,ur;const{defineElement:mr,property:gr,event:vr}=(0,u.createDecorators)(),br=(0,m.wrapBrick)("eo-icon"),Ar=(0,m.wrapBrick)("eo-tooltip"),fr=new Set;let yr;var wr=new WeakMap,kr=new WeakMap,Er=new WeakMap,xr=new WeakMap,Nr=new WeakMap,Cr=new WeakMap,Mr=new WeakMap,Tr=new WeakMap,Lr=new WeakMap,Ir=new WeakSet,Sr=new WeakMap,Or=new WeakMap,_r=new WeakMap,Rr=new WeakMap,Wr=new WeakMap,Dr=new WeakMap,Pr=new WeakMap,$r=new WeakMap,Br=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Vr=new WeakMap,jr=new WeakMap,zr=new WeakMap,Xr=new WeakMap,Kr=new WeakMap,Jr=new WeakMap;class Hr extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ir),(0,r.A)(this,wr,va(this)),(0,r.A)(this,kr,(ba(this),Aa(this))),(0,r.A)(this,Er,(fa(this),ya(this))),(0,r.A)(this,xr,(wa(this),ka(this))),(0,r.A)(this,Nr,(Ea(this),xa(this))),(0,r.A)(this,Cr,(Na(this),Ca(this))),(0,r.A)(this,Mr,(Ma(this),Ta(this))),(0,r.A)(this,Tr,(La(this),Ia(this))),(0,r.A)(this,Lr,(Sa(this),Oa(this))),(0,r.A)(this,Sr,(Wa(this),e=>{(0,s.A)(Ir,this,_a).emit(e)})),(0,r.A)(this,Or,Da(this)),(0,r.A)(this,_r,(Ba(this),e=>{(0,s.A)(Ir,this,Pa).emit(e)})),(0,r.A)(this,Rr,Ua(this)),(0,r.A)(this,Wr,(ja(this),()=>{(0,s.A)(Ir,this,Fa).emit()})),(0,r.A)(this,Dr,za(this)),(0,r.A)(this,Pr,(Ja(this),()=>{(0,s.A)(Ir,this,Xa).emit()})),(0,r.A)(this,$r,Ha(this)),(0,r.A)(this,Br,(Ga(this),e=>{(0,s.A)(Ir,this,qa).emit(e)})),(0,r.A)(this,Ur,Za(this)),(0,r.A)(this,Fr,(tr(this),()=>{(0,s.A)(Ir,this,Qa).emit()})),(0,r.A)(this,Vr,nr(this)),(0,r.A)(this,jr,(rr(this),e=>{(0,s.A)(Ir,this,ir).emit(e)})),(0,r.A)(this,zr,or(this)),(0,r.A)(this,Xr,(cr(this),e=>{(0,s.A)(Ir,this,sr).emit(e)})),(0,r.A)(this,Kr,dr(this)),(0,r.A)(this,Jr,(ur(this),e=>{(0,s.A)(Ir,this,pr).emit(e)}))}get label(){return(0,c.A)(wr,this)}set label(e){(0,l.A)(wr,this,e)}get type(){return(0,c.A)(kr,this)}set type(e){(0,l.A)(kr,this,e)}get external(){return(0,c.A)(Er,this)}set external(e){(0,l.A)(Er,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)(Mr,this)}set disableChildAppend(e){(0,l.A)(Mr,this,e)}get autoFocusOnce(){return(0,c.A)(Tr,this)}set autoFocusOnce(e){(0,l.A)(Tr,this,e)}render(){return h().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)(_r,this),onNodeClick:(0,c.A)(Wr,this),onNodeDoubleClick:(0,c.A)(Pr,this),onNodeContextMenu:(0,c.A)(Br,this),onChildAppend:(0,c.A)(Fr,this),onExternalClick:(0,c.A)(jr,this),onSubNodeDoubleClick:(0,c.A)(Xr,this),onSubNodeContextMenu:(0,c.A)(Jr,this)})}}function qr(e){var t;let{label:n,type:i,external:a,subNodes:r,autoFocusOnce:o,onLabelEditingChange:s,onLabelChange:l,onNodeClick:c,onNodeDoubleClick:d,onNodeContextMenu:u,onChildAppend:m,onExternalClick:g,onSubNodeDoubleClick:v,onSubNodeContextMenu:b}=e;const A="board"===i?"board":"page",[y,w]=(0,p.useState)(n),[k,E]=(0,p.useState)(!1),x=(0,p.useRef)(!1),[N,C]=(0,p.useState)(!1),M=(0,p.useRef)(null);(0,p.useEffect)((()=>{w(n)}),[n]);const T=(0,p.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),E(!0)}),[]);(0,p.useEffect)((()=>{o&&!fr.has(o)&&(fr.add(o),setTimeout((()=>{E(!0)}),1))}),[o]),(0,p.useEffect)((()=>{var e,t;k&&(null===(e=M.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=M.current)||void 0===t||t.select())}),[k]),(0,p.useEffect)((()=>{x.current?null==s||s(k):x.current=!0}),[k,s]);const L=(0,p.useCallback)((e=>{w(e.target.value)}),[]),I=(0,p.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=M.current)||void 0===n||n.blur()}),[]),S=(0,p.useCallback)((()=>{E(!1),C(!0)}),[]);(0,p.useEffect)((()=>{N&&(null==l||l(y),C(!1))}),[y,l,N]);const O=(0,p.useCallback)((e=>{e.stopPropagation(),null==m||m()}),[m]),_=(0,p.useCallback)((e=>{e.stopPropagation(),null==g||g(a)}),[a,g]),R=(0,p.useCallback)((e=>{e.stopPropagation()}),[]),W=38*Math.max(0,Math.floor((null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0)-3));return h().createElement(h().Fragment,null,h().createElement("div",{className:f()("node",A,{"editing-label":k}),style:{height:"board"===A?70:130+W},onClick:c,onDoubleClick:d,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==u||u({clientX:e.clientX,clientY:e.clientY})}},h().createElement("input",{className:"label-input",value:y,ref:M,onChange:L,onKeyDown:I,onBlur:S,onDoubleClick:R,onContextMenu:R,onMouseDown:R}),h().createElement("div",{className:"label",onDoubleClick:T,onMouseDown:R},y),"board"===A?h().createElement("div",{className:"icon-container"},h().createElement(br,{lib:"antd",icon:"unordered-list"})):h().createElement("div",{className:"thumbnail-container",style:{height:98+W}},h().createElement("div",{className:"thumbnail-placeholder"},h().createElement(br,{lib:"antd",icon:"ellipsis"})),a&&h().createElement("div",{className:"external",onClick:_,onDoubleClick:R,onMouseDown:R},h().createElement(br,{lib:"antd",icon:"desktop"}),h().createElement("span",{className:"external-label"},a.label)),null!=r&&r.length?h().createElement("div",{className:"sub-nodes"},r.map((e=>h().createElement(Yr,{key:e.id,subNode:e,onSubNodeDoubleClick:v,onSubNodeContextMenu:b})))):null)),h().createElement("div",{className:"add-button",role:"button",onClick:O,onMouseDown:R},h().createElement(br,{lib:"fa",icon:"plus"})))}function Yr(e){let{subNode:t,onSubNodeDoubleClick:n,onSubNodeContextMenu:i}=e;return h().createElement(Ar,{key:t.id,content:t.label},h().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})}},h().createElement("div",{className:"sub-node-skeleton-title"}),h().createElement("div",{className:"sub-node-skeleton-content"}),h().createElement("div",{className:"sub-node-skeleton-button"})))}ua=Hr,({e:[va,ba,Aa,fa,ya,wa,ka,Ea,xa,Na,Ca,Ma,Ta,La,Ia,Sa,Oa,_a,Ra,Wa,Da,Pa,$a,Ba,Ua,Fa,Va,ja,za,Xa,Ka,Ja,Ha,qa,Ya,Ga,Za,Qa,er,tr,nr,ir,ar,rr,or,sr,lr,cr,dr,pr,hr,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)(Lr,e),(e,t)=>(0,l.A)(Lr,e,t)],[vr({type:"label.change"}),1,"labelChange",e=>(0,c.A)(Or,e),(e,t)=>(0,l.A)(Or,e,t)],[vr({type:"node.click"}),1,"nodeClick",e=>(0,c.A)(Rr,e),(e,t)=>(0,l.A)(Rr,e,t)],[vr({type:"node.dblclick"}),1,"nodeDoubleClick",e=>(0,c.A)(Dr,e),(e,t)=>(0,l.A)(Dr,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)(Ur,e),(e,t)=>(0,l.A)(Ur,e,t)],[vr({type:"external.click"}),1,"externalClick",e=>(0,c.A)(Vr,e),(e,t)=>(0,l.A)(Vr,e,t)],[vr({type:"subNode.dblclick"}),1,"subNodeDoubleClick",e=>(0,c.A)(zr,e),(e,t)=>(0,l.A)(zr,e,t)],[vr({type:"subNode.contextmenu"}),1,"subNodeContextMenu",e=>(0,c.A)(Kr,e),(e,t)=>(0,l.A)(Kr,e,t)]],0,(e=>Jr.has((0,o.A)(e))),m.ReactNextElement)),ga();var Gr,Zr=n(3848),Qr=n(6213),eo=n(9492);let to,no,io,ao,ro,oo,so,lo,co;const{method:po,property:ho}=(0,u.createDecorators)();var uo=new WeakMap,mo=new WeakSet,go=new WeakMap,vo=new WeakMap,bo=new WeakMap,Ao=new WeakMap,fo=new WeakMap,yo=new WeakMap;class wo extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,mo),(0,r.A)(this,uo,(to(this),!1)),(0,r.A)(this,go,"normal"),(0,r.A)(this,vo,!1),(0,r.A)(this,bo,no(this)),(0,r.A)(this,Ao,(io(this),ao(this))),(0,r.A)(this,fo,(ro(this),oo(this))),(0,r.A)(this,yo,(so(this),lo(this))),co(this)}get isFormItemElement(){return!0}set validateState(e){(0,eo.A)(mo,No,this,e),this._render()}get validateState(){return(0,s.A)(mo,this,xo)}set notRender(e){this.hidden=e,(0,eo.A)(mo,Eo,this,e),this._render()}get notRender(){return(0,s.A)(mo,this,ko)}get $bindFormItem(){return(0,s.A)(mo,this,Co)}set $bindFormItem(e){(0,eo.A)(mo,Mo,this,e),this._render()}get helpBrick(){return(0,c.A)(bo,this)}set helpBrick(e){(0,l.A)(bo,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)(fo,this)}set labelCol(e){(0,l.A)(fo,this,e)}get wrapperCol(){return(0,c.A)(yo,this)}set wrapperCol(e){(0,l.A)(yo,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function ko(e){return(0,c.A)(uo,e)}function Eo(e,t){(0,l.A)(uo,e,t)}function xo(e){return(0,c.A)(go,e)}function No(e,t){(0,l.A)(go,e,t)}function Co(e){return(0,c.A)(vo,e)}function Mo(e,t){(0,l.A)(vo,e,t)}Gr=wo,[no,io,ao,ro,oo,so,lo,co,to]=(0,d.A)(Gr,[],[[ho({attribute:!1}),1,"helpBrick"],[ho({attribute:!1}),1,"labelBrick"],[ho({attribute:!1}),1,"labelCol"],[ho({attribute:!1}),1,"wrapperCol"],[po(),2,"setNotRender"],[po(),2,"getFormElement"]],0,void 0,m.ReactNextElement).e;var To=n(4244);let Lo=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 Io="bricks/visual-builder/contract-select",So={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,bi.initializeReactI18n)(Io,So);const Oo=(0,m.wrapBrick)("eo-icon"),_o=(0,m.wrapBrick)("eo-input",{onChange:"change"});function Ro(e){const{itemsCount:t=20,onBlur:n}=e,[i,a]=(0,p.useState)(t),{t:r}=(0,bi.useTranslation)(Io),[o,s]=(0,p.useState)(!1);return h().createElement("div",{className:"options-tips",slot:e.slot},r(Lo.CONTRACT_OPTIONS_TIPS_PREFIX)," ",o?h().createElement(_o,{autoFocus:!0,inputStyle:{width:65},value:String(i),onBlur:()=>{s(!1),null==n||n(i)},onChange:e=>{a(Number(e.detail))}}):h().createElement("span",null,i," ",h().createElement(Oo,{icon:"edit",lib:"antd",onClick:()=>{s(!0)}}))," ",r(Lo.CONTRACT_OPTIONS_TIPS_SUFFIX))}var Wo;let Do,Po,$o,Bo,Uo,Fo,Vo,jo,zo,Xo,Ko,Jo,Ho,qo,Yo;(0,bi.initializeReactI18n)(Io,So);const{defineElement:Go,property:Zo,event:Qo}=(0,u.createDecorators)(),es=(0,m.wrapBrick)("eo-form-item"),ts=(0,m.wrapBrick)("eo-auto-complete",{onChange:"change"});let ns;var is=new WeakMap,as=new WeakMap,rs=new WeakMap,os=new WeakMap,ss=new WeakMap,ls=new WeakMap,cs=new WeakSet;function ds(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 hs(e){return(0,kt.isNil)(e)||ps(e)?"":wi.i18n.t(`${Io}:${Lo.CONTRACT_VALIDATE_MESSAGE}`)}function us(e){let{value:t,inputStyle:n,validateState:i,suffix:a,onChange:r}=e;const[o,s]=(0,p.useState)(),[l,c]=(0,p.useState)(20),d=function(e){let{pageSize:t=20,q:n=""}=e;const[i,a]=(0,p.useState)([]),[r,o]=(0,p.useState)(n),[s,l]=(0,p.useState)(t);return(0,p.useEffect)((()=>{o(n)}),[n]),(0,p.useEffect)((()=>{l(t)}),[t]),(0,p.useEffect)((()=>{(async()=>{try{const{list:e}=await(0,To.f)({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,p.useState)(ds(t)),[g,v]=(0,p.useState)([]);(0,p.useEffect)((()=>{m(ds(t))}),[t]);const b=(0,p.useMemo)((()=>(0,kt.debounce)((e=>{s(e)}),200)),[]);return h().createElement("div",{className:"contract-wrapper"},h().createElement(ts,{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(ds(t)),null==r||r(t);else{var n,i;const e=null===(n=d.find((e=>e.fullContractName===t)))||void 0===n?void 0:n.version,a=null!==(i=null==e?void 0:e[0])&&void 0!==i?i:"";v(e),m({name:t,version:a}),null==r||r(`${t}:${a}`)}b(t)}},h().createElement(Ro,{onBlur:e=>c(e),slot:"options-toolbar"})),h().createElement(ts,{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?h().createElement(Zr.ReactUseMultipleBricks,a):null)}Wo=class extends wo{constructor(){super(...arguments),(0,a.A)(this,cs),(0,r.A)(this,is,Po(this)),(0,r.A)(this,as,($o(this),Bo(this))),(0,r.A)(this,rs,(Uo(this),Fo(this))),(0,r.A)(this,os,(Vo(this),jo(this))),(0,r.A)(this,ss,(zo(this),Xo(this))),(0,r.A)(this,ls,(Ko(this),Jo(this))),(0,G.A)(this,"handleChange",(Yo(this),e=>{(0,s.A)(cs,this,Ho).emit(e)}))}get name(){return(0,c.A)(is,this)}set name(e){(0,l.A)(is,this,e)}get required(){return(0,c.A)(as,this)}set required(e){(0,l.A)(as,this,e)}get label(){return(0,c.A)(rs,this)}set label(e){(0,l.A)(rs,this,e)}get value(){return(0,c.A)(os,this)}set value(e){(0,l.A)(os,this,e)}get suffix(){return(0,c.A)(ss,this)}set suffix(e){(0,l.A)(ss,this,e)}render(){return h().createElement(es,{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:hs},h().createElement(us,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[Po,$o,Bo,Uo,Fo,Vo,jo,zo,Xo,Ko,Jo,Ho,qo,Yo],c:[ns,Do]}=(0,d.A)(Wo,[Go("visual-builder.contract-select",{styleTexts:[Qr.A]})],[[Zo(),1,"name"],[Zo({type:Boolean}),1,"required"],[Zo(),1,"label"],[Zo({attribute:!1}),1,"value"],[Zo({attribute:!1}),1,"suffix"],[Qo({type:"change"}),1,"changeEvent",e=>(0,c.A)(ls,e),(e,t)=>(0,l.A)(ls,e,t)]],0,(e=>cs.has((0,o.A)(e))),wo)),Do();var ms=n(2729);var gs,vs=n(7540);let bs,As,fs,ys,ws,ks,Es,xs,Ns,Cs,Ms,Ts,Ls,Is,Ss,Os;const _s=(0,m.wrapBrick)("eo-menu"),Rs=(0,m.wrapBrick)("eo-menu-item"),Ws=(0,m.wrapBrick)("eo-tooltip"),Ds=(0,ms.unwrapProvider)("basic.lock-body-scroll");(0,bi.initializeReactI18n)("bricks/visual-builder/generate-snippets-context-menu",{en:{},zh:{}});const{defineElement:Ps,property:$s,event:Bs,method:Us}=(0,u.createDecorators)();let Fs;var Vs=new WeakMap,js=new WeakMap,zs=new WeakMap,Xs=new WeakMap,Ks=new WeakSet,Js=new WeakMap,Hs=new WeakMap,qs=new WeakMap;class Ys extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ks),(0,r.A)(this,Vs,(bs(this),fs(this))),(0,r.A)(this,js,(ys(this),ws(this))),(0,r.A)(this,zs,(ks(this),Es(this))),(0,r.A)(this,Xs,(xs(this),Ns(this))),(0,r.A)(this,Js,(Ts(this),Ls(this))),(0,r.A)(this,Hs,(Os(this),e=>{(0,s.A)(Ks,this,Cs).emit(e)})),(0,r.A)(this,qs,(e=>{(0,s.A)(Ks,this,Is).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)(js,this)}set active(e){(0,l.A)(js,this,e)}get position(){return(0,c.A)(zs,this)}set position(e){(0,l.A)(zs,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(),Ds(this,!1)}render(){return h().createElement(Gs,{active:this.active,element:this,position:this.position,onItemDragStart:(0,c.A)(Hs,this),onItemDragEnd:(0,c.A)(qs,this),options:this.options})}}function Gs(e){var t,n;let{element:i,active:a,onItemDragEnd:r,onItemDragStart:o,options:s,position:l}=e;const[c,d]=(0,p.useState)(!1),u=(0,p.useRef)(null),[m,g]=(0,p.useState)(null),v=(0,p.useCallback)((e=>{e.preventDefault(),null==i||i.close()}),[i]),b=(0,p.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]),A=(0,p.useCallback)(((e,t)=>{d(!1),e.target.classList.remove("dragging"),null==i||i.close(),null==r||r(t)}),[i,r]);return(0,p.useEffect)((()=>{Ds(i,a)}),[a,i]),(0,p.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]),h().createElement(h().Fragment,null,!c&&h().createElement("div",{className:"mask",onClick:v,onContextMenu:v}),h().createElement("div",{className:"container",ref:u,style:{left:null===(t=null!=m?m:l)||void 0===t?void 0:t[0],top:null===(n=null!=m?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 h().createElement("div",{key:t},h().createElement("div",{className:"title"},e.title),(null===(n=e.children)||void 0===n?void 0:n.length)&&h().createElement(_s,null,null===(i=e.children)||void 0===i?void 0:i.map(((e,t)=>h().createElement(Ws,{content:e.tooltip,hoist:!0,placement:"left",key:t},h().createElement(Rs,{disabled:e.disabled,icon:e.icon,draggable:!e.disabled,onDragStart:t=>b(t,e),onDragEnd:t=>A(t,e)},e.text))))))}))))}gs=Ys,({e:[fs,ys,ws,ks,Es,xs,Ns,Cs,Ms,Ts,Ls,Is,Ss,Os,bs],c:[Fs,As]}=(0,d.A)(gs,[Ps("visual-builder.generate-snippets-context-menu",{styleTexts:[vs.A]})],[[$s({attribute:!1}),1,"options"],[$s({type:Boolean}),1,"active"],[$s({attribute:!1}),1,"position"],[Bs({type:"item.drag.start"}),1,"itemDragStartEvent",e=>(0,c.A)(Xs,e),(e,t)=>(0,l.A)(Xs,e,t)],[Bs({type:"item.drag.end"}),1,"itemDragEndEvent",e=>(0,c.A)(Js,e),(e,t)=>(0,l.A)(Js,e,t)],[Us(),2,"open"],[Us(),2,"close"]],0,(e=>qs.has((0,o.A)(e))),m.ReactNextElement)),As();var Zs=n(1085),Qs=n(3091),el=n(7447),tl=n(3640),nl=n(4360),il=n(3544),al=n(4650),rl=n(9830);function ol(){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=rl.L.highlight((0,al.d)(e),i)}catch{return}e.children=a.children}return t=>{(0,il.YR)(t,"element",e)}}const sl={Fragment:Zs.Fragment,jsx:Zs.jsx,jsxs:Zs.jsxs};function ll(e){let{content:t}=e;const[n,i]=(0,p.useState)(null);return(0,p.useEffect)((()=>{let e=!1;return(0,Qs.l)().use(el.A).use(tl.A).use([ol]).use(nl.A,sl).process(t).then((t=>{e||i(t.result)})).catch((t=>{e||(console.error("Convert markdown failed:",t),i(null))})),()=>{e=!0}}),[t]),n}const cl=(0,m.wrapBrick)("eo-avatar");function dl(e){let{message:t}=e;const n=(0,p.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,p.useRef)(null);return(0,p.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]),h().createElement("div",{className:f()("message",{failed:t.failed})},h().createElement("div",{className:"avatar"},h().createElement(cl,{icon:{lib:"easyops",icon:"assistant"===t.role?"robot":"account"},size:"small",className:`role-${t.role}`})),h().createElement("div",{className:"main"},h().createElement("div",{className:"label"},"assistant"===t.role?"Assistant":"You"),h().createElement("div",{className:"content",ref:i},n.map(((e,t)=>h().createElement(pl,{key:t,chunk:e}))))))}function pl(e){let{chunk:t}=e;return h().createElement(h().Fragment,null,"markdown"===t.type?h().createElement("div",{className:"markdown"},h().createElement(ll,{content:t.content})):"command"===t.type?h().createElement(h().Fragment,null,h().createElement("details",{className:"command"},h().createElement("summary",null,"```",t.command),h().createElement("pre",null,h().createElement("code",null,t.content)))):h().createElement("div",{className:"plain"},t.content))}var hl,ul=n(7236);let ml,gl,vl,bl,Al,fl,yl,wl,kl;const{defineElement:El,property:xl,event:Nl}=(0,u.createDecorators)();let Cl;var Ml=new WeakMap,Tl=new WeakMap,Ll=new WeakMap,Il=new WeakSet,Sl=new WeakMap;class Ol extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Il),(0,r.A)(this,Ml,gl(this)),(0,r.A)(this,Tl,(vl(this),bl(this))),(0,r.A)(this,Ll,(Al(this),fl(this))),(0,r.A)(this,Sl,(kl(this),e=>{(0,s.A)(Il,this,yl).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 h().createElement(_l,{host:this,messages:this.messages,errorBoundary:this.errorBoundary,onStoryboardUpdate:(0,c.A)(Sl,this)})}}function _l(e){let{messages:t,host:n,errorBoundary:i,onStoryboardUpdate:a}=e;const r=(0,p.useMemo)((()=>/(?:^|\n)```easy_cmd_vb_block_(page|storyboard)\n([\s\S]*?)\n```(?:$|\n)/gm),[]),o=(0,p.useRef)(new Map),[s,l]=(0,p.useState)([]),c=(0,p.useRef)(!1);(0,p.useEffect)((()=>{for(const n of null!=t?t:[]){var e;if("assistant"!==n.role)continue;let t;r.lastIndex=null!==(e=o.current.get(n.key))&&void 0!==e?e:0;const i=[];let a=!1;for(;t=r.exec(n.content);){o.current.set(n.key,r.lastIndex);const[,e,s]=t;try{const t=JSON.parse(s);"page"===e?(a=!0,i.push(...t)):i.push({...t,type:"item"})}catch(e){console.error("parse storyboard failed:",e)}}a?l(i):i.length>0&&l((e=>[...e,...i]))}}),[r,t]);const[d,u]=(0,p.useState)([]);(0,p.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,p.useEffect)((()=>{null==a||a(d)}),[a,d]);const m=(0,p.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,p.useEffect)((()=>{c.current||setTimeout((()=>{m.scrollTo(0,m.scrollHeight)}),1)}),[t,m]),(0,p.useEffect)((()=>{const e=()=>{c.current=m.scrollTop+m.clientHeight+6<m.scrollHeight};return m.addEventListener("scroll",e),()=>{m.removeEventListener("scroll",e)}}),[m]),h().createElement(h().Fragment,null,null==t?void 0:t.map(((e,t)=>{var n;return h().createElement(dl,{key:null!==(n=e.key)&&void 0!==n?n:`index-${t}`,message:e})})))}hl=Ol,({e:[gl,vl,bl,Al,fl,yl,wl,kl],c:[Cl,ml]}=(0,d.A)(hl,[El("visual-builder.chat-conversation",{styleTexts:[ul.A]})],[[xl({attribute:!1}),1,"messages"],[xl({type:Boolean}),1,"errorBoundary"],[Nl({type:"storyboard.update"}),1,"storyboardUpdate",e=>(0,c.A)(Ll,e),(e,t)=>(0,l.A)(Ll,e,t)]],0,(e=>Sl.has((0,o.A)(e))),m.ReactNextElement)),ml();var Rl=n(9575),Wl=n(5310);function Dl(e){let{variant:t,width:n,height:i,left:a,top:r,label:o}=e;return h().createElement("div",{className:"outline "+t,style:{width:n+8,height:i+8,left:a-4,top:r-4}},h().createElement("div",{className:"label"},o))}var Pl,$l=n(1563);let Bl,Ul,Fl,Vl,jl,zl,Xl,Kl,Jl,Hl,ql,Yl,Gl,Zl,Ql,ec;const{defineElement:tc,property:nc,event:ic,method:ac}=(0,u.createDecorators)();let rc;var oc=new WeakMap,sc=new WeakMap,lc=new WeakMap,cc=new WeakMap,dc=new WeakMap,pc=new WeakMap,hc=new WeakSet,uc=new WeakMap;class mc extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,hc),(0,r.A)(this,oc,(Bl(this),Fl(this))),(0,r.A)(this,sc,(Vl(this),jl(this))),(0,r.A)(this,lc,(zl(this),Xl(this))),(0,r.A)(this,cc,(Kl(this),Jl(this))),(0,r.A)(this,dc,(Hl(this),ql(this))),(0,r.A)(this,pc,(Yl(this),Gl(this))),(0,r.A)(this,uc,(ec(this),e=>{(0,s.A)(hc,this,Zl).emit(e)}))}get storyboard(){return(0,c.A)(oc,this)}set storyboard(e){(0,l.A)(oc,this,e)}get theme(){return(0,c.A)(sc,this)}set theme(e){(0,l.A)(sc,this,e)}get uiVersion(){return(0,c.A)(lc,this)}set uiVersion(e){(0,l.A)(lc,this,e)}get app(){return(0,c.A)(cc,this)}set app(e){(0,l.A)(cc,this,e)}get inspecting(){return(0,c.A)(dc,this)}set inspecting(e){(0,l.A)(dc,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 h().createElement(gc,{storyboard:this.storyboard,theme:this.theme,uiVersion:this.uiVersion,app:this.app,inspecting:this.inspecting,onActiveTargetChange:(0,c.A)(uc,this)})}}function gc(e){let{storyboard:t,theme:n,uiVersion:i,app:a,inspecting:r,onActiveTargetChange:o}=e;const s=(0,p.useRef)(),[l,c]=(0,p.useState)(!1),[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)({x:0,y:0}),[v,b]=(0,p.useState)([]),[A,y]=(0,p.useState)([]),[w,k]=(0,p.useState)([]),[E,x]=(0,p.useState)([]),N=(0,p.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,p.useEffect)((()=>{var e,t;if(!l)return;const n=et.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!n)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",{...n,filePath:`${location.origin}${(0,et.getBasePath)()}${null!==(t=window.PUBLIC_ROOT)&&void 0!==t?t:""}${n.filePath}`})}),[l]),(0,p.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,Wl.safeDump)(t,{schema:Wl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:a,theme:n,uiVersion:i})}),[a,l,t,n,i]);const C=(0,p.useMemo)((()=>{if(d)return()=>{setTimeout((()=>{window.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}})}),100)}}),[d]);(0,p.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,p.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 M=(0,p.useCallback)((e=>e.map((e=>{var t,n,i,a;const r=null!==(t=null==s||null===(n=s.current)||void 0===n?void 0:n.offsetLeft)&&void 0!==t?t:0,o=null!==(i=null==s||null===(a=s.current)||void 0===a?void 0:a.offsetTop)&&void 0!==i?i:0,{width:l,height:c,left:d,top:p,...h}=e;return{width:1*l,height:1*c,left:1*(d-m.x)+r,top:1*(p-m.y)+o,...h}}))),[m.x,m.y]);return(0,p.useEffect)((()=>{o(A[0])}),[A,o]),(0,p.useEffect)((()=>{x(M(A))}),[A,M]),(0,p.useEffect)((()=>{k(M(v))}),[v,M]),h().createElement("div",{className:f()("container",{inspecting:r})},h().createElement("iframe",{ref:s,src:`${(0,et.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:N,onMouseOut:C}),w.map(((e,t)=>h().createElement(Dl,(0,Rl.A)({key:t,variant:"hover"},e)))),E.map(((e,t)=>h().createElement(Dl,(0,Rl.A)({key:t,variant:"active"},e)))))}Pl=mc,({e:[Fl,Vl,jl,zl,Xl,Kl,Jl,Hl,ql,Yl,Gl,Zl,Ql,ec,Bl],c:[rc,Ul]}=(0,d.A)(Pl,[tc("visual-builder.chat-preview",{styleTexts:[$l.A]})],[[nc({attribute:!1}),1,"storyboard"],[nc(),1,"theme"],[nc(),1,"uiVersion"],[nc(),1,"app"],[nc({type:Boolean}),1,"inspecting"],[ic({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(pc,e),(e,t)=>(0,l.A)(pc,e,t)],[ac(),2,"select"]],0,(e=>uc.has((0,o.A)(e))),m.ReactNextElement)),Ul();let vc=!1;const bc="item:";let Ac=null;function fc(e){e.preventDefault(),e.stopPropagation(),function(e){const t=xc(e.composedPath());window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:t.map(Nc)}},location.origin)}(e)}function yc(e){e.preventDefault(),e.stopPropagation()}const wc=(0,kt.debounce)(((e,t,n)=>{let i=xc(e);if(0===i.length)for(const a of e)if(a instanceof HTMLElement&&a.shadowRoot){i=xc(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(Nc)}},location.origin))}),20,{leading:!0});function kc(e){wc(e.composedPath(),e.clientX,e.clientY)}function Ec(e){e.preventDefault(),e.stopPropagation(),Ac=null,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}},location.origin)}function xc(e){const t=[];return e.forEach((e=>{let n;if(e.nodeType===Node.ELEMENT_NODE&&e instanceof HTMLElement&&(n=e.dataset.iid)&&n.startsWith(bc)){const i=n.substring(bc.length);t.push({type:"item",uuid:i,label:Cc(e),element:e})}})),t}function Nc(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 Cc(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,ms.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(vc===e)return;vc=e;const t=e?"addEventListener":"removeEventListener";window[t]("click",fc,!0),window[t]("mousedown",yc,!0),window[t]("mouseover",yc,!0),window[t]("mouseup",yc,!0),window[t]("pointerdown",yc,!0),window[t]("pointerover",yc,!0),window[t]("pointerup",yc,!0),window[t]("pointerleave",Ec,!0),window[t]("pointermove",kc,!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=>Nc({...e,element:t,label:Cc(t)})))}},location.origin)}(e.data.payload)}})),window.addEventListener("scroll",(()=>{Tc({type:"scroll",payload:{x:window.scrollX,y:window.scrollY}})})))})));var Lc,Ic=n(4014),Sc=n(8918);let Oc,_c,Rc,Wc,Dc,Pc,$c,Bc,Uc,Fc,Vc;const{defineElement:jc,property:zc}=(0,u.createDecorators)();let Xc;var Kc=new WeakMap,Jc=new WeakMap,Hc=new WeakMap,qc=new WeakMap,Yc=new WeakMap;class Gc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Kc,_c(this)),(0,r.A)(this,Jc,(Rc(this),Wc(this))),(0,r.A)(this,Hc,(Dc(this),Pc(this))),(0,r.A)(this,qc,($c(this),Bc(this))),(0,r.A)(this,Yc,(Uc(this),Fc(this))),Vc(this)}get generations(){return(0,c.A)(Kc,this)}set generations(e){(0,l.A)(Kc,this,e)}get category(){return(0,c.A)(Jc,this)}set category(e){(0,l.A)(Jc,this,e)}get theme(){return(0,c.A)(Hc,this)}set theme(e){(0,l.A)(Hc,this,e)}get uiVersion(){return(0,c.A)(qc,this)}set uiVersion(e){(0,l.A)(qc,this,e)}get app(){return(0,c.A)(Yc,this)}set app(e){(0,l.A)(Yc,this,e)}render(){return h().createElement(Zc,{generations:this.generations,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app})}}function Zc(e){let{generations:t,category:n,theme:i,uiVersion:a,app:r}=e;const o=(0,p.useRef)(),[s,l]=(0,p.useState)(!1),[c,d]=(0,p.useState)(!1),u=(0,p.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,p.useEffect)((()=>{var e;if(!s)return;const t=et.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!t)throw new Error("Cannot find preview agent package: bricks/visual-builder");const n=o.current.contentWindow._preview_only_inject,i={...t,filePath:`${location.origin}${(0,et.getBasePath)()}${null!==(e=window.PUBLIC_ROOT)&&void 0!==e?e:""}${t.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>n(e,i,void 0,!0)))).then((()=>{d(!0)}))}),[s]),(0,p.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){var p;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(null!==(p=e.displayLevel)&&void 0!==p?p: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"}}}],u={brick:"visual-builder.pre-generated-table-view",properties:{style:{gridTemplateColumns:"120px 80px repeat(5, 1fr)"}},children:h};let m=0;for(const[e,t]of l){let i=0;const a=m===l.size-1;for(const[r,o]of t){if(0===i){let n;for(const t of o.values()){var g;n=null!==(g=t.propertyName)&&void 0!==g?g: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 v,b,A;const i=o.get(t),a=null!==(v=null==i?void 0:i.category)&&void 0!==v?v:n;let r;if(null!=i&&null!==(b=i.mockData)&&void 0!==b&&b.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!==(A=null==i?void 0:i.storyboard)&&void 0!==A?A:[]).filter((e=>!!(0,ms.isObject)(e)||(console.error("Unexpected type of storyboard:",typeof e),!1)));let c;switch(l.forEach(Qc),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++}m++}s("yaml",{yaml:(0,Wl.safeDump)(u,{schema:Wl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:r,theme:i,uiVersion:a,styleText:Sc.A})}),[r,c,t,i,a,n]),h().createElement("div",{className:f()("container")},h().createElement("iframe",{ref:o,src:`${(0,et.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:u}))}function Qc(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)}Lc=Gc,({e:[_c,Rc,Wc,Dc,Pc,$c,Bc,Uc,Fc,Vc],c:[Xc,Oc]}=(0,d.A)(Lc,[jc("visual-builder.pre-generated-preview",{styleTexts:[Ic.A]})],[[zc({attribute:!1}),1,"generations"],[zc(),1,"category"],[zc(),1,"theme"],[zc(),1,"uiVersion"],[zc(),1,"app"]],0,void 0,m.ReactNextElement)),Oc();var ed,td=n(9216);let nd;const{defineElement:id}=(0,u.createDecorators)();let ad;class rd extends m.ReactNextElement{render(){return h().createElement(od,null)}}function od(){return h().createElement("slot",null)}ed=rd,[ad,nd]=(0,d.A)(ed,[id("visual-builder.pre-generated-table-view",{styleTexts:[td.A]})],[],0,void 0,m.ReactNextElement).c,nd();var sd,ld=n(4967);let cd,dd,pd,hd,ud;const{defineElement:md,property:gd}=(0,u.createDecorators)();let vd;var bd=new WeakMap,Ad=new WeakMap;class fd extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,bd,dd(this)),(0,r.A)(this,Ad,(pd(this),hd(this))),ud(this)}get useBrick(){return(0,c.A)(bd,this)}set useBrick(e){(0,l.A)(bd,this,e)}get dataSource(){return(0,c.A)(Ad,this)}set dataSource(e){(0,l.A)(Ad,this,e)}render(){return h().createElement(yd,{useBrick:this.useBrick,dataSource:this.dataSource})}}function yd(e){let{useBrick:t,dataSource:n}=e;return t?h().createElement(Zr.ReactUseMultipleBricks,{useBrick:t,data:n,errorBoundary:!0}):null}sd=fd,({e:[dd,pd,hd,ud],c:[vd,cd]}=(0,d.A)(sd,[md("visual-builder.pre-generated-container",{styleTexts:[ld.A]})],[[gd({attribute:!1}),1,"useBrick"],[gd({attribute:!1}),1,"dataSource"]],0,void 0,m.ReactNextElement)),cd(),n(2080),customElements.define("visual-builder.check-editor-by-name",(0,ms.createProviderClass)((async function(e){try{await et.__secret_internals.loadEditors([e])}catch{return!1}return!!et.customEditors.get(e)})));var wd=n(6376);function kd(e,t){const n=new Map;for(const i of e){const e=(0,wd.collectMemberUsage)([i.if,i.value,i.resolve],t);n.set(i,e)}return n}function Ed(e,t){e.forEach((n=>{!function(e,t){var n;const{dependencyList:i,nodeList:a,parents:r,result:o}=t,s=(0,kt.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)})),Ed(n,t)}(l,{dependencyList:i,nodeList:a,parents:[...r,s],result:e})}}(n,{...t,nodeList:e})}))}customElements.define("visual-builder.get-data-deps",(0,ms.createProviderClass)(kd)),customElements.define("visual-builder.get-dependency-tree",(0,ms.createProviderClass)((function(e,t){const n=e,i=kd(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 Ed(n,{result:r,dependencyList:a,parents:[]}),r})));let xd=et.__secret_internals;try{var Nd;const e=window.dll;if(e&&null!==(Nd=window.BRICK_NEXT_VERSIONS)&&void 0!==Nd&&null!==(Nd=Nd["brick-container"])&&void 0!==Nd&&Nd.startsWith("2.")){const{developHelper:t}=e("tYg3");xd={getBrickPackagesById(e){var n;return null===(n=t.getBrickPackages)||void 0===n?void 0:n.call(t).find((t=>t.id===e))}}}}catch(e){console.error("Try to use v2 runtime APIs failed:",e)}const Cd=xd;var Md,Td=n(1304),Ld=n(9034),Id=n(4162);let Sd,Od,_d,Rd,Wd,Dd,Pd,$d,Bd,Ud,Fd,Vd,jd,zd,Xd,Kd,Jd,Hd,qd,Yd,Gd,Zd,Qd,ep,tp,np,ip,ap,rp;const{defineElement:op,property:sp,event:lp}=(0,u.createDecorators)();let cp;var dp=new WeakMap,pp=new WeakMap,hp=new WeakMap,up=new WeakMap,mp=new WeakMap,gp=new WeakMap,vp=new WeakMap,bp=new WeakMap,Ap=new WeakMap,fp=new WeakSet,yp=new WeakMap,wp=new WeakMap,kp=new WeakMap,Ep=new WeakMap,xp=new WeakMap;class Np extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,fp),(0,r.A)(this,dp,Od(this)),(0,r.A)(this,pp,(_d(this),Rd(this))),(0,r.A)(this,hp,(Wd(this),Dd(this))),(0,r.A)(this,up,(Pd(this),$d(this))),(0,r.A)(this,mp,(Bd(this),Ud(this))),(0,r.A)(this,gp,(Fd(this),Vd(this))),(0,r.A)(this,vp,(jd(this),zd(this))),(0,r.A)(this,bp,(Xd(this),Kd(this))),(0,r.A)(this,Ap,(Jd(this),Hd(this))),(0,r.A)(this,yp,(Gd(this),e=>{(0,s.A)(fp,this,qd).emit(e)})),(0,r.A)(this,wp,Zd(this)),(0,r.A)(this,kp,(tp(this),e=>{(0,s.A)(fp,this,Qd).emit(e)})),(0,r.A)(this,Ep,np(this)),(0,r.A)(this,xp,(rp(this),e=>{(0,s.A)(fp,this,ip).emit(e)}))}get previewUrl(){return(0,c.A)(dp,this)}set previewUrl(e){(0,l.A)(dp,this,e)}get generations(){return(0,c.A)(pp,this)}set generations(e){(0,l.A)(pp,this,e)}get mocks(){return(0,c.A)(hp,this)}set mocks(e){(0,l.A)(hp,this,e)}get busy(){return(0,c.A)(up,this)}set busy(e){(0,l.A)(up,this,e)}get category(){return(0,c.A)(mp,this)}set category(e){(0,l.A)(mp,this,e)}get theme(){return(0,c.A)(gp,this)}set theme(e){(0,l.A)(gp,this,e)}get uiVersion(){return(0,c.A)(vp,this)}set uiVersion(e){(0,l.A)(vp,this,e)}get app(){return(0,c.A)(bp,this)}set app(e){(0,l.A)(bp,this,e)}render(){return h().createElement(Cp,{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)(yp,this),onApprove:(0,c.A)(kp,this),onViewAttrPrompt:(0,c.A)(xp,this)})}}function Cp(e){let{previewUrl:t,generations:n,mocks:i,busy:a,category:r,theme:o,uiVersion:s,app:l,onComment:c,onApprove:d,onViewAttrPrompt:u}=e;const m=(0,p.useRef)(),[g,v]=(0,p.useState)(!1),[b,A]=(0,p.useState)(!1),y=(0,p.useRef)([]),w=(0,p.useRef)([]),k=(0,p.useRef)([]);(0,p.useEffect)((()=>{var e;k.current=null!==(e=null==n?void 0:n.filter((e=>e.approved)).map((e=>e.propertyId)))&&void 0!==e?e:[]}),[n]);const E=(0,p.useCallback)((()=>{const e=()=>{var t;const n=null===(t=m.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?v(!0):setTimeout(e,100)};e()}),[]);return(0,p.useEffect)((()=>{g&&m.current.contentWindow.postMessage({channel:"raw-data-preview",type:"busy",payload:a},location.origin)}),[a,g]),(0,p.useEffect)((()=>{if(g){const e=m.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"approve":d(t.payload);break;case"viewAttrPrompt":u(t.payload);break;case"updatePropertyToggleState":y.current=t.payload;break;case"updatePropertyExpandState":w.current=t.payload;break;case"updatePropertyApproveState":k.current=t.payload}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t)}}}),[d,c,u,g]),(0,p.useEffect)((()=>{var e;if(!g)return;const n=Cd.getBrickPackagesById("bricks/visual-builder");if(!n)throw new Error("Cannot find preview agent package: bricks/visual-builder");const i=m.current.contentWindow._preview_only_inject,a={...n,filePath:t?new URL(n.filePath,new URL(t,location.origin)).toString():`${location.origin}${(0,et.getBasePath)()}${null!==(e=window.PUBLIC_ROOT)&&void 0!==e?e:""}${n.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>i(e,a,void 0,!0)))).then((()=>{A(!0)}))}),[t,g]),(0,p.useEffect)((()=>{var e;if(!b)return;const t=null===(e=m.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"}},{brick:"div",properties:{textContent:"视觉重量 (由低至高)",className:"head-cell",style:{gridColumn:"span 4",textAlign:"center"}}},{brick:"div",properties:{textContent:"确认",className:"head-cell"}},{brick:"div",properties:{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:y.current,onChange:{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"updatePropertyToggleState",payload:"<% CTX.propertyToggleState %>"}]}},{name:"propertyExpandState",value:w.current,onChange:{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"updatePropertyExpandState",payload:"<% CTX.propertyExpandState %>"}]}},{name:"propertyApproveState",value:k.current,onChange:{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"updatePropertyApproveState",payload:"<% CTX.propertyApproveState %>"}]}},{name:"busy"}],properties:{style:{gridTemplateColumns:"minmax(120px, 0.5fr) 32px auto repeat(5, 1fr) auto 1fr"}},children:a};for(let e=0,t=n.length;e<t;e++){var c,d;const r=n[e],o=e===t-1,s=new Map;for(const e of null!==(p=r.candidates)&&void 0!==p?p:[]){var p,h;s.set(null!==(h=e.visualWeight)&&void 0!==h?h:0,e)}a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:[{brick:"span",properties:{textContent:`${null!==(c=r.propertyName)&&void 0!==c?c:r.propertyId}`}},{brick:"eo-button",properties:{className:"btn-toggle",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!==(d=r.candidates)&&void 0!==d&&d.length?[{brick:"eo-icon",properties:{lib:"fa",prefix:"fas",icon:"circle",style:{color:r.generationId?"var(--palette-green-6)":"var(--palette-gray-6)",transformOrigin:"center center",transform:"scale(0.5)"}}}]:void 0},{brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:[{brick:"eo-link",properties:{type:"text",textContent:r.propertyType},events:{click:{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"viewAttrPrompt",payload:r}]}}}]});let l=r.propertyValues;if(!l){var u,g;const e=(null!==(u=null!==(g=r.mockData)&&void 0!==g?g:i)&&void 0!==u?u:[]).slice();e.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})),l=e.map((e=>e[r.propertyId]))}a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:[{brick:"div",properties:{className:"list"},children:l.map(((e,t)=>({brick:"div",if:0===t||`<%= CTX.propertyToggleState.includes(${JSON.stringify(r.propertyId)}) %>`,properties:{className:`<%= \`raw-content\${ CTX.propertyExpandState.includes(${JSON.stringify(r.propertyId)}) ? " expand" : "" }\` %>`,textContent:void 0===e?"":"string"==typeof e?e:JSON.stringify(e,null,2)}})))},{brick:"eo-button",properties:{className:"btn-toggle",type:"text",icon:`<%=\n {\n lib: "fa",\n prefix: "fas",\n icon: CTX.propertyExpandState.includes(${JSON.stringify(r.propertyId)}) ? "chevron-up" : "chevron-down",\n }\n %>`},events:{click:{action:"context.replace",args:["propertyExpandState",`<%\n CTX.propertyExpandState.includes(${JSON.stringify(r.propertyId)})\n ? CTX.propertyExpandState.filter((id) => id !== ${JSON.stringify(r.propertyId)})\n : CTX.propertyExpandState.concat(${JSON.stringify(r.propertyId)})\n %>`]}}}]});for(let e=-1;e<3;e++){const t=s.get(e);let n;t&&(n=(0,Td.w)(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:{[r.propertyId]:e}},errorBoundary:!0}))):void 0}]})}a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":o})},children:r.candidates?[{brick:"eo-checkbox",properties:{value:`<%= CTX.propertyApproveState.includes(${JSON.stringify(r.propertyId)}) ? ["approved"] : [] %>`,options:[{label:"",value:"approved"}],disabled:`<%= CTX.busy || ${JSON.stringify(!r.generationId)} %>`},events:{change:[{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"approve",payload:{approved:"<% EVENT.detail.length > 0 %>",propertyInstanceId:r.propertyInstanceId}}]},{action:"context.replace",args:["propertyApproveState",`<%\n EVENT.detail.length > 0\n ? CTX.propertyApproveState.concat(${JSON.stringify(r.propertyId)})\n : CTX.propertyApproveState.filter((id) => id !== ${JSON.stringify(r.propertyId)})\n %>`]}]}}]:void 0},{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 || CTX.propertyApproveState.includes(${JSON.stringify(r.propertyId)}) %>`},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,Wl.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:Wl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:l,theme:o,uiVersion:s,styleText:Id.A})}),[l,b,n,o,s,r,i]),h().createElement("div",{className:f()("container")},h().createElement("iframe",{ref:m,src:null!=t?t:`${(0,et.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:E}))}Md=Np,({e:[Od,_d,Rd,Wd,Dd,Pd,$d,Bd,Ud,Fd,Vd,jd,zd,Xd,Kd,Jd,Hd,qd,Yd,Gd,Zd,Qd,ep,tp,np,ip,ap,rp],c:[cp,Sd]}=(0,d.A)(Md,[op("visual-builder.raw-data-preview",{styleTexts:[Ld.A]})],[[sp(),1,"previewUrl"],[sp({attribute:!1}),1,"generations"],[sp({attribute:!1}),1,"mocks"],[sp({type:Boolean}),1,"busy"],[sp(),1,"category"],[sp(),1,"theme"],[sp(),1,"uiVersion"],[sp(),1,"app"],[lp({type:"comment"}),1,"commentEvent",e=>(0,c.A)(Ap,e),(e,t)=>(0,l.A)(Ap,e,t)],[lp({type:"approve"}),1,"approveEvent",e=>(0,c.A)(wp,e),(e,t)=>(0,l.A)(wp,e,t)],[lp({type:"view.attr.prompt"}),1,"viewAttrPromptEvent",e=>(0,c.A)(Ep,e),(e,t)=>(0,l.A)(Ep,e,t)]],0,(e=>xp.has((0,o.A)(e))),m.ReactNextElement)),Sd();var Mp=n(264);customElements.define("visual-builder.parse-path",(0,ms.createProviderClass)((async function(e,t){const n=[];return{regexp:(0,Mp.MM)(e,n,(0,kt.defaults)(t,{end:!1,strict:!1,sensitive:!0})),keys:n}})));var Tp=n(780);customElements.define("visual-builder.batch-update-raw-data-generated-view",(0,ms.createProviderClass)((async function(e){return Promise.allSettled(e.map((e=>{let{attrInstanceId:t,...n}=e;return(0,Tp._)("RAW_DATA_GENERATED_VIEW@EASYOPS",{...n,attr:[t]})})))})));var Lp=n(3084),Ip=n(7710),Sp=n(5799),Op=n(4671),_p=n(8397),Rp=n(3404),Wp=n(3287),Dp=n(76);customElements.define("visual-builder.get-raw-data-system-prompts",(0,ms.createProviderClass)((function(){return{boolean:Lp,"date-time":Ip,enum:Sp,number:Op,others:_p,"struct-list":Rp,struct:Wp,json:Dp}})));const Pp="bricks/visual-builder/pre-generated-config";wi.i18n.getFixedT(null,Pp);var $p,Bp=n(8027),Up=n(8488),Fp=n(2120);let Vp,jp,zp,Xp,Kp,Jp,Hp,qp,Yp,Gp,Zp,Qp,eh,th,nh,ih,ah;(0,wi.initializeI18n)(Pp,{en:{},zh:{}});const{defineElement:rh,property:oh,event:sh}=(0,u.createDecorators)();let lh;var ch,dh=new WeakMap,ph=new WeakMap,hh=new WeakMap,uh=new WeakMap,mh=new WeakMap,gh=new WeakSet,vh=new WeakMap,bh=new WeakMap,Ah=new WeakMap;class fh extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,gh),(0,r.A)(this,dh,jp(this)),(0,r.A)(this,ph,(zp(this),Xp(this))),(0,r.A)(this,hh,(Kp(this),Jp(this))),(0,r.A)(this,uh,(Hp(this),qp(this))),(0,r.A)(this,mh,(Yp(this),Gp(this))),(0,r.A)(this,vh,(eh(this),th(this))),(0,r.A)(this,bh,(ah(this),e=>{(0,s.A)(gh,this,Zp).emit(e)})),(0,r.A)(this,Ah,(e=>{(0,s.A)(gh,this,nh).emit(e)}))}get previewUrl(){return(0,c.A)(dh,this)}set previewUrl(e){(0,l.A)(dh,this,e)}get attrList(){return(0,c.A)(ph,this)}set attrList(e){(0,l.A)(ph,this,e)}get mockList(){return(0,c.A)(hh,this)}set mockList(e){(0,l.A)(hh,this,e)}get containerConfig(){return(0,c.A)(uh,this)}set containerConfig(e){(0,l.A)(uh,this,e)}render(){return h().createElement(yh,{previewUrl:this.previewUrl,attrList:this.attrList,mockList:this.mockList,containerConfig:this.containerConfig,onChange:(0,c.A)(bh,this),onBrickChange:(0,c.A)(Ah,this),root:this})}}function yh(e){let{previewUrl:t,attrList:n,mockList:i,containerConfig:a,root:r,onChange:o,onBrickChange:s}=e;const l=(0,p.useRef)(),[c,d]=(0,p.useState)(!1),[u,m]=(0,p.useState)(!1),[g,v]=(0,p.useState)(null);(0,p.useEffect)((()=>{g&&o(g)}),[g,o]),(0,p.useEffect)((()=>{if(g){const e=function(e,t){let{type:n,dataName:i,dataType:a,settings:r}=t;if(!n||!i)return null;const o=`${"state"===a?"STATE":"CTX"}${(0,Bp._)(i)}`;if("chart"===n){var s,l;const e=`<%= ${o}${null!=r&&r.pagination?".list":""} %>`;return{brick:"eo-mini-line-chart",properties:{width:600,height:200,xField:null===(s=r.fields)||void 0===s?void 0:s.xField,yField:null===(l=r.fields)||void 0===l?void 0:l.yField,lineColor:"var(--palette-orange-6)",data:e}}}if("cards"===n)return{brick:"eo-grid-layout",properties:{templateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:"var(--card-content-gap)"},slots:{"":{type:"bricks",bricks:[{brick:":forEach",dataSource:`<%= ${o}${null!=r&&r.pagination?".list":""} %>`,slots:{"":{type:"bricks",bricks:[{brick:"eo-card-item",properties:{cardTitle:(0,kt.has)(null==r?void 0:r.fields,"title")&&"string"==typeof r.fields.title?`<% ITEM${(0,Bp._)(r.fields.title)} %>`:void 0,description:(0,kt.has)(null==r?void 0:r.fields,"description")&&"string"==typeof r.fields.description?`<% ITEM${(0,Bp._)(r.fields.description)} %>`:void 0}}]}}}]}}};const c=`<%= ${null!=r&&r.pagination?o:`{ list: ${o} }`} %>`,d=new Map;for(const t of e)if(t.config){const e="table"===n?(0,Td.m)(t.config,".cellData"):(0,Td.w)(t.config,t.id);e&&d.set(t.id,e)}const p=Object.fromEntries(e.map((e=>{const t=d.get(e.id);return t?[`[${e.id}]`,{type:"bricks",bricks:[t]}]:null})).filter(Boolean));switch(n){case"table":return{brick:"eo-next-table",properties:{rowKey:"instanceId",columns:e.map((e=>{const t={title:e.name,dataIndex:e.id,key:e.id};return d.has(e.id)&&(t.useChildren=`[${e.id}]`),t})),dataSource:c,...null!=r&&r.pagination?null:{pagination:!1}},slots:p};case"descriptions":return{brick:"eo-descriptions",properties:{column:2,list:e.map((e=>{const t={label:e.name};return e.config&&(t.useChildren=`[${e.id}]`),t})),dataSource:c},slots:p}}return null}(g,a);s(e)}}),[g,a,s]);const b=(0,p.useCallback)((()=>{const e=()=>{var t;const n=null===(t=l.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?d(!0):setTimeout(e,100)};e()}),[]);return(0,p.useEffect)((()=>{var e;const t=null===(e=l.current)||void 0===e?void 0:e.contentWindow;if(!c||!t)return;const n=new ResizeObserver((()=>{r.style.height=`${t.document.body.scrollHeight}px`}));return n.observe(t.document.body),()=>n.disconnect()}),[c,r]),(0,p.useEffect)((()=>{var e;if(!c)return;const t=null===(e=l.current)||void 0===e?void 0:e.contentWindow,n=e=>{let{data:t}=e;"pre-generated-config"===(null==t?void 0:t.channel)&&"config-change"===t.type&&v(t.payload)};return t.addEventListener("message",n),()=>{t.removeEventListener("message",n)}}),[c]),(0,p.useEffect)((()=>{var e;if(!c)return;const n=et.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!n)throw new Error("Cannot find preview agent package: bricks/visual-builder");const i=l.current.contentWindow._preview_only_inject,a={...n,filePath:t?new URL(n.filePath,new URL(t,location.origin)).toString():`${location.origin}${(0,et.getBasePath)()}${null!==(e=window.PUBLIC_ROOT)&&void 0!==e?e:""}${n.filePath}`};Promise.allSettled([i("visual-builder.pre-generated-container",a,void 0,!0)]).then((()=>{m(!0)}))}),[t,c]),(0,p.useEffect)((()=>{var e,t,a,r,o;if(!u)return;const s=null===(e=l.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const c=null!==(t=null==n?void 0:n.slice(0,5))&&void 0!==t?t:[],d=c.map((e=>e.id)),p=(0,kt.uniqueId)("event-agent-");s("yaml",{yaml:(0,Wl.safeDump)([{brick:"eo-next-table",errorBoundary:!0,properties:{pagination:!1,rowSelection:!0,rowKey:"id",rowDraggable:!0,bordered:!0,dataSource:{list:n},selectedRowKeys:d,columns:[{title:"ID",dataIndex:"id",key:"id",width:"20%"},{title:"Name",dataIndex:"name",key:"name",width:"20%"},{title:"Preview",dataIndex:"preview",key:"preview",colSpan:2,useBrick:{brick:"div",children:null==n?void 0:n.flatMap((e=>{var t,n,a;const r=null===(t=e.candidates)||void 0===t?void 0:t.map((t=>{const n=`<%=\n DATA.rowData.id === ${JSON.stringify(e.id)} &&\n ${JSON.stringify(t.visualWeight)} === CTX.weightMap.get(${JSON.stringify(e.id)})\n %>`,a=(0,Td.w)(t,e.id);var r;if(a)return{if:n,brick:"visual-builder.pre-generated-container",properties:{useBrick:a,dataSource:null!==(r=null==i?void 0:i[0])&&void 0!==r?r:{}}}})).filter(Boolean);return null!=r&&r.length?r:{if:`<% DATA.rowData.id === ${JSON.stringify(e.id)} %>`,brick:"span",properties:{textContent:null!==(n=null==i||null===(a=i[0])||void 0===a?void 0:a[e.id])&&void 0!==n?n:""}}}))}},{dataIndex:"operations",key:"operations",colSpan:0,width:81,useBrick:{if:"<% CTX.availableWeights.get(DATA.rowData.id)?.length %>",brick:"eo-mini-actions",properties:{actions:'<%=\n [\n {\n icon: {\n lib: "antd",\n icon: "minus",\n },\n event: "minus",\n disabled: CTX.weightMap.get(DATA.rowData.id) <= CTX.availableWeights.get(DATA.rowData.id)[0],\n },\n {\n icon: {\n lib: "antd",\n icon: "plus",\n },\n event: "plus",\n disabled: CTX.weightMap.get(DATA.rowData.id) >= CTX.availableWeights.get(DATA.rowData.id).slice(-1)[0],\n },\n ]\n %>'},events:{minus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, DATA.rowData.id, -1) %>"]},plus:{action:"context.replace",args:["weightMap","<% FN.updateWeightMap(CTX.weightMap, CTX.availableWeights, DATA.rowData.id, 1) %>"]}}}}]},events:{"row.select":{action:"context.replace",args:["selectedAttrs","<%= EVENT.detail.rows %>"]},"row.drag":{action:"context.replace",args:["orderedAttrIds","<%= EVENT.detail.list.map((attr) => attr.id) %>"]}}},{brick:"eo-event-agent",properties:{id:p},events:{trigger:{action:"window.postMessage",args:[{channel:"pre-generated-config",type:"config-change",payload:"<% FN.getConfig(CTX.selectedAttrs, CTX.orderedAttrIds, CTX.weightMap) %>"}]}},lifeCycle:{onPageLoad:{target:`#${p}`,method:"trigger"}},portal:!0,errorBoundary:!0},{brick:"eo-message-listener",properties:{sameOrigin:!0},events:{message:{if:"<% EVENT.detail.data?.channel === 'pre-generated-config' && EVENT.detail.data.type === 'get-config' %>",action:"window.postMessage",args:[{channel:"pre-generated-config",type:"get-config-response",id:"<%= EVENT.detail.data.id %>",payload:"<% FN.getConfig(CTX.selectedAttrs, CTX.orderedAttrIds, CTX.weightMap) %>"}]}},portal:!0,errorBoundary:!0}],{skipInvalid:!0})},{theme:"light",uiVersion:"8.2",styleText:Fp.A,context:[{name:"orderedAttrIds",value:null!==(a=null==n?void 0:n.map((e=>e.id)))&&void 0!==a?a:[],onChange:{target:`#${p}`,method:"trigger"}},{name:"selectedAttrs",value:c,onChange:{target:`#${p}`,method:"trigger"}},{name:"availableWeights",value:`<% new Map(${JSON.stringify(null!==(r=null==n?void 0:n.map((e=>{var t,n;return[e.id,null!==(t=null===(n=e.candidates)||void 0===n?void 0:n.map((e=>e.visualWeight)).sort(((e,t)=>e-t)))&&void 0!==t?t:[]]})))&&void 0!==r?r:[])}) %>`},{name:"weightMap",value:`<% new Map(${JSON.stringify(null!==(o=null==n?void 0:n.map((e=>{var t,n;return[e.id,null===(n=e.candidates,0,t=null==n?void 0:n.reduce(((e,t)=>!e||Math.abs(t.visualWeight-0)<Math.abs(e.visualWeight-0)?t:e)))||void 0===t?void 0:t.visualWeight]})))&&void 0!==o?o:[])}) %>`,onChange:{target:`#${p}`,method:"trigger"}}],functions:[{name:"updateWeightMap",source:"/**\n * @param {Map<string, number>} weightMap\n * @param {Map<string, number[]>} availableWeights\n * @param {string} key\n * @param {1 | -1} direction\n * @returns {Map<string, number>}\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction updateWeightMap(weightMap, availableWeights, key, direction) {\n return new Map([...weightMap].map(_ref => {\n let [k, v] = _ref;\n if (k === key) {\n const weights = availableWeights.get(k);\n const index = weights.indexOf(v);\n const nextIndex = Math.max(0, Math.min(index + direction, weights.length - 1));\n return [k, weights[nextIndex]];\n }\n return [k, v];\n }));\n}"},{name:"getConfig",source:"\n function getConfig(selectedAttrs, orderedAttrIds, weightMap) {\n return selectedAttrs.map((attr) => ({\n id: attr.id,\n name: attr.name,\n config: attr.candidates?.find((can) => can.visualWeight === weightMap.get(attr.id)),\n })).sort((a, b) => orderedAttrIds.indexOf(a.id) - orderedAttrIds.indexOf(b.id));\n }\n "}]})}),[n,u,i]),h().createElement("div",{className:"container"},h().createElement("iframe",{ref:l,src:null!=t?t:`${(0,et.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:b}))}let wh,kh,Eh,xh,Nh,Ch,Mh,Th,Lh;$p=fh,({e:[jp,zp,Xp,Kp,Jp,Hp,qp,Yp,Gp,Zp,Qp,eh,th,nh,ih,ah],c:[lh,Vp]}=(0,d.A)($p,[rh("visual-builder.pre-generated-config",{styleTexts:[Up.A]})],[[oh(),1,"previewUrl"],[oh({attribute:!1}),1,"attrList"],[oh({attribute:!1}),1,"mockList"],[oh({attribute:!1}),1,"containerConfig"],[sh({type:"change"}),1,"changeEvent",e=>(0,c.A)(mh,e),(e,t)=>(0,l.A)(mh,e,t)],[sh({type:"brick.change"}),1,"brickChangeEvent",e=>(0,c.A)(vh,e),(e,t)=>(0,l.A)(vh,e,t)]],0,(e=>Ah.has((0,o.A)(e))),m.ReactNextElement)),Vp();const{defineElement:Ih,property:Sh}=(0,u.createDecorators)();let Oh;var _h=new WeakMap,Rh=new WeakMap,Wh=new WeakMap,Dh=new WeakMap;class Ph extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,_h,kh(this)),(0,r.A)(this,Rh,(Eh(this),xh(this))),(0,r.A)(this,Wh,(Nh(this),Ch(this))),(0,r.A)(this,Dh,(Mh(this),Th(this))),Lh(this)}get previewUrl(){return(0,c.A)(_h,this)}set previewUrl(e){(0,l.A)(_h,this,e)}get container(){return(0,c.A)(Rh,this)}set container(e){(0,l.A)(Rh,this,e)}get attrList(){return(0,c.A)(Wh,this)}set attrList(e){(0,l.A)(Wh,this,e)}get mockList(){return(0,c.A)(Dh,this)}set mockList(e){(0,l.A)(Dh,this,e)}render(){return h().createElement($h,{root:this,previewUrl:this.previewUrl,container:this.container,attrList:this.attrList,mockList:this.mockList})}}function $h(e){let{root:t,previewUrl:n,container:i,attrList:a,mockList:r}=e;const o=(0,p.useRef)(),[s,l]=(0,p.useState)(!1),c=(0,p.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,p.useEffect)((()=>{var e;const n=null===(e=o.current)||void 0===e?void 0:e.contentWindow;if(!s||!n)return;const i=new ResizeObserver((()=>{t.style.height=`${n.document.body.scrollHeight}px`}));return i.observe(n.document.body),()=>i.disconnect()}),[s,t]),(0,p.useEffect)((()=>{var e,t;const n=null===(e=o.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s||!n||!a)return;let l;l="descriptions"===i?{brick:"eo-descriptions",errorBoundary:!0,properties:{column:2,list:a.map((e=>{const t={label:e.name};return e.config&&(t.useBrick=(0,Td.w)(e.config,e.id)),t})),dataSource:null==r?void 0:r[0]}}:{brick:"eo-next-table",errorBoundary:!0,properties:{rowKey:null===(t=a[0])||void 0===t?void 0:t.id,columns:a.map((e=>{const t={title:e.name,dataIndex:e.id,key:e.id};return e.config&&(t.useBrick=(0,Td.m)(e.config,".cellData")),t})),dataSource:{list:r,page:1,pageSize:20}}},n("yaml",{yaml:(0,Wl.safeDump)([l],{skipInvalid:!0})},{theme:"light",uiVersion:"8.2",styleText:Fp.A})}),[s,a,r,i]),h().createElement("div",{className:"container"},h().createElement("iframe",{ref:o,src:null!=n?n:`${(0,et.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:c}))}ch=Ph,({e:[kh,Eh,xh,Nh,Ch,Mh,Th,Lh],c:[Oh,wh]}=(0,d.A)(ch,[Ih("visual-builder.pre-generated-config-preview",{styleTexts:[Up.A]})],[[Sh(),1,"previewUrl"],[Sh(),1,"container"],[Sh({attribute:!1}),1,"attrList"],[Sh({attribute:!1}),1,"mockList"]],0,void 0,m.ReactNextElement)),wh();var Bh=n(8406);function Uh(e){switch(e){case"list":return[{label:"表格",value:"table"},{label:"卡片列表",value:"cards"}];case"list-with-pagination":return[{label:"表格",value:"table",settings:{pagination:!0}},{label:"卡片列表",value:"cards",settings:{pagination:!0}}];case"object":return[{label:"属性详情",value:"descriptions"}];default:return[]}}customElements.define("visual-builder.get-config-by-data-for-ai",(0,ms.createProviderClass)((async function(e){if(null==(null==e?void 0:e.value))return null;const{value:t}=e;let n,i="unknown",a=[];if(Array.isArray(t))t.length>0&&(i="list",n=t[0],a=t);else if((0,kt.isObject)(t)){const e=t;(0,ms.hasOwnProperty)(e,"list")&&Array.isArray(e.list)&&(0,ms.hasOwnProperty)(e,"page")&&"number"==typeof e.page&&(0,ms.hasOwnProperty)(e,"total")&&"number"==typeof e.total?e.list.length>0&&(i="list-with-pagination",n=e.list[0],a=e.list):(i="object",n=t,a=[n])}const r=new Set;for(const e of a){if(!(0,kt.isObject)(e)){i="unknown";break}for(const t of Object.keys(e))r.add(t)}let o=[];if("unknown"!==i&&(0,kt.isObject)(n)&&(0,ms.hasOwnProperty)(n,"_object_id")&&"string"==typeof n._object_id){const e=n._object_id,{list:t}=await(0,Bh.y)("MODEL_OBJECT",{fields:["name","objectId","attrList.id","attrList.name","attrList.generatedView.list"],query:{objectId:e,ignore:{$ne:!0}},page:1});0===t.length?console.warn("Can not find object by objectId:",e):o=t[0].attrList.map((e=>{var t;return r.has(e.id)?{id:e.id,name:e.name,candidates:null===(t=e.generatedView)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.list}:null})).filter(Boolean)}else console.warn("Can not detect objectId with data:",e),o=[...r].map((e=>({id:e,name:e})));return{type:i,attrList:o,dataList:a,containerOptions:Uh(i)}})))},2080:(e,t,n)=>{n.d(t,{ADVANCED_CHANGE_KEY:()=>Te,SchemaField:()=>Le});var i,a=n(4635),r=n(918),o=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),p=n(8769),h=n.n(p),u=n(1123),m=n(9006),g=(n(6477),n(5908)),v=n(7091),b=n(7428),A=n(6768),f=n(5694),y=n(9708),w=n(3848),k=n(3768),E=n(2803),x=n(3824),N=n(2513),C=n(5067),M=n(1477),T=n(4287),L=n(966),I=n(5768),S=n(6110),O=n(5944),_=n(8409),R=n(2716),W=n(3995),D=(n(74),n(1030)),P=n.n(D);let $,B,U,F,V,j,z,X,K,J,H,q,Y,G,Z,Q,ee,te,ne,ie,ae,re,oe,se,le,ce,de,pe,he,ue,me,ge,ve,be,Ae,fe,ye,we;const{defineElement:ke,property:Ee,method:xe,event:Ne}=(0,u.createDecorators)(),Ce=h().forwardRef(et),Me="before_submit",Te="on_advanced_change",Le=(0,v.Uy)({components:{FormLayout:y.Hb,Input:y.pd,FormItem:E.M,FormItemWithoutAdvanced:y.eI,FormCollapse:y.w9,NumberPicker:y.Y_,Radio:y.sx,Select:y.l6,Switch:y.dO,CategoryTitle:k.H,CodeEditor:x.S,IconSelect:N.r,ColorPicker:C.h,UseChildrenSelect:I._,InputWithUrl:M.r,InputWithUnit:L.U,TextAlignRadio:T.p,CustomOptions:O.F,BoxSize:S.i,CustomTab:_.v}});let Ie,Se;var Oe=new WeakMap,_e=new WeakMap,Re=new WeakMap,We=new WeakMap,De=new WeakMap,Pe=new WeakMap,$e=new WeakMap,Be=new WeakMap,Ue=new WeakMap,Fe=new WeakMap,Ve=new WeakSet,je=new WeakMap,ze=new WeakMap,Xe=new WeakMap,Ke=new WeakMap,Je=new WeakMap,He=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,Ve),(0,r.A)(this,Oe,($(this),(0,p.createRef)())),(0,r.A)(this,_e,U(this)),(0,r.A)(this,Re,(F(this),V(this))),(0,r.A)(this,We,(j(this),z(this))),(0,r.A)(this,De,(X(this),K(this))),(0,r.A)(this,Pe,(J(this),H(this))),(0,r.A)(this,$e,(q(this),Y(this))),(0,r.A)(this,Be,(G(this),Z(this))),(0,r.A)(this,Ue,(Q(this),ee(this))),(0,r.A)(this,Fe,(te(this),ne(this))),(0,r.A)(this,je,(re(this),oe(this))),(0,r.A)(this,ze,(ce(this),de(this))),(0,r.A)(this,Xe,(ue(this),e=>{(0,s.A)(Ve,this,pe).emit(e)})),(0,r.A)(this,Ke,me(this)),(0,r.A)(this,Je,(be(this),e=>{(0,s.A)(Ve,this,ge).emit(e)})),(0,r.A)(this,He,void 0),(0,r.A)(this,qe,(0,g.fA)(Me,((e,t)=>n=>{(0,l.A)(He,this,n(e,t))}))),(0,r.A)(this,Ye,Ae(this)),(0,r.A)(this,Ge,(we(this),e=>{(0,s.A)(Ve,this,fe).emit(e)})),(0,r.A)(this,Ze,(e=>{const t="string"==typeof e&&"undefined"===e?void 0:(0,D.omit)(e,["dataset.testid"]),n=[];(0,D.isEmpty)(null==t?void 0:t.dataset)&&n.push("dataset"),(0,D.isEmpty)(null==t?void 0:t.style)&&n.push("style");const i=(0,D.omit)(t,n);if(!(0,D.isEmpty)(i))return i}))}get editorName(){return(0,c.A)(_e,this)}set editorName(e){(0,l.A)(_e,this,e)}get values(){return(0,c.A)(Re,this)}set values(e){(0,l.A)(Re,this,e)}get advancedMode(){return(0,c.A)(We,this)}set advancedMode(e){(0,l.A)(We,this,e)}get dataList(){return(0,c.A)(De,this)}set dataList(e){(0,l.A)(De,this,e)}get editorPackages(){return(0,c.A)(Pe,this)}set editorPackages(e){(0,l.A)(Pe,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)(Ue,this)}set childSlots(e){(0,l.A)(Ue,this,e)}validate(){var e;const t=null===(e=(0,c.A)(Oe,this).current)||void 0===e?void 0:e.getFormInstance();(0,l.A)(He,this,null),t.validate().then((()=>{if(this.advancedMode)(0,s.A)(Ve,this,ie).emit(t.values[W.qZ]);else{var e;const n=P().omit(t.values,[W.qZ]);t.notify(Me,n),(0,s.A)(Ve,this,ie).emit(null!==(e=(0,c.A)(He,this))&&void 0!==e?e:n)}})).catch((e=>{(0,s.A)(Ve,this,se).emit(e)}))}render(){return h().createElement(Ce,{ref:(0,c.A)(Oe,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)(Xe,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[k,E]=(0,p.useState)(Ie),x=(0,w.useCurrentTheme)(),N=(0,p.useMemo)((()=>(0,f.VC)()),[]),C=(0,p.useMemo)((()=>(0,g.DG)()),[k]),M=(0,p.useRef)(null),T=(0,p.useRef)(!1),L=(0,p.useMemo)((()=>(0,g.fA)(Te,((e,t)=>n=>{const i=!e&&t.values[W.qZ]?t.values[W.qZ]:t.values;M.current=n(e,t,i)}))),[]);(0,p.useImperativeHandle)(t,(()=>({getFormInstance:()=>C})));const I=(0,p.useCallback)((async()=>{R.customEditors.get(a)?E((()=>{var e;return null===(e=R.customEditors.get(a))||void 0===e?void 0:e(h())})):(await R.__secret_internals.loadEditors([a],o),Ie=()=>{var e;return null===(e=R.customEditors.get(a))||void 0===e?void 0:e(h())},E(Ie))}),[a,o]),S=(0,p.useCallback)(((e,t)=>{var n;if(t){const t=P().omit(e,[W.qZ]);return{[W.qZ]:P().isEmpty(t)?"":t}}return null!==(n=e[W.qZ])&&void 0!==n?n:e}),[]);return(0,p.useEffect)((()=>{I()}),[I]),(0,p.useEffect)((()=>{k&&C.setInitialValues(i,"overwrite")}),[k,C]),(0,p.useEffect)((()=>{var e;T.current=!0,M.current=null,C.notify(Te,n),C.query(W.N4).take((e=>{e.display=n?"hidden":"visible"})),C.query(W.qZ).take((e=>{e.display=n?"visible":"hidden"}));const t=C.getState().values,i=S(null!==(e=M.current)&&void 0!==e?e:t,n);C.setValues(i,"overwrite"),T.current=!1}),[n,C,S,k]),(0,p.useEffect)((()=>{C.addEffects("onValueChange",(()=>{(0,g.A$)((e=>{T.current||d(e.values)}))}))}),[C,d]),k?h().createElement("div",{className:"property-form-wrapper"},h().createElement(b.Ay,{prefixCls:"antdV5",theme:{algorithm:"dark-v2"===x?A.A.darkAlgorithm:A.A.defaultAlgorithm,components:{InputNumber:{handleVisible:!0}}},getPopupContainer:e=>e},h().createElement(f.N7,{cache:N},h().createElement(v.Op,{form:C},h().createElement(k,{advancedMode:n,SchemaFieldComponent:Le,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:L},formilySchemaFormatter:W.cV}))))):null}i=Qe,({e:[U,F,V,j,z,X,K,J,H,q,Y,G,Z,Q,ee,te,ne,ie,ae,re,oe,se,le,ce,de,pe,he,ue,me,ge,ve,be,Ae,fe,ye,we,$],c:[Se,B]}=(0,d.A)(i,[ke("visual-builder.property-editor",{shadowOptions:!1,dependencies:["eo-icon-select","vs.code-editor","eo-tooltip"]})],[[Ee(),1,"editorName"],[Ee({attribute:!1}),1,"values"],[Ee({type:Boolean}),1,"advancedMode"],[Ee({attribute:!1}),1,"dataList"],[Ee({attribute:!1}),1,"editorPackages"],[Ee({attribute:!1}),1,"links"],[Ee({attribute:!1}),1,"extraLibs"],[Ee({attribute:!1}),1,"childSlots"],[Ne({type:"validate.success"}),1,"successEvent",e=>(0,c.A)(Fe,e),(e,t)=>(0,l.A)(Fe,e,t)],[Ne({type:"validate.error"}),1,"errorEvent",e=>(0,c.A)(je,e),(e,t)=>(0,l.A)(je,e,t)],[xe(),2,"validate"],[Ne({type:"values.change"}),1,"valuesChangeEvent",e=>(0,c.A)(ze,e),(e,t)=>(0,l.A)(ze,e,t)],[Ne({type:"token.click"}),1,"tokenClick",e=>(0,c.A)(Ke,e),(e,t)=>(0,l.A)(Ke,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()},2120:(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,"#preview-root{padding:0}",""]);const s=o.toString()},8488:(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%}.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()},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;justify-content:space-between}.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;overflow:hidden}.raw-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-color-secondary)}.raw-content.expand{white-space:pre-wrap}.tips{color:var(--text-color-secondary);font-weight:normal}.body-cell:not(:hover) .btn-toggle{visibility:hidden}",""]);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,":host{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:none;background-color:var(--vb-workbench-action-list-background)}:host([hidden]){display:none}",""]);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()}}]);
|
|
2
|
+
//# sourceMappingURL=2464.b7163b41.js.map
|