@next-bricks/visual-builder 1.8.0 → 1.9.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 +9 -8
- package/dist/chunks/1045.8b4d10c4.js +2 -0
- package/dist/chunks/1045.8b4d10c4.js.map +1 -0
- package/dist/chunks/{114.145a58c4.js → 114.3b4811fb.js} +2 -2
- package/dist/chunks/{114.145a58c4.js.map → 114.3b4811fb.js.map} +1 -1
- package/dist/chunks/2201.f054fdcf.js +2 -0
- package/dist/chunks/2201.f054fdcf.js.map +1 -0
- package/dist/chunks/3426.10d61df1.js +2 -0
- package/dist/chunks/3426.10d61df1.js.map +1 -0
- package/dist/chunks/3748.08a3a08c.js +3 -0
- package/dist/chunks/3748.08a3a08c.js.map +1 -0
- package/dist/chunks/3801.80b3cda4.js +3 -0
- package/dist/chunks/{3801.477a0f99.js.map → 3801.80b3cda4.js.map} +1 -1
- package/dist/chunks/{7115.6fc785ff.js → 7115.299b2dc9.js} +2 -2
- package/dist/chunks/{7115.6fc785ff.js.map → 7115.299b2dc9.js.map} +1 -1
- package/dist/chunks/{7733.edd149d7.js → 7733.afc7df10.js} +2 -2
- package/dist/chunks/{7733.edd149d7.js.map → 7733.afc7df10.js.map} +1 -1
- package/dist/chunks/{9496.6ff45070.js → 9496.cfa9e0c9.js} +2 -2
- package/dist/chunks/{9496.6ff45070.js.map → 9496.cfa9e0c9.js.map} +1 -1
- package/dist/chunks/chat-conversation.92550a0c.js +3 -0
- package/dist/chunks/chat-conversation.92550a0c.js.map +1 -0
- package/dist/chunks/chat-preview.d8937493.js +2 -0
- package/dist/chunks/chat-preview.d8937493.js.map +1 -0
- package/dist/chunks/contract-select.188e9d91.js +3 -0
- package/dist/chunks/{contract-select.ea76b415.js.map → contract-select.188e9d91.js.map} +1 -1
- package/dist/chunks/inject-chat-preview-agent.2d4760a7.js +2 -0
- package/dist/chunks/inject-chat-preview-agent.2d4760a7.js.map +1 -0
- package/dist/chunks/main.e4bdbca3.js +2 -0
- package/dist/chunks/main.e4bdbca3.js.map +1 -0
- package/dist/chunks/page-arch-node.e0fc3b8c.js +3 -0
- package/dist/chunks/{page-arch-node.23766062.js.map → page-arch-node.e0fc3b8c.js.map} +1 -1
- package/dist/chunks/workbench-action-list.d93b089b.js +2 -0
- package/dist/chunks/{workbench-action-list.5e477975.js.map → workbench-action-list.d93b089b.js.map} +1 -1
- package/dist/chunks/workbench-action.499a3618.js +3 -0
- package/dist/chunks/{workbench-action.ce202905.js.map → workbench-action.499a3618.js.map} +1 -1
- package/dist/chunks/workbench-history-action.27b038a9.js +3 -0
- package/dist/chunks/{workbench-history-action.1e2ead8a.js.map → workbench-history-action.27b038a9.js.map} +1 -1
- package/dist/chunks/workbench-pane.43cca8ce.js +3 -0
- package/dist/chunks/{workbench-pane.5d9055cf.js.map → workbench-pane.43cca8ce.js.map} +1 -1
- package/dist/chunks/workbench-sidebar.f5e7a07e.js +2 -0
- package/dist/chunks/{workbench-sidebar.12dddbe0.js.map → workbench-sidebar.f5e7a07e.js.map} +1 -1
- package/dist/chunks/workbench-tree.97608c87.js +2 -0
- package/dist/chunks/{workbench-tree.87fa8a9f.js.map → workbench-tree.97608c87.js.map} +1 -1
- package/dist/index.4498adba.js +2 -0
- package/dist/index.4498adba.js.map +1 -0
- package/dist/manifest.json +54 -36
- package/dist/types.json +137 -35
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/chat-preview/InspectOutlineComponent.d.ts +6 -0
- package/dist-types/chat-preview/index.d.ts +10 -1
- package/dist-types/data-providers/chat-preview/inspector.d.ts +3 -0
- package/dist-types/data-providers/chat-preview/interfaces.d.ts +14 -0
- package/dist-types/data-providers/inject-chat-preview-agent.d.ts +1 -0
- package/package.json +2 -2
- package/dist/chunks/1045.cb75d16d.js +0 -2
- package/dist/chunks/1045.cb75d16d.js.map +0 -1
- package/dist/chunks/3426.d6cca3b4.js +0 -2
- package/dist/chunks/3426.d6cca3b4.js.map +0 -1
- package/dist/chunks/3801.477a0f99.js +0 -3
- package/dist/chunks/7224.92a43c9e.js +0 -3
- package/dist/chunks/7224.92a43c9e.js.map +0 -1
- package/dist/chunks/chat-conversation.c20e6c44.js +0 -3
- package/dist/chunks/chat-conversation.c20e6c44.js.map +0 -1
- package/dist/chunks/chat-preview.a36a3a25.js +0 -2
- package/dist/chunks/chat-preview.a36a3a25.js.map +0 -1
- package/dist/chunks/contract-select.ea76b415.js +0 -3
- package/dist/chunks/main.6d351f9e.js +0 -2
- package/dist/chunks/main.6d351f9e.js.map +0 -1
- package/dist/chunks/page-arch-node.23766062.js +0 -3
- package/dist/chunks/workbench-action-list.5e477975.js +0 -2
- package/dist/chunks/workbench-action.ce202905.js +0 -3
- package/dist/chunks/workbench-history-action.1e2ead8a.js +0 -3
- package/dist/chunks/workbench-pane.5d9055cf.js +0 -3
- package/dist/chunks/workbench-sidebar.12dddbe0.js +0 -2
- package/dist/chunks/workbench-tree.87fa8a9f.js +0 -2
- package/dist/index.692b726a.js +0 -2
- package/dist/index.692b726a.js.map +0 -1
- /package/dist/chunks/{7224.92a43c9e.js.LICENSE.txt → 3748.08a3a08c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{3801.477a0f99.js.LICENSE.txt → 3801.80b3cda4.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{chat-conversation.c20e6c44.js.LICENSE.txt → chat-conversation.92550a0c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{contract-select.ea76b415.js.LICENSE.txt → contract-select.188e9d91.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{page-arch-node.23766062.js.LICENSE.txt → page-arch-node.e0fc3b8c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-action.ce202905.js.LICENSE.txt → workbench-action.499a3618.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-history-action.1e2ead8a.js.LICENSE.txt → workbench-history-action.27b038a9.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-pane.5d9055cf.js.LICENSE.txt → workbench-pane.43cca8ce.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 3801.477a0f99.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[3801,2052],{4940:(e,t,n)=>{"use strict";n.d(t,{e:()=>r,l:()=>a});var o=n(8769),r=(0,o.createContext)({});function a(){return(0,o.useContext)(r)}},7758:(e,t,n)=>{"use strict";n.d(t,{cU:()=>S});var o=n(9575),r=n(9740),a=n(8769),i=n.n(a),l=n(1030),c=n.n(l),s=n(3373),d=n.n(s),u=n(9406),p=n(4940),f=function(e){return e.inside="inside",e.top="top",e.bottom="bottom",e}({}),h=(0,a.createContext)({});function v(){return(0,a.useContext)(h)}var g=n(720),m=n(9924),b=(0,g.wrapBrick)("eo-icon");function x(e){var{data:t,className:n,gap:o,isFirst:r,isLast:l,actions:c,actionsHidden:s,onActionClick:u}=e,p=(0,a.useMemo)((()=>null==c?void 0:c.filter((e=>(0,m.checkIfByTransform)(e,t)))),[c,t]);return s||null==p||!p.length?null:i().createElement("div",{className:d()("actionsBar",n),style:{gap:o}},p.map((e=>i().createElement(y,{key:e.action,action:e,data:t,isFirst:r,isLast:l,onActionClick:u}))))}function y(e){var{action:t,data:n,isFirst:o,isLast:r,onActionClick:l}=e,c=o&&"move-up"===t.action||r&&"move-down"===t.action,s=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c||null==l||l({action:t.action,data:n})}),[t.action,n,c,l]),u=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]);return i().createElement("a",{className:d()("action",{disabled:c}),title:t.title,role:"button",onClick:s,onContextMenu:u,onMouseDown:u},i().createElement(b,t.icon))}var w=(0,g.wrapBrick)("eo-link"),k=(0,g.wrapBrick)("eo-icon"),E=10,A="0 0 0 1px #ba6d30",C=(0,a.createContext)(!1);function S(e){var{nodes:t,placeholder:n,searchPlaceholder:o,isDrag:r,noSearch:l,allowDrag:s,allowDragToRoot:p,allowDragToInside:v,dropEmit:g}=e,[m,b]=(0,a.useState)(""),[x,y]=(0,a.useState)(r),[w,E]=(0,a.useState)(),[A,S]=(0,a.useState)(),[N,I]=(0,a.useState)(),[M,j]=(0,a.useState)(),[D,R]=(0,a.useState)(),[B,P]=(0,a.useState)(),{nodeKey:O,onBrickDrop:T,contextMenuFactory:F,matchNode:z}=(0,u.o)(),_=(0,a.useMemo)((()=>{var e;return function(e,t){var n=(e,o,r,a)=>{var i=e.shift();if(i){e.length>0&&e.splice(0,1,"".concat(i,"/").concat(e[0]));var l=o.find((e=>e&&e.key===i&&e.isContainer));if(l)o[a]=null,n(e,l.children,r);else{var c=i.split("/"),s={name:c.pop(),key:i,parentPath:c?c.join("/"):c,originKey:r.key,data:{[t]:i,isContainer:!0},children:[],icon:{icon:"folder",lib:"antd",theme:"filled",color:"orange"},isContainer:!0};"number"==typeof a?o[a]=s:o.push(s),n(e,s.children,r)}}else o.push(r)};return e.forEach(((t,o)=>{if(t.path){var r=t.path.split("/").filter(Boolean);n(r,e,t,o)}})),e.filter(Boolean)}(null!==(e=null==t?void 0:t.slice())&&void 0!==e?e:[],O)}),[t,O]),K=(0,a.useCallback)((e=>{b(e.target.value)}),[]),W=(0,a.useMemo)((()=>null==F?void 0:F()),[F]),$=null==m?void 0:m.trim().toLowerCase(),H=(0,a.useMemo)((()=>{if(l||!$||!_)return _;var e=t=>{var n;t.matchedSelf=z(t,$);var o=null===(n=t.children)||void 0===n?void 0:n.map(e).includes(!0);return t.matched=t.matchedSelf||o,t.matched};return _.forEach(e),_.slice()}),[l,$,_,z]),U=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e;n;){if(n.draggable&&(t||n!==e)&&"A"!==n.tagName)return n;n=n.parentElement}},Y=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var r of e)if(r.data[n]===t&&(o=r),r.children&&(o=Y(r.children,t,n,o)),o)break;return o},V=()=>{S(null),j(null),I(null),R(null),y(!1)};return(0,a.useEffect)((()=>{y(r)}),[r]),(0,a.useEffect)((()=>(window.addEventListener("dragend",V),()=>{window.removeEventListener("dragend",V)})),[]),i().createElement("div",{style:{height:"100%"},className:"tree-wrapper",onContextMenu:W},null!=_&&_.length?i().createElement("div",null,!l&&i().createElement("div",{className:"searchBox",onContextMenu:e=>e.stopPropagation()},i().createElement("span",{className:d()("filter-input-wrapper",{focus:B})},i().createElement("span",{className:"prefix"},i().createElement(k,{icon:"search",lib:"antd",theme:"outlined"})),i().createElement("input",{value:m,onChange:K,onFocus:()=>P(!0),onBlur:()=>P(!1),autoComplete:"off",placeholder:o}),i().createElement("span",{className:"suffix"},m?i().createElement(k,{className:"clear-button",icon:"close-circle",lib:"antd",theme:"filled",onClick:()=>{b("")}}):null))),i().createElement(C.Provider,{value:!!m},i().createElement(h.Provider,{value:{allow:s,allowDragToRoot:p,dragElement:A,dragOverElement:M,dragStatus:D,onDragStart:(e,t)=>{var n;if(e.stopPropagation(),s){var o=e.target;null!==(n=o.dataset)&&void 0!==n&&n.container||(y(!0),function(e,t){var n=document.createElement("canvas");document.body.append(n);var o=n.getContext("2d");n.width=o.measureText(t).width+60,n.height=20,n.style.position="absolute",n.style.left="-100%",n.style.zIndex="-100",o.fillStyle="#333333",o.fillRect(0,0,n.width,n.height),o.fillStyle="#999999",o.font="bold 14px Arial",o.fillText(t,20,15),e.dataTransfer.setDragImage(n,0,0)}(e,o.innerText),S(o),E(t))}}}},i().createElement("div",{className:d()({hightlight:r}),onDragOver:e=>{if(e.preventDefault(),x&&"workbenchTree-placeholder-dom"!==e.target.className){var t=(e=>{var t=U(e.target),n=t.dataset.uid;if(!(t===A||null!=n&&n.includes(":"))){var o,{top:r,bottom:a}=t.getBoundingClientRect(),i=v?5:10;return o=e.clientY<r+i?f.top:e.clientY>a-i?f.bottom:v?f.inside:D,{element:t,node:Y(_,n,O),status:o}}})(e);!t||null!=A&&A.contains(t.element)||(j(t.element),I(t.node),R(t.status))}},onDrop:e=>{if(x){if(T){var t=M;[f.top,f.bottom].includes(D)&&(t=U(t,!1)),T(e,{curElement:A,overElement:M,parentElement:t,overStatus:D})}else if(p||1!==Number(M.dataset.level)){var n=N,o=(e,t)=>{for(var r=0;r<e.length;r++){if(e[r].key===t){n=e[r];break}e[r].children&&o(e[r].children,t)}},r=M.dataset.uid;o(_,r);var a=e=>{var t=!1,{container:o,uid:r}=M.dataset,i=o?n.originKey:r,l=e.filter((e=>(e.children&&(e.children=a(e.children)),e.key===i&&(t=!0),e.key!==w.key)));return t&&l.splice(l.findIndex((e=>e.key===i))+("bottom"===D?1:0),0,w),l},i=function(e){var t=[],n=e=>{e.forEach((e=>{e.isContainer?n(e.children):t.push(c().omit(e,["path","icon"]))}))};return n(e),t}(_),l=w.isContainer?i.find((e=>e.key===w.originKey)):w;l.data.path=n.parentPath||n.path,g({nodes:a(i),curNode:l,overNode:n,status:D})}V()}}},i().createElement(L,{nodes:H,level:1}))))):i().createElement("div",{className:"placeholder"},n))}function L(e){var{nodes:t,level:n}=e,o=t.length-1;return i().createElement("ul",{className:"tree"},t.filter((e=>(0,m.checkIfOfComputed)(e))).map(((e,t)=>i().createElement(I,{key:e.key,node:e,level:n,isFirst:0===t,isLast:t===o}))))}function N(e){var{style:t}=e,{dragStatus:n}=v(),o=(0,r.A)({height:22,border:"1px dashed goldenrod",opacity:n===f.inside?"0":"1"},t);return i().createElement("li",{className:"workbenchTree-placeholder-dom",style:o})}function I(e){var t,n,c,{node:s,level:h,isFirst:g,isLast:m}=e,b=!(null!==(t=s.children)&&void 0!==t&&t.length),y=s.isContainer,{hoverKey:S,activeKey:I,basePaddingLeft:M,showMatchedNodeOnly:j,fixedActionsFor:D,collapsible:R,collapsedNodes:B,nodeKey:P,clickFactory:O,mouseEnterFactory:T,mouseLeaveFactory:F,contextMenuFactory:z,onNodeToggle:_,getCollapsedId:K,skipNotify:W}=(0,u.o)(),{allow:$,allowDragToRoot:H,onDragStart:U,dragElement:Y,dragOverElement:V,dragStatus:q}=v(),{actions:G,actionsHidden:J,onActionClick:Q}=(0,p.l)(),X=h*E+M-2,Z=(0,a.useContext)(C),[ee,te]=(0,a.useState)(null),[ne,oe]=(0,a.useState)(!1),[re,ae]=(0,a.useState)(null!==(n=null==B?void 0:B.includes(null==K?void 0:K(s)))&&void 0!==n&&n),ie=(0,a.useMemo)((()=>null==T?void 0:T(s)),[T,s]),le=(0,a.useMemo)((()=>null==F?void 0:F(s)),[F,s]),ce=(0,a.useCallback)((e=>{var t;e.stopPropagation(),null==z||null===(t=z(s))||void 0===t||t(e)}),[z,s]),se=I&&s.key===I,de=(0,a.useMemo)((()=>se?e=>{var t;null==e||null===(t=e.scrollIntoView)||void 0===t||t.call(e,{block:"center",inline:"center"})}:null),[]),ue=(0,a.useMemo)((()=>{return y?s.key:s.data?"mount-point"===(e=s.data).type?e.parent[P]||"".concat(e.parent.$$uid,":").concat(e.mountPoint):e[P]||e.$$uid:void 0;var e}),[P,s,y]);(0,a.useEffect)((()=>{q!==f.inside&&[f.top,f.bottom].includes(q)&&te(q)}),[q]);var pe=(0,a.useMemo)((()=>!!Y&&Y.dataset.uid===String(ue)),[Y,ue]),fe=(0,a.useMemo)((()=>!!V&&V.dataset.uid===String(ue)),[V,ue]),he=(0,a.useMemo)((()=>{var e={opacity:pe?.2:1};return fe&&q===f.inside&&(e={boxShadow:A,background:"rgba(255, 255, 255, 0.1)"}),Object.assign({},e)}),[fe,pe,q]),ve=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),oe(!0),ae((e=>!e))}),[]),ge=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]),me=(0,a.useCallback)((e=>{var t;if(!y)return null==O||null===(t=O(s))||void 0===t?void 0:t();ve(e)}),[O,ve,y,s]);(0,a.useEffect)((()=>{ne&&(null==_||_(null==K?void 0:K(s),re))}),[ne,re,K,s,_]);var be=R&&!b&&!Z;return Z&&j&&!s.matched?null:i().createElement(i().Fragment,null,fe&&(H||1!==h)&&ee===f.top&&i().createElement(N,{style:{marginLeft:X}}),i().createElement("li",(0,o.A)({draggable:$,onDragStart:e=>U(e,s),"data-uid":ue,"data-level":h,style:he},y?{"data-container":y}:{}),i().createElement(w,(0,o.A)({tabIndex:0,onMouseEnter:ie,onMouseLeave:le,onContextMenu:ce,onClick:me},W?{url:{pathname:(0,l.get)(s.link,"url","href"),state:{notify:!1}}}:(0,r.A)({},(0,l.pick)(s.link,["url","href"]))),i().createElement("span",{className:d()("nodeLabelRow",{active:se,hover:S&&s.key===S,matched:Z&&s.matchedSelf&&!j,fixedActions:D&&[].concat(D).some((e=>(0,l.isMatch)(s.data,e))),collapsed:be&&re,collapsible:be})},i().createElement("span",{className:d()("nodeLabel",{unreachable:s.unreachable}),style:{paddingLeft:X,color:s.labelColor},ref:de},i().createElement("span",{className:"nodeIconWrapper"},be&&i().createElement("span",{className:"collapseIcon",onClick:ve,onMouseDown:ge,title:re?"Expand":"Collapse",role:"button"},i().createElement(k,{lib:"antd",theme:"outlined",icon:re?"right":"down"})),i().createElement("span",{className:"nodeIcon"},i().createElement(k,(0,o.A)({},s.icon,{style:{fontSize:null!==(c=s.icon)&&void 0!==c&&c.imgSrc?14:null}})))),i().createElement("span",{className:"nodeName"},s.name)),i().createElement(x,{className:"nodeActionsBar",data:s.data,isFirst:g,isLast:m,actions:G,onActionClick:Q,actionsHidden:J}),s.badge&&i().createElement("span",{className:"badge"},i().createElement(k,s.badge)))),b||i().createElement(L,{nodes:s.children,level:h+1})),fe&&(H||1!==h)&&ee===f.bottom&&i().createElement(N,{style:{marginLeft:X}}))}},9406:(e,t,n)=>{"use strict";n.d(t,{N:()=>r,o:()=>a});var o=n(8769),r=(0,o.createContext)({});function a(){return(0,o.useContext)(r)}},675:(e,t,n)=>{"use strict";function o(e,t){switch(typeof e){case"string":return e.toLowerCase().includes(t);case"boolean":case"number":return String(e).includes(t);case"object":return null===e?"null".includes(t):(Array.isArray(e)?e:Object.entries(e).flat()).some((e=>o(e,t)));default:return!1}}n.d(t,{U:()=>o})},6275:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(6758),r=n.n(o),a=n(935),i=n.n(a)()(r());i.push([e.id,".actionsBar{display:flex;align-items:center;padding:0 3px}.action{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px}.action:hover{color:#fff;background-color:rgba(90,93,94,0.31)}.action{color:#c5c5c5}.disabled,\n.disabled:hover{color:var(--color-disabled-text);cursor:not-allowed;background-color:initial}",""]);const l=i.toString()},7995:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(6758),r=n.n(o),a=n(935),i=n.n(a)()(r());i.push([e.id,':host-context(html[data-theme="light"]),\n:host-context(html[data-override-theme="light"]){--search-box-background:#fff;--node-color:#595959;--node-color-focus:#595959;--node-background-active:#e0eeff;--node-background-focus:#e0eeff;--node-icon-background-hover:#fff}:host-context(html[data-theme="dark-v2"]),\n:host-context(html[data-override-theme="dark-v2"]){--search-box-background:#181818;--node-color:#c5c5c5;--node-color-focus:#fff;--node-background-active:rgba(255,255,255,0.08);--node-background-focus:#1a7aff;--node-icon-background-hover:rgba(90,93,94,0.31)}.searchBox{position:-webkit-sticky;position:sticky;top:0;background-color:var(--search-box-background);padding:5px 10px 10px;z-index:1}.searchBox .filter-input-wrapper{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);position:relative;width:100%;min-width:0;padding:2px 7px;color:var(--antd-input-color);font-size:14px;line-height:1.5715;display:inline-flex;border-radius:3px;transition:all 0.3s;box-sizing:border-box}.searchBox .filter-input-wrapper.focus{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(0,113,235,0.2)}.searchBox .filter-input-wrapper input{text-overflow:ellipsis;border:none;outline:none;border-radius:3px;background-color:var(--search-box-background);box-sizing:border-box;margin:0;padding:0;color:var(--antd-text-color);font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;color:var(--antd-input-color);font-size:14px;line-height:1.5715;background-image:none;transition:all 0.3s}.prefix{margin-right:4px}.suffix{margin-left:4px}.searchBox .prefix,\n.searchBox .suffix{display:flex;flex:none;align-items:center}.clear-button{cursor:pointer}.tree{list-style:none;margin:0;padding:0}.placeholder{color:var(--antd-input-placeholder-color);padding:0 15px}.nodeLabelRow{display:flex;cursor:pointer;height:22px;padding-right:10px}.nodeLabelRow:hover,\n.nodeLabelRow.hover{background-color:rgba(255,255,255,0.12)}.nodeLabelRow:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:var(--node-background-focus)}.nodeLabelRow.active:focus{background-color:var(--node-background-focus)}.nodeLabel{display:flex;align-items:center;min-width:0;flex:1}.unreachable{opacity:0.3}.nodeAction,\n.nodeAction:hover,\n.nodeLabelRow .nodeLabel{color:var(--node-color)}.nodeLabelRow:focus .nodeLabel{color:var(--node-color-focus)}.nodeLabelRow.matched .nodeLabel{color:var(--palette-orange-6)}.nodeLabelRow.active{background-color:var(--node-background-active)}.nodeIconWrapper{display:flex;width:24px;flex-shrink:0}.nodeIcon,\n.collapseIcon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px;font-size:13px}.collapseIcon{display:none}.nodeLabelRow.collapsed .nodeIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .nodeIcon{display:none}.nodeLabelRow.collapsed .collapseIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .collapseIcon{display:flex}.nodeLabelRow.collapsible .nodeIcon:hover,\n.nodeLabelRow.collapsible .collapseIcon:hover{background-color:var(--node-icon-background-hover)}.nodeName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nodeLabelRow:not(:hover, .fixedActions) .nodeActionsBar{display:none}.badge{margin:0 3px}.collapsed + .tree{display:none}.hightlight{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#fcd93f}',""]);const l=i.toString()},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(i[c]=!0)}for(var s=0;s<e.length;s++){var d=[].concat(e[s]);o&&i[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},6758:e=>{"use strict";e.exports=function(e){return e[1]}},3373:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},2740:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(7545),r=n(6902);function a(e,t,n){"symbol"==(0,o.A)(t)&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch(e){}return e}var i=n(1369);function l(e,t,n,l,c,s){var d,u,p,f,h,v,g,m=Symbol.metadata||Symbol.for("Symbol.metadata"),b=Object.defineProperty,x=Object.create,y=[x(null),x(null)],w=t.length;function k(t,n,o){return function(r,a){n&&(a=r,r=e);for(var i=0;i<t.length;i++)a=t[i].apply(r,o?[a]:[]);return o?a:r}}function E(e,t,n,o){if("function"!=typeof e&&(o||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(o?"":" or undefined"));return e}function A(e,t,n,r,i,l,c,s,p,f,h){function v(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),m=t[3],x=!c,w=1===i,A=3===i,C=4===i,S=2===i;function L(t,n,o){return function(r,a){return n&&(a=r,r=e),o&&o(r),N[t].call(r,a)}}if(!x){var N={},I=[],M=A?"get":C||w?"set":"value";if(p?(f||w?N={get:a((function(){return m(this)}),r,"get"),set:function(e){t[4](this,e)}}:N[M]=m,f||a(N[M],r,S?"":M)):f||(N=Object.getOwnPropertyDescriptor(e,r)),!f&&!p){if((u=y[+s][r])&&7!=(u^i))throw Error("Decorating two elements with the same name ("+N[M].name+") is not supported yet");y[+s][r]=i<3?1:i}}for(var j=e,D=g.length-1;D>=0;D-=n?2:1){var R=E(g[D],"A decorator","be",!0),B=n?g[D-1]:void 0,P={},O={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:d,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");E(t,"An initializer","be",!0),l.push(t)}.bind(null,P)};if(x)u=R.call(B,j,O),P.v=1,E(u,"class decorators","return")&&(j=u);else if(O.static=s,O.private=p,u=O.access={has:p?h.bind():function(e){return r in e}},C||(u.get=p?S?function(e){return v(e),N.value}:L("get",0,v):function(e){return e[r]}),S||A||(u.set=p?L("set",0,v):function(e,t){e[r]=t}),j=R.call(B,w?{get:N.get,set:N.set}:N[M],O),P.v=1,w){if("object"==(0,o.A)(j)&&j)(u=E(j.get,"accessor.get"))&&(N.get=u),(u=E(j.set,"accessor.set"))&&(N.set=u),(u=E(j.init,"accessor.init"))&&I.unshift(u);else if(void 0!==j)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else E(j,(f?"field":"method")+" decorators","return")&&(f?I.unshift(j):N[M]=j)}return i<2&&c.push(k(I,s,1),k(l,s,0)),f||x||(p?w?c.splice(-1,0,L("get",s),L("set",s)):c.push(S?N[M]:E.call.bind(N[M])):b(e,r,N)),j}function C(e){return b(e,m,{configurable:!0,enumerable:!0,value:d})}return void 0!==s&&(d=s[m]),d=x(null==d?null:d),h=[],v=function(e){e&&h.push(k(e))},g=function(t,o){for(var a=0;a<n.length;a++){var l=n[a],s=l[1],d=7&s;if((8&s)==t&&!d==o){var u=l[2],v=!!l[3],g=16&s;A(t?e:e.prototype,l,g,v?"#"+u:(0,i.A)(u),d,d<2?[]:t?f=f||[]:p=p||[],h,!!t,v,o,t&&v?function(t){return(0,r.A)(t)===e}:c)}}},g(8,0),g(0,0),g(8,1),g(0,1),v(p),v(f),u=h,w||C(e),{e:u,get c(){var n=[];return w&&[C(e=A(e,[t],l,e.name,5,n)),k(n,1)]}}}},2559:(e,t,n)=>{"use strict";function o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>o})},6902:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(7545);function r(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?(0,o.A)(e):"null"));return e}},2016:(e,t,n)=>{"use strict";function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>o})},829:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(2559);function r(e,t){return e.get((0,o.A)(e,t))}},918:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(2016);function r(e,t,n){(0,o.A)(e,t),t.set(e,n)}},6121:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(2559);function r(e,t,n){return e.set((0,o.A)(e,t),n),n}},5536:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(2559);function r(e,t,n){return n((0,o.A)(e,t))}},4635:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(2016);function r(e,t){(0,o.A)(e,t),t.add(e)}},9575:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{A:()=>o})}}]);
|
|
3
|
-
//# sourceMappingURL=3801.477a0f99.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7224.92a43c9e.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[7224],{7224:(e,t,a)=>{a.r(t);var n,i,o,r,s,l,c,h,d,u,p,A,b,m,v,g,E,f=a(4635),k=a(918),N=a(6902),y=a(5536),x=a(6121),w=a(829),L=a(2740),O=a(8769),R=a.n(O),I=a(3443),T=a(720),C=a(7180),M=a(9765),_=a(3373),S=a.n(_),D=(0,T.wrapBrick)("eo-icon"),{defineElement:P,property:W,event:F}=(0,I.createDecorators)(),U=new WeakMap,B=new WeakMap,K=new WeakMap,j=new WeakMap,z=new WeakSet,G=new WeakMap,V=new WeakMap,H=new WeakMap;class Y extends T.ReactNextElement{constructor(){super(...arguments),(0,f.A)(this,z),(0,k.A)(this,U,o(this)),(0,k.A)(this,B,(r(this),s(this))),(0,k.A)(this,K,(l(this),c(this))),(0,k.A)(this,j,(h(this),d(this))),(0,k.A)(this,G,(A(this),e=>{e!==this.active&&(this.active=e,(0,y.A)(z,this,u).emit(e))})),(0,k.A)(this,V,b(this)),(0,k.A)(this,H,(g(this),()=>{(0,y.A)(z,this,m).emit()}))}get titleLabel(){return(0,w.A)(U,this)}set titleLabel(e){(0,x.A)(U,this,e)}get active(){return(0,w.A)(B,this)}set active(e){(0,x.A)(B,this,e)}get badge(){return(0,w.A)(K,this)}set badge(e){(0,x.A)(K,this,e)}render(){return R().createElement(X,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,w.A)(G,this),onFirstActivated:(0,w.A)(H,this)})}}function X(e){var{titleLabel:t,active:a,badge:n,onActiveChange:i,onFirstActivated:o}=e,[r,s]=(0,O.useState)(a),[l,c]=(0,O.useState)(!1);(0,O.useEffect)((()=>{s(a)}),[a]),(0,O.useEffect)((()=>{null==i||i(r)}),[r,i]);var h=(0,O.useCallback)((()=>{s((e=>!e)),l||r||(c(!0),null==o||o())}),[l,r,o]),d=(0,O.useRef)(),[u,p]=(0,O.useState)(!1),A=(0,O.useMemo)((()=>{return e=()=>{p(d.current.scrollTop>0)},n=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t&&a(),t=requestAnimationFrame((()=>{e(...i)}))},n.cancel=a=()=>cancelAnimationFrame(t),n;var e,t,a,n}),[]);return R().createElement("div",{className:S()("pane",{scrolled:u})},R().createElement("div",{className:"pane-header",tabIndex:0,onClick:h},R().createElement("div",{className:"pane-title"},R().createElement("span",{className:"title-icon"},r?R().createElement(D,{lib:"antd",theme:"outlined",icon:"down"}):R().createElement(D,{lib:"antd",theme:"outlined",icon:"right"})),R().createElement("div",{className:"title-label"},t),R().createElement("slot",{name:"title"})),R().createElement("slot",{name:"actions"}),n&&R().createElement("div",{className:"badge"},n),R().createElement("div",{className:"pane-scroll-shadow"})),R().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:A,ref:d},R().createElement("slot",null,R().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}n=Y,({e:[o,r,s,l,c,h,d,u,p,A,b,m,v,g],c:[E,i]}=(0,L.A)(n,[P("visual-builder.workbench-pane",{styleTexts:[C.A,M.A]})],[[W(),1,"titleLabel"],[W({type:Boolean}),1,"active"],[W({type:Number}),1,"badge"],[F({type:"active.change"}),1,"activeChangeEvent",e=>(0,w.A)(j,e),(e,t)=>(0,x.A)(j,e,t)],[F({type:"active.firstActivated"}),1,"activeFirstActivatedEvent",e=>(0,w.A)(V,e),(e,t)=>(0,x.A)(V,e,t)]],0,(e=>H.has((0,N.A)(e))),T.ReactNextElement)),i();var q,J,$,Q,Z,ee=a(4586),te=a(2150),{defineElement:ae,property:ne}=(0,I.createDecorators)(),ie=new WeakMap,oe=new WeakMap,re=new WeakMap,se=new WeakMap;class le extends T.ReactNextElement{constructor(){super(...arguments),(0,k.A)(this,ie,$(this)),(0,k.A)(this,oe,(Q(this),()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")})),(0,k.A)(this,re,(()=>{var e=(0,w.A)(oe,this).call(this).assignedNodes();for(var t of e){var a;t.active?t.style.flex=String(null!==(a=t.activeFlex)&&void 0!==a?a:"1"):t.style.flex="initial"}})),(0,k.A)(this,se,(e=>{var t=e.target.assignedNodes();for(var a of t)a.addEventListener("active.change",(0,w.A)(re,this))})),(0,ee.A)(this,"refCallback",(()=>{(0,w.A)(re,this).call(this);var e=(0,w.A)(oe,this).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,w.A)(se,this).call(this,e)}))}))}get titleLabel(){return(0,w.A)(ie,this)}set titleLabel(e){(0,x.A)(ie,this,e)}render(){return R().createElement(ce,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ce(e){var{titleLabel:t,refCallback:a}=e;return R().createElement("div",{className:"sidebar",ref:a},R().createElement("div",{className:"title-container"},R().createElement("div",{className:"title-label"},t),R().createElement("slot",{name:"titleToolbar"})),R().createElement("div",{className:"pane-container"},R().createElement("slot",null)))}q=le,({e:[$,Q],c:[Z,J]}=(0,L.A)(q,[ae("visual-builder.workbench-sidebar",{styleTexts:[te.A]})],[[ne(),1,"titleLabel"]],0,void 0,T.ReactNextElement)),J();var he,de,ue,pe,Ae,be,me,ve,ge,Ee,fe,ke,Ne,ye=a(5292),{defineElement:xe,property:we}=(0,I.createDecorators)(),Le=(0,T.wrapBrick)("eo-link"),Oe=(0,T.wrapBrick)("eo-icon"),Re=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Ce=new WeakMap,Me=new WeakMap;class _e extends T.ReactNextElement{constructor(){super(...arguments),(0,k.A)(this,Re,ue(this)),(0,k.A)(this,Ie,(pe(this),Ae(this))),(0,k.A)(this,Te,(be(this),me(this))),(0,k.A)(this,Ce,(ve(this),ge(this))),(0,k.A)(this,Me,(Ee(this),fe(this))),ke(this)}get icon(){return(0,w.A)(Re,this)}set icon(e){(0,x.A)(Re,this,e)}get to(){return(0,w.A)(Ie,this)}set to(e){(0,x.A)(Ie,this,e)}get active(){return(0,w.A)(Te,this)}set active(e){(0,x.A)(Te,this,e)}get href(){return(0,w.A)(Ce,this)}set href(e){(0,x.A)(Ce,this,e)}get target(){return(0,w.A)(Me,this)}set target(e){(0,x.A)(Me,this,e)}render(){return R().createElement(Se,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function Se(e){var{icon:t,to:a,active:n,href:i,target:o}=e;return R().createElement(Le,{className:S()("action",{active:n}),url:a,href:i,target:o},R().createElement(Oe,t))}he=_e,({e:[ue,pe,Ae,be,me,ve,ge,Ee,fe,ke],c:[Ne,de]}=(0,L.A)(he,[xe("visual-builder.workbench-action",{styleTexts:[ye.A]})],[[we({attribute:!1}),1,"icon"],[we(),1,"to"],[we({type:Boolean}),1,"active"],[we(),1,"href"],[we(),1,"target"]],0,void 0,T.ReactNextElement)),de();var De=a(9924),Pe=a(1201);function We(e,t,a,n){var i=[],o=[],r=[],s=0;return e.forEach((e=>{if(e.key=""===n?"".concat(s):"".concat(n,".").concat(s),function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){var l=We(e.items,t,a,e.key);i.push(...l.selectedKeys),(l.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...l.openedKeys),r.push(...l.matchedKeys)}else if(function(e,t,a){if(!e.to)return!1;var n="object"==typeof e.to?e.to:(0,Pe.parsePath)(e.to),i=n.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,De.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=Fe(a,n.search)),!o&&Array.isArray(e.activeIncludes))for(var r of e.activeIncludes){var s,l=void 0,c=r.includes("?");if(c&&(l=(0,Pe.parsePath)(r)),(o=!!(0,De.matchPath)(t,{path:c?l.pathname:r,exact:!0}))&&null!==(s=l)&&void 0!==s&&s.search&&(o=Fe(a,l.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var h of e.activeExcludes)if(!(o=!(0,De.matchPath)(t,{path:h,exact:!0})))break;return o}(e,t,a)){i.push(String(e.key));for(var c=e.key.split("."),h=0;h<c.length;h++)r.push(c.slice(0,h+1).join("."))}s+=1})),i.length&&""!==n&&o.push(n),{selectedKeys:i,openedKeys:o,matchedKeys:r}}function Fe(e,t){var a=new URLSearchParams(e),n=new URLSearchParams(t);for(var[i,o]of n.entries()){var r;if((null!==(r=a.get(i))&&void 0!==r?r:"")!==o)return!1}return!0}var Ue,Be,Ke,je,ze,Ge,Ve,He,Ye=a(3430),Xe=(0,T.wrapBrick)("visual-builder.workbench-action"),{defineElement:qe,property:Je}=(0,I.createDecorators)(),$e=new WeakMap,Qe=new WeakMap;class Ze extends T.ReactNextElement{constructor(){super(...arguments),(0,k.A)(this,$e,Ke(this)),(0,k.A)(this,Qe,(je(this),ze(this))),Ge(this)}get appId(){return(0,w.A)($e,this)}set appId(e){(0,x.A)($e,this,e)}get menu(){return(0,w.A)(Qe,this)}set menu(e){(0,x.A)(Qe,this,e)}render(){return R().createElement(tt,{appId:this.appId,menu:this.menu})}}Ue=Ze,({e:[Ke,je,ze,Ge],c:[Ve,Be]}=(0,L.A)(Ue,[qe("visual-builder.workbench-action-list",{styleTexts:[Ye.A]})],[[Je(),1,"appId"],[Je({attribute:!1}),1,"menu"]],0,void 0,T.ReactNextElement)),Be();var et=new Map;function tt(e){var t,{appId:a,menu:n}=e,i=(0,De.getHistory)(),[o,r]=(0,O.useState)(),[s,l]=(0,O.useState)(i.location);return(0,O.useEffect)((()=>{var e=i.listen((e=>{l(e)}));return e}),[i]),(0,O.useEffect)((()=>{He||(He=a),He!==a&&(et.clear(),He=a)}),[a]),(0,O.useEffect)((()=>{var e,{pathname:t,search:a}=s,{selectedKeys:i}=We(null!==(e=null==n?void 0:n.menuItems)&&void 0!==e?e:[],t,a,"");r(Number(i[0]))}),[n,s]),R().createElement("div",{className:"workBenchActionList"},null==n||null===(t=n.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){var a=e.to;return o!==t&&et.has(t)&&(a=et.get(t)),R().createElement(Xe,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||et.set(o,"".concat(s.pathname).concat(s.search))})(e)})}})).filter(Boolean))}var at,nt,it,ot,rt,st,lt,ct,ht,dt,ut,pt,At,bt,mt,vt,gt,Et,ft,kt,Nt,yt,xt,wt,Lt,Ot,Rt,It,Tt,Ct,Mt,_t,St,Dt,Pt,Wt,Ft,Ut,Bt,Kt,jt,zt,Gt,Vt,Ht,Yt,Xt,qt,Jt,$t,Qt,Zt,ea,ta,aa,na,ia,oa,ra=a(1030),sa=a(4940),la=a(7758),ca=a(9406),ha=a(675),da=a(7995),ua=a(6275);function pa(e){return e.key}a(6329);var Aa,{defineElement:ba,property:ma,event:va}=(0,I.createDecorators)(),ga=new WeakMap,Ea=new WeakMap,fa=new WeakMap,ka=new WeakMap,Na=new WeakMap,ya=new WeakMap,xa=new WeakMap,wa=new WeakMap,La=new WeakMap,Oa=new WeakMap,Ra=new WeakMap,Ia=new WeakMap,Ta=new WeakMap,Ca=new WeakMap,Ma=new WeakMap,_a=new WeakMap,Sa=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Wa=new WeakSet,Fa=new WeakMap,Ua=new WeakMap,Ba=new WeakMap,Ka=new WeakMap,ja=new WeakMap,za=new WeakMap,Ga=new WeakMap,Va=new WeakMap,Ha=new WeakMap;class Ya extends T.ReactNextElement{constructor(){super(...arguments),(0,f.A)(this,Wa),(0,k.A)(this,ga,it(this)),(0,k.A)(this,Ea,(ot(this),rt(this))),(0,k.A)(this,fa,(st(this),lt(this))),(0,k.A)(this,ka,(ct(this),ht(this))),(0,k.A)(this,Na,(dt(this),ut(this))),(0,k.A)(this,ya,(pt(this),At(this))),(0,k.A)(this,xa,(bt(this),mt(this))),(0,k.A)(this,wa,(vt(this),gt(this))),(0,k.A)(this,La,(Et(this),ft(this))),(0,k.A)(this,Oa,(kt(this),Nt(this))),(0,k.A)(this,Ra,(yt(this),xt(this))),(0,k.A)(this,Ia,(wt(this),Lt(this))),(0,k.A)(this,Ta,(Ot(this),Rt(this))),(0,k.A)(this,Ca,(It(this),Tt(this))),(0,k.A)(this,Ma,(Ct(this),Mt(this))),(0,k.A)(this,_a,(_t(this),St(this))),(0,k.A)(this,Sa,(Dt(this),Pt(this))),(0,k.A)(this,Da,(Wt(this),Ft(this))),(0,k.A)(this,Pa,(Ut(this),Bt(this))),(0,k.A)(this,Fa,(zt(this),e=>{(0,y.A)(Wa,this,Kt).emit(e)})),(0,k.A)(this,Ua,Gt(this)),(0,k.A)(this,Ba,(Yt(this),e=>()=>{(0,y.A)(Wa,this,Vt).emit(e.data)})),(0,k.A)(this,Ka,Xt(this)),(0,k.A)(this,ja,($t(this),e=>{(0,y.A)(Wa,this,qt).emit(e)})),(0,k.A)(this,za,Qt(this)),(0,k.A)(this,Ga,(ta(this),e=>t=>{t.preventDefault(),(0,y.A)(Wa,this,Zt).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})})),(0,k.A)(this,Va,aa(this)),(0,k.A)(this,Ha,(oa(this),(e,t)=>{(0,y.A)(Wa,this,na).emit({nodeId:e,collapsed:t})}))}get nodes(){return(0,w.A)(ga,this)}set nodes(e){(0,x.A)(ga,this,e)}get actions(){return(0,w.A)(Ea,this)}set actions(e){(0,x.A)(Ea,this,e)}get actionsHidden(){return(0,w.A)(fa,this)}set actionsHidden(e){(0,x.A)(fa,this,e)}get placeholder(){return(0,w.A)(ka,this)}set placeholder(e){(0,x.A)(ka,this,e)}get isTransformName(){return(0,w.A)(Na,this)}set isTransformName(e){(0,x.A)(Na,this,e)}get searchPlaceholder(){return(0,w.A)(ya,this)}set searchPlaceholder(e){(0,x.A)(ya,this,e)}get noSearch(){return(0,w.A)(xa,this)}set noSearch(e){(0,x.A)(xa,this,e)}get activeKey(){return(0,w.A)(wa,this)}set activeKey(e){(0,x.A)(wa,this,e)}get showMatchedNodeOnly(){return(0,w.A)(La,this)}set showMatchedNodeOnly(e){(0,x.A)(La,this,e)}get matchNodeDataFields(){return(0,w.A)(Oa,this)}set matchNodeDataFields(e){(0,x.A)(Oa,this,e)}get fixedActionsFor(){return(0,w.A)(Ra,this)}set fixedActionsFor(e){(0,x.A)(Ra,this,e)}get collapsible(){return(0,w.A)(Ia,this)}set collapsible(e){(0,x.A)(Ia,this,e)}get collapsedNodes(){return(0,w.A)(Ta,this)}set collapsedNodes(e){(0,x.A)(Ta,this,e)}get allowDrag(){return(0,w.A)(Ca,this)}set allowDrag(e){(0,x.A)(Ca,this,e)}get allowDragToRoot(){return(0,w.A)(Ma,this)}set allowDragToRoot(e){(0,x.A)(Ma,this,e)}get allowDragToInside(){return(0,w.A)(_a,this)}set allowDragToInside(e){(0,x.A)(_a,this,e)}get nodeKey(){return(0,w.A)(Sa,this)}set nodeKey(e){(0,x.A)(Sa,this,e)}get skipNotify(){return(0,w.A)(Da,this)}set skipNotify(e){(0,x.A)(Da,this,e)}render(){return R().createElement(sa.e.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,w.A)(Fa,this)}},R().createElement(ca.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:pa,onNodeToggle:(0,w.A)(Ha,this),skipNotify:this.skipNotify,clickFactory:(0,w.A)(Ba,this),contextMenuFactory:(0,w.A)(Ga,this),matchNode:(e,t)=>{var a;return(0,ha.U)(e.name,t)||!(null===(a=this.matchNodeDataFields)||void 0===a||!a.length)&&(0,ha.U)("*"===this.matchNodeDataFields?e.data:(0,ra.pick)(e.data,this.matchNodeDataFields),t)}}},R().createElement(la.cU,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,w.A)(ja,this),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}at=Ya,({e:[it,ot,rt,st,lt,ct,ht,dt,ut,pt,At,bt,mt,vt,gt,Et,ft,kt,Nt,yt,xt,wt,Lt,Ot,Rt,It,Tt,Ct,Mt,_t,St,Dt,Pt,Wt,Ft,Ut,Bt,Kt,jt,zt,Gt,Vt,Ht,Yt,Xt,qt,Jt,$t,Qt,Zt,ea,ta,aa,na,ia,oa],c:[Aa,nt]}=(0,L.A)(at,[ba("visual-builder.workbench-tree",{styleTexts:[da.A,ua.A]})],[[ma({attribute:!1}),1,"nodes"],[ma({attribute:!1}),1,"actions"],[ma({type:Boolean}),1,"actionsHidden"],[ma(),1,"placeholder"],[ma({type:Boolean}),1,"isTransformName"],[ma(),1,"searchPlaceholder"],[ma({type:Boolean}),1,"noSearch"],[ma({attribute:!1}),1,"activeKey"],[ma({type:Boolean}),1,"showMatchedNodeOnly"],[ma({attribute:!1}),1,"matchNodeDataFields"],[ma({attribute:!1}),1,"fixedActionsFor"],[ma({type:Boolean}),1,"collapsible"],[ma({attribute:!1}),1,"collapsedNodes"],[ma({type:Boolean}),1,"allowDrag"],[ma({type:Boolean}),1,"allowDragToRoot"],[ma({type:Boolean}),1,"allowDragToInside"],[ma({type:String}),1,"nodeKey"],[ma({type:Boolean}),1,"skipNotify"],[va({type:"action.click"}),1,"actionClickEvent",e=>(0,w.A)(Pa,e),(e,t)=>(0,x.A)(Pa,e,t)],[va({type:"node.click"}),1,"nodeClickEvent",e=>(0,w.A)(Ua,e),(e,t)=>(0,x.A)(Ua,e,t)],[va({type:"node.drop"}),1,"nodeDropEvent",e=>(0,w.A)(Ka,e),(e,t)=>(0,x.A)(Ka,e,t)],[va({type:"context.menu"}),1,"nodeContextMenuEvent",e=>(0,w.A)(za,e),(e,t)=>(0,x.A)(za,e,t)],[va({type:"node.toggle"}),1,"nodeToggleEvent",e=>(0,w.A)(Va,e),(e,t)=>(0,x.A)(Va,e,t)]],0,(e=>Ha.has((0,N.A)(e))),T.ReactNextElement)),nt();var Xa=a(244),qa=a(9027);a(6788),customElements.define("visual-builder.inject-preview-agent",(0,Xa.createProviderClass)((function(e,t){return(0,qa.A)(e,t)})));var Ja,$a,Qa,Za,en,tn,an,nn,on,rn,sn,ln,cn,hn,dn,un,pn,An,bn=a(9740),mn=a(155),vn=a.n(mn),gn=a(1361),En=a(5502),fn=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}({}),kn="bricks/visual-builder/workbench-history-action",Nn=a(6330),yn=a(5381),xn=function(){var e=(0,Nn.A)((function*(e,t,a){return(yield yn.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,bn.A)((0,bn.A)({},a),{},{params:t}))).data}));return function(t,a,n){return e.apply(this,arguments)}}(),wn=a(8799),Ln={add:"".concat(kn,":").concat(fn.ADD),edit:"".concat(kn,":").concat(fn.EDIT),delete:"".concat(kn,":").concat(fn.DELETE),batch_delete:"".concat(kn,":").concat(fn.DELETE),import:"".concat(kn,":").concat(fn.IMPORT),clone:"".concat(kn,":").concat(fn.CLONE),append_relation:"".concat(kn,":").concat(fn.APPEND_RELATION),update_relation:"".concat(kn,":").concat(fn.UPDATE_RELATION),remove_relation:"".concat(kn,":").concat(fn.REMOVE_RELATION),rollback:"".concat(kn,":").concat(fn.ROLLBACK),rollback_all:"".concat(kn,":").concat(fn.ROLLBACK_ALL)},On={add:"".concat(kn,":").concat(fn.ADD_FULL),edit:"".concat(kn,":").concat(fn.EDIT_FULL),delete:"".concat(kn,":").concat(fn.DELETE_FULL),batch_delete:"".concat(kn,":").concat(fn.DELETE_FULL),import:"".concat(kn,":").concat(fn.IMPORT_FULL),clone:"".concat(kn,":").concat(fn.CLONE_FULL),append_relation:"".concat(kn,":").concat(fn.APPEND_RELATION_FULL),update_relation:"".concat(kn,":").concat(fn.UPDATE_RELATION_FULL),remove_relation:"".concat(kn,":").concat(fn.REMOVE_RELATION_FULL),rollback:"".concat(kn,":").concat(fn.ROLLBACK_FULL),rollback_all:"".concat(kn,":").concat(fn.ROLLBACK_ALL_FULL)},Rn={project:"".concat(kn,":").concat(fn.PROJECT),userGroup:"".concat(kn,":").concat(fn.USER),permission:"".concat(kn,":").concat(fn.PERMISSION),brick:"".concat(kn,":").concat(fn.BRICK),route:"".concat(kn,":").concat(fn.ROUTE),template:"".concat(kn,":").concat(fn.TEMPLATE),snippet:"".concat(kn,":").concat(fn.SNIPPET),i18n:"".concat(kn,":").concat(fn.I18N),image:"".concat(kn,":").concat(fn.IMAGE),function:"".concat(kn,":").concat(fn.FUNCTION),menu:"".concat(kn,":").concat(fn.MENU),menuItem:"".concat(kn,":").concat(fn.MENU_ITEM),workflow:"".concat(kn,":").concat(fn.WORKFLOW)},In={PROJECT_MICRO_APP:"".concat(kn,":").concat(fn.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(kn,":").concat(fn.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(kn,":").concat(fn.PERMISSION),STORYBOARD_BRICK:"".concat(kn,":").concat(fn.BRICK),STORYBOARD_ROUTE:"".concat(kn,":").concat(fn.ROUTE),STORYBOARD_TEMPLATE:"".concat(kn,":").concat(fn.TEMPLATE),STORYBOARD_SNIPPET:"".concat(kn,":").concat(fn.SNIPPET),STORYBOARD_I18N:"".concat(kn,":").concat(fn.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(kn,":").concat(fn.IMAGE),STORYBOARD_FUNCTION:"".concat(kn,":").concat(fn.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(kn,":").concat(fn.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(kn,":").concat(fn.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(kn,":").concat(fn.WORKFLOW)};function Tn(e){var t,a,n,i,o,r,s,l,c,h,d,u,p,A,b,m,v,g="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",E=wn.i18n.t(null!==(t=Rn[e.category])&&void 0!==t?t:e.category),f=wn.i18n.t(null!==(a=Ln[g])&&void 0!==a?a:g),k=wn.i18n.t(null!==(n=In[null===(i=e.abstract)||void 0===i?void 0:i.leftObjectId])&&void 0!==n?n:null===(o=e.abstract)||void 0===o?void 0:o.leftObjectId),N=wn.i18n.t(null!==(r=In[null===(s=e.abstract)||void 0===s?void 0:s.rightObjectId])&&void 0!==r?r:null===(l=e.abstract)||void 0===l?void 0:l.rightObjectId),y=Cn(null===(c=e.abstract)||void 0===c?void 0:c.nodes,null===(h=e.abstract)||void 0===h?void 0:h.nodesCount),x=Cn(null===(d=e.abstract)||void 0===d?void 0:d.leftNodes,null===(u=e.abstract)||void 0===u?void 0:u.leftNodesCount),w=Cn(null===(p=e.abstract)||void 0===p?void 0:p.rightNodes,null===(A=e.abstract)||void 0===A?void 0:A.rightNodesCount),L="rollback"===g?Tn(e.rollBackIdInfo).abstract:null;return{category:E,action:f,leftObjectId:k,rightObjectId:N,nodes:y,leftNodes:x,rightNodes:w,abstract:wn.i18n.t(null!==(b=On[g])&&void 0!==b?b:g,{category:E,nodes:y,leftNodes:x,rightNodes:w,nodeChanges:null===(m=e.abstract)||void 0===m||null===(m=m.nodeChanges)||void 0===m?void 0:m.join(", "),relationChanges:null===(v=e.abstract)||void 0===v||null===(v=v.relationChanges)||void 0===v?void 0:v.join(", "),leftObjectId:k,rightObjectId:N,rollbackAbstract:L}),rollbackAbstract:L}}function Cn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return wn.i18n.t("".concat(kn,":").concat(fn.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,En.initializeReactI18n)(kn,{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:"工作流"}});var Mn,{defineElement:_n,property:Sn,event:Dn}=(0,I.createDecorators)(),Pn=(0,T.wrapBrick)("eo-button"),Wn=(0,T.wrapBrick)("eo-link"),Fn=(0,T.wrapBrick)("eo-icon"),Un=(0,T.wrapBrick)("eo-easyops-avatar"),Bn=(0,T.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"}),Kn=new WeakMap,jn=new WeakMap,zn=new WeakMap,Gn=new WeakSet,Vn=new WeakMap,Hn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,qn=new WeakMap;class Jn extends T.ReactNextElement{constructor(){super(...arguments),(0,f.A)(this,Gn),(0,k.A)(this,Kn,Qa(this)),(0,k.A)(this,jn,(Za(this),en(this))),(0,k.A)(this,zn,(tn(this),an(this))),(0,k.A)(this,Vn,(rn(this),e=>{(0,y.A)(Gn,this,nn).emit(e)})),(0,k.A)(this,Hn,sn(this)),(0,k.A)(this,Yn,(hn(this),e=>{(0,y.A)(Gn,this,ln).emit(e)})),(0,k.A)(this,Xn,dn(this)),(0,k.A)(this,qn,(An(this),()=>{(0,y.A)(Gn,this,un).emit()}))}get appId(){return(0,w.A)(Kn,this)}set appId(e){(0,x.A)(Kn,this,e)}get projectId(){return(0,w.A)(jn,this)}set projectId(e){(0,x.A)(jn,this,e)}render(){return R().createElement($n,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,w.A)(Vn,this),onRollback:(0,w.A)(Yn,this),onRollbackAll:(0,w.A)(qn,this)})}}function $n(e){var{appId:t,onHistoryItemClick:a,onRollback:n,onRollbackAll:i}=e,{t:o}=(0,En.useTranslation)(kn),[r,s]=(0,O.useState)(!1),[l,c]=(0,O.useState)(!0),[h,d]=(0,O.useState)(!1),[u,p]=(0,O.useState)([]),A=(0,O.useRef)(""),b=e=>{s(!0),xn(t,{ts:A.current,limit:20}).then((t=>{p((a=>{var n=t.list.map((e=>(0,bn.A)((0,bn.A)({},e),{},{translation:Tn(e)})));return e?n:a.concat(n)})),A.current=t.ts,d(t.list.length<20),c(t.list.length<20)})).catch((e=>{(0,De.handleHttpError)(e)})).finally((()=>{s(!1)}))};return R().createElement(Bn,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(c(!0),d(!1),p([]),A.current="",b(!0))}},R().createElement(Pn,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),R().createElement("div",null,R().createElement("div",{className:"history-title"},"History"),R().createElement("div",{className:"history-list"},u.length?R().createElement(R().Fragment,null,u.map(((e,t)=>R().createElement(Qn,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:a,onRollback:n}))),!l&&R().createElement("span",{className:"load-more-container"},R().createElement(Wn,{className:"load-more",disabled:r,onClick:()=>b()},o(fn.LOAD_MORE))),h&&R().createElement("span",{className:"end-container"},"The End",R().createElement(Fn,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):R().createElement("div",{className:"empty"},o(r?fn.LOADING:fn.NO_DATA))),R().createElement("slot",null)))}function Qn(e){var{data:t,enableRollback:a,current:n,onHistoryItemClick:i,onRollback:o}=e,r=vn()(Number(t.ts)/1e6),s=vn().duration(r.diff(vn()())),l=s.days()<=-1?r.format("YYYY-MM-DD HH:mm:ss"):s.humanize(!0,{ss:0,s:60,m:60,h:24});return R().createElement("div",{className:"item-container"},R().createElement("div",{className:"item-title"},R().createElement("div",{className:"title-left",onClick:()=>i((0,bn.A)((0,bn.A)({},t),{},{enableRollback:a}))},R().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),n&&R().createElement("div",{className:"branch"},"(current)")),R().createElement("div",{className:"title-right"},a&&R().createElement(Fn,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),R().createElement("div",{className:"item-info"},R().createElement(Un,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),R().createElement("div",{className:"time"},l),R().createElement("div",{className:"operator"},t.user)))}Ja=Jn,({e:[Qa,Za,en,tn,an,nn,on,rn,sn,ln,cn,hn,dn,un,pn,An],c:[Mn,$a]}=(0,L.A)(Ja,[_n("visual-builder.workbench-history-action",{styleTexts:[gn.A]})],[[Sn(),1,"appId"],[Sn(),1,"projectId"],[Dn({type:"history.item.click"}),1,"historyItemClickEvent",e=>(0,w.A)(zn,e),(e,t)=>(0,x.A)(zn,e,t)],[Dn({type:"rollback"}),1,"rollbackEvent",e=>(0,w.A)(Hn,e),(e,t)=>(0,x.A)(Hn,e,t)],[Dn({type:"rollback.all"}),1,"rollbackAllEvent",e=>(0,w.A)(Xn,e),(e,t)=>(0,x.A)(Xn,e,t)]],0,(e=>qn.has((0,N.A)(e))),T.ReactNextElement)),$a();var Zn,ei,ti,ai,ni,ii,oi,ri,si,li,ci,hi,di,ui,pi,Ai,bi,mi,vi,gi,Ei,fi,ki,Ni,yi,xi,wi,Li,Oi,Ri,Ii,Ti,Ci,Mi,_i,Si,Di,Pi,Wi,Fi,Ui,Bi,Ki,ji,zi,Gi,Vi,Hi,Yi,Xi,qi,Ji,$i,Qi,Zi,eo=a(2381),{defineElement:to,property:ao,event:no}=(0,I.createDecorators)(),io=(0,T.wrapBrick)("eo-icon"),oo=(0,T.wrapBrick)("eo-tooltip"),ro=new Set,so=new WeakMap,lo=new WeakMap,co=new WeakMap,ho=new WeakMap,uo=new WeakMap,po=new WeakMap,Ao=new WeakMap,bo=new WeakMap,mo=new WeakMap,vo=new WeakSet,go=new WeakMap,Eo=new WeakMap,fo=new WeakMap,ko=new WeakMap,No=new WeakMap,yo=new WeakMap,xo=new WeakMap,wo=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Ro=new WeakMap,Io=new WeakMap,To=new WeakMap,Co=new WeakMap,Mo=new WeakMap,_o=new WeakMap,So=new WeakMap;class Do extends T.ReactNextElement{constructor(){super(...arguments),(0,f.A)(this,vo),(0,k.A)(this,so,ti(this)),(0,k.A)(this,lo,(ai(this),ni(this))),(0,k.A)(this,co,(ii(this),oi(this))),(0,k.A)(this,ho,(ri(this),si(this))),(0,k.A)(this,uo,(li(this),ci(this))),(0,k.A)(this,po,(hi(this),di(this))),(0,k.A)(this,Ao,(ui(this),pi(this))),(0,k.A)(this,bo,(Ai(this),bi(this))),(0,k.A)(this,mo,(mi(this),vi(this))),(0,k.A)(this,go,(fi(this),e=>{(0,y.A)(vo,this,gi).emit(e)})),(0,k.A)(this,Eo,ki(this)),(0,k.A)(this,fo,(xi(this),e=>{(0,y.A)(vo,this,Ni).emit(e)})),(0,k.A)(this,ko,wi(this)),(0,k.A)(this,No,(Ri(this),()=>{(0,y.A)(vo,this,Li).emit()})),(0,k.A)(this,yo,Ii(this)),(0,k.A)(this,xo,(Mi(this),()=>{(0,y.A)(vo,this,Ti).emit()})),(0,k.A)(this,wo,_i(this)),(0,k.A)(this,Lo,(Pi(this),e=>{(0,y.A)(vo,this,Si).emit(e)})),(0,k.A)(this,Oo,Wi(this)),(0,k.A)(this,Ro,(Bi(this),()=>{(0,y.A)(vo,this,Fi).emit()})),(0,k.A)(this,Io,Ki(this)),(0,k.A)(this,To,(Gi(this),e=>{(0,y.A)(vo,this,ji).emit(e)})),(0,k.A)(this,Co,Vi(this)),(0,k.A)(this,Mo,(Xi(this),e=>{(0,y.A)(vo,this,Hi).emit(e)})),(0,k.A)(this,_o,qi(this)),(0,k.A)(this,So,(Qi(this),e=>{(0,y.A)(vo,this,Ji).emit(e)}))}get label(){return(0,w.A)(so,this)}set label(e){(0,x.A)(so,this,e)}get type(){return(0,w.A)(lo,this)}set type(e){(0,x.A)(lo,this,e)}get external(){return(0,w.A)(co,this)}set external(e){(0,x.A)(co,this,e)}get subNodes(){return(0,w.A)(ho,this)}set subNodes(e){(0,x.A)(ho,this,e)}get active(){return(0,w.A)(uo,this)}set active(e){(0,x.A)(uo,this,e)}get notSynced(){return(0,w.A)(po,this)}set notSynced(e){(0,x.A)(po,this,e)}get disableChildAppend(){return(0,w.A)(Ao,this)}set disableChildAppend(e){(0,x.A)(Ao,this,e)}get autoFocusOnce(){return(0,w.A)(bo,this)}set autoFocusOnce(e){(0,x.A)(bo,this,e)}render(){return R().createElement(Po,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,w.A)(go,this),onLabelChange:(0,w.A)(fo,this),onNodeClick:(0,w.A)(No,this),onNodeDoubleClick:(0,w.A)(xo,this),onNodeContextMenu:(0,w.A)(Lo,this),onChildAppend:(0,w.A)(Ro,this),onExternalClick:(0,w.A)(To,this),onSubNodeDoubleClick:(0,w.A)(Mo,this),onSubNodeContextMenu:(0,w.A)(So,this)})}}function Po(e){var t,{label:a,type:n,external:i,subNodes:o,autoFocusOnce:r,onLabelEditingChange:s,onLabelChange:l,onNodeClick:c,onNodeDoubleClick:h,onNodeContextMenu:d,onChildAppend:u,onExternalClick:p,onSubNodeDoubleClick:A,onSubNodeContextMenu:b}=e,m="board"===n?"board":"page",[v,g]=(0,O.useState)(a),[E,f]=(0,O.useState)(!1),k=(0,O.useRef)(!1),[N,y]=(0,O.useState)(!1),x=(0,O.useRef)(null);(0,O.useEffect)((()=>{g(a)}),[a]);var w=(0,O.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),f(!0)}),[]);(0,O.useEffect)((()=>{r&&!ro.has(r)&&(ro.add(r),setTimeout((()=>{f(!0)}),1))}),[r]),(0,O.useEffect)((()=>{var e,t;E&&(null===(e=x.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=x.current)||void 0===t||t.select())}),[E]),(0,O.useEffect)((()=>{k.current?null==s||s(E):k.current=!0}),[E,s]);var L=(0,O.useCallback)((e=>{g(e.target.value)}),[]),I=(0,O.useCallback)((e=>{var t,a=e.key||e.keyCode||e.which;"Enter"!==a&&13!==a||null===(t=x.current)||void 0===t||t.blur()}),[]),T=(0,O.useCallback)((()=>{f(!1),y(!0)}),[]);(0,O.useEffect)((()=>{N&&(null==l||l(v),y(!1))}),[v,l,N]);var C=(0,O.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),M=(0,O.useCallback)((e=>{e.stopPropagation(),null==p||p(i)}),[i,p]),_=(0,O.useCallback)((e=>{e.stopPropagation()}),[]),D=38*Math.max(0,Math.floor((null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)-3));return R().createElement(R().Fragment,null,R().createElement("div",{className:S()("node",m,{"editing-label":E}),style:{height:"board"===m?70:130+D},onClick:c,onDoubleClick:h,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},R().createElement("input",{className:"label-input",value:v,ref:x,onChange:L,onKeyDown:I,onBlur:T,onDoubleClick:_,onContextMenu:_,onMouseDown:_}),R().createElement("div",{className:"label",onDoubleClick:w,onMouseDown:_},v),"board"===m?R().createElement("div",{className:"icon-container"},R().createElement(io,{lib:"antd",icon:"unordered-list"})):R().createElement("div",{className:"thumbnail-container",style:{height:98+D}},R().createElement("div",{className:"thumbnail-placeholder"},R().createElement(io,{lib:"antd",icon:"ellipsis"})),i&&R().createElement("div",{className:"external",onClick:M,onDoubleClick:_,onMouseDown:_},R().createElement(io,{lib:"antd",icon:"desktop"}),R().createElement("span",{className:"external-label"},i.label)),null!=o&&o.length?R().createElement("div",{className:"sub-nodes"},o.map((e=>R().createElement(Wo,{key:e.id,subNode:e,onSubNodeDoubleClick:A,onSubNodeContextMenu:b})))):null)),R().createElement("div",{className:"add-button",role:"button",onClick:C,onMouseDown:_},R().createElement(io,{lib:"fa",icon:"plus"})))}function Wo(e){var{subNode:t,onSubNodeDoubleClick:a,onSubNodeContextMenu:n}=e;return R().createElement(oo,{key:t.id,content:t.label},R().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==a||a(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==n||n({node:t,clientX:e.clientX,clientY:e.clientY})}},R().createElement("div",{className:"sub-node-skeleton-title"}),R().createElement("div",{className:"sub-node-skeleton-content"}),R().createElement("div",{className:"sub-node-skeleton-button"})))}Zn=Do,({e:[ti,ai,ni,ii,oi,ri,si,li,ci,hi,di,ui,pi,Ai,bi,mi,vi,gi,Ei,fi,ki,Ni,yi,xi,wi,Li,Oi,Ri,Ii,Ti,Ci,Mi,_i,Si,Di,Pi,Wi,Fi,Ui,Bi,Ki,ji,zi,Gi,Vi,Hi,Yi,Xi,qi,Ji,$i,Qi],c:[Zi,ei]}=(0,L.A)(Zn,[to("visual-builder.page-arch-node",{styleTexts:[eo.A]})],[[ao(),1,"label"],[ao(),1,"type"],[ao({attribute:!1}),1,"external"],[ao({attribute:!1}),1,"subNodes"],[ao({type:Boolean,render:!1}),1,"active"],[ao({type:Boolean,render:!1}),1,"notSynced"],[ao({type:Boolean,render:!1}),1,"disableChildAppend"],[ao(),1,"autoFocusOnce"],[no({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,w.A)(mo,e),(e,t)=>(0,x.A)(mo,e,t)],[no({type:"label.change"}),1,"labelChange",e=>(0,w.A)(Eo,e),(e,t)=>(0,x.A)(Eo,e,t)],[no({type:"node.click"}),1,"nodeClick",e=>(0,w.A)(ko,e),(e,t)=>(0,x.A)(ko,e,t)],[no({type:"node.dblclick"}),1,"nodeDoubleClick",e=>(0,w.A)(yo,e),(e,t)=>(0,x.A)(yo,e,t)],[no({type:"node.contextmenu"}),1,"nodeContextMenu",e=>(0,w.A)(wo,e),(e,t)=>(0,x.A)(wo,e,t)],[no({type:"child.append"}),1,"childAppend",e=>(0,w.A)(Oo,e),(e,t)=>(0,x.A)(Oo,e,t)],[no({type:"external.click"}),1,"externalClick",e=>(0,w.A)(Io,e),(e,t)=>(0,x.A)(Io,e,t)],[no({type:"subNode.dblclick"}),1,"subNodeDoubleClick",e=>(0,w.A)(Co,e),(e,t)=>(0,x.A)(Co,e,t)],[no({type:"subNode.contextmenu"}),1,"subNodeContextMenu",e=>(0,w.A)(_o,e),(e,t)=>(0,x.A)(_o,e,t)]],0,(e=>So.has((0,N.A)(e))),T.ReactNextElement)),ei();var Fo,Uo,Bo,Ko,jo,zo,Go,Vo,Ho,Yo,Xo=a(4845),qo=a(6213),Jo=a(2559);function $o(e,t,a,n){return t((0,Jo.A)(e,a),n),n}var{method:Qo,property:Zo}=(0,I.createDecorators)(),er=new WeakMap,tr=new WeakSet,ar=new WeakMap,nr=new WeakMap,ir=new WeakMap,or=new WeakMap,rr=new WeakMap,sr=new WeakMap;class lr extends T.ReactNextElement{constructor(){super(...arguments),(0,f.A)(this,tr),(0,k.A)(this,er,(Uo(this),!1)),(0,k.A)(this,ar,"normal"),(0,k.A)(this,nr,!1),(0,k.A)(this,ir,Bo(this)),(0,k.A)(this,or,(Ko(this),jo(this))),(0,k.A)(this,rr,(zo(this),Go(this))),(0,k.A)(this,sr,(Vo(this),Ho(this))),Yo(this)}get isFormItemElement(){return!0}set validateState(e){$o(tr,ur,this,e),this._render()}get validateState(){return(0,y.A)(tr,this,dr)}set notRender(e){this.hidden=e,$o(tr,hr,this,e),this._render()}get notRender(){return(0,y.A)(tr,this,cr)}get $bindFormItem(){return(0,y.A)(tr,this,pr)}set $bindFormItem(e){$o(tr,Ar,this,e),this._render()}get helpBrick(){return(0,w.A)(ir,this)}set helpBrick(e){(0,x.A)(ir,this,e)}get labelBrick(){return(0,w.A)(or,this)}set labelBrick(e){(0,x.A)(or,this,e)}get labelCol(){return(0,w.A)(rr,this)}set labelCol(e){(0,x.A)(rr,this,e)}get wrapperCol(){return(0,w.A)(sr,this)}set wrapperCol(e){(0,x.A)(sr,this,e)}setNotRender(e){this.notRender=e}getFormElement(){for(var e=this;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function cr(e){return(0,w.A)(er,e)}function hr(e,t){(0,x.A)(er,e,t)}function dr(e){return(0,w.A)(ar,e)}function ur(e,t){(0,x.A)(ar,e,t)}function pr(e){return(0,w.A)(nr,e)}function Ar(e,t){(0,x.A)(nr,e,t)}Fo=lr,[Bo,Ko,jo,zo,Go,Vo,Ho,Yo,Uo]=(0,L.A)(Fo,[],[[Zo({attribute:!1}),1,"helpBrick"],[Zo({attribute:!1}),1,"labelBrick"],[Zo({attribute:!1}),1,"labelCol"],[Zo({attribute:!1}),1,"wrapperCol"],[Qo(),2,"setNotRender"],[Qo(),2,"getFormElement"]],0,void 0,T.ReactNextElement).e;var br=function(){var e=(0,Nn.A)((function*(e,t){return(yield yn.http.post("api/gateway/next_builder.contract_center.SearchContract/api/v1/contract/search",e,t)).data}));return function(t,a){return e.apply(this,arguments)}}(),mr=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}({}),vr="bricks/visual-builder/contract-select",gr={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,En.initializeReactI18n)(vr,gr);var Er,fr,kr,Nr,yr,xr,wr,Lr,Or,Rr,Ir,Tr,Cr,Mr,_r,Sr,Dr=(0,T.wrapBrick)("eo-icon"),Pr=(0,T.wrapBrick)("eo-input",{onChange:"change"});function Wr(e){var{itemsCount:t=20,onBlur:a}=e,[n,i]=(0,O.useState)(t),{t:o}=(0,En.useTranslation)(vr),[r,s]=(0,O.useState)(!1);return R().createElement("div",{className:"options-tips",slot:e.slot},o(mr.CONTRACT_OPTIONS_TIPS_PREFIX)," ",r?R().createElement(Pr,{autoFocus:!0,inputStyle:{width:65},value:String(n),onBlur:()=>{s(!1),null==a||a(n)},onChange:e=>{i(Number(e.detail))}}):R().createElement("span",null,n," ",R().createElement(Dr,{icon:"edit",lib:"antd",onClick:()=>{s(!0)}}))," ",o(mr.CONTRACT_OPTIONS_TIPS_SUFFIX))}(0,En.initializeReactI18n)(vr,gr);var Fr,{defineElement:Ur,property:Br,event:Kr}=(0,I.createDecorators)(),jr=(0,T.wrapBrick)("eo-form-item"),zr=(0,T.wrapBrick)("eo-auto-complete",{onChange:"change"}),Gr=new WeakMap,Vr=new WeakMap,Hr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,qr=new WeakMap,Jr=new WeakSet;function $r(e){if("string"!=typeof e)return{name:"",version:""};var[t,a]=e.split(":");return{name:t,version:a}}function Qr(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function Zr(e){return(0,ra.isNil)(e)||Qr(e)?"":wn.i18n.t("".concat(vr,":").concat(mr.CONTRACT_VALIDATE_MESSAGE))}function es(e){var{value:t,inputStyle:a,validateState:n,suffix:i,onChange:o}=e,[r,s]=(0,O.useState)(),[l,c]=(0,O.useState)(20),h=function(e){var{pageSize:t=20,q:a=""}=e,[n,i]=(0,O.useState)([]),[o,r]=(0,O.useState)(a),[s,l]=(0,O.useState)(t);return(0,O.useEffect)((()=>{r(a)}),[a]),(0,O.useEffect)((()=>{l(t)}),[t]),(0,O.useEffect)((()=>{(0,Nn.A)((function*(){try{var{list:e}=yield br({page:1,pageSize:s,fullContractName:o},{interceptorParams:{ignoreLoadingBar:!0}});i(e)}catch(e){console.error(e),i([])}}))()}),[o,s]),n}({q:r,pageSize:l}),[d,u]=(0,O.useState)($r(t)),[p,A]=(0,O.useState)([]);(0,O.useEffect)((()=>{u($r(t))}),[t]);var b=(0,O.useMemo)((()=>(0,ra.debounce)((e=>{s(e)}),200)),[]);return R().createElement("div",{className:"contract-wrapper"},R().createElement(zr,{className:"contract-selector",options:null==h?void 0:h.map((e=>({value:e.fullContractName,label:e.fullContractName}))),value:d.name,inputStyle:a,validateState:n,onChange:e=>{var t=e.detail;if(Qr(t))u($r(t)),null==o||o(t);else{var a,n,i=null===(a=h.find((e=>e.fullContractName===t)))||void 0===a?void 0:a.version,r=null!==(n=null==i?void 0:i[0])&&void 0!==n?n:"";A(i),u({name:t,version:r}),null==o||o("".concat(t,":").concat(r))}b(t)}},R().createElement(Wr,{onBlur:e=>c(e),slot:"options-toolbar"})),R().createElement(zr,{className:"version-selector",value:d.version,validateState:n,options:null==p?void 0:p.map((e=>({value:e,label:e}))),onChange:e=>{var t=e.detail;u({name:d.name,version:t}),null==o||o("".concat(d.name,":").concat(t))}}),null!=i&&i.useBrick?R().createElement(Xo.ReactUseMultipleBricks,i):null)}Er=class extends lr{constructor(){super(...arguments),(0,f.A)(this,Jr),(0,k.A)(this,Gr,kr(this)),(0,k.A)(this,Vr,(Nr(this),yr(this))),(0,k.A)(this,Hr,(xr(this),wr(this))),(0,k.A)(this,Yr,(Lr(this),Or(this))),(0,k.A)(this,Xr,(Rr(this),Ir(this))),(0,k.A)(this,qr,(Tr(this),Cr(this))),(0,ee.A)(this,"handleChange",(Sr(this),e=>{(0,y.A)(Jr,this,Mr).emit(e)}))}get name(){return(0,w.A)(Gr,this)}set name(e){(0,x.A)(Gr,this,e)}get required(){return(0,w.A)(Vr,this)}set required(e){(0,x.A)(Vr,this,e)}get label(){return(0,w.A)(Hr,this)}set label(e){(0,x.A)(Hr,this,e)}get value(){return(0,w.A)(Yr,this)}set value(e){(0,x.A)(Yr,this,e)}get suffix(){return(0,w.A)(Xr,this)}set suffix(e){(0,x.A)(Xr,this,e)}render(){return R().createElement(jr,{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:Zr},R().createElement(es,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[kr,Nr,yr,xr,wr,Lr,Or,Rr,Ir,Tr,Cr,Mr,_r,Sr],c:[Fr,fr]}=(0,L.A)(Er,[Ur("visual-builder.contract-select",{styleTexts:[qo.A]})],[[Br(),1,"name"],[Br({type:Boolean}),1,"required"],[Br(),1,"label"],[Br({attribute:!1}),1,"value"],[Br({attribute:!1}),1,"suffix"],[Kr({type:"change"}),1,"changeEvent",e=>(0,w.A)(qr,e),(e,t)=>(0,x.A)(qr,e,t)]],0,(e=>Jr.has((0,N.A)(e))),lr)),fr();var ts,as,ns,is,os,rs,ss,ls,cs,hs=a(7236),{defineElement:ds,property:us,event:ps}=(0,I.createDecorators)(),As=(0,O.forwardRef)(fs),bs=new WeakMap,ms=new WeakMap,vs=new WeakSet,gs=new WeakMap;class Es extends T.ReactNextElement{constructor(){super(...arguments),(0,f.A)(this,vs),(0,k.A)(this,bs,ns(this)),(0,k.A)(this,ms,(is(this),os(this))),(0,k.A)(this,gs,(ls(this),e=>{(0,y.A)(vs,this,rs).emit(e)}))}get messages(){return(0,w.A)(bs,this)}set messages(e){(0,x.A)(bs,this,e)}render(){return R().createElement(As,{messages:this.messages,onStoryboardUpdate:(0,w.A)(gs,this)})}}function fs(e){var{messages:t,onStoryboardUpdate:a}=e,n=(0,O.useMemo)((()=>/(?:^|\n)```easy_cmd_vb_block_(page|storyboard)\n([\s\S]*?)\n```(?:$|\n)/gm),[]),i=(0,O.useRef)(new Map),[o,r]=(0,O.useState)([]),s=(0,O.useRef)(null);(0,O.useEffect)((()=>{var e=function(){var e,t;if("assistant"!==a.role)return 1;n.lastIndex=null!==(e=i.current.get(a.key))&&void 0!==e?e:0;for(var o=[];t=n.exec(a.content);){i.current.set(a.key,n.lastIndex);var[,s,l]=t;try{var c=JSON.parse(l);"page"===s?o.push(...c):o.push((0,bn.A)((0,bn.A)({},c),{},{type:"storyboard"}))}catch(e){console.error("parse storyboard failed:",e)}}r((e=>[...e,...o]))};for(var a of null!=t?t:[])e()}),[n,t]);var[l,c]=(0,O.useState)([]);return(0,O.useEffect)((()=>{var e=[],t=new Map;for(var a of o)"block"===a.type?e.push(a):a.storyboard&&t.set(a.uuid,a.storyboard);e.sort(((e,t)=>e.seq-t.seq));var n={brick:"eo-content-layout",children:[]},i={brick:"eo-main-view",children:[{brick:"eo-page-title",slot:"pageTitle",properties:{pageTitle:"测试页面"}}]},r=!1;for(var s of e)if("全局操作区"===s.name)for(var l of s.children){var h=t.get(l);h&&(i.children.push((0,bn.A)((0,bn.A)({},h),{},{slot:"toolbar"})),r=!0)}else{var d=t.get(s.uuid);if(d){var u=(0,bn.A)((0,bn.A)({},d),{},{children:[]});for(var p of(r=!0,n.children.push(u),s.children)){var A=t.get(p);A&&u.children.push(A)}}else if(!s.hasContainer)for(var b of s.children){var m=t.get(b);m&&(n.children.push(m),r=!0)}}i.children.push(n),c((e=>r?[i]:0===e.length?e:[]))}),[o]),(0,O.useEffect)((()=>{null==a||a(l)}),[a,l]),(0,O.useEffect)((()=>{setTimeout((()=>{var e,t;null===(e=s.current)||void 0===e||e.scrollTo(0,null===(t=s.current)||void 0===t?void 0:t.scrollHeight)}),0)}),[l]),R().createElement("div",{className:"chat",ref:s},null==t?void 0:t.map(((e,t)=>{var a;return R().createElement("p",{key:null!==(a=e.key)&&void 0!==a?a:"index-".concat(t),className:S()({failed:e.failed})},(0,ra.upperFirst)(e.role),": ",e.content,e.partial&&R().createElement(ks,null))})))}function ks(){var[e,t]=(0,O.useState)(1);return(0,O.useEffect)((()=>{setInterval((()=>{t((e=>(e+1)%4))}),500)}),[]),R().createElement(R().Fragment,null,R().createElement("span",null,".".repeat(e)),R().createElement("span",{className:"invisible-dots"},".".repeat(3-e)))}ts=Es,({e:[ns,is,os,rs,ss,ls],c:[cs,as]}=(0,L.A)(ts,[ds("visual-builder.chat-conversation",{styleTexts:[hs.A]})],[[us({attribute:!1}),1,"messages"],[ps({type:"storyboard.update"}),1,"storyboardUpdate",e=>(0,w.A)(ms,e),(e,t)=>(0,x.A)(ms,e,t)]],0,(e=>gs.has((0,N.A)(e))),T.ReactNextElement)),as();var Ns,ys,xs,ws,Ls,Os=a(1732),Rs=a(1563),{defineElement:Is,property:Ts}=(0,I.createDecorators)(),Cs=new WeakMap;class Ms extends T.ReactNextElement{constructor(){super(...arguments),(0,k.A)(this,Cs,xs(this)),ws(this)}get storyboard(){return(0,w.A)(Cs,this)}set storyboard(e){(0,x.A)(Cs,this,e)}render(){return R().createElement(_s,{storyboard:this.storyboard})}}function _s(e){var{storyboard:t}=e,a=(0,O.useRef)(),[n,i]=(0,O.useState)(!1),o=(0,O.useCallback)((()=>{var e=()=>{var t;null!==(t=a.current)&&void 0!==t&&null!==(t=t.contentWindow)&&void 0!==t&&t._preview_only_render?i(!0):setTimeout(e,100)};e()}),[]);return(0,O.useEffect)((()=>{var e;if(n){var i=null===(e=a.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;i&&i("yaml",{yaml:(0,Os.safeDump)(t,{schema:Os.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})})}}),[n,t]),R().createElement("iframe",{ref:a,src:"".concat((0,De.getBasePath)(),"_brick-preview-v3_/preview/"),loading:"lazy",onLoad:o})}Ns=Ms,({e:[xs,ws],c:[Ls,ys]}=(0,L.A)(Ns,[Is("visual-builder.chat-preview",{styleTexts:[Rs.A]})],[[Ts({attribute:!1}),1,"storyboard"]],0,void 0,T.ReactNextElement)),ys()},7236:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.chat{height:100%;max-height:100%;overflow-y:auto;white-space:pre-wrap}.chat > p{background-color:var(--palette-gray-3);border-radius:6px;padding:1em}.chat > p:not(:last-child){margin-bottom:1em}.invisible-dots{opacity:0}.failed{color:var(--color-error)}",""]);const s=r.toString()},1563:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.push([e.id,":host{display:block}:host([hidden]){display:none}iframe{display:block;border:none;margin:0;width:100%;height:100%}",""]);const s=r.toString()},6213:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.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=r.toString()},2381:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.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;-moz-user-select:none;user-select:none}.node.board{height:70px;max-width:168px;width:-webkit-fit-content;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;-moz-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:-webkit-fit-content;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;grid-gap:6px;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=r.toString()},9765:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.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=r.toString()},3430:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.push([e.id,'.workBenchActionList{display:flex;flex-direction:column;width:-webkit-min-content;width:-moz-min-content;width:min-content;height:100%;background-color:#4297ff}:host-context(html[data-theme="dark-v2"]) .workBenchActionList,\n:host-context([data-override-theme="dark-v2"]) .workBenchActionList{background-color:#323237}',""]);const s=r.toString()},5292:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:rgba(255,255,255,0.4);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:white}.action.active::part(link),\n.action::part(link):hover{color:white}',""]);const s=r.toString()},1361:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.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=r.toString()},7180:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.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=r.toString()},2150:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(6758),i=a.n(n),o=a(935),r=a.n(o)()(i());r.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=r.toString()}}]);
|
|
3
|
-
//# sourceMappingURL=7224.92a43c9e.js.map
|