@next-bricks/visual-builder 1.16.2 → 1.16.3
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 +6 -6
- package/dist/chunks/1822.fea51558.js +3 -0
- package/dist/chunks/1822.fea51558.js.map +1 -0
- package/dist/chunks/{main.8e2d5340.js → main.3bce7c52.js} +2 -2
- package/dist/chunks/{main.8e2d5340.js.map → main.3bce7c52.js.map} +1 -1
- package/dist/chunks/{workbench-action-list.d6808912.js → workbench-action-list.ec85066d.js} +2 -2
- package/dist/chunks/workbench-action-list.ec85066d.js.map +1 -0
- package/dist/{index.6b701ac6.js → index.6539ec7f.js} +2 -2
- package/dist/{index.6b701ac6.js.map → index.6539ec7f.js.map} +1 -1
- package/dist/manifest.json +32 -32
- package/dist/types.json +13 -13
- package/package.json +2 -2
- package/dist/chunks/1822.4cff8211.js +0 -3
- package/dist/chunks/1822.4cff8211.js.map +0 -1
- package/dist/chunks/workbench-action-list.d6808912.js.map +0 -1
- /package/dist/chunks/{1822.4cff8211.js.LICENSE.txt → 1822.fea51558.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1822.4cff8211.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[1822],{1822:(e,t,n)=>{n.r(t);var a,i=n(4635),o=n(918),r=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),h=n(8769),p=n.n(h),u=n(3412),m=n(5049),g=n(7180),b=n(9765),A=n(3373),v=n.n(A);let f,E,k,w,y,x,N,L,M,T,O,R,C,_,I;const S=(0,m.wrapBrick)("eo-icon"),{defineElement:D,property:P,event:W}=(0,u.createDecorators)();let $;var B=new WeakMap,F=new WeakMap,U=new WeakMap,K=new WeakMap,j=new WeakSet,z=new WeakMap,V=new WeakMap,H=new WeakMap;class Y extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,j),(0,o.A)(this,B,E(this)),(0,o.A)(this,F,(k(this),w(this))),(0,o.A)(this,U,(y(this),x(this))),(0,o.A)(this,K,(N(this),L(this))),(0,o.A)(this,z,(O(this),e=>{e!==this.active&&(this.active=e,(0,s.A)(j,this,M).emit(e))})),(0,o.A)(this,V,R(this)),(0,o.A)(this,H,(I(this),()=>{(0,s.A)(j,this,C).emit()}))}get titleLabel(){return(0,c.A)(B,this)}set titleLabel(e){(0,l.A)(B,this,e)}get active(){return(0,c.A)(F,this)}set active(e){(0,l.A)(F,this,e)}get badge(){return(0,c.A)(U,this)}set badge(e){(0,l.A)(U,this,e)}render(){return p().createElement(G,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,c.A)(z,this),onFirstActivated:(0,c.A)(H,this)})}}function G(e){let{titleLabel:t,active:n,badge:a,onActiveChange:i,onFirstActivated:o}=e;const[r,s]=(0,h.useState)(n),[l,c]=(0,h.useState)(!1);(0,h.useEffect)((()=>{s(n)}),[n]),(0,h.useEffect)((()=>{null==i||i(r)}),[r,i]);const d=(0,h.useCallback)((()=>{s((e=>!e)),l||r||(c(!0),null==o||o())}),[l,r,o]),u=(0,h.useRef)(),[m,g]=(0,h.useState)(!1),b=(0,h.useMemo)((()=>function(e){let t;const n=()=>cancelAnimationFrame(t),a=function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];t&&n(),t=requestAnimationFrame((()=>{(()=>{g(u.current.scrollTop>0)})(...a)}))};return a.cancel=n,a}()),[]);return p().createElement("div",{className:v()("pane",{scrolled:m})},p().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},p().createElement("div",{className:"pane-title"},p().createElement("span",{className:"title-icon"},r?p().createElement(S,{lib:"antd",theme:"outlined",icon:"down"}):p().createElement(S,{lib:"antd",theme:"outlined",icon:"right"})),p().createElement("div",{className:"title-label"},t),p().createElement("slot",{name:"title"})),p().createElement("slot",{name:"actions"}),a&&p().createElement("div",{className:"badge"},a),p().createElement("div",{className:"pane-scroll-shadow"})),p().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:b,ref:u},p().createElement("slot",null,p().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}a=Y,({e:[E,k,w,y,x,N,L,M,T,O,R,C,_,I],c:[$,f]}=(0,d.A)(a,[D("visual-builder.workbench-pane",{styleTexts:[g.A,b.A]})],[[P(),1,"titleLabel"],[P({type:Boolean}),1,"active"],[P({type:Number}),1,"badge"],[W({type:"active.change"}),1,"activeChangeEvent",e=>(0,c.A)(K,e),(e,t)=>(0,l.A)(K,e,t)],[W({type:"active.firstActivated"}),1,"activeFirstActivatedEvent",e=>(0,c.A)(V,e),(e,t)=>(0,l.A)(V,e,t)]],0,(e=>H.has((0,r.A)(e))),m.ReactNextElement)),f();var X,q=n(4586),J=n(2150);let Q,Z,ee;const{defineElement:te,property:ne}=(0,u.createDecorators)();let ae;var ie=new WeakMap,oe=new WeakMap,re=new WeakMap,se=new WeakMap;class le extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,ie,Z(this)),(0,o.A)(this,oe,(ee(this),()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")})),(0,o.A)(this,re,(()=>{const e=(0,c.A)(oe,this).call(this).assignedNodes();for(const t of e)t.active?t.style.flex=String(t.activeFlex??"1"):t.style.flex="initial"})),(0,o.A)(this,se,(e=>{const t=e.target.assignedNodes();for(const e of t)e.addEventListener("active.change",(0,c.A)(re,this))})),(0,q.A)(this,"refCallback",(()=>{(0,c.A)(re,this).call(this);const e=(0,c.A)(oe,this).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,c.A)(se,this).call(this,e)}))}))}get titleLabel(){return(0,c.A)(ie,this)}set titleLabel(e){(0,l.A)(ie,this,e)}render(){return p().createElement(ce,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ce(e){let{titleLabel:t,refCallback:n}=e;return p().createElement("div",{className:"sidebar",ref:n},p().createElement("div",{className:"title-container"},p().createElement("div",{className:"title-label"},t),p().createElement("slot",{name:"titleToolbar"})),p().createElement("div",{className:"pane-container"},p().createElement("slot",null)))}X=le,({e:[Z,ee],c:[ae,Q]}=(0,d.A)(X,[te("visual-builder.workbench-sidebar",{styleTexts:[J.A]})],[[ne(),1,"titleLabel"]],0,void 0,m.ReactNextElement)),Q();var de,he=n(5292);let pe,ue,me,ge,be,Ae,ve,fe,Ee,ke,we;const{defineElement:ye,property:xe}=(0,u.createDecorators)(),Ne=(0,m.wrapBrick)("eo-link"),Le=(0,m.wrapBrick)("eo-icon");let Me;var Te=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Ce=new WeakMap,_e=new WeakMap;class Ie extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,Te,ue(this)),(0,o.A)(this,Oe,(me(this),ge(this))),(0,o.A)(this,Re,(be(this),Ae(this))),(0,o.A)(this,Ce,(ve(this),fe(this))),(0,o.A)(this,_e,(Ee(this),ke(this))),we(this)}get icon(){return(0,c.A)(Te,this)}set icon(e){(0,l.A)(Te,this,e)}get to(){return(0,c.A)(Oe,this)}set to(e){(0,l.A)(Oe,this,e)}get active(){return(0,c.A)(Re,this)}set active(e){(0,l.A)(Re,this,e)}get href(){return(0,c.A)(Ce,this)}set href(e){(0,l.A)(Ce,this,e)}get target(){return(0,c.A)(_e,this)}set target(e){(0,l.A)(_e,this,e)}render(){return p().createElement(Se,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function Se(e){let{icon:t,to:n,active:a,href:i,target:o}=e;return p().createElement(Ne,{className:v()("action",{active:a}),url:n,href:i,target:o},p().createElement(Le,t))}de=Ie,({e:[ue,me,ge,be,Ae,ve,fe,Ee,ke,we],c:[Me,pe]}=(0,d.A)(de,[ye("visual-builder.workbench-action",{styleTexts:[he.A]})],[[xe({attribute:!1}),1,"icon"],[xe(),1,"to"],[xe({type:Boolean}),1,"active"],[xe(),1,"href"],[xe(),1,"target"]],0,void 0,m.ReactNextElement)),pe();var De=n(369),Pe=n(1201);function We(e,t,n,a){const i=[],o=[],r=[];let s=0;return e.forEach((e=>{if(e.key=""===a?`${s}`:`${a}.${s}`,function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){const a=We(e.items,t,n,e.key);i.push(...a.selectedKeys),(a.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...a.openedKeys),r.push(...a.matchedKeys)}else if(function(e,t,n){if(!e.to)return!1;const a="object"==typeof e.to?e.to:(0,Pe.parsePath)(e.to),i=a.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");let o=!!(0,De.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=$e(n,a.search)),!o&&Array.isArray(e.activeIncludes))for(const a of e.activeIncludes){var r;let e;const i=a.includes("?");if(i&&(e=(0,Pe.parsePath)(a)),o=!!(0,De.matchPath)(t,{path:i?e.pathname:a,exact:!0}),o&&null!==(r=e)&&void 0!==r&&r.search&&(o=$e(n,e.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(const n of e.activeExcludes)if(o=!(0,De.matchPath)(t,{path:n,exact:!0}),!o)break;return o}(e,t,n)){i.push(String(e.key));const t=e.key.split(".");for(let e=0;e<t.length;e++)r.push(t.slice(0,e+1).join("."))}s+=1})),i.length&&""!==a&&o.push(a),{selectedKeys:i,openedKeys:o,matchedKeys:r}}function $e(e,t){const n=new URLSearchParams(e),a=new URLSearchParams(t);for(const[e,t]of a.entries())if((n.get(e)??"")!==t)return!1;return!0}var Be,Fe=n(3430);let Ue,Ke,je,ze,Ve;const He=(0,m.wrapBrick)("visual-builder.workbench-action"),{defineElement:Ye,property:Ge}=(0,u.createDecorators)();let Xe;var qe=new WeakMap,Je=new WeakMap;class Qe extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,qe,Ke(this)),(0,o.A)(this,Je,(je(this),ze(this))),Ve(this)}get appId(){return(0,c.A)(qe,this)}set appId(e){(0,l.A)(qe,this,e)}get menu(){return(0,c.A)(Je,this)}set menu(e){(0,l.A)(Je,this,e)}render(){return p().createElement(tt,{appId:this.appId,menu:this.menu})}}let Ze;Be=Qe,({e:[Ke,je,ze,Ve],c:[Xe,Ue]}=(0,d.A)(Be,[Ye("visual-builder.workbench-action-list",{styleTexts:[Fe.A]})],[[Ge(),1,"appId"],[Ge({attribute:!1}),1,"menu"]],0,void 0,m.ReactNextElement)),Ue();const et=new Map;function tt(e){var t;let{appId:n,menu:a}=e;const i=(0,De.getHistory)(),[o,r]=(0,h.useState)(),[s,l]=(0,h.useState)(i.location);return(0,h.useEffect)((()=>{const e=i.listen((e=>{l(e)}));return e}),[i]),(0,h.useEffect)((()=>{Ze||(Ze=n),Ze!==n&&(et.clear(),Ze=n)}),[n]),(0,h.useEffect)((()=>{const{pathname:e,search:t}=s,{selectedKeys:n}=We((null==a?void 0:a.menuItems)??[],e,t,"");r(Number(n[0]))}),[a,s]),p().createElement("div",{className:"workBenchActionList"},null==a||null===(t=a.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){let n=e.to;return o!==t&&et.has(t)&&(n=et.get(t)),p().createElement(He,{key:t,icon:e.icon,to:n,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||et.set(o,`${s.pathname}${s.search}`)})(e)})}})).filter(Boolean))}var nt,at=n(1030),it=n(4940),ot=n(5377),rt=n(9406),st=n(675),lt=n(7995),ct=n(6275);let dt,ht,pt,ut,mt,gt,bt,At,vt,ft,Et,kt,wt,yt,xt,Nt,Lt,Mt,Tt,Ot,Rt,Ct,_t,It,St,Dt,Pt,Wt,$t,Bt,Ft,Ut,Kt,jt,zt,Vt,Ht,Yt,Gt,Xt,qt,Jt,Qt,Zt,en,tn,nn,an,on,rn,sn,ln,cn,dn,hn,pn,un;function mn(e){return e.key}n(4766);const{defineElement:gn,property:bn,event:An}=(0,u.createDecorators)();let vn;var fn=new WeakMap,En=new WeakMap,kn=new WeakMap,wn=new WeakMap,yn=new WeakMap,xn=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,Mn=new WeakMap,Tn=new WeakMap,On=new WeakMap,Rn=new WeakMap,Cn=new WeakMap,_n=new WeakMap,In=new WeakMap,Sn=new WeakMap,Dn=new WeakMap,Pn=new WeakMap,Wn=new WeakMap,$n=new WeakSet,Bn=new WeakMap,Fn=new WeakMap,Un=new WeakMap,Kn=new WeakMap,jn=new WeakMap,zn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Yn=new WeakMap;class Gn extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,$n),(0,o.A)(this,fn,ht(this)),(0,o.A)(this,En,(pt(this),ut(this))),(0,o.A)(this,kn,(mt(this),gt(this))),(0,o.A)(this,wn,(bt(this),At(this))),(0,o.A)(this,yn,(vt(this),ft(this))),(0,o.A)(this,xn,(Et(this),kt(this))),(0,o.A)(this,Nn,(wt(this),yt(this))),(0,o.A)(this,Ln,(xt(this),Nt(this))),(0,o.A)(this,Mn,(Lt(this),Mt(this))),(0,o.A)(this,Tn,(Tt(this),Ot(this))),(0,o.A)(this,On,(Rt(this),Ct(this))),(0,o.A)(this,Rn,(_t(this),It(this))),(0,o.A)(this,Cn,(St(this),Dt(this))),(0,o.A)(this,_n,(Pt(this),Wt(this))),(0,o.A)(this,In,($t(this),Bt(this))),(0,o.A)(this,Sn,(Ft(this),Ut(this))),(0,o.A)(this,Dn,(Kt(this),jt(this))),(0,o.A)(this,Pn,(zt(this),Vt(this))),(0,o.A)(this,Wn,(Ht(this),Yt(this))),(0,o.A)(this,Bn,(qt(this),e=>{(0,s.A)($n,this,Gt).emit(e)})),(0,o.A)(this,Fn,Jt(this)),(0,o.A)(this,Un,(en(this),e=>()=>{(0,s.A)($n,this,Qt).emit(e.data)})),(0,o.A)(this,Kn,tn(this)),(0,o.A)(this,jn,(on(this),e=>{(0,s.A)($n,this,nn).emit(e)})),(0,o.A)(this,zn,rn(this)),(0,o.A)(this,Vn,(cn(this),e=>t=>{t.preventDefault(),(0,s.A)($n,this,sn).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})})),(0,o.A)(this,Hn,dn(this)),(0,o.A)(this,Yn,(un(this),(e,t)=>{(0,s.A)($n,this,hn).emit({nodeId:e,collapsed:t})}))}get nodes(){return(0,c.A)(fn,this)}set nodes(e){(0,l.A)(fn,this,e)}get actions(){return(0,c.A)(En,this)}set actions(e){(0,l.A)(En,this,e)}get actionsHidden(){return(0,c.A)(kn,this)}set actionsHidden(e){(0,l.A)(kn,this,e)}get placeholder(){return(0,c.A)(wn,this)}set placeholder(e){(0,l.A)(wn,this,e)}get isTransformName(){return(0,c.A)(yn,this)}set isTransformName(e){(0,l.A)(yn,this,e)}get searchPlaceholder(){return(0,c.A)(xn,this)}set searchPlaceholder(e){(0,l.A)(xn,this,e)}get noSearch(){return(0,c.A)(Nn,this)}set noSearch(e){(0,l.A)(Nn,this,e)}get activeKey(){return(0,c.A)(Ln,this)}set activeKey(e){(0,l.A)(Ln,this,e)}get showMatchedNodeOnly(){return(0,c.A)(Mn,this)}set showMatchedNodeOnly(e){(0,l.A)(Mn,this,e)}get matchNodeDataFields(){return(0,c.A)(Tn,this)}set matchNodeDataFields(e){(0,l.A)(Tn,this,e)}get fixedActionsFor(){return(0,c.A)(On,this)}set fixedActionsFor(e){(0,l.A)(On,this,e)}get collapsible(){return(0,c.A)(Rn,this)}set collapsible(e){(0,l.A)(Rn,this,e)}get collapsedNodes(){return(0,c.A)(Cn,this)}set collapsedNodes(e){(0,l.A)(Cn,this,e)}get allowDrag(){return(0,c.A)(_n,this)}set allowDrag(e){(0,l.A)(_n,this,e)}get allowDragToRoot(){return(0,c.A)(In,this)}set allowDragToRoot(e){(0,l.A)(In,this,e)}get allowDragToInside(){return(0,c.A)(Sn,this)}set allowDragToInside(e){(0,l.A)(Sn,this,e)}get nodeKey(){return(0,c.A)(Dn,this)}set nodeKey(e){(0,l.A)(Dn,this,e)}get skipNotify(){return(0,c.A)(Pn,this)}set skipNotify(e){(0,l.A)(Pn,this,e)}render(){return p().createElement(it.e.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,c.A)(Bn,this)}},p().createElement(rt.N.Provider,{value:{activeKey:this.activeKey,basePaddingLeft:5,showMatchedNodeOnly:this.showMatchedNodeOnly,isTransformName:this.isTransformName,fixedActionsFor:this.fixedActionsFor,nodeKey:this.nodeKey,collapsible:this.collapsible,collapsedNodes:this.collapsedNodes,getCollapsedId:mn,onNodeToggle:(0,c.A)(Yn,this),skipNotify:this.skipNotify,clickFactory:(0,c.A)(Un,this),contextMenuFactory:(0,c.A)(Vn,this),matchNode:(e,t)=>{var n;return(0,st.U)(e.name,t)||!(null===(n=this.matchNodeDataFields)||void 0===n||!n.length)&&(0,st.U)("*"===this.matchNodeDataFields?e.data:(0,at.pick)(e.data,this.matchNodeDataFields),t)}}},p().createElement(ot.cU,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,c.A)(jn,this),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}nt=Gn,({e:[ht,pt,ut,mt,gt,bt,At,vt,ft,Et,kt,wt,yt,xt,Nt,Lt,Mt,Tt,Ot,Rt,Ct,_t,It,St,Dt,Pt,Wt,$t,Bt,Ft,Ut,Kt,jt,zt,Vt,Ht,Yt,Gt,Xt,qt,Jt,Qt,Zt,en,tn,nn,an,on,rn,sn,ln,cn,dn,hn,pn,un],c:[vn,dt]}=(0,d.A)(nt,[gn("visual-builder.workbench-tree",{styleTexts:[lt.A,ct.A]})],[[bn({attribute:!1}),1,"nodes"],[bn({attribute:!1}),1,"actions"],[bn({type:Boolean}),1,"actionsHidden"],[bn(),1,"placeholder"],[bn({type:Boolean}),1,"isTransformName"],[bn(),1,"searchPlaceholder"],[bn({type:Boolean}),1,"noSearch"],[bn({attribute:!1}),1,"activeKey"],[bn({type:Boolean}),1,"showMatchedNodeOnly"],[bn({attribute:!1}),1,"matchNodeDataFields"],[bn({attribute:!1}),1,"fixedActionsFor"],[bn({type:Boolean}),1,"collapsible"],[bn({attribute:!1}),1,"collapsedNodes"],[bn({type:Boolean}),1,"allowDrag"],[bn({type:Boolean}),1,"allowDragToRoot"],[bn({type:Boolean}),1,"allowDragToInside"],[bn({type:String}),1,"nodeKey"],[bn({type:Boolean}),1,"skipNotify"],[An({type:"action.click"}),1,"actionClickEvent",e=>(0,c.A)(Wn,e),(e,t)=>(0,l.A)(Wn,e,t)],[An({type:"node.click"}),1,"nodeClickEvent",e=>(0,c.A)(Fn,e),(e,t)=>(0,l.A)(Fn,e,t)],[An({type:"node.drop"}),1,"nodeDropEvent",e=>(0,c.A)(Kn,e),(e,t)=>(0,l.A)(Kn,e,t)],[An({type:"context.menu"}),1,"nodeContextMenuEvent",e=>(0,c.A)(zn,e),(e,t)=>(0,l.A)(zn,e,t)],[An({type:"node.toggle"}),1,"nodeToggleEvent",e=>(0,c.A)(Hn,e),(e,t)=>(0,l.A)(Hn,e,t)]],0,(e=>Yn.has((0,r.A)(e))),m.ReactNextElement)),dt();var Xn=n(729),qn=n(9027);n(6788),customElements.define("visual-builder.inject-preview-agent",(0,Xn.createProviderClass)((function(e,t){return(0,qn.A)(e,t)})));var Jn=n(155),Qn=n.n(Jn),Zn=n(1361),ea=n(5502);let ta=function(e){return e.LOAD_MORE="LOAD_MORE",e.LOADING="LOADING",e.NO_DATA="NO_DATA",e.NODE="NODE",e.ADD="ADD",e.EDIT="EDIT",e.DELETE="DELETE",e.IMPORT="IMPORT",e.CLONE="CLONE",e.APPEND_RELATION="APPEND_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REMOVE_RELATION="REMOVE_RELATION",e.ROLLBACK="ROLLBACK",e.ROLLBACK_ALL="ROLLBACK_ALL",e.ADD_FULL="ADD_FULL",e.EDIT_FULL="EDIT_FULL",e.DELETE_FULL="DELETE_FULL",e.IMPORT_FULL="IMPORT_FULL",e.CLONE_FULL="CLONE_FULL",e.APPEND_RELATION_FULL="APPEND_RELATION_FULL",e.UPDATE_RELATION_FULL="UPDATE_RELATION_FULL",e.REMOVE_RELATION_FULL="REMOVE_RELATION_FULL",e.ROLLBACK_FULL="ROLLBACK_FULL",e.ROLLBACK_ALL_FULL="ROLLBACK_ALL_FULL",e.PROJECT="PROJECT",e.USER="USER",e.PERMISSION="PERMISSION",e.BRICK="BRICK",e.ROUTE="ROUTE",e.TEMPLATE="TEMPLATE",e.SNIPPET="SNIPPET",e.I18N="I18N",e.IMAGE="IMAGE",e.FUNCTION="FUNCTION",e.MENU="MENU",e.MENU_ITEM="MENU_ITEM",e.WORKFLOW="WORKFLOW",e}({});const na="bricks/visual-builder/workbench-history-action";var aa=n(9740),ia=n(6330),oa=n(7067),ra=function(){var e=(0,ia.A)((function*(e,t,n){return(yield oa.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,aa.A)((0,aa.A)({},n),{},{params:t}))).data}));return function(t,n,a){return e.apply(this,arguments)}}(),sa=n(8799);const la={add:`${na}:${ta.ADD}`,edit:`${na}:${ta.EDIT}`,delete:`${na}:${ta.DELETE}`,batch_delete:`${na}:${ta.DELETE}`,import:`${na}:${ta.IMPORT}`,clone:`${na}:${ta.CLONE}`,append_relation:`${na}:${ta.APPEND_RELATION}`,update_relation:`${na}:${ta.UPDATE_RELATION}`,remove_relation:`${na}:${ta.REMOVE_RELATION}`,rollback:`${na}:${ta.ROLLBACK}`,rollback_all:`${na}:${ta.ROLLBACK_ALL}`},ca={add:`${na}:${ta.ADD_FULL}`,edit:`${na}:${ta.EDIT_FULL}`,delete:`${na}:${ta.DELETE_FULL}`,batch_delete:`${na}:${ta.DELETE_FULL}`,import:`${na}:${ta.IMPORT_FULL}`,clone:`${na}:${ta.CLONE_FULL}`,append_relation:`${na}:${ta.APPEND_RELATION_FULL}`,update_relation:`${na}:${ta.UPDATE_RELATION_FULL}`,remove_relation:`${na}:${ta.REMOVE_RELATION_FULL}`,rollback:`${na}:${ta.ROLLBACK_FULL}`,rollback_all:`${na}:${ta.ROLLBACK_ALL_FULL}`},da={project:`${na}:${ta.PROJECT}`,userGroup:`${na}:${ta.USER}`,permission:`${na}:${ta.PERMISSION}`,brick:`${na}:${ta.BRICK}`,route:`${na}:${ta.ROUTE}`,template:`${na}:${ta.TEMPLATE}`,snippet:`${na}:${ta.SNIPPET}`,i18n:`${na}:${ta.I18N}`,image:`${na}:${ta.IMAGE}`,function:`${na}:${ta.FUNCTION}`,menu:`${na}:${ta.MENU}`,menuItem:`${na}:${ta.MENU_ITEM}`,workflow:`${na}:${ta.WORKFLOW}`},ha={PROJECT_MICRO_APP:`${na}:${ta.PROJECT}`,"MICRO_APP_USER_GROUP@EASYOPS":`${na}:${ta.USER}`,MICRO_APP_RESOURCE_PERMISSION:`${na}:${ta.PERMISSION}`,STORYBOARD_BRICK:`${na}:${ta.BRICK}`,STORYBOARD_ROUTE:`${na}:${ta.ROUTE}`,STORYBOARD_TEMPLATE:`${na}:${ta.TEMPLATE}`,STORYBOARD_SNIPPET:`${na}:${ta.SNIPPET}`,STORYBOARD_I18N:`${na}:${ta.I18N}`,MICRO_APP_RESOURCE_IMAGE:`${na}:${ta.IMAGE}`,STORYBOARD_FUNCTION:`${na}:${ta.FUNCTION}`,MICRO_APP_RESOURCE_MENU:`${na}:${ta.MENU}`,MICRO_APP_RESOURCE_MENU_ITEM:`${na}:${ta.MENU_ITEM}`,"WORKFLOW_DEF@EASYOPS":`${na}:${ta.WORKFLOW}`};function pa(e){var t,n,a,i,o,r,s,l,c,d,h,p;const u="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",m=sa.i18n.t(da[e.category]??e.category),g=sa.i18n.t(la[u]??u),b=sa.i18n.t(ha[null===(t=e.abstract)||void 0===t?void 0:t.leftObjectId]??(null===(n=e.abstract)||void 0===n?void 0:n.leftObjectId)),A=sa.i18n.t(ha[null===(a=e.abstract)||void 0===a?void 0:a.rightObjectId]??(null===(i=e.abstract)||void 0===i?void 0:i.rightObjectId)),v=ua(null===(o=e.abstract)||void 0===o?void 0:o.nodes,null===(r=e.abstract)||void 0===r?void 0:r.nodesCount),f=ua(null===(s=e.abstract)||void 0===s?void 0:s.leftNodes,null===(l=e.abstract)||void 0===l?void 0:l.leftNodesCount),E=ua(null===(c=e.abstract)||void 0===c?void 0:c.rightNodes,null===(d=e.abstract)||void 0===d?void 0:d.rightNodesCount),k="rollback"===u?pa(e.rollBackIdInfo).abstract:null;return{category:m,action:g,leftObjectId:b,rightObjectId:A,nodes:v,leftNodes:f,rightNodes:E,abstract:sa.i18n.t(ca[u]??u,{category:m,nodes:v,leftNodes:f,rightNodes:E,nodeChanges:null===(h=e.abstract)||void 0===h||null===(h=h.nodeChanges)||void 0===h?void 0:h.join(", "),relationChanges:null===(p=e.abstract)||void 0===p||null===(p=p.relationChanges)||void 0===p?void 0:p.join(", "),leftObjectId:b,rightObjectId:A,rollbackAbstract:k}),rollbackAbstract:k}}function ua(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return sa.i18n.t(`${na}:${ta.NODE}`,{nodes:e.join(n),context:t>e.length?"ellipsis":void 0,count:t})}var ma;let ga,ba,Aa,va,fa,Ea,ka,wa,ya,xa,Na,La,Ma,Ta,Oa,Ra,Ca;(0,ea.initializeReactI18n)(na,{en:{LOAD_MORE:"Load more",LOADING:"Loading",NO_DATA:"No data",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }} etc., a total of {{ count }} items",ADD:"Add node",EDIT:"Edit node",DELETE:"Delete node",IMPORT:"Batch import node",CLONE:"Clone node",APPEND_RELATION:"Append Relation",UPDATE_RELATION:"Update Relation",REMOVE_RELATION:"Remove Relation",ROLLBACK:"Rollback",ROLLBACK_ALL:"Rollback all operations",ADD_FULL:"Add {{ category }} ({{ nodes }})",EDIT_FULL:"Edit {{ nodeChanges }} of {{ category }} ({{ nodes }})",DELETE_FULL:"Delete {{ category }} ({{ nodes }})",IMPORT_FULL:"Batch Import {{ category }} ({{ nodes }})",CLONE_FULL:"Clone {{ category }} ({{ nodes }})",APPEND_RELATION_FULL:"Append the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",UPDATE_RELATION_FULL:"Update the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",REMOVE_RELATION_FULL:"Remove the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",ROLLBACK_FULL:"Rollback to [{{ rollbackAbstract }}]",ROLLBACK_ALL_FULL:"Rollback all operations",PROJECT:"Project",USER:"User Group",PERMISSION:"Permission",BRICK:"Brick",ROUTE:"Route",TEMPLATE:"Template",SNIPPET:"Snippet",I18N:"I18N",IMAGE:"Image",FUNCTION:"Function",MENU:"Menu",MENU_ITEM:"Menu item",WORKFLOW:"Workflow"},zh:{LOAD_MORE:"加载更多",LOADING:"加载中",NO_DATA:"没有数据",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }}等共{{ count }}项",ADD:"新增节点",EDIT:"编辑节点",DELETE:"删除节点",IMPORT:"批量导入节点",CLONE:"克隆节点",APPEND_RELATION:"添加关系",UPDATE_RELATION:"更新关系",REMOVE_RELATION:"移除关系",ROLLBACK:"回滚",ROLLBACK_ALL:"回滚全部操作",ADD_FULL:"新增{{ category }}({{ nodes }})",EDIT_FULL:"编辑{{ category }}({{ nodes }})的 {{ nodeChanges }}",DELETE_FULL:"删除{{ category }}({{ nodes }})",IMPORT_FULL:"批量导入{{ category }}({{ nodes }})",CLONE_FULL:"克隆{{ category }}({{ nodes }})",APPEND_RELATION_FULL:"添加{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",UPDATE_RELATION_FULL:"更新{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",REMOVE_RELATION_FULL:"移除{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",ROLLBACK_FULL:"回滚到【{{ rollbackAbstract }}】",ROLLBACK_ALL_FULL:"回滚全部操作",PROJECT:"项目",USER:"用户组",PERMISSION:"权限点",BRICK:"构件",ROUTE:"路由",TEMPLATE:"模版",SNIPPET:"片段",I18N:"国际化",IMAGE:"图片",FUNCTION:"函数",MENU:"菜单",MENU_ITEM:"菜单项",WORKFLOW:"工作流"}});const{defineElement:_a,property:Ia,event:Sa}=(0,u.createDecorators)(),Da=(0,m.wrapBrick)("eo-button"),Pa=(0,m.wrapBrick)("eo-link"),Wa=(0,m.wrapBrick)("eo-icon"),$a=(0,m.wrapBrick)("eo-easyops-avatar"),Ba=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});let Fa;var Ua=new WeakMap,Ka=new WeakMap,ja=new WeakMap,za=new WeakSet,Va=new WeakMap,Ha=new WeakMap,Ya=new WeakMap,Ga=new WeakMap,Xa=new WeakMap;class qa extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,za),(0,o.A)(this,Ua,ba(this)),(0,o.A)(this,Ka,(Aa(this),va(this))),(0,o.A)(this,ja,(fa(this),Ea(this))),(0,o.A)(this,Va,(ya(this),e=>{(0,s.A)(za,this,ka).emit(e)})),(0,o.A)(this,Ha,xa(this)),(0,o.A)(this,Ya,(Ma(this),e=>{(0,s.A)(za,this,Na).emit(e)})),(0,o.A)(this,Ga,Ta(this)),(0,o.A)(this,Xa,(Ca(this),()=>{(0,s.A)(za,this,Oa).emit()}))}get appId(){return(0,c.A)(Ua,this)}set appId(e){(0,l.A)(Ua,this,e)}get projectId(){return(0,c.A)(Ka,this)}set projectId(e){(0,l.A)(Ka,this,e)}render(){return p().createElement(Ja,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,c.A)(Va,this),onRollback:(0,c.A)(Ya,this),onRollbackAll:(0,c.A)(Xa,this)})}}function Ja(e){const{appId:t,onHistoryItemClick:n,onRollback:a,onRollbackAll:i}=e,{t:o}=(0,ea.useTranslation)(na),[r,s]=(0,h.useState)(!1),[l,c]=(0,h.useState)(!0),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)([]),b=(0,h.useRef)(""),A=e=>{s(!0),ra(t,{ts:b.current,limit:20}).then((t=>{g((n=>{const a=t.list.map((e=>({...e,translation:pa(e)})));return e?a:n.concat(a)})),b.current=t.ts,u(t.list.length<20),c(t.list.length<20)})).catch((e=>{(0,De.handleHttpError)(e)})).finally((()=>{s(!1)}))};return p().createElement(Ba,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(c(!0),u(!1),g([]),b.current="",A(!0))}},p().createElement(Da,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),p().createElement("div",null,p().createElement("div",{className:"history-title"},"History"),p().createElement("div",{className:"history-list"},m.length?p().createElement(p().Fragment,null,m.map(((e,t)=>p().createElement(Qa,{key:`${e.uniqueKey}-${e.ts}`,data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:n,onRollback:a}))),!l&&p().createElement("span",{className:"load-more-container"},p().createElement(Pa,{className:"load-more",disabled:r,onClick:()=>A()},o(ta.LOAD_MORE))),d&&p().createElement("span",{className:"end-container"},"The End",p().createElement(Wa,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):p().createElement("div",{className:"empty"},o(r?ta.LOADING:ta.NO_DATA))),p().createElement("slot",null)))}function Qa(e){const{data:t,enableRollback:n,current:a,onHistoryItemClick:i,onRollback:o}=e,r=Qn()(Number(t.ts)/1e6),s=Qn().duration(r.diff(Qn()())),l=s.days()<=-1?r.format("YYYY-MM-DD HH:mm:ss"):s.humanize(!0,{ss:0,s:60,m:60,h:24});return p().createElement("div",{className:"item-container"},p().createElement("div",{className:"item-title"},p().createElement("div",{className:"title-left",onClick:()=>i({...t,enableRollback:n})},p().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),a&&p().createElement("div",{className:"branch"},"(current)")),p().createElement("div",{className:"title-right"},n&&p().createElement(Wa,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),p().createElement("div",{className:"item-info"},p().createElement($a,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),p().createElement("div",{className:"time"},l),p().createElement("div",{className:"operator"},t.user)))}ma=qa,({e:[ba,Aa,va,fa,Ea,ka,wa,ya,xa,Na,La,Ma,Ta,Oa,Ra,Ca],c:[Fa,ga]}=(0,d.A)(ma,[_a("visual-builder.workbench-history-action",{styleTexts:[Zn.A]})],[[Ia(),1,"appId"],[Ia(),1,"projectId"],[Sa({type:"history.item.click"}),1,"historyItemClickEvent",e=>(0,c.A)(ja,e),(e,t)=>(0,l.A)(ja,e,t)],[Sa({type:"rollback"}),1,"rollbackEvent",e=>(0,c.A)(Ha,e),(e,t)=>(0,l.A)(Ha,e,t)],[Sa({type:"rollback.all"}),1,"rollbackAllEvent",e=>(0,c.A)(Ga,e),(e,t)=>(0,l.A)(Ga,e,t)]],0,(e=>Xa.has((0,r.A)(e))),m.ReactNextElement)),ga();var Za,ei=n(2381);let ti,ni,ai,ii,oi,ri,si,li,ci,di,hi,pi,ui,mi,gi,bi,Ai,vi,fi,Ei,ki,wi,yi,xi,Ni,Li,Mi,Ti,Oi,Ri,Ci,_i,Ii,Si,Di,Pi,Wi,$i,Bi,Fi,Ui,Ki,ji,zi,Vi,Hi,Yi,Gi,Xi,qi,Ji,Qi,Zi;const{defineElement:eo,property:to,event:no}=(0,u.createDecorators)(),ao=(0,m.wrapBrick)("eo-icon"),io=(0,m.wrapBrick)("eo-tooltip"),oo=new Set;let ro;var so=new WeakMap,lo=new WeakMap,co=new WeakMap,ho=new WeakMap,po=new WeakMap,uo=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap,Ao=new WeakSet,vo=new WeakMap,fo=new WeakMap,Eo=new WeakMap,ko=new WeakMap,wo=new WeakMap,yo=new WeakMap,xo=new WeakMap,No=new WeakMap,Lo=new WeakMap,Mo=new WeakMap,To=new WeakMap,Oo=new WeakMap,Ro=new WeakMap,Co=new WeakMap,_o=new WeakMap,Io=new WeakMap,So=new WeakMap;class Do extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Ao),(0,o.A)(this,so,ni(this)),(0,o.A)(this,lo,(ai(this),ii(this))),(0,o.A)(this,co,(oi(this),ri(this))),(0,o.A)(this,ho,(si(this),li(this))),(0,o.A)(this,po,(ci(this),di(this))),(0,o.A)(this,uo,(hi(this),pi(this))),(0,o.A)(this,mo,(ui(this),mi(this))),(0,o.A)(this,go,(gi(this),bi(this))),(0,o.A)(this,bo,(Ai(this),vi(this))),(0,o.A)(this,vo,(ki(this),e=>{(0,s.A)(Ao,this,fi).emit(e)})),(0,o.A)(this,fo,wi(this)),(0,o.A)(this,Eo,(Ni(this),e=>{(0,s.A)(Ao,this,yi).emit(e)})),(0,o.A)(this,ko,Li(this)),(0,o.A)(this,wo,(Oi(this),()=>{(0,s.A)(Ao,this,Mi).emit()})),(0,o.A)(this,yo,Ri(this)),(0,o.A)(this,xo,(Ii(this),()=>{(0,s.A)(Ao,this,Ci).emit()})),(0,o.A)(this,No,Si(this)),(0,o.A)(this,Lo,(Wi(this),e=>{(0,s.A)(Ao,this,Di).emit(e)})),(0,o.A)(this,Mo,$i(this)),(0,o.A)(this,To,(Ui(this),()=>{(0,s.A)(Ao,this,Bi).emit()})),(0,o.A)(this,Oo,Ki(this)),(0,o.A)(this,Ro,(Vi(this),e=>{(0,s.A)(Ao,this,ji).emit(e)})),(0,o.A)(this,Co,Hi(this)),(0,o.A)(this,_o,(Xi(this),e=>{(0,s.A)(Ao,this,Yi).emit(e)})),(0,o.A)(this,Io,qi(this)),(0,o.A)(this,So,(Zi(this),e=>{(0,s.A)(Ao,this,Ji).emit(e)}))}get label(){return(0,c.A)(so,this)}set label(e){(0,l.A)(so,this,e)}get type(){return(0,c.A)(lo,this)}set type(e){(0,l.A)(lo,this,e)}get external(){return(0,c.A)(co,this)}set external(e){(0,l.A)(co,this,e)}get subNodes(){return(0,c.A)(ho,this)}set subNodes(e){(0,l.A)(ho,this,e)}get active(){return(0,c.A)(po,this)}set active(e){(0,l.A)(po,this,e)}get notSynced(){return(0,c.A)(uo,this)}set notSynced(e){(0,l.A)(uo,this,e)}get disableChildAppend(){return(0,c.A)(mo,this)}set disableChildAppend(e){(0,l.A)(mo,this,e)}get autoFocusOnce(){return(0,c.A)(go,this)}set autoFocusOnce(e){(0,l.A)(go,this,e)}render(){return p().createElement(Po,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,c.A)(vo,this),onLabelChange:(0,c.A)(Eo,this),onNodeClick:(0,c.A)(wo,this),onNodeDoubleClick:(0,c.A)(xo,this),onNodeContextMenu:(0,c.A)(Lo,this),onChildAppend:(0,c.A)(To,this),onExternalClick:(0,c.A)(Ro,this),onSubNodeDoubleClick:(0,c.A)(_o,this),onSubNodeContextMenu:(0,c.A)(So,this)})}}function Po(e){let{label:t,type:n,external:a,subNodes:i,autoFocusOnce:o,onLabelEditingChange:r,onLabelChange:s,onNodeClick:l,onNodeDoubleClick:c,onNodeContextMenu:d,onChildAppend:u,onExternalClick:m,onSubNodeDoubleClick:g,onSubNodeContextMenu:b}=e;const A="board"===n?"board":"page",[f,E]=(0,h.useState)(t),[k,w]=(0,h.useState)(!1),y=(0,h.useRef)(!1),[x,N]=(0,h.useState)(!1),L=(0,h.useRef)(null);(0,h.useEffect)((()=>{E(t)}),[t]);const M=(0,h.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),w(!0)}),[]);(0,h.useEffect)((()=>{o&&!oo.has(o)&&(oo.add(o),setTimeout((()=>{w(!0)}),1))}),[o]),(0,h.useEffect)((()=>{var e,t;k&&(null===(e=L.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=L.current)||void 0===t||t.select())}),[k]),(0,h.useEffect)((()=>{y.current?null==r||r(k):y.current=!0}),[k,r]);const T=(0,h.useCallback)((e=>{E(e.target.value)}),[]),O=(0,h.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=L.current)||void 0===n||n.blur()}),[]),R=(0,h.useCallback)((()=>{w(!1),N(!0)}),[]);(0,h.useEffect)((()=>{x&&(null==s||s(f),N(!1))}),[f,s,x]);const C=(0,h.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),_=(0,h.useCallback)((e=>{e.stopPropagation(),null==m||m(a)}),[a,m]),I=(0,h.useCallback)((e=>{e.stopPropagation()}),[]),S=38*Math.max(0,Math.floor(((null==i?void 0:i.length)??0)-3));return p().createElement(p().Fragment,null,p().createElement("div",{className:v()("node",A,{"editing-label":k}),style:{height:"board"===A?70:130+S},onClick:l,onDoubleClick:c,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},p().createElement("input",{className:"label-input",value:f,ref:L,onChange:T,onKeyDown:O,onBlur:R,onDoubleClick:I,onContextMenu:I,onMouseDown:I}),p().createElement("div",{className:"label",onDoubleClick:M,onMouseDown:I},f),"board"===A?p().createElement("div",{className:"icon-container"},p().createElement(ao,{lib:"antd",icon:"unordered-list"})):p().createElement("div",{className:"thumbnail-container",style:{height:98+S}},p().createElement("div",{className:"thumbnail-placeholder"},p().createElement(ao,{lib:"antd",icon:"ellipsis"})),a&&p().createElement("div",{className:"external",onClick:_,onDoubleClick:I,onMouseDown:I},p().createElement(ao,{lib:"antd",icon:"desktop"}),p().createElement("span",{className:"external-label"},a.label)),null!=i&&i.length?p().createElement("div",{className:"sub-nodes"},i.map((e=>p().createElement(Wo,{key:e.id,subNode:e,onSubNodeDoubleClick:g,onSubNodeContextMenu:b})))):null)),p().createElement("div",{className:"add-button",role:"button",onClick:C,onMouseDown:I},p().createElement(ao,{lib:"fa",icon:"plus"})))}function Wo(e){let{subNode:t,onSubNodeDoubleClick:n,onSubNodeContextMenu:a}=e;return p().createElement(io,{key:t.id,content:t.label},p().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==n||n(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==a||a({node:t,clientX:e.clientX,clientY:e.clientY})}},p().createElement("div",{className:"sub-node-skeleton-title"}),p().createElement("div",{className:"sub-node-skeleton-content"}),p().createElement("div",{className:"sub-node-skeleton-button"})))}Za=Do,({e:[ni,ai,ii,oi,ri,si,li,ci,di,hi,pi,ui,mi,gi,bi,Ai,vi,fi,Ei,ki,wi,yi,xi,Ni,Li,Mi,Ti,Oi,Ri,Ci,_i,Ii,Si,Di,Pi,Wi,$i,Bi,Fi,Ui,Ki,ji,zi,Vi,Hi,Yi,Gi,Xi,qi,Ji,Qi,Zi],c:[ro,ti]}=(0,d.A)(Za,[eo("visual-builder.page-arch-node",{styleTexts:[ei.A]})],[[to(),1,"label"],[to(),1,"type"],[to({attribute:!1}),1,"external"],[to({attribute:!1}),1,"subNodes"],[to({type:Boolean,render:!1}),1,"active"],[to({type:Boolean,render:!1}),1,"notSynced"],[to({type:Boolean,render:!1}),1,"disableChildAppend"],[to(),1,"autoFocusOnce"],[no({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,c.A)(bo,e),(e,t)=>(0,l.A)(bo,e,t)],[no({type:"label.change"}),1,"labelChange",e=>(0,c.A)(fo,e),(e,t)=>(0,l.A)(fo,e,t)],[no({type:"node.click"}),1,"nodeClick",e=>(0,c.A)(ko,e),(e,t)=>(0,l.A)(ko,e,t)],[no({type:"node.dblclick"}),1,"nodeDoubleClick",e=>(0,c.A)(yo,e),(e,t)=>(0,l.A)(yo,e,t)],[no({type:"node.contextmenu"}),1,"nodeContextMenu",e=>(0,c.A)(No,e),(e,t)=>(0,l.A)(No,e,t)],[no({type:"child.append"}),1,"childAppend",e=>(0,c.A)(Mo,e),(e,t)=>(0,l.A)(Mo,e,t)],[no({type:"external.click"}),1,"externalClick",e=>(0,c.A)(Oo,e),(e,t)=>(0,l.A)(Oo,e,t)],[no({type:"subNode.dblclick"}),1,"subNodeDoubleClick",e=>(0,c.A)(Co,e),(e,t)=>(0,l.A)(Co,e,t)],[no({type:"subNode.contextmenu"}),1,"subNodeContextMenu",e=>(0,c.A)(Io,e),(e,t)=>(0,l.A)(Io,e,t)]],0,(e=>So.has((0,r.A)(e))),m.ReactNextElement)),ti();var $o,Bo=n(5664),Fo=n(6213),Uo=n(2559);function Ko(e,t,n,a){return t((0,Uo.A)(e,n),a),a}let jo,zo,Vo,Ho,Yo,Go,Xo,qo,Jo;const{method:Qo,property:Zo}=(0,u.createDecorators)();var er=new WeakMap,tr=new WeakSet,nr=new WeakMap,ar=new WeakMap,ir=new WeakMap,or=new WeakMap,rr=new WeakMap,sr=new WeakMap;class lr extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,tr),(0,o.A)(this,er,(jo(this),!1)),(0,o.A)(this,nr,"normal"),(0,o.A)(this,ar,!1),(0,o.A)(this,ir,zo(this)),(0,o.A)(this,or,(Vo(this),Ho(this))),(0,o.A)(this,rr,(Yo(this),Go(this))),(0,o.A)(this,sr,(Xo(this),qo(this))),Jo(this)}get isFormItemElement(){return!0}set validateState(e){Ko(tr,pr,this,e),this._render()}get validateState(){return(0,s.A)(tr,this,hr)}set notRender(e){this.hidden=e,Ko(tr,dr,this,e),this._render()}get notRender(){return(0,s.A)(tr,this,cr)}get $bindFormItem(){return(0,s.A)(tr,this,ur)}set $bindFormItem(e){Ko(tr,mr,this,e),this._render()}get helpBrick(){return(0,c.A)(ir,this)}set helpBrick(e){(0,l.A)(ir,this,e)}get labelBrick(){return(0,c.A)(or,this)}set labelBrick(e){(0,l.A)(or,this,e)}get labelCol(){return(0,c.A)(rr,this)}set labelCol(e){(0,l.A)(rr,this,e)}get wrapperCol(){return(0,c.A)(sr,this)}set wrapperCol(e){(0,l.A)(sr,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function cr(e){return(0,c.A)(er,e)}function dr(e,t){(0,l.A)(er,e,t)}function hr(e){return(0,c.A)(nr,e)}function pr(e,t){(0,l.A)(nr,e,t)}function ur(e){return(0,c.A)(ar,e)}function mr(e,t){(0,l.A)(ar,e,t)}$o=lr,[zo,Vo,Ho,Yo,Go,Xo,qo,Jo,jo]=(0,d.A)($o,[],[[Zo({attribute:!1}),1,"helpBrick"],[Zo({attribute:!1}),1,"labelBrick"],[Zo({attribute:!1}),1,"labelCol"],[Zo({attribute:!1}),1,"wrapperCol"],[Qo(),2,"setNotRender"],[Qo(),2,"getFormElement"]],0,void 0,m.ReactNextElement).e;var gr=function(){var e=(0,ia.A)((function*(e,t){return(yield oa.http.post("api/gateway/next_builder.contract_center.SearchContract/api/v1/contract/search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();let br=function(e){return e.CONTRACT_OPTIONS_TIPS_PREFIX="CONTRACT_OPTIONS_TIPS_PREFIX",e.CONTRACT_OPTIONS_TIPS_SUFFIX="CONTRACT_OPTIONS_TIPS_SUFFIX",e.CONTRACT_VALIDATE_MESSAGE="CONTRACT_VALIDATE_MESSAGE",e}({});const Ar="bricks/visual-builder/contract-select",vr={en:{CONTRACT_OPTIONS_TIPS_PREFIX:"Only the first",CONTRACT_OPTIONS_TIPS_SUFFIX:"items are displayed, please search for more results",CONTRACT_VALIDATE_MESSAGE:"Please fill in the correct contract name "},zh:{CONTRACT_OPTIONS_TIPS_PREFIX:"仅展示前",CONTRACT_OPTIONS_TIPS_SUFFIX:"项,更多结果请搜索",CONTRACT_VALIDATE_MESSAGE:"请填写正确的契约名称"}};(0,ea.initializeReactI18n)(Ar,vr);const fr=(0,m.wrapBrick)("eo-icon"),Er=(0,m.wrapBrick)("eo-input",{onChange:"change"});function kr(e){const{itemsCount:t=20,onBlur:n}=e,[a,i]=(0,h.useState)(t),{t:o}=(0,ea.useTranslation)(Ar),[r,s]=(0,h.useState)(!1);return p().createElement("div",{className:"options-tips",slot:e.slot},o(br.CONTRACT_OPTIONS_TIPS_PREFIX)," ",r?p().createElement(Er,{autoFocus:!0,inputStyle:{width:65},value:String(a),onBlur:()=>{s(!1),null==n||n(a)},onChange:e=>{i(Number(e.detail))}}):p().createElement("span",null,a," ",p().createElement(fr,{icon:"edit",lib:"antd",onClick:()=>{s(!0)}}))," ",o(br.CONTRACT_OPTIONS_TIPS_SUFFIX))}var wr;let yr,xr,Nr,Lr,Mr,Tr,Or,Rr,Cr,_r,Ir,Sr,Dr,Pr,Wr;(0,ea.initializeReactI18n)(Ar,vr);const{defineElement:$r,property:Br,event:Fr}=(0,u.createDecorators)(),Ur=(0,m.wrapBrick)("eo-form-item"),Kr=(0,m.wrapBrick)("eo-auto-complete",{onChange:"change"});let jr;var zr=new WeakMap,Vr=new WeakMap,Hr=new WeakMap,Yr=new WeakMap,Gr=new WeakMap,Xr=new WeakMap,qr=new WeakSet;function Jr(e){if("string"!=typeof e)return{name:"",version:""};const[t,n]=e.split(":");return{name:t,version:n}}function Qr(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function Zr(e){return(0,at.isNil)(e)||Qr(e)?"":sa.i18n.t(`${Ar}:${br.CONTRACT_VALIDATE_MESSAGE}`)}function es(e){let{value:t,inputStyle:n,validateState:a,suffix:i,onChange:o}=e;const[r,s]=(0,h.useState)(),[l,c]=(0,h.useState)(20),d=function(e){let{pageSize:t=20,q:n=""}=e;const[a,i]=(0,h.useState)([]),[o,r]=(0,h.useState)(n),[s,l]=(0,h.useState)(t);return(0,h.useEffect)((()=>{r(n)}),[n]),(0,h.useEffect)((()=>{l(t)}),[t]),(0,h.useEffect)((()=>{(async()=>{try{const{list:e}=await gr({page:1,pageSize:s,fullContractName:o},{interceptorParams:{ignoreLoadingBar:!0}});i(e)}catch(e){console.error(e),i([])}})()}),[o,s]),a}({q:r,pageSize:l}),[u,m]=(0,h.useState)(Jr(t)),[g,b]=(0,h.useState)([]);(0,h.useEffect)((()=>{m(Jr(t))}),[t]);const A=(0,h.useMemo)((()=>(0,at.debounce)((e=>{s(e)}),200)),[]);return p().createElement("div",{className:"contract-wrapper"},p().createElement(Kr,{className:"contract-selector",options:null==d?void 0:d.map((e=>({value:e.fullContractName,label:e.fullContractName}))),value:u.name,inputStyle:n,validateState:a,onChange:e=>{const t=e.detail;if(Qr(t))m(Jr(t)),null==o||o(t);else{var n;const e=null===(n=d.find((e=>e.fullContractName===t)))||void 0===n?void 0:n.version,a=(null==e?void 0:e[0])??"";b(e),m({name:t,version:a}),null==o||o(`${t}:${a}`)}A(t)}},p().createElement(kr,{onBlur:e=>c(e),slot:"options-toolbar"})),p().createElement(Kr,{className:"version-selector",value:u.version,validateState:a,options:null==g?void 0:g.map((e=>({value:e,label:e}))),onChange:e=>{const t=e.detail;m({name:u.name,version:t}),null==o||o(`${u.name}:${t}`)}}),null!=i&&i.useBrick?p().createElement(Bo.ReactUseMultipleBricks,i):null)}wr=class extends lr{constructor(){super(...arguments),(0,i.A)(this,qr),(0,o.A)(this,zr,xr(this)),(0,o.A)(this,Vr,(Nr(this),Lr(this))),(0,o.A)(this,Hr,(Mr(this),Tr(this))),(0,o.A)(this,Yr,(Or(this),Rr(this))),(0,o.A)(this,Gr,(Cr(this),_r(this))),(0,o.A)(this,Xr,(Ir(this),Sr(this))),(0,q.A)(this,"handleChange",(Wr(this),e=>{(0,s.A)(qr,this,Dr).emit(e)}))}get name(){return(0,c.A)(zr,this)}set name(e){(0,l.A)(zr,this,e)}get required(){return(0,c.A)(Vr,this)}set required(e){(0,l.A)(Vr,this,e)}get label(){return(0,c.A)(Hr,this)}set label(e){(0,l.A)(Hr,this,e)}get value(){return(0,c.A)(Yr,this)}set value(e){(0,l.A)(Yr,this,e)}get suffix(){return(0,c.A)(Gr,this)}set suffix(e){(0,l.A)(Gr,this,e)}render(){return p().createElement(Ur,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,labelBrick:this.labelBrick,helpBrick:this.helpBrick,notRender:this.notRender,trigger:"handleChange",validator:Zr},p().createElement(es,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[xr,Nr,Lr,Mr,Tr,Or,Rr,Cr,_r,Ir,Sr,Dr,Pr,Wr],c:[jr,yr]}=(0,d.A)(wr,[$r("visual-builder.contract-select",{styleTexts:[Fo.A]})],[[Br(),1,"name"],[Br({type:Boolean}),1,"required"],[Br(),1,"label"],[Br({attribute:!1}),1,"value"],[Br({attribute:!1}),1,"suffix"],[Fr({type:"change"}),1,"changeEvent",e=>(0,c.A)(Xr,e),(e,t)=>(0,l.A)(Xr,e,t)]],0,(e=>qr.has((0,r.A)(e))),lr)),yr();var ts,ns=n(7540);let as,is,os,rs,ss,ls,cs,ds,hs,ps,us,ms,gs,bs,As,vs;const fs=(0,m.wrapBrick)("eo-menu"),Es=(0,m.wrapBrick)("eo-menu-item"),ks=(0,m.wrapBrick)("eo-tooltip"),ws=(0,Xn.unwrapProvider)("basic.lock-body-scroll");(0,ea.initializeReactI18n)("bricks/visual-builder/generate-snippets-context-menu",{en:{},zh:{}});const{defineElement:ys,property:xs,event:Ns,method:Ls}=(0,u.createDecorators)();let Ms;var Ts=new WeakMap,Os=new WeakMap,Rs=new WeakMap,Cs=new WeakMap,_s=new WeakSet,Is=new WeakMap,Ss=new WeakMap,Ds=new WeakMap;class Ps extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,_s),(0,o.A)(this,Ts,(as(this),os(this))),(0,o.A)(this,Os,(rs(this),ss(this))),(0,o.A)(this,Rs,(ls(this),cs(this))),(0,o.A)(this,Cs,(ds(this),hs(this))),(0,o.A)(this,Is,(ms(this),gs(this))),(0,o.A)(this,Ss,(vs(this),e=>{(0,s.A)(_s,this,ps).emit(e)})),(0,o.A)(this,Ds,(e=>{(0,s.A)(_s,this,bs).emit(e)}))}get options(){return(0,c.A)(Ts,this)}set options(e){(0,l.A)(Ts,this,e)}get active(){return(0,c.A)(Os,this)}set active(e){(0,l.A)(Os,this,e)}get position(){return(0,c.A)(Rs,this)}set position(e){(0,l.A)(Rs,this,e)}open(e){let{position:t}=e;this.active=!0,this.position=t}close(){this.active=!1,this.position=void 0}disconnectedCallback(){super.disconnectedCallback(),ws(this,!1)}render(){return p().createElement(Ws,{active:this.active,element:this,position:this.position,onItemDragStart:(0,c.A)(Ss,this),onItemDragEnd:(0,c.A)(Ds,this),options:this.options})}}function Ws(e){var t,n;let{element:a,active:i,onItemDragEnd:o,onItemDragStart:r,options:s,position:l}=e;const[c,d]=(0,h.useState)(!1),u=(0,h.useRef)(null),[m,g]=(0,h.useState)(null),b=(0,h.useCallback)((e=>{e.preventDefault(),null==a||a.close()}),[a]),A=(0,h.useCallback)(((e,t)=>{var n;d(!0),t.dragConf&&(null===(n=e.dataTransfer)||void 0===n||n.setData(t.dragConf.format,JSON.stringify(t.dragConf.data))),e.target.classList.add("dragging"),null==r||r(t)}),[r]),v=(0,h.useCallback)(((e,t)=>{d(!1),e.target.classList.remove("dragging"),null==a||a.close(),null==o||o(t)}),[a,o]);return(0,h.useEffect)((()=>{ws(a,i)}),[i,a]),(0,h.useEffect)((()=>{if(i&&u.current&&l){const e=u.current.getBoundingClientRect(),t=e.width+8,n=e.height+8,{clientWidth:a,clientHeight:i}=document.documentElement,o=[...l];a>t&&l[0]+t>a&&(o[0]=l[0]-t),i>n&&l[1]+n>i&&(o[1]=i-n),g(o)}else g(null)}),[i,l]),p().createElement(p().Fragment,null,!c&&p().createElement("div",{className:"mask",onClick:b,onContextMenu:b}),p().createElement("div",{className:"container",ref:u,style:{left:null===(t=m??l)||void 0===t?void 0:t[0],top:null===(n=m??l)||void 0===n?void 0:n[1],visibility:m?"visible":"hidden"}},null==s?void 0:s.map(((e,t)=>{var n,a;return p().createElement("div",{key:t},p().createElement("div",{className:"title"},e.title),(null===(n=e.children)||void 0===n?void 0:n.length)&&p().createElement(fs,null,null===(a=e.children)||void 0===a?void 0:a.map(((e,t)=>p().createElement(ks,{content:e.tooltip,hoist:!0,placement:"left",key:t},p().createElement(Es,{disabled:e.disabled,icon:e.icon,draggable:!e.disabled,onDragStart:t=>A(t,e),onDragEnd:t=>v(t,e)},e.text))))))}))))}ts=Ps,({e:[os,rs,ss,ls,cs,ds,hs,ps,us,ms,gs,bs,As,vs,as],c:[Ms,is]}=(0,d.A)(ts,[ys("visual-builder.generate-snippets-context-menu",{styleTexts:[ns.A]})],[[xs({attribute:!1}),1,"options"],[xs({type:Boolean}),1,"active"],[xs({attribute:!1}),1,"position"],[Ns({type:"item.drag.start"}),1,"itemDragStartEvent",e=>(0,c.A)(Cs,e),(e,t)=>(0,l.A)(Cs,e,t)],[Ns({type:"item.drag.end"}),1,"itemDragEndEvent",e=>(0,c.A)(Is,e),(e,t)=>(0,l.A)(Is,e,t)],[Ls(),2,"open"],[Ls(),2,"close"]],0,(e=>Ds.has((0,r.A)(e))),m.ReactNextElement)),is();var $s=n(1085),Bs=n(3091),Fs=n(7447),Us=n(3640),Ks=n(4360),js=n(3544),zs=n(4650),Vs=n(9830);function Hs(){function e(e,t,n){if(!n||"pre"!==n.tagName||"code"!==e.tagName)return;const a=function(e){const t=e.properties.className||[];for(const e of t)if("language-"===e.slice(0,9))return e.slice(9).toLowerCase();return null}(e);if(null===a)return;let i;try{n.properties.className=(n.properties.className||[]).concat("language-"+a),i=Vs.L.highlight((0,zs.d)(e),a)}catch{return}e.children=i.children}return t=>{(0,js.YR)(t,"element",e)}}const Ys={Fragment:$s.Fragment,jsx:$s.jsx,jsxs:$s.jsxs};function Gs(e){let{content:t}=e;const[n,a]=(0,h.useState)(null);return(0,h.useEffect)((()=>{let e=!1;return(0,Bs.l)().use(Fs.A).use(Us.A).use([Hs]).use(Ks.A,Ys).process(t).then((t=>{e||a(t.result)})).catch((t=>{e||(console.error("Convert markdown failed:",t),a(null))})),()=>{e=!0}}),[t]),n}const Xs=(0,m.wrapBrick)("eo-avatar");function qs(e){let{message:t}=e;const n=(0,h.useMemo)((()=>{const e=[];if("assistant"===t.role){const n=/(?:^|\n)```(easy_cmd_\S+)\n([\s\S]*?)\n```(?:$|\n)/gm;let a,i=0;for(;a=n.exec(t.content);){const[o,r,s]=a,l=a.index,c=t.content.slice(i,l).trim();c.length>0&&e.push({type:"markdown",content:c}),e.push({type:"command",command:r,content:s.trim(),raw:o}),i=n.lastIndex}const o=t.content.slice(i).trim();o.length>0&&e.push({type:"markdown",content:o})}else e.push({type:"plain",content:t.content});return e}),[t.content,t.role]),a=(0,h.useRef)(null);return(0,h.useEffect)((()=>{const e=a.current;e&&setTimeout((()=>{const n=e.parentElement.querySelectorAll(".texting");for(const e of n)e.classList.remove("texting");if(!t.partial)return;let a=e;for(;a;){const e=a.lastChild;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE||"DETAILS"===(null==e?void 0:e.tagName)&&!e.open){var i;if((null==e?void 0:e.nodeType)!==Node.TEXT_NODE||0!==e.textContent.trim().length||(null===(i=e.previousSibling)||void 0===i?void 0:i.nodeType)!==Node.ELEMENT_NODE)break;a=e.previousSibling}else a=e}a.classList.add("texting")}),1)}),[t.partial,t.content]),p().createElement("div",{className:v()("message",{failed:t.failed})},p().createElement("div",{className:"avatar"},p().createElement(Xs,{icon:{lib:"easyops",icon:"assistant"===t.role?"robot":"account"},size:"small",className:`role-${t.role}`})),p().createElement("div",{className:"main"},p().createElement("div",{className:"label"},"assistant"===t.role?"Assistant":"You"),p().createElement("div",{className:"content",ref:a},n.map(((e,t)=>p().createElement(Js,{key:t,chunk:e}))))))}function Js(e){let{chunk:t}=e;return p().createElement(p().Fragment,null,"markdown"===t.type?p().createElement("div",{className:"markdown"},p().createElement(Gs,{content:t.content})):"command"===t.type?p().createElement(p().Fragment,null,p().createElement("details",{className:"command"},p().createElement("summary",null,"```",t.command),p().createElement("pre",null,p().createElement("code",null,t.content)))):p().createElement("div",{className:"plain"},t.content))}var Qs,Zs=n(7236);let el,tl,nl,al,il,ol,rl,sl,ll;const{defineElement:cl,property:dl,event:hl}=(0,u.createDecorators)();let pl;var ul=new WeakMap,ml=new WeakMap,gl=new WeakMap,bl=new WeakSet,Al=new WeakMap;class vl extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,bl),(0,o.A)(this,ul,tl(this)),(0,o.A)(this,ml,(nl(this),al(this))),(0,o.A)(this,gl,(il(this),ol(this))),(0,o.A)(this,Al,(ll(this),e=>{(0,s.A)(bl,this,rl).emit(e)}))}get messages(){return(0,c.A)(ul,this)}set messages(e){(0,l.A)(ul,this,e)}get errorBoundary(){return(0,c.A)(ml,this)}set errorBoundary(e){(0,l.A)(ml,this,e)}render(){return p().createElement(fl,{host:this,messages:this.messages,errorBoundary:this.errorBoundary,onStoryboardUpdate:(0,c.A)(Al,this)})}}function fl(e){let{messages:t,host:n,errorBoundary:a,onStoryboardUpdate:i}=e;const o=(0,h.useMemo)((()=>/(?:^|\n)```easy_cmd_vb_block_(page|storyboard)\n([\s\S]*?)\n```(?:$|\n)/gm),[]),r=(0,h.useRef)(new Map),[s,l]=(0,h.useState)([]),c=(0,h.useRef)(!1);(0,h.useEffect)((()=>{for(const e of t??[]){if("assistant"!==e.role)continue;let t;o.lastIndex=r.current.get(e.key)??0;const n=[];let a=!1;for(;t=o.exec(e.content);){r.current.set(e.key,o.lastIndex);const[,i,s]=t;try{const e=JSON.parse(s);"page"===i?(a=!0,n.push(...e)):n.push({...e,type:"item"})}catch(e){console.error("parse storyboard failed:",e)}}a?l(n):n.length>0&&l((e=>[...e,...n]))}}),[o,t]);const[d,u]=(0,h.useState)([]);(0,h.useEffect)((()=>{const e=[],t=new Map;for(const n of s)"block"===n.type?e.push(n):n.storyboard&&t.set(n.uuid,n.storyboard);e.sort(((e,t)=>e.seq-t.seq));const n={brick:"eo-content-layout",children:[]},i={brick:"eo-main-view",children:[{brick:"eo-page-title",slot:"pageTitle",properties:{pageTitle:"测试页面"}}]};let o=!1;for(const r of e)if("全局操作区"===r.name)for(const e of r.children){const n=t.get(e);n&&(i.children.push({...n,properties:{...n.properties,slot:void 0},errorBoundary:a,slot:"toolbar",iid:`item:${e}`,meta:{type:"item",uuid:e,block:{uuid:r.uuid,name:r.name}}}),o=!0)}else{const e=t.get(r.uuid);if(e){const i={...e,children:[],errorBoundary:a,iid:`block:${r.uuid}`,meta:{type:"block",uuid:r.uuid,name:r.name}};o=!0,n.children.push(i);for(const e of r.children){const n=t.get(e);n&&i.children.push({...n,errorBoundary:a,iid:`item:${e}`,meta:{type:"item",uuid:e}})}}else if(!r.hasContainer)for(const e of r.children){const i=t.get(e);i&&(n.children.push({...i,errorBoundary:a,iid:`item:${e}`,meta:{type:"item",uuid:e}}),o=!0)}}i.children.push(n),u((e=>o?[i]:0===e.length?e:[]))}),[s,a]),(0,h.useEffect)((()=>{null==i||i(d)}),[i,d]);const m=(0,h.useMemo)((()=>{let e=n;for(;e;){const t=getComputedStyle(e,null).getPropertyValue("overflow-y");if("auto"===t||"scroll"===t)return e;if(e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else{if(!(e.parentNode instanceof Element))break;e=e.parentNode}}return document.scrollingElement||document.documentElement}),[n]);return(0,h.useEffect)((()=>{c.current||setTimeout((()=>{m.scrollTo(0,m.scrollHeight)}),1)}),[t,m]),(0,h.useEffect)((()=>{const e=()=>{c.current=m.scrollTop+m.clientHeight+6<m.scrollHeight};return m.addEventListener("scroll",e),()=>{m.removeEventListener("scroll",e)}}),[m]),p().createElement(p().Fragment,null,null==t?void 0:t.map(((e,t)=>p().createElement(qs,{key:e.key??`index-${t}`,message:e}))))}Qs=vl,({e:[tl,nl,al,il,ol,rl,sl,ll],c:[pl,el]}=(0,d.A)(Qs,[cl("visual-builder.chat-conversation",{styleTexts:[Zs.A]})],[[dl({attribute:!1}),1,"messages"],[dl({type:Boolean}),1,"errorBoundary"],[hl({type:"storyboard.update"}),1,"storyboardUpdate",e=>(0,c.A)(gl,e),(e,t)=>(0,l.A)(gl,e,t)]],0,(e=>Al.has((0,r.A)(e))),m.ReactNextElement)),el();var El=n(9575),kl=n(1732);function wl(e){let{variant:t,width:n,height:a,left:i,top:o,label:r}=e;return p().createElement("div",{className:"outline "+t,style:{width:n+8,height:a+8,left:i-4,top:o-4}},p().createElement("div",{className:"label"},r))}var yl,xl=n(1563);let Nl,Ll,Ml,Tl,Ol,Rl,Cl,_l,Il,Sl,Dl,Pl,Wl,$l,Bl,Fl;const{defineElement:Ul,property:Kl,event:jl,method:zl}=(0,u.createDecorators)();let Vl;var Hl=new WeakMap,Yl=new WeakMap,Gl=new WeakMap,Xl=new WeakMap,ql=new WeakMap,Jl=new WeakMap,Ql=new WeakSet,Zl=new WeakMap;class ec extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Ql),(0,o.A)(this,Hl,(Nl(this),Ml(this))),(0,o.A)(this,Yl,(Tl(this),Ol(this))),(0,o.A)(this,Gl,(Rl(this),Cl(this))),(0,o.A)(this,Xl,(_l(this),Il(this))),(0,o.A)(this,ql,(Sl(this),Dl(this))),(0,o.A)(this,Jl,(Pl(this),Wl(this))),(0,o.A)(this,Zl,(Fl(this),e=>{(0,s.A)(Ql,this,$l).emit(e)}))}get storyboard(){return(0,c.A)(Hl,this)}set storyboard(e){(0,l.A)(Hl,this,e)}get theme(){return(0,c.A)(Yl,this)}set theme(e){(0,l.A)(Yl,this,e)}get uiVersion(){return(0,c.A)(Gl,this)}set uiVersion(e){(0,l.A)(Gl,this,e)}get app(){return(0,c.A)(Xl,this)}set app(e){(0,l.A)(Xl,this,e)}get inspecting(){return(0,c.A)(ql,this)}set inspecting(e){(0,l.A)(ql,this,e)}select(e){var t;const n=null===(t=this.shadowRoot)||void 0===t||null===(t=t.querySelector("iframe"))||void 0===t?void 0:t.contentWindow;null==n||n.postMessage({channel:"chat-preview",type:"select",payload:e},location.origin)}render(){return p().createElement(tc,{storyboard:this.storyboard,theme:this.theme,uiVersion:this.uiVersion,app:this.app,inspecting:this.inspecting,onActiveTargetChange:(0,c.A)(Zl,this)})}}function tc(e){let{storyboard:t,theme:n,uiVersion:a,app:i,inspecting:o,onActiveTargetChange:r}=e;const s=(0,h.useRef)(),[l,c]=(0,h.useState)(!1),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)({x:0,y:0}),[b,A]=(0,h.useState)([]),[f,E]=(0,h.useState)([]),[k,w]=(0,h.useState)([]),[y,x]=(0,h.useState)([]),N=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=s.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?c(!0):setTimeout(e,100)};e()}),[]);(0,h.useEffect)((()=>{var e;if(!l)return;const t=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!t)throw new Error("Cannot find preview agent package: bricks/visual-builder");(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_inject)("visual-builder.inject-chat-preview-agent",{...t,filePath:`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${t.filePath}`})}),[l]),(0,h.useEffect)((()=>{var e;if(!l)return;const o=null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;o&&o("yaml",{yaml:(0,kl.safeDump)(t,{schema:kl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:i,theme:n,uiVersion:a})}),[i,l,t,n,a]);const L=(0,h.useMemo)((()=>{if(d)return()=>{setTimeout((()=>{window.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}})}),100)}}),[d]);(0,h.useEffect)((()=>{const e=e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"initialized":u(!0);break;case"inspect-hover":A(e.data.payload.outlines);break;case"scroll":g(e.data.payload);break;case"inspect-active":E(e.data.payload.outlines)}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[]),(0,h.useEffect)((()=>{var e;d&&(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e||e.postMessage({channel:"chat-preview",type:"toggle-inspecting",payload:{inspecting:o}},location.origin))}),[d,o]);const M=(0,h.useCallback)((e=>e.map((e=>{var t,n;const a=(null==s||null===(t=s.current)||void 0===t?void 0:t.offsetLeft)??0,i=(null==s||null===(n=s.current)||void 0===n?void 0:n.offsetTop)??0,{width:o,height:r,left:l,top:c,...d}=e;return{width:1*o,height:1*r,left:1*(l-m.x)+a,top:1*(c-m.y)+i,...d}}))),[m.x,m.y]);return(0,h.useEffect)((()=>{r(f[0])}),[f,r]),(0,h.useEffect)((()=>{x(M(f))}),[f,M]),(0,h.useEffect)((()=>{w(M(b))}),[b,M]),p().createElement("div",{className:v()("container",{inspecting:o})},p().createElement("iframe",{ref:s,src:`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:N,onMouseOut:L}),k.map(((e,t)=>p().createElement(wl,(0,El.A)({key:t,variant:"hover"},e)))),y.map(((e,t)=>p().createElement(wl,(0,El.A)({key:t,variant:"active"},e)))))}yl=ec,({e:[Ml,Tl,Ol,Rl,Cl,_l,Il,Sl,Dl,Pl,Wl,$l,Bl,Fl,Nl],c:[Vl,Ll]}=(0,d.A)(yl,[Ul("visual-builder.chat-preview",{styleTexts:[xl.A]})],[[Kl({attribute:!1}),1,"storyboard"],[Kl(),1,"theme"],[Kl(),1,"uiVersion"],[Kl(),1,"app"],[Kl({type:Boolean}),1,"inspecting"],[jl({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(Jl,e),(e,t)=>(0,l.A)(Jl,e,t)],[zl(),2,"select"]],0,(e=>Zl.has((0,r.A)(e))),m.ReactNextElement)),Ll();let nc=!1;const ac="item:";let ic=null;function oc(e){e.preventDefault(),e.stopPropagation(),function(e){const t=dc(e.composedPath());window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:t.map(hc)}},location.origin)}(e)}function rc(e){e.preventDefault(),e.stopPropagation()}const sc=(0,at.debounce)(((e,t,n)=>{let a=dc(e);if(0===a.length)for(const i of e)if(i instanceof HTMLElement&&i.shadowRoot){a=dc(i.shadowRoot.elementsFromPoint(t,n));break}const i=a.length>0?a[0].element:null;i!==ic&&(ic=i,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:a.map(hc)}},location.origin))}),20,{leading:!0});function lc(e){sc(e.composedPath(),e.clientX,e.clientY)}function cc(e){e.preventDefault(),e.stopPropagation(),ic=null,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}},location.origin)}function dc(e){const t=[];return e.forEach((e=>{let n;if(e.nodeType===Node.ELEMENT_NODE&&e instanceof HTMLElement&&(n=e.dataset.iid)&&n.startsWith(ac)){const a=n.substring(ac.length);t.push({type:"item",uuid:a,label:pc(e),element:e})}})),t}function hc(e){const{element:t,type:n,uuid:a,label:i}=e,{width:o,height:r,left:s,top:l}=t.getBoundingClientRect();return{width:o,height:r,left:s+window.scrollX,top:l+window.scrollY,type:n,uuid:a,label:i}}function pc(e){return e.tagName.toLowerCase().split(".").pop()}let uc=!1;function mc(e){window.parent.postMessage({channel:"chat-preview",...e},location.origin)}customElements.define("visual-builder.inject-chat-preview-agent",(0,Xn.createProviderClass)((async function(){uc||(uc=!0,n.e(2201).then(n.bind(n,2201)),mc({type:"initialized"}),window.addEventListener("message",(e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"toggle-inspecting":!function(e){if(nc===e)return;nc=e;const t=e?"addEventListener":"removeEventListener";window[t]("click",oc,!0),window[t]("mousedown",rc,!0),window[t]("mouseover",rc,!0),window[t]("mouseup",rc,!0),window[t]("pointerdown",rc,!0),window[t]("pointerover",rc,!0),window[t]("pointerup",rc,!0),window[t]("pointerleave",cc,!0),window[t]("pointermove",lc,!0)}(e.data.payload.inspecting);break;case"select":!function(e){const t=`${e.type}:${e.uuid}`,n=(0,qn.w)(t);window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:n.map((t=>hc({...e,element:t,label:pc(t)})))}},location.origin)}(e.data.payload)}})),window.addEventListener("scroll",(()=>{mc({type:"scroll",payload:{x:window.scrollX,y:window.scrollY}})})))})));var gc,bc=n(4014),Ac=n(8918);let vc,fc,Ec,kc,wc,yc,xc,Nc,Lc,Mc,Tc;const{defineElement:Oc,property:Rc}=(0,u.createDecorators)();let Cc;var _c=new WeakMap,Ic=new WeakMap,Sc=new WeakMap,Dc=new WeakMap,Pc=new WeakMap;class Wc extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,_c,fc(this)),(0,o.A)(this,Ic,(Ec(this),kc(this))),(0,o.A)(this,Sc,(wc(this),yc(this))),(0,o.A)(this,Dc,(xc(this),Nc(this))),(0,o.A)(this,Pc,(Lc(this),Mc(this))),Tc(this)}get generations(){return(0,c.A)(_c,this)}set generations(e){(0,l.A)(_c,this,e)}get category(){return(0,c.A)(Ic,this)}set category(e){(0,l.A)(Ic,this,e)}get theme(){return(0,c.A)(Sc,this)}set theme(e){(0,l.A)(Sc,this,e)}get uiVersion(){return(0,c.A)(Dc,this)}set uiVersion(e){(0,l.A)(Dc,this,e)}get app(){return(0,c.A)(Pc,this)}set app(e){(0,l.A)(Pc,this,e)}render(){return p().createElement($c,{generations:this.generations,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app})}}function $c(e){let{generations:t,category:n,theme:a,uiVersion:i,app:o}=e;const r=(0,h.useRef)(),[s,l]=(0,h.useState)(!1),[c,d]=(0,h.useState)(!1),u=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=r.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?l(!0):setTimeout(e,100)};e()}),[]);return(0,h.useEffect)((()=>{if(!s)return;const e=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!e)throw new Error("Cannot find preview agent package: bricks/visual-builder");const t=r.current.contentWindow._preview_only_inject,n={...e,filePath:`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${e.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>t(e,n,void 0,!0)))).then((()=>{d(!0)}))}),[s]),(0,h.useEffect)((()=>{var e;if(!c)return;const s=null===(e=r.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const l=new Map,d=new Map;for(const e of t){let t=l.get(e.propertyId);t||l.set(e.propertyId,t=new Map);let n=t.get(e.rwType);n||t.set(e.rwType,n=new Map),n.set(e.displayLevel??0,e),d.set(e.propertyId,e.mockData)}const h=[{brick:"div",properties:{textContent:"属性",className:"head-cell"}},{brick:"div",properties:{textContent:"类别",className:"head-cell"}},{brick:"div",properties:{textContent:"展示等级",className:"head-cell last-col-cell",style:{gridColumn:"span 5",textAlign:"center"}}}],p={brick:"visual-builder.pre-generated-table-view",properties:{style:{gridTemplateColumns:"120px 80px repeat(5, 1fr)"}},children:h};let u=0;for(const[e,t]of l){let a=0;const i=u===l.size-1;for(const[o,r]of t){if(0===a){let n;for(const t of r.values()){n=t.propertyName??e;break}h.push({brick:"div",properties:{textContent:n,className:i?"last-row-cell":void 0,style:{gridRow:`span ${t.size}`}}})}const s=i&&a===t.size-1;h.push({brick:"div",properties:{textContent:o,className:s?"last-row-cell":void 0}});for(let t=-2;t<3;t++){var m;const a=r.get(t);let i;if(null!=a&&null!==(m=a.mockData)&&void 0!==m&&m.length){const t=a.mockData[Math.floor(Math.random()*a.mockData.length)];switch(a.category??n){case"detail-item":i={[e]:t};break;case"table-column":i={cellData:t}}}const o=[];2===t&&o.push("last-col-cell"),s&&o.push("last-row-cell"),h.push({brick:"div",...o?{properties:{className:o.join(" ")}}:null,children:[{brick:"visual-builder.pre-generated-container",properties:{useBrick:(null==a?void 0:a.storyboard)??[],dataSource:i},errorBoundary:!0}]})}a++}u++}s("yaml",{yaml:(0,kl.safeDump)(p,{schema:kl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:o,theme:a,uiVersion:i,styleText:Ac.A})}),[o,c,t,a,i,n]),p().createElement("div",{className:v()("container")},p().createElement("iframe",{ref:r,src:`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:u}))}gc=Wc,({e:[fc,Ec,kc,wc,yc,xc,Nc,Lc,Mc,Tc],c:[Cc,vc]}=(0,d.A)(gc,[Oc("visual-builder.pre-generated-preview",{styleTexts:[bc.A]})],[[Rc({attribute:!1}),1,"generations"],[Rc(),1,"category"],[Rc(),1,"theme"],[Rc(),1,"uiVersion"],[Rc(),1,"app"]],0,void 0,m.ReactNextElement)),vc();var Bc,Fc=n(9216);let Uc;const{defineElement:Kc}=(0,u.createDecorators)();let jc;class zc extends m.ReactNextElement{render(){return p().createElement(Vc,null)}}function Vc(){return p().createElement("slot",null)}Bc=zc,[jc,Uc]=(0,d.A)(Bc,[Kc("visual-builder.pre-generated-table-view",{styleTexts:[Fc.A]})],[],0,void 0,m.ReactNextElement).c,Uc();var Hc,Yc=n(4967);let Gc,Xc,qc,Jc,Qc;const{defineElement:Zc,property:ed}=(0,u.createDecorators)();let td;var nd=new WeakMap,ad=new WeakMap;class id extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,nd,Xc(this)),(0,o.A)(this,ad,(qc(this),Jc(this))),Qc(this)}get useBrick(){return(0,c.A)(nd,this)}set useBrick(e){(0,l.A)(nd,this,e)}get dataSource(){return(0,c.A)(ad,this)}set dataSource(e){(0,l.A)(ad,this,e)}render(){return p().createElement(od,{useBrick:this.useBrick,dataSource:this.dataSource})}}function od(e){let{useBrick:t,dataSource:n}=e;return p().createElement(Bo.ReactUseMultipleBricks,{useBrick:t,data:n,errorBoundary:!0})}Hc=id,({e:[Xc,qc,Jc,Qc],c:[td,Gc]}=(0,d.A)(Hc,[Zc("visual-builder.pre-generated-container",{styleTexts:[Yc.A]})],[[ed({attribute:!1}),1,"useBrick"],[ed({attribute:!1}),1,"dataSource"]],0,void 0,m.ReactNextElement)),Gc()},7236:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o),s=n(6131),l=r()(i());l.i(s.A),l.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.message{display:flex;gap:8px}.main{flex:1;min-width:0}.label{font-weight:bold;line-height:28px}.message:not(:last-child){margin-bottom:2em}.invisible-dots{opacity:0}.failed .content{color:var(--color-error)}.command:not(:first-child){margin-top:1em}.command:not(:last-child){margin-bottom:1em}pre{white-space:pre-wrap;background-color:var(--palette-gray-3);border-radius:6px;padding:1em}.markdown > :first-child{margin-top:0}.markdown > :last-child{margin-bottom:0}.avatar{align-self:flex-start;display:flex;align-items:center;justify-content:center}.texting::after{content:" ";animation:texting 2s infinite;white-space:pre}@keyframes texting{0%{content:" "}25%{content:". "}50%{content:".. "}75%{content:"..."}100%{content:" "}}pre[class*="language-"]{overflow:visible}pre[class*="language-"],\ncode[class*="language-"]{white-space:pre-wrap}eo-avatar.role-assistant::part(avatar-icon){background-color:var(--palette-blue-5)}.content{word-wrap:break-word}.plain{white-space:pre-wrap}',""]);const c=l.toString()},1563:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative;box-shadow:rgba(204,204,204,0.2) 0px 0px 0px 1px}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}.outline{position:absolute;border-style:solid;border-width:2px;border-radius:0 4px 4px;pointer-events:none}.label{position:absolute;left:-2px;top:-20px;height:18px;line-height:16px;padding:2px 5px 0;font-size:12px;border-radius:4px 4px 0 0;white-space:nowrap}.outline.hover{border-color:rgba(var(--palette-blue-6-channel),0.3)}.outline.hover .label{background:rgba(var(--palette-blue-6-channel),0.3)}.outline.active{border-color:var(--palette-blue-6)}.outline.active .label{background:var(--palette-blue-6)}.container:not(.inspecting) .outline{display:none}",""]);const s=r.toString()},6213:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.contract-wrapper{display:flex;gap:4px}.contract-selector{flex:1}.version-selector{width:100px}.options-tips{padding:0px 10px;font-weight:400;color:#999;white-space:nowrap;font-style:italic}",""]);const s=r.toString()},7540:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.mask,\n.container{display:none;position:fixed;z-index:1}.mask{top:0;bottom:0;left:0;right:0;z-index:1}:host([active]) .mask,\n:host([active]) .container{display:block}.container{background:var(--antd-dropdown-menu-bg);border-radius:var(--medius-border-radius);padding:5px}.container .title{padding:5px 12px;cursor:default;color:var(--color-secondary-text);border-bottom:1px solid var(--color-text-divider-line)}.container eo-menu{border:none;padding:5px 0}.container eo-menu eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.container eo-menu eo-menu-item[disabled]::part(menu-item){cursor:not-allowed}.container eo-menu eo-menu-item::part(menu-item){cursor:grab;padding:5px 12px;border-radius:var(--medius-border-radius);min-width:max-content}.container eo-menu eo-menu-item.dragging{opacity:0.5}.container eo-menu eo-tooltip{display:block}",""]);const s=r.toString()},2381:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{--local-node-outline-style:solid;display:block}:host([hidden]){display:none}:host([not-synced]){--local-node-outline-style:dashed}*{box-sizing:border-box}.node{width:168px;max-width:none;height:130px;position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.node.board{height:70px;max-width:168px;width:-moz-fit-content;width:fit-content;padding-bottom:4px}.label,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:18px;font-size:var(--sub-title-font-size-small);color:var(--color-header-text);font-weight:var(--font-weight-500);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.node.editing-label .label{height:0}.node:not(.editing-label) .label-input{display:none}.add-button,\n.icon-container,\n.thumbnail-container,\n.thumbnail-placeholder{display:flex;align-items:center;justify-content:center}.thumbnail-container{height:98px;outline:1px var(--local-node-outline-style) var(--palette-gray-4);opacity:1;border:4px solid transparent;border-radius:4px;width:100%;position:relative;flex-direction:column}.thumbnail-placeholder{color:var(--palette-gray-5);font-size:36px;flex:1}.icon-container{font-size:20px;background-color:var(--palette-teal-6);color:var(--palette-gray-4);width:36px;height:36px;border-radius:50%;outline-offset:4px}:host([active]) .thumbnail-container,\n:host([active]) .icon-container{outline:2px var(--local-node-outline-style) var(--palette-blue-3)}:host(:not([active])) .node:hover .thumbnail-container,\n:host(:not([active])) .node:hover .icon-container{outline:1px var(--local-node-outline-style) var(--palette-blue-3)}.add-button{position:absolute;bottom:-26px;left:calc(50% - 12px);width:24px;height:24px;background:var(--palette-gray-3);color:var(--palette-gray-6);border-radius:50%;cursor:pointer}:host([not-synced]) .add-button,\n:host([disable-child-append]) .add-button,\n:host(:not([active])) .add-button{display:none}.add-button:hover{background:var(--palette-blue-5);color:var(--palette-gray-2)}.external{position:absolute;top:4px;left:4px;padding:0 10px;display:flex;align-items:center;gap:6px;background:var(--palette-purple-4);font-size:12px;line-height:20px;height:22px;cursor:pointer;color:var(--palette-gray-1);border-radius:9999px;right:4px;max-width:-moz-fit-content;max-width:fit-content}.external-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.external:hover{background:var(--palette-purple-5)}.sub-nodes{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%}.sub-node{background-color:var(--palette-gray-2);border-radius:4px;padding:6px;display:flex;flex-direction:column;justify-content:space-between;height:32px}.sub-node-skeleton-title{width:18px;height:4px;border-radius:2px;align-self:flex-start;background-color:var(--palette-gray-4)}.sub-node-skeleton-content{width:100%;height:4px;border-radius:2px;background-color:var(--palette-gray-4)}.sub-node-skeleton-button{width:18px;height:4px;border-radius:2px;align-self:flex-end;background-color:var(--palette-blue-3)}.sub-node:hover{background-color:var(--palette-gray-3)}.sub-node:hover .sub-node-skeleton-title,\n.sub-node:hover .sub-node-skeleton-content{background-color:var(--palette-gray-5)}.sub-node:hover .sub-node-skeleton-button{background-color:var(--palette-blue-4)}",""]);const s=r.toString()},4967:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}",""]);const s=r.toString()},8918:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,"#preview-root{padding:0;height:100vh;overflow-y:auto;border:1px solid var(--theme-gray-border-color);border-radius:4px}.head-cell{position:sticky;top:0;background:var(--body-background);z-index:1;font-weight:bold}.last-col-cell{border-right-color:transparent}.last-row-cell{border-bottom-color:transparent}",""]);const s=r.toString()},4014:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=r.toString()},9216:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:grid;width:100%}:host([hidden]){display:none}::slotted(*){padding:4px 8px;border:1px solid var(--theme-gray-border-color);border-left-color:transparent;border-top-color:transparent;min-width:0;word-break:break-word}",""]);const s=r.toString()},9765:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,".custom-scrollbar-container{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.03)}.custom-scrollbar-container::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;position:absolute}.custom-scrollbar-container::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0);border-radius:4px}.custom-scrollbar-container:hover::-webkit-scrollbar-track{background-color:rgba(255,255,255,0.03)}.custom-scrollbar-container:hover::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.15)}",""]);const s=r.toString()},3430:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,'.workBenchActionList{display:flex;flex-direction:column;width:min-content;height:100%;background-color:#4297ff}:host-context(html[data-theme="dark-v2"]) .workBenchActionList,\n:host-context([data-override-theme="dark-v2"]) .workBenchActionList{background-color:#323237}',""]);const s=r.toString()},5292:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:rgba(255,255,255,0.4);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:white}.action.active::part(link),\n.action::part(link):hover{color:white}',""]);const s=r.toString()},1361:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}eo-popover::part(popup){width:800px;max-width:60vw;padding:10px;background:var(--color-fill-bg-container-4);border-radius:var(--medius-border-radius);box-shadow:var(--feedback-container-shadow);z-index:1000}.history-title{font-size:var(--title-font-size);font-weight:var(--font-weight-500);color:var(--color-strong-text);margin-bottom:5px}.history-list{max-height:500px;overflow-y:auto}.item-container{padding:10px 0;display:flex;flex-direction:column;gap:5px}.empty{padding:5px 0 10px 0;font-size:14px;color:var(--text-color-secondary);text-align:center}.item-container:not(:last-of-type){border-bottom:1px solid var(--color-border-divider-line)}.item-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.title-left,\n.title-right{display:flex;align-items:center}.title-left{cursor:pointer;overflow:hidden;gap:5px}.topic{font-size:14px;color:var(--text-color-title);font-weight:var(--font-weight-500);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.branch{font-size:14px;color:var(--text-color-secondary)}.rollback{margin-right:5px;font-size:14px;color:var(--text-color-secondary);cursor:pointer}.rollback:hover{color:var(--color-brand)}.item-info{display:flex;align-items:center;gap:5px}.time,\n.operator{font-size:14px;color:var(--text-color-secondary)}.load-more-container{display:block;text-align:center}.end-container{display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;color:var(--color-brand)}.rollback-all{cursor:pointer}",""]);const s=r.toString()},7180:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,':host{display:block;--pane-color:#595959}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--pane-color:#ccc}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.pane{display:flex;flex-direction:column;color:var(--pane-color);height:100%}.pane-header{display:flex;align-items:center;cursor:pointer;border-top:1px solid transparent;position:relative}.pane-header:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#007fd4}:host(:not(:first-child)) .pane-header{border-top-color:rgba(204,204,204,0.2)}.pane-scroll-shadow{display:none;position:absolute;bottom:-3px;left:0;right:0;height:3px;box-shadow:#000000 0 6px 6px -6px inset;z-index:1}.scrolled .pane-scroll-shadow{display:block}.pane-title{display:flex;align-items:center;font-size:13px;line-height:24px;height:25px;min-width:0;flex:1}.title-icon{display:flex;justify-content:center;align-items:center;width:24px;padding-right:2px;line-height:1;flex-shrink:0}.title-label{text-transform:uppercase;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-body{flex-grow:1;min-height:0;display:none;overflow:hidden;overflow-y:auto;overflow-y:overlay}:host([active]) .pane-body{display:initial}:host(:not(:hover)) ::slotted([slot="actions"]){display:none}.badge{background-color:rgb(77,77,77);color:rgb(255,255,255);border-radius:11px;height:18px;padding:3px 6px;line-height:13px;margin:0 3px;font-size:12px}',""]);const s=r.toString()},2150:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,':host{--sidebar-background:#fff;--title-container-background:#fff;--title-container-color:#595959;display:block;outline-color:rgba(83,89,93,0.5);background-color:var(--sidebar-background);height:100%}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--sidebar-background:#181818;--title-container-background:#181818;--title-container-color:rgb(187,187,187);background-color:var(--sidebar-background)}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.sidebar{display:flex;flex-direction:column;height:100%}.title-container{display:flex;padding:0 8px 8px 8px;color:var(--title-container-color);background:var(--title-container-background)}.title-label{font-weight:300;line-height:44px;padding-left:12px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-container{flex-grow:1;min-height:0;display:flex;flex-direction:column}::slotted([slot="panes"]){transition:flex 0.2s;min-height:25px}',""]);const s=r.toString()},6131:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o),s=n(7745),l=r()(i());l.i(s.A),l.push([e.id,"",""]);const c=l.toString()},6330:(e,t,n)=>{function a(e,t,n,a,i,o,r){try{var s=e[o](r),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(a,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function s(e){a(r,i,o,s,l,"next",e)}function l(e){a(r,i,o,s,l,"throw",e)}s(void 0)}))}}n.d(t,{A:()=>i})}}]);
|
|
3
|
-
//# sourceMappingURL=1822.4cff8211.js.map
|