@next-bricks/visual-builder 1.5.1 → 1.5.2
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 +1 -1
- package/dist/chunks/{1876.f201fa37.js → 1876.3eb6dfd2.js} +3 -3
- package/dist/chunks/{1876.f201fa37.js.map → 1876.3eb6dfd2.js.map} +1 -1
- package/dist/chunks/3322.461a0488.js +2 -0
- package/dist/chunks/3322.461a0488.js.map +1 -0
- package/dist/chunks/{4724.c751ae2d.js → 4724.977bdfa3.js} +2 -2
- package/dist/chunks/{4724.c751ae2d.js.map → 4724.977bdfa3.js.map} +1 -1
- package/dist/chunks/592.8e4d9195.js +3 -0
- package/dist/chunks/592.8e4d9195.js.map +1 -0
- package/dist/chunks/{9784.4c1d3d90.js → 9784.7644184b.js} +3 -3
- package/dist/chunks/{9784.4c1d3d90.js.map → 9784.7644184b.js.map} +1 -1
- package/dist/chunks/{main.2f29f594.js → main.99296b2a.js} +2 -2
- package/dist/chunks/{main.2f29f594.js.map → main.99296b2a.js.map} +1 -1
- package/dist/chunks/{workbench-action-list.fdf58701.js → workbench-action-list.38fd8840.js} +2 -2
- package/dist/chunks/{workbench-action-list.fdf58701.js.map → workbench-action-list.38fd8840.js.map} +1 -1
- package/dist/chunks/{workbench-history-action.74149de5.js → workbench-history-action.61562660.js} +3 -3
- package/dist/chunks/{workbench-history-action.74149de5.js.map → workbench-history-action.61562660.js.map} +1 -1
- package/dist/{index.2da40318.js → index.426b8719.js} +2 -2
- package/dist/{index.2da40318.js.map → index.426b8719.js.map} +1 -1
- package/package.json +3 -3
- package/dist/chunks/3322.690ec4f9.js +0 -2
- package/dist/chunks/3322.690ec4f9.js.map +0 -1
- package/dist/chunks/592.dc063ee7.js +0 -3
- package/dist/chunks/592.dc063ee7.js.map +0 -1
- /package/dist/chunks/{1876.f201fa37.js.LICENSE.txt → 1876.3eb6dfd2.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{592.dc063ee7.js.LICENSE.txt → 592.8e4d9195.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9784.4c1d3d90.js.LICENSE.txt → 9784.7644184b.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-history-action.74149de5.js.LICENSE.txt → workbench-history-action.61562660.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 1876.
|
|
2
|
-
"use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[1876],{1876:(e,t,a)=>{a.r(t);var n,i,o,c,l,r,s,d,h,u,p,b,v,g,m,E,w,f,k,L=a(2504),x=a(592),N=a(5866),y=a(1412),O=a(8644),M=a(5600),R=a.n(M),I=a(7672),A=a(8160),T=a(9124),C=a(8808),_=a(6484),D=a.n(_),P=(0,A.wrapBrick)("icons.general-icon"),{defineElement:W,property:U,event:F}=(0,I.createDecorators)();o=[W("visual-builder.workbench-pane",{styleTexts:[T.c,C.c]})],c=U(),r=U({type:Boolean}),d=U({type:Number}),u=F({type:"active.change"}),g=F({type:"active.firstActivated"});var S=new WeakMap,B=new WeakMap,K=new WeakMap,j=new WeakMap,z=new WeakMap,Y=new WeakMap,G=new WeakMap,H=new WeakMap,V=new WeakMap;class J extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,H,{get:Q,set:$}),(0,L.c)(this,z,{get:q,set:X}),(0,L.c)(this,S,{writable:!0,value:(n(this),l(this))}),(0,L.c)(this,B,{writable:!0,value:s(this)}),(0,L.c)(this,K,{writable:!0,value:h(this)}),(0,L.c)(this,j,{writable:!0,value:p(this)}),(0,L.c)(this,Y,{writable:!0,value:e=>{e!==this.active&&(this.active=e,(0,y.c)(this,z).emit(e))}}),(0,L.c)(this,G,{writable:!0,value:m(this)}),(0,L.c)(this,V,{writable:!0,value:()=>{(0,y.c)(this,H).emit()}})}get titleLabel(){return(0,y.c)(this,S)}set titleLabel(e){(0,N.c)(this,S,e)}get active(){return(0,y.c)(this,B)}set active(e){(0,N.c)(this,B,e)}get badge(){return(0,y.c)(this,K)}set badge(e){(0,N.c)(this,K,e)}render(){return R().createElement(Z,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,y.c)(this,Y),onFirstActivated:(0,y.c)(this,V)})}}function X(e){v(this,e)}function q(){return b(this)}function $(e){w(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 d=(0,M.useCallback)((()=>{l((e=>!e)),r||c||(s(!0),null==o||o())}),[r,c,o]),h=(0,M.useRef)(),[u,p]=(0,M.useState)(!1),b=(0,M.useMemo)((()=>{return e=()=>{p(h.current.scrollTop>0)},n=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t&&a(),t=requestAnimationFrame((()=>{e(...i)}))},n.cancel=a=()=>cancelAnimationFrame(t),n;var e,t,a,n}),[]);return R().createElement("div",{className:D()("pane",{scrolled:u})},R().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},R().createElement("div",{className:"pane-title"},R().createElement("span",{className:"title-icon"},c?R().createElement(P,{lib:"antd",theme:"outlined",icon:"down"}):R().createElement(P,{lib:"antd",theme:"outlined",icon:"right"})),R().createElement("div",{className:"title-label"},t),R().createElement("slot",{name:"title"})),R().createElement("slot",{name:"actions"}),n&&R().createElement("div",{className:"badge"},n),R().createElement("div",{className:"pane-scroll-shadow"})),R().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:b,ref:h},R().createElement("slot",null,R().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}f=J,({e:[l,s,h,p,b,v,m,E,w,n],c:[k,i]}=(0,O.c)(f,[[c,1,"titleLabel"],[r,1,"active"],[d,1,"badge"],[u,1,"activeChangeEvent",e=>(0,y.c)(e,j),(e,t)=>(0,N.c)(e,j,t)],[g,1,"activeFirstActivatedEvent",e=>(0,y.c)(e,G),(e,t)=>(0,N.c)(e,G,t)]],o,0,(e=>V.has((0,x.c)(e))),A.ReactNextElement)),i();var ee,te,ae,ne,ie,oe,ce,le=a(7392),re=a(3804),{defineElement:se,property:de}=(0,I.createDecorators)();ae=[se("visual-builder.workbench-sidebar",{styleTexts:[re.c]})],ne=de();var he=new WeakMap,ue=new WeakMap,pe=new WeakMap,be=new WeakMap;class ve extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,he,{writable:!0,value:(ee(this),ie(this))}),(0,L.c)(this,ue,{writable:!0,value:()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")}}),(0,L.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,L.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,he)}set titleLabel(e){(0,N.c)(this,he,e)}render(){return R().createElement(ge,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ge(e){var{titleLabel:t,refCallback:a}=e;return R().createElement("div",{className:"sidebar",ref:a},R().createElement("div",{className:"title-container"},R().createElement("div",{className:"title-label"},t),R().createElement("slot",{name:"titleToolbar"})),R().createElement("div",{className:"pane-container"},R().createElement("slot",null)))}oe=ve,({e:[ie,ee],c:[ce,te]}=(0,O.c)(oe,[[ne,1,"titleLabel"]],ae,0,void 0,A.ReactNextElement)),te();var me,Ee,we,fe,ke,Le,xe,Ne,ye,Oe,Me,Re,Ie,Ae,Te,Ce=a(3124),{defineElement:_e,property:De}=(0,I.createDecorators)(),Pe=(0,A.wrapBrick)("eo-link"),We=(0,A.wrapBrick)("eo-icon");we=[_e("visual-builder.workbench-action",{styleTexts:[Ce.c]})],fe=De({attribute:!1}),Le=De(),Ne=De({type:Boolean}),Oe=De(),Re=De();var Ue=new WeakMap,Fe=new WeakMap,Se=new WeakMap,Be=new WeakMap,Ke=new WeakMap;class je extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,Ue,{writable:!0,value:(me(this),ke(this))}),(0,L.c)(this,Fe,{writable:!0,value:xe(this)}),(0,L.c)(this,Se,{writable:!0,value:ye(this)}),(0,L.c)(this,Be,{writable:!0,value:Me(this)}),(0,L.c)(this,Ke,{writable:!0,value:Ie(this)})}get icon(){return(0,y.c)(this,Ue)}set icon(e){(0,N.c)(this,Ue,e)}get to(){return(0,y.c)(this,Fe)}set to(e){(0,N.c)(this,Fe,e)}get active(){return(0,y.c)(this,Se)}set active(e){(0,N.c)(this,Se,e)}get href(){return(0,y.c)(this,Be)}set href(e){(0,N.c)(this,Be,e)}get target(){return(0,y.c)(this,Ke)}set target(e){(0,N.c)(this,Ke,e)}render(){return R().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 R().createElement(Pe,{className:D()("action",{active:n}),url:a,href:i,target:o},R().createElement(We,t))}Ae=je,({e:[ke,xe,ye,Me,Ie,me],c:[Te,Ee]}=(0,O.c)(Ae,[[fe,1,"icon"],[Le,1,"to"],[Ne,1,"active"],[Oe,1,"href"],[Re,1,"target"]],we,0,void 0,A.ReactNextElement)),Ee();var Ye=a(5268),Ge=a(80);function He(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=He(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,Ge.parsePath)(e.to),i=n.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,Ye.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=Ve(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,Ge.parsePath)(c)),(o=!!(0,Ye.matchPath)(t,{path:s?r.pathname:c,exact:!0}))&&null!==(l=r)&&void 0!==l&&l.search&&(o=Ve(a,r.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var d of e.activeExcludes)if(!(o=!(0,Ye.matchPath)(t,{path:d,exact:!0})))break;return o}(e,t,a)){i.push(String(e.key));for(var s=e.key.split("."),d=0;d<s.length;d++)c.push(s.slice(0,d+1).join("."))}l+=1})),i.length&&""!==n&&o.push(n),{selectedKeys:i,openedKeys:o,matchedKeys:c}}function Ve(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 Je,Xe,qe,$e,Qe,Ze,et,tt,at,nt=a(3504),it=(0,A.wrapBrick)("visual-builder.workbench-action"),{defineElement:ot,property:ct}=(0,I.createDecorators)();qe=[ot("visual-builder.workbench-action-list",{styleTexts:[nt.c]})],$e=ct(),Ze=ct({attribute:!1});var lt,rt=new WeakMap,st=new WeakMap;class dt extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,rt,{writable:!0,value:(Je(this),Qe(this))}),(0,L.c)(this,st,{writable:!0,value:et(this)})}get appId(){return(0,y.c)(this,rt)}set appId(e){(0,N.c)(this,rt,e)}get menu(){return(0,y.c)(this,st)}set menu(e){(0,N.c)(this,st,e)}render(){return R().createElement(ut,{appId:this.appId,menu:this.menu})}}tt=dt,({e:[Qe,et,Je],c:[at,Xe]}=(0,O.c)(tt,[[$e,1,"appId"],[Ze,1,"menu"]],qe,0,void 0,A.ReactNextElement)),Xe();var ht=new Map;function ut(e){var t,{appId:a,menu:n}=e,i=(0,Ye.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&&(ht.clear(),lt=a)}),[a]),(0,M.useEffect)((()=>{var e,{pathname:t,search:a}=l,{selectedKeys:i}=He(null!==(e=null==n?void 0:n.menuItems)&&void 0!==e?e:[],t,a,"");c(Number(i[0]))}),[n,l]),R().createElement("div",{className:"workBenchActionList"},null==n||null===(t=n.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){var a=e.to;return o!==t&&ht.has(t)&&(a=ht.get(t)),R().createElement(it,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||ht.set(o,"".concat(l.pathname).concat(l.search))})(e)})}})).filter(Boolean))}var pt,bt,vt,gt,mt,Et,wt,ft,kt,Lt,xt,Nt,yt,Ot,Mt,Rt,It,At,Tt,Ct,_t,Dt,Pt,Wt,Ut,Ft,St,Bt,Kt,jt,zt,Yt,Gt,Ht,Vt,Jt,Xt,qt,$t,Qt,Zt,ea,ta,aa,na,ia,oa,ca,la,ra,sa,da,ha,ua,pa,ba,va,ga,ma,Ea,wa=a(9604),fa=a(8080),ka=a(3676),La=a(5127),xa=a(6184),Na=a(5244),ya=a(5080);function Oa(e){return e.key}a(48);var Ma,{defineElement:Ra,property:Ia,event:Aa}=(0,I.createDecorators)();vt=[Ra("visual-builder.workbench-tree",{styleTexts:[Na.c,ya.c]})],gt=Ia({attribute:!1}),Et=Ia({attribute:!1}),ft=Ia({type:Boolean}),Lt=Ia(),Nt=Ia({type:Boolean}),Ot=Ia(),Rt=Ia({type:Boolean}),At=Ia({attribute:!1}),Ct=Ia({type:Boolean}),Dt=Ia({attribute:!1}),Wt=Ia({attribute:!1}),Ft=Ia({type:Boolean}),Bt=Ia({attribute:!1}),jt=Ia({type:Boolean}),Yt=Ia({type:Boolean}),Ht=Ia({type:Boolean}),Jt=Ia({type:String}),qt=Ia({type:Boolean}),Qt=Aa({type:"action.click"}),aa=Aa({type:"node.click"}),ca=Aa({type:"node.drop"}),da=Aa({type:"context.menu"}),ba=Aa({type:"node.toggle"});var Ta=new WeakMap,Ca=new WeakMap,_a=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Wa=new WeakMap,Ua=new WeakMap,Fa=new WeakMap,Sa=new WeakMap,Ba=new WeakMap,Ka=new WeakMap,ja=new WeakMap,za=new WeakMap,Ya=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ja=new WeakMap,Xa=new WeakMap,qa=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,dn=new WeakMap;class hn extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,sn,{get:kn,set:fn}),(0,L.c)(this,cn,{get:wn,set:En}),(0,L.c)(this,an,{get:mn,set:gn}),(0,L.c)(this,Za,{get:vn,set:bn}),(0,L.c)(this,qa,{get:pn,set:un}),(0,L.c)(this,Ta,{writable:!0,value:(pt(this),mt(this))}),(0,L.c)(this,Ca,{writable:!0,value:wt(this)}),(0,L.c)(this,_a,{writable:!0,value:kt(this)}),(0,L.c)(this,Da,{writable:!0,value:xt(this)}),(0,L.c)(this,Pa,{writable:!0,value:yt(this)}),(0,L.c)(this,Wa,{writable:!0,value:Mt(this)}),(0,L.c)(this,Ua,{writable:!0,value:It(this)}),(0,L.c)(this,Fa,{writable:!0,value:Tt(this)}),(0,L.c)(this,Sa,{writable:!0,value:_t(this)}),(0,L.c)(this,Ba,{writable:!0,value:Pt(this)}),(0,L.c)(this,Ka,{writable:!0,value:Ut(this)}),(0,L.c)(this,ja,{writable:!0,value:St(this)}),(0,L.c)(this,za,{writable:!0,value:Kt(this)}),(0,L.c)(this,Ya,{writable:!0,value:zt(this)}),(0,L.c)(this,Ga,{writable:!0,value:Gt(this)}),(0,L.c)(this,Ha,{writable:!0,value:Vt(this)}),(0,L.c)(this,Va,{writable:!0,value:Xt(this)}),(0,L.c)(this,Ja,{writable:!0,value:$t(this)}),(0,L.c)(this,Xa,{writable:!0,value:Zt(this)}),(0,L.c)(this,$a,{writable:!0,value:e=>{(0,y.c)(this,qa).emit(e)}}),(0,L.c)(this,Qa,{writable:!0,value:na(this)}),(0,L.c)(this,en,{writable:!0,value:e=>()=>{(0,y.c)(this,Za).emit(e.data)}}),(0,L.c)(this,tn,{writable:!0,value:la(this)}),(0,L.c)(this,nn,{writable:!0,value:e=>{(0,y.c)(this,an).emit(e)}}),(0,L.c)(this,on,{writable:!0,value:ha(this)}),(0,L.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,L.c)(this,rn,{writable:!0,value:va(this)}),(0,L.c)(this,dn,{writable:!0,value:(e,t)=>{(0,y.c)(this,sn).emit({nodeId:e,collapsed:t})}})}get nodes(){return(0,y.c)(this,Ta)}set nodes(e){(0,N.c)(this,Ta,e)}get actions(){return(0,y.c)(this,Ca)}set actions(e){(0,N.c)(this,Ca,e)}get actionsHidden(){return(0,y.c)(this,_a)}set actionsHidden(e){(0,N.c)(this,_a,e)}get placeholder(){return(0,y.c)(this,Da)}set placeholder(e){(0,N.c)(this,Da,e)}get isTransformName(){return(0,y.c)(this,Pa)}set isTransformName(e){(0,N.c)(this,Pa,e)}get searchPlaceholder(){return(0,y.c)(this,Wa)}set searchPlaceholder(e){(0,N.c)(this,Wa,e)}get noSearch(){return(0,y.c)(this,Ua)}set noSearch(e){(0,N.c)(this,Ua,e)}get activeKey(){return(0,y.c)(this,Fa)}set activeKey(e){(0,N.c)(this,Fa,e)}get showMatchedNodeOnly(){return(0,y.c)(this,Sa)}set showMatchedNodeOnly(e){(0,N.c)(this,Sa,e)}get matchNodeDataFields(){return(0,y.c)(this,Ba)}set matchNodeDataFields(e){(0,N.c)(this,Ba,e)}get fixedActionsFor(){return(0,y.c)(this,Ka)}set fixedActionsFor(e){(0,N.c)(this,Ka,e)}get collapsible(){return(0,y.c)(this,ja)}set collapsible(e){(0,N.c)(this,ja,e)}get collapsedNodes(){return(0,y.c)(this,za)}set collapsedNodes(e){(0,N.c)(this,za,e)}get allowDrag(){return(0,y.c)(this,Ya)}set allowDrag(e){(0,N.c)(this,Ya,e)}get allowDragToRoot(){return(0,y.c)(this,Ga)}set allowDragToRoot(e){(0,N.c)(this,Ga,e)}get allowDragToInside(){return(0,y.c)(this,Ha)}set allowDragToInside(e){(0,N.c)(this,Ha,e)}get nodeKey(){return(0,y.c)(this,Va)}set nodeKey(e){(0,N.c)(this,Va,e)}get skipNotify(){return(0,y.c)(this,Ja)}set skipNotify(e){(0,N.c)(this,Ja,e)}render(){return R().createElement(fa.O.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,y.c)(this,$a)}},R().createElement(La.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,dn),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,wa.pick)(e.data,this.matchNodeDataFields),t)}}},R().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 gn(e){sa(this,e)}function mn(){return ra(this)}function En(e){pa(this,e)}function wn(){return ua(this)}function fn(e){ma(this,e)}function kn(){return ga(this)}Ea=hn,({e:[mt,wt,kt,xt,yt,Mt,It,Tt,_t,Pt,Ut,St,Kt,zt,Gt,Vt,Xt,$t,Zt,ea,ta,na,ia,oa,la,ra,sa,ha,ua,pa,va,ga,ma,pt],c:[Ma,bt]}=(0,O.c)(Ea,[[gt,1,"nodes"],[Et,1,"actions"],[ft,1,"actionsHidden"],[Lt,1,"placeholder"],[Nt,1,"isTransformName"],[Ot,1,"searchPlaceholder"],[Rt,1,"noSearch"],[At,1,"activeKey"],[Ct,1,"showMatchedNodeOnly"],[Dt,1,"matchNodeDataFields"],[Wt,1,"fixedActionsFor"],[Ft,1,"collapsible"],[Bt,1,"collapsedNodes"],[jt,1,"allowDrag"],[Yt,1,"allowDragToRoot"],[Ht,1,"allowDragToInside"],[Jt,1,"nodeKey"],[qt,1,"skipNotify"],[Qt,1,"actionClickEvent",e=>(0,y.c)(e,Xa),(e,t)=>(0,N.c)(e,Xa,t)],[aa,1,"nodeClickEvent",e=>(0,y.c)(e,Qa),(e,t)=>(0,N.c)(e,Qa,t)],[ca,1,"nodeDropEvent",e=>(0,y.c)(e,tn),(e,t)=>(0,N.c)(e,tn,t)],[da,1,"nodeContextMenuEvent",e=>(0,y.c)(e,on),(e,t)=>(0,N.c)(e,on,t)],[ba,1,"nodeToggleEvent",e=>(0,y.c)(e,rn),(e,t)=>(0,N.c)(e,rn,t)]],vt,0,(e=>dn.has((0,x.c)(e))),A.ReactNextElement)),bt();var Ln=a(4516),xn=a(4724);a(8172),customElements.define("visual-builder.inject-preview-agent",(0,Ln.createProviderClass)((function(e,t){return(0,xn.c)(e,t)})));var Nn,yn,On,Mn,Rn,In,An,Tn,Cn,_n,Dn,Pn,Wn,Un,Fn,Sn,Bn,Kn,jn,zn,Yn=a(4412),Gn=a(6008),Hn=a.n(Gn),Vn=a(5544),Jn=a(4432),Xn=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}({}),qn="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,Yn.c)((0,Yn.c)({},a),{},{params:t}))).data}));return function(t,a,n){return e.apply(this,arguments)}}(),ei=a(2204),ti={add:"".concat(qn,":").concat(Xn.ADD),edit:"".concat(qn,":").concat(Xn.EDIT),delete:"".concat(qn,":").concat(Xn.DELETE),batch_delete:"".concat(qn,":").concat(Xn.DELETE),import:"".concat(qn,":").concat(Xn.IMPORT),clone:"".concat(qn,":").concat(Xn.CLONE),append_relation:"".concat(qn,":").concat(Xn.APPEND_RELATION),update_relation:"".concat(qn,":").concat(Xn.UPDATE_RELATION),remove_relation:"".concat(qn,":").concat(Xn.REMOVE_RELATION),rollback:"".concat(qn,":").concat(Xn.ROLLBACK),rollback_all:"".concat(qn,":").concat(Xn.ROLLBACK_ALL)},ai={add:"".concat(qn,":").concat(Xn.ADD_FULL),edit:"".concat(qn,":").concat(Xn.EDIT_FULL),delete:"".concat(qn,":").concat(Xn.DELETE_FULL),batch_delete:"".concat(qn,":").concat(Xn.DELETE_FULL),import:"".concat(qn,":").concat(Xn.IMPORT_FULL),clone:"".concat(qn,":").concat(Xn.CLONE_FULL),append_relation:"".concat(qn,":").concat(Xn.APPEND_RELATION_FULL),update_relation:"".concat(qn,":").concat(Xn.UPDATE_RELATION_FULL),remove_relation:"".concat(qn,":").concat(Xn.REMOVE_RELATION_FULL),rollback:"".concat(qn,":").concat(Xn.ROLLBACK_FULL),rollback_all:"".concat(qn,":").concat(Xn.ROLLBACK_ALL_FULL)},ni={project:"".concat(qn,":").concat(Xn.PROJECT),userGroup:"".concat(qn,":").concat(Xn.USER),permission:"".concat(qn,":").concat(Xn.PERMISSION),brick:"".concat(qn,":").concat(Xn.BRICK),route:"".concat(qn,":").concat(Xn.ROUTE),template:"".concat(qn,":").concat(Xn.TEMPLATE),snippet:"".concat(qn,":").concat(Xn.SNIPPET),i18n:"".concat(qn,":").concat(Xn.I18N),image:"".concat(qn,":").concat(Xn.IMAGE),function:"".concat(qn,":").concat(Xn.FUNCTION),menu:"".concat(qn,":").concat(Xn.MENU),menuItem:"".concat(qn,":").concat(Xn.MENU_ITEM),workflow:"".concat(qn,":").concat(Xn.WORKFLOW)},ii={PROJECT_MICRO_APP:"".concat(qn,":").concat(Xn.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(qn,":").concat(Xn.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(qn,":").concat(Xn.PERMISSION),STORYBOARD_BRICK:"".concat(qn,":").concat(Xn.BRICK),STORYBOARD_ROUTE:"".concat(qn,":").concat(Xn.ROUTE),STORYBOARD_TEMPLATE:"".concat(qn,":").concat(Xn.TEMPLATE),STORYBOARD_SNIPPET:"".concat(qn,":").concat(Xn.SNIPPET),STORYBOARD_I18N:"".concat(qn,":").concat(Xn.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(qn,":").concat(Xn.IMAGE),STORYBOARD_FUNCTION:"".concat(qn,":").concat(Xn.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(qn,":").concat(Xn.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(qn,":").concat(Xn.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(qn,":").concat(Xn.WORKFLOW)};function oi(e){var t,a,n,i,o,c,l,r,s,d,h,u,p,b,v,g,m,E="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",w=ei.i18n.t(null!==(t=ni[e.category])&&void 0!==t?t:e.category),f=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),L=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===(d=e.abstract)||void 0===d?void 0:d.nodesCount),N=ci(null===(h=e.abstract)||void 0===h?void 0:h.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:w,action:f,leftObjectId:k,rightObjectId:L,nodes:x,leftNodes:N,rightNodes:y,abstract:ei.i18n.t(null!==(v=ai[E])&&void 0!==v?v:E,{category:w,nodes:x,leftNodes:N,rightNodes:y,nodeChanges:null===(g=e.abstract)||void 0===g||null===(g=g.nodeChanges)||void 0===g?void 0:g.join(", "),relationChanges:null===(m=e.abstract)||void 0===m||null===(m=m.relationChanges)||void 0===m?void 0:m.join(", "),leftObjectId:k,rightObjectId:L,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(qn,":").concat(Xn.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,Jn.initializeReactI18n)(qn,{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:di}=(0,I.createDecorators)(),hi=(0,A.wrapBrick)("eo-button"),ui=(0,A.wrapBrick)("eo-link"),pi=(0,A.wrapBrick)("eo-icon"),bi=(0,A.wrapBrick)("eo-easyops-avatar"),vi=(0,A.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});On=[ri("visual-builder.workbench-history-action",{styleTexts:[Vn.c]})],Mn=si(),In=si(),Tn=di({type:"history.item.click"}),Pn=di({type:"rollback"}),Sn=di({type:"rollback.all"});var gi=new WeakMap,mi=new WeakMap,Ei=new WeakMap,wi=new WeakMap,fi=new WeakMap,ki=new WeakMap,Li=new WeakMap,xi=new WeakMap,Ni=new WeakMap,yi=new WeakMap,Oi=new WeakMap;class Mi extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,yi,{get:_i,set:Ci}),(0,L.c)(this,Li,{get:Ti,set:Ai}),(0,L.c)(this,wi,{get:Ii,set:Ri}),(0,L.c)(this,gi,{writable:!0,value:(Nn(this),Rn(this))}),(0,L.c)(this,mi,{writable:!0,value:An(this)}),(0,L.c)(this,Ei,{writable:!0,value:Cn(this)}),(0,L.c)(this,fi,{writable:!0,value:e=>{(0,y.c)(this,wi).emit(e)}}),(0,L.c)(this,ki,{writable:!0,value:Wn(this)}),(0,L.c)(this,xi,{writable:!0,value:e=>{(0,y.c)(this,Li).emit(e)}}),(0,L.c)(this,Ni,{writable:!0,value:Bn(this)}),(0,L.c)(this,Oi,{writable:!0,value:()=>{(0,y.c)(this,yi).emit()}})}get appId(){return(0,y.c)(this,gi)}set appId(e){(0,N.c)(this,gi,e)}get projectId(){return(0,y.c)(this,mi)}set projectId(e){(0,N.c)(this,mi,e)}render(){return R().createElement(Di,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,y.c)(this,fi),onRollback:(0,y.c)(this,xi),onRollbackAll:(0,y.c)(this,Oi)})}}function Ri(e){Dn(this,e)}function Ii(){return _n(this)}function Ai(e){Fn(this,e)}function Ti(){return Un(this)}function Ci(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,Jn.useTranslation)(qn),[c,l]=(0,M.useState)(!1),[r,s]=(0,M.useState)(!0),[d,h]=(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,Yn.c)((0,Yn.c)({},e),{},{translation:oi(e)})));return e?n:a.concat(n)})),b.current=t.ts,h(t.list.length<20),s(t.list.length<20)})).catch((e=>{(0,Ye.handleHttpError)(e)})).finally((()=>{l(!1)}))};return R().createElement(vi,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(s(!0),h(!1),p([]),b.current="",v(!0))}},R().createElement(hi,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),R().createElement("div",null,R().createElement("div",{className:"history-title"},"History"),R().createElement("div",{className:"history-list"},u.length?R().createElement(R().Fragment,null,u.map(((e,t)=>R().createElement(Pi,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:a,onRollback:n}))),!r&&R().createElement("span",{className:"load-more-container"},R().createElement(ui,{className:"load-more",disabled:c,onClick:()=>v()},o(Xn.LOAD_MORE))),d&&R().createElement("span",{className:"end-container"},"The End",R().createElement(pi,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):R().createElement("div",{className:"empty"},o(c?Xn.LOADING:Xn.NO_DATA))),R().createElement("slot",null)))}function Pi(e){var{data:t,enableRollback:a,current:n,onHistoryItemClick:i,onRollback:o}=e,c=Hn()(Number(t.ts)/1e6),l=Hn().duration(c.diff(Hn()())),r=l.days()<=-1?c.format("YYYY-MM-DD HH:mm:ss"):l.humanize(!0,{ss:0,s:60,m:60,h:24});return R().createElement("div",{className:"item-container"},R().createElement("div",{className:"item-title"},R().createElement("div",{className:"title-left",onClick:()=>i((0,Yn.c)((0,Yn.c)({},t),{},{enableRollback:a}))},R().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),n&&R().createElement("div",{className:"branch"},"(current)")),R().createElement("div",{className:"title-right"},a&&R().createElement(pi,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),R().createElement("div",{className:"item-info"},R().createElement(bi,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),R().createElement("div",{className:"time"},r),R().createElement("div",{className:"operator"},t.user)))}zn=Mi,({e:[Rn,An,Cn,_n,Dn,Wn,Un,Fn,Bn,Kn,jn,Nn],c:[li,yn]}=(0,O.c)(zn,[[Mn,1,"appId"],[In,1,"projectId"],[Tn,1,"historyItemClickEvent",e=>(0,y.c)(e,Ei),(e,t)=>(0,N.c)(e,Ei,t)],[Pn,1,"rollbackEvent",e=>(0,y.c)(e,ki),(e,t)=>(0,N.c)(e,ki,t)],[Sn,1,"rollbackAllEvent",e=>(0,y.c)(e,Ni),(e,t)=>(0,N.c)(e,Ni,t)]],On,0,(e=>Oi.has((0,x.c)(e))),A.ReactNextElement)),yn();var Wi,Ui,Fi,Si,Bi,Ki,ji,zi,Yi,Gi,Hi,Vi,Ji,Xi,qi,$i,Qi,Zi,eo,to,ao,no,io,oo,co,lo,ro,so,ho,uo,po,bo,vo,go,mo,Eo,wo,fo,ko,Lo,xo,No,yo,Oo,Mo,Ro,Io,Ao,To,Co,_o,Do,Po,Wo,Uo,Fo,So,Bo=a(8904),{defineElement:Ko,property:jo,event:zo}=(0,I.createDecorators)(),Yo=(0,A.wrapBrick)("eo-icon"),Go=(0,A.wrapBrick)("eo-tooltip"),Ho=new Set;Fi=[Ko("visual-builder.page-arch-node",{styleTexts:[Bo.c]})],Si=jo(),Ki=jo(),zi=jo({attribute:!1}),Gi=jo({attribute:!1}),Vi=jo({type:Boolean,render:!1}),Xi=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"}),Lo=zo({type:"child.append"}),Oo=zo({type:"external.click"}),Ao=zo({type:"subNode.dblclick"}),Do=zo({type:"subNode.contextmenu"});var Vo=new WeakMap,Jo=new WeakMap,Xo=new WeakMap,qo=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,dc=new WeakMap,hc=new WeakMap,uc=new WeakMap,pc=new WeakMap,bc=new WeakMap,vc=new WeakMap,gc=new WeakMap,mc=new WeakMap,Ec=new WeakMap,wc=new WeakMap,fc=new WeakMap,kc=new WeakMap,Lc=new WeakMap,xc=new WeakMap,Nc=new WeakMap,yc=new WeakMap,Oc=new WeakMap,Mc=new WeakMap;class Rc extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,Oc,{get:Hc,set:Gc}),(0,L.c)(this,xc,{get:Yc,set:zc}),(0,L.c)(this,fc,{get:jc,set:Kc}),(0,L.c)(this,mc,{get:Bc,set:Sc}),(0,L.c)(this,bc,{get:Fc,set:Uc}),(0,L.c)(this,hc,{get:Wc,set:Pc}),(0,L.c)(this,rc,{get:Dc,set:_c}),(0,L.c)(this,oc,{get:Cc,set:Tc}),(0,L.c)(this,ac,{get:Ac,set:Ic}),(0,L.c)(this,Vo,{writable:!0,value:(Wi(this),Bi(this))}),(0,L.c)(this,Jo,{writable:!0,value:ji(this)}),(0,L.c)(this,Xo,{writable:!0,value:Yi(this)}),(0,L.c)(this,qo,{writable:!0,value:Hi(this)}),(0,L.c)(this,$o,{writable:!0,value:Ji(this)}),(0,L.c)(this,Qo,{writable:!0,value:qi(this)}),(0,L.c)(this,Zo,{writable:!0,value:Qi(this)}),(0,L.c)(this,ec,{writable:!0,value:eo(this)}),(0,L.c)(this,tc,{writable:!0,value:ao(this)}),(0,L.c)(this,nc,{writable:!0,value:e=>{(0,y.c)(this,ac).emit(e)}}),(0,L.c)(this,ic,{writable:!0,value:co(this)}),(0,L.c)(this,cc,{writable:!0,value:e=>{(0,y.c)(this,oc).emit(e)}}),(0,L.c)(this,lc,{writable:!0,value:ho(this)}),(0,L.c)(this,sc,{writable:!0,value:()=>{(0,y.c)(this,rc).emit()}}),(0,L.c)(this,dc,{writable:!0,value:vo(this)}),(0,L.c)(this,uc,{writable:!0,value:()=>{(0,y.c)(this,hc).emit()}}),(0,L.c)(this,pc,{writable:!0,value:wo(this)}),(0,L.c)(this,vc,{writable:!0,value:e=>{(0,y.c)(this,bc).emit(e)}}),(0,L.c)(this,gc,{writable:!0,value:xo(this)}),(0,L.c)(this,Ec,{writable:!0,value:()=>{(0,y.c)(this,mc).emit()}}),(0,L.c)(this,wc,{writable:!0,value:Mo(this)}),(0,L.c)(this,kc,{writable:!0,value:e=>{(0,y.c)(this,fc).emit(e)}}),(0,L.c)(this,Lc,{writable:!0,value:To(this)}),(0,L.c)(this,Nc,{writable:!0,value:e=>{(0,y.c)(this,xc).emit(e)}}),(0,L.c)(this,yc,{writable:!0,value:Po(this)}),(0,L.c)(this,Mc,{writable:!0,value:e=>{(0,y.c)(this,Oc).emit(e)}})}get label(){return(0,y.c)(this,Vo)}set label(e){(0,N.c)(this,Vo,e)}get type(){return(0,y.c)(this,Jo)}set type(e){(0,N.c)(this,Jo,e)}get external(){return(0,y.c)(this,Xo)}set external(e){(0,N.c)(this,Xo,e)}get subNodes(){return(0,y.c)(this,qo)}set subNodes(e){(0,N.c)(this,qo,e)}get active(){return(0,y.c)(this,$o)}set active(e){(0,N.c)(this,$o,e)}get notSynced(){return(0,y.c)(this,Qo)}set notSynced(e){(0,N.c)(this,Qo,e)}get disableChildAppend(){return(0,y.c)(this,Zo)}set disableChildAppend(e){(0,N.c)(this,Zo,e)}get autoFocusOnce(){return(0,y.c)(this,ec)}set autoFocusOnce(e){(0,N.c)(this,ec,e)}render(){return R().createElement(Vc,{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,Nc),onSubNodeContextMenu:(0,y.c)(this,Mc)})}}function Ic(e){io(this,e)}function Ac(){return no(this)}function Tc(e){ro(this,e)}function Cc(){return lo(this)}function _c(e){po(this,e)}function Dc(){return uo(this)}function Pc(e){mo(this,e)}function Wc(){return go(this)}function Uc(e){ko(this,e)}function Fc(){return fo(this)}function Sc(e){yo(this,e)}function Bc(){return No(this)}function Kc(e){Io(this,e)}function jc(){return Ro(this)}function zc(e){_o(this,e)}function Yc(){return Co(this)}function Gc(e){Uo(this,e)}function Hc(){return Wo(this)}function Vc(e){var t,{label:a,type:n,external:i,subNodes:o,autoFocusOnce:c,onLabelEditingChange:l,onLabelChange:r,onNodeClick:s,onNodeDoubleClick:d,onNodeContextMenu:h,onChildAppend:u,onExternalClick:p,onSubNodeDoubleClick:b,onSubNodeContextMenu:v}=e,g="board"===n?"board":"page",[m,E]=(0,M.useState)(a),[w,f]=(0,M.useState)(!1),k=(0,M.useRef)(!1),[L,x]=(0,M.useState)(!1),N=(0,M.useRef)(null);(0,M.useEffect)((()=>{E(a)}),[a]);var y=(0,M.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),f(!0)}),[]);(0,M.useEffect)((()=>{c&&!Ho.has(c)&&(Ho.add(c),setTimeout((()=>{f(!0)}),1))}),[c]),(0,M.useEffect)((()=>{var e,t;w&&(null===(e=N.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=N.current)||void 0===t||t.select())}),[w]),(0,M.useEffect)((()=>{k.current?null==l||l(w):k.current=!0}),[w,l]);var O=(0,M.useCallback)((e=>{E(e.target.value)}),[]),I=(0,M.useCallback)((e=>{var t,a=e.key||e.keyCode||e.which;"Enter"!==a&&13!==a||null===(t=N.current)||void 0===t||t.blur()}),[]),A=(0,M.useCallback)((()=>{f(!1),x(!0)}),[]);(0,M.useEffect)((()=>{L&&(null==r||r(m),x(!1))}),[m,r,L]);var T=(0,M.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),C=(0,M.useCallback)((e=>{e.stopPropagation(),null==p||p(i)}),[i,p]),_=(0,M.useCallback)((e=>{e.stopPropagation()}),[]),P=38*Math.max(0,Math.floor((null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)-3));return R().createElement(R().Fragment,null,R().createElement("div",{className:D()("node",g,{"editing-label":w}),style:{height:"board"===g?70:130+P},onClick:s,onDoubleClick:d,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==h||h({clientX:e.clientX,clientY:e.clientY})}},R().createElement("input",{className:"label-input",value:m,ref:N,onChange:O,onKeyDown:I,onBlur:A,onDoubleClick:_,onContextMenu:_,onMouseDown:_}),R().createElement("div",{className:"label",onDoubleClick:y,onMouseDown:_},m),"board"===g?R().createElement("div",{className:"icon-container"},R().createElement(Yo,{lib:"antd",icon:"unordered-list"})):R().createElement("div",{className:"thumbnail-container",style:{height:98+P}},R().createElement("div",{className:"thumbnail-placeholder"},R().createElement(Yo,{lib:"antd",icon:"ellipsis"})),i&&R().createElement("div",{className:"external",onClick:C,onDoubleClick:_,onMouseDown:_},R().createElement(Yo,{lib:"antd",icon:"desktop"}),R().createElement("span",{className:"external-label"},i.label)),null!=o&&o.length?R().createElement("div",{className:"sub-nodes"},o.map((e=>R().createElement(Jc,{key:e.id,subNode:e,onSubNodeDoubleClick:b,onSubNodeContextMenu:v})))):null)),R().createElement("div",{className:"add-button",role:"button",onClick:T,onMouseDown:_},R().createElement(Yo,{lib:"fa",icon:"plus"})))}function Jc(e){var{subNode:t,onSubNodeDoubleClick:a,onSubNodeContextMenu:n}=e;return R().createElement(Go,{key:t.id,content:t.label},R().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==a||a(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==n||n({node:t,clientX:e.clientX,clientY:e.clientY})}},R().createElement("div",{className:"sub-node-skeleton-title"}),R().createElement("div",{className:"sub-node-skeleton-content"}),R().createElement("div",{className:"sub-node-skeleton-button"})))}Fo=Rc,({e:[Bi,ji,Yi,Hi,Ji,qi,Qi,eo,ao,no,io,co,lo,ro,ho,uo,po,vo,go,mo,wo,fo,ko,xo,No,yo,Mo,Ro,Io,To,Co,_o,Po,Wo,Uo,Wi],c:[So,Ui]}=(0,O.c)(Fo,[[Si,1,"label"],[Ki,1,"type"],[zi,1,"external"],[Gi,1,"subNodes"],[Vi,1,"active"],[Xi,1,"notSynced"],[$i,1,"disableChildAppend"],[Zi,1,"autoFocusOnce"],[to,1,"labelEditingChange",e=>(0,y.c)(e,tc),(e,t)=>(0,N.c)(e,tc,t)],[oo,1,"labelChange",e=>(0,y.c)(e,ic),(e,t)=>(0,N.c)(e,ic,t)],[so,1,"nodeClick",e=>(0,y.c)(e,lc),(e,t)=>(0,N.c)(e,lc,t)],[bo,1,"nodeDoubleClick",e=>(0,y.c)(e,dc),(e,t)=>(0,N.c)(e,dc,t)],[Eo,1,"nodeContextMenu",e=>(0,y.c)(e,pc),(e,t)=>(0,N.c)(e,pc,t)],[Lo,1,"childAppend",e=>(0,y.c)(e,gc),(e,t)=>(0,N.c)(e,gc,t)],[Oo,1,"externalClick",e=>(0,y.c)(e,wc),(e,t)=>(0,N.c)(e,wc,t)],[Ao,1,"subNodeDoubleClick",e=>(0,y.c)(e,Lc),(e,t)=>(0,N.c)(e,Lc,t)],[Do,1,"subNodeContextMenu",e=>(0,y.c)(e,yc),(e,t)=>(0,N.c)(e,yc,t)]],Fi,0,(e=>Mc.has((0,x.c)(e))),A.ReactNextElement)),Ui()},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=1876.
|
|
1
|
+
/*! For license information please see 1876.3eb6dfd2.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[1876],{1876:(e,t,a)=>{a.r(t);var n,i,o,c,l,r,s,d,h,u,p,b,v,g,m,E,w,f,k,L=a(2504),x=a(592),N=a(5866),y=a(1412),O=a(8644),M=a(5600),R=a.n(M),I=a(7672),A=a(8160),T=a(9124),C=a(8808),_=a(6484),D=a.n(_),P=(0,A.wrapBrick)("icons.general-icon"),{defineElement:W,property:U,event:F}=(0,I.createDecorators)();o=[W("visual-builder.workbench-pane",{styleTexts:[T.c,C.c]})],c=U(),r=U({type:Boolean}),d=U({type:Number}),u=F({type:"active.change"}),g=F({type:"active.firstActivated"});var S=new WeakMap,B=new WeakMap,K=new WeakMap,j=new WeakMap,z=new WeakMap,Y=new WeakMap,G=new WeakMap,H=new WeakMap,V=new WeakMap;class J extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,H,{get:Q,set:$}),(0,L.c)(this,z,{get:q,set:X}),(0,L.c)(this,S,{writable:!0,value:(n(this),l(this))}),(0,L.c)(this,B,{writable:!0,value:s(this)}),(0,L.c)(this,K,{writable:!0,value:h(this)}),(0,L.c)(this,j,{writable:!0,value:p(this)}),(0,L.c)(this,Y,{writable:!0,value:e=>{e!==this.active&&(this.active=e,(0,y.c)(this,z).emit(e))}}),(0,L.c)(this,G,{writable:!0,value:m(this)}),(0,L.c)(this,V,{writable:!0,value:()=>{(0,y.c)(this,H).emit()}})}get titleLabel(){return(0,y.c)(this,S)}set titleLabel(e){(0,N.c)(this,S,e)}get active(){return(0,y.c)(this,B)}set active(e){(0,N.c)(this,B,e)}get badge(){return(0,y.c)(this,K)}set badge(e){(0,N.c)(this,K,e)}render(){return R().createElement(Z,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,y.c)(this,Y),onFirstActivated:(0,y.c)(this,V)})}}function X(e){v(this,e)}function q(){return b(this)}function $(e){w(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 d=(0,M.useCallback)((()=>{l((e=>!e)),r||c||(s(!0),null==o||o())}),[r,c,o]),h=(0,M.useRef)(),[u,p]=(0,M.useState)(!1),b=(0,M.useMemo)((()=>{return e=()=>{p(h.current.scrollTop>0)},n=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t&&a(),t=requestAnimationFrame((()=>{e(...i)}))},n.cancel=a=()=>cancelAnimationFrame(t),n;var e,t,a,n}),[]);return R().createElement("div",{className:D()("pane",{scrolled:u})},R().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},R().createElement("div",{className:"pane-title"},R().createElement("span",{className:"title-icon"},c?R().createElement(P,{lib:"antd",theme:"outlined",icon:"down"}):R().createElement(P,{lib:"antd",theme:"outlined",icon:"right"})),R().createElement("div",{className:"title-label"},t),R().createElement("slot",{name:"title"})),R().createElement("slot",{name:"actions"}),n&&R().createElement("div",{className:"badge"},n),R().createElement("div",{className:"pane-scroll-shadow"})),R().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:b,ref:h},R().createElement("slot",null,R().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}f=J,({e:[l,s,h,p,b,v,m,E,w,n],c:[k,i]}=(0,O.c)(f,[[c,1,"titleLabel"],[r,1,"active"],[d,1,"badge"],[u,1,"activeChangeEvent",e=>(0,y.c)(e,j),(e,t)=>(0,N.c)(e,j,t)],[g,1,"activeFirstActivatedEvent",e=>(0,y.c)(e,G),(e,t)=>(0,N.c)(e,G,t)]],o,0,(e=>V.has((0,x.c)(e))),A.ReactNextElement)),i();var ee,te,ae,ne,ie,oe,ce,le=a(7392),re=a(3804),{defineElement:se,property:de}=(0,I.createDecorators)();ae=[se("visual-builder.workbench-sidebar",{styleTexts:[re.c]})],ne=de();var he=new WeakMap,ue=new WeakMap,pe=new WeakMap,be=new WeakMap;class ve extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,he,{writable:!0,value:(ee(this),ie(this))}),(0,L.c)(this,ue,{writable:!0,value:()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")}}),(0,L.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,L.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,he)}set titleLabel(e){(0,N.c)(this,he,e)}render(){return R().createElement(ge,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ge(e){var{titleLabel:t,refCallback:a}=e;return R().createElement("div",{className:"sidebar",ref:a},R().createElement("div",{className:"title-container"},R().createElement("div",{className:"title-label"},t),R().createElement("slot",{name:"titleToolbar"})),R().createElement("div",{className:"pane-container"},R().createElement("slot",null)))}oe=ve,({e:[ie,ee],c:[ce,te]}=(0,O.c)(oe,[[ne,1,"titleLabel"]],ae,0,void 0,A.ReactNextElement)),te();var me,Ee,we,fe,ke,Le,xe,Ne,ye,Oe,Me,Re,Ie,Ae,Te,Ce=a(3124),{defineElement:_e,property:De}=(0,I.createDecorators)(),Pe=(0,A.wrapBrick)("eo-link"),We=(0,A.wrapBrick)("eo-icon");we=[_e("visual-builder.workbench-action",{styleTexts:[Ce.c]})],fe=De({attribute:!1}),Le=De(),Ne=De({type:Boolean}),Oe=De(),Re=De();var Ue=new WeakMap,Fe=new WeakMap,Se=new WeakMap,Be=new WeakMap,Ke=new WeakMap;class je extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,Ue,{writable:!0,value:(me(this),ke(this))}),(0,L.c)(this,Fe,{writable:!0,value:xe(this)}),(0,L.c)(this,Se,{writable:!0,value:ye(this)}),(0,L.c)(this,Be,{writable:!0,value:Me(this)}),(0,L.c)(this,Ke,{writable:!0,value:Ie(this)})}get icon(){return(0,y.c)(this,Ue)}set icon(e){(0,N.c)(this,Ue,e)}get to(){return(0,y.c)(this,Fe)}set to(e){(0,N.c)(this,Fe,e)}get active(){return(0,y.c)(this,Se)}set active(e){(0,N.c)(this,Se,e)}get href(){return(0,y.c)(this,Be)}set href(e){(0,N.c)(this,Be,e)}get target(){return(0,y.c)(this,Ke)}set target(e){(0,N.c)(this,Ke,e)}render(){return R().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 R().createElement(Pe,{className:D()("action",{active:n}),url:a,href:i,target:o},R().createElement(We,t))}Ae=je,({e:[ke,xe,ye,Me,Ie,me],c:[Te,Ee]}=(0,O.c)(Ae,[[fe,1,"icon"],[Le,1,"to"],[Ne,1,"active"],[Oe,1,"href"],[Re,1,"target"]],we,0,void 0,A.ReactNextElement)),Ee();var Ye=a(6960),Ge=a(80);function He(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=He(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,Ge.parsePath)(e.to),i=n.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),o=!!(0,Ye.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=Ve(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,Ge.parsePath)(c)),(o=!!(0,Ye.matchPath)(t,{path:s?r.pathname:c,exact:!0}))&&null!==(l=r)&&void 0!==l&&l.search&&(o=Ve(a,r.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(var d of e.activeExcludes)if(!(o=!(0,Ye.matchPath)(t,{path:d,exact:!0})))break;return o}(e,t,a)){i.push(String(e.key));for(var s=e.key.split("."),d=0;d<s.length;d++)c.push(s.slice(0,d+1).join("."))}l+=1})),i.length&&""!==n&&o.push(n),{selectedKeys:i,openedKeys:o,matchedKeys:c}}function Ve(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 Je,Xe,qe,$e,Qe,Ze,et,tt,at,nt=a(3504),it=(0,A.wrapBrick)("visual-builder.workbench-action"),{defineElement:ot,property:ct}=(0,I.createDecorators)();qe=[ot("visual-builder.workbench-action-list",{styleTexts:[nt.c]})],$e=ct(),Ze=ct({attribute:!1});var lt,rt=new WeakMap,st=new WeakMap;class dt extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,rt,{writable:!0,value:(Je(this),Qe(this))}),(0,L.c)(this,st,{writable:!0,value:et(this)})}get appId(){return(0,y.c)(this,rt)}set appId(e){(0,N.c)(this,rt,e)}get menu(){return(0,y.c)(this,st)}set menu(e){(0,N.c)(this,st,e)}render(){return R().createElement(ut,{appId:this.appId,menu:this.menu})}}tt=dt,({e:[Qe,et,Je],c:[at,Xe]}=(0,O.c)(tt,[[$e,1,"appId"],[Ze,1,"menu"]],qe,0,void 0,A.ReactNextElement)),Xe();var ht=new Map;function ut(e){var t,{appId:a,menu:n}=e,i=(0,Ye.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&&(ht.clear(),lt=a)}),[a]),(0,M.useEffect)((()=>{var e,{pathname:t,search:a}=l,{selectedKeys:i}=He(null!==(e=null==n?void 0:n.menuItems)&&void 0!==e?e:[],t,a,"");c(Number(i[0]))}),[n,l]),R().createElement("div",{className:"workBenchActionList"},null==n||null===(t=n.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){var a=e.to;return o!==t&&ht.has(t)&&(a=ht.get(t)),R().createElement(it,{key:t,icon:e.icon,to:a,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||ht.set(o,"".concat(l.pathname).concat(l.search))})(e)})}})).filter(Boolean))}var pt,bt,vt,gt,mt,Et,wt,ft,kt,Lt,xt,Nt,yt,Ot,Mt,Rt,It,At,Tt,Ct,_t,Dt,Pt,Wt,Ut,Ft,St,Bt,Kt,jt,zt,Yt,Gt,Ht,Vt,Jt,Xt,qt,$t,Qt,Zt,ea,ta,aa,na,ia,oa,ca,la,ra,sa,da,ha,ua,pa,ba,va,ga,ma,Ea,wa=a(9604),fa=a(8080),ka=a(3676),La=a(5127),xa=a(6184),Na=a(5244),ya=a(5080);function Oa(e){return e.key}a(48);var Ma,{defineElement:Ra,property:Ia,event:Aa}=(0,I.createDecorators)();vt=[Ra("visual-builder.workbench-tree",{styleTexts:[Na.c,ya.c]})],gt=Ia({attribute:!1}),Et=Ia({attribute:!1}),ft=Ia({type:Boolean}),Lt=Ia(),Nt=Ia({type:Boolean}),Ot=Ia(),Rt=Ia({type:Boolean}),At=Ia({attribute:!1}),Ct=Ia({type:Boolean}),Dt=Ia({attribute:!1}),Wt=Ia({attribute:!1}),Ft=Ia({type:Boolean}),Bt=Ia({attribute:!1}),jt=Ia({type:Boolean}),Yt=Ia({type:Boolean}),Ht=Ia({type:Boolean}),Jt=Ia({type:String}),qt=Ia({type:Boolean}),Qt=Aa({type:"action.click"}),aa=Aa({type:"node.click"}),ca=Aa({type:"node.drop"}),da=Aa({type:"context.menu"}),ba=Aa({type:"node.toggle"});var Ta=new WeakMap,Ca=new WeakMap,_a=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Wa=new WeakMap,Ua=new WeakMap,Fa=new WeakMap,Sa=new WeakMap,Ba=new WeakMap,Ka=new WeakMap,ja=new WeakMap,za=new WeakMap,Ya=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ja=new WeakMap,Xa=new WeakMap,qa=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,dn=new WeakMap;class hn extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,sn,{get:kn,set:fn}),(0,L.c)(this,cn,{get:wn,set:En}),(0,L.c)(this,an,{get:mn,set:gn}),(0,L.c)(this,Za,{get:vn,set:bn}),(0,L.c)(this,qa,{get:pn,set:un}),(0,L.c)(this,Ta,{writable:!0,value:(pt(this),mt(this))}),(0,L.c)(this,Ca,{writable:!0,value:wt(this)}),(0,L.c)(this,_a,{writable:!0,value:kt(this)}),(0,L.c)(this,Da,{writable:!0,value:xt(this)}),(0,L.c)(this,Pa,{writable:!0,value:yt(this)}),(0,L.c)(this,Wa,{writable:!0,value:Mt(this)}),(0,L.c)(this,Ua,{writable:!0,value:It(this)}),(0,L.c)(this,Fa,{writable:!0,value:Tt(this)}),(0,L.c)(this,Sa,{writable:!0,value:_t(this)}),(0,L.c)(this,Ba,{writable:!0,value:Pt(this)}),(0,L.c)(this,Ka,{writable:!0,value:Ut(this)}),(0,L.c)(this,ja,{writable:!0,value:St(this)}),(0,L.c)(this,za,{writable:!0,value:Kt(this)}),(0,L.c)(this,Ya,{writable:!0,value:zt(this)}),(0,L.c)(this,Ga,{writable:!0,value:Gt(this)}),(0,L.c)(this,Ha,{writable:!0,value:Vt(this)}),(0,L.c)(this,Va,{writable:!0,value:Xt(this)}),(0,L.c)(this,Ja,{writable:!0,value:$t(this)}),(0,L.c)(this,Xa,{writable:!0,value:Zt(this)}),(0,L.c)(this,$a,{writable:!0,value:e=>{(0,y.c)(this,qa).emit(e)}}),(0,L.c)(this,Qa,{writable:!0,value:na(this)}),(0,L.c)(this,en,{writable:!0,value:e=>()=>{(0,y.c)(this,Za).emit(e.data)}}),(0,L.c)(this,tn,{writable:!0,value:la(this)}),(0,L.c)(this,nn,{writable:!0,value:e=>{(0,y.c)(this,an).emit(e)}}),(0,L.c)(this,on,{writable:!0,value:ha(this)}),(0,L.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,L.c)(this,rn,{writable:!0,value:va(this)}),(0,L.c)(this,dn,{writable:!0,value:(e,t)=>{(0,y.c)(this,sn).emit({nodeId:e,collapsed:t})}})}get nodes(){return(0,y.c)(this,Ta)}set nodes(e){(0,N.c)(this,Ta,e)}get actions(){return(0,y.c)(this,Ca)}set actions(e){(0,N.c)(this,Ca,e)}get actionsHidden(){return(0,y.c)(this,_a)}set actionsHidden(e){(0,N.c)(this,_a,e)}get placeholder(){return(0,y.c)(this,Da)}set placeholder(e){(0,N.c)(this,Da,e)}get isTransformName(){return(0,y.c)(this,Pa)}set isTransformName(e){(0,N.c)(this,Pa,e)}get searchPlaceholder(){return(0,y.c)(this,Wa)}set searchPlaceholder(e){(0,N.c)(this,Wa,e)}get noSearch(){return(0,y.c)(this,Ua)}set noSearch(e){(0,N.c)(this,Ua,e)}get activeKey(){return(0,y.c)(this,Fa)}set activeKey(e){(0,N.c)(this,Fa,e)}get showMatchedNodeOnly(){return(0,y.c)(this,Sa)}set showMatchedNodeOnly(e){(0,N.c)(this,Sa,e)}get matchNodeDataFields(){return(0,y.c)(this,Ba)}set matchNodeDataFields(e){(0,N.c)(this,Ba,e)}get fixedActionsFor(){return(0,y.c)(this,Ka)}set fixedActionsFor(e){(0,N.c)(this,Ka,e)}get collapsible(){return(0,y.c)(this,ja)}set collapsible(e){(0,N.c)(this,ja,e)}get collapsedNodes(){return(0,y.c)(this,za)}set collapsedNodes(e){(0,N.c)(this,za,e)}get allowDrag(){return(0,y.c)(this,Ya)}set allowDrag(e){(0,N.c)(this,Ya,e)}get allowDragToRoot(){return(0,y.c)(this,Ga)}set allowDragToRoot(e){(0,N.c)(this,Ga,e)}get allowDragToInside(){return(0,y.c)(this,Ha)}set allowDragToInside(e){(0,N.c)(this,Ha,e)}get nodeKey(){return(0,y.c)(this,Va)}set nodeKey(e){(0,N.c)(this,Va,e)}get skipNotify(){return(0,y.c)(this,Ja)}set skipNotify(e){(0,N.c)(this,Ja,e)}render(){return R().createElement(fa.O.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,y.c)(this,$a)}},R().createElement(La.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,dn),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,wa.pick)(e.data,this.matchNodeDataFields),t)}}},R().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 gn(e){sa(this,e)}function mn(){return ra(this)}function En(e){pa(this,e)}function wn(){return ua(this)}function fn(e){ma(this,e)}function kn(){return ga(this)}Ea=hn,({e:[mt,wt,kt,xt,yt,Mt,It,Tt,_t,Pt,Ut,St,Kt,zt,Gt,Vt,Xt,$t,Zt,ea,ta,na,ia,oa,la,ra,sa,ha,ua,pa,va,ga,ma,pt],c:[Ma,bt]}=(0,O.c)(Ea,[[gt,1,"nodes"],[Et,1,"actions"],[ft,1,"actionsHidden"],[Lt,1,"placeholder"],[Nt,1,"isTransformName"],[Ot,1,"searchPlaceholder"],[Rt,1,"noSearch"],[At,1,"activeKey"],[Ct,1,"showMatchedNodeOnly"],[Dt,1,"matchNodeDataFields"],[Wt,1,"fixedActionsFor"],[Ft,1,"collapsible"],[Bt,1,"collapsedNodes"],[jt,1,"allowDrag"],[Yt,1,"allowDragToRoot"],[Ht,1,"allowDragToInside"],[Jt,1,"nodeKey"],[qt,1,"skipNotify"],[Qt,1,"actionClickEvent",e=>(0,y.c)(e,Xa),(e,t)=>(0,N.c)(e,Xa,t)],[aa,1,"nodeClickEvent",e=>(0,y.c)(e,Qa),(e,t)=>(0,N.c)(e,Qa,t)],[ca,1,"nodeDropEvent",e=>(0,y.c)(e,tn),(e,t)=>(0,N.c)(e,tn,t)],[da,1,"nodeContextMenuEvent",e=>(0,y.c)(e,on),(e,t)=>(0,N.c)(e,on,t)],[ba,1,"nodeToggleEvent",e=>(0,y.c)(e,rn),(e,t)=>(0,N.c)(e,rn,t)]],vt,0,(e=>dn.has((0,x.c)(e))),A.ReactNextElement)),bt();var Ln=a(4516),xn=a(4724);a(8172),customElements.define("visual-builder.inject-preview-agent",(0,Ln.createProviderClass)((function(e,t){return(0,xn.c)(e,t)})));var Nn,yn,On,Mn,Rn,In,An,Tn,Cn,_n,Dn,Pn,Wn,Un,Fn,Sn,Bn,Kn,jn,zn,Yn=a(4412),Gn=a(6008),Hn=a.n(Gn),Vn=a(5544),Jn=a(4432),Xn=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}({}),qn="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,Yn.c)((0,Yn.c)({},a),{},{params:t}))).data}));return function(t,a,n){return e.apply(this,arguments)}}(),ei=a(2204),ti={add:"".concat(qn,":").concat(Xn.ADD),edit:"".concat(qn,":").concat(Xn.EDIT),delete:"".concat(qn,":").concat(Xn.DELETE),batch_delete:"".concat(qn,":").concat(Xn.DELETE),import:"".concat(qn,":").concat(Xn.IMPORT),clone:"".concat(qn,":").concat(Xn.CLONE),append_relation:"".concat(qn,":").concat(Xn.APPEND_RELATION),update_relation:"".concat(qn,":").concat(Xn.UPDATE_RELATION),remove_relation:"".concat(qn,":").concat(Xn.REMOVE_RELATION),rollback:"".concat(qn,":").concat(Xn.ROLLBACK),rollback_all:"".concat(qn,":").concat(Xn.ROLLBACK_ALL)},ai={add:"".concat(qn,":").concat(Xn.ADD_FULL),edit:"".concat(qn,":").concat(Xn.EDIT_FULL),delete:"".concat(qn,":").concat(Xn.DELETE_FULL),batch_delete:"".concat(qn,":").concat(Xn.DELETE_FULL),import:"".concat(qn,":").concat(Xn.IMPORT_FULL),clone:"".concat(qn,":").concat(Xn.CLONE_FULL),append_relation:"".concat(qn,":").concat(Xn.APPEND_RELATION_FULL),update_relation:"".concat(qn,":").concat(Xn.UPDATE_RELATION_FULL),remove_relation:"".concat(qn,":").concat(Xn.REMOVE_RELATION_FULL),rollback:"".concat(qn,":").concat(Xn.ROLLBACK_FULL),rollback_all:"".concat(qn,":").concat(Xn.ROLLBACK_ALL_FULL)},ni={project:"".concat(qn,":").concat(Xn.PROJECT),userGroup:"".concat(qn,":").concat(Xn.USER),permission:"".concat(qn,":").concat(Xn.PERMISSION),brick:"".concat(qn,":").concat(Xn.BRICK),route:"".concat(qn,":").concat(Xn.ROUTE),template:"".concat(qn,":").concat(Xn.TEMPLATE),snippet:"".concat(qn,":").concat(Xn.SNIPPET),i18n:"".concat(qn,":").concat(Xn.I18N),image:"".concat(qn,":").concat(Xn.IMAGE),function:"".concat(qn,":").concat(Xn.FUNCTION),menu:"".concat(qn,":").concat(Xn.MENU),menuItem:"".concat(qn,":").concat(Xn.MENU_ITEM),workflow:"".concat(qn,":").concat(Xn.WORKFLOW)},ii={PROJECT_MICRO_APP:"".concat(qn,":").concat(Xn.PROJECT),"MICRO_APP_USER_GROUP@EASYOPS":"".concat(qn,":").concat(Xn.USER),MICRO_APP_RESOURCE_PERMISSION:"".concat(qn,":").concat(Xn.PERMISSION),STORYBOARD_BRICK:"".concat(qn,":").concat(Xn.BRICK),STORYBOARD_ROUTE:"".concat(qn,":").concat(Xn.ROUTE),STORYBOARD_TEMPLATE:"".concat(qn,":").concat(Xn.TEMPLATE),STORYBOARD_SNIPPET:"".concat(qn,":").concat(Xn.SNIPPET),STORYBOARD_I18N:"".concat(qn,":").concat(Xn.I18N),MICRO_APP_RESOURCE_IMAGE:"".concat(qn,":").concat(Xn.IMAGE),STORYBOARD_FUNCTION:"".concat(qn,":").concat(Xn.FUNCTION),MICRO_APP_RESOURCE_MENU:"".concat(qn,":").concat(Xn.MENU),MICRO_APP_RESOURCE_MENU_ITEM:"".concat(qn,":").concat(Xn.MENU_ITEM),"WORKFLOW_DEF@EASYOPS":"".concat(qn,":").concat(Xn.WORKFLOW)};function oi(e){var t,a,n,i,o,c,l,r,s,d,h,u,p,b,v,g,m,E="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",w=ei.i18n.t(null!==(t=ni[e.category])&&void 0!==t?t:e.category),f=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),L=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===(d=e.abstract)||void 0===d?void 0:d.nodesCount),N=ci(null===(h=e.abstract)||void 0===h?void 0:h.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:w,action:f,leftObjectId:k,rightObjectId:L,nodes:x,leftNodes:N,rightNodes:y,abstract:ei.i18n.t(null!==(v=ai[E])&&void 0!==v?v:E,{category:w,nodes:x,leftNodes:N,rightNodes:y,nodeChanges:null===(g=e.abstract)||void 0===g||null===(g=g.nodeChanges)||void 0===g?void 0:g.join(", "),relationChanges:null===(m=e.abstract)||void 0===m||null===(m=m.relationChanges)||void 0===m?void 0:m.join(", "),leftObjectId:k,rightObjectId:L,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(qn,":").concat(Xn.NODE),{nodes:e.join(a),context:t>e.length?"ellipsis":void 0,count:t})}(0,Jn.initializeReactI18n)(qn,{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:di}=(0,I.createDecorators)(),hi=(0,A.wrapBrick)("eo-button"),ui=(0,A.wrapBrick)("eo-link"),pi=(0,A.wrapBrick)("eo-icon"),bi=(0,A.wrapBrick)("eo-easyops-avatar"),vi=(0,A.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});On=[ri("visual-builder.workbench-history-action",{styleTexts:[Vn.c]})],Mn=si(),In=si(),Tn=di({type:"history.item.click"}),Pn=di({type:"rollback"}),Sn=di({type:"rollback.all"});var gi=new WeakMap,mi=new WeakMap,Ei=new WeakMap,wi=new WeakMap,fi=new WeakMap,ki=new WeakMap,Li=new WeakMap,xi=new WeakMap,Ni=new WeakMap,yi=new WeakMap,Oi=new WeakMap;class Mi extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,yi,{get:_i,set:Ci}),(0,L.c)(this,Li,{get:Ti,set:Ai}),(0,L.c)(this,wi,{get:Ii,set:Ri}),(0,L.c)(this,gi,{writable:!0,value:(Nn(this),Rn(this))}),(0,L.c)(this,mi,{writable:!0,value:An(this)}),(0,L.c)(this,Ei,{writable:!0,value:Cn(this)}),(0,L.c)(this,fi,{writable:!0,value:e=>{(0,y.c)(this,wi).emit(e)}}),(0,L.c)(this,ki,{writable:!0,value:Wn(this)}),(0,L.c)(this,xi,{writable:!0,value:e=>{(0,y.c)(this,Li).emit(e)}}),(0,L.c)(this,Ni,{writable:!0,value:Bn(this)}),(0,L.c)(this,Oi,{writable:!0,value:()=>{(0,y.c)(this,yi).emit()}})}get appId(){return(0,y.c)(this,gi)}set appId(e){(0,N.c)(this,gi,e)}get projectId(){return(0,y.c)(this,mi)}set projectId(e){(0,N.c)(this,mi,e)}render(){return R().createElement(Di,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,y.c)(this,fi),onRollback:(0,y.c)(this,xi),onRollbackAll:(0,y.c)(this,Oi)})}}function Ri(e){Dn(this,e)}function Ii(){return _n(this)}function Ai(e){Fn(this,e)}function Ti(){return Un(this)}function Ci(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,Jn.useTranslation)(qn),[c,l]=(0,M.useState)(!1),[r,s]=(0,M.useState)(!0),[d,h]=(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,Yn.c)((0,Yn.c)({},e),{},{translation:oi(e)})));return e?n:a.concat(n)})),b.current=t.ts,h(t.list.length<20),s(t.list.length<20)})).catch((e=>{(0,Ye.handleHttpError)(e)})).finally((()=>{l(!1)}))};return R().createElement(vi,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(s(!0),h(!1),p([]),b.current="",v(!0))}},R().createElement(hi,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),R().createElement("div",null,R().createElement("div",{className:"history-title"},"History"),R().createElement("div",{className:"history-list"},u.length?R().createElement(R().Fragment,null,u.map(((e,t)=>R().createElement(Pi,{key:"".concat(e.uniqueKey,"-").concat(e.ts),data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:a,onRollback:n}))),!r&&R().createElement("span",{className:"load-more-container"},R().createElement(ui,{className:"load-more",disabled:c,onClick:()=>v()},o(Xn.LOAD_MORE))),d&&R().createElement("span",{className:"end-container"},"The End",R().createElement(pi,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):R().createElement("div",{className:"empty"},o(c?Xn.LOADING:Xn.NO_DATA))),R().createElement("slot",null)))}function Pi(e){var{data:t,enableRollback:a,current:n,onHistoryItemClick:i,onRollback:o}=e,c=Hn()(Number(t.ts)/1e6),l=Hn().duration(c.diff(Hn()())),r=l.days()<=-1?c.format("YYYY-MM-DD HH:mm:ss"):l.humanize(!0,{ss:0,s:60,m:60,h:24});return R().createElement("div",{className:"item-container"},R().createElement("div",{className:"item-title"},R().createElement("div",{className:"title-left",onClick:()=>i((0,Yn.c)((0,Yn.c)({},t),{},{enableRollback:a}))},R().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),n&&R().createElement("div",{className:"branch"},"(current)")),R().createElement("div",{className:"title-right"},a&&R().createElement(pi,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),R().createElement("div",{className:"item-info"},R().createElement(bi,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),R().createElement("div",{className:"time"},r),R().createElement("div",{className:"operator"},t.user)))}zn=Mi,({e:[Rn,An,Cn,_n,Dn,Wn,Un,Fn,Bn,Kn,jn,Nn],c:[li,yn]}=(0,O.c)(zn,[[Mn,1,"appId"],[In,1,"projectId"],[Tn,1,"historyItemClickEvent",e=>(0,y.c)(e,Ei),(e,t)=>(0,N.c)(e,Ei,t)],[Pn,1,"rollbackEvent",e=>(0,y.c)(e,ki),(e,t)=>(0,N.c)(e,ki,t)],[Sn,1,"rollbackAllEvent",e=>(0,y.c)(e,Ni),(e,t)=>(0,N.c)(e,Ni,t)]],On,0,(e=>Oi.has((0,x.c)(e))),A.ReactNextElement)),yn();var Wi,Ui,Fi,Si,Bi,Ki,ji,zi,Yi,Gi,Hi,Vi,Ji,Xi,qi,$i,Qi,Zi,eo,to,ao,no,io,oo,co,lo,ro,so,ho,uo,po,bo,vo,go,mo,Eo,wo,fo,ko,Lo,xo,No,yo,Oo,Mo,Ro,Io,Ao,To,Co,_o,Do,Po,Wo,Uo,Fo,So,Bo=a(8904),{defineElement:Ko,property:jo,event:zo}=(0,I.createDecorators)(),Yo=(0,A.wrapBrick)("eo-icon"),Go=(0,A.wrapBrick)("eo-tooltip"),Ho=new Set;Fi=[Ko("visual-builder.page-arch-node",{styleTexts:[Bo.c]})],Si=jo(),Ki=jo(),zi=jo({attribute:!1}),Gi=jo({attribute:!1}),Vi=jo({type:Boolean,render:!1}),Xi=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"}),Lo=zo({type:"child.append"}),Oo=zo({type:"external.click"}),Ao=zo({type:"subNode.dblclick"}),Do=zo({type:"subNode.contextmenu"});var Vo=new WeakMap,Jo=new WeakMap,Xo=new WeakMap,qo=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,dc=new WeakMap,hc=new WeakMap,uc=new WeakMap,pc=new WeakMap,bc=new WeakMap,vc=new WeakMap,gc=new WeakMap,mc=new WeakMap,Ec=new WeakMap,wc=new WeakMap,fc=new WeakMap,kc=new WeakMap,Lc=new WeakMap,xc=new WeakMap,Nc=new WeakMap,yc=new WeakMap,Oc=new WeakMap,Mc=new WeakMap;class Rc extends A.ReactNextElement{constructor(){super(...arguments),(0,L.c)(this,Oc,{get:Hc,set:Gc}),(0,L.c)(this,xc,{get:Yc,set:zc}),(0,L.c)(this,fc,{get:jc,set:Kc}),(0,L.c)(this,mc,{get:Bc,set:Sc}),(0,L.c)(this,bc,{get:Fc,set:Uc}),(0,L.c)(this,hc,{get:Wc,set:Pc}),(0,L.c)(this,rc,{get:Dc,set:_c}),(0,L.c)(this,oc,{get:Cc,set:Tc}),(0,L.c)(this,ac,{get:Ac,set:Ic}),(0,L.c)(this,Vo,{writable:!0,value:(Wi(this),Bi(this))}),(0,L.c)(this,Jo,{writable:!0,value:ji(this)}),(0,L.c)(this,Xo,{writable:!0,value:Yi(this)}),(0,L.c)(this,qo,{writable:!0,value:Hi(this)}),(0,L.c)(this,$o,{writable:!0,value:Ji(this)}),(0,L.c)(this,Qo,{writable:!0,value:qi(this)}),(0,L.c)(this,Zo,{writable:!0,value:Qi(this)}),(0,L.c)(this,ec,{writable:!0,value:eo(this)}),(0,L.c)(this,tc,{writable:!0,value:ao(this)}),(0,L.c)(this,nc,{writable:!0,value:e=>{(0,y.c)(this,ac).emit(e)}}),(0,L.c)(this,ic,{writable:!0,value:co(this)}),(0,L.c)(this,cc,{writable:!0,value:e=>{(0,y.c)(this,oc).emit(e)}}),(0,L.c)(this,lc,{writable:!0,value:ho(this)}),(0,L.c)(this,sc,{writable:!0,value:()=>{(0,y.c)(this,rc).emit()}}),(0,L.c)(this,dc,{writable:!0,value:vo(this)}),(0,L.c)(this,uc,{writable:!0,value:()=>{(0,y.c)(this,hc).emit()}}),(0,L.c)(this,pc,{writable:!0,value:wo(this)}),(0,L.c)(this,vc,{writable:!0,value:e=>{(0,y.c)(this,bc).emit(e)}}),(0,L.c)(this,gc,{writable:!0,value:xo(this)}),(0,L.c)(this,Ec,{writable:!0,value:()=>{(0,y.c)(this,mc).emit()}}),(0,L.c)(this,wc,{writable:!0,value:Mo(this)}),(0,L.c)(this,kc,{writable:!0,value:e=>{(0,y.c)(this,fc).emit(e)}}),(0,L.c)(this,Lc,{writable:!0,value:To(this)}),(0,L.c)(this,Nc,{writable:!0,value:e=>{(0,y.c)(this,xc).emit(e)}}),(0,L.c)(this,yc,{writable:!0,value:Po(this)}),(0,L.c)(this,Mc,{writable:!0,value:e=>{(0,y.c)(this,Oc).emit(e)}})}get label(){return(0,y.c)(this,Vo)}set label(e){(0,N.c)(this,Vo,e)}get type(){return(0,y.c)(this,Jo)}set type(e){(0,N.c)(this,Jo,e)}get external(){return(0,y.c)(this,Xo)}set external(e){(0,N.c)(this,Xo,e)}get subNodes(){return(0,y.c)(this,qo)}set subNodes(e){(0,N.c)(this,qo,e)}get active(){return(0,y.c)(this,$o)}set active(e){(0,N.c)(this,$o,e)}get notSynced(){return(0,y.c)(this,Qo)}set notSynced(e){(0,N.c)(this,Qo,e)}get disableChildAppend(){return(0,y.c)(this,Zo)}set disableChildAppend(e){(0,N.c)(this,Zo,e)}get autoFocusOnce(){return(0,y.c)(this,ec)}set autoFocusOnce(e){(0,N.c)(this,ec,e)}render(){return R().createElement(Vc,{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,Nc),onSubNodeContextMenu:(0,y.c)(this,Mc)})}}function Ic(e){io(this,e)}function Ac(){return no(this)}function Tc(e){ro(this,e)}function Cc(){return lo(this)}function _c(e){po(this,e)}function Dc(){return uo(this)}function Pc(e){mo(this,e)}function Wc(){return go(this)}function Uc(e){ko(this,e)}function Fc(){return fo(this)}function Sc(e){yo(this,e)}function Bc(){return No(this)}function Kc(e){Io(this,e)}function jc(){return Ro(this)}function zc(e){_o(this,e)}function Yc(){return Co(this)}function Gc(e){Uo(this,e)}function Hc(){return Wo(this)}function Vc(e){var t,{label:a,type:n,external:i,subNodes:o,autoFocusOnce:c,onLabelEditingChange:l,onLabelChange:r,onNodeClick:s,onNodeDoubleClick:d,onNodeContextMenu:h,onChildAppend:u,onExternalClick:p,onSubNodeDoubleClick:b,onSubNodeContextMenu:v}=e,g="board"===n?"board":"page",[m,E]=(0,M.useState)(a),[w,f]=(0,M.useState)(!1),k=(0,M.useRef)(!1),[L,x]=(0,M.useState)(!1),N=(0,M.useRef)(null);(0,M.useEffect)((()=>{E(a)}),[a]);var y=(0,M.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),f(!0)}),[]);(0,M.useEffect)((()=>{c&&!Ho.has(c)&&(Ho.add(c),setTimeout((()=>{f(!0)}),1))}),[c]),(0,M.useEffect)((()=>{var e,t;w&&(null===(e=N.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=N.current)||void 0===t||t.select())}),[w]),(0,M.useEffect)((()=>{k.current?null==l||l(w):k.current=!0}),[w,l]);var O=(0,M.useCallback)((e=>{E(e.target.value)}),[]),I=(0,M.useCallback)((e=>{var t,a=e.key||e.keyCode||e.which;"Enter"!==a&&13!==a||null===(t=N.current)||void 0===t||t.blur()}),[]),A=(0,M.useCallback)((()=>{f(!1),x(!0)}),[]);(0,M.useEffect)((()=>{L&&(null==r||r(m),x(!1))}),[m,r,L]);var T=(0,M.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),C=(0,M.useCallback)((e=>{e.stopPropagation(),null==p||p(i)}),[i,p]),_=(0,M.useCallback)((e=>{e.stopPropagation()}),[]),P=38*Math.max(0,Math.floor((null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)-3));return R().createElement(R().Fragment,null,R().createElement("div",{className:D()("node",g,{"editing-label":w}),style:{height:"board"===g?70:130+P},onClick:s,onDoubleClick:d,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==h||h({clientX:e.clientX,clientY:e.clientY})}},R().createElement("input",{className:"label-input",value:m,ref:N,onChange:O,onKeyDown:I,onBlur:A,onDoubleClick:_,onContextMenu:_,onMouseDown:_}),R().createElement("div",{className:"label",onDoubleClick:y,onMouseDown:_},m),"board"===g?R().createElement("div",{className:"icon-container"},R().createElement(Yo,{lib:"antd",icon:"unordered-list"})):R().createElement("div",{className:"thumbnail-container",style:{height:98+P}},R().createElement("div",{className:"thumbnail-placeholder"},R().createElement(Yo,{lib:"antd",icon:"ellipsis"})),i&&R().createElement("div",{className:"external",onClick:C,onDoubleClick:_,onMouseDown:_},R().createElement(Yo,{lib:"antd",icon:"desktop"}),R().createElement("span",{className:"external-label"},i.label)),null!=o&&o.length?R().createElement("div",{className:"sub-nodes"},o.map((e=>R().createElement(Jc,{key:e.id,subNode:e,onSubNodeDoubleClick:b,onSubNodeContextMenu:v})))):null)),R().createElement("div",{className:"add-button",role:"button",onClick:T,onMouseDown:_},R().createElement(Yo,{lib:"fa",icon:"plus"})))}function Jc(e){var{subNode:t,onSubNodeDoubleClick:a,onSubNodeContextMenu:n}=e;return R().createElement(Go,{key:t.id,content:t.label},R().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==a||a(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==n||n({node:t,clientX:e.clientX,clientY:e.clientY})}},R().createElement("div",{className:"sub-node-skeleton-title"}),R().createElement("div",{className:"sub-node-skeleton-content"}),R().createElement("div",{className:"sub-node-skeleton-button"})))}Fo=Rc,({e:[Bi,ji,Yi,Hi,Ji,qi,Qi,eo,ao,no,io,co,lo,ro,ho,uo,po,vo,go,mo,wo,fo,ko,xo,No,yo,Mo,Ro,Io,To,Co,_o,Po,Wo,Uo,Wi],c:[So,Ui]}=(0,O.c)(Fo,[[Si,1,"label"],[Ki,1,"type"],[zi,1,"external"],[Gi,1,"subNodes"],[Vi,1,"active"],[Xi,1,"notSynced"],[$i,1,"disableChildAppend"],[Zi,1,"autoFocusOnce"],[to,1,"labelEditingChange",e=>(0,y.c)(e,tc),(e,t)=>(0,N.c)(e,tc,t)],[oo,1,"labelChange",e=>(0,y.c)(e,ic),(e,t)=>(0,N.c)(e,ic,t)],[so,1,"nodeClick",e=>(0,y.c)(e,lc),(e,t)=>(0,N.c)(e,lc,t)],[bo,1,"nodeDoubleClick",e=>(0,y.c)(e,dc),(e,t)=>(0,N.c)(e,dc,t)],[Eo,1,"nodeContextMenu",e=>(0,y.c)(e,pc),(e,t)=>(0,N.c)(e,pc,t)],[Lo,1,"childAppend",e=>(0,y.c)(e,gc),(e,t)=>(0,N.c)(e,gc,t)],[Oo,1,"externalClick",e=>(0,y.c)(e,wc),(e,t)=>(0,N.c)(e,wc,t)],[Ao,1,"subNodeDoubleClick",e=>(0,y.c)(e,Lc),(e,t)=>(0,N.c)(e,Lc,t)],[Do,1,"subNodeContextMenu",e=>(0,y.c)(e,yc),(e,t)=>(0,N.c)(e,yc,t)]],Fi,0,(e=>Mc.has((0,x.c)(e))),A.ReactNextElement)),Ui()},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=1876.3eb6dfd2.js.map
|