@next-bricks/visual-builder 1.7.0 → 1.7.1

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 CHANGED
@@ -49,5 +49,5 @@
49
49
  "eo-input"
50
50
  ]
51
51
  },
52
- "filePath": "bricks/visual-builder/dist/index.7a2b7833.js"
52
+ "filePath": "bricks/visual-builder/dist/index.b2fd5547.js"
53
53
  }
@@ -1,3 +1,3 @@
1
- /*! For license information please see 4816.131f65eb.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[4816],{4816:(e,t,a)=>{a.r(t);var n,i,o,c,l,r,s,h,d,u,p,b,v,m,g,E,f,w,k,N=a(2504),x=a(592),L=a(5866),y=a(1412),O=a(8644),M=a(5600),I=a.n(M),R=a(7672),T=a(8160),C=a(9124),A=a(8808),_=a(1252),D=a.n(_),S=(0,T.wrapBrick)("eo-icon"),{defineElement:P,property:W,event:F}=(0,R.createDecorators)();o=[P("visual-builder.workbench-pane",{styleTexts:[C.c,A.c]})],c=W(),r=W({type:Boolean}),h=W({type:Number}),u=F({type:"active.change"}),m=F({type:"active.firstActivated"});var U=new WeakMap,B=new WeakMap,K=new WeakMap,j=new WeakMap,z=new WeakMap,G=new WeakMap,V=new WeakMap,Y=new WeakMap,H=new WeakMap;class X extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,Y,{get:Q,set:$}),(0,N.c)(this,z,{get:J,set:q}),(0,N.c)(this,U,{writable:!0,value:(n(this),l(this))}),(0,N.c)(this,B,{writable:!0,value:s(this)}),(0,N.c)(this,K,{writable:!0,value:d(this)}),(0,N.c)(this,j,{writable:!0,value:p(this)}),(0,N.c)(this,G,{writable:!0,value:e=>{e!==this.active&&(this.active=e,(0,y.c)(this,z).emit(e))}}),(0,N.c)(this,V,{writable:!0,value:g(this)}),(0,N.c)(this,H,{writable:!0,value:()=>{(0,y.c)(this,Y).emit()}})}get titleLabel(){return(0,y.c)(this,U)}set titleLabel(e){(0,L.c)(this,U,e)}get active(){return(0,y.c)(this,B)}set active(e){(0,L.c)(this,B,e)}get badge(){return(0,y.c)(this,K)}set badge(e){(0,L.c)(this,K,e)}render(){return I().createElement(Z,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,y.c)(this,G),onFirstActivated:(0,y.c)(this,H)})}}function q(e){v(this,e)}function J(){return b(this)}function $(e){f(this,e)}function Q(){return E(this)}function Z(e){var{titleLabel:t,active:a,badge:n,onActiveChange:i,onFirstActivated:o}=e,[c,l]=(0,M.useState)(a),[r,s]=(0,M.useState)(!1);(0,M.useEffect)((()=>{l(a)}),[a]),(0,M.useEffect)((()=>{null==i||i(c)}),[c,i]);var h=(0,M.useCallback)((()=>{l((e=>!e)),r||c||(s(!0),null==o||o())}),[r,c,o]),d=(0,M.useRef)(),[u,p]=(0,M.useState)(!1),b=(0,M.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 I().createElement("div",{className:D()("pane",{scrolled:u})},I().createElement("div",{className:"pane-header",tabIndex:0,onClick:h},I().createElement("div",{className:"pane-title"},I().createElement("span",{className:"title-icon"},c?I().createElement(S,{lib:"antd",theme:"outlined",icon:"down"}):I().createElement(S,{lib:"antd",theme:"outlined",icon:"right"})),I().createElement("div",{className:"title-label"},t),I().createElement("slot",{name:"title"})),I().createElement("slot",{name:"actions"}),n&&I().createElement("div",{className:"badge"},n),I().createElement("div",{className:"pane-scroll-shadow"})),I().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:b,ref:d},I().createElement("slot",null,I().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}w=X,({e:[l,s,d,p,b,v,g,E,f,n],c:[k,i]}=(0,O.c)(w,[[c,1,"titleLabel"],[r,1,"active"],[h,1,"badge"],[u,1,"activeChangeEvent",e=>(0,y.c)(e,j),(e,t)=>(0,L.c)(e,j,t)],[m,1,"activeFirstActivatedEvent",e=>(0,y.c)(e,V),(e,t)=>(0,L.c)(e,V,t)]],o,0,(e=>H.has((0,x.c)(e))),T.ReactNextElement)),i();var ee,te,ae,ne,ie,oe,ce,le=a(7392),re=a(3804),{defineElement:se,property:he}=(0,R.createDecorators)();ae=[se("visual-builder.workbench-sidebar",{styleTexts:[re.c]})],ne=he();var de=new WeakMap,ue=new WeakMap,pe=new WeakMap,be=new WeakMap;class ve extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,de,{writable:!0,value:(ee(this),ie(this))}),(0,N.c)(this,ue,{writable:!0,value:()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")}}),(0,N.c)(this,pe,{writable:!0,value:()=>{var e=(0,y.c)(this,ue).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,N.c)(this,be,{writable:!0,value:e=>{var t=e.target.assignedNodes();for(var a of t)a.addEventListener("active.change",(0,y.c)(this,pe))}}),(0,le.c)(this,"refCallback",(()=>{(0,y.c)(this,pe).call(this);var e=(0,y.c)(this,ue).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,y.c)(this,be).call(this,e)}))}))}get titleLabel(){return(0,y.c)(this,de)}set titleLabel(e){(0,L.c)(this,de,e)}render(){return I().createElement(me,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function me(e){var{titleLabel:t,refCallback:a}=e;return I().createElement("div",{className:"sidebar",ref:a},I().createElement("div",{className:"title-container"},I().createElement("div",{className:"title-label"},t),I().createElement("slot",{name:"titleToolbar"})),I().createElement("div",{className:"pane-container"},I().createElement("slot",null)))}oe=ve,({e:[ie,ee],c:[ce,te]}=(0,O.c)(oe,[[ne,1,"titleLabel"]],ae,0,void 0,T.ReactNextElement)),te();var ge,Ee,fe,we,ke,Ne,xe,Le,ye,Oe,Me,Ie,Re,Te,Ce,Ae=a(3124),{defineElement:_e,property:De}=(0,R.createDecorators)(),Se=(0,T.wrapBrick)("eo-link"),Pe=(0,T.wrapBrick)("eo-icon");fe=[_e("visual-builder.workbench-action",{styleTexts:[Ae.c]})],we=De({attribute:!1}),Ne=De(),Le=De({type:Boolean}),Oe=De(),Ie=De();var We=new WeakMap,Fe=new WeakMap,Ue=new WeakMap,Be=new WeakMap,Ke=new WeakMap;class je extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,We,{writable:!0,value:(ge(this),ke(this))}),(0,N.c)(this,Fe,{writable:!0,value:xe(this)}),(0,N.c)(this,Ue,{writable:!0,value:ye(this)}),(0,N.c)(this,Be,{writable:!0,value:Me(this)}),(0,N.c)(this,Ke,{writable:!0,value:Re(this)})}get icon(){return(0,y.c)(this,We)}set icon(e){(0,L.c)(this,We,e)}get to(){return(0,y.c)(this,Fe)}set to(e){(0,L.c)(this,Fe,e)}get active(){return(0,y.c)(this,Ue)}set active(e){(0,L.c)(this,Ue,e)}get href(){return(0,y.c)(this,Be)}set href(e){(0,L.c)(this,Be,e)}get target(){return(0,y.c)(this,Ke)}set target(e){(0,L.c)(this,Ke,e)}render(){return I().createElement(ze,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function ze(e){var{icon:t,to:a,active:n,href:i,target:o}=e;return I().createElement(Se,{className:D()("action",{active:n}),url:a,href:i,target:o},I().createElement(Pe,t))}Te=je,({e:[ke,xe,ye,Me,Re,ge],c:[Ce,Ee]}=(0,O.c)(Te,[[we,1,"icon"],[Ne,1,"to"],[Le,1,"active"],[Oe,1,"href"],[Ie,1,"target"]],fe,0,void 0,T.ReactNextElement)),Ee();var Ge=a(6960),Ve=a(80);function Ye(e,t,a,n){var i=[],o=[],c=[],l=0;return e.forEach((e=>{if(e.key=""===n?"".concat(l):"".concat(n,".").concat(l),function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){var r=Ye(e.items,t,a,e.key);i.push(...r.selectedKeys),(r.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...r.openedKeys),c.push(...r.matchedKeys)}else if(function(e,t,a){if(!e.to)return!1;var n="object"==typeof e.to?e.to:(0,Ve.parsePath)(e.to),i=n.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,Ge.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=He(a,n.search)),!o&&Array.isArray(e.activeIncludes))for(var c of e.activeIncludes){var l,r=void 0,s=c.includes("?");if(s&&(r=(0,Ve.parsePath)(c)),(o=!!(0,Ge.matchPath)(t,{path:s?r.pathname:c,exact:!0}))&&null!==(l=r)&&void 0!==l&&l.search&&(o=He(a,r.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var h of e.activeExcludes)if(!(o=!(0,Ge.matchPath)(t,{path:h,exact:!0})))break;return o}(e,t,a)){i.push(String(e.key));for(var s=e.key.split("."),h=0;h<s.length;h++)c.push(s.slice(0,h+1).join("."))}l+=1})),i.length&&""!==n&&o.push(n),{selectedKeys:i,openedKeys:o,matchedKeys:c}}function He(e,t){var a=new URLSearchParams(e),n=new URLSearchParams(t);for(var[i,o]of n.entries()){var c;if((null!==(c=a.get(i))&&void 0!==c?c:"")!==o)return!1}return!0}var Xe,qe,Je,$e,Qe,Ze,et,tt,at,nt=a(3504),it=(0,T.wrapBrick)("visual-builder.workbench-action"),{defineElement:ot,property:ct}=(0,R.createDecorators)();Je=[ot("visual-builder.workbench-action-list",{styleTexts:[nt.c]})],$e=ct(),Ze=ct({attribute:!1});var lt,rt=new WeakMap,st=new WeakMap;class ht extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,rt,{writable:!0,value:(Xe(this),Qe(this))}),(0,N.c)(this,st,{writable:!0,value:et(this)})}get appId(){return(0,y.c)(this,rt)}set appId(e){(0,L.c)(this,rt,e)}get menu(){return(0,y.c)(this,st)}set menu(e){(0,L.c)(this,st,e)}render(){return I().createElement(ut,{appId:this.appId,menu:this.menu})}}tt=ht,({e:[Qe,et,Xe],c:[at,qe]}=(0,O.c)(tt,[[$e,1,"appId"],[Ze,1,"menu"]],Je,0,void 0,T.ReactNextElement)),qe();var dt=new Map;function ut(e){var t,{appId:a,menu:n}=e,i=(0,Ge.getHistory)(),[o,c]=(0,M.useState)(),[l,r]=(0,M.useState)(i.location);return(0,M.useEffect)((()=>{var e=i.listen((e=>{r(e)}));return e}),[i]),(0,M.useEffect)((()=>{lt||(lt=a),lt!==a&&(dt.clear(),lt=a)}),[a]),(0,M.useEffect)((()=>{var e,{pathname:t,search:a}=l,{selectedKeys:i}=Ye(null!==(e=null==n?void 0:n.menuItems)&&void 0!==e?e:[],t,a,"");c(Number(i[0]))}),[n,l]),I().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&&dt.has(t)&&(a=dt.get(t)),I().createElement(it,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||dt.set(o,"".concat(l.pathname).concat(l.search))})(e)})}})).filter(Boolean))}var pt,bt,vt,mt,gt,Et,ft,wt,kt,Nt,xt,Lt,yt,Ot,Mt,It,Rt,Tt,Ct,At,_t,Dt,St,Pt,Wt,Ft,Ut,Bt,Kt,jt,zt,Gt,Vt,Yt,Ht,Xt,qt,Jt,$t,Qt,Zt,ea,ta,aa,na,ia,oa,ca,la,ra,sa,ha,da,ua,pa,ba,va,ma,ga,Ea,fa=a(9604),wa=a(8080),ka=a(3676),Na=a(5127),xa=a(6184),La=a(5244),ya=a(5080);function Oa(e){return e.key}a(48);var Ma,{defineElement:Ia,property:Ra,event:Ta}=(0,R.createDecorators)();vt=[Ia("visual-builder.workbench-tree",{styleTexts:[La.c,ya.c]})],mt=Ra({attribute:!1}),Et=Ra({attribute:!1}),wt=Ra({type:Boolean}),Nt=Ra(),Lt=Ra({type:Boolean}),Ot=Ra(),It=Ra({type:Boolean}),Tt=Ra({attribute:!1}),At=Ra({type:Boolean}),Dt=Ra({attribute:!1}),Pt=Ra({attribute:!1}),Ft=Ra({type:Boolean}),Bt=Ra({attribute:!1}),jt=Ra({type:Boolean}),Gt=Ra({type:Boolean}),Yt=Ra({type:Boolean}),Xt=Ra({type:String}),Jt=Ra({type:Boolean}),Qt=Ta({type:"action.click"}),aa=Ta({type:"node.click"}),ca=Ta({type:"node.drop"}),ha=Ta({type:"context.menu"}),ba=Ta({type:"node.toggle"});var Ca=new WeakMap,Aa=new WeakMap,_a=new WeakMap,Da=new WeakMap,Sa=new WeakMap,Pa=new WeakMap,Wa=new WeakMap,Fa=new WeakMap,Ua=new WeakMap,Ba=new WeakMap,Ka=new WeakMap,ja=new WeakMap,za=new WeakMap,Ga=new WeakMap,Va=new WeakMap,Ya=new WeakMap,Ha=new WeakMap,Xa=new WeakMap,qa=new WeakMap,Ja=new WeakMap,$a=new WeakMap,Qa=new WeakMap,Za=new WeakMap,en=new WeakMap,tn=new WeakMap,an=new WeakMap,nn=new WeakMap,on=new WeakMap,cn=new WeakMap,ln=new WeakMap,rn=new WeakMap,sn=new WeakMap,hn=new WeakMap;class dn extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,sn,{get:kn,set:wn}),(0,N.c)(this,cn,{get:fn,set:En}),(0,N.c)(this,an,{get:gn,set:mn}),(0,N.c)(this,Za,{get:vn,set:bn}),(0,N.c)(this,Ja,{get:pn,set:un}),(0,N.c)(this,Ca,{writable:!0,value:(pt(this),gt(this))}),(0,N.c)(this,Aa,{writable:!0,value:ft(this)}),(0,N.c)(this,_a,{writable:!0,value:kt(this)}),(0,N.c)(this,Da,{writable:!0,value:xt(this)}),(0,N.c)(this,Sa,{writable:!0,value:yt(this)}),(0,N.c)(this,Pa,{writable:!0,value:Mt(this)}),(0,N.c)(this,Wa,{writable:!0,value:Rt(this)}),(0,N.c)(this,Fa,{writable:!0,value:Ct(this)}),(0,N.c)(this,Ua,{writable:!0,value:_t(this)}),(0,N.c)(this,Ba,{writable:!0,value:St(this)}),(0,N.c)(this,Ka,{writable:!0,value:Wt(this)}),(0,N.c)(this,ja,{writable:!0,value:Ut(this)}),(0,N.c)(this,za,{writable:!0,value:Kt(this)}),(0,N.c)(this,Ga,{writable:!0,value:zt(this)}),(0,N.c)(this,Va,{writable:!0,value:Vt(this)}),(0,N.c)(this,Ya,{writable:!0,value:Ht(this)}),(0,N.c)(this,Ha,{writable:!0,value:qt(this)}),(0,N.c)(this,Xa,{writable:!0,value:$t(this)}),(0,N.c)(this,qa,{writable:!0,value:Zt(this)}),(0,N.c)(this,$a,{writable:!0,value:e=>{(0,y.c)(this,Ja).emit(e)}}),(0,N.c)(this,Qa,{writable:!0,value:na(this)}),(0,N.c)(this,en,{writable:!0,value:e=>()=>{(0,y.c)(this,Za).emit(e.data)}}),(0,N.c)(this,tn,{writable:!0,value:la(this)}),(0,N.c)(this,nn,{writable:!0,value:e=>{(0,y.c)(this,an).emit(e)}}),(0,N.c)(this,on,{writable:!0,value:da(this)}),(0,N.c)(this,ln,{writable:!0,value:e=>t=>{t.preventDefault(),(0,y.c)(this,cn).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})}}),(0,N.c)(this,rn,{writable:!0,value:va(this)}),(0,N.c)(this,hn,{writable:!0,value:(e,t)=>{(0,y.c)(this,sn).emit({nodeId:e,collapsed:t})}})}get nodes(){return(0,y.c)(this,Ca)}set nodes(e){(0,L.c)(this,Ca,e)}get actions(){return(0,y.c)(this,Aa)}set actions(e){(0,L.c)(this,Aa,e)}get actionsHidden(){return(0,y.c)(this,_a)}set actionsHidden(e){(0,L.c)(this,_a,e)}get placeholder(){return(0,y.c)(this,Da)}set placeholder(e){(0,L.c)(this,Da,e)}get isTransformName(){return(0,y.c)(this,Sa)}set isTransformName(e){(0,L.c)(this,Sa,e)}get searchPlaceholder(){return(0,y.c)(this,Pa)}set searchPlaceholder(e){(0,L.c)(this,Pa,e)}get noSearch(){return(0,y.c)(this,Wa)}set noSearch(e){(0,L.c)(this,Wa,e)}get activeKey(){return(0,y.c)(this,Fa)}set activeKey(e){(0,L.c)(this,Fa,e)}get showMatchedNodeOnly(){return(0,y.c)(this,Ua)}set showMatchedNodeOnly(e){(0,L.c)(this,Ua,e)}get matchNodeDataFields(){return(0,y.c)(this,Ba)}set matchNodeDataFields(e){(0,L.c)(this,Ba,e)}get fixedActionsFor(){return(0,y.c)(this,Ka)}set fixedActionsFor(e){(0,L.c)(this,Ka,e)}get collapsible(){return(0,y.c)(this,ja)}set collapsible(e){(0,L.c)(this,ja,e)}get collapsedNodes(){return(0,y.c)(this,za)}set collapsedNodes(e){(0,L.c)(this,za,e)}get allowDrag(){return(0,y.c)(this,Ga)}set allowDrag(e){(0,L.c)(this,Ga,e)}get allowDragToRoot(){return(0,y.c)(this,Va)}set allowDragToRoot(e){(0,L.c)(this,Va,e)}get allowDragToInside(){return(0,y.c)(this,Ya)}set allowDragToInside(e){(0,L.c)(this,Ya,e)}get nodeKey(){return(0,y.c)(this,Ha)}set nodeKey(e){(0,L.c)(this,Ha,e)}get skipNotify(){return(0,y.c)(this,Xa)}set skipNotify(e){(0,L.c)(this,Xa,e)}render(){return I().createElement(wa.O.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,y.c)(this,$a)}},I().createElement(Na.u.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:Oa,onNodeToggle:(0,y.c)(this,hn),skipNotify:this.skipNotify,clickFactory:(0,y.c)(this,en),contextMenuFactory:(0,y.c)(this,ln),matchNode:(e,t)=>{var a;return(0,xa.i)(e.name,t)||!(null===(a=this.matchNodeDataFields)||void 0===a||!a.length)&&(0,xa.i)("*"===this.matchNodeDataFields?e.data:(0,fa.pick)(e.data,this.matchNodeDataFields),t)}}},I().createElement(ka.s$,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,y.c)(this,nn),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}function un(e){ta(this,e)}function pn(){return ea(this)}function bn(e){oa(this,e)}function vn(){return ia(this)}function mn(e){sa(this,e)}function gn(){return ra(this)}function En(e){pa(this,e)}function fn(){return ua(this)}function wn(e){ga(this,e)}function kn(){return ma(this)}Ea=dn,({e:[gt,ft,kt,xt,yt,Mt,Rt,Ct,_t,St,Wt,Ut,Kt,zt,Vt,Ht,qt,$t,Zt,ea,ta,na,ia,oa,la,ra,sa,da,ua,pa,va,ma,ga,pt],c:[Ma,bt]}=(0,O.c)(Ea,[[mt,1,"nodes"],[Et,1,"actions"],[wt,1,"actionsHidden"],[Nt,1,"placeholder"],[Lt,1,"isTransformName"],[Ot,1,"searchPlaceholder"],[It,1,"noSearch"],[Tt,1,"activeKey"],[At,1,"showMatchedNodeOnly"],[Dt,1,"matchNodeDataFields"],[Pt,1,"fixedActionsFor"],[Ft,1,"collapsible"],[Bt,1,"collapsedNodes"],[jt,1,"allowDrag"],[Gt,1,"allowDragToRoot"],[Yt,1,"allowDragToInside"],[Xt,1,"nodeKey"],[Jt,1,"skipNotify"],[Qt,1,"actionClickEvent",e=>(0,y.c)(e,qa),(e,t)=>(0,L.c)(e,qa,t)],[aa,1,"nodeClickEvent",e=>(0,y.c)(e,Qa),(e,t)=>(0,L.c)(e,Qa,t)],[ca,1,"nodeDropEvent",e=>(0,y.c)(e,tn),(e,t)=>(0,L.c)(e,tn,t)],[ha,1,"nodeContextMenuEvent",e=>(0,y.c)(e,on),(e,t)=>(0,L.c)(e,on,t)],[ba,1,"nodeToggleEvent",e=>(0,y.c)(e,rn),(e,t)=>(0,L.c)(e,rn,t)]],vt,0,(e=>hn.has((0,x.c)(e))),T.ReactNextElement)),bt();var Nn=a(4516),xn=a(4724);a(8172),customElements.define("visual-builder.inject-preview-agent",(0,Nn.createProviderClass)((function(e,t){return(0,xn.c)(e,t)})));var Ln,yn,On,Mn,In,Rn,Tn,Cn,An,_n,Dn,Sn,Pn,Wn,Fn,Un,Bn,Kn,jn,zn,Gn=a(4412),Vn=a(6008),Yn=a.n(Vn),Hn=a(5544),Xn=a(4432),qn=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}({}),Jn="bricks/visual-builder/workbench-history-action",$n=a(8944),Qn=a(5832),Zn=function(){var e=(0,$n.c)((function*(e,t,a){return(yield Qn.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,Gn.c)((0,Gn.c)({},a),{},{params:t}))).data}));return function(t,a,n){return e.apply(this,arguments)}}(),ei=a(2204),ti={add:"".concat(Jn,":").concat(qn.ADD),edit:"".concat(Jn,":").concat(qn.EDIT),delete:"".concat(Jn,":").concat(qn.DELETE),batch_delete:"".concat(Jn,":").concat(qn.DELETE),import:"".concat(Jn,":").concat(qn.IMPORT),clone:"".concat(Jn,":").concat(qn.CLONE),append_relation:"".concat(Jn,":").concat(qn.APPEND_RELATION),update_relation:"".concat(Jn,":").concat(qn.UPDATE_RELATION),remove_relation:"".concat(Jn,":").concat(qn.REMOVE_RELATION),rollback:"".concat(Jn,":").concat(qn.ROLLBACK),rollback_all:"".concat(Jn,":").concat(qn.ROLLBACK_ALL)},ai={add:"".concat(Jn,":").concat(qn.ADD_FULL),edit:"".concat(Jn,":").concat(qn.EDIT_FULL),delete:"".concat(Jn,":").concat(qn.DELETE_FULL),batch_delete:"".concat(Jn,":").concat(qn.DELETE_FULL),import:"".concat(Jn,":").concat(qn.IMPORT_FULL),clone:"".concat(Jn,":").concat(qn.CLONE_FULL),append_relation:"".concat(Jn,":").concat(qn.APPEND_RELATION_FULL),update_relation:"".concat(Jn,":").concat(qn.UPDATE_RELATION_FULL),remove_relation:"".concat(Jn,":").concat(qn.REMOVE_RELATION_FULL),rollback:"".concat(Jn,":").concat(qn.ROLLBACK_FULL),rollback_all:"".concat(Jn,":").concat(qn.ROLLBACK_ALL_FULL)},ni={project:"".concat(Jn,":").concat(qn.PROJECT),userGroup:"".concat(Jn,":").concat(qn.USER),permission:"".concat(Jn,":").concat(qn.PERMISSION),brick:"".concat(Jn,":").concat(qn.BRICK),route:"".concat(Jn,":").concat(qn.ROUTE),template:"".concat(Jn,":").concat(qn.TEMPLATE),snippet:"".concat(Jn,":").concat(qn.SNIPPET),i18n:"".concat(Jn,":").concat(qn.I18N),image:"".concat(Jn,":").concat(qn.IMAGE),function:"".concat(Jn,":").concat(qn.FUNCTION),menu:"".concat(Jn,":").concat(qn.MENU),menuItem:"".concat(Jn,":").concat(qn.MENU_ITEM),workflow:"".concat(Jn,":").concat(qn.WORKFLOW)},ii={PROJECT_MICRO_APP:"".concat(Jn,":").concat(qn.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(Jn,":").concat(qn.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(Jn,":").concat(qn.PERMISSION),STORYBOARD_BRICK:"".concat(Jn,":").concat(qn.BRICK),STORYBOARD_ROUTE:"".concat(Jn,":").concat(qn.ROUTE),STORYBOARD_TEMPLATE:"".concat(Jn,":").concat(qn.TEMPLATE),STORYBOARD_SNIPPET:"".concat(Jn,":").concat(qn.SNIPPET),STORYBOARD_I18N:"".concat(Jn,":").concat(qn.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(Jn,":").concat(qn.IMAGE),STORYBOARD_FUNCTION:"".concat(Jn,":").concat(qn.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(Jn,":").concat(qn.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(Jn,":").concat(qn.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(Jn,":").concat(qn.WORKFLOW)};function oi(e){var t,a,n,i,o,c,l,r,s,h,d,u,p,b,v,m,g,E="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",f=ei.i18n.t(null!==(t=ni[e.category])&&void 0!==t?t:e.category),w=ei.i18n.t(null!==(a=ti[E])&&void 0!==a?a:E),k=ei.i18n.t(null!==(n=ii[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=ei.i18n.t(null!==(c=ii[null===(l=e.abstract)||void 0===l?void 0:l.rightObjectId])&&void 0!==c?c:null===(r=e.abstract)||void 0===r?void 0:r.rightObjectId),x=ci(null===(s=e.abstract)||void 0===s?void 0:s.nodes,null===(h=e.abstract)||void 0===h?void 0:h.nodesCount),L=ci(null===(d=e.abstract)||void 0===d?void 0:d.leftNodes,null===(u=e.abstract)||void 0===u?void 0:u.leftNodesCount),y=ci(null===(p=e.abstract)||void 0===p?void 0:p.rightNodes,null===(b=e.abstract)||void 0===b?void 0:b.rightNodesCount),O="rollback"===E?oi(e.rollBackIdInfo).abstract:null;return{category:f,action:w,leftObjectId:k,rightObjectId:N,nodes:x,leftNodes:L,rightNodes:y,abstract:ei.i18n.t(null!==(v=ai[E])&&void 0!==v?v:E,{category:f,nodes:x,leftNodes:L,rightNodes:y,nodeChanges:null===(m=e.abstract)||void 0===m||null===(m=m.nodeChanges)||void 0===m?void 0:m.join(", "),relationChanges:null===(g=e.abstract)||void 0===g||null===(g=g.relationChanges)||void 0===g?void 0:g.join(", "),leftObjectId:k,rightObjectId:N,rollbackAbstract:O}),rollbackAbstract:O}}function ci(){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 ei.i18n.t("".concat(Jn,":").concat(qn.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,Xn.initializeReactI18n)(Jn,{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 li,{defineElement:ri,property:si,event:hi}=(0,R.createDecorators)(),di=(0,T.wrapBrick)("eo-button"),ui=(0,T.wrapBrick)("eo-link"),pi=(0,T.wrapBrick)("eo-icon"),bi=(0,T.wrapBrick)("eo-easyops-avatar"),vi=(0,T.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});On=[ri("visual-builder.workbench-history-action",{styleTexts:[Hn.c]})],Mn=si(),Rn=si(),Cn=hi({type:"history.item.click"}),Sn=hi({type:"rollback"}),Un=hi({type:"rollback.all"});var mi=new WeakMap,gi=new WeakMap,Ei=new WeakMap,fi=new WeakMap,wi=new WeakMap,ki=new WeakMap,Ni=new WeakMap,xi=new WeakMap,Li=new WeakMap,yi=new WeakMap,Oi=new WeakMap;class Mi extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,yi,{get:_i,set:Ai}),(0,N.c)(this,Ni,{get:Ci,set:Ti}),(0,N.c)(this,fi,{get:Ri,set:Ii}),(0,N.c)(this,mi,{writable:!0,value:(Ln(this),In(this))}),(0,N.c)(this,gi,{writable:!0,value:Tn(this)}),(0,N.c)(this,Ei,{writable:!0,value:An(this)}),(0,N.c)(this,wi,{writable:!0,value:e=>{(0,y.c)(this,fi).emit(e)}}),(0,N.c)(this,ki,{writable:!0,value:Pn(this)}),(0,N.c)(this,xi,{writable:!0,value:e=>{(0,y.c)(this,Ni).emit(e)}}),(0,N.c)(this,Li,{writable:!0,value:Bn(this)}),(0,N.c)(this,Oi,{writable:!0,value:()=>{(0,y.c)(this,yi).emit()}})}get appId(){return(0,y.c)(this,mi)}set appId(e){(0,L.c)(this,mi,e)}get projectId(){return(0,y.c)(this,gi)}set projectId(e){(0,L.c)(this,gi,e)}render(){return I().createElement(Di,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,y.c)(this,wi),onRollback:(0,y.c)(this,xi),onRollbackAll:(0,y.c)(this,Oi)})}}function Ii(e){Dn(this,e)}function Ri(){return _n(this)}function Ti(e){Fn(this,e)}function Ci(){return Wn(this)}function Ai(e){jn(this,e)}function _i(){return Kn(this)}function Di(e){var{appId:t,onHistoryItemClick:a,onRollback:n,onRollbackAll:i}=e,{t:o}=(0,Xn.useTranslation)(Jn),[c,l]=(0,M.useState)(!1),[r,s]=(0,M.useState)(!0),[h,d]=(0,M.useState)(!1),[u,p]=(0,M.useState)([]),b=(0,M.useRef)(""),v=e=>{l(!0),Zn(t,{ts:b.current,limit:20}).then((t=>{p((a=>{var n=t.list.map((e=>(0,Gn.c)((0,Gn.c)({},e),{},{translation:oi(e)})));return e?n:a.concat(n)})),b.current=t.ts,d(t.list.length<20),s(t.list.length<20)})).catch((e=>{(0,Ge.handleHttpError)(e)})).finally((()=>{l(!1)}))};return I().createElement(vi,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(s(!0),d(!1),p([]),b.current="",v(!0))}},I().createElement(di,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),I().createElement("div",null,I().createElement("div",{className:"history-title"},"History"),I().createElement("div",{className:"history-list"},u.length?I().createElement(I().Fragment,null,u.map(((e,t)=>I().createElement(Si,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:a,onRollback:n}))),!r&&I().createElement("span",{className:"load-more-container"},I().createElement(ui,{className:"load-more",disabled:c,onClick:()=>v()},o(qn.LOAD_MORE))),h&&I().createElement("span",{className:"end-container"},"The End",I().createElement(pi,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):I().createElement("div",{className:"empty"},o(c?qn.LOADING:qn.NO_DATA))),I().createElement("slot",null)))}function Si(e){var{data:t,enableRollback:a,current:n,onHistoryItemClick:i,onRollback:o}=e,c=Yn()(Number(t.ts)/1e6),l=Yn().duration(c.diff(Yn()())),r=l.days()<=-1?c.format("YYYY-MM-DD HH:mm:ss"):l.humanize(!0,{ss:0,s:60,m:60,h:24});return I().createElement("div",{className:"item-container"},I().createElement("div",{className:"item-title"},I().createElement("div",{className:"title-left",onClick:()=>i((0,Gn.c)((0,Gn.c)({},t),{},{enableRollback:a}))},I().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),n&&I().createElement("div",{className:"branch"},"(current)")),I().createElement("div",{className:"title-right"},a&&I().createElement(pi,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),I().createElement("div",{className:"item-info"},I().createElement(bi,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),I().createElement("div",{className:"time"},r),I().createElement("div",{className:"operator"},t.user)))}zn=Mi,({e:[In,Tn,An,_n,Dn,Pn,Wn,Fn,Bn,Kn,jn,Ln],c:[li,yn]}=(0,O.c)(zn,[[Mn,1,"appId"],[Rn,1,"projectId"],[Cn,1,"historyItemClickEvent",e=>(0,y.c)(e,Ei),(e,t)=>(0,L.c)(e,Ei,t)],[Sn,1,"rollbackEvent",e=>(0,y.c)(e,ki),(e,t)=>(0,L.c)(e,ki,t)],[Un,1,"rollbackAllEvent",e=>(0,y.c)(e,Li),(e,t)=>(0,L.c)(e,Li,t)]],On,0,(e=>Oi.has((0,x.c)(e))),T.ReactNextElement)),yn();var Pi,Wi,Fi,Ui,Bi,Ki,ji,zi,Gi,Vi,Yi,Hi,Xi,qi,Ji,$i,Qi,Zi,eo,to,ao,no,io,oo,co,lo,ro,so,ho,uo,po,bo,vo,mo,go,Eo,fo,wo,ko,No,xo,Lo,yo,Oo,Mo,Io,Ro,To,Co,Ao,_o,Do,So,Po,Wo,Fo,Uo,Bo=a(8904),{defineElement:Ko,property:jo,event:zo}=(0,R.createDecorators)(),Go=(0,T.wrapBrick)("eo-icon"),Vo=(0,T.wrapBrick)("eo-tooltip"),Yo=new Set;Fi=[Ko("visual-builder.page-arch-node",{styleTexts:[Bo.c]})],Ui=jo(),Ki=jo(),zi=jo({attribute:!1}),Vi=jo({attribute:!1}),Hi=jo({type:Boolean,render:!1}),qi=jo({type:Boolean,render:!1}),$i=jo({type:Boolean,render:!1}),Zi=jo(),to=zo({type:"label.editing.change"}),oo=zo({type:"label.change"}),so=zo({type:"node.click"}),bo=zo({type:"node.dblclick"}),Eo=zo({type:"node.contextmenu"}),No=zo({type:"child.append"}),Oo=zo({type:"external.click"}),To=zo({type:"subNode.dblclick"}),Do=zo({type:"subNode.contextmenu"});var Ho=new WeakMap,Xo=new WeakMap,qo=new WeakMap,Jo=new WeakMap,$o=new WeakMap,Qo=new WeakMap,Zo=new WeakMap,ec=new WeakMap,tc=new WeakMap,ac=new WeakMap,nc=new WeakMap,ic=new WeakMap,oc=new WeakMap,cc=new WeakMap,lc=new WeakMap,rc=new WeakMap,sc=new WeakMap,hc=new WeakMap,dc=new WeakMap,uc=new WeakMap,pc=new WeakMap,bc=new WeakMap,vc=new WeakMap,mc=new WeakMap,gc=new WeakMap,Ec=new WeakMap,fc=new WeakMap,wc=new WeakMap,kc=new WeakMap,Nc=new WeakMap,xc=new WeakMap,Lc=new WeakMap,yc=new WeakMap,Oc=new WeakMap,Mc=new WeakMap;class Ic extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,Oc,{get:Yc,set:Vc}),(0,N.c)(this,xc,{get:Gc,set:zc}),(0,N.c)(this,wc,{get:jc,set:Kc}),(0,N.c)(this,gc,{get:Bc,set:Uc}),(0,N.c)(this,bc,{get:Fc,set:Wc}),(0,N.c)(this,dc,{get:Pc,set:Sc}),(0,N.c)(this,rc,{get:Dc,set:_c}),(0,N.c)(this,oc,{get:Ac,set:Cc}),(0,N.c)(this,ac,{get:Tc,set:Rc}),(0,N.c)(this,Ho,{writable:!0,value:(Pi(this),Bi(this))}),(0,N.c)(this,Xo,{writable:!0,value:ji(this)}),(0,N.c)(this,qo,{writable:!0,value:Gi(this)}),(0,N.c)(this,Jo,{writable:!0,value:Yi(this)}),(0,N.c)(this,$o,{writable:!0,value:Xi(this)}),(0,N.c)(this,Qo,{writable:!0,value:Ji(this)}),(0,N.c)(this,Zo,{writable:!0,value:Qi(this)}),(0,N.c)(this,ec,{writable:!0,value:eo(this)}),(0,N.c)(this,tc,{writable:!0,value:ao(this)}),(0,N.c)(this,nc,{writable:!0,value:e=>{(0,y.c)(this,ac).emit(e)}}),(0,N.c)(this,ic,{writable:!0,value:co(this)}),(0,N.c)(this,cc,{writable:!0,value:e=>{(0,y.c)(this,oc).emit(e)}}),(0,N.c)(this,lc,{writable:!0,value:ho(this)}),(0,N.c)(this,sc,{writable:!0,value:()=>{(0,y.c)(this,rc).emit()}}),(0,N.c)(this,hc,{writable:!0,value:vo(this)}),(0,N.c)(this,uc,{writable:!0,value:()=>{(0,y.c)(this,dc).emit()}}),(0,N.c)(this,pc,{writable:!0,value:fo(this)}),(0,N.c)(this,vc,{writable:!0,value:e=>{(0,y.c)(this,bc).emit(e)}}),(0,N.c)(this,mc,{writable:!0,value:xo(this)}),(0,N.c)(this,Ec,{writable:!0,value:()=>{(0,y.c)(this,gc).emit()}}),(0,N.c)(this,fc,{writable:!0,value:Mo(this)}),(0,N.c)(this,kc,{writable:!0,value:e=>{(0,y.c)(this,wc).emit(e)}}),(0,N.c)(this,Nc,{writable:!0,value:Co(this)}),(0,N.c)(this,Lc,{writable:!0,value:e=>{(0,y.c)(this,xc).emit(e)}}),(0,N.c)(this,yc,{writable:!0,value:So(this)}),(0,N.c)(this,Mc,{writable:!0,value:e=>{(0,y.c)(this,Oc).emit(e)}})}get label(){return(0,y.c)(this,Ho)}set label(e){(0,L.c)(this,Ho,e)}get type(){return(0,y.c)(this,Xo)}set type(e){(0,L.c)(this,Xo,e)}get external(){return(0,y.c)(this,qo)}set external(e){(0,L.c)(this,qo,e)}get subNodes(){return(0,y.c)(this,Jo)}set subNodes(e){(0,L.c)(this,Jo,e)}get active(){return(0,y.c)(this,$o)}set active(e){(0,L.c)(this,$o,e)}get notSynced(){return(0,y.c)(this,Qo)}set notSynced(e){(0,L.c)(this,Qo,e)}get disableChildAppend(){return(0,y.c)(this,Zo)}set disableChildAppend(e){(0,L.c)(this,Zo,e)}get autoFocusOnce(){return(0,y.c)(this,ec)}set autoFocusOnce(e){(0,L.c)(this,ec,e)}render(){return I().createElement(Hc,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,y.c)(this,nc),onLabelChange:(0,y.c)(this,cc),onNodeClick:(0,y.c)(this,sc),onNodeDoubleClick:(0,y.c)(this,uc),onNodeContextMenu:(0,y.c)(this,vc),onChildAppend:(0,y.c)(this,Ec),onExternalClick:(0,y.c)(this,kc),onSubNodeDoubleClick:(0,y.c)(this,Lc),onSubNodeContextMenu:(0,y.c)(this,Mc)})}}function Rc(e){io(this,e)}function Tc(){return no(this)}function Cc(e){ro(this,e)}function Ac(){return lo(this)}function _c(e){po(this,e)}function Dc(){return uo(this)}function Sc(e){go(this,e)}function Pc(){return mo(this)}function Wc(e){ko(this,e)}function Fc(){return wo(this)}function Uc(e){yo(this,e)}function Bc(){return Lo(this)}function Kc(e){Ro(this,e)}function jc(){return Io(this)}function zc(e){_o(this,e)}function Gc(){return Ao(this)}function Vc(e){Wo(this,e)}function Yc(){return Po(this)}function Hc(e){var t,{label:a,type:n,external:i,subNodes:o,autoFocusOnce:c,onLabelEditingChange:l,onLabelChange:r,onNodeClick:s,onNodeDoubleClick:h,onNodeContextMenu:d,onChildAppend:u,onExternalClick:p,onSubNodeDoubleClick:b,onSubNodeContextMenu:v}=e,m="board"===n?"board":"page",[g,E]=(0,M.useState)(a),[f,w]=(0,M.useState)(!1),k=(0,M.useRef)(!1),[N,x]=(0,M.useState)(!1),L=(0,M.useRef)(null);(0,M.useEffect)((()=>{E(a)}),[a]);var y=(0,M.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),w(!0)}),[]);(0,M.useEffect)((()=>{c&&!Yo.has(c)&&(Yo.add(c),setTimeout((()=>{w(!0)}),1))}),[c]),(0,M.useEffect)((()=>{var e,t;f&&(null===(e=L.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=L.current)||void 0===t||t.select())}),[f]),(0,M.useEffect)((()=>{k.current?null==l||l(f):k.current=!0}),[f,l]);var O=(0,M.useCallback)((e=>{E(e.target.value)}),[]),R=(0,M.useCallback)((e=>{var t,a=e.key||e.keyCode||e.which;"Enter"!==a&&13!==a||null===(t=L.current)||void 0===t||t.blur()}),[]),T=(0,M.useCallback)((()=>{w(!1),x(!0)}),[]);(0,M.useEffect)((()=>{N&&(null==r||r(g),x(!1))}),[g,r,N]);var C=(0,M.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),A=(0,M.useCallback)((e=>{e.stopPropagation(),null==p||p(i)}),[i,p]),_=(0,M.useCallback)((e=>{e.stopPropagation()}),[]),S=38*Math.max(0,Math.floor((null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)-3));return I().createElement(I().Fragment,null,I().createElement("div",{className:D()("node",m,{"editing-label":f}),style:{height:"board"===m?70:130+S},onClick:s,onDoubleClick:h,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},I().createElement("input",{className:"label-input",value:g,ref:L,onChange:O,onKeyDown:R,onBlur:T,onDoubleClick:_,onContextMenu:_,onMouseDown:_}),I().createElement("div",{className:"label",onDoubleClick:y,onMouseDown:_},g),"board"===m?I().createElement("div",{className:"icon-container"},I().createElement(Go,{lib:"antd",icon:"unordered-list"})):I().createElement("div",{className:"thumbnail-container",style:{height:98+S}},I().createElement("div",{className:"thumbnail-placeholder"},I().createElement(Go,{lib:"antd",icon:"ellipsis"})),i&&I().createElement("div",{className:"external",onClick:A,onDoubleClick:_,onMouseDown:_},I().createElement(Go,{lib:"antd",icon:"desktop"}),I().createElement("span",{className:"external-label"},i.label)),null!=o&&o.length?I().createElement("div",{className:"sub-nodes"},o.map((e=>I().createElement(Xc,{key:e.id,subNode:e,onSubNodeDoubleClick:b,onSubNodeContextMenu:v})))):null)),I().createElement("div",{className:"add-button",role:"button",onClick:C,onMouseDown:_},I().createElement(Go,{lib:"fa",icon:"plus"})))}function Xc(e){var{subNode:t,onSubNodeDoubleClick:a,onSubNodeContextMenu:n}=e;return I().createElement(Vo,{key:t.id,content:t.label},I().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})}},I().createElement("div",{className:"sub-node-skeleton-title"}),I().createElement("div",{className:"sub-node-skeleton-content"}),I().createElement("div",{className:"sub-node-skeleton-button"})))}Fo=Ic,({e:[Bi,ji,Gi,Yi,Xi,Ji,Qi,eo,ao,no,io,co,lo,ro,ho,uo,po,vo,mo,go,fo,wo,ko,xo,Lo,yo,Mo,Io,Ro,Co,Ao,_o,So,Po,Wo,Pi],c:[Uo,Wi]}=(0,O.c)(Fo,[[Ui,1,"label"],[Ki,1,"type"],[zi,1,"external"],[Vi,1,"subNodes"],[Hi,1,"active"],[qi,1,"notSynced"],[$i,1,"disableChildAppend"],[Zi,1,"autoFocusOnce"],[to,1,"labelEditingChange",e=>(0,y.c)(e,tc),(e,t)=>(0,L.c)(e,tc,t)],[oo,1,"labelChange",e=>(0,y.c)(e,ic),(e,t)=>(0,L.c)(e,ic,t)],[so,1,"nodeClick",e=>(0,y.c)(e,lc),(e,t)=>(0,L.c)(e,lc,t)],[bo,1,"nodeDoubleClick",e=>(0,y.c)(e,hc),(e,t)=>(0,L.c)(e,hc,t)],[Eo,1,"nodeContextMenu",e=>(0,y.c)(e,pc),(e,t)=>(0,L.c)(e,pc,t)],[No,1,"childAppend",e=>(0,y.c)(e,mc),(e,t)=>(0,L.c)(e,mc,t)],[Oo,1,"externalClick",e=>(0,y.c)(e,fc),(e,t)=>(0,L.c)(e,fc,t)],[To,1,"subNodeDoubleClick",e=>(0,y.c)(e,Nc),(e,t)=>(0,L.c)(e,Nc,t)],[Do,1,"subNodeContextMenu",e=>(0,y.c)(e,yc),(e,t)=>(0,L.c)(e,yc,t)]],Fi,0,(e=>Mc.has((0,x.c)(e))),T.ReactNextElement)),Wi();var qc,Jc,$c,Qc,Zc,el,tl,al,nl,il,ol,cl,ll=a(7840),rl=a(5048),{method:sl,property:hl}=(0,R.createDecorators)();Jc=hl({attribute:!1}),Qc=hl({attribute:!1}),el=hl({attribute:!1}),al=hl({attribute:!1}),il=sl(),ol=sl();var dl=new WeakMap,ul=new WeakMap,pl=new WeakMap,bl=new WeakMap,vl=new WeakMap,ml=new WeakMap,gl=new WeakMap,El=new WeakMap,fl=new WeakMap,wl=new WeakMap;class kl extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,ml,{get:Ol,set:Ml}),(0,N.c)(this,bl,{get:Ll,set:yl}),(0,N.c)(this,ul,{get:Nl,set:xl}),(0,N.c)(this,dl,{writable:!0,value:(qc(this),!1)}),(0,N.c)(this,pl,{writable:!0,value:"normal"}),(0,N.c)(this,vl,{writable:!0,value:!1}),(0,N.c)(this,gl,{writable:!0,value:$c(this)}),(0,N.c)(this,El,{writable:!0,value:Zc(this)}),(0,N.c)(this,fl,{writable:!0,value:tl(this)}),(0,N.c)(this,wl,{writable:!0,value:nl(this)})}get isFormItemElement(){return!0}set validateState(e){(0,L.c)(this,bl,e),this._render()}get validateState(){return(0,y.c)(this,bl)}set notRender(e){this.hidden=e,(0,L.c)(this,ul,e),this._render()}get notRender(){return(0,y.c)(this,ul)}get $bindFormItem(){return(0,y.c)(this,ml)}set $bindFormItem(e){(0,L.c)(this,ml,e),this._render()}get helpBrick(){return(0,y.c)(this,gl)}set helpBrick(e){(0,L.c)(this,gl,e)}get labelBrick(){return(0,y.c)(this,El)}set labelBrick(e){(0,L.c)(this,El,e)}get labelCol(){return(0,y.c)(this,fl)}set labelCol(e){(0,L.c)(this,fl,e)}get wrapperCol(){return(0,y.c)(this,wl)}set wrapperCol(e){(0,L.c)(this,wl,e)}setNotRender(e){this.notRender=e}getFormElement(){for(var e=this;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function Nl(){return(0,y.c)(this,dl)}function xl(e){(0,L.c)(this,dl,e)}function Ll(){return(0,y.c)(this,pl)}function yl(e){(0,L.c)(this,pl,e)}function Ol(){return(0,y.c)(this,vl)}function Ml(e){(0,L.c)(this,vl,e)}cl=kl,[$c,Zc,tl,nl,qc]=(0,O.c)(cl,[[Jc,1,"helpBrick"],[Qc,1,"labelBrick"],[el,1,"labelCol"],[al,1,"wrapperCol"],[il,2,"setNotRender"],[ol,2,"getFormElement"]],[],0,void 0,T.ReactNextElement).e;var Il=function(){var e=(0,$n.c)((function*(e,t){return(yield Qn.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)}}(),Rl=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}({}),Tl="bricks/visual-builder/contract-select",Cl={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,Xn.initializeReactI18n)(Tl,Cl);var Al,_l,Dl,Sl,Pl,Wl,Fl,Ul,Bl,Kl,jl,zl,Gl,Vl,Yl,Hl,Xl,ql,Jl=(0,T.wrapBrick)("eo-icon"),$l=(0,T.wrapBrick)("eo-input",{onChange:"change"});function Ql(e){var{itemsCount:t=20,onBlur:a}=e,[n,i]=(0,M.useState)(t),{t:o}=(0,Xn.useTranslation)(Tl),[c,l]=(0,M.useState)(!1);return I().createElement("div",{className:"options-tips",slot:e.slot},o(Rl.CONTRACT_OPTIONS_TIPS_PREFIX)," ",c?I().createElement($l,{autoFocus:!0,inputStyle:{width:65},value:String(n),onBlur:()=>{l(!1),null==a||a(n)},onChange:e=>{i(Number(e.detail))}}):I().createElement("span",null,n," ",I().createElement(Jl,{icon:"edit",lib:"antd",onClick:()=>{l(!0)}}))," ",o(Rl.CONTRACT_OPTIONS_TIPS_SUFFIX))}(0,Xn.initializeReactI18n)(Tl,Cl);var Zl,{defineElement:er,property:tr,event:ar}=(0,R.createDecorators)(),nr=(0,T.wrapBrick)("eo-form-item"),ir=(0,T.wrapBrick)("eo-auto-complete",{onChange:"change"});Dl=[er("visual-builder.contract-select",{styleTexts:[rl.c]})],Sl=tr(),Wl=tr({type:Boolean}),Ul=tr(),Kl=tr({attribute:!1}),zl=tr({attribute:!1}),Vl=ar({type:"change"});var or=new WeakMap,cr=new WeakMap,lr=new WeakMap,rr=new WeakMap,sr=new WeakMap,hr=new WeakMap,dr=new WeakMap;function ur(e){Xl(this,e)}function pr(){return Hl(this)}function br(e){if("string"!=typeof e)return{name:"",version:""};var[t,a]=e.split(":");return{name:t,version:a}}function vr(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function mr(e){return(0,fa.isNil)(e)||vr(e)?"":ei.i18n.t("".concat(Tl,":").concat(Rl.CONTRACT_VALIDATE_MESSAGE))}function gr(e){var{value:t,inputStyle:a,validateState:n,suffix:i,onChange:o}=e,[c,l]=(0,M.useState)(),[r,s]=(0,M.useState)(20),h=function(e){var{pageSize:t=20,q:a=""}=e,[n,i]=(0,M.useState)([]),[o,c]=(0,M.useState)(a),[l,r]=(0,M.useState)(t);return(0,M.useEffect)((()=>{c(a)}),[a]),(0,M.useEffect)((()=>{r(t)}),[t]),(0,M.useEffect)((()=>{(0,$n.c)((function*(){try{var{list:e}=yield Il({page:1,pageSize:l,fullContractName:o},{interceptorParams:{ignoreLoadingBar:!0}});i(e)}catch(e){console.error(e),i([])}}))()}),[o,l]),n}({q:c,pageSize:r}),[d,u]=(0,M.useState)(br(t)),[p,b]=(0,M.useState)([]);(0,M.useEffect)((()=>{u(br(t))}),[t]);var v=(0,M.useMemo)((()=>(0,fa.debounce)((e=>{l(e)}),200)),[]);return I().createElement("div",{className:"contract-wrapper"},I().createElement(ir,{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(vr(t))u(br(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,c=null!==(n=null==i?void 0:i[0])&&void 0!==n?n:"";b(i),u({name:t,version:c}),null==o||o("".concat(t,":").concat(c))}v(t)}},I().createElement(Ql,{onBlur:e=>s(e),slot:"options-toolbar"})),I().createElement(ir,{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?I().createElement(ll.ReactUseMultipleBricks,i):null)}ql=class extends kl{constructor(){super(...arguments),(0,N.c)(this,dr,{get:pr,set:ur}),(0,N.c)(this,or,{writable:!0,value:(Al(this),Pl(this))}),(0,N.c)(this,cr,{writable:!0,value:Fl(this)}),(0,N.c)(this,lr,{writable:!0,value:Bl(this)}),(0,N.c)(this,rr,{writable:!0,value:jl(this)}),(0,N.c)(this,sr,{writable:!0,value:Gl(this)}),(0,N.c)(this,hr,{writable:!0,value:Yl(this)}),(0,le.c)(this,"handleChange",(e=>{(0,y.c)(this,dr).emit(e)}))}get name(){return(0,y.c)(this,or)}set name(e){(0,L.c)(this,or,e)}get required(){return(0,y.c)(this,cr)}set required(e){(0,L.c)(this,cr,e)}get label(){return(0,y.c)(this,lr)}set label(e){(0,L.c)(this,lr,e)}get value(){return(0,y.c)(this,rr)}set value(e){(0,L.c)(this,rr,e)}get suffix(){return(0,y.c)(this,sr)}set suffix(e){(0,L.c)(this,sr,e)}render(){return I().createElement(nr,{curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,labelBrick:this.labelBrick,helpBrick:this.helpBrick,trigger:"handleChange",validator:mr},I().createElement(gr,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[Pl,Fl,Bl,jl,Gl,Yl,Hl,Xl,Al],c:[Zl,_l]}=(0,O.c)(ql,[[Sl,1,"name"],[Wl,1,"required"],[Ul,1,"label"],[Kl,1,"value"],[zl,1,"suffix"],[Vl,1,"changeEvent",e=>(0,y.c)(e,hr),(e,t)=>(0,L.c)(e,hr,t)]],Dl,0,(e=>dr.has((0,x.c)(e))),kl)),_l()},5048:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},8904:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},8808:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},3504:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},3124:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},5544:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},9124:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},3804:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()}}]);
3
- //# sourceMappingURL=4816.131f65eb.js.map
1
+ /*! For license information please see 4816.4333ef99.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[4816],{4816:(e,t,a)=>{a.r(t);var n,i,o,c,l,r,s,h,d,u,p,b,v,m,g,E,f,w,k,N=a(2504),x=a(592),L=a(5866),y=a(1412),O=a(8644),M=a(5600),I=a.n(M),R=a(7672),T=a(8160),C=a(9124),A=a(8808),_=a(1252),D=a.n(_),S=(0,T.wrapBrick)("eo-icon"),{defineElement:P,property:W,event:F}=(0,R.createDecorators)();o=[P("visual-builder.workbench-pane",{styleTexts:[C.c,A.c]})],c=W(),r=W({type:Boolean}),h=W({type:Number}),u=F({type:"active.change"}),m=F({type:"active.firstActivated"});var U=new WeakMap,B=new WeakMap,K=new WeakMap,j=new WeakMap,z=new WeakMap,G=new WeakMap,V=new WeakMap,Y=new WeakMap,H=new WeakMap;class X extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,Y,{get:Q,set:$}),(0,N.c)(this,z,{get:J,set:q}),(0,N.c)(this,U,{writable:!0,value:(n(this),l(this))}),(0,N.c)(this,B,{writable:!0,value:s(this)}),(0,N.c)(this,K,{writable:!0,value:d(this)}),(0,N.c)(this,j,{writable:!0,value:p(this)}),(0,N.c)(this,G,{writable:!0,value:e=>{e!==this.active&&(this.active=e,(0,y.c)(this,z).emit(e))}}),(0,N.c)(this,V,{writable:!0,value:g(this)}),(0,N.c)(this,H,{writable:!0,value:()=>{(0,y.c)(this,Y).emit()}})}get titleLabel(){return(0,y.c)(this,U)}set titleLabel(e){(0,L.c)(this,U,e)}get active(){return(0,y.c)(this,B)}set active(e){(0,L.c)(this,B,e)}get badge(){return(0,y.c)(this,K)}set badge(e){(0,L.c)(this,K,e)}render(){return I().createElement(Z,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,y.c)(this,G),onFirstActivated:(0,y.c)(this,H)})}}function q(e){v(this,e)}function J(){return b(this)}function $(e){f(this,e)}function Q(){return E(this)}function Z(e){var{titleLabel:t,active:a,badge:n,onActiveChange:i,onFirstActivated:o}=e,[c,l]=(0,M.useState)(a),[r,s]=(0,M.useState)(!1);(0,M.useEffect)((()=>{l(a)}),[a]),(0,M.useEffect)((()=>{null==i||i(c)}),[c,i]);var h=(0,M.useCallback)((()=>{l((e=>!e)),r||c||(s(!0),null==o||o())}),[r,c,o]),d=(0,M.useRef)(),[u,p]=(0,M.useState)(!1),b=(0,M.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 I().createElement("div",{className:D()("pane",{scrolled:u})},I().createElement("div",{className:"pane-header",tabIndex:0,onClick:h},I().createElement("div",{className:"pane-title"},I().createElement("span",{className:"title-icon"},c?I().createElement(S,{lib:"antd",theme:"outlined",icon:"down"}):I().createElement(S,{lib:"antd",theme:"outlined",icon:"right"})),I().createElement("div",{className:"title-label"},t),I().createElement("slot",{name:"title"})),I().createElement("slot",{name:"actions"}),n&&I().createElement("div",{className:"badge"},n),I().createElement("div",{className:"pane-scroll-shadow"})),I().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:b,ref:d},I().createElement("slot",null,I().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}w=X,({e:[l,s,d,p,b,v,g,E,f,n],c:[k,i]}=(0,O.c)(w,[[c,1,"titleLabel"],[r,1,"active"],[h,1,"badge"],[u,1,"activeChangeEvent",e=>(0,y.c)(e,j),(e,t)=>(0,L.c)(e,j,t)],[m,1,"activeFirstActivatedEvent",e=>(0,y.c)(e,V),(e,t)=>(0,L.c)(e,V,t)]],o,0,(e=>H.has((0,x.c)(e))),T.ReactNextElement)),i();var ee,te,ae,ne,ie,oe,ce,le=a(7392),re=a(3804),{defineElement:se,property:he}=(0,R.createDecorators)();ae=[se("visual-builder.workbench-sidebar",{styleTexts:[re.c]})],ne=he();var de=new WeakMap,ue=new WeakMap,pe=new WeakMap,be=new WeakMap;class ve extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,de,{writable:!0,value:(ee(this),ie(this))}),(0,N.c)(this,ue,{writable:!0,value:()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")}}),(0,N.c)(this,pe,{writable:!0,value:()=>{var e=(0,y.c)(this,ue).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,N.c)(this,be,{writable:!0,value:e=>{var t=e.target.assignedNodes();for(var a of t)a.addEventListener("active.change",(0,y.c)(this,pe))}}),(0,le.c)(this,"refCallback",(()=>{(0,y.c)(this,pe).call(this);var e=(0,y.c)(this,ue).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,y.c)(this,be).call(this,e)}))}))}get titleLabel(){return(0,y.c)(this,de)}set titleLabel(e){(0,L.c)(this,de,e)}render(){return I().createElement(me,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function me(e){var{titleLabel:t,refCallback:a}=e;return I().createElement("div",{className:"sidebar",ref:a},I().createElement("div",{className:"title-container"},I().createElement("div",{className:"title-label"},t),I().createElement("slot",{name:"titleToolbar"})),I().createElement("div",{className:"pane-container"},I().createElement("slot",null)))}oe=ve,({e:[ie,ee],c:[ce,te]}=(0,O.c)(oe,[[ne,1,"titleLabel"]],ae,0,void 0,T.ReactNextElement)),te();var ge,Ee,fe,we,ke,Ne,xe,Le,ye,Oe,Me,Ie,Re,Te,Ce,Ae=a(3124),{defineElement:_e,property:De}=(0,R.createDecorators)(),Se=(0,T.wrapBrick)("eo-link"),Pe=(0,T.wrapBrick)("eo-icon");fe=[_e("visual-builder.workbench-action",{styleTexts:[Ae.c]})],we=De({attribute:!1}),Ne=De(),Le=De({type:Boolean}),Oe=De(),Ie=De();var We=new WeakMap,Fe=new WeakMap,Ue=new WeakMap,Be=new WeakMap,Ke=new WeakMap;class je extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,We,{writable:!0,value:(ge(this),ke(this))}),(0,N.c)(this,Fe,{writable:!0,value:xe(this)}),(0,N.c)(this,Ue,{writable:!0,value:ye(this)}),(0,N.c)(this,Be,{writable:!0,value:Me(this)}),(0,N.c)(this,Ke,{writable:!0,value:Re(this)})}get icon(){return(0,y.c)(this,We)}set icon(e){(0,L.c)(this,We,e)}get to(){return(0,y.c)(this,Fe)}set to(e){(0,L.c)(this,Fe,e)}get active(){return(0,y.c)(this,Ue)}set active(e){(0,L.c)(this,Ue,e)}get href(){return(0,y.c)(this,Be)}set href(e){(0,L.c)(this,Be,e)}get target(){return(0,y.c)(this,Ke)}set target(e){(0,L.c)(this,Ke,e)}render(){return I().createElement(ze,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function ze(e){var{icon:t,to:a,active:n,href:i,target:o}=e;return I().createElement(Se,{className:D()("action",{active:n}),url:a,href:i,target:o},I().createElement(Pe,t))}Te=je,({e:[ke,xe,ye,Me,Re,ge],c:[Ce,Ee]}=(0,O.c)(Te,[[we,1,"icon"],[Ne,1,"to"],[Le,1,"active"],[Oe,1,"href"],[Ie,1,"target"]],fe,0,void 0,T.ReactNextElement)),Ee();var Ge=a(6960),Ve=a(80);function Ye(e,t,a,n){var i=[],o=[],c=[],l=0;return e.forEach((e=>{if(e.key=""===n?"".concat(l):"".concat(n,".").concat(l),function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){var r=Ye(e.items,t,a,e.key);i.push(...r.selectedKeys),(r.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...r.openedKeys),c.push(...r.matchedKeys)}else if(function(e,t,a){if(!e.to)return!1;var n="object"==typeof e.to?e.to:(0,Ve.parsePath)(e.to),i=n.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,Ge.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=He(a,n.search)),!o&&Array.isArray(e.activeIncludes))for(var c of e.activeIncludes){var l,r=void 0,s=c.includes("?");if(s&&(r=(0,Ve.parsePath)(c)),(o=!!(0,Ge.matchPath)(t,{path:s?r.pathname:c,exact:!0}))&&null!==(l=r)&&void 0!==l&&l.search&&(o=He(a,r.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var h of e.activeExcludes)if(!(o=!(0,Ge.matchPath)(t,{path:h,exact:!0})))break;return o}(e,t,a)){i.push(String(e.key));for(var s=e.key.split("."),h=0;h<s.length;h++)c.push(s.slice(0,h+1).join("."))}l+=1})),i.length&&""!==n&&o.push(n),{selectedKeys:i,openedKeys:o,matchedKeys:c}}function He(e,t){var a=new URLSearchParams(e),n=new URLSearchParams(t);for(var[i,o]of n.entries()){var c;if((null!==(c=a.get(i))&&void 0!==c?c:"")!==o)return!1}return!0}var Xe,qe,Je,$e,Qe,Ze,et,tt,at,nt=a(3504),it=(0,T.wrapBrick)("visual-builder.workbench-action"),{defineElement:ot,property:ct}=(0,R.createDecorators)();Je=[ot("visual-builder.workbench-action-list",{styleTexts:[nt.c]})],$e=ct(),Ze=ct({attribute:!1});var lt,rt=new WeakMap,st=new WeakMap;class ht extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,rt,{writable:!0,value:(Xe(this),Qe(this))}),(0,N.c)(this,st,{writable:!0,value:et(this)})}get appId(){return(0,y.c)(this,rt)}set appId(e){(0,L.c)(this,rt,e)}get menu(){return(0,y.c)(this,st)}set menu(e){(0,L.c)(this,st,e)}render(){return I().createElement(ut,{appId:this.appId,menu:this.menu})}}tt=ht,({e:[Qe,et,Xe],c:[at,qe]}=(0,O.c)(tt,[[$e,1,"appId"],[Ze,1,"menu"]],Je,0,void 0,T.ReactNextElement)),qe();var dt=new Map;function ut(e){var t,{appId:a,menu:n}=e,i=(0,Ge.getHistory)(),[o,c]=(0,M.useState)(),[l,r]=(0,M.useState)(i.location);return(0,M.useEffect)((()=>{var e=i.listen((e=>{r(e)}));return e}),[i]),(0,M.useEffect)((()=>{lt||(lt=a),lt!==a&&(dt.clear(),lt=a)}),[a]),(0,M.useEffect)((()=>{var e,{pathname:t,search:a}=l,{selectedKeys:i}=Ye(null!==(e=null==n?void 0:n.menuItems)&&void 0!==e?e:[],t,a,"");c(Number(i[0]))}),[n,l]),I().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&&dt.has(t)&&(a=dt.get(t)),I().createElement(it,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||dt.set(o,"".concat(l.pathname).concat(l.search))})(e)})}})).filter(Boolean))}var pt,bt,vt,mt,gt,Et,ft,wt,kt,Nt,xt,Lt,yt,Ot,Mt,It,Rt,Tt,Ct,At,_t,Dt,St,Pt,Wt,Ft,Ut,Bt,Kt,jt,zt,Gt,Vt,Yt,Ht,Xt,qt,Jt,$t,Qt,Zt,ea,ta,aa,na,ia,oa,ca,la,ra,sa,ha,da,ua,pa,ba,va,ma,ga,Ea,fa=a(9604),wa=a(8080),ka=a(3676),Na=a(5127),xa=a(6184),La=a(5244),ya=a(5080);function Oa(e){return e.key}a(48);var Ma,{defineElement:Ia,property:Ra,event:Ta}=(0,R.createDecorators)();vt=[Ia("visual-builder.workbench-tree",{styleTexts:[La.c,ya.c]})],mt=Ra({attribute:!1}),Et=Ra({attribute:!1}),wt=Ra({type:Boolean}),Nt=Ra(),Lt=Ra({type:Boolean}),Ot=Ra(),It=Ra({type:Boolean}),Tt=Ra({attribute:!1}),At=Ra({type:Boolean}),Dt=Ra({attribute:!1}),Pt=Ra({attribute:!1}),Ft=Ra({type:Boolean}),Bt=Ra({attribute:!1}),jt=Ra({type:Boolean}),Gt=Ra({type:Boolean}),Yt=Ra({type:Boolean}),Xt=Ra({type:String}),Jt=Ra({type:Boolean}),Qt=Ta({type:"action.click"}),aa=Ta({type:"node.click"}),ca=Ta({type:"node.drop"}),ha=Ta({type:"context.menu"}),ba=Ta({type:"node.toggle"});var Ca=new WeakMap,Aa=new WeakMap,_a=new WeakMap,Da=new WeakMap,Sa=new WeakMap,Pa=new WeakMap,Wa=new WeakMap,Fa=new WeakMap,Ua=new WeakMap,Ba=new WeakMap,Ka=new WeakMap,ja=new WeakMap,za=new WeakMap,Ga=new WeakMap,Va=new WeakMap,Ya=new WeakMap,Ha=new WeakMap,Xa=new WeakMap,qa=new WeakMap,Ja=new WeakMap,$a=new WeakMap,Qa=new WeakMap,Za=new WeakMap,en=new WeakMap,tn=new WeakMap,an=new WeakMap,nn=new WeakMap,on=new WeakMap,cn=new WeakMap,ln=new WeakMap,rn=new WeakMap,sn=new WeakMap,hn=new WeakMap;class dn extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,sn,{get:kn,set:wn}),(0,N.c)(this,cn,{get:fn,set:En}),(0,N.c)(this,an,{get:gn,set:mn}),(0,N.c)(this,Za,{get:vn,set:bn}),(0,N.c)(this,Ja,{get:pn,set:un}),(0,N.c)(this,Ca,{writable:!0,value:(pt(this),gt(this))}),(0,N.c)(this,Aa,{writable:!0,value:ft(this)}),(0,N.c)(this,_a,{writable:!0,value:kt(this)}),(0,N.c)(this,Da,{writable:!0,value:xt(this)}),(0,N.c)(this,Sa,{writable:!0,value:yt(this)}),(0,N.c)(this,Pa,{writable:!0,value:Mt(this)}),(0,N.c)(this,Wa,{writable:!0,value:Rt(this)}),(0,N.c)(this,Fa,{writable:!0,value:Ct(this)}),(0,N.c)(this,Ua,{writable:!0,value:_t(this)}),(0,N.c)(this,Ba,{writable:!0,value:St(this)}),(0,N.c)(this,Ka,{writable:!0,value:Wt(this)}),(0,N.c)(this,ja,{writable:!0,value:Ut(this)}),(0,N.c)(this,za,{writable:!0,value:Kt(this)}),(0,N.c)(this,Ga,{writable:!0,value:zt(this)}),(0,N.c)(this,Va,{writable:!0,value:Vt(this)}),(0,N.c)(this,Ya,{writable:!0,value:Ht(this)}),(0,N.c)(this,Ha,{writable:!0,value:qt(this)}),(0,N.c)(this,Xa,{writable:!0,value:$t(this)}),(0,N.c)(this,qa,{writable:!0,value:Zt(this)}),(0,N.c)(this,$a,{writable:!0,value:e=>{(0,y.c)(this,Ja).emit(e)}}),(0,N.c)(this,Qa,{writable:!0,value:na(this)}),(0,N.c)(this,en,{writable:!0,value:e=>()=>{(0,y.c)(this,Za).emit(e.data)}}),(0,N.c)(this,tn,{writable:!0,value:la(this)}),(0,N.c)(this,nn,{writable:!0,value:e=>{(0,y.c)(this,an).emit(e)}}),(0,N.c)(this,on,{writable:!0,value:da(this)}),(0,N.c)(this,ln,{writable:!0,value:e=>t=>{t.preventDefault(),(0,y.c)(this,cn).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})}}),(0,N.c)(this,rn,{writable:!0,value:va(this)}),(0,N.c)(this,hn,{writable:!0,value:(e,t)=>{(0,y.c)(this,sn).emit({nodeId:e,collapsed:t})}})}get nodes(){return(0,y.c)(this,Ca)}set nodes(e){(0,L.c)(this,Ca,e)}get actions(){return(0,y.c)(this,Aa)}set actions(e){(0,L.c)(this,Aa,e)}get actionsHidden(){return(0,y.c)(this,_a)}set actionsHidden(e){(0,L.c)(this,_a,e)}get placeholder(){return(0,y.c)(this,Da)}set placeholder(e){(0,L.c)(this,Da,e)}get isTransformName(){return(0,y.c)(this,Sa)}set isTransformName(e){(0,L.c)(this,Sa,e)}get searchPlaceholder(){return(0,y.c)(this,Pa)}set searchPlaceholder(e){(0,L.c)(this,Pa,e)}get noSearch(){return(0,y.c)(this,Wa)}set noSearch(e){(0,L.c)(this,Wa,e)}get activeKey(){return(0,y.c)(this,Fa)}set activeKey(e){(0,L.c)(this,Fa,e)}get showMatchedNodeOnly(){return(0,y.c)(this,Ua)}set showMatchedNodeOnly(e){(0,L.c)(this,Ua,e)}get matchNodeDataFields(){return(0,y.c)(this,Ba)}set matchNodeDataFields(e){(0,L.c)(this,Ba,e)}get fixedActionsFor(){return(0,y.c)(this,Ka)}set fixedActionsFor(e){(0,L.c)(this,Ka,e)}get collapsible(){return(0,y.c)(this,ja)}set collapsible(e){(0,L.c)(this,ja,e)}get collapsedNodes(){return(0,y.c)(this,za)}set collapsedNodes(e){(0,L.c)(this,za,e)}get allowDrag(){return(0,y.c)(this,Ga)}set allowDrag(e){(0,L.c)(this,Ga,e)}get allowDragToRoot(){return(0,y.c)(this,Va)}set allowDragToRoot(e){(0,L.c)(this,Va,e)}get allowDragToInside(){return(0,y.c)(this,Ya)}set allowDragToInside(e){(0,L.c)(this,Ya,e)}get nodeKey(){return(0,y.c)(this,Ha)}set nodeKey(e){(0,L.c)(this,Ha,e)}get skipNotify(){return(0,y.c)(this,Xa)}set skipNotify(e){(0,L.c)(this,Xa,e)}render(){return I().createElement(wa.O.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,y.c)(this,$a)}},I().createElement(Na.u.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:Oa,onNodeToggle:(0,y.c)(this,hn),skipNotify:this.skipNotify,clickFactory:(0,y.c)(this,en),contextMenuFactory:(0,y.c)(this,ln),matchNode:(e,t)=>{var a;return(0,xa.i)(e.name,t)||!(null===(a=this.matchNodeDataFields)||void 0===a||!a.length)&&(0,xa.i)("*"===this.matchNodeDataFields?e.data:(0,fa.pick)(e.data,this.matchNodeDataFields),t)}}},I().createElement(ka.s$,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,y.c)(this,nn),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}function un(e){ta(this,e)}function pn(){return ea(this)}function bn(e){oa(this,e)}function vn(){return ia(this)}function mn(e){sa(this,e)}function gn(){return ra(this)}function En(e){pa(this,e)}function fn(){return ua(this)}function wn(e){ga(this,e)}function kn(){return ma(this)}Ea=dn,({e:[gt,ft,kt,xt,yt,Mt,Rt,Ct,_t,St,Wt,Ut,Kt,zt,Vt,Ht,qt,$t,Zt,ea,ta,na,ia,oa,la,ra,sa,da,ua,pa,va,ma,ga,pt],c:[Ma,bt]}=(0,O.c)(Ea,[[mt,1,"nodes"],[Et,1,"actions"],[wt,1,"actionsHidden"],[Nt,1,"placeholder"],[Lt,1,"isTransformName"],[Ot,1,"searchPlaceholder"],[It,1,"noSearch"],[Tt,1,"activeKey"],[At,1,"showMatchedNodeOnly"],[Dt,1,"matchNodeDataFields"],[Pt,1,"fixedActionsFor"],[Ft,1,"collapsible"],[Bt,1,"collapsedNodes"],[jt,1,"allowDrag"],[Gt,1,"allowDragToRoot"],[Yt,1,"allowDragToInside"],[Xt,1,"nodeKey"],[Jt,1,"skipNotify"],[Qt,1,"actionClickEvent",e=>(0,y.c)(e,qa),(e,t)=>(0,L.c)(e,qa,t)],[aa,1,"nodeClickEvent",e=>(0,y.c)(e,Qa),(e,t)=>(0,L.c)(e,Qa,t)],[ca,1,"nodeDropEvent",e=>(0,y.c)(e,tn),(e,t)=>(0,L.c)(e,tn,t)],[ha,1,"nodeContextMenuEvent",e=>(0,y.c)(e,on),(e,t)=>(0,L.c)(e,on,t)],[ba,1,"nodeToggleEvent",e=>(0,y.c)(e,rn),(e,t)=>(0,L.c)(e,rn,t)]],vt,0,(e=>hn.has((0,x.c)(e))),T.ReactNextElement)),bt();var Nn=a(4516),xn=a(4724);a(8172),customElements.define("visual-builder.inject-preview-agent",(0,Nn.createProviderClass)((function(e,t){return(0,xn.c)(e,t)})));var Ln,yn,On,Mn,In,Rn,Tn,Cn,An,_n,Dn,Sn,Pn,Wn,Fn,Un,Bn,Kn,jn,zn,Gn=a(4412),Vn=a(6008),Yn=a.n(Vn),Hn=a(5544),Xn=a(4432),qn=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}({}),Jn="bricks/visual-builder/workbench-history-action",$n=a(8944),Qn=a(5832),Zn=function(){var e=(0,$n.c)((function*(e,t,a){return(yield Qn.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,Gn.c)((0,Gn.c)({},a),{},{params:t}))).data}));return function(t,a,n){return e.apply(this,arguments)}}(),ei=a(2204),ti={add:"".concat(Jn,":").concat(qn.ADD),edit:"".concat(Jn,":").concat(qn.EDIT),delete:"".concat(Jn,":").concat(qn.DELETE),batch_delete:"".concat(Jn,":").concat(qn.DELETE),import:"".concat(Jn,":").concat(qn.IMPORT),clone:"".concat(Jn,":").concat(qn.CLONE),append_relation:"".concat(Jn,":").concat(qn.APPEND_RELATION),update_relation:"".concat(Jn,":").concat(qn.UPDATE_RELATION),remove_relation:"".concat(Jn,":").concat(qn.REMOVE_RELATION),rollback:"".concat(Jn,":").concat(qn.ROLLBACK),rollback_all:"".concat(Jn,":").concat(qn.ROLLBACK_ALL)},ai={add:"".concat(Jn,":").concat(qn.ADD_FULL),edit:"".concat(Jn,":").concat(qn.EDIT_FULL),delete:"".concat(Jn,":").concat(qn.DELETE_FULL),batch_delete:"".concat(Jn,":").concat(qn.DELETE_FULL),import:"".concat(Jn,":").concat(qn.IMPORT_FULL),clone:"".concat(Jn,":").concat(qn.CLONE_FULL),append_relation:"".concat(Jn,":").concat(qn.APPEND_RELATION_FULL),update_relation:"".concat(Jn,":").concat(qn.UPDATE_RELATION_FULL),remove_relation:"".concat(Jn,":").concat(qn.REMOVE_RELATION_FULL),rollback:"".concat(Jn,":").concat(qn.ROLLBACK_FULL),rollback_all:"".concat(Jn,":").concat(qn.ROLLBACK_ALL_FULL)},ni={project:"".concat(Jn,":").concat(qn.PROJECT),userGroup:"".concat(Jn,":").concat(qn.USER),permission:"".concat(Jn,":").concat(qn.PERMISSION),brick:"".concat(Jn,":").concat(qn.BRICK),route:"".concat(Jn,":").concat(qn.ROUTE),template:"".concat(Jn,":").concat(qn.TEMPLATE),snippet:"".concat(Jn,":").concat(qn.SNIPPET),i18n:"".concat(Jn,":").concat(qn.I18N),image:"".concat(Jn,":").concat(qn.IMAGE),function:"".concat(Jn,":").concat(qn.FUNCTION),menu:"".concat(Jn,":").concat(qn.MENU),menuItem:"".concat(Jn,":").concat(qn.MENU_ITEM),workflow:"".concat(Jn,":").concat(qn.WORKFLOW)},ii={PROJECT_MICRO_APP:"".concat(Jn,":").concat(qn.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(Jn,":").concat(qn.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(Jn,":").concat(qn.PERMISSION),STORYBOARD_BRICK:"".concat(Jn,":").concat(qn.BRICK),STORYBOARD_ROUTE:"".concat(Jn,":").concat(qn.ROUTE),STORYBOARD_TEMPLATE:"".concat(Jn,":").concat(qn.TEMPLATE),STORYBOARD_SNIPPET:"".concat(Jn,":").concat(qn.SNIPPET),STORYBOARD_I18N:"".concat(Jn,":").concat(qn.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(Jn,":").concat(qn.IMAGE),STORYBOARD_FUNCTION:"".concat(Jn,":").concat(qn.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(Jn,":").concat(qn.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(Jn,":").concat(qn.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(Jn,":").concat(qn.WORKFLOW)};function oi(e){var t,a,n,i,o,c,l,r,s,h,d,u,p,b,v,m,g,E="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",f=ei.i18n.t(null!==(t=ni[e.category])&&void 0!==t?t:e.category),w=ei.i18n.t(null!==(a=ti[E])&&void 0!==a?a:E),k=ei.i18n.t(null!==(n=ii[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=ei.i18n.t(null!==(c=ii[null===(l=e.abstract)||void 0===l?void 0:l.rightObjectId])&&void 0!==c?c:null===(r=e.abstract)||void 0===r?void 0:r.rightObjectId),x=ci(null===(s=e.abstract)||void 0===s?void 0:s.nodes,null===(h=e.abstract)||void 0===h?void 0:h.nodesCount),L=ci(null===(d=e.abstract)||void 0===d?void 0:d.leftNodes,null===(u=e.abstract)||void 0===u?void 0:u.leftNodesCount),y=ci(null===(p=e.abstract)||void 0===p?void 0:p.rightNodes,null===(b=e.abstract)||void 0===b?void 0:b.rightNodesCount),O="rollback"===E?oi(e.rollBackIdInfo).abstract:null;return{category:f,action:w,leftObjectId:k,rightObjectId:N,nodes:x,leftNodes:L,rightNodes:y,abstract:ei.i18n.t(null!==(v=ai[E])&&void 0!==v?v:E,{category:f,nodes:x,leftNodes:L,rightNodes:y,nodeChanges:null===(m=e.abstract)||void 0===m||null===(m=m.nodeChanges)||void 0===m?void 0:m.join(", "),relationChanges:null===(g=e.abstract)||void 0===g||null===(g=g.relationChanges)||void 0===g?void 0:g.join(", "),leftObjectId:k,rightObjectId:N,rollbackAbstract:O}),rollbackAbstract:O}}function ci(){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 ei.i18n.t("".concat(Jn,":").concat(qn.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,Xn.initializeReactI18n)(Jn,{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 li,{defineElement:ri,property:si,event:hi}=(0,R.createDecorators)(),di=(0,T.wrapBrick)("eo-button"),ui=(0,T.wrapBrick)("eo-link"),pi=(0,T.wrapBrick)("eo-icon"),bi=(0,T.wrapBrick)("eo-easyops-avatar"),vi=(0,T.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});On=[ri("visual-builder.workbench-history-action",{styleTexts:[Hn.c]})],Mn=si(),Rn=si(),Cn=hi({type:"history.item.click"}),Sn=hi({type:"rollback"}),Un=hi({type:"rollback.all"});var mi=new WeakMap,gi=new WeakMap,Ei=new WeakMap,fi=new WeakMap,wi=new WeakMap,ki=new WeakMap,Ni=new WeakMap,xi=new WeakMap,Li=new WeakMap,yi=new WeakMap,Oi=new WeakMap;class Mi extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,yi,{get:_i,set:Ai}),(0,N.c)(this,Ni,{get:Ci,set:Ti}),(0,N.c)(this,fi,{get:Ri,set:Ii}),(0,N.c)(this,mi,{writable:!0,value:(Ln(this),In(this))}),(0,N.c)(this,gi,{writable:!0,value:Tn(this)}),(0,N.c)(this,Ei,{writable:!0,value:An(this)}),(0,N.c)(this,wi,{writable:!0,value:e=>{(0,y.c)(this,fi).emit(e)}}),(0,N.c)(this,ki,{writable:!0,value:Pn(this)}),(0,N.c)(this,xi,{writable:!0,value:e=>{(0,y.c)(this,Ni).emit(e)}}),(0,N.c)(this,Li,{writable:!0,value:Bn(this)}),(0,N.c)(this,Oi,{writable:!0,value:()=>{(0,y.c)(this,yi).emit()}})}get appId(){return(0,y.c)(this,mi)}set appId(e){(0,L.c)(this,mi,e)}get projectId(){return(0,y.c)(this,gi)}set projectId(e){(0,L.c)(this,gi,e)}render(){return I().createElement(Di,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,y.c)(this,wi),onRollback:(0,y.c)(this,xi),onRollbackAll:(0,y.c)(this,Oi)})}}function Ii(e){Dn(this,e)}function Ri(){return _n(this)}function Ti(e){Fn(this,e)}function Ci(){return Wn(this)}function Ai(e){jn(this,e)}function _i(){return Kn(this)}function Di(e){var{appId:t,onHistoryItemClick:a,onRollback:n,onRollbackAll:i}=e,{t:o}=(0,Xn.useTranslation)(Jn),[c,l]=(0,M.useState)(!1),[r,s]=(0,M.useState)(!0),[h,d]=(0,M.useState)(!1),[u,p]=(0,M.useState)([]),b=(0,M.useRef)(""),v=e=>{l(!0),Zn(t,{ts:b.current,limit:20}).then((t=>{p((a=>{var n=t.list.map((e=>(0,Gn.c)((0,Gn.c)({},e),{},{translation:oi(e)})));return e?n:a.concat(n)})),b.current=t.ts,d(t.list.length<20),s(t.list.length<20)})).catch((e=>{(0,Ge.handleHttpError)(e)})).finally((()=>{l(!1)}))};return I().createElement(vi,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(s(!0),d(!1),p([]),b.current="",v(!0))}},I().createElement(di,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),I().createElement("div",null,I().createElement("div",{className:"history-title"},"History"),I().createElement("div",{className:"history-list"},u.length?I().createElement(I().Fragment,null,u.map(((e,t)=>I().createElement(Si,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:a,onRollback:n}))),!r&&I().createElement("span",{className:"load-more-container"},I().createElement(ui,{className:"load-more",disabled:c,onClick:()=>v()},o(qn.LOAD_MORE))),h&&I().createElement("span",{className:"end-container"},"The End",I().createElement(pi,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):I().createElement("div",{className:"empty"},o(c?qn.LOADING:qn.NO_DATA))),I().createElement("slot",null)))}function Si(e){var{data:t,enableRollback:a,current:n,onHistoryItemClick:i,onRollback:o}=e,c=Yn()(Number(t.ts)/1e6),l=Yn().duration(c.diff(Yn()())),r=l.days()<=-1?c.format("YYYY-MM-DD HH:mm:ss"):l.humanize(!0,{ss:0,s:60,m:60,h:24});return I().createElement("div",{className:"item-container"},I().createElement("div",{className:"item-title"},I().createElement("div",{className:"title-left",onClick:()=>i((0,Gn.c)((0,Gn.c)({},t),{},{enableRollback:a}))},I().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),n&&I().createElement("div",{className:"branch"},"(current)")),I().createElement("div",{className:"title-right"},a&&I().createElement(pi,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),I().createElement("div",{className:"item-info"},I().createElement(bi,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),I().createElement("div",{className:"time"},r),I().createElement("div",{className:"operator"},t.user)))}zn=Mi,({e:[In,Tn,An,_n,Dn,Pn,Wn,Fn,Bn,Kn,jn,Ln],c:[li,yn]}=(0,O.c)(zn,[[Mn,1,"appId"],[Rn,1,"projectId"],[Cn,1,"historyItemClickEvent",e=>(0,y.c)(e,Ei),(e,t)=>(0,L.c)(e,Ei,t)],[Sn,1,"rollbackEvent",e=>(0,y.c)(e,ki),(e,t)=>(0,L.c)(e,ki,t)],[Un,1,"rollbackAllEvent",e=>(0,y.c)(e,Li),(e,t)=>(0,L.c)(e,Li,t)]],On,0,(e=>Oi.has((0,x.c)(e))),T.ReactNextElement)),yn();var Pi,Wi,Fi,Ui,Bi,Ki,ji,zi,Gi,Vi,Yi,Hi,Xi,qi,Ji,$i,Qi,Zi,eo,to,ao,no,io,oo,co,lo,ro,so,ho,uo,po,bo,vo,mo,go,Eo,fo,wo,ko,No,xo,Lo,yo,Oo,Mo,Io,Ro,To,Co,Ao,_o,Do,So,Po,Wo,Fo,Uo,Bo=a(8904),{defineElement:Ko,property:jo,event:zo}=(0,R.createDecorators)(),Go=(0,T.wrapBrick)("eo-icon"),Vo=(0,T.wrapBrick)("eo-tooltip"),Yo=new Set;Fi=[Ko("visual-builder.page-arch-node",{styleTexts:[Bo.c]})],Ui=jo(),Ki=jo(),zi=jo({attribute:!1}),Vi=jo({attribute:!1}),Hi=jo({type:Boolean,render:!1}),qi=jo({type:Boolean,render:!1}),$i=jo({type:Boolean,render:!1}),Zi=jo(),to=zo({type:"label.editing.change"}),oo=zo({type:"label.change"}),so=zo({type:"node.click"}),bo=zo({type:"node.dblclick"}),Eo=zo({type:"node.contextmenu"}),No=zo({type:"child.append"}),Oo=zo({type:"external.click"}),To=zo({type:"subNode.dblclick"}),Do=zo({type:"subNode.contextmenu"});var Ho=new WeakMap,Xo=new WeakMap,qo=new WeakMap,Jo=new WeakMap,$o=new WeakMap,Qo=new WeakMap,Zo=new WeakMap,ec=new WeakMap,tc=new WeakMap,ac=new WeakMap,nc=new WeakMap,ic=new WeakMap,oc=new WeakMap,cc=new WeakMap,lc=new WeakMap,rc=new WeakMap,sc=new WeakMap,hc=new WeakMap,dc=new WeakMap,uc=new WeakMap,pc=new WeakMap,bc=new WeakMap,vc=new WeakMap,mc=new WeakMap,gc=new WeakMap,Ec=new WeakMap,fc=new WeakMap,wc=new WeakMap,kc=new WeakMap,Nc=new WeakMap,xc=new WeakMap,Lc=new WeakMap,yc=new WeakMap,Oc=new WeakMap,Mc=new WeakMap;class Ic extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,Oc,{get:Yc,set:Vc}),(0,N.c)(this,xc,{get:Gc,set:zc}),(0,N.c)(this,wc,{get:jc,set:Kc}),(0,N.c)(this,gc,{get:Bc,set:Uc}),(0,N.c)(this,bc,{get:Fc,set:Wc}),(0,N.c)(this,dc,{get:Pc,set:Sc}),(0,N.c)(this,rc,{get:Dc,set:_c}),(0,N.c)(this,oc,{get:Ac,set:Cc}),(0,N.c)(this,ac,{get:Tc,set:Rc}),(0,N.c)(this,Ho,{writable:!0,value:(Pi(this),Bi(this))}),(0,N.c)(this,Xo,{writable:!0,value:ji(this)}),(0,N.c)(this,qo,{writable:!0,value:Gi(this)}),(0,N.c)(this,Jo,{writable:!0,value:Yi(this)}),(0,N.c)(this,$o,{writable:!0,value:Xi(this)}),(0,N.c)(this,Qo,{writable:!0,value:Ji(this)}),(0,N.c)(this,Zo,{writable:!0,value:Qi(this)}),(0,N.c)(this,ec,{writable:!0,value:eo(this)}),(0,N.c)(this,tc,{writable:!0,value:ao(this)}),(0,N.c)(this,nc,{writable:!0,value:e=>{(0,y.c)(this,ac).emit(e)}}),(0,N.c)(this,ic,{writable:!0,value:co(this)}),(0,N.c)(this,cc,{writable:!0,value:e=>{(0,y.c)(this,oc).emit(e)}}),(0,N.c)(this,lc,{writable:!0,value:ho(this)}),(0,N.c)(this,sc,{writable:!0,value:()=>{(0,y.c)(this,rc).emit()}}),(0,N.c)(this,hc,{writable:!0,value:vo(this)}),(0,N.c)(this,uc,{writable:!0,value:()=>{(0,y.c)(this,dc).emit()}}),(0,N.c)(this,pc,{writable:!0,value:fo(this)}),(0,N.c)(this,vc,{writable:!0,value:e=>{(0,y.c)(this,bc).emit(e)}}),(0,N.c)(this,mc,{writable:!0,value:xo(this)}),(0,N.c)(this,Ec,{writable:!0,value:()=>{(0,y.c)(this,gc).emit()}}),(0,N.c)(this,fc,{writable:!0,value:Mo(this)}),(0,N.c)(this,kc,{writable:!0,value:e=>{(0,y.c)(this,wc).emit(e)}}),(0,N.c)(this,Nc,{writable:!0,value:Co(this)}),(0,N.c)(this,Lc,{writable:!0,value:e=>{(0,y.c)(this,xc).emit(e)}}),(0,N.c)(this,yc,{writable:!0,value:So(this)}),(0,N.c)(this,Mc,{writable:!0,value:e=>{(0,y.c)(this,Oc).emit(e)}})}get label(){return(0,y.c)(this,Ho)}set label(e){(0,L.c)(this,Ho,e)}get type(){return(0,y.c)(this,Xo)}set type(e){(0,L.c)(this,Xo,e)}get external(){return(0,y.c)(this,qo)}set external(e){(0,L.c)(this,qo,e)}get subNodes(){return(0,y.c)(this,Jo)}set subNodes(e){(0,L.c)(this,Jo,e)}get active(){return(0,y.c)(this,$o)}set active(e){(0,L.c)(this,$o,e)}get notSynced(){return(0,y.c)(this,Qo)}set notSynced(e){(0,L.c)(this,Qo,e)}get disableChildAppend(){return(0,y.c)(this,Zo)}set disableChildAppend(e){(0,L.c)(this,Zo,e)}get autoFocusOnce(){return(0,y.c)(this,ec)}set autoFocusOnce(e){(0,L.c)(this,ec,e)}render(){return I().createElement(Hc,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,y.c)(this,nc),onLabelChange:(0,y.c)(this,cc),onNodeClick:(0,y.c)(this,sc),onNodeDoubleClick:(0,y.c)(this,uc),onNodeContextMenu:(0,y.c)(this,vc),onChildAppend:(0,y.c)(this,Ec),onExternalClick:(0,y.c)(this,kc),onSubNodeDoubleClick:(0,y.c)(this,Lc),onSubNodeContextMenu:(0,y.c)(this,Mc)})}}function Rc(e){io(this,e)}function Tc(){return no(this)}function Cc(e){ro(this,e)}function Ac(){return lo(this)}function _c(e){po(this,e)}function Dc(){return uo(this)}function Sc(e){go(this,e)}function Pc(){return mo(this)}function Wc(e){ko(this,e)}function Fc(){return wo(this)}function Uc(e){yo(this,e)}function Bc(){return Lo(this)}function Kc(e){Ro(this,e)}function jc(){return Io(this)}function zc(e){_o(this,e)}function Gc(){return Ao(this)}function Vc(e){Wo(this,e)}function Yc(){return Po(this)}function Hc(e){var t,{label:a,type:n,external:i,subNodes:o,autoFocusOnce:c,onLabelEditingChange:l,onLabelChange:r,onNodeClick:s,onNodeDoubleClick:h,onNodeContextMenu:d,onChildAppend:u,onExternalClick:p,onSubNodeDoubleClick:b,onSubNodeContextMenu:v}=e,m="board"===n?"board":"page",[g,E]=(0,M.useState)(a),[f,w]=(0,M.useState)(!1),k=(0,M.useRef)(!1),[N,x]=(0,M.useState)(!1),L=(0,M.useRef)(null);(0,M.useEffect)((()=>{E(a)}),[a]);var y=(0,M.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),w(!0)}),[]);(0,M.useEffect)((()=>{c&&!Yo.has(c)&&(Yo.add(c),setTimeout((()=>{w(!0)}),1))}),[c]),(0,M.useEffect)((()=>{var e,t;f&&(null===(e=L.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=L.current)||void 0===t||t.select())}),[f]),(0,M.useEffect)((()=>{k.current?null==l||l(f):k.current=!0}),[f,l]);var O=(0,M.useCallback)((e=>{E(e.target.value)}),[]),R=(0,M.useCallback)((e=>{var t,a=e.key||e.keyCode||e.which;"Enter"!==a&&13!==a||null===(t=L.current)||void 0===t||t.blur()}),[]),T=(0,M.useCallback)((()=>{w(!1),x(!0)}),[]);(0,M.useEffect)((()=>{N&&(null==r||r(g),x(!1))}),[g,r,N]);var C=(0,M.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),A=(0,M.useCallback)((e=>{e.stopPropagation(),null==p||p(i)}),[i,p]),_=(0,M.useCallback)((e=>{e.stopPropagation()}),[]),S=38*Math.max(0,Math.floor((null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)-3));return I().createElement(I().Fragment,null,I().createElement("div",{className:D()("node",m,{"editing-label":f}),style:{height:"board"===m?70:130+S},onClick:s,onDoubleClick:h,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},I().createElement("input",{className:"label-input",value:g,ref:L,onChange:O,onKeyDown:R,onBlur:T,onDoubleClick:_,onContextMenu:_,onMouseDown:_}),I().createElement("div",{className:"label",onDoubleClick:y,onMouseDown:_},g),"board"===m?I().createElement("div",{className:"icon-container"},I().createElement(Go,{lib:"antd",icon:"unordered-list"})):I().createElement("div",{className:"thumbnail-container",style:{height:98+S}},I().createElement("div",{className:"thumbnail-placeholder"},I().createElement(Go,{lib:"antd",icon:"ellipsis"})),i&&I().createElement("div",{className:"external",onClick:A,onDoubleClick:_,onMouseDown:_},I().createElement(Go,{lib:"antd",icon:"desktop"}),I().createElement("span",{className:"external-label"},i.label)),null!=o&&o.length?I().createElement("div",{className:"sub-nodes"},o.map((e=>I().createElement(Xc,{key:e.id,subNode:e,onSubNodeDoubleClick:b,onSubNodeContextMenu:v})))):null)),I().createElement("div",{className:"add-button",role:"button",onClick:C,onMouseDown:_},I().createElement(Go,{lib:"fa",icon:"plus"})))}function Xc(e){var{subNode:t,onSubNodeDoubleClick:a,onSubNodeContextMenu:n}=e;return I().createElement(Vo,{key:t.id,content:t.label},I().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})}},I().createElement("div",{className:"sub-node-skeleton-title"}),I().createElement("div",{className:"sub-node-skeleton-content"}),I().createElement("div",{className:"sub-node-skeleton-button"})))}Fo=Ic,({e:[Bi,ji,Gi,Yi,Xi,Ji,Qi,eo,ao,no,io,co,lo,ro,ho,uo,po,vo,mo,go,fo,wo,ko,xo,Lo,yo,Mo,Io,Ro,Co,Ao,_o,So,Po,Wo,Pi],c:[Uo,Wi]}=(0,O.c)(Fo,[[Ui,1,"label"],[Ki,1,"type"],[zi,1,"external"],[Vi,1,"subNodes"],[Hi,1,"active"],[qi,1,"notSynced"],[$i,1,"disableChildAppend"],[Zi,1,"autoFocusOnce"],[to,1,"labelEditingChange",e=>(0,y.c)(e,tc),(e,t)=>(0,L.c)(e,tc,t)],[oo,1,"labelChange",e=>(0,y.c)(e,ic),(e,t)=>(0,L.c)(e,ic,t)],[so,1,"nodeClick",e=>(0,y.c)(e,lc),(e,t)=>(0,L.c)(e,lc,t)],[bo,1,"nodeDoubleClick",e=>(0,y.c)(e,hc),(e,t)=>(0,L.c)(e,hc,t)],[Eo,1,"nodeContextMenu",e=>(0,y.c)(e,pc),(e,t)=>(0,L.c)(e,pc,t)],[No,1,"childAppend",e=>(0,y.c)(e,mc),(e,t)=>(0,L.c)(e,mc,t)],[Oo,1,"externalClick",e=>(0,y.c)(e,fc),(e,t)=>(0,L.c)(e,fc,t)],[To,1,"subNodeDoubleClick",e=>(0,y.c)(e,Nc),(e,t)=>(0,L.c)(e,Nc,t)],[Do,1,"subNodeContextMenu",e=>(0,y.c)(e,yc),(e,t)=>(0,L.c)(e,yc,t)]],Fi,0,(e=>Mc.has((0,x.c)(e))),T.ReactNextElement)),Wi();var qc,Jc,$c,Qc,Zc,el,tl,al,nl,il,ol,cl,ll=a(7840),rl=a(5048),{method:sl,property:hl}=(0,R.createDecorators)();Jc=hl({attribute:!1}),Qc=hl({attribute:!1}),el=hl({attribute:!1}),al=hl({attribute:!1}),il=sl(),ol=sl();var dl=new WeakMap,ul=new WeakMap,pl=new WeakMap,bl=new WeakMap,vl=new WeakMap,ml=new WeakMap,gl=new WeakMap,El=new WeakMap,fl=new WeakMap,wl=new WeakMap;class kl extends T.ReactNextElement{constructor(){super(...arguments),(0,N.c)(this,ml,{get:Ol,set:Ml}),(0,N.c)(this,bl,{get:Ll,set:yl}),(0,N.c)(this,ul,{get:Nl,set:xl}),(0,N.c)(this,dl,{writable:!0,value:(qc(this),!1)}),(0,N.c)(this,pl,{writable:!0,value:"normal"}),(0,N.c)(this,vl,{writable:!0,value:!1}),(0,N.c)(this,gl,{writable:!0,value:$c(this)}),(0,N.c)(this,El,{writable:!0,value:Zc(this)}),(0,N.c)(this,fl,{writable:!0,value:tl(this)}),(0,N.c)(this,wl,{writable:!0,value:nl(this)})}get isFormItemElement(){return!0}set validateState(e){(0,L.c)(this,bl,e),this._render()}get validateState(){return(0,y.c)(this,bl)}set notRender(e){this.hidden=e,(0,L.c)(this,ul,e),this._render()}get notRender(){return(0,y.c)(this,ul)}get $bindFormItem(){return(0,y.c)(this,ml)}set $bindFormItem(e){(0,L.c)(this,ml,e),this._render()}get helpBrick(){return(0,y.c)(this,gl)}set helpBrick(e){(0,L.c)(this,gl,e)}get labelBrick(){return(0,y.c)(this,El)}set labelBrick(e){(0,L.c)(this,El,e)}get labelCol(){return(0,y.c)(this,fl)}set labelCol(e){(0,L.c)(this,fl,e)}get wrapperCol(){return(0,y.c)(this,wl)}set wrapperCol(e){(0,L.c)(this,wl,e)}setNotRender(e){this.notRender=e}getFormElement(){for(var e=this;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function Nl(){return(0,y.c)(this,dl)}function xl(e){(0,L.c)(this,dl,e)}function Ll(){return(0,y.c)(this,pl)}function yl(e){(0,L.c)(this,pl,e)}function Ol(){return(0,y.c)(this,vl)}function Ml(e){(0,L.c)(this,vl,e)}cl=kl,[$c,Zc,tl,nl,qc]=(0,O.c)(cl,[[Jc,1,"helpBrick"],[Qc,1,"labelBrick"],[el,1,"labelCol"],[al,1,"wrapperCol"],[il,2,"setNotRender"],[ol,2,"getFormElement"]],[],0,void 0,T.ReactNextElement).e;var Il=function(){var e=(0,$n.c)((function*(e,t){return(yield Qn.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)}}(),Rl=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}({}),Tl="bricks/visual-builder/contract-select",Cl={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,Xn.initializeReactI18n)(Tl,Cl);var Al,_l,Dl,Sl,Pl,Wl,Fl,Ul,Bl,Kl,jl,zl,Gl,Vl,Yl,Hl,Xl,ql,Jl=(0,T.wrapBrick)("eo-icon"),$l=(0,T.wrapBrick)("eo-input",{onChange:"change"});function Ql(e){var{itemsCount:t=20,onBlur:a}=e,[n,i]=(0,M.useState)(t),{t:o}=(0,Xn.useTranslation)(Tl),[c,l]=(0,M.useState)(!1);return I().createElement("div",{className:"options-tips",slot:e.slot},o(Rl.CONTRACT_OPTIONS_TIPS_PREFIX)," ",c?I().createElement($l,{autoFocus:!0,inputStyle:{width:65},value:String(n),onBlur:()=>{l(!1),null==a||a(n)},onChange:e=>{i(Number(e.detail))}}):I().createElement("span",null,n," ",I().createElement(Jl,{icon:"edit",lib:"antd",onClick:()=>{l(!0)}}))," ",o(Rl.CONTRACT_OPTIONS_TIPS_SUFFIX))}(0,Xn.initializeReactI18n)(Tl,Cl);var Zl,{defineElement:er,property:tr,event:ar}=(0,R.createDecorators)(),nr=(0,T.wrapBrick)("eo-form-item"),ir=(0,T.wrapBrick)("eo-auto-complete",{onChange:"change"});Dl=[er("visual-builder.contract-select",{styleTexts:[rl.c]})],Sl=tr(),Wl=tr({type:Boolean}),Ul=tr(),Kl=tr({attribute:!1}),zl=tr({attribute:!1}),Vl=ar({type:"change"});var or=new WeakMap,cr=new WeakMap,lr=new WeakMap,rr=new WeakMap,sr=new WeakMap,hr=new WeakMap,dr=new WeakMap;function ur(e){Xl(this,e)}function pr(){return Hl(this)}function br(e){if("string"!=typeof e)return{name:"",version:""};var[t,a]=e.split(":");return{name:t,version:a}}function vr(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function mr(e){return(0,fa.isNil)(e)||vr(e)?"":ei.i18n.t("".concat(Tl,":").concat(Rl.CONTRACT_VALIDATE_MESSAGE))}function gr(e){var{value:t,inputStyle:a,validateState:n,suffix:i,onChange:o}=e,[c,l]=(0,M.useState)(),[r,s]=(0,M.useState)(20),h=function(e){var{pageSize:t=20,q:a=""}=e,[n,i]=(0,M.useState)([]),[o,c]=(0,M.useState)(a),[l,r]=(0,M.useState)(t);return(0,M.useEffect)((()=>{c(a)}),[a]),(0,M.useEffect)((()=>{r(t)}),[t]),(0,M.useEffect)((()=>{(0,$n.c)((function*(){try{var{list:e}=yield Il({page:1,pageSize:l,fullContractName:o},{interceptorParams:{ignoreLoadingBar:!0}});i(e)}catch(e){console.error(e),i([])}}))()}),[o,l]),n}({q:c,pageSize:r}),[d,u]=(0,M.useState)(br(t)),[p,b]=(0,M.useState)([]);(0,M.useEffect)((()=>{u(br(t))}),[t]);var v=(0,M.useMemo)((()=>(0,fa.debounce)((e=>{l(e)}),200)),[]);return I().createElement("div",{className:"contract-wrapper"},I().createElement(ir,{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(vr(t))u(br(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,c=null!==(n=null==i?void 0:i[0])&&void 0!==n?n:"";b(i),u({name:t,version:c}),null==o||o("".concat(t,":").concat(c))}v(t)}},I().createElement(Ql,{onBlur:e=>s(e),slot:"options-toolbar"})),I().createElement(ir,{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?I().createElement(ll.ReactUseMultipleBricks,i):null)}ql=class extends kl{constructor(){super(...arguments),(0,N.c)(this,dr,{get:pr,set:ur}),(0,N.c)(this,or,{writable:!0,value:(Al(this),Pl(this))}),(0,N.c)(this,cr,{writable:!0,value:Fl(this)}),(0,N.c)(this,lr,{writable:!0,value:Bl(this)}),(0,N.c)(this,rr,{writable:!0,value:jl(this)}),(0,N.c)(this,sr,{writable:!0,value:Gl(this)}),(0,N.c)(this,hr,{writable:!0,value:Yl(this)}),(0,le.c)(this,"handleChange",(e=>{(0,y.c)(this,dr).emit(e)}))}get name(){return(0,y.c)(this,or)}set name(e){(0,L.c)(this,or,e)}get required(){return(0,y.c)(this,cr)}set required(e){(0,L.c)(this,cr,e)}get label(){return(0,y.c)(this,lr)}set label(e){(0,L.c)(this,lr,e)}get value(){return(0,y.c)(this,rr)}set value(e){(0,L.c)(this,rr,e)}get suffix(){return(0,y.c)(this,sr)}set suffix(e){(0,L.c)(this,sr,e)}render(){return I().createElement(nr,{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:mr},I().createElement(gr,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[Pl,Fl,Bl,jl,Gl,Yl,Hl,Xl,Al],c:[Zl,_l]}=(0,O.c)(ql,[[Sl,1,"name"],[Wl,1,"required"],[Ul,1,"label"],[Kl,1,"value"],[zl,1,"suffix"],[Vl,1,"changeEvent",e=>(0,y.c)(e,hr),(e,t)=>(0,L.c)(e,hr,t)]],Dl,0,(e=>dr.has((0,x.c)(e))),kl)),_l()},5048:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},8904:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},8808:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},3504:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},3124:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},5544:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},9124:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()},3804:(e,t,a)=>{a.d(t,{c:()=>l});var n=a(8304),i=a.n(n),o=a(1849),c=a.n(o)()(i());c.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 l=c.toString()}}]);
3
+ //# sourceMappingURL=4816.4333ef99.js.map