ss-component-new 1.2.73 → 1.2.74
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/{index-CWf7Ft_2.cjs → index-BG--dusB.cjs} +1 -1
- package/dist/{index-BjpMFwVb.js → index-BIM20D0K.js} +1 -1
- package/dist/{index-D_6g6WxH.cjs → index-BqWOEEkk.cjs} +1 -1
- package/dist/{index-QXJLZVkw.js → index-CyCUgbpT.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-f2cWH6Na.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BQ_1G9WP.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DfCftOkM.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CvljhgNe.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +1 -1
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
* @internal
|
|
35
35
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
36
36
|
*/const Ma="_Mousewheel",Iu=function(t,n){if(t&&t.addEventListener){nm(t);const o=function(l){const r=iV(l);n&&Reflect.apply(n,this,[l,r])};t[Ma]={wheelHandler:o},t.addEventListener("wheel",o,{passive:!0})}},nm=t=>{var n;(n=t[Ma])!=null&&n.wheelHandler&&(t.removeEventListener("wheel",t[Ma].wheelHandler),t[Ma]=null)},cV={beforeMount(t,n){Iu(t,n.value)},unmounted(t){nm(t)},updated(t,n){n.value!==n.oldValue&&Iu(t,n.value)}};let uV=1;const dV=e.defineComponent({name:"ElTable",directives:{Mousewheel:cV},components:{TableHeader:LB,TableBody:YB,TableFooter:JB,ElScrollbar:Ut,hColgroup:Yp},props:tV,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:n}=a.useLocale(),o=a.useNamespace("table"),l=e.getCurrentInstance();e.provide(Jt,l);const r=PB(l,t);l.store=r;const s=new IB({store:l.store,table:l,fit:t.fit,showHeader:t.showHeader});l.layout=s;const i=e.computed(()=>(r.states.data.value||[]).length===0),{setCurrentRow:c,getSelectionRows:u,toggleRowSelection:d,clearSelection:p,clearFilter:f,toggleAllSelection:h,toggleRowExpansion:m,clearSort:y,sort:v,updateKeyChildren:b}=ZB(r),{isHidden:k,renderExpanded:E,setDragVisible:C,isGroup:g,handleMouseLeave:S,handleHeaderFooterMousewheel:w,tableSize:N,emptyBlockStyle:V,resizeProxyVisible:_,bodyWidth:P,resizeState:T,doLayout:D,tableBodyStyles:z,tableLayout:q,scrollbarViewStyle:Z,scrollbarStyle:O}=QB(t,s,r,l),{scrollBarRef:M,scrollTo:x,setScrollLeft:A,setScrollTop:R}=nV(),F=Fe.debounce(D,50),K=`${o.namespace.value}-table_${uV++}`;l.tableId=K,l.state={isGroup:g,resizeState:T,doLayout:D,debouncedUpdateLayout:F};const H=e.computed(()=>{var oe;return(oe=t.sumText)!=null?oe:n("el.table.sumText")}),J=e.computed(()=>{var oe;return(oe=t.emptyText)!=null?oe:n("el.table.emptyText")}),U=e.computed(()=>qp(r.states.originColumns.value)[0]);return eV(l),e.onBeforeUnmount(()=>{F.cancel()}),{ns:o,layout:s,store:r,columns:U,handleHeaderFooterMousewheel:w,handleMouseLeave:S,tableId:K,tableSize:N,isHidden:k,isEmpty:i,renderExpanded:E,resizeProxyVisible:_,resizeState:T,isGroup:g,bodyWidth:P,tableBodyStyles:z,emptyBlockStyle:V,debouncedUpdateLayout:F,setCurrentRow:c,getSelectionRows:u,toggleRowSelection:d,clearSelection:p,clearFilter:f,toggleAllSelection:h,toggleRowExpansion:m,clearSort:y,doLayout:D,sort:v,updateKeyChildren:b,t:n,setDragVisible:C,context:l,computedSumText:H,computedEmptyText:J,tableLayout:q,scrollbarViewStyle:Z,scrollbarStyle:O,scrollBarRef:M,scrollTo:x,setScrollLeft:A,setScrollTop:R,allowDragLastColumn:t.allowDragLastColumn}}});function fV(t,n,o,l,r,s){const i=e.resolveComponent("hColgroup"),c=e.resolveComponent("table-header"),u=e.resolveComponent("table-body"),d=e.resolveComponent("table-footer"),p=e.resolveComponent("el-scrollbar"),f=e.resolveDirective("mousewheel");return e.openBlock(),e.createElementBlock("div",{ref:"tableWrapper",class:e.normalizeClass([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:e.normalizeStyle(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:t.handleMouseLeave},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("inner-wrapper"))},[e.createElementVNode("div",{ref:"hiddenColumns",class:"hidden-columns"},[e.renderSlot(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref:"headerWrapper",class:e.normalizeClass(t.ns.e("header-wrapper"))},[e.createElementVNode("table",{ref:"tableHeader",class:e.normalizeClass(t.ns.e("header")),style:e.normalizeStyle(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[e.createVNode(i,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),e.createVNode(c,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[f,t.handleHeaderFooterMousewheel]]):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref:"bodyWrapper",class:e.normalizeClass(t.ns.e("body-wrapper"))},[e.createVNode(p,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:h=>t.$emit("scroll",h)},{default:e.withCtx(()=>[e.createElementVNode("table",{ref:"tableBody",class:e.normalizeClass(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:e.normalizeStyle({width:t.bodyWidth,tableLayout:t.tableLayout})},[e.createVNode(i,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(e.openBlock(),e.createBlock(c,{key:0,ref:"tableHeaderRef",class:e.normalizeClass(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):e.createCommentVNode("v-if",!0),e.createVNode(u,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(e.openBlock(),e.createBlock(d,{key:1,class:e.normalizeClass(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):e.createCommentVNode("v-if",!0)],6),t.isEmpty?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"emptyBlock",style:e.normalizeStyle(t.emptyBlockStyle),class:e.normalizeClass(t.ns.e("empty-block"))},[e.createElementVNode("span",{class:e.normalizeClass(t.ns.e("empty-text"))},[e.renderSlot(t.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(t.computedEmptyText),1)])],2)],6)):e.createCommentVNode("v-if",!0),t.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"appendWrapper",class:e.normalizeClass(t.ns.e("append-wrapper"))},[e.renderSlot(t.$slots,"append")],2)):e.createCommentVNode("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native","onScroll"])],2),t.showSummary&&t.tableLayout==="fixed"?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,ref:"footerWrapper",class:e.normalizeClass(t.ns.e("footer-wrapper"))},[e.createElementVNode("table",{class:e.normalizeClass(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:e.normalizeStyle(t.tableBodyStyles)},[e.createVNode(i,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),e.createVNode(d,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[e.vShow,!t.isEmpty],[f,t.handleHeaderFooterMousewheel]]):e.createCommentVNode("v-if",!0),t.border||t.isGroup?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(t.ns.e("border-left-patch"))},null,2)):e.createCommentVNode("v-if",!0)],2),e.withDirectives(e.createElementVNode("div",{ref:"resizeProxy",class:e.normalizeClass(t.ns.e("column-resize-proxy"))},null,2),[[e.vShow,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var pV=a._export_sfc(dV,[["render",fV],["__file","table.vue"]]);const mV={selection:"table-column--selection",expand:"table__expand-column"},hV={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},vV=t=>mV[t]||"",gV={selection:{renderHeader({store:t,column:n}){var o;function l(){return t.states.data.value&&t.states.data.value.length===0}return e.h(Ht,{disabled:l(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":(o=t.toggleAllSelection)!=null?o:void 0,modelValue:t.states.isAllSelected.value,ariaLabel:n.label})},renderCell({row:t,column:n,store:o,$index:l}){return e.h(Ht,{disabled:n.selectable?!n.selectable.call(null,t,l):!1,size:o.states.tableSize.value,onChange:()=>{o.commit("rowSelectedChanged",t)},onClick:r=>r.stopPropagation(),modelValue:o.isSelected(t),ariaLabel:n.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:n}){let o=n+1;const l=t.index;return a.isNumber(l)?o=n+l:a.isFunction(l)&&(o=l(n)),e.h("div",{},[o])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:n,store:o,expanded:l}){const{ns:r}=o,s=[r.e("expand-icon")];!t.renderExpand&&l&&s.push(r.em("expand-icon","expanded"));const i=function(c){c.stopPropagation(),o.toggleRowExpansion(n)};return e.h("div",{class:s,onClick:i},{default:()=>t.renderExpand?[t.renderExpand({expanded:l})]:[e.h(a.ElIcon,null,{default:()=>[e.h(a.arrow_right_default)]})]})},sortable:!1,resizable:!1}};function yV({row:t,column:n,$index:o}){var l;const r=n.property,s=r&&a.getProp(t,r).value;return n&&n.formatter?n.formatter(t,n,s,o):((l=s==null?void 0:s.toString)==null?void 0:l.call(s))||""}function bV({row:t,treeNode:n,store:o},l=!1){const{ns:r}=o;if(!n)return l?[e.h("span",{class:r.e("placeholder")})]:null;const s=[],i=function(c){c.stopPropagation(),!n.loading&&o.loadOrToggle(t)};if(n.indent&&s.push(e.h("span",{class:r.e("indent"),style:{"padding-left":`${n.indent}px`}})),a.isBoolean(n.expanded)&&!n.noLazyChildren){const c=[r.e("expand-icon"),n.expanded?r.em("expand-icon","expanded"):""];let u=a.arrow_right_default;n.loading&&(u=a.loading_default),s.push(e.h("div",{class:c,onClick:i},{default:()=>[e.h(a.ElIcon,{class:r.is("loading",n.loading)},{default:()=>[e.h(u)]})]}))}else s.push(e.h("span",{class:r.e("placeholder")}));return s}function Ou(t,n){return t.reduce((o,l)=>(o[l]=l,o),n)}function CV(t,n){const o=e.getCurrentInstance();return{registerComplexWatchers:()=>{const s=["fixed"],i={realWidth:"width",realMinWidth:"minWidth"},c=Ou(s,i);Object.keys(c).forEach(u=>{const d=i[u];a.hasOwn(n,d)&&e.watch(()=>n[d],p=>{let f=p;d==="width"&&u==="realWidth"&&(f=Mi(p)),d==="minWidth"&&u==="realMinWidth"&&(f=Fp(p)),o.columnConfig.value[d]=f,o.columnConfig.value[u]=f;const h=d==="fixed";t.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const s=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],i=["showOverflowTooltip"],c={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=Ou(s,c);Object.keys(u).forEach(d=>{const p=c[d];a.hasOwn(n,p)&&e.watch(()=>n[p],f=>{o.columnConfig.value[d]=f})}),i.forEach(d=>{a.hasOwn(t.value.props,d)&&e.watch(()=>t.value.props[d],p=>{o.columnConfig.value[d]=p})})}}}function kV(t,n,o){const l=e.getCurrentInstance(),r=e.ref(""),s=e.ref(!1),i=e.ref(),c=e.ref(),u=a.useNamespace("table");e.watchEffect(()=>{i.value=t.align?`is-${t.align}`:null,i.value}),e.watchEffect(()=>{c.value=t.headerAlign?`is-${t.headerAlign}`:i.value,c.value});const d=e.computed(()=>{let g=l.vnode.vParent||l.parent;for(;g&&!g.tableId&&!g.columnId;)g=g.vnode.vParent||g.parent;return g}),p=e.computed(()=>{const{store:g}=l.parent;if(!g)return!1;const{treeData:S}=g.states,w=S.value;return w&&Object.keys(w).length>0}),f=e.ref(Mi(t.width)),h=e.ref(Fp(t.minWidth)),m=g=>(f.value&&(g.width=f.value),h.value&&(g.minWidth=h.value),!f.value&&h.value&&(g.width=void 0),g.minWidth||(g.minWidth=80),g.realWidth=Number(a.isUndefined(g.width)?g.minWidth:g.width),g),y=g=>{const S=g.type,w=gV[S]||{};Object.keys(w).forEach(V=>{const _=w[V];V!=="className"&&!a.isUndefined(_)&&(g[V]=_)});const N=vV(S);if(N){const V=`${e.unref(u.namespace)}-${N}`;g.className=g.className?`${g.className} ${V}`:V}return g},v=g=>{a.isArray$1(g)?g.forEach(w=>S(w)):S(g);function S(w){var N;((N=w==null?void 0:w.type)==null?void 0:N.name)==="ElTableColumn"&&(w.vParent=l)}};return{columnId:r,realAlign:i,isSubColumn:s,realHeaderAlign:c,columnOrTableParent:d,setColumnWidth:m,setColumnForcedProps:y,setColumnRenders:g=>{t.renderHeader?a.debugWarn("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):g.type!=="selection"&&(g.renderHeader=w=>(l.columnConfig.value.label,e.renderSlot(n,"header",w,()=>[g.label]))),n["filter-icon"]&&(g.renderFilterIcon=w=>e.renderSlot(n,"filter-icon",w)),n.expand&&(g.renderExpand=w=>e.renderSlot(n,"expand",w));let S=g.renderCell;return g.type==="expand"?(g.renderCell=w=>e.h("div",{class:"cell"},[S(w)]),o.value.renderExpanded=w=>n.default?n.default(w):n.default):(S=S||yV,g.renderCell=w=>{let N=null;if(n.default){const z=n.default(w);N=z.some(q=>q.type!==e.Comment)?z:S(w)}else N=S(w);const{columns:V}=o.value.store.states,_=V.value.findIndex(z=>z.type==="default"),P=p.value&&w.cellIndex===_,T=bV(w,P),D={class:"cell",style:{}};return g.showOverflowTooltip&&(D.class=`${D.class} ${e.unref(u.namespace)}-tooltip`,D.style={width:`${(w.column.realWidth||Number(w.column.width))-1}px`}),v(N),e.h("div",D,[T,N])}),g},getPropsData:(...g)=>g.reduce((S,w)=>(a.isArray$1(w)&&w.forEach(N=>{S[N]=t[N]}),S),{}),getColumnElIndex:(g,S)=>Array.prototype.indexOf.call(g,S),updateColumnOrder:()=>{o.value.store.commit("updateColumnOrder",l.columnConfig.value)}}}var EV={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(n=>["ascending","descending",null].includes(n))}};let wV=1;var om=e.defineComponent({name:"ElTableColumn",components:{ElCheckbox:Ht},props:EV,setup(t,{slots:n}){const o=e.getCurrentInstance(),l=e.ref({}),r=e.computed(()=>{let C=o.parent;for(;C&&!C.tableId;)C=C.parent;return C}),{registerNormalWatchers:s,registerComplexWatchers:i}=CV(r,t),{columnId:c,isSubColumn:u,realHeaderAlign:d,columnOrTableParent:p,setColumnWidth:f,setColumnForcedProps:h,setColumnRenders:m,getPropsData:y,getColumnElIndex:v,realAlign:b,updateColumnOrder:k}=kV(t,n,r),E=p.value;c.value=`${"tableId"in E&&E.tableId||"columnId"in E&&E.columnId}_column_${wV++}`,e.onBeforeMount(()=>{u.value=r.value!==E;const C=t.type||"default",g=t.sortable===""?!0:t.sortable,S=C==="selection"?!1:a.isUndefined(t.showOverflowTooltip)?E.props.showOverflowTooltip:t.showOverflowTooltip,w=a.isUndefined(t.tooltipFormatter)?E.props.tooltipFormatter:t.tooltipFormatter,N={...hV[C],id:c.value,type:C,property:t.prop||t.property,align:b,headerAlign:d,showOverflowTooltip:S,tooltipFormatter:w,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:g,index:t.index,rawColumnKey:o.vnode.key};let D=y(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);D=yB(N,D),D=CB(m,f,h)(D),l.value=D,s(),i()}),e.onMounted(()=>{var C,g;const S=p.value,w=u.value?(C=S.vnode.el)==null?void 0:C.children:(g=S.refs.hiddenColumns)==null?void 0:g.children,N=()=>v(w||[],o.vnode.el);l.value.getColumnIndex=N,N()>-1&&r.value.store.commit("insertColumn",l.value,u.value?"columnConfig"in S&&S.columnConfig.value:null,k)}),e.onBeforeUnmount(()=>{const C=l.value.getColumnIndex;(C?C():-1)>-1&&r.value.store.commit("removeColumn",l.value,u.value?"columnConfig"in E&&E.columnConfig.value:null,k)}),o.columnId=c.value,o.columnConfig=l},render(){var t,n,o;try{const l=(n=(t=this.$slots).default)==null?void 0:n.call(t,{row:{},column:{},$index:-1}),r=[];if(a.isArray$1(l))for(const i of l)((o=i.type)==null?void 0:o.name)==="ElTableColumn"||i.shapeFlag&2?r.push(i):i.type===e.Fragment&&a.isArray$1(i.children)&&i.children.forEach(c=>{(c==null?void 0:c.patchFlag)!==1024&&!a.isString(c==null?void 0:c.children)&&r.push(c)});return e.h("div",r)}catch{return e.h("div",[])}}});const SV=a.withInstall(pV,{TableColumn:om}),NV=a.withNoopInstall(om);var Fl=(t=>(t.ASC="asc",t.DESC="desc",t))(Fl||{}),Kl=(t=>(t.LEFT="left",t.CENTER="center",t.RIGHT="right",t))(Kl||{}),lm=(t=>(t.LEFT="left",t.RIGHT="right",t))(lm||{});const Is={asc:"desc",desc:"asc"},Hl=Symbol("placeholder"),TV=(t,n,o)=>{var l;const r={flexGrow:0,flexShrink:0,...o?{}:{flexGrow:t.flexGrow||0,flexShrink:t.flexShrink||1}};o||(r.flexShrink=1);const s={...(l=t.style)!=null?l:{},...r,flexBasis:"auto",width:t.width};return n||(t.maxWidth&&(s.maxWidth=t.maxWidth),t.minWidth&&(s.minWidth=t.minWidth)),s};function _V(t,n,o){const l=e.computed(()=>e.unref(n).map((b,k)=>{var E,C;return{...b,key:(C=(E=b.key)!=null?E:b.dataKey)!=null?C:k}})),r=e.computed(()=>e.unref(l).filter(b=>!b.hidden)),s=e.computed(()=>e.unref(r).filter(b=>b.fixed==="left"||b.fixed===!0)),i=e.computed(()=>e.unref(r).filter(b=>b.fixed==="right")),c=e.computed(()=>e.unref(r).filter(b=>!b.fixed)),u=e.computed(()=>{const b=[];return e.unref(s).forEach(k=>{b.push({...k,placeholderSign:Hl})}),e.unref(c).forEach(k=>{b.push(k)}),e.unref(i).forEach(k=>{b.push({...k,placeholderSign:Hl})}),b}),d=e.computed(()=>e.unref(s).length||e.unref(i).length),p=e.computed(()=>e.unref(l).reduce((b,k)=>(b[k.key]=TV(k,e.unref(o),t.fixed),b),{})),f=e.computed(()=>e.unref(r).reduce((b,k)=>b+k.width,0)),h=b=>e.unref(l).find(k=>k.key===b),m=b=>e.unref(p)[b],y=(b,k)=>{b.width=k};function v(b){var k;const{key:E}=b.currentTarget.dataset;if(!E)return;const{sortState:C,sortBy:g}=t;let S=Fl.ASC;a.isObject$1(C)?S=Is[C[E]]:S=Is[g.order],(k=t.onColumnSort)==null||k.call(t,{column:h(E),key:E,order:S})}return{columns:l,columnsStyles:p,columnsTotalWidth:f,fixedColumnsOnLeft:s,fixedColumnsOnRight:i,hasFixedColumns:d,mainColumns:u,normalColumns:c,visibleColumns:r,getColumn:h,getColumnStyle:m,updateColumnWidth:y,onColumnSorted:v}}const BV=(t,{mainTableRef:n,leftTableRef:o,rightTableRef:l,onMaybeEndReached:r})=>{const s=e.ref({scrollLeft:0,scrollTop:0});function i(m){var y,v,b;const{scrollTop:k}=m;(y=n.value)==null||y.scrollTo(m),(v=o.value)==null||v.scrollToTop(k),(b=l.value)==null||b.scrollToTop(k)}function c(m){s.value=m,i(m)}function u(m){s.value.scrollTop=m,i(e.unref(s))}function d(m){var y,v;s.value.scrollLeft=m,(v=(y=n.value)==null?void 0:y.scrollTo)==null||v.call(y,e.unref(s))}function p(m){var y;c(m),(y=t.onScroll)==null||y.call(t,m)}function f({scrollTop:m}){const{scrollTop:y}=e.unref(s);m!==y&&u(m)}function h(m,y="auto"){var v;(v=n.value)==null||v.scrollToRow(m,y)}return e.watch(()=>e.unref(s).scrollTop,(m,y)=>{m>y&&r()}),{scrollPos:s,scrollTo:c,scrollToLeft:d,scrollToTop:u,scrollToRow:h,onScroll:p,onVerticalScroll:f}},VV=(t,{mainTableRef:n,leftTableRef:o,rightTableRef:l,tableInstance:r,ns:s,isScrolling:i})=>{const c=e.getCurrentInstance(),{emit:u}=c,d=e.shallowRef(!1),p=e.ref(t.defaultExpandedRowKeys||[]),f=e.ref(-1),h=e.shallowRef(null),m=e.ref({}),y=e.ref({}),v=e.shallowRef({}),b=e.shallowRef({}),k=e.shallowRef({}),E=e.computed(()=>a.isNumber(t.estimatedRowHeight));function C(P){var T;(T=t.onRowsRendered)==null||T.call(t,P),P.rowCacheEnd>e.unref(f)&&(f.value=P.rowCacheEnd)}function g({hovered:P,rowKey:T}){if(i.value)return;r.vnode.el.querySelectorAll(`[rowkey="${String(T)}"]`).forEach(q=>{P?q.classList.add(s.is("hovered")):q.classList.remove(s.is("hovered"))})}function S({expanded:P,rowData:T,rowIndex:D,rowKey:z}){var q,Z;const O=[...e.unref(p)],M=O.indexOf(z);P?M===-1&&O.push(z):M>-1&&O.splice(M,1),p.value=O,u("update:expandedRowKeys",O),(q=t.onRowExpand)==null||q.call(t,{expanded:P,rowData:T,rowIndex:D,rowKey:z}),(Z=t.onExpandedRowsChange)==null||Z.call(t,O),r.vnode.el.querySelector(`.${s.is("hovered")}[rowkey="${String(z)}"]`)&&e.nextTick(()=>g({hovered:!0,rowKey:z}))}const w=Fe.debounce(()=>{var P,T,D,z;d.value=!0,m.value={...e.unref(m),...e.unref(y)},N(e.unref(h),!1),y.value={},h.value=null,(P=n.value)==null||P.forceUpdate(),(T=o.value)==null||T.forceUpdate(),(D=l.value)==null||D.forceUpdate(),(z=c.proxy)==null||z.$forceUpdate(),d.value=!1},0);function N(P,T=!1){e.unref(E)&&[n,o,l].forEach(D=>{const z=e.unref(D);z&&z.resetAfterRowIndex(P,T)})}function V(P,T,D){const z=e.unref(h);(z===null||z>D)&&(h.value=D),y.value[P]=T}function _({rowKey:P,height:T,rowIndex:D},z){z?z===lm.RIGHT?k.value[P]=T:v.value[P]=T:b.value[P]=T;const q=Math.max(...[v,k,b].map(Z=>Z.value[P]||0));e.unref(m)[P]!==q&&(V(P,q,D),w())}return{expandedRowKeys:p,lastRenderedRowIndex:f,isDynamic:E,isResetting:d,rowHeights:m,resetAfterIndex:N,onRowExpanded:S,onRowHovered:g,onRowsRendered:C,onRowHeightChange:_}},PV=(t,{expandedRowKeys:n,lastRenderedRowIndex:o,resetAfterIndex:l})=>{const r=e.ref({}),s=e.computed(()=>{const c={},{data:u,rowKey:d}=t,p=e.unref(n);if(!p||!p.length)return u;const f=[],h=new Set;p.forEach(y=>h.add(y));let m=u.slice();for(m.forEach(y=>c[y[d]]=0);m.length>0;){const y=m.shift();f.push(y),h.has(y[d])&&a.isArray$1(y.children)&&y.children.length>0&&(m=[...y.children,...m],y.children.forEach(v=>c[v[d]]=c[y[d]]+1))}return r.value=c,f}),i=e.computed(()=>{const{data:c,expandColumnKey:u}=t;return u?e.unref(s):c});return e.watch(i,(c,u)=>{c!==u&&(o.value=-1,l(0,!0))}),{data:i,depthMap:r}},DV=(t,n)=>t+n,xa=t=>a.isArray$1(t)?t.reduce(DV,0):t,zn=(t,n,o={})=>a.isFunction(t)?t(n):t??o,Cn=t=>(["width","maxWidth","minWidth","height"].forEach(n=>{t[n]=a.addUnit(t[n])}),t),am=t=>e.isVNode(t)?n=>e.h(t,n):t,IV=(t,{columnsTotalWidth:n,rowsHeight:o,fixedColumnsOnLeft:l,fixedColumnsOnRight:r})=>{const s=e.computed(()=>{const{fixed:k,width:E,vScrollbarSize:C}=t,g=E-C;return k?Math.max(Math.round(e.unref(n)),g):g}),i=e.computed(()=>{const{height:k=0,maxHeight:E=0,footerHeight:C,hScrollbarSize:g}=t;if(E>0){const S=e.unref(h),w=e.unref(o),V=e.unref(f)+S+w+g;return Math.min(V,E-C)}return k-C}),c=e.computed(()=>{const{maxHeight:k}=t,E=e.unref(i);if(a.isNumber(k)&&k>0)return E;const C=e.unref(o)+e.unref(f)+e.unref(h);return Math.min(E,C)}),u=k=>k.width,d=e.computed(()=>xa(e.unref(l).map(u))),p=e.computed(()=>xa(e.unref(r).map(u))),f=e.computed(()=>xa(t.headerHeight)),h=e.computed(()=>{var k;return(((k=t.fixedData)==null?void 0:k.length)||0)*t.rowHeight}),m=e.computed(()=>e.unref(i)-e.unref(f)-e.unref(h)),y=e.computed(()=>{const{style:k={},height:E,width:C}=t;return Cn({...k,height:E,width:C})}),v=e.computed(()=>Cn({height:t.footerHeight})),b=e.computed(()=>({top:a.addUnit(e.unref(f)),bottom:a.addUnit(t.footerHeight),width:a.addUnit(t.width)}));return{bodyWidth:s,fixedTableHeight:c,mainTableHeight:i,leftTableWidth:d,rightTableWidth:p,windowHeight:m,footerHeight:v,emptyStyle:b,rootStyle:y,headerHeight:f}};function OV(t){const n=e.ref(),o=e.ref(),l=e.ref(),{columns:r,columnsStyles:s,columnsTotalWidth:i,fixedColumnsOnLeft:c,fixedColumnsOnRight:u,hasFixedColumns:d,mainColumns:p,onColumnSorted:f}=_V(t,e.toRef(t,"columns"),e.toRef(t,"fixed")),{scrollTo:h,scrollToLeft:m,scrollToTop:y,scrollToRow:v,onScroll:b,onVerticalScroll:k,scrollPos:E}=BV(t,{mainTableRef:n,leftTableRef:o,rightTableRef:l,onMaybeEndReached:Y}),C=a.useNamespace("table-v2"),g=e.getCurrentInstance(),S=e.shallowRef(!1),{expandedRowKeys:w,lastRenderedRowIndex:N,isDynamic:V,isResetting:_,rowHeights:P,resetAfterIndex:T,onRowExpanded:D,onRowHeightChange:z,onRowHovered:q,onRowsRendered:Z}=VV(t,{mainTableRef:n,leftTableRef:o,rightTableRef:l,tableInstance:g,ns:C,isScrolling:S}),{data:O,depthMap:M}=PV(t,{expandedRowKeys:w,lastRenderedRowIndex:N,resetAfterIndex:T}),x=e.computed(()=>{const{estimatedRowHeight:$,rowHeight:te}=t,le=e.unref(O);return a.isNumber($)?Object.values(e.unref(P)).reduce((G,W)=>G+W,0):le.length*te}),{bodyWidth:A,fixedTableHeight:R,mainTableHeight:F,leftTableWidth:K,rightTableWidth:H,windowHeight:J,footerHeight:U,emptyStyle:oe,rootStyle:ae,headerHeight:Q}=IV(t,{columnsTotalWidth:i,fixedColumnsOnLeft:c,fixedColumnsOnRight:u,rowsHeight:x}),X=e.ref(),B=e.computed(()=>{const $=e.unref(O).length===0;return a.isArray$1(t.fixedData)?t.fixedData.length===0&&$:$});function I($){const{estimatedRowHeight:te,rowHeight:le,rowKey:G}=t;return te?e.unref(P)[e.unref(O)[$][G]]||te:le}const j=e.ref(!1);function Y(){const{onEndReached:$}=t;if(!$)return;const{scrollTop:te}=e.unref(E),le=e.unref(x),G=e.unref(J),W=le-(te+G)+t.hScrollbarSize;!j.value&&e.unref(N)>=0&&le<=te+e.unref(F)-e.unref(Q)?(j.value=!0,$(W)):j.value=!1}return e.watch(()=>e.unref(x),()=>j.value=!1),e.watch(()=>t.expandedRowKeys,$=>w.value=$,{deep:!0}),{columns:r,containerRef:X,mainTableRef:n,leftTableRef:o,rightTableRef:l,isDynamic:V,isResetting:_,isScrolling:S,hasFixedColumns:d,columnsStyles:s,columnsTotalWidth:i,data:O,expandedRowKeys:w,depthMap:M,fixedColumnsOnLeft:c,fixedColumnsOnRight:u,mainColumns:p,bodyWidth:A,emptyStyle:oe,rootStyle:ae,footerHeight:U,mainTableHeight:F,fixedTableHeight:R,leftTableWidth:K,rightTableWidth:H,showEmpty:B,getRowHeight:I,onColumnSorted:f,onRowHovered:q,onRowExpanded:D,onRowsRendered:Z,onRowHeightChange:z,scrollTo:h,scrollToLeft:m,scrollToTop:y,scrollToRow:v,onScroll:b,onVerticalScroll:k}}const Li=Symbol("tableV2"),rm="tableV2GridScrollLeft",sm=String,ea={type:a.definePropType(Array),required:!0},Fi={type:a.definePropType(Array)},im={...Fi,required:!0},$V=String,$u={type:a.definePropType(Array),default:()=>a.mutable([])},Bn={type:Number,required:!0},cm={type:a.definePropType([String,Number,Symbol]),default:"id"},Mu={type:a.definePropType(Object)},Dn=a.buildProps({class:String,columns:ea,columnsStyles:{type:a.definePropType(Object),required:!0},depth:Number,expandColumnKey:$V,estimatedRowHeight:{...$n.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:a.definePropType(Function)},onRowHover:{type:a.definePropType(Function)},onRowHeightChange:{type:a.definePropType(Function)},rowData:{type:a.definePropType(Object),required:!0},rowEventHandlers:{type:a.definePropType(Object)},rowIndex:{type:Number,required:!0},rowKey:cm,style:{type:a.definePropType(Object)}}),Hr={type:Number,required:!0},Ki=a.buildProps({class:String,columns:ea,fixedHeaderData:{type:a.definePropType(Array)},headerData:{type:a.definePropType(Array),required:!0},headerHeight:{type:a.definePropType([Number,Array]),default:50},rowWidth:Hr,rowHeight:{type:Number,default:50},height:Hr,width:Hr}),Aa=a.buildProps({columns:ea,data:im,fixedData:Fi,estimatedRowHeight:Dn.estimatedRowHeight,width:Bn,height:Bn,headerWidth:Bn,headerHeight:Ki.headerHeight,bodyWidth:Bn,rowHeight:Bn,cache:Vp.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:$n.scrollbarAlwaysOn,scrollbarStartGap:$n.scrollbarStartGap,scrollbarEndGap:$n.scrollbarEndGap,class:sm,style:Mu,containerStyle:Mu,getRowHeight:{type:a.definePropType(Function),required:!0},rowKey:Dn.rowKey,onRowsRendered:{type:a.definePropType(Function)},onScroll:{type:a.definePropType(Function)}}),MV=a.buildProps({cache:Aa.cache,estimatedRowHeight:Dn.estimatedRowHeight,rowKey:cm,headerClass:{type:a.definePropType([String,Function])},headerProps:{type:a.definePropType([Object,Function])},headerCellProps:{type:a.definePropType([Object,Function])},headerHeight:Ki.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:a.definePropType([String,Function])},rowProps:{type:a.definePropType([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:a.definePropType([Object,Function])},columns:ea,data:im,dataGetter:{type:a.definePropType(Function)},fixedData:Fi,expandColumnKey:Dn.expandColumnKey,expandedRowKeys:$u,defaultExpandedRowKeys:$u,class:sm,fixed:Boolean,style:{type:a.definePropType(Object)},width:Bn,height:Bn,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:$n.hScrollbarSize,vScrollbarSize:$n.vScrollbarSize,scrollbarAlwaysOn:Ip.alwaysOn,sortBy:{type:a.definePropType(Object),default:()=>({})},sortState:{type:a.definePropType(Object),default:void 0},onColumnSort:{type:a.definePropType(Function)},onExpandedRowsChange:{type:a.definePropType(Function)},onEndReached:{type:a.definePropType(Function)},onRowExpand:Dn.onRowExpand,onScroll:Aa.onScroll,onRowsRendered:Aa.onRowsRendered,rowEventHandlers:Dn.rowEventHandlers}),xV="ElTableV2Header",AV=e.defineComponent({name:xV,props:Ki,setup(t,{slots:n,expose:o}){const l=a.useNamespace("table-v2"),r=e.inject(rm),s=e.ref(),i=e.computed(()=>Cn({width:t.width,height:t.height})),c=e.computed(()=>Cn({width:t.rowWidth,height:t.height})),u=e.computed(()=>ht(e.unref(t.headerHeight))),d=h=>{const m=e.unref(s);e.nextTick(()=>{m!=null&&m.scroll&&m.scroll({left:h})})},p=()=>{const h=l.e("fixed-header-row"),{columns:m,fixedHeaderData:y,rowHeight:v}=t;return y==null?void 0:y.map((b,k)=>{var E;const C=Cn({height:v,width:"100%"});return(E=n.fixed)==null?void 0:E.call(n,{class:h,columns:m,rowData:b,rowIndex:-(k+1),style:C})})},f=()=>{const h=l.e("dynamic-header-row"),{columns:m}=t;return e.unref(u).map((y,v)=>{var b;const k=Cn({width:"100%",height:y});return(b=n.dynamic)==null?void 0:b.call(n,{class:h,columns:m,headerIndex:v,style:k})})};return e.onUpdated(()=>{r!=null&&r.value&&d(r.value)}),o({scrollToLeft:d}),()=>{if(!(t.height<=0))return e.createVNode("div",{ref:s,class:t.class,style:e.unref(i),role:"rowgroup"},[e.createVNode("div",{style:e.unref(c),class:l.e("header")},[f(),p()])])}}});var zV=AV;const RV=({atXEndEdge:t,atXStartEdge:n,atYEndEdge:o,atYStartEdge:l},r)=>{let s=null,i=0,c=0;const u=(p,f)=>{const h=p<=0&&n.value||p>=0&&t.value,m=f<=0&&l.value||f>=0&&o.value;return h&&m};return{hasReachedEdge:u,onWheel:p=>{L.cAF(s);let f=p.deltaX,h=p.deltaY;Math.abs(f)>Math.abs(h)?h=0:f=0,p.shiftKey&&h!==0&&(f=h,h=0),!(u(i,c)&&u(i+f,c+h))&&(i+=f,c+=h,p.preventDefault(),s=L.rAF(()=>{r(i,c),i=0,c=0}))}}},um=({name:t,clearCache:n,getColumnPosition:o,getColumnStartIndexForOffset:l,getColumnStopIndexForStartIndex:r,getEstimatedTotalHeight:s,getEstimatedTotalWidth:i,getColumnOffset:c,getRowOffset:u,getRowPosition:d,getRowStartIndexForOffset:p,getRowStopIndexForStartIndex:f,initCache:h,injectToInstance:m,validateProps:y})=>e.defineComponent({name:t??"ElVirtualList",props:$n,emits:[Xa,Ja],setup(v,{emit:b,expose:k,slots:E}){const C=a.useNamespace("vl");y(v);const g=e.getCurrentInstance(),S=e.ref(h(v,g));m==null||m(g,S);const w=e.ref(),N=e.ref(),V=e.ref(),_=e.ref(null),P=e.ref({isScrolling:!1,scrollLeft:a.isNumber(v.initScrollLeft)?v.initScrollLeft:0,scrollTop:a.isNumber(v.initScrollTop)?v.initScrollTop:0,updateRequested:!1,xAxisScrollDir:Xn,yAxisScrollDir:Xn}),T=Np(),D=e.computed(()=>Number.parseInt(`${v.height}`,10)),z=e.computed(()=>Number.parseInt(`${v.width}`,10)),q=e.computed(()=>{const{totalColumn:G,totalRow:W,columnCache:re}=v,{isScrolling:ce,xAxisScrollDir:ne,scrollLeft:Se}=e.unref(P);if(G===0||W===0)return[0,0,0,0];const Ne=l(v,Se,e.unref(S)),Te=r(v,Ne,Se,e.unref(S)),Ie=!ce||ne===Za?Math.max(1,re):1,Le=!ce||ne===Xn?Math.max(1,re):1;return[Math.max(0,Ne-Ie),Math.max(0,Math.min(G-1,Te+Le)),Ne,Te]}),Z=e.computed(()=>{const{totalColumn:G,totalRow:W,rowCache:re}=v,{isScrolling:ce,yAxisScrollDir:ne,scrollTop:Se}=e.unref(P);if(G===0||W===0)return[0,0,0,0];const Ne=p(v,Se,e.unref(S)),Te=f(v,Ne,Se,e.unref(S)),Ie=!ce||ne===Za?Math.max(1,re):1,Le=!ce||ne===Xn?Math.max(1,re):1;return[Math.max(0,Ne-Ie),Math.max(0,Math.min(W-1,Te+Le)),Ne,Te]}),O=e.computed(()=>s(v,e.unref(S))),M=e.computed(()=>i(v,e.unref(S))),x=e.computed(()=>{var G;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:v.direction,height:a.isNumber(v.height)?`${v.height}px`:v.height,width:a.isNumber(v.width)?`${v.width}px`:v.width},(G=v.style)!=null?G:{}]}),A=e.computed(()=>{const G=`${e.unref(M)}px`;return{height:`${e.unref(O)}px`,pointerEvents:e.unref(P).isScrolling?"none":void 0,width:G}}),R=()=>{const{totalColumn:G,totalRow:W}=v;if(G>0&&W>0){const[Te,Ie,Le,ye]=e.unref(q),[Ee,Oe,$e,de]=e.unref(Z);b(Xa,{columnCacheStart:Te,columnCacheEnd:Ie,rowCacheStart:Ee,rowCacheEnd:Oe,columnVisibleStart:Le,columnVisibleEnd:ye,rowVisibleStart:$e,rowVisibleEnd:de})}const{scrollLeft:re,scrollTop:ce,updateRequested:ne,xAxisScrollDir:Se,yAxisScrollDir:Ne}=e.unref(P);b(Ja,{xAxisScrollDir:Se,scrollLeft:re,yAxisScrollDir:Ne,scrollTop:ce,updateRequested:ne})},F=G=>{const{clientHeight:W,clientWidth:re,scrollHeight:ce,scrollLeft:ne,scrollTop:Se,scrollWidth:Ne}=G.currentTarget,Te=e.unref(P);if(Te.scrollTop===Se&&Te.scrollLeft===ne)return;let Ie=ne;if(yu(v.direction))switch(er()){case Rl:Ie=-ne;break;case $i:Ie=Ne-re-ne;break}P.value={...Te,isScrolling:!0,scrollLeft:Ie,scrollTop:Math.max(0,Math.min(Se,ce-W)),updateRequested:!0,xAxisScrollDir:Pn(Te.scrollLeft,Ie),yAxisScrollDir:Pn(Te.scrollTop,Se)},e.nextTick(()=>Q()),X(),R()},K=(G,W)=>{const re=e.unref(D),ce=(O.value-re)/W*G;U({scrollTop:Math.min(O.value-re,ce)})},H=(G,W)=>{const re=e.unref(z),ce=(M.value-re)/W*G;U({scrollLeft:Math.min(M.value-re,ce)})},{onWheel:J}=RV({atXStartEdge:e.computed(()=>P.value.scrollLeft<=0),atXEndEdge:e.computed(()=>P.value.scrollLeft>=M.value-e.unref(z)),atYStartEdge:e.computed(()=>P.value.scrollTop<=0),atYEndEdge:e.computed(()=>P.value.scrollTop>=O.value-e.unref(D))},(G,W)=>{var re,ce,ne,Se;(ce=(re=N.value)==null?void 0:re.onMouseUp)==null||ce.call(re),(Se=(ne=V.value)==null?void 0:ne.onMouseUp)==null||Se.call(ne);const Ne=e.unref(z),Te=e.unref(D);U({scrollLeft:Math.min(P.value.scrollLeft+G,M.value-Ne),scrollTop:Math.min(P.value.scrollTop+W,O.value-Te)})});a.useEventListener(w,"wheel",J,{passive:!1});const U=({scrollLeft:G=P.value.scrollLeft,scrollTop:W=P.value.scrollTop})=>{G=Math.max(G,0),W=Math.max(W,0);const re=e.unref(P);W===re.scrollTop&&G===re.scrollLeft||(P.value={...re,xAxisScrollDir:Pn(re.scrollLeft,G),yAxisScrollDir:Pn(re.scrollTop,W),scrollLeft:G,scrollTop:W,updateRequested:!0},e.nextTick(()=>Q()),X(),R())},oe=(G=0,W=0,re=Rt)=>{const ce=e.unref(P);W=Math.max(0,Math.min(W,v.totalColumn-1)),G=Math.max(0,Math.min(G,v.totalRow-1));const ne=L.getScrollBarWidth(C.namespace.value),Se=e.unref(S),Ne=s(v,Se),Te=i(v,Se);U({scrollLeft:c(v,W,re,ce.scrollLeft,Se,Te>v.width?ne:0),scrollTop:u(v,G,re,ce.scrollTop,Se,Ne>v.height?ne:0)})},ae=(G,W)=>{const{columnWidth:re,direction:ce,rowHeight:ne}=v,Se=T.value(n&&re,n&&ne,n&&ce),Ne=`${G},${W}`;if(a.hasOwn(Se,Ne))return Se[Ne];{const[,Te]=o(v,W,e.unref(S)),Ie=e.unref(S),Le=yu(ce),[ye,Ee]=d(v,G,Ie),[Oe]=o(v,W,Ie);return Se[Ne]={position:"absolute",left:Le?void 0:`${Te}px`,right:Le?`${Te}px`:void 0,top:`${Ee}px`,height:`${ye}px`,width:`${Oe}px`},Se[Ne]}},Q=()=>{P.value.isScrolling=!1,e.nextTick(()=>{T.value(-1,null,null)})};e.onMounted(()=>{if(!a.isClient)return;const{initScrollLeft:G,initScrollTop:W}=v,re=e.unref(w);re&&(a.isNumber(G)&&(re.scrollLeft=G),a.isNumber(W)&&(re.scrollTop=W)),R()});const X=()=>{const{direction:G}=v,{scrollLeft:W,scrollTop:re,updateRequested:ce}=e.unref(P),ne=e.unref(w);if(ce&&ne){if(G===Zn)switch(er()){case Rl:{ne.scrollLeft=-W;break}case Oi:{ne.scrollLeft=W;break}default:{const{clientWidth:Se,scrollWidth:Ne}=ne;ne.scrollLeft=Ne-Se-W;break}}else ne.scrollLeft=Math.max(0,W);ne.scrollTop=Math.max(0,re)}},{resetAfterColumnIndex:B,resetAfterRowIndex:I,resetAfter:j}=g.proxy;k({windowRef:w,innerRef:_,getItemStyleCache:T,scrollTo:U,scrollToItem:oe,states:P,resetAfterColumnIndex:B,resetAfterRowIndex:I,resetAfter:j});const Y=()=>{const{scrollbarAlwaysOn:G,scrollbarStartGap:W,scrollbarEndGap:re,totalColumn:ce,totalRow:ne}=v,Se=e.unref(z),Ne=e.unref(D),Te=e.unref(M),Ie=e.unref(O),{scrollLeft:Le,scrollTop:ye}=e.unref(P),Ee=e.h(Cs,{ref:N,alwaysOn:G,startGap:W,endGap:re,class:C.e("horizontal"),clientSize:Se,layout:"horizontal",onScroll:H,ratio:Se*100/Te,scrollFrom:Le/(Te-Se),total:ne,visible:!0}),Oe=e.h(Cs,{ref:V,alwaysOn:G,startGap:W,endGap:re,class:C.e("vertical"),clientSize:Ne,layout:"vertical",onScroll:K,ratio:Ne*100/Ie,scrollFrom:ye/(Ie-Ne),total:ce,visible:!0});return{horizontalScrollbar:Ee,verticalScrollbar:Oe}},$=()=>{var G;const[W,re]=e.unref(q),[ce,ne]=e.unref(Z),{data:Se,totalColumn:Ne,totalRow:Te,useIsScrolling:Ie,itemKey:Le}=v,ye=[];if(Te>0&&Ne>0)for(let Ee=ce;Ee<=ne;Ee++)for(let Oe=W;Oe<=re;Oe++){const $e=Le({columnIndex:Oe,data:Se,rowIndex:Ee});ye.push(e.h(e.Fragment,{key:$e},(G=E.default)==null?void 0:G.call(E,{columnIndex:Oe,data:Se,isScrolling:Ie?e.unref(P).isScrolling:void 0,style:ae(Ee,Oe),rowIndex:Ee})))}return ye},te=()=>{const G=e.resolveDynamicComponent(v.innerElement),W=$();return[e.h(G,e.mergeProps(v.innerProps,{style:e.unref(A),ref:_}),a.isString(G)?W:{default:()=>W})]};return()=>{const G=e.resolveDynamicComponent(v.containerElement),{horizontalScrollbar:W,verticalScrollbar:re}=Y(),ce=te();return e.h("div",{key:0,class:C.e("wrapper"),role:v.role},[e.h(G,{class:v.className,style:e.unref(x),onScroll:F,ref:w},a.isString(G)?ce:{default:()=>ce}),W,re])}}}),{max:or,min:dm,floor:fm}=Math,LV={column:"columnWidth",row:"rowHeight"},Os={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},sn=(t,n,o,l)=>{const[r,s,i]=[o[l],t[LV[l]],o[Os[l]]];if(n>i){let c=0;if(i>=0){const u=r[i];c=u.offset+u.size}for(let u=i+1;u<=n;u++){const d=s(u);r[u]={offset:c,size:d},c+=d}o[Os[l]]=n}return r[n]},pm=(t,n,o,l,r,s)=>{for(;o<=l;){const i=o+fm((l-o)/2),c=sn(t,i,n,s).offset;if(c===r)return i;c<r?o=i+1:l=i-1}return or(0,o-1)},FV=(t,n,o,l,r)=>{const s=r==="column"?t.totalColumn:t.totalRow;let i=1;for(;o<s&&sn(t,o,n,r).offset<l;)o+=i,i*=2;return pm(t,n,fm(o/2),dm(o,s-1),l,r)},xu=(t,n,o,l)=>{const[r,s]=[n[l],n[Os[l]]];return(s>0?r[s].offset:0)>=o?pm(t,n,0,s,o,l):FV(t,n,or(0,s),o,l)},mm=({totalRow:t},{estimatedRowHeight:n,lastVisitedRowIndex:o,row:l})=>{let r=0;if(o>=t&&(o=t-1),o>=0){const c=l[o];r=c.offset+c.size}const i=(t-o-1)*n;return r+i},hm=({totalColumn:t},{column:n,estimatedColumnWidth:o,lastVisitedColumnIndex:l})=>{let r=0;if(l>t&&(l=t-1),l>=0){const c=n[l];r=c.offset+c.size}const i=(t-l-1)*o;return r+i},KV={column:hm,row:mm},Au=(t,n,o,l,r,s,i)=>{const[c,u]=[s==="row"?t.height:t.width,KV[s]],d=sn(t,n,r,s),p=u(t,r),f=or(0,dm(p-c,d.offset)),h=or(0,d.offset-c+i+d.size);switch(o===br&&(l>=h-c&&l<=f+c?o=Rt:o=Zt),o){case Al:return f;case zl:return h;case Zt:return Math.round(h+(f-h)/2);case Rt:default:return l>=h&&l<=f?l:h>f||l<h?h:f}},HV=um({name:"ElDynamicSizeGrid",getColumnPosition:(t,n,o)=>{const l=sn(t,n,o,"column");return[l.size,l.offset]},getRowPosition:(t,n,o)=>{const l=sn(t,n,o,"row");return[l.size,l.offset]},getColumnOffset:(t,n,o,l,r,s)=>Au(t,n,o,l,r,"column",s),getRowOffset:(t,n,o,l,r,s)=>Au(t,n,o,l,r,"row",s),getColumnStartIndexForOffset:(t,n,o)=>xu(t,o,n,"column"),getColumnStopIndexForStartIndex:(t,n,o,l)=>{const r=sn(t,n,l,"column"),s=o+t.width;let i=r.offset+r.size,c=n;for(;c<t.totalColumn-1&&i<s;)c++,i+=sn(t,n,l,"column").size;return c},getEstimatedTotalHeight:mm,getEstimatedTotalWidth:hm,getRowStartIndexForOffset:(t,n,o)=>xu(t,o,n,"row"),getRowStopIndexForStartIndex:(t,n,o,l)=>{const{totalRow:r,height:s}=t,i=sn(t,n,l,"row"),c=o+s;let u=i.size+i.offset,d=n;for(;d<r-1&&u<c;)d++,u+=sn(t,d,l,"row").size;return d},injectToInstance:(t,n)=>{const o=({columnIndex:s,rowIndex:i},c)=>{var u,d;c=a.isUndefined(c)?!0:c,a.isNumber(s)&&(n.value.lastVisitedColumnIndex=Math.min(n.value.lastVisitedColumnIndex,s-1)),a.isNumber(i)&&(n.value.lastVisitedRowIndex=Math.min(n.value.lastVisitedRowIndex,i-1)),(u=t.exposed)==null||u.getItemStyleCache.value(-1,null,null),c&&((d=t.proxy)==null||d.$forceUpdate())},l=(s,i)=>{o({columnIndex:s},i)},r=(s,i)=>{o({rowIndex:s},i)};Object.assign(t.proxy,{resetAfterColumnIndex:l,resetAfterRowIndex:r,resetAfter:o})},initCache:({estimatedColumnWidth:t=ms,estimatedRowHeight:n=ms})=>({column:{},estimatedColumnWidth:t,estimatedRowHeight:n,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:t,rowHeight:n})=>{}}),jV=um({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},n)=>[t,n*t],getRowPosition:({rowHeight:t},n)=>[t,n*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:n})=>n*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:n})=>n*t,getColumnOffset:({totalColumn:t,columnWidth:n,width:o},l,r,s,i,c)=>{o=Number(o);const u=Math.max(0,t*n-o),d=Math.min(u,l*n),p=Math.max(0,l*n-o+c+n);switch(r==="smart"&&(s>=p-o&&s<=d+o?r=Rt:r=Zt),r){case Al:return d;case zl:return p;case Zt:{const f=Math.round(p+(d-p)/2);return f<Math.ceil(o/2)?0:f>u+Math.floor(o/2)?u:f}case Rt:default:return s>=p&&s<=d?s:p>d||s<p?p:d}},getRowOffset:({rowHeight:t,height:n,totalRow:o},l,r,s,i,c)=>{n=Number(n);const u=Math.max(0,o*t-n),d=Math.min(u,l*t),p=Math.max(0,l*t-n+c+t);switch(r===br&&(s>=p-n&&s<=d+n?r=Rt:r=Zt),r){case Al:return d;case zl:return p;case Zt:{const f=Math.round(p+(d-p)/2);return f<Math.ceil(n/2)?0:f>u+Math.floor(n/2)?u:f}case Rt:default:return s>=p&&s<=d?s:p>d||s<p?p:d}},getColumnStartIndexForOffset:({columnWidth:t,totalColumn:n},o)=>Math.max(0,Math.min(n-1,Math.floor(o/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:n,width:o},l,r)=>{const s=l*t,i=Math.ceil((o+r-s)/t);return Math.max(0,Math.min(n-1,l+i-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:n},o)=>Math.max(0,Math.min(n-1,Math.floor(o/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:n,height:o},l,r)=>{const s=l*t,i=Math.ceil((o+r-s)/t);return Math.max(0,Math.min(n-1,l+i-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:n})=>{}}),WV="ElTableV2Grid",UV=t=>{const n=e.ref(),o=e.ref(),l=e.ref(0),r=e.computed(()=>{const{data:b,rowHeight:k,estimatedRowHeight:E}=t;if(!E)return b.length*k}),s=e.computed(()=>{const{fixedData:b,rowHeight:k}=t;return((b==null?void 0:b.length)||0)*k}),i=e.computed(()=>xa(t.headerHeight)),c=e.computed(()=>{const{height:b}=t;return Math.max(0,b-e.unref(i)-e.unref(s))}),u=e.computed(()=>e.unref(i)+e.unref(s)>0),d=({data:b,rowIndex:k})=>b[k][t.rowKey];function p({rowCacheStart:b,rowCacheEnd:k,rowVisibleStart:E,rowVisibleEnd:C}){var g;(g=t.onRowsRendered)==null||g.call(t,{rowCacheStart:b,rowCacheEnd:k,rowVisibleStart:E,rowVisibleEnd:C})}function f(b,k){var E;(E=o.value)==null||E.resetAfterRowIndex(b,k)}function h(b,k){const E=e.unref(n),C=e.unref(o);a.isObject$1(b)?(E==null||E.scrollToLeft(b.scrollLeft),l.value=b.scrollLeft,C==null||C.scrollTo(b)):(E==null||E.scrollToLeft(b),l.value=b,C==null||C.scrollTo({scrollLeft:b,scrollTop:k}))}function m(b){var k;(k=e.unref(o))==null||k.scrollTo({scrollTop:b})}function y(b,k){var E;(E=e.unref(o))==null||E.scrollToItem(b,1,k)}function v(){var b,k;(b=e.unref(o))==null||b.$forceUpdate(),(k=e.unref(n))==null||k.$forceUpdate()}return e.watch(()=>t.bodyWidth,()=>{var b;a.isNumber(t.estimatedRowHeight)&&((b=o.value)==null||b.resetAfter({columnIndex:0},!1))}),{bodyRef:o,forceUpdate:v,fixedRowHeight:s,gridHeight:c,hasHeader:u,headerHeight:i,headerRef:n,totalHeight:r,itemKey:d,onItemRendered:p,resetAfterRowIndex:f,scrollTo:h,scrollToTop:m,scrollToRow:y,scrollLeft:l}},qV=e.defineComponent({name:WV,props:Aa,setup(t,{slots:n,expose:o}){const{ns:l}=e.inject(Li),{bodyRef:r,fixedRowHeight:s,gridHeight:i,hasHeader:c,headerRef:u,headerHeight:d,totalHeight:p,forceUpdate:f,itemKey:h,onItemRendered:m,resetAfterRowIndex:y,scrollTo:v,scrollToTop:b,scrollToRow:k,scrollLeft:E}=UV(t);e.provide(rm,E),e.onActivated(async()=>{var g;await e.nextTick();const S=(g=r.value)==null?void 0:g.states.scrollTop;S&&b(Math.round(S)+1)}),o({forceUpdate:f,totalHeight:p,scrollTo:v,scrollToTop:b,scrollToRow:k,resetAfterRowIndex:y});const C=()=>t.bodyWidth;return()=>{const{cache:g,columns:S,data:w,fixedData:N,useIsScrolling:V,scrollbarAlwaysOn:_,scrollbarEndGap:P,scrollbarStartGap:T,style:D,rowHeight:z,bodyWidth:q,estimatedRowHeight:Z,headerWidth:O,height:M,width:x,getRowHeight:A,onScroll:R}=t,F=a.isNumber(Z),K=F?HV:jV,H=e.unref(d);return e.createVNode("div",{role:"table",class:[l.e("table"),t.class],style:D},[e.createVNode(K,{ref:r,data:w,useIsScrolling:V,itemKey:h,columnCache:0,columnWidth:F?C:q,totalColumn:1,totalRow:w.length,rowCache:g,rowHeight:F?A:z,width:x,height:e.unref(i),class:l.e("body"),role:"rowgroup",scrollbarStartGap:T,scrollbarEndGap:P,scrollbarAlwaysOn:_,onScroll:R,onItemRendered:m,perfMode:!1},{default:J=>{var U;const oe=w[J.rowIndex];return(U=n.row)==null?void 0:U.call(n,{...J,columns:S,rowData:oe})}}),e.unref(c)&&e.createVNode(zV,{ref:u,class:l.e("header-wrapper"),columns:S,headerData:w,headerHeight:t.headerHeight,fixedHeaderData:N,rowWidth:O,rowHeight:z,width:x,height:Math.min(H+e.unref(s),M)},{dynamic:n.header,fixed:n.row})])}}});var Hi=qV;function YV(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const GV=(t,{slots:n})=>{const{mainTableRef:o,...l}=t;return e.createVNode(Hi,e.mergeProps({ref:o},l),YV(n)?n:{default:()=>[n]})};var XV=GV;function JV(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const ZV=(t,{slots:n})=>{if(!t.columns.length)return;const{leftTableRef:o,...l}=t;return e.createVNode(Hi,e.mergeProps({ref:o},l),JV(n)?n:{default:()=>[n]})};var QV=ZV;function eP(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const tP=(t,{slots:n})=>{if(!t.columns.length)return;const{rightTableRef:o,...l}=t;return e.createVNode(Hi,e.mergeProps({ref:o},l),eP(n)?n:{default:()=>[n]})};var nP=tP;const oP=t=>{const{isScrolling:n}=e.inject(Li),o=e.ref(!1),l=e.ref(),r=e.computed(()=>a.isNumber(t.estimatedRowHeight)&&t.rowIndex>=0),s=(u=!1)=>{const d=e.unref(l);if(!d)return;const{columns:p,onRowHeightChange:f,rowKey:h,rowIndex:m,style:y}=t,{height:v}=d.getBoundingClientRect();o.value=!0,e.nextTick(()=>{if(u||v!==Number.parseInt(y.height)){const b=p[0],k=(b==null?void 0:b.placeholderSign)===Hl;f==null||f({rowKey:h,height:v,rowIndex:m},b&&!k&&b.fixed)}})},i=e.computed(()=>{const{rowData:u,rowIndex:d,rowKey:p,onRowHover:f}=t,h=t.rowEventHandlers||{},m={};return Object.entries(h).forEach(([y,v])=>{a.isFunction(v)&&(m[y]=b=>{v({event:b,rowData:u,rowIndex:d,rowKey:p})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:y,hovered:v})=>{const b=m[y];m[y]=k=>{f({event:k,hovered:v,rowData:u,rowIndex:d,rowKey:p}),b==null||b(k)}}),m}),c=u=>{const{onRowExpand:d,rowData:p,rowIndex:f,rowKey:h}=t;d==null||d({expanded:u,rowData:p,rowIndex:f,rowKey:h})};return e.onMounted(()=>{e.unref(r)&&s(!0)}),{isScrolling:n,measurable:r,measured:o,rowRef:l,eventHandlers:i,onExpand:c}},lP="ElTableV2TableRow",aP=e.defineComponent({name:lP,props:Dn,setup(t,{expose:n,slots:o,attrs:l}){const{eventHandlers:r,isScrolling:s,measurable:i,measured:c,rowRef:u,onExpand:d}=oP(t);return n({onExpand:d}),()=>{const{columns:p,columnsStyles:f,expandColumnKey:h,depth:m,rowData:y,rowIndex:v,style:b}=t;let k=p.map((E,C)=>{const g=a.isArray$1(y.children)&&y.children.length>0&&E.key===h;return o.cell({column:E,columns:p,columnIndex:C,depth:m,style:f[E.key],rowData:y,rowIndex:v,isScrolling:e.unref(s),expandIconProps:g?{rowData:y,rowIndex:v,onExpand:d}:void 0})});if(o.row&&(k=o.row({cells:k.map(E=>a.isArray$1(E)&&E.length===1?E[0]:E),style:b,columns:p,depth:m,rowData:y,rowIndex:v,isScrolling:e.unref(s)})),e.unref(i)){const{height:E,...C}=b||{},g=e.unref(c);return e.createVNode("div",e.mergeProps({ref:u,class:t.class,style:g?b:C,role:"row"},l,e.unref(r)),[k])}return e.createVNode("div",e.mergeProps(l,{ref:u,class:t.class,style:b,role:"row"},e.unref(r)),[k])}}});var rP=aP;function sP(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const iP=(t,{slots:n})=>{const{columns:o,columnsStyles:l,depthMap:r,expandColumnKey:s,expandedRowKeys:i,estimatedRowHeight:c,hasFixedColumns:u,rowData:d,rowIndex:p,style:f,isScrolling:h,rowProps:m,rowClass:y,rowKey:v,rowEventHandlers:b,ns:k,onRowHovered:E,onRowExpanded:C}=t,g=zn(y,{columns:o,rowData:d,rowIndex:p},""),S=zn(m,{columns:o,rowData:d,rowIndex:p}),w=d[v],N=r[w]||0,V=!!s,_=p<0,P=[k.e("row"),g,k.is("expanded",V&&i.includes(w)),k.is("fixed",!N&&_),k.is("customized",!!n.row),{[k.e(`row-depth-${N}`)]:V&&p>=0}],T=u?E:void 0,D={...S,columns:o,columnsStyles:l,class:P,depth:N,expandColumnKey:s,estimatedRowHeight:_?void 0:c,isScrolling:h,rowIndex:p,rowData:d,rowKey:w,rowEventHandlers:b,style:f},z=Z=>{T==null||T({hovered:!0,rowKey:w,event:Z,rowData:d,rowIndex:p})},q=Z=>{T==null||T({hovered:!1,rowKey:w,event:Z,rowData:d,rowIndex:p})};return e.createVNode(rP,e.mergeProps(D,{onRowExpand:C,onMouseenter:z,onMouseleave:q,rowkey:w}),sP(n)?n:{default:()=>[n]})};var cP=iP;const ji=(t,{slots:n})=>{var o;const{cellData:l,style:r}=t,s=((o=l==null?void 0:l.toString)==null?void 0:o.call(l))||"",i=e.renderSlot(n,"default",t,()=>[s]);return e.createVNode("div",{class:t.class,title:s,style:r},[i])};ji.displayName="ElTableV2Cell";ji.inheritAttrs=!1;var uP=ji;const dP=t=>{const{expanded:n,expandable:o,onExpand:l,style:r,size:s}=t,i={onClick:o?()=>l(!n):void 0,class:t.class};return e.createVNode(a.ElIcon,e.mergeProps(i,{size:s,style:r}),{default:()=>[e.createVNode(a.arrow_right_default,null,null)]})};var fP=dP;const vm=({columns:t,column:n,columnIndex:o,depth:l,expandIconProps:r,isScrolling:s,rowData:i,rowIndex:c,style:u,expandedRowKeys:d,ns:p,cellProps:f,expandColumnKey:h,indentSize:m,iconSize:y,rowKey:v},{slots:b})=>{const k=Cn(u);if(n.placeholderSign===Hl)return e.createVNode("div",{class:p.em("row-cell","placeholder"),style:k},null);const{cellRenderer:E,dataKey:C,dataGetter:g}=n,S=a.isFunction(g)?g({columns:t,column:n,columnIndex:o,rowData:i,rowIndex:c}):a.get(i,C??""),w=zn(f,{cellData:S,columns:t,column:n,columnIndex:o,rowIndex:c,rowData:i}),N={class:p.e("cell-text"),columns:t,column:n,columnIndex:o,cellData:S,isScrolling:s,rowData:i,rowIndex:c},V=am(E),_=V?V(N):e.renderSlot(b,"default",N,()=>[e.createVNode(uP,N,null)]),P=[p.e("row-cell"),n.class,n.align===Kl.CENTER&&p.is("align-center"),n.align===Kl.RIGHT&&p.is("align-right")],T=c>=0&&h&&n.key===h,D=c>=0&&d.includes(i[v]);let z;const q=`margin-inline-start: ${l*m}px;`;return T&&(a.isObject$1(r)?z=e.createVNode(fP,e.mergeProps(r,{class:[p.e("expand-icon"),p.is("expanded",D)],size:y,expanded:D,style:q,expandable:!0}),null):z=e.createVNode("div",{style:[q,`width: ${y}px; height: ${y}px;`].join(" ")},null)),e.createVNode("div",e.mergeProps({class:P,style:k},w,{role:"cell"}),[z,_])};vm.inheritAttrs=!1;var zu=vm;const pP=a.buildProps({class:String,columns:ea,columnsStyles:{type:a.definePropType(Object),required:!0},headerIndex:Number,style:{type:a.definePropType(Object)}}),mP=e.defineComponent({name:"ElTableV2HeaderRow",props:pP,setup(t,{slots:n}){return()=>{const{columns:o,columnsStyles:l,headerIndex:r,style:s}=t;let i=o.map((c,u)=>n.cell({columns:o,column:c,columnIndex:u,headerIndex:r,style:l[c.key]}));return n.header&&(i=n.header({cells:i.map(c=>a.isArray$1(c)&&c.length===1?c[0]:c),columns:o,headerIndex:r})),e.createVNode("div",{class:t.class,style:s,role:"row"},[i])}}});var hP=mP;function vP(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const gP=({columns:t,columnsStyles:n,headerIndex:o,style:l,headerClass:r,headerProps:s,ns:i},{slots:c})=>{const u={columns:t,headerIndex:o},d=[i.e("header-row"),zn(r,u,""),i.is("customized",!!c.header)],p={...zn(s,u),columnsStyles:n,class:d,columns:t,headerIndex:o,style:l};return e.createVNode(hP,p,vP(c)?c:{default:()=>[c]})};var yP=gP;const Wi=(t,{slots:n})=>e.renderSlot(n,"default",t,()=>{var o,l;return[e.createVNode("div",{class:t.class,title:(o=t.column)==null?void 0:o.title},[(l=t.column)==null?void 0:l.title])]});Wi.displayName="ElTableV2HeaderCell";Wi.inheritAttrs=!1;var bP=Wi;const CP=t=>{const{sortOrder:n}=t;return e.createVNode(a.ElIcon,{size:14,class:t.class},{default:()=>[n===Fl.ASC?e.createVNode(a.sort_up_default,null,null):e.createVNode(a.sort_down_default,null,null)]})};var kP=CP;const EP=(t,{slots:n})=>{const{column:o,ns:l,style:r,onColumnSorted:s}=t,i=Cn(r);if(o.placeholderSign===Hl)return e.createVNode("div",{class:l.em("header-row-cell","placeholder"),style:i},null);const{headerCellRenderer:c,headerClass:u,sortable:d}=o,p={...t,class:l.e("header-cell-text")},f=am(c),h=f?f(p):e.renderSlot(n,"default",p,()=>[e.createVNode(bP,p,null)]),{sortBy:m,sortState:y,headerCellProps:v}=t;let b,k;if(y){const g=y[o.key];b=!!Is[g],k=b?g:Fl.ASC}else b=o.key===m.key,k=b?m.order:Fl.ASC;const E=[l.e("header-cell"),zn(u,t,""),o.align===Kl.CENTER&&l.is("align-center"),o.align===Kl.RIGHT&&l.is("align-right"),d&&l.is("sortable")],C={...zn(v,t),onClick:o.sortable?s:void 0,class:E,style:i,"data-key":o.key};return e.createVNode("div",e.mergeProps(C,{role:"columnheader"}),[h,d&&e.createVNode(kP,{class:[l.e("sort-icon"),b&&l.is("sorting")],sortOrder:k},null)])};var Ru=EP;const gm=(t,{slots:n})=>{var o;return e.createVNode("div",{class:t.class,style:t.style},[(o=n.default)==null?void 0:o.call(n)])};gm.displayName="ElTableV2Footer";var wP=gm;const ym=(t,{slots:n})=>{const o=e.renderSlot(n,"default",{},()=>[e.createVNode(up,null,null)]);return e.createVNode("div",{class:t.class,style:t.style},[o])};ym.displayName="ElTableV2Empty";var SP=ym;const bm=(t,{slots:n})=>{var o;return e.createVNode("div",{class:t.class,style:t.style},[(o=n.default)==null?void 0:o.call(n)])};bm.displayName="ElTableV2Overlay";var NP=bm;function bl(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const TP="ElTableV2",_P=e.defineComponent({name:TP,props:MV,setup(t,{slots:n,expose:o}){const l=a.useNamespace("table-v2"),{columnsStyles:r,fixedColumnsOnLeft:s,fixedColumnsOnRight:i,mainColumns:c,mainTableHeight:u,fixedTableHeight:d,leftTableWidth:p,rightTableWidth:f,data:h,depthMap:m,expandedRowKeys:y,hasFixedColumns:v,mainTableRef:b,leftTableRef:k,rightTableRef:E,isDynamic:C,isResetting:g,isScrolling:S,bodyWidth:w,emptyStyle:N,rootStyle:V,footerHeight:_,showEmpty:P,scrollTo:T,scrollToLeft:D,scrollToTop:z,scrollToRow:q,getRowHeight:Z,onColumnSorted:O,onRowHeightChange:M,onRowHovered:x,onRowExpanded:A,onRowsRendered:R,onScroll:F,onVerticalScroll:K}=OV(t);return o({scrollTo:T,scrollToLeft:D,scrollToTop:z,scrollToRow:q}),e.provide(Li,{ns:l,isResetting:g,isScrolling:S}),()=>{const{cache:H,cellProps:J,estimatedRowHeight:U,expandColumnKey:oe,fixedData:ae,headerHeight:Q,headerClass:X,headerProps:B,headerCellProps:I,sortBy:j,sortState:Y,rowHeight:$,rowClass:te,rowEventHandlers:le,rowKey:G,rowProps:W,scrollbarAlwaysOn:re,indentSize:ce,iconSize:ne,useIsScrolling:Se,vScrollbarSize:Ne,width:Te}=t,Ie=e.unref(h),Le={cache:H,class:l.e("main"),columns:e.unref(c),data:Ie,fixedData:ae,estimatedRowHeight:U,bodyWidth:e.unref(w),headerHeight:Q,headerWidth:e.unref(w),height:e.unref(u),mainTableRef:b,rowKey:G,rowHeight:$,scrollbarAlwaysOn:re,scrollbarStartGap:2,scrollbarEndGap:Ne,useIsScrolling:Se,width:Te,getRowHeight:Z,onRowsRendered:R,onScroll:F},ye=e.unref(p),Ee=e.unref(d),Oe={cache:H,class:l.e("left"),columns:e.unref(s),data:Ie,fixedData:ae,estimatedRowHeight:U,leftTableRef:k,rowHeight:$,bodyWidth:ye,headerWidth:ye,headerHeight:Q,height:Ee,rowKey:G,scrollbarAlwaysOn:re,scrollbarStartGap:2,scrollbarEndGap:Ne,useIsScrolling:Se,width:ye,getRowHeight:Z,onScroll:K},$e=e.unref(f),de={cache:H,class:l.e("right"),columns:e.unref(i),data:Ie,fixedData:ae,estimatedRowHeight:U,rightTableRef:E,rowHeight:$,bodyWidth:$e,headerWidth:$e,headerHeight:Q,height:Ee,rowKey:G,scrollbarAlwaysOn:re,scrollbarStartGap:2,scrollbarEndGap:Ne,width:$e,style:`${l.cssVarName("table-scrollbar-size")}: ${Ne}px`,useIsScrolling:Se,getRowHeight:Z,onScroll:K},ke=e.unref(r),ee={ns:l,depthMap:e.unref(m),columnsStyles:ke,expandColumnKey:oe,expandedRowKeys:e.unref(y),estimatedRowHeight:U,hasFixedColumns:e.unref(v),rowProps:W,rowClass:te,rowKey:G,rowEventHandlers:le,onRowHovered:x,onRowExpanded:A,onRowHeightChange:M},fe={cellProps:J,expandColumnKey:oe,indentSize:ce,iconSize:ne,rowKey:G,expandedRowKeys:e.unref(y),ns:l},we={ns:l,headerClass:X,headerProps:B,columnsStyles:ke},ie={ns:l,sortBy:j,sortState:Y,headerCellProps:I,onColumnSorted:O},Ce={row:ge=>e.createVNode(cP,e.mergeProps(ge,ee),{row:n.row,cell:Ve=>{let Me;return n.cell?e.createVNode(zu,e.mergeProps(Ve,fe,{style:ke[Ve.column.key]}),bl(Me=n.cell(Ve))?Me:{default:()=>[Me]}):e.createVNode(zu,e.mergeProps(Ve,fe,{style:ke[Ve.column.key]}),null)}}),header:ge=>e.createVNode(yP,e.mergeProps(ge,we),{header:n.header,cell:Ve=>{let Me;return n["header-cell"]?e.createVNode(Ru,e.mergeProps(Ve,ie,{style:ke[Ve.column.key]}),bl(Me=n["header-cell"](Ve))?Me:{default:()=>[Me]}):e.createVNode(Ru,e.mergeProps(Ve,ie,{style:ke[Ve.column.key]}),null)}})},se=[t.class,l.b(),l.e("root"),l.is("dynamic",e.unref(C))],ue={class:l.e("footer"),style:e.unref(_)};return e.createVNode("div",{class:se,style:e.unref(V)},[e.createVNode(XV,Le,bl(Ce)?Ce:{default:()=>[Ce]}),e.createVNode(QV,Oe,bl(Ce)?Ce:{default:()=>[Ce]}),e.createVNode(nP,de,bl(Ce)?Ce:{default:()=>[Ce]}),n.footer&&e.createVNode(wP,ue,{default:n.footer}),e.unref(P)&&e.createVNode(SP,{class:l.e("empty"),style:e.unref(N)},{default:n.empty}),n.overlay&&e.createVNode(NP,{class:l.e("overlay")},{default:n.overlay})])}}});var BP=_P;const VP=a.buildProps({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:a.definePropType(Function)}}),PP=t=>{const n=e.ref(),o=e.ref(0),l=e.ref(0);let r;return e.onMounted(()=>{r=a.useResizeObserver(n,([s])=>{const{width:i,height:c}=s.contentRect,{paddingLeft:u,paddingRight:d,paddingTop:p,paddingBottom:f}=getComputedStyle(s.target),h=Number.parseInt(u)||0,m=Number.parseInt(d)||0,y=Number.parseInt(p)||0,v=Number.parseInt(f)||0;o.value=i-h-m,l.value=c-y-v}).stop}),e.onBeforeUnmount(()=>{r==null||r()}),e.watch([o,l],([s,i])=>{var c;(c=t.onResize)==null||c.call(t,{width:s,height:i})}),{sizer:n,width:o,height:l}},DP=e.defineComponent({name:"ElAutoResizer",props:VP,setup(t,{slots:n}){const o=a.useNamespace("auto-resizer"),{height:l,width:r,sizer:s}=PP(t),i={width:"100%",height:"100%"};return()=>{var c;return e.createVNode("div",{ref:s,class:o.b(),style:i},[(c=n.default)==null?void 0:c.call(n,{height:l.value,width:r.value})])}}});var IP=DP;const OP=a.withInstall(BP),$P=a.withInstall(IP),Cr=Symbol("tabsRootContextKey"),MP=a.buildProps({tabs:{type:a.definePropType(Array),default:()=>a.mutable([])},tabRefs:{type:a.definePropType(Object),default:()=>a.mutable({})}}),Cm="ElTabBar",xP=e.defineComponent({name:Cm}),AP=e.defineComponent({...xP,props:MP,setup(t,{expose:n}){const o=t,l=e.inject(Cr);l||a.throwError(Cm,"<el-tabs><el-tab-bar /></el-tabs>");const r=a.useNamespace("tabs"),s=e.ref(),i=e.ref(),c=()=>{let h=0,m=0;const y=["top","bottom"].includes(l.props.tabPosition)?"width":"height",v=y==="width"?"x":"y",b=v==="x"?"left":"top";return o.tabs.every(k=>{if(a.isUndefined(k.paneName))return!1;const E=o.tabRefs[k.paneName];if(!E)return!1;if(!k.active)return!0;h=E[`offset${bn(b)}`],m=E[`client${bn(y)}`];const C=window.getComputedStyle(E);return y==="width"&&(m-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),h+=Number.parseFloat(C.paddingLeft)),!1}),{[y]:`${m}px`,transform:`translate${bn(v)}(${h}px)`}},u=()=>i.value=c(),d=[],p=()=>{d.forEach(h=>h.stop()),d.length=0,Object.values(o.tabRefs).forEach(h=>{d.push(a.useResizeObserver(h,u))})};e.watch(()=>o.tabs,async()=>{await e.nextTick(),u(),p()},{immediate:!0});const f=a.useResizeObserver(s,()=>u());return e.onBeforeUnmount(()=>{d.forEach(h=>h.stop()),d.length=0,f.stop()}),n({ref:s,update:u}),(h,m)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"barRef",ref:s,class:e.normalizeClass([e.unref(r).e("active-bar"),e.unref(r).is(e.unref(l).props.tabPosition)]),style:e.normalizeStyle(i.value)},null,6))}});var zP=a._export_sfc(AP,[["__file","tab-bar.vue"]]);const RP=a.buildProps({panes:{type:a.definePropType(Array),default:()=>a.mutable([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),LP={tabClick:(t,n,o)=>o instanceof Event,tabRemove:(t,n)=>n instanceof Event},Lu="ElTabNav",FP=e.defineComponent({name:Lu,props:RP,emits:LP,setup(t,{expose:n,emit:o}){const l=e.inject(Cr);l||a.throwError(Lu,"<el-tabs><tab-nav /></el-tabs>");const r=a.useNamespace("tabs"),s=a.useDocumentVisibility(),i=a.useWindowFocus(),c=e.ref(),u=e.ref(),d=e.ref(),p=e.ref({}),f=e.ref(),h=e.ref(!1),m=e.ref(0),y=e.ref(!1),v=e.ref(!0),b=e.shallowRef(),k=e.computed(()=>["top","bottom"].includes(l.props.tabPosition)),E=e.computed(()=>k.value?"width":"height"),C=e.computed(()=>({transform:`translate${E.value==="width"?"X":"Y"}(-${m.value}px)`})),{width:g,height:S}=a.useElementSize(c),{width:w,height:N}=a.useElementSize(u,{width:0,height:0},{box:"border-box"}),V=e.computed(()=>k.value?g.value:S.value),_=e.computed(()=>k.value?w.value:N.value),{onWheel:P}=Tp({atStartEdge:e.computed(()=>m.value<=0),atEndEdge:e.computed(()=>_.value-m.value<=V.value),layout:e.computed(()=>k.value?"horizontal":"vertical")},R=>{m.value=ur(m.value+R,0,_.value-V.value)}),T=()=>{if(!c.value)return;const R=c.value[`offset${bn(E.value)}`],F=m.value;if(!F)return;const K=F>R?F-R:0;m.value=K},D=()=>{if(!c.value||!u.value)return;const R=u.value[`offset${bn(E.value)}`],F=c.value[`offset${bn(E.value)}`],K=m.value;if(R-K<=F)return;const H=R-K>F*2?K+F:R-F;m.value=H},z=async()=>{const R=u.value;if(!h.value||!d.value||!c.value||!R)return;await e.nextTick();const F=p.value[t.currentName];if(!F)return;const K=c.value,H=F.getBoundingClientRect(),J=K.getBoundingClientRect(),U=k.value?R.offsetWidth-J.width:R.offsetHeight-J.height,oe=m.value;let ae=oe;k.value?(H.left<J.left&&(ae=oe-(J.left-H.left)),H.right>J.right&&(ae=oe+H.right-J.right)):(H.top<J.top&&(ae=oe-(J.top-H.top)),H.bottom>J.bottom&&(ae=oe+(H.bottom-J.bottom))),ae=Math.max(ae,0),m.value=Math.min(ae,U)},q=()=>{var R;if(!u.value||!c.value)return;t.stretch&&((R=f.value)==null||R.update());const F=u.value[`offset${bn(E.value)}`],K=c.value[`offset${bn(E.value)}`],H=m.value;K<F?(h.value=h.value||{},h.value.prev=H,h.value.next=H+K<F,F-H<K&&(m.value=F-K)):(h.value=!1,H>0&&(m.value=0))},Z=R=>{const F=a.getEventCode(R);let K=0;switch(F){case a.EVENT_CODE.left:case a.EVENT_CODE.up:K=-1;break;case a.EVENT_CODE.right:case a.EVENT_CODE.down:K=1;break;default:return}const H=Array.from(R.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let U=H.indexOf(R.target)+K;U<0?U=H.length-1:U>=H.length&&(U=0),H[U].focus({preventScroll:!0}),H[U].click(),O()},O=()=>{v.value&&(y.value=!0)},M=()=>y.value=!1,x=(R,F)=>{p.value[F]=R},A=async()=>{await e.nextTick();const R=p.value[t.currentName];R==null||R.focus({preventScroll:!0})};return e.watch(s,R=>{R==="hidden"?v.value=!1:R==="visible"&&setTimeout(()=>v.value=!0,50)}),e.watch(i,R=>{R?setTimeout(()=>v.value=!0,50):v.value=!1}),a.useResizeObserver(d,q),e.onMounted(()=>setTimeout(()=>z(),0)),e.onUpdated(()=>q()),n({scrollToActiveTab:z,removeFocus:M,focusActiveTab:A,tabListRef:u,tabBarRef:f,scheduleRender:()=>e.triggerRef(b)}),()=>{const R=h.value?[e.createVNode("span",{class:[r.e("nav-prev"),r.is("disabled",!h.value.prev)],onClick:T},[e.createVNode(a.ElIcon,null,{default:()=>[e.createVNode(a.arrow_left_default,null,null)]})]),e.createVNode("span",{class:[r.e("nav-next"),r.is("disabled",!h.value.next)],onClick:D},[e.createVNode(a.ElIcon,null,{default:()=>[e.createVNode(a.arrow_right_default,null,null)]})])]:null,F=t.panes.map((K,H)=>{var J,U,oe,ae,Q;const X=K.uid,B=K.props.disabled,I=(U=(J=K.props.name)!=null?J:K.index)!=null?U:`${H}`,j=!B&&(K.isClosable||K.props.closable!==!1&&t.editable);K.index=`${H}`;const Y=j?e.createVNode(a.ElIcon,{class:"is-icon-close",onClick:le=>o("tabRemove",K,le)},{default:()=>[e.createVNode(a.close_default,null,null)]}):null,$=((ae=(oe=K.slots).label)==null?void 0:ae.call(oe))||K.props.label,te=!B&&K.active?(Q=t.tabindex)!=null?Q:l.props.tabindex:-1;return e.createVNode("div",{ref:le=>x(le,I),class:[r.e("item"),r.is(l.props.tabPosition),r.is("active",K.active),r.is("disabled",B),r.is("closable",j),r.is("focus",y.value)],id:`tab-${I}`,key:`tab-${X}`,"aria-controls":`pane-${I}`,role:"tab","aria-selected":K.active,tabindex:te,onFocus:()=>O(),onBlur:()=>M(),onClick:le=>{M(),o("tabClick",K,I,le)},onKeydown:le=>{const G=a.getEventCode(le);j&&(G===a.EVENT_CODE.delete||G===a.EVENT_CODE.backspace)&&o("tabRemove",K,le)}},[$,Y])});return b.value,e.createVNode("div",{ref:d,class:[r.e("nav-wrap"),r.is("scrollable",!!h.value),r.is(l.props.tabPosition)]},[R,e.createVNode("div",{class:r.e("nav-scroll"),ref:c},[t.panes.length>0?e.createVNode("div",{class:[r.e("nav"),r.is(l.props.tabPosition),r.is("stretch",t.stretch&&["top","bottom"].includes(l.props.tabPosition))],ref:u,style:C.value,role:"tablist",onKeydown:Z,onWheel:P},[t.type?null:e.createVNode(zP,{ref:f,tabs:[...t.panes],tabRefs:p.value},null),F]):null])])}}}),KP=a.buildProps({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:a.definePropType(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),jr=t=>a.isString(t)||a.isNumber(t),HP={[L.UPDATE_MODEL_EVENT]:t=>jr(t),tabClick:(t,n)=>n instanceof Event,tabChange:t=>jr(t),edit:(t,n)=>["remove","add"].includes(n),tabRemove:t=>jr(t),tabAdd:()=>!0},jP=e.defineComponent({name:"ElTabs",props:KP,emits:HP,setup(t,{emit:n,slots:o,expose:l}){var r;const s=a.useNamespace("tabs"),i=e.computed(()=>["left","right"].includes(t.tabPosition)),{children:c,addChild:u,removeChild:d,ChildrenSorter:p}=mr(e.getCurrentInstance(),"ElTabPane"),f=e.ref(),h=e.ref((r=t.modelValue)!=null?r:"0"),m=async(C,g=!1)=>{var S,w,N,V;if(!(h.value===C||a.isUndefined(C)))try{let _;if(t.beforeLeave){const P=t.beforeLeave(C,h.value);_=P instanceof Promise?await P:P}else _=!0;if(_!==!1){const P=(S=c.value.find(T=>T.paneName===h.value))==null?void 0:S.isFocusInsidePane();h.value=C,g&&(n(L.UPDATE_MODEL_EVENT,C),n("tabChange",C)),(N=(w=f.value)==null?void 0:w.removeFocus)==null||N.call(w),P&&((V=f.value)==null||V.focusActiveTab())}}catch{}},y=(C,g,S)=>{C.props.disabled||(n("tabClick",C,S),m(g,!0))},v=(C,g)=>{C.props.disabled||a.isUndefined(C.props.name)||(g.stopPropagation(),n("edit",C.props.name,"remove"),n("tabRemove",C.props.name))},b=()=>{n("edit",void 0,"add"),n("tabAdd")},k=C=>{const g=a.getEventCode(C);[a.EVENT_CODE.enter,a.EVENT_CODE.numpadEnter].includes(g)&&b()},E=C=>{const g=C.el.firstChild,S=["bottom","right"].includes(t.tabPosition)?C.children[0].el:C.children[1].el;g!==S&&g.before(S)};return e.watch(()=>t.modelValue,C=>m(C)),e.watch(h,async()=>{var C;await e.nextTick(),(C=f.value)==null||C.scrollToActiveTab()}),e.provide(Cr,{props:t,currentName:h,registerPane:u,unregisterPane:d,nav$:f}),l({currentName:h,get tabNavRef(){return dr(f.value,["scheduleRender"])}}),()=>{const C=o["add-icon"],g=t.editable||t.addable?e.createVNode("div",{class:[s.e("new-tab"),i.value&&s.e("new-tab-vertical")],tabindex:t.tabindex,onClick:b,onKeydown:k},[C?e.renderSlot(o,"add-icon"):e.createVNode(a.ElIcon,{class:s.is("icon-plus")},{default:()=>[e.createVNode(a.plus_default,null,null)]})]):null,S=()=>e.createVNode(FP,{ref:f,currentName:h.value,editable:t.editable,type:t.type,panes:c.value,stretch:t.stretch,onTabClick:y,onTabRemove:v},null),w=e.createVNode("div",{class:[s.e("header"),i.value&&s.e("header-vertical"),s.is(t.tabPosition)]},[e.createVNode(p,null,{default:S,$stable:!0}),g]),N=e.createVNode("div",{class:s.e("content")},[e.renderSlot(o,"default")]);return e.createVNode("div",{class:[s.b(),s.m(t.tabPosition),{[s.m("card")]:t.type==="card",[s.m("border-card")]:t.type==="border-card"}],onVnodeMounted:E,onVnodeUpdated:E},[N,w])}}});var WP=jP;const UP=a.buildProps({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),km="ElTabPane",qP=e.defineComponent({name:km}),YP=e.defineComponent({...qP,props:UP,setup(t){const n=t,o=e.getCurrentInstance(),l=e.useSlots(),r=e.inject(Cr);r||a.throwError(km,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=a.useNamespace("tab-pane"),i=e.ref(),c=e.ref(),u=e.computed(()=>{var v;return(v=n.closable)!=null?v:r.props.closable}),d=a.computedEager(()=>{var v;return r.currentName.value===((v=n.name)!=null?v:c.value)}),p=e.ref(d.value),f=e.computed(()=>{var v;return(v=n.name)!=null?v:c.value}),h=a.computedEager(()=>!n.lazy||p.value||d.value),m=()=>{var v;return(v=i.value)==null?void 0:v.contains(document.activeElement)};e.watch(d,v=>{v&&(p.value=!0)});const y=e.reactive({uid:o.uid,getVnode:()=>o.vnode,slots:l,props:n,paneName:f,active:d,index:c,isClosable:u,isFocusInsidePane:m});return r.registerPane(y),e.onBeforeUnmount(()=>{r.unregisterPane(y)}),e.onBeforeUpdate(()=>{var v;l.label&&((v=r.nav$.value)==null||v.scheduleRender())}),(v,b)=>e.unref(h)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,id:`pane-${e.unref(f)}`,ref_key:"paneRef",ref:i,class:e.normalizeClass(e.unref(s).b()),role:"tabpanel","aria-hidden":!e.unref(d),"aria-labelledby":`tab-${e.unref(f)}`},[e.renderSlot(v.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[e.vShow,e.unref(d)]]):e.createCommentVNode("v-if",!0)}});var Em=a._export_sfc(YP,[["__file","tab-pane.vue"]]);const GP=a.withInstall(WP,{TabPane:Em}),XP=a.withNoopInstall(Em),JP=a.buildProps({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:a.componentSizes,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),ZP=e.defineComponent({name:"ElText"}),QP=e.defineComponent({...ZP,props:JP,setup(t){const n=t,o=e.ref(),l=L.useFormSize(),r=a.useNamespace("text"),s=e.computed(()=>[r.b(),r.m(n.type),r.m(l.value),r.is("truncated",n.truncated),r.is("line-clamp",!a.isUndefined(n.lineClamp))]),i=()=>{var c,u,d,p,f,h,m;if(e.useAttrs().title)return;let v=!1;const b=((c=o.value)==null?void 0:c.textContent)||"";if(n.truncated){const k=(u=o.value)==null?void 0:u.offsetWidth,E=(d=o.value)==null?void 0:d.scrollWidth;k&&E&&E>k&&(v=!0)}else if(!a.isUndefined(n.lineClamp)){const k=(p=o.value)==null?void 0:p.offsetHeight,E=(f=o.value)==null?void 0:f.scrollHeight;k&&E&&E>k&&(v=!0)}v?(h=o.value)==null||h.setAttribute("title",b):(m=o.value)==null||m.removeAttribute("title")};return e.onMounted(i),e.onUpdated(i),(c,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.tag),{ref_key:"textRef",ref:o,class:e.normalizeClass(e.unref(s)),style:e.normalizeStyle({"-webkit-line-clamp":c.lineClamp})},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}});var eD=a._export_sfc(QP,[["__file","text.vue"]]);const Ui=a.withInstall(eD),tD=a.buildProps({format:{type:String,default:"HH:mm"},modelValue:{type:a.definePropType(String)},disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:a.definePropType(String),default:"light"},clearable:{type:Boolean,default:!0},size:a.useSizeProp,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:{type:a.definePropType(String)},maxTime:{type:a.definePropType(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:a.definePropType([String,Object]),default:()=>a.clock_default},clearIcon:{type:a.definePropType([String,Object]),default:()=>a.circle_close_default},popperClass:{type:String,default:""},popperStyle:{type:a.definePropType([String,Object])},...a.useEmptyValuesProps}),cn=t=>{const n=(t||"").split(":");if(n.length>=2){let o=Number.parseInt(n[0],10);const l=Number.parseInt(n[1],10),r=t.toUpperCase();return r.includes("AM")&&o===12?o=0:r.includes("PM")&&o!==12&&(o+=12),{hours:o,minutes:l}}return null},Wr=(t,n)=>{const o=cn(t);if(!o)return-1;const l=cn(n);if(!l)return-1;const r=o.minutes+o.hours*60,s=l.minutes+l.hours*60;return r===s?0:r>s?1:-1},Fu=t=>`${t}`.padStart(2,"0"),Yn=t=>`${Fu(t.hours)}:${Fu(t.minutes)}`,nD=(t,n)=>{const o=cn(t);if(!o)return"";const l=cn(n);if(!l)return"";const r={hours:o.hours,minutes:o.minutes};return r.minutes+=l.minutes,r.hours+=l.hours,r.hours+=Math.floor(r.minutes/60),r.minutes=r.minutes%60,Yn(r)},oD=e.defineComponent({name:"ElTimeSelect"}),lD=e.defineComponent({...oD,props:tD,emits:[L.CHANGE_EVENT,"blur","focus","clear",L.UPDATE_MODEL_EVENT],setup(t,{expose:n}){const o=t;ve.dayjs.extend(ci);const{Option:l}=An,r=a.useNamespace("input"),s=e.ref(),i=L.useFormDisabled(),{lang:c}=a.useLocale(),u=e.computed(()=>o.modelValue),d=e.computed(()=>{const k=cn(o.start);return k?Yn(k):null}),p=e.computed(()=>{const k=cn(o.end);return k?Yn(k):null}),f=e.computed(()=>{const k=cn(o.step);return k?Yn(k):null}),h=e.computed(()=>{const k=cn(o.minTime||"");return k?Yn(k):null}),m=e.computed(()=>{const k=cn(o.maxTime||"");return k?Yn(k):null}),y=e.computed(()=>{var k;const E=[],C=(g,S)=>{E.push({value:g,disabled:Wr(S,h.value||"-1:-1")<=0||Wr(S,m.value||"100:100")>=0})};if(o.start&&o.end&&o.step){let g=d.value,S;for(;g&&p.value&&Wr(g,p.value)<=0;)S=ve.dayjs(g,"HH:mm").locale(c.value).format(o.format),C(S,g),g=nD(g,f.value);if(o.includeEndTime&&p.value&&((k=E[E.length-1])==null?void 0:k.value)!==p.value){const w=ve.dayjs(p.value,"HH:mm").locale(c.value).format(o.format);C(w,p.value)}}return E});return n({blur:()=>{var k,E;(E=(k=s.value)==null?void 0:k.blur)==null||E.call(k)},focus:()=>{var k,E;(E=(k=s.value)==null?void 0:k.focus)==null||E.call(k)}}),(k,E)=>(e.openBlock(),e.createBlock(e.unref(An),{ref_key:"select",ref:s,"model-value":e.unref(u),disabled:e.unref(i),clearable:k.clearable,"clear-icon":k.clearIcon,size:k.size,effect:k.effect,placeholder:k.placeholder,"default-first-option":"",filterable:k.editable,"empty-values":k.emptyValues,"value-on-clear":k.valueOnClear,"popper-class":k.popperClass,"popper-style":k.popperStyle,"onUpdate:modelValue":C=>k.$emit(e.unref(L.UPDATE_MODEL_EVENT),C),onChange:C=>k.$emit(e.unref(L.CHANGE_EVENT),C),onBlur:C=>k.$emit("blur",C),onFocus:C=>k.$emit("focus",C),onClear:()=>k.$emit("clear")},{prefix:e.withCtx(()=>[k.prefixIcon?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("prefix-icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.prefixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),C=>(e.openBlock(),e.createBlock(e.unref(l),{key:C.value,label:C.value,value:C.value,disabled:C.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var aD=a._export_sfc(lD,[["__file","time-select.vue"]]);const rD=a.withInstall(aD),sD="timeline",iD=e.defineComponent({name:"ElTimeline",setup(t,{slots:n}){const o=a.useNamespace("timeline");return e.provide(sD,n),()=>e.h("ul",{class:[o.b()]},[e.renderSlot(n,"default")])}}),cD=a.buildProps({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:a.iconPropType},hollow:Boolean}),uD=e.defineComponent({name:"ElTimelineItem"}),dD=e.defineComponent({...uD,props:cD,setup(t){const n=t,o=a.useNamespace("timeline-item"),l=e.computed(()=>[o.e("node"),o.em("node",n.size||""),o.em("node",n.type||""),o.is("hollow",n.hollow)]);return(r,s)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([e.unref(o).b(),{[e.unref(o).e("center")]:r.center}])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("tail"))},null,2),r.$slots.dot?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l)),style:e.normalizeStyle({backgroundColor:r.color})},[r.icon?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass(e.unref(o).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.icon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],6)),r.$slots.dot?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("dot"))},[e.renderSlot(r.$slots,"dot")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("wrapper"))},[!r.hideTimestamp&&r.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(o).e("timestamp"),e.unref(o).is("top")])},e.toDisplayString(r.timestamp),3)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content"))},[e.renderSlot(r.$slots,"default")],2),!r.hideTimestamp&&r.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(o).e("timestamp"),e.unref(o).is("bottom")])},e.toDisplayString(r.timestamp),3)):e.createCommentVNode("v-if",!0)],2)],2))}});var wm=a._export_sfc(dD,[["__file","timeline-item.vue"]]);const fD=a.withInstall(iD,{TimelineItem:wm}),pD=a.withNoopInstall(wm),Sm="left-check-change",Nm="right-check-change",Gn=a.buildProps({data:{type:a.definePropType(Array),default:()=>[]},titles:{type:a.definePropType(Array),default:()=>[]},buttonTexts:{type:a.definePropType(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:a.definePropType(Function)},leftDefaultChecked:{type:a.definePropType(Array),default:()=>[]},rightDefaultChecked:{type:a.definePropType(Array),default:()=>[]},renderContent:{type:a.definePropType(Function)},modelValue:{type:a.definePropType(Array),default:()=>[]},format:{type:a.definePropType(Object),default:()=>({})},filterable:Boolean,props:{type:a.definePropType(Object),default:()=>a.mutable({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),$s=(t,n)=>[t,n].every(a.isArray$1)||a.isArray$1(t)&&a.isNil(n),mD={[L.CHANGE_EVENT]:(t,n,o)=>[t,o].every(a.isArray$1)&&["left","right"].includes(n),[L.UPDATE_MODEL_EVENT]:t=>a.isArray$1(t),[Sm]:$s,[Nm]:$s},Ms="checked-change",hD=a.buildProps({data:Gn.data,optionRender:{type:a.definePropType(Function)},placeholder:String,title:String,filterable:Boolean,format:Gn.format,filterMethod:Gn.filterMethod,defaultChecked:Gn.leftDefaultChecked,props:Gn.props}),vD={[Ms]:$s},ta=t=>{const n={label:"label",key:"key",disabled:"disabled"};return e.computed(()=>({...n,...t.props}))},gD=(t,n,o)=>{const l=ta(t),r=e.computed(()=>t.data.filter(p=>a.isFunction(t.filterMethod)?t.filterMethod(n.query,p):String(p[l.value.label]||p[l.value.key]).toLowerCase().includes(n.query.toLowerCase()))),s=e.computed(()=>r.value.filter(p=>!p[l.value.disabled])),i=e.computed(()=>{const p=n.checked.length,f=t.data.length,{noChecked:h,hasChecked:m}=t.format;return h&&m?p>0?m.replace(/\${checked}/g,p.toString()).replace(/\${total}/g,f.toString()):h.replace(/\${total}/g,f.toString()):`${p}/${f}`}),c=e.computed(()=>{const p=n.checked.length;return p>0&&p<s.value.length}),u=()=>{const p=s.value.map(f=>f[l.value.key]);n.allChecked=p.length>0&&p.every(f=>n.checked.includes(f))},d=p=>{n.checked=p?s.value.map(f=>f[l.value.key]):[]};return e.watch(()=>n.checked,(p,f)=>{if(u(),n.checkChangeByUser){const h=p.concat(f).filter(m=>!p.includes(m)||!f.includes(m));o(Ms,p,h)}else o(Ms,p),n.checkChangeByUser=!0}),e.watch(s,()=>{u()}),e.watch(()=>t.data,()=>{const p=[],f=r.value.map(h=>h[l.value.key]);n.checked.forEach(h=>{f.includes(h)&&p.push(h)}),n.checkChangeByUser=!1,n.checked=p}),e.watch(()=>t.defaultChecked,(p,f)=>{if(f&&p.length===f.length&&p.every(y=>f.includes(y)))return;const h=[],m=s.value.map(y=>y[l.value.key]);p.forEach(y=>{m.includes(y)&&h.push(y)}),n.checkChangeByUser=!1,n.checked=h},{immediate:!0}),{filteredData:r,checkableData:s,checkedSummary:i,isIndeterminate:c,updateAllChecked:u,handleAllCheckedChange:d}},yD=e.defineComponent({name:"ElTransferPanel"}),bD=e.defineComponent({...yD,props:hD,emits:vD,setup(t,{expose:n,emit:o}){const l=t,r=e.useSlots(),s=({option:C})=>C,{t:i}=a.useLocale(),c=a.useNamespace("transfer"),u=e.reactive({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=ta(l),{filteredData:p,checkedSummary:f,isIndeterminate:h,handleAllCheckedChange:m}=gD(l,u,o),y=e.computed(()=>!a.isEmpty(u.query)&&a.isEmpty(p.value)),v=e.computed(()=>!a.isEmpty(r.default()[0].children)),{checked:b,allChecked:k,query:E}=e.toRefs(u);return n({query:E}),(C,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(c).b("panel"))},[e.createElementVNode("p",{class:e.normalizeClass(e.unref(c).be("panel","header"))},[e.createVNode(e.unref(Ht),{modelValue:e.unref(k),"onUpdate:modelValue":S=>e.isRef(k)?k.value=S:null,indeterminate:e.unref(h),"validate-event":!1,onChange:e.unref(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.title)+" ",1),e.createElementVNode("span",null,e.toDisplayString(e.unref(f)),1)]),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(c).be("panel","body"),e.unref(c).is("with-footer",e.unref(v))])},[C.filterable?(e.openBlock(),e.createBlock(e.unref(L.ElInput),{key:0,modelValue:e.unref(E),"onUpdate:modelValue":S=>e.isRef(E)?E.value=S:null,class:e.normalizeClass(e.unref(c).be("panel","filter")),size:"default",placeholder:C.placeholder,"prefix-icon":e.unref(a.search_default),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):e.createCommentVNode("v-if",!0),e.withDirectives(e.createVNode(e.unref(df),{modelValue:e.unref(b),"onUpdate:modelValue":S=>e.isRef(b)?b.value=S:null,"validate-event":!1,class:e.normalizeClass([e.unref(c).is("filterable",C.filterable),e.unref(c).be("panel","list")])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),S=>(e.openBlock(),e.createBlock(e.unref(Ht),{key:S[e.unref(d).key],class:e.normalizeClass(e.unref(c).be("panel","item")),value:S[e.unref(d).key],disabled:S[e.unref(d).disabled],"validate-event":!1},{default:e.withCtx(()=>{var w;return[e.createVNode(s,{option:(w=C.optionRender)==null?void 0:w.call(C,S)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[e.vShow,!e.unref(y)&&!e.unref(a.isEmpty)(C.data)]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(c).be("panel","empty"))},[e.renderSlot(C.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(y)?e.unref(i)("el.transfer.noMatch"):e.unref(i)("el.transfer.noData")),1)])],2),[[e.vShow,e.unref(y)||e.unref(a.isEmpty)(C.data)]])],2),e.unref(v)?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(c).be("panel","footer"))},[e.renderSlot(C.$slots,"default")],2)):e.createCommentVNode("v-if",!0)],2))}});var Ku=a._export_sfc(bD,[["__file","transfer-panel.vue"]]);const CD=t=>{const n=ta(t),o=e.computed(()=>t.data.reduce((s,i)=>(s[i[n.value.key]]=i)&&s,{})),l=e.computed(()=>t.data.filter(s=>!t.modelValue.includes(s[n.value.key]))),r=e.computed(()=>t.targetOrder==="original"?t.data.filter(s=>t.modelValue.includes(s[n.value.key])):t.modelValue.reduce((s,i)=>{const c=o.value[i];return c&&s.push(c),s},[]));return{sourceData:l,targetData:r}},kD=(t,n,o)=>{const l=ta(t),r=(c,u,d)=>{o(L.UPDATE_MODEL_EVENT,c),o(L.CHANGE_EVENT,c,u,d)};return{addToLeft:()=>{const c=t.modelValue.slice();n.rightChecked.forEach(u=>{const d=c.indexOf(u);d>-1&&c.splice(d,1)}),r(c,"left",n.rightChecked)},addToRight:()=>{let c=t.modelValue.slice();const u=t.data.filter(d=>{const p=d[l.value.key];return n.leftChecked.includes(p)&&!t.modelValue.includes(p)}).map(d=>d[l.value.key]);c=t.targetOrder==="unshift"?u.concat(c):c.concat(u),t.targetOrder==="original"&&(c=t.data.filter(d=>c.includes(d[l.value.key])).map(d=>d[l.value.key])),r(c,"right",n.leftChecked)}}},ED=(t,n)=>({onSourceCheckedChange:(r,s)=>{t.leftChecked=r,s&&n(Sm,r,s)},onTargetCheckedChange:(r,s)=>{t.rightChecked=r,s&&n(Nm,r,s)}}),wD=e.defineComponent({name:"ElTransfer"}),SD=e.defineComponent({...wD,props:Gn,emits:mD,setup(t,{expose:n,emit:o}){const l=t,r=e.useSlots(),{t:s}=a.useLocale(),i=a.useNamespace("transfer"),{formItem:c}=L.useFormItem(),u=e.reactive({leftChecked:[],rightChecked:[]}),d=ta(l),{sourceData:p,targetData:f}=CD(l),{onSourceCheckedChange:h,onTargetCheckedChange:m}=ED(u,o),{addToLeft:y,addToRight:v}=kD(l,u,o),b=e.ref(),k=e.ref(),E=V=>{switch(V){case"left":b.value.query="";break;case"right":k.value.query="";break}},C=e.computed(()=>l.buttonTexts.length===2),g=e.computed(()=>l.titles[0]||s("el.transfer.titles.0")),S=e.computed(()=>l.titles[1]||s("el.transfer.titles.1")),w=e.computed(()=>l.filterPlaceholder||s("el.transfer.filterPlaceholder"));e.watch(()=>l.modelValue,()=>{var V;l.validateEvent&&((V=c==null?void 0:c.validate)==null||V.call(c,"change").catch(_=>a.debugWarn(_)))});const N=e.computed(()=>V=>{var _;if(l.renderContent)return l.renderContent(e.h,V);const P=(((_=r.default)==null?void 0:_.call(r,{option:V}))||[]).filter(T=>T.type!==e.Comment);return P.length?P:e.h("span",V[d.value.label]||V[d.value.key])});return n({clearQuery:E,leftPanel:b,rightPanel:k}),(V,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.createVNode(Ku,{ref_key:"leftPanel",ref:b,data:e.unref(p),"option-render":e.unref(N),placeholder:e.unref(w),title:e.unref(g),filterable:V.filterable,format:V.format,"filter-method":V.filterMethod,"default-checked":V.leftDefaultChecked,props:l.props,onCheckedChange:e.unref(h)},{empty:e.withCtx(()=>[e.renderSlot(V.$slots,"left-empty")]),default:e.withCtx(()=>[e.renderSlot(V.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("buttons"))},[e.createVNode(e.unref(L.ElButton),{type:"primary",class:e.normalizeClass([e.unref(i).e("button"),e.unref(i).is("with-texts",e.unref(C))]),disabled:e.unref(a.isEmpty)(u.rightChecked),onClick:e.unref(y)},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(a.arrow_left_default))]),_:1}),e.unref(a.isUndefined)(V.buttonTexts[0])?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",{key:0},e.toDisplayString(V.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),e.createVNode(e.unref(L.ElButton),{type:"primary",class:e.normalizeClass([e.unref(i).e("button"),e.unref(i).is("with-texts",e.unref(C))]),disabled:e.unref(a.isEmpty)(u.leftChecked),onClick:e.unref(v)},{default:e.withCtx(()=>[e.unref(a.isUndefined)(V.buttonTexts[1])?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",{key:0},e.toDisplayString(V.buttonTexts[1]),1)),e.createVNode(e.unref(a.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(a.arrow_right_default))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),e.createVNode(Ku,{ref_key:"rightPanel",ref:k,data:e.unref(f),"option-render":e.unref(N),placeholder:e.unref(w),filterable:V.filterable,format:V.format,"filter-method":V.filterMethod,title:e.unref(S),"default-checked":V.rightDefaultChecked,props:l.props,onCheckedChange:e.unref(m)},{empty:e.withCtx(()=>[e.renderSlot(V.$slots,"right-empty")]),default:e.withCtx(()=>[e.renderSlot(V.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var ND=a._export_sfc(SD,[["__file","transfer.vue"]]);const TD=a.withInstall(ND),eo="$treeNodeId",Hu=function(t,n){!n||n[eo]||Object.defineProperty(n,eo,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},qi=(t,n)=>n==null?void 0:n[t||eo],xs=(t,n,o)=>{const l=t.value.currentNode;o();const r=t.value.currentNode;l!==r&&n("current-change",r?r.data:null,r)},As=t=>{let n=!0,o=!0,l=!0;for(let r=0,s=t.length;r<s;r++){const i=t[r];(i.checked!==!0||i.indeterminate)&&(n=!1,i.disabled||(l=!1)),(i.checked!==!1||i.indeterminate)&&(o=!1)}return{all:n,none:o,allWithoutDisable:l,half:!n&&!o}},wl=function(t){if(t.childNodes.length===0||t.loading)return;const{all:n,none:o,half:l}=As(t.childNodes);n?(t.checked=!0,t.indeterminate=!1):l?(t.checked=!1,t.indeterminate=!0):o&&(t.checked=!1,t.indeterminate=!1);const r=t.parent;!r||r.level===0||t.store.checkStrictly||wl(r)},fa=function(t,n){const o=t.store.props,l=t.data||{},r=o[n];if(a.isFunction(r))return r(l,t);if(a.isString(r))return l[r];if(a.isUndefined(r)){const s=l[n];return a.isUndefined(s)?"":s}},zs=function(t,n){t.forEach(o=>{o.canFocus=n,zs(o.childNodes,n)})};let _D=0,Rs=class za{constructor(n){this.isLeafByUser=void 0,this.isLeaf=void 0,this.id=_D++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const o in n)a.hasOwn(n,o)&&(this[o]=n[o]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var n;const o=this.store;if(!o)throw new Error("[Node]store is required!");o.registerNode(this);const l=o.props;if(l&&typeof l.isLeaf<"u"){const i=fa(this,"isLeaf");a.isBoolean(i)&&(this.isLeafByUser=i)}if(o.lazy!==!0&&this.data?(this.setData(this.data),o.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&o.lazy&&o.defaultExpandAll&&!this.isLeafByUser&&this.expand(),a.isArray$1(this.data)||Hu(this,this.data),!this.data)return;const r=o.defaultExpandedKeys,s=o.key;s&&!a.isNil(this.key)&&r&&r.includes(this.key)&&this.expand(null,o.autoExpandParent),s&&o.currentNodeKey!==void 0&&this.key===o.currentNodeKey&&(o.currentNode=this,o.currentNode.isCurrent=!0),o.lazy&&o._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((n=this.parent)==null?void 0:n.expanded)===!0)&&(this.canFocus=!0)}setData(n){a.isArray$1(n)||Hu(this,n),this.data=n,this.childNodes=[];let o;this.level===0&&a.isArray$1(this.data)?o=this.data:o=fa(this,"children")||[];for(let l=0,r=o.length;l<r;l++)this.insertChild({data:o[l]})}get label(){return fa(this,"label")}get key(){const n=this.store.key;return this.data?this.data[n]:null}get disabled(){return fa(this,"disabled")}get nextSibling(){const n=this.parent;if(n){const o=n.childNodes.indexOf(this);if(o>-1)return n.childNodes[o+1]}return null}get previousSibling(){const n=this.parent;if(n){const o=n.childNodes.indexOf(this);if(o>-1)return o>0?n.childNodes[o-1]:null}return null}contains(n,o=!0){return(this.childNodes||[]).some(l=>l===n||o&&l.contains(n))}remove(){const n=this.parent;n&&n.removeChild(this)}insertChild(n,o,l){if(!n)throw new Error("InsertChild error: child is required.");if(!(n instanceof za)){if(!l){const r=this.getChildren(!0);r!=null&&r.includes(n.data)||(a.isUndefined(o)||o<0?r==null||r.push(n.data):r==null||r.splice(o,0,n.data))}Object.assign(n,{parent:this,store:this.store}),n=e.reactive(new za(n)),n instanceof za&&n.initialize()}n.level=this.level+1,a.isUndefined(o)||o<0?this.childNodes.push(n):this.childNodes.splice(o,0,n),this.updateLeafState()}insertBefore(n,o){let l;o&&(l=this.childNodes.indexOf(o)),this.insertChild(n,l)}insertAfter(n,o){let l;o&&(l=this.childNodes.indexOf(o),l!==-1&&(l+=1)),this.insertChild(n,l)}removeChild(n){const o=this.getChildren()||[],l=o.indexOf(n.data);l>-1&&o.splice(l,1);const r=this.childNodes.indexOf(n);r>-1&&(this.store&&this.store.deregisterNode(n),n.parent=null,this.childNodes.splice(r,1)),this.updateLeafState()}removeChildByData(n){let o=null;for(let l=0;l<this.childNodes.length;l++)if(this.childNodes[l].data===n){o=this.childNodes[l];break}o&&this.removeChild(o)}expand(n,o){const l=()=>{if(o){let r=this.parent;for(;r&&r.level>0;)r.expanded=!0,r=r.parent}this.expanded=!0,n&&n(),zs(this.childNodes,!0)};this.shouldLoadData()?this.loadData(r=>{a.isArray$1(r)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||wl(this),l())}):l()}doCreateChildren(n,o={}){n.forEach(l=>{this.insertChild(Object.assign({data:l},o),void 0,!0)})}collapse(){this.expanded=!1,zs(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const n=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!n||n.length===0;return}this.isLeaf=!1}setChecked(n,o,l,r){if(this.indeterminate=n==="half",this.checked=n===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:i,allWithoutDisable:c}=As(this.childNodes);!this.isLeaf&&!i&&c&&(this.checked=!1,n=!1);const u=()=>{if(o){const d=this.childNodes;for(let h=0,m=d.length;h<m;h++){const y=d[h];r=r||n!==!1;const v=y.disabled?y.checked:r;y.setChecked(v,o,!0,r)}const{half:p,all:f}=As(d);f||(this.checked=f,this.indeterminate=p)}};if(this.shouldLoadData()){this.loadData(()=>{u(),wl(this)},{checked:n!==!1});return}else u()}const s=this.parent;!s||s.level===0||l||wl(s)}getChildren(n=!1){if(this.level===0)return this.data;const o=this.data;if(!o)return null;const l=this.store.props;let r="children";return l&&(r=l.children||"children"),a.isUndefined(o[r])&&(o[r]=null),n&&!o[r]&&(o[r]=[]),o[r]}updateChildren(){const n=this.getChildren()||[],o=this.childNodes.map(s=>s.data),l={},r=[];n.forEach((s,i)=>{const c=s[eo];!!c&&o.some(d=>(d==null?void 0:d[eo])===c)?l[c]={index:i,data:s}:r.push({index:i,data:s})}),this.store.lazy||o.forEach(s=>{l[s==null?void 0:s[eo]]||this.removeChildByData(s)}),r.forEach(({index:s,data:i})=>{this.insertChild({data:i},s)}),this.updateLeafState()}loadData(n,o={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(o).length)){this.loading=!0;const l=s=>{this.childNodes=[],this.doCreateChildren(s,o),this.loaded=!0,this.loading=!1,this.updateLeafState(),n&&n.call(this,s)},r=()=>{this.loading=!1};this.store.load(this,l,r)}else n&&n.call(this)}eachNode(n){const o=[this];for(;o.length;){const l=o.shift();o.unshift(...l.childNodes),n(l)}}reInitChecked(){this.store.checkStrictly||wl(this)}};class BD{constructor(n){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const o in n)a.hasOwn(n,o)&&(this[o]=n[o]);this.nodesMap={}}initialize(){if(this.root=new Rs({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const n=this.load;n(this.root,o=>{this.root.doCreateChildren(o),this._initDefaultCheckedNodes()},a.NOOP)}else this._initDefaultCheckedNodes()}filter(n){const o=this.filterNodeMethod,l=this.lazy,r=async function(s){const i=s.root?s.root.childNodes:s.childNodes;for(const[c,u]of i.entries())u.visible=!!(o!=null&&o.call(u,n,u.data,u)),c%80===0&&c>0&&await e.nextTick(),await r(u);if(!s.visible&&i.length){let c=!0;c=!i.some(u=>u.visible),s.root?s.root.visible=c===!1:s.visible=c===!1}n&&s.visible&&!s.isLeaf&&(!l||s.loaded)&&s.expand()};r(this)}setData(n){n!==this.root.data?(this.nodesMap={},this.root.setData(n),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(n){if(n instanceof Rs)return n;const o=a.isObject$1(n)?qi(this.key,n):n;return this.nodesMap[o]||null}insertBefore(n,o){var l;const r=this.getNode(o);(l=r.parent)==null||l.insertBefore({data:n},r)}insertAfter(n,o){var l;const r=this.getNode(o);(l=r.parent)==null||l.insertAfter({data:n},r)}remove(n){const o=this.getNode(n);o&&o.parent&&(o===this.currentNode&&(this.currentNode=null),o.parent.removeChild(o))}append(n,o){const l=a.isPropAbsent(o)?this.root:this.getNode(o);l&&l.insertChild({data:n})}_initDefaultCheckedNodes(){const n=this.defaultCheckedKeys||[],o=this.nodesMap;n.forEach(l=>{const r=o[l];r&&r.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(n){const o=this.defaultCheckedKeys||[];!a.isNil(n.key)&&o.includes(n.key)&&n.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(n){n!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=n,this._initDefaultCheckedNodes())}registerNode(n){const o=this.key;if(!(!n||!n.data))if(!o)this.nodesMap[n.id]=n;else{const l=n.key;a.isNil(l)||(this.nodesMap[l]=n)}}deregisterNode(n){!this.key||!n||!n.data||(n.childNodes.forEach(l=>{this.deregisterNode(l)}),delete this.nodesMap[n.key])}getCheckedNodes(n=!1,o=!1){const l=[],r=function(s){(s.root?s.root.childNodes:s.childNodes).forEach(c=>{(c.checked||o&&c.indeterminate)&&(!n||n&&c.isLeaf)&&l.push(c.data),r(c)})};return r(this),l}getCheckedKeys(n=!1){return this.getCheckedNodes(n).map(o=>(o||{})[this.key])}getHalfCheckedNodes(){const n=[],o=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(s=>{s.indeterminate&&n.push(s.data),o(s)})};return o(this),n}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(n=>(n||{})[this.key])}_getAllNodes(){const n=[],o=this.nodesMap;for(const l in o)a.hasOwn(o,l)&&n.push(o[l]);return n}updateChildren(n,o){const l=this.nodesMap[n];if(!l)return;const r=l.childNodes;for(let s=r.length-1;s>=0;s--){const i=r[s];this.remove(i.data)}for(let s=0,i=o.length;s<i;s++){const c=o[s];this.append(c,l.data)}}_setCheckedKeys(n,o=!1,l){const r=this._getAllNodes().sort((u,d)=>u.level-d.level),s=Object.create(null),i=Object.keys(l);r.forEach(u=>u.setChecked(!1,!1));const c=u=>{u.childNodes.forEach(d=>{var p;s[d.data[n]]=!0,(p=d.childNodes)!=null&&p.length&&c(d)})};for(let u=0,d=r.length;u<d;u++){const p=r[u],f=p.data[n].toString();if(!i.includes(f)){p.checked&&!s[f]&&p.setChecked(!1,!1);continue}if(p.childNodes.length&&c(p),p.isLeaf||this.checkStrictly){p.setChecked(!0,!1);continue}if(p.setChecked(!0,!0),o){p.setChecked(!1,!1);const m=function(y){y.childNodes.forEach(b=>{b.isLeaf||b.setChecked(!1,!1),m(b)})};m(p)}}}setCheckedNodes(n,o=!1){const l=this.key,r={};n.forEach(s=>{r[(s||{})[l]]=!0}),this._setCheckedKeys(l,o,r)}setCheckedKeys(n,o=!1){this.defaultCheckedKeys=n;const l=this.key,r={};n.forEach(s=>{r[s]=!0}),this._setCheckedKeys(l,o,r)}setDefaultExpandedKeys(n){n=n||[],this.defaultExpandedKeys=n,n.forEach(o=>{const l=this.getNode(o);l&&l.expand(null,this.autoExpandParent)})}setChecked(n,o,l){const r=this.getNode(n);r&&r.setChecked(!!o,l)}getCurrentNode(){return this.currentNode}setCurrentNode(n){const o=this.currentNode;o&&(o.isCurrent=!1),this.currentNode=n,this.currentNode.isCurrent=!0}setUserCurrentNode(n,o=!0){var l;const r=n[this.key],s=this.nodesMap[r];this.setCurrentNode(s),o&&this.currentNode&&this.currentNode.level>1&&((l=this.currentNode.parent)==null||l.expand(null,!0))}setCurrentNodeKey(n,o=!0){var l;if(this.currentNodeKey=n,a.isPropAbsent(n)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const r=this.getNode(n);r&&(this.setCurrentNode(r),o&&this.currentNode&&this.currentNode.level>1&&((l=this.currentNode.parent)==null||l.expand(null,!0)))}}const Yi="RootTree",Tm="NodeInstance",ju="TreeNodeMap",VD=e.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const n=a.useNamespace("tree"),o=e.inject(Tm),l=e.inject(Yi);return()=>{const r=t.node,{data:s,store:i}=r;return t.renderContent?t.renderContent(e.h,{_self:o,node:r,data:s,store:i}):e.renderSlot(l.ctx.slots,"default",{node:r,data:s},()=>[e.h(Ui,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[r.label])])}}});var PD=a._export_sfc(VD,[["__file","tree-node-content.vue"]]);function _m(t){const n=e.inject(ju,null),o={treeNodeExpand:l=>{var r;t.node!==l&&((r=t.node)==null||r.collapse())},children:[]};return n&&n.children.push(o),e.provide(ju,o),{broadcastExpanded:l=>{if(t.accordion)for(const r of o.children)r.treeNodeExpand(l)}}}const Bm=Symbol("dragEvents");function DD({props:t,ctx:n,el$:o,dropIndicator$:l,store:r}){const s=a.useNamespace("tree"),i=e.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),c=({event:p,treeNode:f})=>{if(p.dataTransfer){if(a.isFunction(t.allowDrag)&&!t.allowDrag(f.node))return p.preventDefault(),!1;p.dataTransfer.effectAllowed="move";try{p.dataTransfer.setData("text/plain","")}catch{}i.value.draggingNode=f,n.emit("node-drag-start",f.node,p)}},u=({event:p,treeNode:f})=>{if(!p.dataTransfer)return;const h=f,m=i.value.dropNode;m&&m.node.id!==h.node.id&&a.removeClass(m.$el,s.is("drop-inner"));const y=i.value.draggingNode;if(!y||!h)return;let v=!0,b=!0,k=!0,E=!0;a.isFunction(t.allowDrop)&&(v=t.allowDrop(y.node,h.node,"prev"),E=b=t.allowDrop(y.node,h.node,"inner"),k=t.allowDrop(y.node,h.node,"next")),p.dataTransfer.dropEffect=b||v||k?"move":"none",(v||b||k)&&(m==null?void 0:m.node.id)!==h.node.id&&(m&&n.emit("node-drag-leave",y.node,m.node,p),n.emit("node-drag-enter",y.node,h.node,p)),v||b||k?i.value.dropNode=h:i.value.dropNode=null,h.node.nextSibling===y.node&&(k=!1),h.node.previousSibling===y.node&&(v=!1),h.node.contains(y.node,!1)&&(b=!1),(y.node===h.node||y.node.contains(h.node))&&(v=!1,b=!1,k=!1);const C=h.$el,g=C.querySelector(`.${s.be("node","content")}`).getBoundingClientRect(),S=o.value.getBoundingClientRect(),w=o.value.scrollTop;let N;const V=v?b?.25:k?.45:1:Number.NEGATIVE_INFINITY,_=k?b?.75:v?.55:0:Number.POSITIVE_INFINITY;let P=-9999;const T=p.clientY-g.top;T<g.height*V?N="before":T>g.height*_?N="after":b?N="inner":N="none";const D=C.querySelector(`.${s.be("node","expand-icon")}`).getBoundingClientRect(),z=l.value;N==="before"?P=D.top-S.top+w:N==="after"&&(P=D.bottom-S.top+w),z.style.top=`${P}px`,z.style.left=`${D.right-S.left}px`,N==="inner"?a.addClass(C,s.is("drop-inner")):a.removeClass(C,s.is("drop-inner")),i.value.showDropIndicator=N==="before"||N==="after",i.value.allowDrop=i.value.showDropIndicator||E,i.value.dropType=N,n.emit("node-drag-over",y.node,h.node,p)},d=p=>{var f,h;const{draggingNode:m,dropType:y,dropNode:v}=i.value;if(p.preventDefault(),p.dataTransfer&&(p.dataTransfer.dropEffect="move"),m!=null&&m.node.data&&v){const b={data:m.node.data};y!=="none"&&m.node.remove(),y==="before"?(f=v.node.parent)==null||f.insertBefore(b,v.node):y==="after"?(h=v.node.parent)==null||h.insertAfter(b,v.node):y==="inner"&&v.node.insertChild(b),y!=="none"&&(r.value.registerNode(b),r.value.key&&m.node.eachNode(k=>{var E;(E=r.value.nodesMap[k.data[r.value.key]])==null||E.setChecked(k.checked,!r.value.checkStrictly)})),a.removeClass(v.$el,s.is("drop-inner")),n.emit("node-drag-end",m.node,v.node,y,p),y!=="none"&&n.emit("node-drop",m.node,v.node,y,p)}m&&!v&&n.emit("node-drag-end",m.node,null,y,p),i.value.showDropIndicator=!1,i.value.draggingNode=null,i.value.dropNode=null,i.value.allowDrop=!0};return e.provide(Bm,{treeNodeDragStart:c,treeNodeDragOver:u,treeNodeDragEnd:d}),{dragState:i}}const ID=e.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:vr,ElCheckbox:Ht,NodeContent:PD,ElIcon:a.ElIcon,Loading:a.loading_default},props:{node:{type:Rs,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(t,n){const o=a.useNamespace("tree"),{broadcastExpanded:l}=_m(t),r=e.inject(Yi),s=e.ref(!1),i=e.ref(!1),c=e.ref(),u=e.ref(),d=e.ref(),p=e.inject(Bm),f=e.getCurrentInstance();e.provide(Tm,f),r||a.debugWarn("Tree","Can not find node's tree."),t.node.expanded&&(s.value=!0,i.value=!0);const h=r.props.props.children||"children";e.watch(()=>{var _;const P=(_=t.node.data)==null?void 0:_[h];return P&&[...P]},()=>{t.node.updateChildren()}),e.watch(()=>t.node.indeterminate,_=>{v(t.node.checked,_)}),e.watch(()=>t.node.checked,_=>{v(_,t.node.indeterminate)}),e.watch(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),e.watch(()=>t.node.expanded,_=>{e.nextTick(()=>s.value=_),_&&(i.value=!0)});const m=_=>qi(r.props.nodeKey,_.data),y=_=>{const P=t.props.class;if(!P)return{};let T;if(a.isFunction(P)){const{data:D}=_;T=P(D,_)}else T=P;return a.isString(T)?{[T]:!0}:T},v=(_,P)=>{(c.value!==_||u.value!==P)&&r.ctx.emit("check-change",t.node.data,_,P),c.value=_,u.value=P},b=_=>{xs(r.store,r.ctx.emit,()=>{var P;if((P=r==null?void 0:r.props)==null?void 0:P.nodeKey){const D=m(t.node);r.store.value.setCurrentNodeKey(D)}else r.store.value.setCurrentNode(t.node)}),r.currentNode.value=t.node,r.props.expandOnClickNode&&E(),(r.props.checkOnClickNode||t.node.isLeaf&&r.props.checkOnClickLeaf&&t.showCheckbox)&&!t.node.disabled&&C(!t.node.checked),r.ctx.emit("node-click",t.node.data,t.node,f,_)},k=_=>{var P;(P=r.instance.vnode.props)!=null&&P.onNodeContextmenu&&(_.stopPropagation(),_.preventDefault()),r.ctx.emit("node-contextmenu",_,t.node.data,t.node,f)},E=()=>{t.node.isLeaf||(s.value?(r.ctx.emit("node-collapse",t.node.data,t.node,f),t.node.collapse()):t.node.expand(()=>{n.emit("node-expand",t.node.data,t.node,f)}))},C=_=>{t.node.setChecked(_,!(r!=null&&r.props.checkStrictly)),e.nextTick(()=>{const P=r.store.value;r.ctx.emit("check",t.node.data,{checkedNodes:P.getCheckedNodes(),checkedKeys:P.getCheckedKeys(),halfCheckedNodes:P.getHalfCheckedNodes(),halfCheckedKeys:P.getHalfCheckedKeys()})})};return{ns:o,node$:d,tree:r,expanded:s,childNodeRendered:i,oldChecked:c,oldIndeterminate:u,getNodeKey:m,getNodeClass:y,handleSelectChange:v,handleClick:b,handleContextMenu:k,handleExpandIconClick:E,handleCheckChange:C,handleChildNodeExpand:(_,P,T)=>{l(P),r.ctx.emit("node-expand",_,P,T)},handleDragStart:_=>{r.props.draggable&&p.treeNodeDragStart({event:_,treeNode:t})},handleDragOver:_=>{_.preventDefault(),r.props.draggable&&p.treeNodeDragOver({event:_,treeNode:{$el:d.value,node:t.node}})},handleDrop:_=>{_.preventDefault()},handleDragEnd:_=>{r.props.draggable&&p.treeNodeDragEnd(_)},CaretRight:a.caret_right_default}}});function OD(t,n,o,l,r,s){const i=e.resolveComponent("el-icon"),c=e.resolveComponent("el-checkbox"),u=e.resolveComponent("loading"),d=e.resolveComponent("node-content"),p=e.resolveComponent("el-tree-node"),f=e.resolveComponent("el-collapse-transition");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref:"node$",class:e.normalizeClass([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:e.withModifiers(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:e.withModifiers(t.handleDragStart,["stop"]),onDragover:e.withModifiers(t.handleDragOver,["stop"]),onDragend:e.withModifiers(t.handleDragEnd,["stop"]),onDrop:e.withModifiers(t.handleDrop,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.be("node","content")),style:e.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(e.openBlock(),e.createBlock(i,{key:0,class:e.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:e.withModifiers(t.handleExpandIconClick,["stop"])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0),t.showCheckbox?(e.openBlock(),e.createBlock(c,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:e.withModifiers(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):e.createCommentVNode("v-if",!0),t.node.loading?(e.openBlock(),e.createBlock(i,{key:2,class:e.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:e.withCtx(()=>[e.createVNode(u)]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.createVNode(d,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),e.createVNode(f,null,{default:e.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded,onClick:e.withModifiers(()=>{},["stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.node.childNodes,h=>(e.openBlock(),e.createBlock(p,{key:t.getNodeKey(h),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:h,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded","onClick"])),[[e.vShow,t.expanded]]):e.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[e.vShow,t.node.visible]])}var $D=a._export_sfc(ID,[["render",OD],["__file","tree-node.vue"]]);function MD({el$:t},n){const o=a.useNamespace("tree");e.onMounted(()=>{s()}),e.onUpdated(()=>{Array.from(t.value.querySelectorAll("input[type=checkbox]")).forEach(c=>{c.setAttribute("tabindex","-1")})});function l(i,c){var u,d;const p=n.value.getNode(i[c].dataset.key);return p.canFocus&&p.visible&&(((u=p.parent)==null?void 0:u.expanded)||((d=p.parent)==null?void 0:d.level)===0)}const r=i=>{const c=i.target;if(!c.className.includes(o.b("node")))return;const u=a.getEventCode(i),d=Array.from(t.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)),p=d.indexOf(c);let f;if([a.EVENT_CODE.up,a.EVENT_CODE.down].includes(u)){if(i.preventDefault(),u===a.EVENT_CODE.up){f=p===-1?0:p!==0?p-1:d.length-1;const m=f;for(;!l(d,f);){if(f--,f===m){f=-1;break}f<0&&(f=d.length-1)}}else{f=p===-1?0:p<d.length-1?p+1:0;const m=f;for(;!l(d,f);){if(f++,f===m){f=-1;break}f>=d.length&&(f=0)}}f!==-1&&d[f].focus()}[a.EVENT_CODE.left,a.EVENT_CODE.right].includes(u)&&(i.preventDefault(),c.click());const h=c.querySelector('[type="checkbox"]');[a.EVENT_CODE.enter,a.EVENT_CODE.numpadEnter,a.EVENT_CODE.space].includes(u)&&h&&(i.preventDefault(),h.click())};a.useEventListener(t,"keydown",r);const s=()=>{var i;if(!t.value)return;const c=Array.from(t.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`));Array.from(t.value.querySelectorAll("input[type=checkbox]")).forEach(p=>{p.setAttribute("tabindex","-1")});const d=t.value.querySelectorAll(`.${o.is("checked")}[role=treeitem]`);if(d.length){d[0].setAttribute("tabindex","0");return}(i=c[0])==null||i.setAttribute("tabindex","0")}}const xD={"check-change":(t,n,o)=>t&&a.isBoolean(n)&&a.isBoolean(o),"current-change":(t,n)=>!0,"node-click":(t,n,o,l)=>t&&n&&l instanceof Event,"node-contextmenu":(t,n,o,l)=>t instanceof Event&&n&&o,"node-collapse":(t,n,o)=>t&&n,"node-expand":(t,n,o)=>t&&n,check:(t,n)=>t&&n,"node-drag-start":(t,n)=>t&&n,"node-drag-end":(t,n,o,l)=>t&&l,"node-drop":(t,n,o,l)=>t&&n&&l,"node-drag-leave":(t,n,o)=>t&&n&&o,"node-drag-enter":(t,n,o)=>t&&n&&o,"node-drag-over":(t,n,o)=>t&&n&&o},AD=e.defineComponent({name:"ElTree",components:{ElTreeNode:$D},props:{data:{type:a.definePropType(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:{type:a.definePropType(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:a.definePropType(Function)},allowDrop:{type:a.definePropType(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:a.iconPropType}},emits:xD,setup(t,n){const{t:o}=a.useLocale(),l=a.useNamespace("tree"),r=e.ref(new BD({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));r.value.initialize();const s=e.ref(r.value.root),i=e.ref(null),c=e.ref(null),u=e.ref(null),{broadcastExpanded:d}=_m(t),{dragState:p}=DD({props:t,ctx:n,el$:c,dropIndicator$:u,store:r});MD({el$:c},r);const f=e.getCurrentInstance(),h=e.computed(()=>{let A=f==null?void 0:f.parent;for(;A;){if(A.type.name==="ElTreeSelect")return!0;A=A.parent}return!1}),m=e.computed(()=>{const{childNodes:A}=s.value;return(!A||A.length===0||A.every(({visible:R})=>!R))&&!h.value});e.watch(()=>t.currentNodeKey,A=>{r.value.setCurrentNodeKey(A??null)}),e.watch(()=>t.defaultCheckedKeys,(A,R)=>{a.isEqual(A,R)||r.value.setDefaultCheckedKey(A??[])}),e.watch(()=>t.defaultExpandedKeys,A=>{r.value.setDefaultExpandedKeys(A??[])}),e.watch(()=>t.data,A=>{r.value.setData(A)},{deep:!0}),e.watch(()=>t.checkStrictly,A=>{r.value.checkStrictly=A});const y=A=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");r.value.filter(A)},v=A=>qi(t.nodeKey,A.data),b=A=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const R=r.value.getNode(A);if(!R)return[];const F=[R.data];let K=R.parent;for(;K&&K!==s.value;)F.push(K.data),K=K.parent;return F.reverse()},k=(A,R)=>r.value.getCheckedNodes(A,R),E=A=>r.value.getCheckedKeys(A),C=()=>{const A=r.value.getCurrentNode();return A?A.data:null},g=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const A=C();return A?A[t.nodeKey]:null},S=(A,R)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");r.value.setCheckedNodes(A,R)},w=(A,R)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");r.value.setCheckedKeys(A,R)},N=(A,R,F)=>{r.value.setChecked(A,R,F)},V=()=>r.value.getHalfCheckedNodes(),_=()=>r.value.getHalfCheckedKeys(),P=(A,R=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");xs(r,n.emit,()=>{d(A),r.value.setUserCurrentNode(A,R)})},T=(A=null,R=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");xs(r,n.emit,()=>{d(),r.value.setCurrentNodeKey(A,R)})},D=A=>r.value.getNode(A),z=A=>{r.value.remove(A)},q=(A,R)=>{r.value.append(A,R)},Z=(A,R)=>{r.value.insertBefore(A,R)},O=(A,R)=>{r.value.insertAfter(A,R)},M=(A,R,F)=>{d(R),n.emit("node-expand",A,R,F)},x=(A,R)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");r.value.updateChildren(A,R)};return e.provide(Yi,{ctx:n,props:t,store:r,root:s,currentNode:i,instance:f}),e.provide(L.formItemContextKey,void 0),{ns:l,store:r,root:s,currentNode:i,dragState:p,el$:c,dropIndicator$:u,isEmpty:m,filter:y,getNodeKey:v,getNodePath:b,getCheckedNodes:k,getCheckedKeys:E,getCurrentNode:C,getCurrentKey:g,setCheckedNodes:S,setCheckedKeys:w,setChecked:N,getHalfCheckedNodes:V,getHalfCheckedKeys:_,setCurrentNode:P,setCurrentKey:T,t:o,getNode:D,remove:z,append:q,insertBefore:Z,insertAfter:O,handleNodeExpand:M,updateKeyChildren:x}}});function zD(t,n,o,l,r,s){const i=e.resolveComponent("el-tree-node");return e.openBlock(),e.createElementBlock("div",{ref:"el$",class:e.normalizeClass([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.root.childNodes,c=>(e.openBlock(),e.createBlock(i,{key:t.getNodeKey(c),node:c,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.ns.e("empty-block"))},[e.renderSlot(t.$slots,"empty",{},()=>{var c;return[e.createElementVNode("span",{class:e.normalizeClass(t.ns.e("empty-text"))},e.toDisplayString((c=t.emptyText)!=null?c:t.t("el.tree.emptyText")),3)]})],2)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("div",{ref:"dropIndicator$",class:e.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[e.vShow,t.dragState.showDropIndicator]])],2)}var RD=a._export_sfc(AD,[["render",zD],["__file","tree.vue"]]);const lr=a.withInstall(RD),LD=(t,{attrs:n,emit:o},{select:l,tree:r,key:s})=>{const i=a.useNamespace("tree-select");return e.watch(()=>t.data,()=>{t.filterable&&e.nextTick(()=>{var u,d;(d=r.value)==null||d.filter((u=l.value)==null?void 0:u.states.inputValue)})},{flush:"post"}),{...L.pick(e.toRefs(t),Object.keys(An.props)),...n,class:e.computed(()=>n.class),style:e.computed(()=>n.style),"onUpdate:modelValue":u=>o(L.UPDATE_MODEL_EVENT,u),valueKey:s,popperClass:e.computed(()=>{const u=[i.e("popper")];return t.popperClass&&u.push(t.popperClass),u.join(" ")}),filterMethod:(u="")=>{var d;t.filterMethod?t.filterMethod(u):t.remoteMethod?t.remoteMethod(u):(d=r.value)==null||d.filter(u)}}},FD=e.defineComponent({extends:Ga,setup(t,n){const o=Ga.setup(t,n);delete o.selectOptionClick;const l=e.getCurrentInstance().proxy;return e.nextTick(()=>{o.select.states.cachedOptions.get(l.value)||o.select.onOptionCreate(l)}),e.watch(()=>n.attrs.visible,r=>{e.nextTick(()=>{o.states.visible=r})},{immediate:!0}),o},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function Ls(t){return t||t===0}function Gi(t){return a.isArray$1(t)&&t.length}function qn(t){return a.isArray$1(t)?t:Ls(t)?[t]:[]}function Ra(t,n,o,l,r){for(let s=0;s<t.length;s++){const i=t[s];if(n(i,s,t,r))return l?l(i,s,t,r):i;{const c=o(i);if(Gi(c)){const u=Ra(c,n,o,l,i);if(u)return u}}}}function La(t,n,o,l){for(let r=0;r<t.length;r++){const s=t[r];n(s,r,t,l);const i=o(s);Gi(i)&&La(i,n,o,s)}}const KD=(t,{attrs:n,slots:o,emit:l},{select:r,tree:s,key:i})=>{e.watch([()=>t.modelValue,s],()=>{t.showCheckbox&&e.nextTick(()=>{const h=s.value;h&&!a.isEqual(h.getCheckedKeys(),qn(t.modelValue))&&h.setCheckedKeys(qn(t.modelValue))})},{immediate:!0,deep:!0});const c=e.computed(()=>({value:i.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...t.props})),u=(h,m)=>{var y;const v=c.value[h];return a.isFunction(v)?v(m,(y=s.value)==null?void 0:y.getNode(u("value",m))):m[v]},d=qn(t.modelValue).map(h=>Ra(t.data||[],m=>u("value",m)===h,m=>u("children",m),(m,y,v,b)=>b&&u("value",b))).filter(h=>Ls(h)),p=e.computed(()=>{if(!t.renderAfterExpand&&!t.lazy)return[];const h=[];return La(t.data.concat(t.cacheData),m=>{const y=u("value",m);h.push({value:y,currentLabel:u("label",m),isDisabled:u("disabled",m)})},m=>u("children",m)),h}),f=()=>{var h;return(h=s.value)==null?void 0:h.getCheckedKeys().filter(m=>{var y;const v=(y=s.value)==null?void 0:y.getNode(m);return!a.isNil(v)&&a.isEmpty(v.childNodes)})};return{...L.pick(e.toRefs(t),Object.keys(lr.props)),...n,nodeKey:i,expandOnClickNode:e.computed(()=>!t.checkStrictly&&t.expandOnClickNode),defaultExpandedKeys:e.computed(()=>t.defaultExpandedKeys?t.defaultExpandedKeys.concat(d):d),renderContent:(h,{node:m,data:y,store:v})=>h(FD,{value:u("value",y),label:u("label",y),disabled:u("disabled",y),visible:m.visible},t.renderContent?()=>t.renderContent(h,{node:m,data:y,store:v}):o.default?()=>o.default({node:m,data:y,store:v}):void 0),filterNodeMethod:(h,m,y)=>t.filterNodeMethod?t.filterNodeMethod(h,m,y):h?new RegExp(_i(h),"i").test(u("label",m)||""):!0,onNodeClick:(h,m,y)=>{var v,b,k,E;if((v=n.onNodeClick)==null||v.call(n,h,m,y),!(t.showCheckbox&&t.checkOnClickNode)){if(!t.showCheckbox&&(t.checkStrictly||m.isLeaf)){if(!u("disabled",h)){const C=(b=r.value)==null?void 0:b.states.options.get(u("value",h));(k=r.value)==null||k.handleOptionSelect(C)}}else t.expandOnClickNode&&y.proxy.handleExpandIconClick();(E=r.value)==null||E.focus()}},onCheck:(h,m)=>{var y;if(!t.showCheckbox)return;const v=u("value",h),b={};La([s.value.store.root],g=>b[g.key]=g,g=>g.childNodes);const k=m.checkedKeys,E=t.multiple?qn(t.modelValue).filter(g=>!(g in b)&&!k.includes(g)):[],C=E.concat(k);if(t.checkStrictly)l(L.UPDATE_MODEL_EVENT,t.multiple?C:C.includes(v)?v:void 0);else if(t.multiple){const g=f();l(L.UPDATE_MODEL_EVENT,E.concat(g))}else{const g=Ra([h],N=>!Gi(u("children",N))&&!u("disabled",N),N=>u("children",N)),S=g?u("value",g):void 0,w=Ls(t.modelValue)&&!!Ra([h],N=>u("value",N)===t.modelValue,N=>u("children",N));l(L.UPDATE_MODEL_EVENT,S===t.modelValue||w?void 0:S)}e.nextTick(()=>{var g;const S=qn(t.modelValue);s.value.setCheckedKeys(S),(g=n.onCheck)==null||g.call(n,h,{checkedKeys:s.value.getCheckedKeys(),checkedNodes:s.value.getCheckedNodes(),halfCheckedKeys:s.value.getHalfCheckedKeys(),halfCheckedNodes:s.value.getHalfCheckedNodes()})}),(y=r.value)==null||y.focus()},onNodeExpand:(h,m,y)=>{var v;(v=n.onNodeExpand)==null||v.call(n,h,m,y),e.nextTick(()=>{if(!t.checkStrictly&&t.lazy&&t.multiple&&m.checked){const b={},k=s.value.getCheckedKeys();La([s.value.store.root],g=>b[g.key]=g,g=>g.childNodes);const E=qn(t.modelValue).filter(g=>!(g in b)&&!k.includes(g)),C=f();l(L.UPDATE_MODEL_EVENT,E.concat(C))}})},cacheOptions:p}};var HD=e.defineComponent({props:{data:{type:Array,default:()=>[]}},setup(t){const n=e.inject(Ql);return e.watch(()=>t.data,()=>{var o;t.data.forEach(r=>{n.states.cachedOptions.has(r.value)||n.states.cachedOptions.set(r.value,r)});const l=((o=n.selectRef)==null?void 0:o.querySelectorAll("input"))||[];a.isClient&&!Array.from(l).includes(document.activeElement)&&n.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const jD=e.defineComponent({name:"ElTreeSelect",inheritAttrs:!1,props:{...An.props,...lr.props,cacheData:{type:Array,default:()=>[]}},setup(t,n){const{slots:o,expose:l}=n,r=e.ref(),s=e.ref(),i=e.computed(()=>t.nodeKey||t.valueKey||"value"),c=LD(t,n,{select:r,tree:s,key:i}),{cacheOptions:u,...d}=KD(t,n,{select:r,tree:s,key:i}),p=e.reactive({});return l(p),e.onMounted(()=>{Object.assign(p,{...L.pick(s.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...L.pick(r.value,["focus","blur","selectedLabel"]),treeRef:s.value,selectRef:r.value})}),()=>e.h(An,e.reactive({...c,ref:f=>r.value=f}),{...o,default:()=>[e.h(HD,{data:u.value}),e.h(lr,e.reactive({...d,ref:f=>s.value=f}))]})}});var WD=a._export_sfc(jD,[["__file","tree-select.vue"]]);const UD=a.withInstall(WD),Xi=Symbol(),qD={key:-1,level:-1,data:{}};var Sl=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t.CLASS="",t))(Sl||{}),Fs=(t=>(t.ADD="add",t.DELETE="delete",t))(Fs||{});const Vm={type:Number,default:26},YD=a.buildProps({data:{type:a.definePropType(Array),default:()=>a.mutable([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:a.definePropType(Object),default:()=>a.mutable({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:a.definePropType(Array),default:()=>a.mutable([])},checkStrictly:Boolean,defaultExpandedKeys:{type:a.definePropType(Array),default:()=>a.mutable([])},indent:{type:Number,default:16},itemSize:Vm,icon:{type:a.iconPropType},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:a.definePropType([String,Number])},accordion:Boolean,filterMethod:{type:a.definePropType(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),GD=a.buildProps({node:{type:a.definePropType(Object),default:()=>a.mutable(qD)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:Vm}),XD=a.buildProps({node:{type:a.definePropType(Object),required:!0}}),Pm="node-click",Dm="node-drop",Im="node-expand",Om="node-collapse",$m="current-change",Mm="check",xm="check-change",Am="node-contextmenu",JD={[Pm]:(t,n,o)=>t&&n&&o,[Dm]:(t,n,o)=>t&&n&&o,[Im]:(t,n)=>t&&n,[Om]:(t,n)=>t&&n,[$m]:(t,n)=>t&&n,[Mm]:(t,n)=>t&&n,[xm]:(t,n)=>t&&a.isBoolean(n),[Am]:(t,n,o)=>t&&n&&o},ZD={click:(t,n)=>!!(t&&n),drop:(t,n)=>!!(t&&n),toggle:t=>!!t,check:(t,n)=>t&&a.isBoolean(n)};function QD(t,n){const o=e.ref(new Set),l=e.ref(new Set),{emit:r}=e.getCurrentInstance();e.watch([()=>n.value,()=>t.defaultCheckedKeys],()=>e.nextTick(()=>{E(t.defaultCheckedKeys)}),{immediate:!0});const s=()=>{if(!n.value||!t.showCheckbox||t.checkStrictly)return;const{levelTreeNodeMap:C,maxLevel:g}=n.value,S=o.value,w=new Set;for(let N=g-1;N>=1;--N){const V=C.get(N);V&&V.forEach(_=>{const P=_.children;if(P){let T=!0,D=!1;for(const z of P){const q=z.key;if(S.has(q))D=!0;else if(w.has(q)){T=!1,D=!0;break}else T=!1}T?S.add(_.key):D?(w.add(_.key),S.delete(_.key)):(S.delete(_.key),w.delete(_.key))}})}l.value=w},i=C=>o.value.has(C.key),c=C=>l.value.has(C.key),u=(C,g,S=!0,w=!0)=>{const N=o.value,V=(_,P)=>{N[P?Fs.ADD:Fs.DELETE](_.key);const T=_.children;!t.checkStrictly&&T&&T.forEach(D=>{D.disabled||V(D,P)})};V(C,g),w&&s(),S&&d(C,g)},d=(C,g)=>{const{checkedNodes:S,checkedKeys:w}=y(),{halfCheckedNodes:N,halfCheckedKeys:V}=v();r(Mm,C.data,{checkedKeys:w,checkedNodes:S,halfCheckedKeys:V,halfCheckedNodes:N}),r(xm,C.data,g)};function p(C=!1){return y(C).checkedKeys}function f(C=!1){return y(C).checkedNodes}function h(){return v().halfCheckedKeys}function m(){return v().halfCheckedNodes}function y(C=!1){const g=[],S=[];if(n!=null&&n.value&&t.showCheckbox){const{treeNodeMap:w}=n.value;o.value.forEach(N=>{const V=w.get(N);V&&(!C||C&&V.isLeaf)&&(S.push(N),g.push(V.data))})}return{checkedKeys:S,checkedNodes:g}}function v(){const C=[],g=[];if(n!=null&&n.value&&t.showCheckbox){const{treeNodeMap:S}=n.value;l.value.forEach(w=>{const N=S.get(w);N&&(g.push(w),C.push(N.data))})}return{halfCheckedNodes:C,halfCheckedKeys:g}}function b(C){o.value.clear(),l.value.clear(),e.nextTick(()=>{E(C)})}function k(C,g){if(n!=null&&n.value&&t.showCheckbox){const S=n.value.treeNodeMap.get(C);S&&u(S,g,!1)}}function E(C){if(n!=null&&n.value){const{treeNodeMap:g}=n.value;if(t.showCheckbox&&g&&(C==null?void 0:C.length)>0){for(const S of C){const w=g.get(S);w&&!i(w)&&u(w,!0,!1,!1)}s()}}}return{updateCheckedKeys:s,toggleCheckbox:u,isChecked:i,isIndeterminate:c,getCheckedKeys:p,getCheckedNodes:f,getHalfCheckedKeys:h,getHalfCheckedNodes:m,setChecked:k,setCheckedKeys:b}}function eI(t,n){const o=e.ref(new Set([])),l=e.ref(new Set([])),r=e.computed(()=>a.isFunction(t.filterMethod));function s(c){var u;if(!r.value)return;const d=new Set,p=l.value,f=o.value,h=[],m=((u=n.value)==null?void 0:u.treeNodes)||[],y=t.filterMethod;f.clear();function v(b){b.forEach(k=>{h.push(k),y!=null&&y(c,k.data,k)?h.forEach(C=>{d.add(C.key),C.expanded=!0}):(k.expanded=!1,k.isLeaf&&f.add(k.key));const E=k.children;if(E&&v(E),!k.isLeaf){if(!d.has(k.key))f.add(k.key);else if(E){let C=!0;for(const g of E)if(!f.has(g.key)){C=!1;break}C?p.add(k.key):p.delete(k.key)}}h.pop()})}return v(m),d}function i(c){return l.value.has(c.key)}return{hiddenExpandIconKeySet:l,hiddenNodeKeySet:o,doFilter:s,isForceHiddenExpandIcon:i}}function tI(t,n){const o=e.ref(new Set),l=e.ref(),r=e.shallowRef(),s=e.ref(),{isIndeterminate:i,isChecked:c,toggleCheckbox:u,getCheckedKeys:d,getCheckedNodes:p,getHalfCheckedKeys:f,getHalfCheckedNodes:h,setChecked:m,setCheckedKeys:y}=QD(t,r),{doFilter:v,hiddenNodeKeySet:b,isForceHiddenExpandIcon:k}=eI(t,r),E=e.computed(()=>{var I;return((I=t.props)==null?void 0:I.value)||Sl.KEY}),C=e.computed(()=>{var I;return((I=t.props)==null?void 0:I.children)||Sl.CHILDREN}),g=e.computed(()=>{var I;return((I=t.props)==null?void 0:I.disabled)||Sl.DISABLED}),S=e.computed(()=>{var I;return((I=t.props)==null?void 0:I.label)||Sl.LABEL}),w=e.computed(()=>{var I;const j=o.value,Y=b.value,$=[],te=((I=r.value)==null?void 0:I.treeNodes)||[],le=[];for(let G=te.length-1;G>=0;--G)le.push(te[G]);for(;le.length;){const G=le.pop();if(!Y.has(G.key)&&($.push(G),G.children&&j.has(G.key)))for(let W=G.children.length-1;W>=0;--W)le.push(G.children[W])}return $}),N=e.computed(()=>w.value.length>0);function V(I){const j=new Map,Y=new Map;let $=1;function te(G,W=1,re=void 0){var ce;const ne=[];for(const Se of G){const Ne=T(Se),Te={level:W,key:Ne,data:Se};Te.label=z(Se),Te.parent=re;const Ie=P(Se);Te.disabled=D(Se),Te.isLeaf=!Ie||Ie.length===0,Te.expanded=o.value.has(Ne),Ie&&Ie.length&&(Te.children=te(Ie,W+1,Te)),ne.push(Te),j.set(Ne,Te),Y.has(W)||Y.set(W,[]),(ce=Y.get(W))==null||ce.push(Te)}return W>$&&($=W),ne}const le=te(I);return{treeNodeMap:j,levelTreeNodeMap:Y,maxLevel:$,treeNodes:le}}function _(I){const j=v(I);j&&(o.value=j)}function P(I){return I[C.value]}function T(I){return I?I[E.value]:""}function D(I){return I[g.value]}function z(I){return I[S.value]}function q(I){o.value.has(I.key)?F(I):R(I)}function Z(I){const j=new Set,Y=r.value.treeNodeMap;o.value.forEach($=>{const te=Y.get($);o.value.delete(te.key),te.expanded=!1}),I.forEach($=>{let te=Y.get($);for(;te&&!j.has(te.key);)j.add(te.key),te.expanded=!0,te=te.parent}),o.value=j}function O(I,j){n(Pm,I.data,I,j),x(I),t.expandOnClickNode&&q(I),t.showCheckbox&&(t.checkOnClickNode||I.isLeaf&&t.checkOnClickLeaf)&&!I.disabled&&u(I,!c(I),!0)}function M(I,j){n(Dm,I.data,I,j)}function x(I){H(I)||(l.value=I.key,n($m,I.data,I))}function A(I,j){u(I,j)}function R(I){const j=o.value;if(r.value&&t.accordion){const{treeNodeMap:$}=r.value;j.forEach(te=>{const le=$.get(te);I&&I.level===(le==null?void 0:le.level)&&(j.delete(te),le.expanded=!1)})}j.add(I.key);const Y=Q(I.key);Y&&(Y.expanded=!0,n(Im,Y.data,Y))}function F(I){o.value.delete(I.key);const j=Q(I.key);j&&(j.expanded=!1,n(Om,j.data,j))}function K(I){return!!I.disabled}function H(I){const j=l.value;return j!==void 0&&j===I.key}function J(){var I,j;if(l.value)return(j=(I=r.value)==null?void 0:I.treeNodeMap.get(l.value))==null?void 0:j.data}function U(){return l.value}function oe(I){l.value=I}function ae(I){r.value=V(I)}function Q(I){var j;const Y=a.isObject$1(I)?T(I):I;return(j=r.value)==null?void 0:j.treeNodeMap.get(Y)}function X(I,j="auto"){const Y=Q(I);Y&&s.value&&s.value.scrollToItem(w.value.indexOf(Y),j)}function B(I){var j;(j=s.value)==null||j.scrollTo(I)}return e.watch(()=>t.currentNodeKey,I=>{l.value=I},{immediate:!0}),e.watch(()=>t.defaultExpandedKeys,I=>{o.value=new Set(I)},{immediate:!0}),e.watch(()=>t.data,I=>{ae(I)},{immediate:!0}),{tree:r,flattenTree:w,isNotEmpty:N,listRef:s,getKey:T,getChildren:P,toggleExpand:q,toggleCheckbox:u,isChecked:c,isIndeterminate:i,isDisabled:K,isCurrent:H,isForceHiddenExpandIcon:k,handleNodeClick:O,handleNodeDrop:M,handleNodeCheck:A,getCurrentNode:J,getCurrentKey:U,setCurrentKey:oe,getCheckedKeys:d,getCheckedNodes:p,getHalfCheckedKeys:f,getHalfCheckedNodes:h,setChecked:m,setCheckedKeys:y,filter:_,setData:ae,getNode:Q,expandNode:R,collapseNode:F,setExpandedKeys:Z,scrollToNode:X,scrollTo:B}}var nI=e.defineComponent({name:"ElTreeNodeContent",props:XD,setup(t){const n=e.inject(Xi),o=a.useNamespace("tree");return()=>{const l=t.node,{data:r}=l;return n!=null&&n.ctx.slots.default?n.ctx.slots.default({node:l,data:r}):e.h(Ui,{tag:"span",truncated:!0,class:o.be("node","label")},()=>[l==null?void 0:l.label])}}});const oI=e.defineComponent({name:"ElTreeNode"}),lI=e.defineComponent({...oI,props:GD,emits:ZD,setup(t,{emit:n}){const o=t,l=e.inject(Xi),r=a.useNamespace("tree"),s=e.computed(()=>{var m;return(m=l==null?void 0:l.props.indent)!=null?m:16}),i=e.computed(()=>{var m;return(m=l==null?void 0:l.props.icon)!=null?m:a.caret_right_default}),c=m=>{const y=l==null?void 0:l.props.props.class;if(!y)return{};let v;if(a.isFunction(y)){const{data:b}=m;v=y(b,m)}else v=y;return a.isString(v)?{[v]:!0}:v},u=m=>{n("click",o.node,m)},d=m=>{n("drop",o.node,m)},p=()=>{n("toggle",o.node)},f=m=>{n("check",o.node,m)},h=m=>{var y,v,b,k;(b=(v=(y=l==null?void 0:l.instance)==null?void 0:y.vnode)==null?void 0:v.props)!=null&&b.onNodeContextmenu&&(m.stopPropagation(),m.preventDefault()),l==null||l.ctx.emit(Am,m,(k=o.node)==null?void 0:k.data,o.node)};return(m,y)=>{var v,b,k;return e.openBlock(),e.createElementBlock("div",{ref:"node$",class:e.normalizeClass([e.unref(r).b("node"),e.unref(r).is("expanded",m.expanded),e.unref(r).is("current",m.current),e.unref(r).is("focusable",!m.disabled),e.unref(r).is("checked",!m.disabled&&m.checked),c(m.node)]),role:"treeitem",tabindex:"-1","aria-expanded":m.expanded,"aria-disabled":m.disabled,"aria-checked":m.checked,"data-key":(v=m.node)==null?void 0:v.key,onClick:e.withModifiers(u,["stop"]),onContextmenu:h,onDragover:e.withModifiers(()=>{},["prevent"]),onDragenter:e.withModifiers(()=>{},["prevent"]),onDrop:e.withModifiers(d,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).be("node","content")),style:e.normalizeStyle({paddingLeft:`${(m.node.level-1)*e.unref(s)}px`,height:m.itemSize+"px"})},[e.unref(i)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass([e.unref(r).is("leaf",!!((b=m.node)!=null&&b.isLeaf)),e.unref(r).is("hidden",m.hiddenExpandIcon),{expanded:!((k=m.node)!=null&&k.isLeaf)&&m.expanded},e.unref(r).be("node","expand-icon")]),onClick:e.withModifiers(p,["stop"])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i))))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0),m.showCheckbox?(e.openBlock(),e.createBlock(e.unref(Ht),{key:1,"model-value":m.checked,indeterminate:m.indeterminate,disabled:m.disabled,onChange:f,onClick:e.withModifiers(()=>{},["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(nI),{node:{...m.node,expanded:m.expanded}},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var aI=a._export_sfc(lI,[["__file","tree-node.vue"]]);const rI=e.defineComponent({name:"ElTreeV2"}),sI=e.defineComponent({...rI,props:YD,emits:JD,setup(t,{expose:n,emit:o}){const l=t,r=e.useSlots(),s=e.computed(()=>l.itemSize);e.provide(Xi,{ctx:{emit:o,slots:r},props:l,instance:e.getCurrentInstance()}),e.provide(L.formItemContextKey,void 0);const{t:i}=a.useLocale(),c=a.useNamespace("tree"),{flattenTree:u,isNotEmpty:d,listRef:p,toggleExpand:f,isIndeterminate:h,isChecked:m,isDisabled:y,isCurrent:v,isForceHiddenExpandIcon:b,handleNodeClick:k,handleNodeDrop:E,handleNodeCheck:C,toggleCheckbox:g,getCurrentNode:S,getCurrentKey:w,setCurrentKey:N,getCheckedKeys:V,getCheckedNodes:_,getHalfCheckedKeys:P,getHalfCheckedNodes:T,setChecked:D,setCheckedKeys:z,filter:q,setData:Z,getNode:O,expandNode:M,collapseNode:x,setExpandedKeys:A,scrollToNode:R,scrollTo:F}=tI(l,o);return n({toggleCheckbox:g,getCurrentNode:S,getCurrentKey:w,setCurrentKey:N,getCheckedKeys:V,getCheckedNodes:_,getHalfCheckedKeys:P,getHalfCheckedNodes:T,setChecked:D,setCheckedKeys:z,filter:q,setData:Z,getNode:O,expandNode:M,collapseNode:x,setExpandedKeys:A,scrollToNode:R,scrollTo:F}),(K,H)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(c).b(),{[e.unref(c).m("highlight-current")]:K.highlightCurrent}]),role:"tree"},[e.unref(d)?(e.openBlock(),e.createBlock(e.unref($p),{key:0,ref_key:"listRef",ref:p,"class-name":e.unref(c).b("virtual-list"),data:e.unref(u),total:e.unref(u).length,height:K.height,"item-size":e.unref(s),"perf-mode":K.perfMode,"scrollbar-always-on":K.scrollbarAlwaysOn},{default:e.withCtx(({data:J,index:U,style:oe})=>[(e.openBlock(),e.createBlock(aI,{key:J[U].key,style:e.normalizeStyle(oe),node:J[U],expanded:J[U].expanded,"show-checkbox":K.showCheckbox,checked:e.unref(m)(J[U]),indeterminate:e.unref(h)(J[U]),"item-size":e.unref(s),disabled:e.unref(y)(J[U]),current:e.unref(v)(J[U]),"hidden-expand-icon":e.unref(b)(J[U]),onClick:e.unref(k),onToggle:e.unref(f),onCheck:e.unref(C),onDrop:e.unref(E)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode","scrollbar-always-on"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(c).e("empty-block"))},[e.renderSlot(K.$slots,"empty",{},()=>{var J;return[e.createElementVNode("span",{class:e.normalizeClass(e.unref(c).e("empty-text"))},e.toDisplayString((J=K.emptyText)!=null?J:e.unref(i)("el.tree.emptyText")),3)]})],2))],2))}});var iI=a._export_sfc(sI,[["__file","tree.vue"]]);const cI=a.withInstall(iI),zm=Symbol("uploadContextKey"),uI=a.buildProps({files:{type:a.definePropType(Array),default:()=>a.mutable([])},disabled:Boolean,handlePreview:{type:a.definePropType(Function),default:a.NOOP},listType:{type:String,values:oo.uploadListTypes,default:"text"},crossorigin:{type:a.definePropType(String)}}),dI={remove:t=>!!t},fI=e.defineComponent({name:"ElUploadList"}),pI=e.defineComponent({...fI,props:uI,emits:dI,setup(t,{emit:n}){const o=t,{t:l}=a.useLocale(),r=a.useNamespace("upload"),s=a.useNamespace("icon"),i=a.useNamespace("list"),c=L.useFormDisabled(),u=e.ref(!1),d=e.computed(()=>[r.b("list"),r.bm("list",o.listType),r.is("disabled",o.disabled)]),p=f=>{n("remove",f)};return(f,h)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"ul",class:e.normalizeClass(e.unref(d)),name:e.unref(i).b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.files,(m,y)=>(e.openBlock(),e.createElementBlock("li",{key:m.uid||m.name,class:e.normalizeClass([e.unref(r).be("list","item"),e.unref(r).is(m.status),{focusing:u.value}]),tabindex:e.unref(c)?void 0:0,"aria-disabled":e.unref(c),role:"button",onKeydown:e.withKeys(v=>!e.unref(c)&&p(m),["delete"]),onFocus:v=>u.value=!0,onBlur:v=>u.value=!1,onClick:v=>u.value=!1},[e.renderSlot(f.$slots,"default",{file:m,index:y},()=>[f.listType==="picture"||m.status!=="uploading"&&f.listType==="picture-card"?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(e.unref(r).be("list","item-thumbnail")),src:m.url,crossorigin:f.crossorigin,alt:""},null,10,["src","crossorigin"])):e.createCommentVNode("v-if",!0),m.status==="uploading"||f.listType!=="picture-card"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).be("list","item-info"))},[e.createElementVNode("a",{class:e.normalizeClass(e.unref(r).be("list","item-name")),onClick:e.withModifiers(v=>f.handlePreview(m),["prevent"])},[e.createVNode(e.unref(a.ElIcon),{class:e.normalizeClass(e.unref(s).m("document"))},{default:e.withCtx(()=>[e.createVNode(e.unref(a.document_default))]),_:1},8,["class"]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).be("list","item-file-name")),title:m.name},e.toDisplayString(m.name),11,["title"])],10,["onClick"]),m.status==="uploading"?(e.openBlock(),e.createBlock(e.unref(Sp),{key:0,type:f.listType==="picture-card"?"circle":"line","stroke-width":f.listType==="picture-card"?6:2,percentage:Number(m.percentage),style:e.normalizeStyle(f.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("label",{class:e.normalizeClass(e.unref(r).be("list","item-status-label"))},[f.listType==="text"?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass([e.unref(s).m("upload-success"),e.unref(s).m("circle-check")])},{default:e.withCtx(()=>[e.createVNode(e.unref(a.circle_check_default))]),_:1},8,["class"])):["picture-card","picture"].includes(f.listType)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:1,class:e.normalizeClass([e.unref(s).m("upload-success"),e.unref(s).m("check")])},{default:e.withCtx(()=>[e.createVNode(e.unref(a.check_default))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2),e.unref(c)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:2,class:e.normalizeClass(e.unref(s).m("close")),onClick:v=>p(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(a.close_default))]),_:2},1032,["class","onClick"])),e.createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),e.createCommentVNode(" This is a bug which needs to be fixed "),e.createCommentVNode(" TODO: Fix the incorrect navigation interaction "),e.unref(c)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(e.unref(s).m("close-tip"))},e.toDisplayString(e.unref(l)("el.upload.deleteTip")),3)),f.listType==="picture-card"?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass(e.unref(r).be("list","item-actions"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).be("list","item-preview")),onClick:v=>f.handlePreview(m)},[e.createVNode(e.unref(a.ElIcon),{class:e.normalizeClass(e.unref(s).m("zoom-in"))},{default:e.withCtx(()=>[e.createVNode(e.unref(a.zoom_in_default))]),_:1},8,["class"])],10,["onClick"]),e.unref(c)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).be("list","item-delete")),onClick:v=>p(m)},[e.createVNode(e.unref(a.ElIcon),{class:e.normalizeClass(e.unref(s).m("delete"))},{default:e.withCtx(()=>[e.createVNode(e.unref(a.delete_default))]),_:1},8,["class"])],10,["onClick"]))],2)):e.createCommentVNode("v-if",!0)])],42,["tabindex","aria-disabled","onKeydown","onFocus","onBlur","onClick"]))),128)),e.renderSlot(f.$slots,"append")]),_:3},8,["class","name"]))}});var Wu=a._export_sfc(pI,[["__file","upload-list.vue"]]);const mI=a.buildProps({disabled:Boolean}),hI={file:t=>a.isArray$1(t)},Rm="ElUploadDrag",vI=e.defineComponent({name:Rm}),gI=e.defineComponent({...vI,props:mI,emits:hI,setup(t,{emit:n}){e.inject(zm)||a.throwError(Rm,"usage: <el-upload><el-upload-dragger /></el-upload>");const l=a.useNamespace("upload"),r=e.ref(!1),s=L.useFormDisabled(),i=d=>{if(s.value)return;r.value=!1,d.stopPropagation();const p=Array.from(d.dataTransfer.files),f=d.dataTransfer.items||[];p.forEach((h,m)=>{var y;const v=f[m],b=(y=v==null?void 0:v.webkitGetAsEntry)==null?void 0:y.call(v);b&&(h.isDirectory=b.isDirectory)}),n("file",p)},c=()=>{s.value||(r.value=!0)},u=d=>{d.currentTarget.contains(d.relatedTarget)||(r.value=!1)};return(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b("dragger"),e.unref(l).is("dragover",r.value)]),onDrop:e.withModifiers(i,["prevent"]),onDragover:e.withModifiers(c,["prevent"]),onDragleave:e.withModifiers(u,["prevent"])},[e.renderSlot(d.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var yI=a._export_sfc(gI,[["__file","upload-dragger.vue"]]);const bI=a.buildProps({...oo.uploadBaseProps,beforeUpload:{type:a.definePropType(Function),default:a.NOOP},onRemove:{type:a.definePropType(Function),default:a.NOOP},onStart:{type:a.definePropType(Function),default:a.NOOP},onSuccess:{type:a.definePropType(Function),default:a.NOOP},onProgress:{type:a.definePropType(Function),default:a.NOOP},onError:{type:a.definePropType(Function),default:a.NOOP},onExceed:{type:a.definePropType(Function),default:a.NOOP}}),CI=e.defineComponent({name:"ElUploadContent",inheritAttrs:!1}),kI=e.defineComponent({...CI,props:bI,setup(t,{expose:n}){const o=t,l=a.useNamespace("upload"),r=L.useFormDisabled(),s=e.shallowRef({}),i=e.shallowRef(),c=v=>{if(v.length===0)return;const{autoUpload:b,limit:k,fileList:E,multiple:C,onStart:g,onExceed:S}=o;if(k&&E.length+v.length>k){S(v,E);return}C||(v=v.slice(0,1));for(const w of v){const N=w;N.uid=oo.genFileId(),g(N),b&&u(N)}},u=async v=>{if(i.value.value="",!o.beforeUpload)return p(v);let b,k={};try{const C=o.data,g=o.beforeUpload(v);k=a.isPlainObject(o.data)?a.cloneDeep(o.data):o.data,b=await g,a.isPlainObject(o.data)&&a.isEqual(C,k)&&(k=a.cloneDeep(o.data))}catch{b=!1}if(b===!1){o.onRemove(v);return}let E=v;b instanceof Blob&&(b instanceof File?E=b:E=new File([b],v.name,{type:v.type})),p(Object.assign(E,{uid:v.uid}),k)},d=async(v,b)=>a.isFunction(v)?v(b):v,p=async(v,b)=>{const{headers:k,data:E,method:C,withCredentials:g,name:S,action:w,onProgress:N,onSuccess:V,onError:_,httpRequest:P}=o;try{b=await d(b??E,v)}catch{o.onRemove(v);return}const{uid:T}=v,D={headers:k||{},withCredentials:g,file:v,data:b,method:C,filename:S,action:w,onProgress:q=>{N(q,v)},onSuccess:q=>{V(q,v),delete s.value[T]},onError:q=>{_(q,v),delete s.value[T]}},z=P(D);s.value[T]=z,z instanceof Promise&&z.then(D.onSuccess,D.onError)},f=v=>{const b=v.target.files;b&&c(Array.from(b))},h=()=>{r.value||(i.value.value="",i.value.click())},m=()=>{h()};return n({abort:v=>{a.entriesOf(s.value).filter(v?([k])=>String(v.uid)===k:()=>!0).forEach(([k,E])=>{E instanceof XMLHttpRequest&&E.abort(),delete s.value[k]})},upload:u}),(v,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(v.listType),e.unref(l).is("drag",v.drag),e.unref(l).is("disabled",e.unref(r))]),tabindex:e.unref(r)?void 0:0,"aria-disabled":e.unref(r),role:"button",onClick:h,onKeydown:e.withKeys(e.withModifiers(m,["self"]),["enter","space"])},[v.drag?(e.openBlock(),e.createBlock(yI,{key:0,disabled:e.unref(r),onFile:c},{default:e.withCtx(()=>[e.renderSlot(v.$slots,"default")]),_:3},8,["disabled"])):e.renderSlot(v.$slots,"default",{key:1}),e.createElementVNode("input",{ref_key:"inputRef",ref:i,class:e.normalizeClass(e.unref(l).e("input")),name:v.name,disabled:e.unref(r),multiple:v.multiple,accept:v.accept,type:"file",onChange:f,onClick:e.withModifiers(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","aria-disabled","onKeydown"]))}});var Uu=a._export_sfc(kI,[["__file","upload-content.vue"]]);const qu="ElUpload",Yu=t=>{var n;(n=t.url)!=null&&n.startsWith("blob:")&&URL.revokeObjectURL(t.url)},EI=(t,n)=>{const o=a.useVModel(t,"fileList",void 0,{passive:!0}),l=m=>o.value.find(y=>y.uid===m.uid);function r(m){var y;(y=n.value)==null||y.abort(m)}function s(m=["ready","uploading","success","fail"]){o.value=o.value.filter(y=>!m.includes(y.status))}function i(m){o.value=o.value.filter(y=>y.uid!==m.uid)}const c=(m,y)=>{const v=l(y);v&&(console.error(m),v.status="fail",i(v),t.onError(m,v,o.value),t.onChange(v,o.value))},u=(m,y)=>{const v=l(y);v&&(t.onProgress(m,v,o.value),v.status="uploading",v.percentage=Math.round(m.percent))},d=(m,y)=>{const v=l(y);v&&(v.status="success",v.response=m,t.onSuccess(m,v,o.value),t.onChange(v,o.value))},p=m=>{a.isNil(m.uid)&&(m.uid=oo.genFileId());const y={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(t.listType==="picture-card"||t.listType==="picture")try{y.url=URL.createObjectURL(m)}catch(v){a.debugWarn(qu,v.message),t.onError(v,y,o.value)}o.value=[...o.value,y],t.onChange(y,o.value)},f=async m=>{const y=m instanceof File?l(m):m;y||a.throwError(qu,"file to be removed not found");const v=b=>{r(b),i(b),t.onRemove(b,o.value),Yu(b)};t.beforeRemove?await t.beforeRemove(y,o.value)!==!1&&v(y):v(y)};function h(){o.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var y;return m&&((y=n.value)==null?void 0:y.upload(m))})}return e.watch(()=>t.listType,m=>{m!=="picture-card"&&m!=="picture"||(o.value=o.value.map(y=>{const{raw:v,url:b}=y;if(!b&&v)try{y.url=URL.createObjectURL(v)}catch(k){t.onError(k,y,o.value)}return y}))}),e.watch(o,m=>{for(const y of m)y.uid||(y.uid=oo.genFileId()),y.status||(y.status="success")},{immediate:!0,deep:!0}),{uploadFiles:o,abort:r,clearFiles:s,handleError:c,handleProgress:u,handleStart:p,handleSuccess:d,handleRemove:f,submit:h,revokeFileObjectURL:Yu}},wI=e.defineComponent({name:"ElUpload"}),SI=e.defineComponent({...wI,props:oo.uploadProps,setup(t,{expose:n}){const o=t,l=L.useFormDisabled(),r=e.shallowRef(),{abort:s,submit:i,clearFiles:c,uploadFiles:u,handleStart:d,handleError:p,handleRemove:f,handleSuccess:h,handleProgress:m,revokeFileObjectURL:y}=EI(o,r),v=e.computed(()=>o.listType==="picture-card"),b=e.computed(()=>({...o,fileList:u.value,onStart:d,onProgress:m,onSuccess:h,onError:p,onRemove:f}));return e.onBeforeUnmount(()=>{u.value.forEach(y)}),e.provide(zm,{accept:e.toRef(o,"accept")}),n({abort:s,submit:i,clearFiles:c,handleStart:d,handleRemove:f}),(k,E)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(v)&&k.showFileList?(e.openBlock(),e.createBlock(Wu,{key:0,disabled:e.unref(l),"list-type":k.listType,files:e.unref(u),crossorigin:k.crossorigin,"handle-preview":k.onPreview,onRemove:e.unref(f)},e.createSlots({append:e.withCtx(()=>[e.createVNode(Uu,e.mergeProps({ref_key:"uploadRef",ref:r},e.unref(b)),{default:e.withCtx(()=>[k.$slots.trigger?e.renderSlot(k.$slots,"trigger",{key:0}):e.createCommentVNode("v-if",!0),!k.$slots.trigger&&k.$slots.default?e.renderSlot(k.$slots,"default",{key:1}):e.createCommentVNode("v-if",!0)]),_:3},16)]),_:2},[k.$slots.file?{name:"default",fn:e.withCtx(({file:C,index:g})=>[e.renderSlot(k.$slots,"file",{file:C,index:g})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):e.createCommentVNode("v-if",!0),!e.unref(v)||e.unref(v)&&!k.showFileList?(e.openBlock(),e.createBlock(Uu,e.mergeProps({key:1,ref_key:"uploadRef",ref:r},e.unref(b)),{default:e.withCtx(()=>[k.$slots.trigger?e.renderSlot(k.$slots,"trigger",{key:0}):e.createCommentVNode("v-if",!0),!k.$slots.trigger&&k.$slots.default?e.renderSlot(k.$slots,"default",{key:1}):e.createCommentVNode("v-if",!0)]),_:3},16)):e.createCommentVNode("v-if",!0),k.$slots.trigger?e.renderSlot(k.$slots,"default",{key:2}):e.createCommentVNode("v-if",!0),e.renderSlot(k.$slots,"tip"),!e.unref(v)&&k.showFileList?(e.openBlock(),e.createBlock(Wu,{key:3,disabled:e.unref(l),"list-type":k.listType,files:e.unref(u),crossorigin:k.crossorigin,"handle-preview":k.onPreview,onRemove:e.unref(f)},e.createSlots({_:2},[k.$slots.file?{name:"default",fn:e.withCtx(({file:C,index:g})=>[e.renderSlot(k.$slots,"file",{file:C,index:g})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):e.createCommentVNode("v-if",!0)]))}});var NI=a._export_sfc(SI,[["__file","upload.vue"]]);const TI=a.withInstall(NI),_I=a.buildProps({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:a.definePropType([String,Array]),default:"Element Plus"},font:{type:a.definePropType(Object)},gap:{type:a.definePropType(Array),default:()=>[100,100]},offset:{type:a.definePropType(Array)}});function BI(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function VI(t){return Object.keys(t).map(n=>`${BI(n)}: ${t[n]};`).join(" ")}function PI(){return window.devicePixelRatio||1}const DI=(t,n)=>{let o=!1;return t.removedNodes.length&&n&&(o=Array.from(t.removedNodes).includes(n)),t.type==="attributes"&&t.target===n&&(o=!0),o},II={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function Ur(t,n,o=1){const l=document.createElement("canvas"),r=l.getContext("2d"),s=t*o,i=n*o;return l.setAttribute("width",`${s}px`),l.setAttribute("height",`${i}px`),r.save(),[r,l,s,i]}function OI(){function t(n,o,l,r,s,i,c,u,d){const[p,f,h,m]=Ur(r,s,l);if(n instanceof HTMLImageElement)p.drawImage(n,0,0,h,m);else{const{color:K,fontSize:H,fontStyle:J,fontWeight:U,fontFamily:oe,textAlign:ae,textBaseline:Q}=i,X=Number(H)*l;p.font=`${J} normal ${U} ${X}px/${s}px ${oe}`,p.fillStyle=K,p.textAlign=ae,p.textBaseline=Q;const B=a.isArray$1(n)?n:[n];B==null||B.forEach((I,j)=>{const[Y,$]=II[ae];p.fillText(I??"",h*Y+d*$,j*(X+i.fontGap*l))})}const y=Math.PI/180*Number(o),v=Math.max(r,s),[b,k,E]=Ur(v,v,l);b.translate(E/2,E/2),b.rotate(y),h>0&&m>0&&b.drawImage(f,-h/2,-m/2);function C(K,H){const J=K*Math.cos(y)-H*Math.sin(y),U=K*Math.sin(y)+H*Math.cos(y);return[J,U]}let g=0,S=0,w=0,N=0;const V=h/2,_=m/2;[[0-V,0-_],[0+V,0-_],[0+V,0+_],[0-V,0+_]].forEach(([K,H])=>{const[J,U]=C(K,H);g=Math.min(g,J),S=Math.max(S,J),w=Math.min(w,U),N=Math.max(N,U)});const T=g+E/2,D=w+E/2,z=S-g,q=N-w,Z=c*l,O=u*l,M=(z+Z)*2,x=q+O,[A,R]=Ur(M,x);function F(K=0,H=0){A.drawImage(k,T,D,z,q,K,H,z,q)}return F(),F(z+Z,-q/2-O/2),F(z+Z,+q/2+O/2),[R.toDataURL(),M/l,x/l]}return t}const $I=e.defineComponent({name:"ElWatermark"}),MI=e.defineComponent({...$I,props:_I,setup(t){const n=t,o={position:"relative"},l=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.fontGap)!=null?D:3}),r=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.color)!=null?D:"rgba(0,0,0,.15)"}),s=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.fontSize)!=null?D:16}),i=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.fontWeight)!=null?D:"normal"}),c=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.fontStyle)!=null?D:"normal"}),u=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.fontFamily)!=null?D:"sans-serif"}),d=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.textAlign)!=null?D:"center"}),p=e.computed(()=>{var T,D;return(D=(T=n.font)==null?void 0:T.textBaseline)!=null?D:"hanging"}),f=e.computed(()=>n.gap[0]),h=e.computed(()=>n.gap[1]),m=e.computed(()=>f.value/2),y=e.computed(()=>h.value/2),v=e.computed(()=>{var T,D;return(D=(T=n.offset)==null?void 0:T[0])!=null?D:m.value}),b=e.computed(()=>{var T,D;return(D=(T=n.offset)==null?void 0:T[1])!=null?D:y.value}),k=()=>{const T={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let D=v.value-m.value,z=b.value-y.value;return D>0&&(T.left=`${D}px`,T.width=`calc(100% - ${D}px)`,D=0),z>0&&(T.top=`${z}px`,T.height=`calc(100% - ${z}px)`,z=0),T.backgroundPosition=`${D}px ${z}px`,T},E=e.shallowRef(null),C=e.shallowRef(),g=e.ref(!1),S=()=>{C.value&&(C.value.remove(),C.value=void 0)},w=(T,D)=>{var z;E.value&&C.value&&(g.value=!0,C.value.setAttribute("style",VI({...k(),backgroundImage:`url('${T}')`,backgroundSize:`${Math.floor(D)}px`})),(z=E.value)==null||z.append(C.value),setTimeout(()=>{g.value=!1}))},N=T=>{let D=120,z=64,q=0;const{image:Z,content:O,width:M,height:x,rotate:A}=n;if(!Z&&T.measureText){T.font=`${Number(s.value)}px ${u.value}`;const R=a.isArray$1(O)?O:[O];let F=0,K=0;R.forEach(J=>{const{width:U,fontBoundingBoxAscent:oe,fontBoundingBoxDescent:ae,actualBoundingBoxAscent:Q,actualBoundingBoxDescent:X}=T.measureText(J),B=a.isUndefined(oe)?Q+X:oe+ae;U>F&&(F=Math.ceil(U)),B>K&&(K=Math.ceil(B))}),D=F,z=K*R.length+(R.length-1)*l.value;const H=Math.PI/180*Number(A);q=Math.ceil(Math.abs(Math.sin(H)*z)/2),D+=q}return[M??D,x??z,q]},V=OI(),_=()=>{const D=document.createElement("canvas").getContext("2d"),z=n.image,q=n.content,Z=n.rotate;if(D){C.value||(C.value=document.createElement("div"));const O=PI(),[M,x,A]=N(D),R=F=>{const[K,H]=V(F||"",Z,O,M,x,{color:r.value,fontSize:s.value,fontStyle:c.value,fontWeight:i.value,fontFamily:u.value,fontGap:l.value,textAlign:d.value,textBaseline:p.value},f.value,h.value,A);w(K,H)};if(z){const F=new Image;F.onload=()=>{R(F)},F.onerror=()=>{R(q)},F.crossOrigin="anonymous",F.referrerPolicy="no-referrer",F.src=z}else R(q)}};e.onMounted(()=>{_()}),e.watch(()=>n,()=>{_()},{deep:!0,flush:"post"}),e.onBeforeUnmount(()=>{S()});const P=T=>{g.value||T.forEach(D=>{DI(D,C.value)&&(S(),_())})};return a.useMutationObserver(E,P,{attributes:!0,subtree:!0,childList:!0}),(T,D)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:E,style:e.normalizeStyle([o])},[e.renderSlot(T.$slots,"default")],4))}});var xI=a._export_sfc(MI,[["__file","watermark.vue"]]);const AI=a.withInstall(xI),zI=a.buildProps({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:a.definePropType(Object)},targetAreaClickable:{type:Boolean,default:!0}}),vo=Math.min,Mn=Math.max,ar=Math.round,pa=Math.floor,tn=t=>({x:t,y:t}),RI={left:"right",right:"left",bottom:"top",top:"bottom"},LI={start:"end",end:"start"};function Ks(t,n,o){return Mn(t,vo(n,o))}function na(t,n){return typeof t=="function"?t(n):t}function Rn(t){return t.split("-")[0]}function oa(t){return t.split("-")[1]}function Lm(t){return t==="x"?"y":"x"}function Ji(t){return t==="y"?"height":"width"}const FI=new Set(["top","bottom"]);function kn(t){return FI.has(Rn(t))?"y":"x"}function Zi(t){return Lm(kn(t))}function KI(t,n,o){o===void 0&&(o=!1);const l=oa(t),r=Zi(t),s=Ji(r);let i=r==="x"?l===(o?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(i=rr(i)),[i,rr(i)]}function HI(t){const n=rr(t);return[Hs(t),n,Hs(n)]}function Hs(t){return t.replace(/start|end/g,n=>LI[n])}const Gu=["left","right"],Xu=["right","left"],jI=["top","bottom"],WI=["bottom","top"];function UI(t,n,o){switch(t){case"top":case"bottom":return o?n?Xu:Gu:n?Gu:Xu;case"left":case"right":return n?jI:WI;default:return[]}}function qI(t,n,o,l){const r=oa(t);let s=UI(Rn(t),o==="start",l);return r&&(s=s.map(i=>i+"-"+r),n&&(s=s.concat(s.map(Hs)))),s}function rr(t){return t.replace(/left|right|bottom|top/g,n=>RI[n])}function YI(t){return{top:0,right:0,bottom:0,left:0,...t}}function Fm(t){return typeof t!="number"?YI(t):{top:t,right:t,bottom:t,left:t}}function sr(t){const{x:n,y:o,width:l,height:r}=t;return{width:l,height:r,top:o,left:n,right:n+l,bottom:o+r,x:n,y:o}}function Ju(t,n,o){let{reference:l,floating:r}=t;const s=kn(n),i=Zi(n),c=Ji(i),u=Rn(n),d=s==="y",p=l.x+l.width/2-r.width/2,f=l.y+l.height/2-r.height/2,h=l[c]/2-r[c]/2;let m;switch(u){case"top":m={x:p,y:l.y-r.height};break;case"bottom":m={x:p,y:l.y+l.height};break;case"right":m={x:l.x+l.width,y:f};break;case"left":m={x:l.x-r.width,y:f};break;default:m={x:l.x,y:l.y}}switch(oa(n)){case"start":m[i]-=h*(o&&d?-1:1);break;case"end":m[i]+=h*(o&&d?-1:1);break}return m}const GI=async(t,n,o)=>{const{placement:l="bottom",strategy:r="absolute",middleware:s=[],platform:i}=o,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(n));let d=await i.getElementRects({reference:t,floating:n,strategy:r}),{x:p,y:f}=Ju(d,l,u),h=l,m={},y=0;for(let v=0;v<c.length;v++){const{name:b,fn:k}=c[v],{x:E,y:C,data:g,reset:S}=await k({x:p,y:f,initialPlacement:l,placement:h,strategy:r,middlewareData:m,rects:d,platform:i,elements:{reference:t,floating:n}});p=E??p,f=C??f,m={...m,[b]:{...m[b],...g}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:t,floating:n,strategy:r}):S.rects),{x:p,y:f}=Ju(d,h,u)),v=-1)}return{x:p,y:f,placement:h,strategy:r,middlewareData:m}};async function Qi(t,n){var o;n===void 0&&(n={});const{x:l,y:r,platform:s,rects:i,elements:c,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=na(n,t),y=Fm(m),b=c[h?f==="floating"?"reference":"floating":f],k=sr(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(b)))==null||o?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:p,strategy:u})),E=f==="floating"?{x:l,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),g=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},S=sr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:C,strategy:u}):E);return{top:(k.top-S.top+y.top)/g.y,bottom:(S.bottom-k.bottom+y.bottom)/g.y,left:(k.left-S.left+y.left)/g.x,right:(S.right-k.right+y.right)/g.x}}const XI=t=>({name:"arrow",options:t,async fn(n){const{x:o,y:l,placement:r,rects:s,platform:i,elements:c,middlewareData:u}=n,{element:d,padding:p=0}=na(t,n)||{};if(d==null)return{};const f=Fm(p),h={x:o,y:l},m=Zi(r),y=Ji(m),v=await i.getDimensions(d),b=m==="y",k=b?"top":"left",E=b?"bottom":"right",C=b?"clientHeight":"clientWidth",g=s.reference[y]+s.reference[m]-h[m]-s.floating[y],S=h[m]-s.reference[m],w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let N=w?w[C]:0;(!N||!await(i.isElement==null?void 0:i.isElement(w)))&&(N=c.floating[C]||s.floating[y]);const V=g/2-S/2,_=N/2-v[y]/2-1,P=vo(f[k],_),T=vo(f[E],_),D=P,z=N-v[y]-T,q=N/2-v[y]/2+V,Z=Ks(D,q,z),O=!u.arrow&&oa(r)!=null&&q!==Z&&s.reference[y]/2-(q<D?P:T)-v[y]/2<0,M=O?q<D?q-D:q-z:0;return{[m]:h[m]+M,data:{[m]:Z,centerOffset:q-Z-M,...O&&{alignmentOffset:M}},reset:O}}}),JI=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var o,l;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=n,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=na(t,n);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const k=Rn(r),E=kn(c),C=Rn(c)===c,g=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=h||(C||!v?[rr(c)]:HI(c)),w=y!=="none";!h&&w&&S.push(...qI(c,v,y,g));const N=[c,...S],V=await Qi(n,b),_=[];let P=((l=s.flip)==null?void 0:l.overflows)||[];if(p&&_.push(V[k]),f){const q=KI(r,i,g);_.push(V[q[0]],V[q[1]])}if(P=[...P,{placement:r,overflows:_}],!_.every(q=>q<=0)){var T,D;const q=(((T=s.flip)==null?void 0:T.index)||0)+1,Z=N[q];if(Z&&(!(f==="alignment"?E!==kn(Z):!1)||P.every(x=>kn(x.placement)===E?x.overflows[0]>0:!0)))return{data:{index:q,overflows:P},reset:{placement:Z}};let O=(D=P.filter(M=>M.overflows[0]<=0).sort((M,x)=>M.overflows[1]-x.overflows[1])[0])==null?void 0:D.placement;if(!O)switch(m){case"bestFit":{var z;const M=(z=P.filter(x=>{if(w){const A=kn(x.placement);return A===E||A==="y"}return!0}).map(x=>[x.placement,x.overflows.filter(A=>A>0).reduce((A,R)=>A+R,0)]).sort((x,A)=>x[1]-A[1])[0])==null?void 0:z[0];M&&(O=M);break}case"initialPlacement":O=c;break}if(r!==O)return{reset:{placement:O}}}return{}}}},ZI=new Set(["left","top"]);async function QI(t,n){const{placement:o,platform:l,elements:r}=t,s=await(l.isRTL==null?void 0:l.isRTL(r.floating)),i=Rn(o),c=oa(o),u=kn(o)==="y",d=ZI.has(i)?-1:1,p=s&&u?-1:1,f=na(n,t);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof y=="number"&&(m=c==="end"?y*-1:y),u?{x:m*p,y:h*d}:{x:h*d,y:m*p}}const eO=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var o,l;const{x:r,y:s,placement:i,middlewareData:c}=n,u=await QI(n,t);return i===((o=c.offset)==null?void 0:o.placement)&&(l=c.arrow)!=null&&l.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:i}}}}},tO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:o,y:l,placement:r}=n,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:b=>{let{x:k,y:E}=b;return{x:k,y:E}}},...u}=na(t,n),d={x:o,y:l},p=await Qi(n,u),f=kn(Rn(r)),h=Lm(f);let m=d[h],y=d[f];if(s){const b=h==="y"?"top":"left",k=h==="y"?"bottom":"right",E=m+p[b],C=m-p[k];m=Ks(E,m,C)}if(i){const b=f==="y"?"top":"left",k=f==="y"?"bottom":"right",E=y+p[b],C=y-p[k];y=Ks(E,y,C)}const v=c.fn({...n,[h]:m,[f]:y});return{...v,data:{x:v.x-o,y:v.y-l,enabled:{[h]:s,[f]:i}}}}}};function kr(){return typeof window<"u"}function Co(t){return Km(t)?(t.nodeName||"").toLowerCase():"#document"}function Ot(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function ln(t){var n;return(n=(Km(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Km(t){return kr()?t instanceof Node||t instanceof Ot(t).Node:!1}function Yt(t){return kr()?t instanceof Element||t instanceof Ot(t).Element:!1}function on(t){return kr()?t instanceof HTMLElement||t instanceof Ot(t).HTMLElement:!1}function Zu(t){return!kr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ot(t).ShadowRoot}const nO=new Set(["inline","contents"]);function la(t){const{overflow:n,overflowX:o,overflowY:l,display:r}=Gt(t);return/auto|scroll|overlay|hidden|clip/.test(n+l+o)&&!nO.has(r)}const oO=new Set(["table","td","th"]);function lO(t){return oO.has(Co(t))}const aO=[":popover-open",":modal"];function Er(t){return aO.some(n=>{try{return t.matches(n)}catch{return!1}})}const rO=["transform","translate","scale","rotate","perspective"],sO=["transform","translate","scale","rotate","perspective","filter"],iO=["paint","layout","strict","content"];function ec(t){const n=tc(),o=Yt(t)?Gt(t):t;return rO.some(l=>o[l]?o[l]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||sO.some(l=>(o.willChange||"").includes(l))||iO.some(l=>(o.contain||"").includes(l))}function cO(t){let n=wn(t);for(;on(n)&&!go(n);){if(ec(n))return n;if(Er(n))return null;n=wn(n)}return null}function tc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uO=new Set(["html","body","#document"]);function go(t){return uO.has(Co(t))}function Gt(t){return Ot(t).getComputedStyle(t)}function wr(t){return Yt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function wn(t){if(Co(t)==="html")return t;const n=t.assignedSlot||t.parentNode||Zu(t)&&t.host||ln(t);return Zu(n)?n.host:n}function Hm(t){const n=wn(t);return go(n)?t.ownerDocument?t.ownerDocument.body:t.body:on(n)&&la(n)?n:Hm(n)}function jl(t,n,o){var l;n===void 0&&(n=[]),o===void 0&&(o=!0);const r=Hm(t),s=r===((l=t.ownerDocument)==null?void 0:l.body),i=Ot(r);if(s){const c=js(i);return n.concat(i,i.visualViewport||[],la(r)?r:[],c&&o?jl(c):[])}return n.concat(r,jl(r,[],o))}function js(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jm(t){const n=Gt(t);let o=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const r=on(t),s=r?t.offsetWidth:o,i=r?t.offsetHeight:l,c=ar(o)!==s||ar(l)!==i;return c&&(o=s,l=i),{width:o,height:l,$:c}}function nc(t){return Yt(t)?t:t.contextElement}function to(t){const n=nc(t);if(!on(n))return tn(1);const o=n.getBoundingClientRect(),{width:l,height:r,$:s}=jm(n);let i=(s?ar(o.width):o.width)/l,c=(s?ar(o.height):o.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const dO=tn(0);function Wm(t){const n=Ot(t);return!tc()||!n.visualViewport?dO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function fO(t,n,o){return n===void 0&&(n=!1),!o||n&&o!==Ot(t)?!1:n}function Ln(t,n,o,l){n===void 0&&(n=!1),o===void 0&&(o=!1);const r=t.getBoundingClientRect(),s=nc(t);let i=tn(1);n&&(l?Yt(l)&&(i=to(l)):i=to(t));const c=fO(s,o,l)?Wm(s):tn(0);let u=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,p=r.width/i.x,f=r.height/i.y;if(s){const h=Ot(s),m=l&&Yt(l)?Ot(l):l;let y=h,v=js(y);for(;v&&l&&m!==y;){const b=to(v),k=v.getBoundingClientRect(),E=Gt(v),C=k.left+(v.clientLeft+parseFloat(E.paddingLeft))*b.x,g=k.top+(v.clientTop+parseFloat(E.paddingTop))*b.y;u*=b.x,d*=b.y,p*=b.x,f*=b.y,u+=C,d+=g,y=Ot(v),v=js(y)}}return sr({width:p,height:f,x:u,y:d})}function Sr(t,n){const o=wr(t).scrollLeft;return n?n.left+o:Ln(ln(t)).left+o}function Um(t,n){const o=t.getBoundingClientRect(),l=o.left+n.scrollLeft-Sr(t,o),r=o.top+n.scrollTop;return{x:l,y:r}}function pO(t){let{elements:n,rect:o,offsetParent:l,strategy:r}=t;const s=r==="fixed",i=ln(l),c=n?Er(n.floating):!1;if(l===i||c&&s)return o;let u={scrollLeft:0,scrollTop:0},d=tn(1);const p=tn(0),f=on(l);if((f||!f&&!s)&&((Co(l)!=="body"||la(i))&&(u=wr(l)),on(l))){const m=Ln(l);d=to(l),p.x=m.x+l.clientLeft,p.y=m.y+l.clientTop}const h=i&&!f&&!s?Um(i,u):tn(0);return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-u.scrollLeft*d.x+p.x+h.x,y:o.y*d.y-u.scrollTop*d.y+p.y+h.y}}function mO(t){return Array.from(t.getClientRects())}function hO(t){const n=ln(t),o=wr(t),l=t.ownerDocument.body,r=Mn(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),s=Mn(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let i=-o.scrollLeft+Sr(t);const c=-o.scrollTop;return Gt(l).direction==="rtl"&&(i+=Mn(n.clientWidth,l.clientWidth)-r),{width:r,height:s,x:i,y:c}}const Qu=25;function vO(t,n){const o=Ot(t),l=ln(t),r=o.visualViewport;let s=l.clientWidth,i=l.clientHeight,c=0,u=0;if(r){s=r.width,i=r.height;const p=tc();(!p||p&&n==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}const d=Sr(l);if(d<=0){const p=l.ownerDocument,f=p.body,h=getComputedStyle(f),m=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(l.clientWidth-f.clientWidth-m);y<=Qu&&(s-=y)}else d<=Qu&&(s+=d);return{width:s,height:i,x:c,y:u}}const gO=new Set(["absolute","fixed"]);function yO(t,n){const o=Ln(t,!0,n==="fixed"),l=o.top+t.clientTop,r=o.left+t.clientLeft,s=on(t)?to(t):tn(1),i=t.clientWidth*s.x,c=t.clientHeight*s.y,u=r*s.x,d=l*s.y;return{width:i,height:c,x:u,y:d}}function ed(t,n,o){let l;if(n==="viewport")l=vO(t,o);else if(n==="document")l=hO(ln(t));else if(Yt(n))l=yO(n,o);else{const r=Wm(t);l={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return sr(l)}function qm(t,n){const o=wn(t);return o===n||!Yt(o)||go(o)?!1:Gt(o).position==="fixed"||qm(o,n)}function bO(t,n){const o=n.get(t);if(o)return o;let l=jl(t,[],!1).filter(c=>Yt(c)&&Co(c)!=="body"),r=null;const s=Gt(t).position==="fixed";let i=s?wn(t):t;for(;Yt(i)&&!go(i);){const c=Gt(i),u=ec(i);!u&&c.position==="fixed"&&(r=null),(s?!u&&!r:!u&&c.position==="static"&&!!r&&gO.has(r.position)||la(i)&&!u&&qm(t,i))?l=l.filter(p=>p!==i):r=c,i=wn(i)}return n.set(t,l),l}function CO(t){let{element:n,boundary:o,rootBoundary:l,strategy:r}=t;const i=[...o==="clippingAncestors"?Er(n)?[]:bO(n,this._c):[].concat(o),l],c=i[0],u=i.reduce((d,p)=>{const f=ed(n,p,r);return d.top=Mn(f.top,d.top),d.right=vo(f.right,d.right),d.bottom=vo(f.bottom,d.bottom),d.left=Mn(f.left,d.left),d},ed(n,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function kO(t){const{width:n,height:o}=jm(t);return{width:n,height:o}}function EO(t,n,o){const l=on(n),r=ln(n),s=o==="fixed",i=Ln(t,!0,s,n);let c={scrollLeft:0,scrollTop:0};const u=tn(0);function d(){u.x=Sr(r)}if(l||!l&&!s)if((Co(n)!=="body"||la(r))&&(c=wr(n)),l){const m=Ln(n,!0,s,n);u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}else r&&d();s&&!l&&r&&d();const p=r&&!l&&!s?Um(r,c):tn(0),f=i.left+c.scrollLeft-u.x-p.x,h=i.top+c.scrollTop-u.y-p.y;return{x:f,y:h,width:i.width,height:i.height}}function qr(t){return Gt(t).position==="static"}function td(t,n){if(!on(t)||Gt(t).position==="fixed")return null;if(n)return n(t);let o=t.offsetParent;return ln(t)===o&&(o=o.ownerDocument.body),o}function Ym(t,n){const o=Ot(t);if(Er(t))return o;if(!on(t)){let r=wn(t);for(;r&&!go(r);){if(Yt(r)&&!qr(r))return r;r=wn(r)}return o}let l=td(t,n);for(;l&&lO(l)&&qr(l);)l=td(l,n);return l&&go(l)&&qr(l)&&!ec(l)?o:l||cO(t)||o}const wO=async function(t){const n=this.getOffsetParent||Ym,o=this.getDimensions,l=await o(t.floating);return{reference:EO(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function SO(t){return Gt(t).direction==="rtl"}const NO={convertOffsetParentRelativeRectToViewportRelativeRect:pO,getDocumentElement:ln,getClippingRect:CO,getOffsetParent:Ym,getElementRects:wO,getClientRects:mO,getDimensions:kO,getScale:to,isElement:Yt,isRTL:SO};function Gm(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function TO(t,n){let o=null,l;const r=ln(t);function s(){var c;clearTimeout(l),(c=o)==null||c.disconnect(),o=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=t.getBoundingClientRect(),{left:p,top:f,width:h,height:m}=d;if(c||n(),!h||!m)return;const y=pa(f),v=pa(r.clientWidth-(p+h)),b=pa(r.clientHeight-(f+m)),k=pa(p),C={rootMargin:-y+"px "+-v+"px "+-b+"px "+-k+"px",threshold:Mn(0,vo(1,u))||1};let g=!0;function S(w){const N=w[0].intersectionRatio;if(N!==u){if(!g)return i();N?i(!1,N):l=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Gm(d,t.getBoundingClientRect())&&i(),g=!1}try{o=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{o=new IntersectionObserver(S,C)}o.observe(t)}return i(!0),s}function _O(t,n,o,l){l===void 0&&(l={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=l,d=nc(t),p=r||s?[...d?jl(d):[],...jl(n)]:[];p.forEach(k=>{r&&k.addEventListener("scroll",o,{passive:!0}),s&&k.addEventListener("resize",o)});const f=d&&c?TO(d,o):null;let h=-1,m=null;i&&(m=new ResizeObserver(k=>{let[E]=k;E&&E.target===d&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(n)})),o()}),d&&!u&&m.observe(d),m.observe(n));let y,v=u?Ln(t):null;u&&b();function b(){const k=Ln(t);v&&!Gm(v,k)&&o(),v=k,y=requestAnimationFrame(b)}return o(),()=>{var k;p.forEach(E=>{r&&E.removeEventListener("scroll",o),s&&E.removeEventListener("resize",o)}),f==null||f(),(k=m)==null||k.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const BO=Qi,VO=eO,PO=tO,DO=JI,IO=XI,OO=(t,n,o)=>{const l=new Map,r={platform:NO,...o},s={...r.platform,_c:l};return GI(t,n,{...r,platform:s})},$O=(t,n,o,l,r)=>{const s=e.ref(null),i=()=>{let f;return a.isString(t.value)?f=document.querySelector(t.value):a.isFunction(t.value)?f=t.value():f=t.value,f},c=()=>{const f=i();if(!f||!n.value){s.value=null;return}MO(f)||f.scrollIntoView(r.value);const{left:h,top:m,width:y,height:v}=f.getBoundingClientRect();s.value={left:h,top:m,width:y,height:v,radius:0}};e.onMounted(()=>{e.watch([n,t],()=>{c()},{immediate:!0}),window.addEventListener("resize",c)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",c)});const u=f=>{var h;return(h=a.isArray$1(o.value.offset)?o.value.offset[f]:o.value.offset)!=null?h:6},d=e.computed(()=>{var f;if(!s.value)return s.value;const h=u(0),m=u(1),y=((f=o.value)==null?void 0:f.radius)||2;return{left:s.value.left-h,top:s.value.top-m,width:s.value.width+h*2,height:s.value.height+m*2,radius:y}}),p=e.computed(()=>{const f=i();return!l.value||!f||!window.DOMRect?f||void 0:{getBoundingClientRect(){var h,m,y,v;return window.DOMRect.fromRect({width:((h=d.value)==null?void 0:h.width)||0,height:((m=d.value)==null?void 0:m.height)||0,x:((y=d.value)==null?void 0:y.left)||0,y:((v=d.value)==null?void 0:v.top)||0})}}});return{mergedPosInfo:d,triggerTarget:p}},Nr=Symbol("ElTour");function MO(t){const n=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,{top:l,right:r,bottom:s,left:i}=t.getBoundingClientRect();return l>=0&&i>=0&&r<=n&&s<=o}const xO=(t,n,o,l,r,s,i,c)=>{const u=e.ref(),d=e.ref(),p=e.ref({}),f={x:u,y:d,placement:l,strategy:r,middlewareData:p},h=e.computed(()=>{const k=[VO(e.unref(s)),DO(),PO(),AO()];return e.unref(c)&&e.unref(o)&&k.push(IO({element:e.unref(o)})),k}),m=async()=>{if(!a.isClient)return;const k=e.unref(t),E=e.unref(n);if(!k||!E)return;const C=await OO(k,E,{placement:e.unref(l),strategy:e.unref(r),middleware:e.unref(h)});a.keysOf(f).forEach(g=>{f[g].value=C[g]})},y=e.computed(()=>{if(!e.unref(t))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:e.unref(i)};const{overflow:k}=e.unref(p);return{position:e.unref(r),zIndex:e.unref(i),top:e.unref(d)!=null?`${e.unref(d)}px`:"",left:e.unref(u)!=null?`${e.unref(u)}px`:"",maxWidth:k!=null&&k.maxWidth?`${k==null?void 0:k.maxWidth}px`:""}}),v=e.computed(()=>{if(!e.unref(c))return{};const{arrow:k}=e.unref(p);return{left:(k==null?void 0:k.x)!=null?`${k==null?void 0:k.x}px`:"",top:(k==null?void 0:k.y)!=null?`${k==null?void 0:k.y}px`:""}});let b;return e.onMounted(()=>{const k=e.unref(t),E=e.unref(n);k&&E&&(b=_O(k,E,m)),e.watchEffect(()=>{m()})}),e.onBeforeUnmount(()=>{b&&b()}),{update:m,contentStyle:y,arrowStyle:v}},AO=()=>({name:"overflow",async fn(t){const n=await BO(t);let o=0;return n.left>0&&(o=n.left),n.right>0&&(o=n.right),{data:{maxWidth:t.rects.floating.width-o}}}}),zO=e.defineComponent({name:"ElTourMask",inheritAttrs:!1}),RO=e.defineComponent({...zO,props:zI,setup(t){const n=t,{ns:o}=e.inject(Nr),l=e.computed(()=>{var p,f;return(f=(p=n.pos)==null?void 0:p.radius)!=null?f:2}),r=e.computed(()=>{const p=l.value,f=`a${p},${p} 0 0 1`;return{topRight:`${f} ${p},${p}`,bottomRight:`${f} ${-p},${p}`,bottomLeft:`${f} ${-p},${-p}`,topLeft:`${f} ${p},${-p}`}}),{width:s,height:i}=a.useWindowSize(),c=e.computed(()=>{const p=s.value,f=i.value,h=r.value,m=`M${p},0 L0,0 L0,${f} L${p},${f} L${p},0 Z`,y=l.value;return n.pos?`${m} M${n.pos.left+y},${n.pos.top} h${n.pos.width-y*2} ${h.topRight} v${n.pos.height-y*2} ${h.bottomRight} h${-n.pos.width+y*2} ${h.bottomLeft} v${-n.pos.height+y*2} ${h.topLeft} z`:m}),u=e.computed(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:n.zIndex,pointerEvents:n.pos&&n.targetAreaClickable?"none":"auto"})),d=e.computed(()=>({fill:n.fill,pointerEvents:"auto",cursor:"auto"}));return L.useLockscreen(e.toRef(n,"visible"),{ns:o}),(p,f)=>p.visible?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:e.unref(o).e("mask"),style:e.unref(u)},p.$attrs),[(e.openBlock(),e.createElementBlock("svg",{style:{width:"100%",height:"100%"}},[e.createElementVNode("path",{class:e.normalizeClass(e.unref(o).e("hollow")),style:e.normalizeStyle(e.unref(d)),d:e.unref(c)},null,14,["d"])]))],16)):e.createCommentVNode("v-if",!0)}});var LO=a._export_sfc(RO,[["__file","mask.vue"]]);const FO=["absolute","fixed"],KO=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],oc=a.buildProps({placement:{type:a.definePropType(String),values:KO,default:"bottom"},reference:{type:a.definePropType(Object),default:null},strategy:{type:a.definePropType(String),values:FO,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),HO={close:()=>!0},jO=e.defineComponent({name:"ElTourContent"}),WO=e.defineComponent({...jO,props:oc,emits:HO,setup(t,{emit:n}){const o=t,l=e.ref(o.placement),r=e.ref(o.strategy),s=e.ref(null),i=e.ref(null);e.watch(()=>o.placement,()=>{l.value=o.placement});const{contentStyle:c,arrowStyle:u}=xO(e.toRef(o,"reference"),s,i,l,r,e.toRef(o,"offset"),e.toRef(o,"zIndex"),e.toRef(o,"showArrow")),d=e.computed(()=>l.value.split("-")[0]),{ns:p}=e.inject(Nr),f=()=>{n("close")},h=m=>{m.detail.focusReason==="pointer"&&m.preventDefault()};return(m,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contentRef",ref:s,style:e.normalizeStyle(e.unref(c)),class:e.normalizeClass(e.unref(p).e("content")),"data-side":e.unref(d),tabindex:"-1"},[e.createVNode(e.unref(L.ElFocusTrap),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:f,onFocusoutPrevented:h},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default")]),_:3},8,["focus-trap-el"]),m.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,ref_key:"arrowRef",ref:i,style:e.normalizeStyle(e.unref(u)),class:e.normalizeClass(e.unref(p).e("arrow"))},null,6)):e.createCommentVNode("v-if",!0)],14,["data-side"]))}});var UO=a._export_sfc(WO,[["__file","content.vue"]]),qO=e.defineComponent({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(t,{slots:n,emit:o}){let l=0;return()=>{var r,s;const i=(r=n.default)==null?void 0:r.call(n),c=[];let u=0;function d(p){a.isArray$1(p)&&p.forEach(f=>{var h;((h=(f==null?void 0:f.type)||{})==null?void 0:h.name)==="ElTourStep"&&(c.push(f),u+=1)})}return i.length&&d(L.flattedChildren((s=i[0])==null?void 0:s.children)),l!==u&&(l=u,o("update-total",u)),c.length?c[t.current]:null}}});const YO=a.buildProps({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:a.iconPropType},placement:oc.placement,contentStyle:{type:a.definePropType([Object])},mask:{type:a.definePropType([Boolean,Object]),default:!0},gap:{type:a.definePropType(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:a.definePropType([Boolean,Object]),default:()=>({block:"center"})},type:{type:a.definePropType(String)},appendTo:{type:pr.to.type,default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),GO={[L.UPDATE_MODEL_EVENT]:t=>a.isBoolean(t),"update:current":t=>a.isNumber(t),close:t=>a.isNumber(t),finish:()=>!0,change:t=>a.isNumber(t)},XO=e.defineComponent({name:"ElTour"}),JO=e.defineComponent({...XO,props:YO,emits:GO,setup(t,{emit:n}){const o=t,l=a.useNamespace("tour"),r=e.ref(0),s=e.ref(),i=a.useVModel(o,"current",n,{passive:!0}),c=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.target}),u=e.computed(()=>[l.b(),b.value==="primary"?l.m("primary"):""]),d=e.computed(()=>{var _;return((_=s.value)==null?void 0:_.placement)||o.placement}),p=e.computed(()=>{var _,P;return(P=(_=s.value)==null?void 0:_.contentStyle)!=null?P:o.contentStyle}),f=e.computed(()=>{var _,P;return(P=(_=s.value)==null?void 0:_.mask)!=null?P:o.mask}),h=e.computed(()=>!!f.value&&o.modelValue),m=e.computed(()=>a.isBoolean(f.value)?void 0:f.value),y=e.computed(()=>{var _,P;return!!c.value&&((P=(_=s.value)==null?void 0:_.showArrow)!=null?P:o.showArrow)}),v=e.computed(()=>{var _,P;return(P=(_=s.value)==null?void 0:_.scrollIntoViewOptions)!=null?P:o.scrollIntoViewOptions}),b=e.computed(()=>{var _,P;return(P=(_=s.value)==null?void 0:_.type)!=null?P:o.type}),{nextZIndex:k}=a.useZIndex(),E=k(),C=e.computed(()=>{var _;return(_=o.zIndex)!=null?_:E}),{mergedPosInfo:g,triggerTarget:S}=$O(c,e.toRef(o,"modelValue"),e.toRef(o,"gap"),f,v);e.watch(()=>o.modelValue,_=>{_||(i.value=0)});const w=()=>{o.closeOnPressEscape&&(n(L.UPDATE_MODEL_EVENT,!1),n("close",i.value))},N=_=>{r.value=_},V=e.useSlots();return e.provide(Nr,{currentStep:s,current:i,total:r,showClose:e.toRef(o,"showClose"),closeIcon:e.toRef(o,"closeIcon"),mergedType:b,ns:l,slots:V,updateModelValue(_){n(L.UPDATE_MODEL_EVENT,_)},onClose(){n("close",i.value)},onFinish(){n("finish")},onChange(){n(L.CHANGE_EVENT,i.value)}}),(_,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Gl),{to:_.appendTo},{default:e.withCtx(()=>{var T,D;return[e.createElementVNode("div",e.mergeProps({class:e.unref(u)},_.$attrs),[e.createVNode(LO,{visible:e.unref(h),fill:(T=e.unref(m))==null?void 0:T.color,style:e.normalizeStyle((D=e.unref(m))==null?void 0:D.style),pos:e.unref(g),"z-index":e.unref(C),"target-area-clickable":_.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),_.modelValue?(e.openBlock(),e.createBlock(UO,{key:e.unref(i),reference:e.unref(S),placement:e.unref(d),"show-arrow":e.unref(y),"z-index":e.unref(C),style:e.normalizeStyle(e.unref(p)),onClose:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qO),{current:e.unref(i),onUpdateTotal:N},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):e.createCommentVNode("v-if",!0)],16)]}),_:3},8,["to"]),e.createCommentVNode(" just for IDE "),e.createCommentVNode("v-if",!0)],64))}});var ZO=a._export_sfc(JO,[["__file","tour.vue"]]);const QO=a.buildProps({target:{type:a.definePropType([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:a.iconPropType},showArrow:{type:Boolean,default:void 0},placement:oc.placement,mask:{type:a.definePropType([Boolean,Object]),default:void 0},contentStyle:{type:a.definePropType([Object])},prevButtonProps:{type:a.definePropType(Object)},nextButtonProps:{type:a.definePropType(Object)},scrollIntoViewOptions:{type:a.definePropType([Boolean,Object]),default:void 0},type:{type:a.definePropType(String)}}),e$={close:()=>!0},t$=e.defineComponent({name:"ElTourStep"}),n$=e.defineComponent({...t$,props:QO,emits:e$,setup(t,{emit:n}){const o=t,{Close:l}=a.CloseComponents,{t:r}=a.useLocale(),{currentStep:s,current:i,total:c,showClose:u,closeIcon:d,mergedType:p,ns:f,slots:h,updateModelValue:m,onClose:y,onFinish:v,onChange:b}=e.inject(Nr);e.watch(o,_=>{s.value=_},{immediate:!0});const k=e.computed(()=>{var _;return(_=o.showClose)!=null?_:u.value}),E=e.computed(()=>{var _,P;return(P=(_=o.closeIcon)!=null?_:d.value)!=null?P:l}),C=_=>{if(_)return dr(_,["children","onClick"])},g=()=>{var _,P;i.value-=1,(_=o.prevButtonProps)!=null&&_.onClick&&((P=o.prevButtonProps)==null||P.onClick()),b()},S=()=>{var _;i.value>=c.value-1?w():i.value+=1,(_=o.nextButtonProps)!=null&&_.onClick&&o.nextButtonProps.onClick(),b()},w=()=>{N(),v()},N=()=>{m(!1),y(),n("close")},V=_=>{const P=_.target;if(P!=null&&P.isContentEditable)return;switch(a.getEventCode(_)){case a.EVENT_CODE.left:_.preventDefault(),i.value>0&&g();break;case a.EVENT_CODE.right:_.preventDefault(),S();break}};return e.onMounted(()=>{window.addEventListener("keydown",V)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",V)}),(_,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(k)?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(r)("el.tour.close"),class:e.normalizeClass(e.unref(f).e("closebtn")),type:"button",onClick:N},[e.createVNode(e.unref(a.ElIcon),{class:e.normalizeClass(e.unref(f).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(E))))]),_:1},8,["class"])],10,["aria-label"])):e.createCommentVNode("v-if",!0),e.createElementVNode("header",{class:e.normalizeClass([e.unref(f).e("header"),{"show-close":e.unref(u)}])},[e.renderSlot(_.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading",class:e.normalizeClass(e.unref(f).e("title"))},e.toDisplayString(_.title),3)])],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(f).e("body"))},[e.renderSlot(_.$slots,"default",{},()=>[e.createElementVNode("span",null,e.toDisplayString(_.description),1)])],2),e.createElementVNode("footer",{class:e.normalizeClass(e.unref(f).e("footer"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(f).b("indicators"))},[e.unref(h).indicators?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h).indicators),{key:0,current:e.unref(i),total:e.unref(c)},null,8,["current","total"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(c),(T,D)=>(e.openBlock(),e.createElementBlock("span",{key:T,class:e.normalizeClass([e.unref(f).b("indicator"),e.unref(f).is("active",D===e.unref(i))])},null,2))),128))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(f).b("buttons"))},[e.unref(i)>0?(e.openBlock(),e.createBlock(e.unref(L.ElButton),e.mergeProps({key:0,size:"small",type:e.unref(p)},C(_.prevButtonProps),{onClick:g}),{default:e.withCtx(()=>{var T,D;return[e.createTextVNode(e.toDisplayString((D=(T=_.prevButtonProps)==null?void 0:T.children)!=null?D:e.unref(r)("el.tour.previous")),1)]}),_:1},16,["type"])):e.createCommentVNode("v-if",!0),e.unref(i)<=e.unref(c)-1?(e.openBlock(),e.createBlock(e.unref(L.ElButton),e.mergeProps({key:1,size:"small",type:e.unref(p)==="primary"?"default":"primary"},C(_.nextButtonProps),{onClick:S}),{default:e.withCtx(()=>{var T,D;return[e.createTextVNode(e.toDisplayString((D=(T=_.nextButtonProps)==null?void 0:T.children)!=null?D:e.unref(i)===e.unref(c)-1?e.unref(r)("el.tour.finish"):e.unref(r)("el.tour.next")),1)]}),_:1},16,["type"])):e.createCommentVNode("v-if",!0)],2)],2)],64))}});var Xm=a._export_sfc(n$,[["__file","step.vue"]]);const o$=a.withInstall(ZO,{TourStep:Xm}),l$=a.withNoopInstall(Xm),a$=a.buildProps({container:{type:a.definePropType([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:a.definePropType(String),default:"default"},direction:{type:a.definePropType(String),default:"vertical"},selectScrollTop:Boolean}),r$={change:t=>a.isString(t),click:(t,n)=>t instanceof MouseEvent&&(a.isString(n)||a.isUndefined(n))},Jm=Symbol("anchor"),ma=t=>{if(!a.isClient||t==="")return null;if(a.isString(t))try{return document.querySelector(t)}catch{return null}return t};function s$(t){let n=0;const o=(...l)=>{n&&L.cAF(n),n=L.rAF(()=>{t(...l),n=0})};return o.cancel=()=>{L.cAF(n),n=0},o}const i$=e.defineComponent({name:"ElAnchor"}),c$=e.defineComponent({...i$,props:a$,emits:r$,setup(t,{expose:n,emit:o}){const l=t,r=e.useSlots(),s=e.ref(""),i=e.ref({}),c=e.ref(null),u=e.ref(null),d=e.ref(),p={};let f=!1,h=0;const m=a.useNamespace("anchor"),y=e.computed(()=>[m.b(),l.type==="underline"?m.m("underline"):"",m.m(l.direction)]),v=P=>{p[P.href]=P.el},b=P=>{delete p[P]},k=P=>{s.value!==P&&(s.value=P,o(L.CHANGE_EVENT,P))};let E=null;const C=P=>{if(!d.value)return;const T=ma(P);if(!T)return;E&&E(),f=!0;const D=L.getScrollElement(T,d.value),z=ls(T,D),q=D.scrollHeight-D.clientHeight,Z=Math.min(z-l.offset,q);E=L.animateScrollTo(d.value,h,Z,l.duration,()=>{setTimeout(()=>{f=!1},20)})},g=P=>{P&&(k(P),C(P))},S=(P,T)=>{o("click",P,T),g(T)},w=s$(()=>{d.value&&(h=L.getScrollTop(d.value));const P=N();f||a.isUndefined(P)||k(P)}),N=()=>{if(!d.value)return;const P=L.getScrollTop(d.value),T=[];for(const D of Object.keys(p)){const z=ma(D);if(!z)continue;const q=L.getScrollElement(z,d.value),Z=ls(z,q);T.push({top:Z-l.offset-l.bound,href:D})}T.sort((D,z)=>D.top-z.top);for(let D=0;D<T.length;D++){const z=T[D],q=T[D+1];if(D===0&&P===0)return l.selectScrollTop?z.href:"";if(z.top<=P&&(!q||q.top>P))return z.href}},V=()=>{const P=ma(l.container);!P||a.isWindow(P)?d.value=window:d.value=P};a.useEventListener(d,"scroll",w);const _=()=>{e.nextTick(()=>{if(!c.value||!u.value||!s.value){i.value={};return}const P=p[s.value];if(!P){i.value={};return}const T=c.value.getBoundingClientRect(),D=u.value.getBoundingClientRect(),z=P.getBoundingClientRect();if(l.direction==="horizontal"){const q=z.left-T.left;i.value={left:`${q}px`,width:`${z.width}px`,opacity:1}}else{const q=z.top-T.top+(z.height-D.height)/2;i.value={top:`${q}px`,opacity:1}}})};return e.watch(s,_),e.watch(()=>{var P;return(P=r.default)==null?void 0:P.call(r)},_),e.onMounted(()=>{V();const P=decodeURIComponent(window.location.hash);ma(P)?g(P):w()}),e.watch(()=>l.container,()=>{V()}),e.provide(Jm,{ns:m,direction:l.direction,currentAnchor:s,addLink:v,removeLink:b,handleClick:S}),n({scrollTo:g}),(P,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"anchorRef",ref:c,class:e.normalizeClass(e.unref(y))},[P.marker?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"markerRef",ref:u,class:e.normalizeClass(e.unref(m).e("marker")),style:e.normalizeStyle(i.value)},null,6)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(m).e("list"))},[e.renderSlot(P.$slots,"default")],2)],2))}});var u$=a._export_sfc(c$,[["__file","anchor.vue"]]);const d$=a.buildProps({title:String,href:String}),f$=e.defineComponent({name:"ElAnchorLink"}),p$=e.defineComponent({...f$,props:d$,setup(t){const n=t,o=e.ref(null),{ns:l,direction:r,currentAnchor:s,addLink:i,removeLink:c,handleClick:u}=e.inject(Jm),d=e.computed(()=>[l.e("link"),l.is("active",s.value===n.href)]),p=f=>{u(f,n.href)};return e.watch(()=>n.href,(f,h)=>{e.nextTick(()=>{h&&c(h),f&&i({href:f,el:o.value})})}),e.onMounted(()=>{const{href:f}=n;f&&i({href:f,el:o.value})}),e.onBeforeUnmount(()=>{const{href:f}=n;f&&c(f)}),(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).e("item"))},[e.createElementVNode("a",{ref_key:"linkRef",ref:o,class:e.normalizeClass(e.unref(d)),href:f.href,onClick:p},[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(f.title),1)])],10,["href"]),f.$slots["sub-link"]&&e.unref(r)==="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("list"))},[e.renderSlot(f.$slots,"sub-link")],2)):e.createCommentVNode("v-if",!0)],2))}});var Zm=a._export_sfc(p$,[["__file","anchor-link.vue"]]);const m$=a.withInstall(u$,{AnchorLink:Zm}),h$=a.withNoopInstall(Zm),Qm={label:"label",value:"value",disabled:"disabled"},v$=a.buildProps({direction:{type:a.definePropType(String),default:"horizontal"},options:{type:a.definePropType(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:a.definePropType(Object),default:()=>Qm},block:Boolean,size:a.useSizeProp,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...L.useAriaProps(["ariaLabel"])}),g$={[L.UPDATE_MODEL_EVENT]:t=>a.isString(t)||a.isNumber(t)||a.isBoolean(t),[L.CHANGE_EVENT]:t=>a.isString(t)||a.isNumber(t)||a.isBoolean(t)},y$=e.defineComponent({name:"ElSegmented"}),b$=e.defineComponent({...y$,props:v$,emits:g$,setup(t,{emit:n}){const o=t,l=a.useNamespace("segmented"),r=L.useId(),s=L.useFormSize(),i=L.useFormDisabled(),{formItem:c}=L.useFormItem(),{inputId:u,isLabeledByFormItem:d}=L.useFormItemInputId(o,{formItemContext:c}),p=e.ref(null),f=a.useActiveElement(),h=e.reactive({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),m=T=>{const D=b(T);n(L.UPDATE_MODEL_EVENT,D),n(L.CHANGE_EVENT,D)},y=e.computed(()=>({...Qm,...o.props})),v=T=>T,b=T=>a.isObject$1(T)?T[y.value.value]:T,k=T=>a.isObject$1(T)?T[y.value.label]:T,E=T=>!!(i.value||a.isObject$1(T)&&T[y.value.disabled]),C=T=>o.modelValue===b(T),g=T=>o.options.find(D=>b(D)===T),S=T=>[l.e("item"),l.is("selected",C(T)),l.is("disabled",E(T))],w=()=>{if(!p.value)return;const T=p.value.querySelector(".is-selected"),D=p.value.querySelector(".is-selected input");if(!T||!D){h.width=0,h.height=0,h.translateX=0,h.translateY=0,h.focusVisible=!1;return}h.isInit=!0,o.direction==="vertical"?(h.height=T.offsetHeight,h.translateY=T.offsetTop):(h.width=T.offsetWidth,h.translateX=T.offsetLeft);try{h.focusVisible=D.matches(":focus-visible")}catch{}},N=e.computed(()=>[l.b(),l.m(s.value),l.is("block",o.block)]),V=e.computed(()=>({width:o.direction==="vertical"?"100%":`${h.width}px`,height:o.direction==="vertical"?`${h.height}px`:"100%",transform:o.direction==="vertical"?`translateY(${h.translateY}px)`:`translateX(${h.translateX}px)`,display:h.isInit?"block":"none"})),_=e.computed(()=>[l.e("item-selected"),l.is("disabled",E(g(o.modelValue))),l.is("focus-visible",h.focusVisible)]),P=e.computed(()=>o.name||r.value);return a.useResizeObserver(p,w),e.watch(f,w),e.watch(()=>o.modelValue,()=>{var T;w(),o.validateEvent&&((T=c==null?void 0:c.validate)==null||T.call(c,"change").catch(D=>a.debugWarn(D)))},{flush:"post"}),(T,D)=>T.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(u),ref_key:"segmentedRef",ref:p,class:e.normalizeClass(e.unref(N)),role:"radiogroup","aria-label":e.unref(d)?void 0:T.ariaLabel||"segmented","aria-labelledby":e.unref(d)?e.unref(c).labelId:void 0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("group"),e.unref(l).m(T.direction)])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(V)),class:e.normalizeClass(e.unref(_))},null,6),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.options,(z,q)=>(e.openBlock(),e.createElementBlock("label",{key:q,class:e.normalizeClass(S(z))},[e.createElementVNode("input",{class:e.normalizeClass(e.unref(l).e("item-input")),type:"radio",name:e.unref(P),disabled:E(z),checked:C(z),onChange:Z=>m(z)},null,42,["name","disabled","checked","onChange"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("item-label"))},[e.renderSlot(T.$slots,"default",{item:v(z)},()=>[e.createTextVNode(e.toDisplayString(k(z)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):e.createCommentVNode("v-if",!0)}});var C$=a._export_sfc(b$,[["__file","segmented.vue"]]);const k$=a.withInstall(C$),E$=(t,n)=>{const o=t.toLowerCase();return(n.label||n.value||"").toLowerCase().includes(o)},w$=(t,n,o)=>{const{selectionEnd:l}=t;if(l===null)return;const r=t.value,s=ht(n);let i=-1,c;for(let u=l-1;u>=0;--u){const d=r[u];if(d===o||d===`
|
|
37
|
-
`||d==="\r"){i=u;continue}if(s.includes(d)){const p=i===-1?l:i;c={pattern:r.slice(u+1,p),start:u+1,end:p,prefix:d,prefixIndex:u,splitIndex:i,selectionEnd:l};break}}return c},S$=(t,n={debug:!1,useSelectionEnd:!1})=>{const o=t.selectionStart!==null?t.selectionStart:0,l=t.selectionEnd!==null?t.selectionEnd:0,r=n.useSelectionEnd?l:o,s=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(n.debug){const h=document.querySelector("#input-textarea-caret-position-mirror-div");h!=null&&h.parentNode&&h.parentNode.removeChild(h)}const i=document.createElement("div");i.id="input-textarea-caret-position-mirror-div",document.body.appendChild(i);const c=i.style,u=window.getComputedStyle(t),d=t.nodeName==="INPUT";c.whiteSpace=d?"nowrap":"pre-wrap",d||(c.wordWrap="break-word"),c.position="absolute",n.debug||(c.visibility="hidden"),s.forEach(h=>{if(d&&h==="lineHeight")if(u.boxSizing==="border-box"){const m=Number.parseInt(u.height),y=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),v=y+Number.parseInt(u.lineHeight);m>v?c.lineHeight=`${m-y}px`:m===v?c.lineHeight=u.lineHeight:c.lineHeight="0"}else c.lineHeight=u.height;else c[h]=u[h]}),a.isFirefox()?t.scrollHeight>Number.parseInt(u.height)&&(c.overflowY="scroll"):c.overflow="hidden",i.textContent=t.value.slice(0,Math.max(0,r)),d&&i.textContent&&(i.textContent=i.textContent.replace(/\s/g," "));const p=document.createElement("span");p.textContent=t.value.slice(Math.max(0,r))||".",p.style.position="relative",p.style.left=`${-t.scrollLeft}px`,p.style.top=`${-t.scrollTop}px`,i.appendChild(p);const f={top:p.offsetTop+Number.parseInt(u.borderTopWidth),left:p.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return n.debug?p.style.backgroundColor="#aaa":document.body.removeChild(i),f.left>=t.clientWidth&&(f.left=t.clientWidth),f},N$=a.buildProps({...L.inputProps,options:{type:a.definePropType(Array),default:()=>[]},prefix:{type:a.definePropType([String,Array]),default:"@",validator:t=>a.isString(t)?t.length===1:t.every(n=>a.isString(n)&&n.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:a.definePropType([Boolean,Function]),default:()=>E$,validator:t=>t===!1?!0:a.isFunction(t)},placement:{type:a.definePropType(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:a.definePropType(Function)},modelValue:String,loading:Boolean,popperClass:Ge.popperClass,popperStyle:Ge.popperStyle,popperOptions:{type:a.definePropType(Object),default:()=>({})},props:{type:a.definePropType(Object),default:()=>eh}}),T$={[L.UPDATE_MODEL_EVENT]:t=>a.isString(t),"whole-remove":(t,n)=>a.isString(t)&&a.isString(n),input:t=>a.isString(t),search:(t,n)=>a.isString(t)&&a.isString(n),select:(t,n)=>a.isObject$1(t)&&a.isString(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},eh={value:"value",label:"label",disabled:"disabled"},_$=a.buildProps({options:{type:a.definePropType(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),B$={select:t=>a.isString(t.value)},V$=e.defineComponent({name:"ElMentionDropdown"}),P$=e.defineComponent({...V$,props:_$,emits:B$,setup(t,{expose:n,emit:o}){const l=t,r=a.useNamespace("mention"),{t:s}=a.useLocale(),i=e.ref(-1),c=e.ref(),u=e.ref(),d=e.ref(),p=(C,g)=>[r.be("dropdown","item"),r.is("hovering",i.value===g),r.is("disabled",C.disabled||l.disabled)],f=C=>{C.disabled||l.disabled||o("select",C)},h=C=>{i.value=C},m=e.computed(()=>l.disabled||l.options.every(C=>C.disabled)),y=e.computed(()=>l.options[i.value]),v=()=>{y.value&&o("select",y.value)},b=C=>{const{options:g}=l;if(g.length===0||m.value)return;C==="next"?(i.value++,i.value===g.length&&(i.value=0)):C==="prev"&&(i.value--,i.value<0&&(i.value=g.length-1));const S=g[i.value];if(S.disabled){b(C);return}e.nextTick(()=>k(S))},k=C=>{var g,S,w,N;const{options:V}=l,_=V.findIndex(T=>T.value===C.value),P=(g=u.value)==null?void 0:g[_];if(P){const T=(w=(S=d.value)==null?void 0:S.querySelector)==null?void 0:w.call(S,`.${r.be("dropdown","wrap")}`);T&&L.scrollIntoView(T,P)}(N=c.value)==null||N.handleScroll()},E=()=>{m.value||l.options.length===0?i.value=-1:i.value=0};return e.watch(()=>l.options,E,{immediate:!0}),n({hoveringIndex:i,navigateOptions:b,selectHoverOption:v,hoverOption:y}),(C,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:d,class:e.normalizeClass(e.unref(r).b("dropdown"))},[C.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).be("dropdown","header"))},[e.renderSlot(C.$slots,"header")],2)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createVNode(e.unref(Ut),{id:C.contentId,ref_key:"scrollbarRef",ref:c,tag:"ul","wrap-class":e.unref(r).be("dropdown","wrap"),"view-class":e.unref(r).be("dropdown","list"),role:"listbox","aria-label":C.ariaLabel,"aria-orientation":"vertical"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.options,(S,w)=>(e.openBlock(),e.createElementBlock("li",{id:`${C.contentId}-${w}`,ref_for:!0,ref_key:"optionRefs",ref:u,key:w,class:e.normalizeClass(p(S,w)),role:"option","aria-disabled":S.disabled||C.disabled||void 0,"aria-selected":i.value===w,onMousemove:N=>h(w),onClick:e.withModifiers(N=>f(S),["stop"])},[e.renderSlot(C.$slots,"label",{item:S,index:w},()=>{var N;return[e.createElementVNode("span",null,e.toDisplayString((N=S.label)!=null?N:S.value),1)]})],42,["id","aria-disabled","aria-selected","onMousemove","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[e.vShow,C.options.length>0&&!C.loading]]),C.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).be("dropdown","loading"))},[e.renderSlot(C.$slots,"loading",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("el.mention.loading")),1)])],2)):e.createCommentVNode("v-if",!0),C.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(r).be("dropdown","footer"))},[e.renderSlot(C.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],2))}});var D$=a._export_sfc(P$,[["__file","mention-dropdown.vue"]]);const I$=e.defineComponent({name:"ElMention",inheritAttrs:!1}),O$=e.defineComponent({...I$,props:N$,emits:T$,setup(t,{expose:n,emit:o}){const l=t,r=e.computed(()=>L.pick(l,Object.keys(L.inputProps))),s=a.useNamespace("mention"),i=L.useFormDisabled(),c=L.useId(),u=e.ref(),d=e.ref(),p=e.ref(),f=e.ref(!1),h=e.ref(),m=e.ref(),y=e.computed(()=>l.showArrow?l.placement:`${l.placement}-start`),v=e.computed(()=>l.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=e.computed(()=>({...eh,...l.props})),k=O=>{const M={label:O[b.value.label],value:O[b.value.value],disabled:O[b.value.disabled]};return{...O,...M}},E=e.computed(()=>l.options.map(k)),C=e.computed(()=>{const{filterOption:O}=l;return!m.value||!O?E.value:E.value.filter(M=>O(m.value.pattern,M))}),g=e.computed(()=>f.value&&(!!C.value.length||l.loading)),S=e.computed(()=>{var O;return`${c.value}-${(O=p.value)==null?void 0:O.hoveringIndex}`}),w=O=>{o(L.UPDATE_MODEL_EVENT,O),o(L.INPUT_EVENT,O),z()},N=O=>{var M,x,A,R;if((M=u.value)!=null&&M.isComposing)return;const F=a.getEventCode(O);switch(F){case a.EVENT_CODE.left:case a.EVENT_CODE.right:z();break;case a.EVENT_CODE.up:case a.EVENT_CODE.down:if(!f.value)return;O.preventDefault(),(x=p.value)==null||x.navigateOptions(F===a.EVENT_CODE.up?"prev":"next");break;case a.EVENT_CODE.enter:case a.EVENT_CODE.numpadEnter:if(!f.value){l.type!=="textarea"&&z();return}O.preventDefault(),(A=p.value)!=null&&A.hoverOption?(R=p.value)==null||R.selectHoverOption():f.value=!1;break;case a.EVENT_CODE.esc:if(!f.value)return;O.preventDefault(),f.value=!1;break;case a.EVENT_CODE.backspace:if(l.whole&&m.value){const{splitIndex:K,selectionEnd:H,pattern:J,prefixIndex:U,prefix:oe}=m.value,ae=D();if(!ae)return;const Q=ae.value,X=E.value.find(I=>I.value===J);if((a.isFunction(l.checkIsWhole)?l.checkIsWhole(J,oe):X)&&K!==-1&&K+1===H){O.preventDefault();const I=Q.slice(0,U)+Q.slice(K+1);o(L.UPDATE_MODEL_EVENT,I),o(L.INPUT_EVENT,I),o("whole-remove",J,oe);const j=U;e.nextTick(()=>{ae.selectionStart=j,ae.selectionEnd=j,Z()})}}}},{wrapperRef:V}=L.useFocusController(u,{disabled:i,afterFocus(){z()},beforeBlur(O){var M;return(M=d.value)==null?void 0:M.isFocusInsideContent(O)},afterBlur(){f.value=!1}}),_=()=>{z()},P=O=>l.options.find(M=>O.value===M[b.value.value]),T=O=>{if(!m.value)return;const M=D();if(!M)return;const x=M.value,{split:A}=l,R=x.slice(m.value.end),F=R.startsWith(A),K=`${O.value}${F?"":A}`,H=x.slice(0,m.value.start)+K+R;o(L.UPDATE_MODEL_EVENT,H),o(L.INPUT_EVENT,H),o("select",P(O),m.value.prefix);const J=m.value.start+K.length+(F?1:0);e.nextTick(()=>{M.selectionStart=J,M.selectionEnd=J,M.focus(),Z()})},D=()=>{var O,M;return l.type==="textarea"?(O=u.value)==null?void 0:O.textarea:(M=u.value)==null?void 0:M.input},z=()=>{setTimeout(()=>{q(),Z(),e.nextTick(()=>{var O;return(O=d.value)==null?void 0:O.updatePopper()})},0)},q=()=>{const O=D();if(!O)return;const M=S$(O),x=O.getBoundingClientRect(),A=V.value.getBoundingClientRect();h.value={position:"absolute",width:0,height:`${M.height}px`,left:`${M.left+x.left-A.left}px`,top:`${M.top+x.top-A.top}px`}},Z=()=>{const O=D();if(document.activeElement!==O){f.value=!1;return}const{prefix:M,split:x}=l;if(m.value=w$(O,M,x),m.value&&m.value.splitIndex===-1){f.value=!0,o("search",m.value.pattern,m.value.prefix);return}f.value=!1};return n({input:u,tooltip:d,dropdownVisible:g}),(O,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:V,class:e.normalizeClass(e.unref(s).b())},[e.createVNode(e.unref(L.ElInput),e.mergeProps(e.mergeProps(e.unref(r),O.$attrs),{ref_key:"elInputRef",ref:u,"model-value":O.modelValue,disabled:e.unref(i),role:e.unref(g)?"combobox":void 0,"aria-activedescendant":e.unref(g)?e.unref(S)||"":void 0,"aria-controls":e.unref(g)?e.unref(c):void 0,"aria-expanded":e.unref(g)||void 0,"aria-label":O.ariaLabel,"aria-autocomplete":e.unref(g)?"none":void 0,"aria-haspopup":e.unref(g)?"listbox":void 0,onInput:w,onKeydown:N,onMousedown:_}),e.createSlots({_:2},[e.renderList(O.$slots,(x,A)=>({name:A,fn:e.withCtx(R=>[e.renderSlot(O.$slots,A,e.normalizeProps(e.guardReactiveProps(R)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),e.createVNode(e.unref(yt),{ref_key:"tooltipRef",ref:d,visible:e.unref(g),"popper-class":[e.unref(s).e("popper"),O.popperClass],"popper-style":O.popperStyle,"popper-options":O.popperOptions,placement:e.unref(y),"fallback-placements":e.unref(v),effect:"light",pure:"",offset:O.offset,"show-arrow":O.showArrow},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(h.value)},null,4)]),content:e.withCtx(()=>{var x;return[e.createVNode(D$,{ref_key:"dropdownRef",ref:p,options:e.unref(C),disabled:e.unref(i),loading:O.loading,"content-id":e.unref(c),"aria-label":O.ariaLabel,onSelect:T,onClick:e.withModifiers((x=u.value)==null?void 0:x.focus,["stop"])},e.createSlots({_:2},[e.renderList(O.$slots,(A,R)=>({name:R,fn:e.withCtx(F=>[e.renderSlot(O.$slots,R,e.normalizeProps(e.guardReactiveProps(F)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var $$=a._export_sfc(O$,[["__file","mention.vue"]]);const M$=a.withInstall($$),x$=a.buildProps({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),th=Symbol("splitterRootContextKey");function A$(t){const n=e.ref(),{width:o,height:l}=a.useElementSize(n),r=e.computed(()=>t.value==="horizontal"?o.value:l.value);return{containerEl:n,containerSize:r}}function lc(t){return Number(t.slice(0,-1))/100}function ac(t){return Number(t.slice(0,-2))}function rc(t){return a.isString(t)&&t.endsWith("%")}function sc(t){return a.isString(t)&&t.endsWith("px")}function z$(t,n){const o=e.computed(()=>t.value.map(c=>c.size)),l=e.computed(()=>t.value.length),r=e.ref([]);e.watch([o,l,n],()=>{var c;let u=[],d=0;for(let f=0;f<l.value;f+=1){const h=(c=t.value[f])==null?void 0:c.size;if(rc(h))u[f]=lc(h);else if(sc(h))u[f]=ac(h)/n.value;else if(h||h===0){const m=Number(h);Number.isNaN(m)||(u[f]=m/n.value)}else d+=1,u[f]=void 0}const p=u.reduce((f,h)=>f+(h||0),0);if(p>1||!d){const f=1/p;u=u.map(h=>h===void 0?0:h*f)}else{const f=(1-p)/d;u=u.map(h=>h===void 0?f:h)}r.value=u});const s=c=>c*n.value,i=e.computed(()=>r.value.map(s));return{percentSizes:r,pxSizes:i}}function R$(t,n,o,l){const r=b=>b*n.value||0;function s(b,k){return rc(b)?r(lc(b)):sc(b)?ac(b):b??k}const i=e.ref(0),c=e.ref(null);let u=[],d=a.NOOP;const p=e.computed(()=>t.value.map(b=>[b.min,b.max]));e.watch(l,()=>{if(i.value){const b=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(b)}});const f=b=>{i.value=0,c.value={index:b,confirmed:!1},u=o.value},h=(b,k)=>{var E,C;let g=null;if((!c.value||!c.value.confirmed)&&k!==0){if(k>0)g=b,c.value={index:b,confirmed:!0};else for(let z=b;z>=0;z-=1)if(u[z]>0){g=z,c.value={index:z,confirmed:!0};break}}const S=(C=g??((E=c.value)==null?void 0:E.index))!=null?C:b,w=[...u],N=S+1,V=s(p.value[S][0],0),_=s(p.value[N][0],0),P=s(p.value[S][1],n.value||0),T=s(p.value[N][1],n.value||0);let D=k;w[S]+D<V&&(D=V-w[S]),w[N]-D<_&&(D=w[N]-_),w[S]+D>P&&(D=P-w[S]),w[N]-D>T&&(D=w[N]-T),w[S]+=D,w[N]-=D,i.value=D,d=()=>{t.value.forEach((z,q)=>{z.size=w[q]}),d=a.NOOP},l.value||d()},m=()=>{l.value&&d(),i.value=0,c.value=null,u=[]},y=[];return{lazyOffset:i,onMoveStart:f,onMoving:h,onMoveEnd:m,movingIndex:c,onCollapse:(b,k)=>{y.length||y.push(...o.value);const E=o.value,C=k==="start"?b:b+1,g=k==="start"?b+1:b,S=E[C],w=E[g];if(S!==0&&w!==0)E[C]=0,E[g]+=S,y[b]=S;else{const N=S+w,V=y[b],_=N-V;E[g]=V,E[C]=_}t.value.forEach((N,V)=>{N.size=E[V]})}}}const L$=e.defineComponent({name:"ElSplitter"}),F$=e.defineComponent({...L$,props:x$,emits:["resizeStart","resize","resizeEnd","collapse"],setup(t,{emit:n}){const o=t,l=a.useNamespace("splitter"),r=e.toRef(o,"layout"),s=e.toRef(o,"lazy"),{containerEl:i,containerSize:c}=A$(r),{removeChild:u,children:d,addChild:p,ChildrenSorter:f}=mr(e.getCurrentInstance(),"ElSplitterPanel");e.watch(d,()=>{d.value.forEach((_,P)=>{_.setIndex(P)})});const{percentSizes:h,pxSizes:m}=z$(d,c),{lazyOffset:y,movingIndex:v,onMoveStart:b,onMoving:k,onMoveEnd:E,onCollapse:C}=R$(d,c,m,s),g=e.computed(()=>({[l.cssVarBlockName("bar-offset")]:s.value?`${y.value}px`:void 0})),S=_=>{b(_),n("resizeStart",_,m.value)},w=(_,P)=>{k(_,P),s.value||n("resize",_,m.value)},N=async _=>{E(),await e.nextTick(),n("resizeEnd",_,m.value)},V=(_,P)=>{C(_,P),n("collapse",_,P,m.value)};return e.provide(th,e.reactive({panels:d,percentSizes:h,pxSizes:m,layout:r,lazy:s,movingIndex:v,containerSize:c,onMoveStart:S,onMoving:w,onMoveEnd:N,onCollapse:V,registerPanel:p,unregisterPanel:u})),(_,P)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerEl",ref:i,class:e.normalizeClass([e.unref(l).b(),e.unref(l).e(e.unref(r))]),style:e.normalizeStyle(e.unref(g))},[e.renderSlot(_.$slots,"default"),e.createVNode(e.unref(f)),e.createCommentVNode(" Prevent iframe touch events from breaking "),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("mask"),e.unref(l).e(`mask-${e.unref(r)}`)])},null,2)):e.createCommentVNode("v-if",!0)],6))}});var K$=a._export_sfc(F$,[["__file","splitter.vue"]]);function H$(t){return t&&a.isObject$1(t)?t:{start:!!t,end:!!t}}function nd(t,n,o,l){return!!(t!=null&&t.collapsible.end&&n>0||o!=null&&o.collapsible.start&&l===0&&n>0)}const j$=e.defineComponent({name:"ElSplitterBar"}),W$=e.defineComponent({...j$,props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(t,{emit:n}){const o=t,l=a.useNamespace("splitter-bar"),r=e.computed(()=>o.layout==="horizontal"),s=e.computed(()=>r.value?{width:0}:{height:0}),i=e.computed(()=>({width:r.value?"16px":"100%",height:r.value?"100%":"16px",cursor:o.resizable?r.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),c=e.computed(()=>{const k=l.e("dragger");return{[`${k}-horizontal`]:r.value,[`${k}-vertical`]:!r.value,[`${k}-active`]:!!u.value}}),u=e.ref(null),d=k=>{o.resizable&&(u.value=[k.pageX,k.pageY],n("moveStart",o.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",f))},p=k=>{if(o.resizable&&k.touches.length===1){k.preventDefault();const E=k.touches[0];u.value=[E.pageX,E.pageY],n("moveStart",o.index),window.addEventListener("touchend",y),window.addEventListener("touchmove",h)}},f=k=>{const{pageX:E,pageY:C}=k,g=E-u.value[0],S=C-u.value[1],w=r.value?g:S;n("moving",o.index,w)},h=k=>{if(k.touches.length===1){k.preventDefault();const E=k.touches[0],C=E.pageX-u.value[0],g=E.pageY-u.value[1],S=r.value?C:g;n("moving",o.index,S)}},m=()=>{u.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",f),n("moveEnd",o.index)},y=()=>{u.value=null,window.removeEventListener("touchend",y),window.removeEventListener("touchmove",h),n("moveEnd",o.index)},v=e.computed(()=>r.value?a.arrow_left_default:a.arrow_up_default),b=e.computed(()=>r.value?a.arrow_right_default:a.arrow_down_default);return(k,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b()]),style:e.normalizeStyle(e.unref(s))},[t.startCollapsible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("collapse-icon"),e.unref(l).e(`${t.layout}-collapse-icon-start`)]),onClick:C=>n("collapse",t.index,"start")},[e.renderSlot(k.$slots,"start-collapsible",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(v)),{style:{width:"12px",height:"12px"}}))])],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("dragger"),e.unref(c),e.unref(l).is("disabled",!t.resizable),e.unref(l).is("lazy",t.resizable&&t.lazy)]),style:e.normalizeStyle(e.unref(i)),onMousedown:d,onTouchstart:p},null,38),t.endCollapsible?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(l).e("collapse-icon"),e.unref(l).e(`${t.layout}-collapse-icon-end`)]),onClick:C=>n("collapse",t.index,"end")},[e.renderSlot(k.$slots,"end-collapsible",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b)),{style:{width:"12px",height:"12px"}}))])],10,["onClick"])):e.createCommentVNode("v-if",!0)],6))}});var U$=a._export_sfc(W$,[["__file","split-bar.vue"]]);const q$=a.buildProps({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),nh="ElSplitterPanel",Y$=e.defineComponent({name:nh}),G$=e.defineComponent({...Y$,props:q$,emits:["update:size"],setup(t,{emit:n}){const o=t,l=a.useNamespace("splitter-panel"),r=e.inject(th);r||a.throwError(nh,"usage: <el-splitter><el-splitter-panel /></el-splitter/>");const{panels:s,layout:i,lazy:c,containerSize:u,pxSizes:d}=e.toRefs(r),{registerPanel:p,unregisterPanel:f,onCollapse:h,onMoveEnd:m,onMoveStart:y,onMoving:v}=r,b=e.ref(),k=e.getCurrentInstance(),E=k.uid,C=e.ref(0),g=e.computed(()=>s.value[C.value]),S=O=>{C.value=O},w=e.computed(()=>{var O;return g.value&&(O=d.value[C.value])!=null?O:0}),N=e.computed(()=>{var O;return g.value&&(O=d.value[C.value+1])!=null?O:0}),V=e.computed(()=>g.value?s.value[C.value+1]:null),_=e.computed(()=>{var O;return V.value?o.resizable&&((O=V.value)==null?void 0:O.resizable)&&(w.value!==0||!o.min)&&(N.value!==0||!V.value.min):!1}),P=e.computed(()=>g.value?C.value!==s.value.length-1:!1),T=e.computed(()=>nd(g.value,w.value,V.value,N.value)),D=e.computed(()=>nd(V.value,N.value,g.value,w.value));function z(O){return rc(O)?lc(O)*u.value||0:sc(O)?ac(O):O??0}let q=!1;e.watch(()=>o.size,()=>{if(!q&&g.value){if(!u.value){g.value.size=o.size;return}const O=z(o.size),M=z(o.max),x=z(o.min),A=Math.min(Math.max(O,x||0),M||O);A!==O&&n("update:size",A),g.value.size=A}}),e.watch(()=>{var O;return(O=g.value)==null?void 0:O.size},O=>{O!==o.size&&(q=!0,n("update:size",O),e.nextTick(()=>q=!1))}),e.watch(()=>o.resizable,O=>{g.value&&(g.value.resizable=O)});const Z=e.reactive({el:b.value,uid:E,getVnode:()=>k.vnode,setIndex:S,...o,collapsible:e.computed(()=>H$(o.collapsible))});return p(Z),e.onBeforeUnmount(()=>f(Z)),(O,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({ref_key:"panelEl",ref:b,class:[e.unref(l).b()],style:{flexBasis:`${e.unref(w)}px`}},O.$attrs),[e.renderSlot(O.$slots,"default")],16),e.unref(P)?(e.openBlock(),e.createBlock(U$,{key:0,index:C.value,layout:e.unref(i),lazy:e.unref(c),resizable:e.unref(_),"start-collapsible":e.unref(T),"end-collapsible":e.unref(D),onMoveStart:e.unref(y),onMoving:e.unref(v),onMoveEnd:e.unref(m),onCollapse:e.unref(h)},{"start-collapsible":e.withCtx(()=>[e.renderSlot(O.$slots,"start-collapsible")]),"end-collapsible":e.withCtx(()=>[e.renderSlot(O.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):e.createCommentVNode("v-if",!0)],64))}});var oh=a._export_sfc(G$,[["__file","split-panel.vue"]]);const X$=a.withInstall(K$,{SplitPanel:oh}),J$=a.withNoopInstall(oh);var Z$=[uv,gv,Py,$P,xy,Hy,a.ElBadge,Jy,Zy,L.ElButton,L.ElButtonGroup,Cb,Nb,Ab,zb,zC,kf,jC,Ht,Jb,df,GC,dk,fk,vr,Of,Fk,Kk,eE,tE,nE,oE,lE,M0,qf,W0,U0,tw,tp,fw,Xw,Jw,Zw,up,XS,JS,a.ElIcon,iN,mp,L.ElInput,hp,wN,VN,YN,GN,XN,JN,oT,YT,e_,c_,jd,Sp,bf,cC,iC,b_,S_,D_,Ut,An,Ga,BT,i1,g1,y1,A1,K1,Ap,Q1,iB,cB,hB,SV,NV,OP,GP,XP,un,Ui,NE,rD,fD,pD,yt,TD,lr,UD,cI,TI,AI,o$,l$,m$,h$,k$,M$,X$,J$];const Dt="ElInfiniteScroll",Q$=50,eM=200,tM=0,nM={delay:{type:Number,default:eM},distance:{type:Number,default:tM},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},ic=(t,n)=>Object.entries(nM).reduce((o,[l,r])=>{var s,i;const{type:c,default:u}=r,d=t.getAttribute(`infinite-scroll-${l}`);let p=(i=(s=n[d])!=null?s:d)!=null?i:u;return p=p==="false"?!1:p,p=c(p),o[l]=Number.isNaN(p)?u:p,o},{}),lh=t=>{const{observer:n}=t[Dt];n&&(n.disconnect(),delete t[Dt].observer)},oM=(t,n)=>{const{container:o,containerEl:l,instance:r,observer:s,lastScrollTop:i}=t[Dt],{disabled:c,distance:u}=ic(t,r),{clientHeight:d,scrollHeight:p,scrollTop:f}=l,h=f-i;if(t[Dt].lastScrollTop=f,s||c||h<0)return;let m=!1;if(o===t)m=p-(d+f)<=u;else{const{clientTop:y,scrollHeight:v}=t,b=ls(t,l);m=f+d>=b+y+v-u}m&&n.call(r)};function Yr(t,n){const{containerEl:o,instance:l}=t[Dt],{disabled:r}=ic(t,l);r||o.clientHeight===0||(o.scrollHeight<=o.clientHeight?n.call(l):lh(t))}const lM={async mounted(t,n){const{instance:o,value:l}=n;L.useDeprecated({scope:Dt,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),a.isFunction(l)||a.throwError(Dt,"'v-infinite-scroll' binding value must be a function"),await e.nextTick();const{delay:r,immediate:s}=ic(t,o),i=L.getScrollContainer(t,!0),c=i===window?document.documentElement:i,u=In(oM.bind(null,t,l),r);if(i){if(t[Dt]={instance:o,container:i,containerEl:c,delay:r,cb:l,onScroll:u,lastScrollTop:c.scrollTop},s){const d=new MutationObserver(In(Yr.bind(null,t,l),Q$));t[Dt].observer=d,d.observe(t,{childList:!0,subtree:!0}),Yr(t,l)}i.addEventListener("scroll",u)}},unmounted(t){if(!t[Dt])return;const{container:n,onScroll:o}=t[Dt];n==null||n.removeEventListener("scroll",o),lh(t)},async updated(t){if(!t[Dt])await e.nextTick();else{const{containerEl:n,cb:o,observer:l}=t[Dt];n.clientHeight&&l&&Yr(t,o)}}},Ws=lM;Ws.install=t=>{t.directive("InfiniteScroll",Ws)};const aM=Ws,ah=["primary","success","info","warning","error"],rM=a.buildProps({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:a.iconPropType},id:{type:String,default:""},message:{type:a.definePropType([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:a.definePropType(Function),default:()=>{}},onClose:{type:a.definePropType(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...ah,""],default:""},zIndex:Number,closeIcon:{type:a.iconPropType,default:a.close_default}}),sM={destroy:()=>!0},iM=e.defineComponent({name:"ElNotification"}),cM=e.defineComponent({...iM,props:rM,emits:sM,setup(t,{expose:n}){const o=t,{ns:l,zIndex:r}=a.useGlobalComponentSettings("notification"),{nextZIndex:s,currentZIndex:i}=r,c=e.ref(!1);let u;const d=e.computed(()=>{const E=o.type;return E&&a.TypeComponentsMap[o.type]?l.m(E):""}),p=e.computed(()=>o.type&&a.TypeComponentsMap[o.type]||o.icon),f=e.computed(()=>o.position.endsWith("right")?"right":"left"),h=e.computed(()=>o.position.startsWith("top")?"top":"bottom"),m=e.computed(()=>{var E;return{[h.value]:`${o.offset}px`,zIndex:(E=o.zIndex)!=null?E:i.value}});function y(){o.duration>0&&({stop:u}=a.useTimeoutFn(()=>{c.value&&b()},o.duration))}function v(){u==null||u()}function b(){c.value=!1}function k(E){switch(a.getEventCode(E)){case a.EVENT_CODE.delete:case a.EVENT_CODE.backspace:v();break;case a.EVENT_CODE.esc:c.value&&b();break;default:y();break}}return e.onMounted(()=>{y(),s(),c.value=!0}),a.useEventListener(document,"keydown",k),n({visible:c,close:b}),(E,C)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(l).b("fade"),onBeforeLeave:E.onClose,onAfterLeave:g=>E.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:E.id,class:e.normalizeClass([e.unref(l).b(),E.customClass,e.unref(f)]),style:e.normalizeStyle(e.unref(m)),role:"alert",onMouseenter:v,onMouseleave:y,onClick:E.onClick},[e.unref(p)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass([e.unref(l).e("icon"),e.unref(d)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(p))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("group"))},[e.createElementVNode("h2",{class:e.normalizeClass(e.unref(l).e("title")),textContent:e.toDisplayString(E.title)},null,10,["textContent"]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content")),style:e.normalizeStyle(E.title?void 0:{margin:0})},[e.renderSlot(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{innerHTML:E.message},null,8,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0},e.toDisplayString(E.message),1))])],6),[[e.vShow,E.message]]),E.showClose?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass(e.unref(l).e("closeBtn")),onClick:e.withModifiers(b,["stop"])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.closeIcon)))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],2)],46,["id","onClick"]),[[e.vShow,c.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var uM=a._export_sfc(cM,[["__file","notification.vue"]]);const yo={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},ir=16;let dM=1;const Fn=function(t={},n){if(!a.isClient)return{close:()=>{}};(a.isString(t)||e.isVNode(t))&&(t={message:t});const o=t.position||"top-right";let l=t.offset||0;yo[o].forEach(({vm:p})=>{var f;l+=(((f=p.el)==null?void 0:f.offsetHeight)||0)+ir}),l+=ir;const r=`notification_${dM++}`,s=t.onClose,i={...t,offset:l,id:r,onClose:()=>{fM(r,o,s)}};let c=document.body;a.isElement(t.appendTo)?c=t.appendTo:a.isString(t.appendTo)&&(c=document.querySelector(t.appendTo)),a.isElement(c)||(a.debugWarn("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),c=document.body);const u=document.createElement("div"),d=e.createVNode(uM,i,a.isFunction(i.message)?i.message:e.isVNode(i.message)?()=>i.message:null);return d.appContext=a.isUndefined(n)?Fn._context:n,d.props.onDestroy=()=>{e.render(null,u)},e.render(d,u),yo[o].push({vm:d}),c.appendChild(u.firstElementChild),{close:()=>{d.component.exposed.visible.value=!1}}};ah.forEach(t=>{Fn[t]=(n={},o)=>((a.isString(n)||e.isVNode(n))&&(n={message:n}),Fn({...n,type:t},o))});function fM(t,n,o){const l=yo[n],r=l.findIndex(({vm:d})=>{var p;return((p=d.component)==null?void 0:p.props.id)===t});if(r===-1)return;const{vm:s}=l[r];if(!s)return;o==null||o(s);const i=s.el.offsetHeight,c=n.split("-")[0];l.splice(r,1);const u=l.length;if(!(u<1))for(let d=r;d<u;d++){const{el:p,component:f}=l[d].vm,h=Number.parseInt(p.style[c],10)-i-ir;f.props.offset=h}}function pM(){for(const t of Object.values(yo))t.forEach(({vm:n})=>{n.component.exposed.visible.value=!1})}function mM(t="top-right"){var n,o,l,r;let s=((l=(o=(n=yo[t][0])==null?void 0:n.vm.component)==null?void 0:o.props)==null?void 0:l.offset)||0;for(const{vm:i}of yo[t])i.component.props.offset=s,s+=(((r=i.el)==null?void 0:r.offsetHeight)||0)+ir}Fn.closeAll=pM;Fn.updateOffsets=mM;Fn._context=null;const hM=a.withInstallFunction(Fn,"$notify");var vM=[aM,xn.ElLoading,a.ElMessage,L.ElMessageBox,hM,wp],gM=lv([...Z$,...vM]);const yM={key:0,class:"dialog-overlay"},bM={class:"dialog-content"},CM={class:"dialog"},kM={class:"dialog-value"},EM={class:"dialog-item"},wM={class:"dialog-child"},SM={class:"dialog-actions"},NM={__name:"index",setup(t,{expose:n}){const o=e.ref(!1),l=e.ref(null);e.ref(!0);const r=e.ref([]),s=e.ref({}),i=e.ref([{label:"保留",value:"保留"},{label:"替换",value:"替换"}]),c=p=>{var h;o.value=!0,r.value=Object.keys(p);let f={};return(h=Object.keys(p))==null||h.forEach(m=>{f[m]="替换"}),s.value=f,new Promise(m=>{l.value=m})},u=(p,f)=>{let h=a.cloneDeep(s.value);h[p]=f,s.value=h},d=()=>{var p;o.value=!1,(p=l.value)==null||p.call(l,a.cloneDeep(s.value))};return e.onUnmounted(()=>{BM()}),n({show:c}),(p,f)=>o.value?(e.openBlock(),e.createElementBlock("div",yM,[e.createElementVNode("div",bM,[e.createElementVNode("div",CM,[f[1]||(f[1]=e.createElementVNode("div",{class:"dialog-title"},e.toDisplayString("冲突页面选择"),-1)),e.createElementVNode("div",kM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,h=>(e.openBlock(),e.createElementBlock("div",EM,[e.createElementVNode("div",wM,[e.createElementVNode("div",null,e.toDisplayString(h),1),e.createElementVNode("div",null,[e.createVNode(xn.ssRadio,{content:i.value,modelValue:s.value[h],"onUpdate:modelValue":m=>s.value[h]=m,onChange:m=>u(h,m)},null,8,["content","modelValue","onUpdate:modelValue","onChange"])])])]))),256))])]),e.createElementVNode("div",SM,[e.createVNode(e.unref(hh._sfc_main),{class:"menu-button click-button",onClickTrigger:f[0]||(f[0]=h=>d()),modelValue:"继续"})])])])):e.createCommentVNode("",!0)}},TM=vh._export_sfc(NM,[["__scopeId","data-v-4033db15"]]);let Fa=null,st="$R";const od=L.useMenuState();let Nl=null;const _M=()=>{const t=e.createApp(TM);t.use(gM);const n=document.createElement("div");return document.body.appendChild(n),t.mount(n)},ld=(t,n)=>{var l;return(l=ve.tableEveryContents(a.cloneDeep(t)))==null?void 0:l.map(r=>{var s,i,c,u,d;if(t.comp==="Table"){let p={comp:(s=ve.tableToStruct(a.cloneDeep(r)))==null?void 0:s.comp,compData:(i=ve.tableToStruct(a.cloneDeep(r)))==null?void 0:i.compData,isShow:r==null?void 0:r.isShow};return(u=(c=Object.keys(r))==null?void 0:c.filter(f=>f==null?void 0:f.includes("name")))==null||u.forEach(f=>{var h;p[f]=(h=ve.tableToStruct(a.cloneDeep(r)))==null?void 0:h[f]}),{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(r==null?void 0:r.parentTableContents)??"",parentPageKey:n==null?void 0:n.parentPath},value:{pageData:p}}}else if((r==null?void 0:r.key)==="extraButton"){if(((d=Object.values(r==null?void 0:r.value))==null?void 0:d.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structureMethod",version:1},value:{pageData:r.value}}}else return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(r==null?void 0:r.parentTableContents)??"",parentPageKey:n==null?void 0:n.parentPath},value:{pageData:r}}})},BM=()=>{Nl==null||Nl(!0),Fa=null,Nl=null},VM=async t=>(Fa||(Fa=_M()),await new Promise(async n=>{Nl=n;const o=await Fa.show(t);n(o)})),PM=async t=>{var m,y,v,b,k,E,C;let n=[],o=[],l=await a.getInsofDataApi({key:{type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((m=l==null?void 0:l.data)==null?void 0:m.code)!==200)return;let r=new WeakMap,s=(v=(y=l==null?void 0:l.data)==null?void 0:y.result)==null?void 0:v.filter(g=>{var S;return((S=g==null?void 0:g.key)==null?void 0:S.pageKey)!=="menu"});(s==null?void 0:s.length)===0||s==null||s.forEach(g=>{r[g.key.pageKey]={id:g==null?void 0:g.id,contents:g==null?void 0:g.value}});const i=new WeakMap;t==null||t.forEach(g=>{r[g.name]&&(i[g.name]=r[g.name])});let c=[],u=[];if(((b=Object.keys(i))==null?void 0:b.length)>0){od.setImportLoading(!1);const g=await VM(i);for(let S in g)g[S]==="保留"?c.push(S):u.push(S);od.setImportLoading(!0)}let d=a.cloneDeep(t);if((u==null?void 0:u.length)>0){let g=[];const S=u==null?void 0:u.map(async w=>{var V,_,P,T;const N=await a.getInsofDataApi({key:{pageKey:w,systemKey:sessionStorage.getItem("systemKey")}});((_=(V=N==null?void 0:N.data)==null?void 0:V.result)==null?void 0:_.length)>0&&((T=(P=N==null?void 0:N.data)==null?void 0:P.result)==null||T.forEach(D=>{g.push(D==null?void 0:D.id)}))});await Promise.all(S),await a.batchDeleteInsofDataApi({ids:g})}(c==null?void 0:c.length)>0&&(d=(k=a.cloneDeep(d))==null?void 0:k.filter(g=>!c.includes(g==null?void 0:g.name)));let p=[];d==null||d.map(async g=>{var S;await((S=g.compData)==null?void 0:S.forEach(async w=>{var V;const N=(V=a.cloneDeep(w==null?void 0:w.contents))==null?void 0:V.map(_=>{if(!Array.isArray(_)){const P=ld(a.cloneDeep(_),g);return P==null?void 0:P[0]}});N==null||N.forEach(_=>{p.push(_)})}))}),(p==null?void 0:p.length)>0&&await a.batchAddInsofDataApi({dataList:p});let f=new WeakMap;(C=(E=(await a.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:"data,structure,structureMethod"})).data.result)==null?void 0:E.filter(g=>{var S,w;return((S=g==null?void 0:g.key)==null?void 0:S.pageKey)!=="menu"&&((w=g==null?void 0:g.key)==null?void 0:w.pageKey)!=="secret"}))==null||C.forEach(g=>{f[g.key.pageKey]?f[g.key.pageKey]=[...f[g.key.pageKey],g]:f[g.key.pageKey]=[g]}),await(d==null?void 0:d.map(async g=>{var S;await((S=g.compData)==null?void 0:S.forEach(async w=>{var V,_,P;const N=(V=a.cloneDeep(w==null?void 0:w.contents))==null?void 0:V.map(T=>{if(!Array.isArray(T)){const D=ld(a.cloneDeep(T),g);return D==null?void 0:D[0]}});o.push({parentKey:ve.getParentKey((_=a.cloneDeep(g))==null?void 0:_.name),content:N}),(P=w.contents)==null||P.map(async T=>{var D;Array.isArray(T)||(D=ve.tableEveryContents(a.cloneDeep(T)))==null||D.forEach(async z=>{var q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y,$,te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee;if(T.comp==="Table"){let fe={comp:(q=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:q.comp,compData:(Z=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:Z.compData,isShow:z==null?void 0:z.isShow};(M=(O=Object.keys(z))==null?void 0:O.filter(ue=>ue==null?void 0:ue.includes("name")))==null||M.forEach(ue=>{var ge;fe[ue]=(ge=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:ge[ue]});let we=[];fe!=null&&fe.name1?we=(x=f==null?void 0:f[g.name])==null?void 0:x.filter(ue=>{var ge,Ve,Me,xe,ze,pe,De;return((ge=ue==null?void 0:ue.key)==null?void 0:ge.type)==="structure"&&((Me=(Ve=ue==null?void 0:ue.value)==null?void 0:Ve.pageData)==null?void 0:Me.name)===(fe==null?void 0:fe.name)&&((ze=(xe=ue==null?void 0:ue.value)==null?void 0:xe.pageData)==null?void 0:ze.name0)===(fe==null?void 0:fe.name0)&&((De=(pe=ue==null?void 0:ue.value)==null?void 0:pe.pageData)==null?void 0:De.name1)===(fe==null?void 0:fe.name1)}):fe!=null&&fe.name0?we=(A=f==null?void 0:f[g.name])==null?void 0:A.filter(ue=>{var ge,Ve,Me,xe,ze;return((ge=ue==null?void 0:ue.key)==null?void 0:ge.type)==="structure"&&((Me=(Ve=ue==null?void 0:ue.value)==null?void 0:Ve.pageData)==null?void 0:Me.name)===(fe==null?void 0:fe.name)&&((ze=(xe=ue==null?void 0:ue.value)==null?void 0:xe.pageData)==null?void 0:ze.name0)===(fe==null?void 0:fe.name0)}):we=(R=f==null?void 0:f[g.name])==null?void 0:R.filter(ue=>{var ge,Ve,Me;return((ge=ue==null?void 0:ue.key)==null?void 0:ge.type)==="structure"&&((Me=(Ve=ue==null?void 0:ue.value)==null?void 0:Ve.pageData)==null?void 0:Me.name)===(fe==null?void 0:fe.name)});const ie=(F=we==null?void 0:we[0])==null?void 0:F.id;let Ce=[];if(((J=(H=(K=fe==null?void 0:fe.compData)==null?void 0:K.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:H.contents)==null?void 0:J.length)>2&&((ae=(oe=(U=fe==null?void 0:fe.compData)==null?void 0:U.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:oe.contents)!=null&&ae.find(ue=>ue==null?void 0:ue.columnPath))){let ue=(B=(X=(Q=fe==null?void 0:fe.compData)==null?void 0:Q.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:X.contents)==null?void 0:B.find(be=>be==null?void 0:be.columnPath),ge=(Y=(j=(I=ue==null?void 0:ue.columnPath)==null?void 0:I.replace("[",st))==null?void 0:j.split(st))==null?void 0:Y[0],Ve=(le=(te=($=ue==null?void 0:ue.columnPath)==null?void 0:$.replace("[",st))==null?void 0:te.split(st))==null?void 0:le[1],Me=(W=(G=Ve==null?void 0:Ve.replace("[",st))==null?void 0:G.split(st))==null?void 0:W[0],xe=(ce=(re=Ve==null?void 0:Ve.replace("[",st))==null?void 0:re.split(st))==null?void 0:ce[1];xe=(Ie=(Te=(Ne=(Se=(ne=xe==null?void 0:xe.replace("]",st))==null?void 0:ne.split(st))==null?void 0:Se[0])==null?void 0:Ne.replaceAll("'",""))==null?void 0:Te.split(","))==null?void 0:Ie.map(be=>({label:be,prop:be}));let ze="";(Me==null?void 0:Me[(Me==null?void 0:Me.length)-1])===":"&&(Me=Me==null?void 0:Me.slice(0,(Me==null?void 0:Me.length)-1)),ze=(Ee=(ye=Me==null?void 0:Me.split(":"))==null?void 0:ye[((Le=Me==null?void 0:Me.split(":"))==null?void 0:Le.length)-1])==null?void 0:Ee.replaceAll("'","");let pe=($e=(Oe=f==null?void 0:f[ge])==null?void 0:Oe.find(be=>{var Be,Ue;return((Ue=(Be=be==null?void 0:be.value)==null?void 0:Be.pageData)==null?void 0:Ue.name)===ze}))==null?void 0:$e.id;const De=(de=ve.tableToContents(a.cloneDeep(z)))==null?void 0:de.map(be=>{var Ue,We,rt,it;let Be=(rt=(We=(Ue=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:Ue.compData)==null?void 0:We.find(Ze=>(Ze==null?void 0:Ze.key)==="header"))==null?void 0:rt.contents;if((Be==null?void 0:Be.findIndex(Ze=>Ze==null?void 0:Ze.columnPath))===0)Be=[...xe,...Be];else{let Ze=Be==null?void 0:Be.findIndex(dt=>dt==null?void 0:dt.columnPath),qe=Be.slice(Ze-1,(Be==null?void 0:Be.length)-1)??[];Be=[...Be.slice(0,Ze-1),...xe],Be=[...Be,...qe]}if((be==null?void 0:be.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:g.name,type:"data",tableId:ie,parentId:pe},value:{tableData:ve.getValueToObjectValue(be,(it=ve.getColumnContents(Be))==null?void 0:it.filter(Ze=>Ze&&Ze!=="操作"))}}});Ce=[...Ce,...De]}else{const ue=(ke=ve.tableToContents(a.cloneDeep(z)))==null?void 0:ke.map(ge=>{var Ve,Me,xe,ze;if((ge==null?void 0:ge.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:g.name,type:"data",tableId:ie},value:{tableData:ve.getValueToObjectValue(ge,(ze=ve.getColumnContents((xe=(Me=(Ve=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:Ve.compData)==null?void 0:Me.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:xe.contents))==null?void 0:ze.filter(pe=>pe!=="操作"))}}});Ce=[...Ce,...ue]}if((Ce==null?void 0:Ce.length)>0){const ue=await a.batchAddInsofDataApi({dataList:Ce});n.push(ue)}const se=await((ee=ve.tableToContents(a.cloneDeep(z)))==null?void 0:ee.map(async ue=>{var xe,ze,pe,De,be;let ge;(ue==null?void 0:ue.length)!==0&&(ge=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:g.name,type:"data",tableId:ie},value:{tableData:ve.getValueToObjectValue(ue,(De=ve.getColumnContents((pe=(ze=(xe=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:xe.compData)==null?void 0:ze.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:pe.contents))==null?void 0:De.filter(Be=>Be!=="操作"))}}));const Ve=(be=f==null?void 0:f[g.name])==null?void 0:be.filter(Be=>{var Ue,We;return((Ue=Be==null?void 0:Be.key)==null?void 0:Ue.tableId)===ie&&((We=Be==null?void 0:Be.key)==null?void 0:We.type)==="structure"});return await(Ve==null?void 0:Ve.map(async Be=>{var We,rt,it;return await a.updateInsofDataApi({id:Be.id,key:{systemKey:Be.key.systemKey,pageKey:Be.key.pageKey,type:Be.key.type,version:Be.key.version,parentTable:Be.key.parentTable===""?"":(it=(rt=(We=ge==null?void 0:ge.data)==null?void 0:We.result)==null?void 0:rt[0])==null?void 0:it.id}})}))}));n.push(se)}})})}))})),await Promise.all(n),await ve.getParentConstruct(o)},rh=(t,n,o="")=>{var c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V,_;let l=(u=(c=t==null?void 0:t.replace("[",st))==null?void 0:c.split(st))==null?void 0:u[0],r=o,s=(m=(h=(f=(p=(d=t==null?void 0:t.replace("[",st))==null?void 0:d.split(st))==null?void 0:p[1])==null?void 0:f.replace("[",st))==null?void 0:h.split(st))==null?void 0:m[0];s=(v=s==null?void 0:s.split(":")[((y=s==null?void 0:s.split(":"))==null?void 0:y.length)-2])==null?void 0:v.replaceAll("'",""),((b=t==null?void 0:t.split("("))==null?void 0:b.length)>1&&(r=r===""?r+((k=t==null?void 0:t.split("("))==null?void 0:k[1]):r+","+((E=t==null?void 0:t.split("("))==null?void 0:E[1]));let i=(V=(N=(w=(S=(g=(C=n==null?void 0:n[l])==null?void 0:C.find(P=>{var T,D;return((D=(T=P==null?void 0:P.value)==null?void 0:T.pageData)==null?void 0:D.name)===s}))==null?void 0:g.value)==null?void 0:S.pageData)==null?void 0:w.compData)==null?void 0:N.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:V.contents;if(i!=null&&i.find(P=>P==null?void 0:P.columnPath)){let P=rh((_=i==null?void 0:i.find(T=>T==null?void 0:T.columnPath))==null?void 0:_.columnPath,n,r);return{pageKey:P==null?void 0:P.pageKey,filter:P==null?void 0:P.filter}}else return{pageKey:l,filter:r}},DM=async t=>{var s,i;let n=[],o=new WeakMap;(i=(s=(await a.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:"data,structure,structureMethod"})).data.result)==null?void 0:s.filter(c=>{var u,d;return((u=c==null?void 0:c.key)==null?void 0:u.pageKey)!=="menu"&&((d=c==null?void 0:c.key)==null?void 0:d.pageKey)!=="secret"}))==null||i.forEach(c=>{o[c.key.pageKey]?o[c.key.pageKey]=[...o[c.key.pageKey],c]:o[c.key.pageKey]=[c]});let r=a.cloneDeep(t);r==null||r.map(async c=>{var u;await((u=c.compData)==null?void 0:u.forEach(async d=>{var p;(p=d.contents)==null||p.map(async f=>{var h;Array.isArray(f)||(h=ve.tableEveryContents(a.cloneDeep(f)))==null||h.forEach(async m=>{var y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y;if(f.comp==="Table"){let $={comp:(y=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:y.comp,compData:(v=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:v.compData,isShow:m==null?void 0:m.isShow};(k=(b=Object.keys(m))==null?void 0:b.filter(W=>W==null?void 0:W.includes("name")))==null||k.forEach(W=>{var re;$[W]=(re=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:re[W]});const te=(E=o==null?void 0:o[c.name])==null?void 0:E.filter(W=>{var re,ce,ne;return((re=W==null?void 0:W.key)==null?void 0:re.type)==="structure"&&((ne=(ce=W==null?void 0:W.value)==null?void 0:ce.pageData)==null?void 0:ne.name)===($==null?void 0:$.name)}),le=(C=te==null?void 0:te[0])==null?void 0:C.id;let G=[];if(((w=(S=(g=$==null?void 0:$.compData)==null?void 0:g.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:S.contents)==null?void 0:w.length)>2&&((_=(V=(N=$==null?void 0:$.compData)==null?void 0:N.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:V.contents)!=null&&_.find(W=>W==null?void 0:W.columnPath))){let W=(D=(T=(P=$==null?void 0:$.compData)==null?void 0:P.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:T.contents)==null?void 0:D.find(de=>de==null?void 0:de.columnPath),re=rh(W==null?void 0:W.columnPath,o),ce=re==null?void 0:re.pageKey,ne=(z=re==null?void 0:re.filter)==null?void 0:z.replaceAll(")",""),Se=(O=(Z=(q=W==null?void 0:W.columnPath)==null?void 0:q.replace("[",st))==null?void 0:Z.split(st))==null?void 0:O[1],Ne=(x=(M=Se==null?void 0:Se.replace("[",st))==null?void 0:M.split(st))==null?void 0:x[0],Te=(R=(A=Se==null?void 0:Se.replace("[",st))==null?void 0:A.split(st))==null?void 0:R[1];Te=(U=(J=(H=(K=(F=Te==null?void 0:Te.replace("]",st))==null?void 0:F.split(st))==null?void 0:K[0])==null?void 0:H.replaceAll("'",""))==null?void 0:J.split(","))==null?void 0:U.map(de=>({label:de,prop:de}));let Ie="";(Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])===":"&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ie=(Q=(ae=Ne==null?void 0:Ne.split(":"))==null?void 0:ae[((oe=Ne==null?void 0:Ne.split(":"))==null?void 0:oe.length)-1])==null?void 0:Q.replaceAll("'","");let Le=(B=(X=o==null?void 0:o[ce])==null?void 0:X.find(de=>{var ke,ee;return((ee=(ke=de==null?void 0:de.value)==null?void 0:ke.pageData)==null?void 0:ee.name)===Ie}))==null?void 0:B.id,ye=(I=o==null?void 0:o[ce])==null?void 0:I.filter(de=>{var ke;return((ke=de==null?void 0:de.key)==null?void 0:ke.tableId)===Le}),Ee=ye,Oe=(j=o==null?void 0:o[c.name])==null?void 0:j.filter(de=>{var ke;return((ke=de==null?void 0:de.key)==null?void 0:ke.tableId)===le}),$e=await((Y=ve.tableToContents(a.cloneDeep(m)))==null?void 0:Y.map(async de=>{var ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De,be,Be,Ue,We,rt,it,Ze,qe,dt,ct,St,$t,Mt,xt,At,kt,me,Pe,Ke,Ye,Je,lt,nt,mt,gt;if((de==null?void 0:de.length)!==0){let Qe=(fe=(ee=(ke=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:ke.compData)==null?void 0:ee.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:fe.contents;if((Qe==null?void 0:Qe.findIndex(He=>He==null?void 0:He.columnPath))===0)Qe=[...Te,...Qe];else{let He=Qe==null?void 0:Qe.findIndex(ut=>ut==null?void 0:ut.columnPath),ot=Qe.slice(He-1,(Qe==null?void 0:Qe.length)-1)??[];Qe=[...Qe.slice(0,He-1),...Te],Qe=[...Qe,...ot]}let he=ve.getValueToObjectValue(de,(we=ve.getColumnContents(Qe))==null?void 0:we.filter(He=>He!=="操作")),_e=(ue=(se=(Ce=(ie=m==null?void 0:m.compData)==null?void 0:ie.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:Ce.contents)==null?void 0:se.find(He=>He==null?void 0:He.columnPath))==null?void 0:ue.columnPath,Ae=(ge=Oe==null?void 0:Oe.find(He=>{var ot;return ve.sameKeys(he,(ot=He==null?void 0:He.value)==null?void 0:ot.tableData)}))==null?void 0:ge.id;_e=(De=(pe=(ze=(xe=(Me=_e==null?void 0:_e.split("["))==null?void 0:Me[((Ve=_e==null?void 0:_e.split("["))==null?void 0:Ve.length)-1])==null?void 0:xe.split("]"))==null?void 0:ze[0])==null?void 0:pe.replaceAll("'",""))==null?void 0:De.split(",");let Re=(be=ye==null?void 0:ye.find(He=>{var ot;return ve.sameKeys(he,(ot=He==null?void 0:He.value)==null?void 0:ot.tableData,_e)}))==null?void 0:be.id,et=(Be=Ee==null?void 0:Ee.find(He=>{var ot;return ve.sameKeys(he,(ot=He==null?void 0:He.value)==null?void 0:ot.tableData,_e)}))==null?void 0:Be.id;if(!Re&&!et){let He=(ct=(dt=(qe=(Ze=(it=(Ue=W==null?void 0:W.columnPath)==null?void 0:Ue.split("["))==null?void 0:it[((rt=(We=W==null?void 0:W.columnPath)==null?void 0:We.split("["))==null?void 0:rt.length)-1])==null?void 0:Ze.split("]"))==null?void 0:qe[0])==null?void 0:dt.replaceAll("'",""))==null?void 0:ct.split(","),ot=(xt=(Mt=($t=(St=ne==null?void 0:ne.split(","))==null?void 0:St.filter(Nt=>Nt==null?void 0:Nt.includes("@Condition")))==null?void 0:$t[0])==null?void 0:Mt.split("&&"))==null?void 0:xt[0],ut=(kt=(At=ot==null?void 0:ot.split(":"))==null?void 0:At[1])==null?void 0:kt.replaceAll("'",""),jt={};for(let Nt in he)He!=null&&He.find(an=>an===Nt)&&(jt[Nt]=he==null?void 0:he[Nt]);jt[(me=ut==null?void 0:ut.split("="))==null?void 0:me[0]]=(Pe=ut==null?void 0:ut.split("="))==null?void 0:Pe[1];let hn={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ce,type:"data",tableId:(Ye=(Ke=ye==null?void 0:ye[0])==null?void 0:Ke.key)==null?void 0:Ye.tableId,createUserId:(lt=(Je=ye==null?void 0:ye[0])==null?void 0:Je.key)==null?void 0:lt.createUserId,createUserLayer:(mt=(nt=ye==null?void 0:ye[0])==null?void 0:nt.key)==null?void 0:mt.createUserLayer},value:{tableData:jt}},Wt=await a.createInsofDataApi(hn);Re=(gt=Wt==null?void 0:Wt.data)==null?void 0:gt.result}if(ye=ye==null?void 0:ye.filter(He=>(He==null?void 0:He.id)!==Re),Re&&Ae)return{id:Ae,key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:c.name,type:"data",tableId:le,parentId:Re}}}}));$e=await Promise.all($e),$e=$e==null?void 0:$e.filter(de=>de),$e&&(G=[...G,...$e])}if((G==null?void 0:G.length)>0){const W=await a.batchUpdateInsofDataApi({dataList:G});n.push(W)}}})})}))}),await Promise.all(n)},Cl=t=>{var l;let n="",o=[];return(l=a.cloneDeep(t).split("/"))==null||l.forEach((r,s)=>{s!==a.cloneDeep(t).split("/").length-1&&o.push(r)}),o==null||o.forEach(r=>{n=n===""?n+r:n+"/"+r}),n},ad=(t,n)=>{var r;let o=(r=t==null?void 0:t.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:r.map(s=>s==null?void 0:s.label);return n==null?void 0:n.map(s=>ve.getValueToObjectValue(s,o))},rd=(t,n)=>{var o,l,r,s,i,c,u,d;return((l=(o=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:o.contents)==null?void 0:l.length)===0?ad((i=(s=(r=n==null?void 0:n.value)==null?void 0:r.compData)==null?void 0:s.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:i.contents,(c=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:c.contents):ad((u=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:u.contents,(d=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:d.contents)},sd=(t,n)=>{var l;let o=a.cloneDeep(t);return o.compData=(l=a.cloneDeep(o.compData))==null?void 0:l.map(r=>((r==null?void 0:r.key)==="formContent"&&(r.contents=n==null?void 0:n.map(s=>{var i,c;return s.value=((c=(i=r.contents)==null?void 0:i.find(u=>u.key===s.key))==null?void 0:c.value)??"",s})),r)),o},IM=async t=>{var i,c,u;let n=(i=a.cloneDeep(t))==null?void 0:i.map(d=>d==null?void 0:d.path);const o=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});if(o.data.code!==200)return;let l=new WeakMap;(c=o.data.result)==null||c.forEach(d=>{var f,h,m,y;let p=[{key:d==null?void 0:d.id,name:((h=(f=d==null?void 0:d.value)==null?void 0:f.pageData)==null?void 0:h.name)??"",value:(m=d==null?void 0:d.value)==null?void 0:m.pageData}];l[d.key.pageKey]=((y=l[d.key.pageKey])==null?void 0:y.length)>0?[...l[d.key.pageKey],...p]:p});let r=new WeakMap;n==null||n.forEach(d=>{l[d]&&(r[d]=l[d])});let s=a.cloneDeep(t);s=(u=a.cloneDeep(s))==null?void 0:u.map(d=>{var f,h,m,y;let p=(f=a.cloneDeep(d))==null?void 0:f.key;return p.tableId=(m=(h=r[d==null?void 0:d.path])==null?void 0:h.find(v=>{var b;return(v==null?void 0:v.name)===((b=a.cloneDeep(d))==null?void 0:b.name)}))==null?void 0:m.key,d={key:p,value:(y=a.cloneDeep(d))==null?void 0:y.value},d}),s.length!==0&&await a.batchAddInsofDataApi({dataList:s})},ha=(t,n)=>{var o,l,r,s,i,c,u,d,p,f,h,m,y,v,b;if(((l=(o=a.cloneDeep(t))==null?void 0:o.filter(k=>{var E;return(k==null?void 0:k.name)===((E=a.cloneDeep(n))==null?void 0:E.name)}))==null?void 0:l.length)===1)return{contents:(u=(c=(i=(s=(r=a.cloneDeep(t))==null?void 0:r.find(k=>{var E;return(k==null?void 0:k.name)===((E=a.cloneDeep(n))==null?void 0:E.name)}))==null?void 0:s.value)==null?void 0:i.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:u.contents,key:(p=(d=a.cloneDeep(t))==null?void 0:d.find(k=>{var E;return(k==null?void 0:k.name)===((E=a.cloneDeep(n))==null?void 0:E.name)}))==null?void 0:p.key};{let k,E,C=(y=(m=(h=(f=a.cloneDeep(n))==null?void 0:f.compData)==null?void 0:h.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:m.contents)==null?void 0:y.map(g=>g==null?void 0:g.key);return(b=(v=a.cloneDeep(t))==null?void 0:v.filter(g=>{var S;return(g==null?void 0:g.name)===((S=a.cloneDeep(n))==null?void 0:S.name)}))==null||b.forEach(g=>{var w,N,V,_,P,T,D,z;let S=(P=(_=(V=(N=(w=a.cloneDeep(g))==null?void 0:w.value)==null?void 0:N.compData)==null?void 0:V.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:_.contents)==null?void 0:P.map(q=>q==null?void 0:q.key);S&&C.every(q=>S.includes(q))&&(k=(z=(D=(T=g==null?void 0:g.value)==null?void 0:T.compData)==null?void 0:D.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:z.contents,E=g==null?void 0:g.key)}),{contents:k,key:E}}},OM=async t=>{var u,d,p;let n=[];(u=a.cloneDeep(t))==null||u.forEach(f=>{n.push(f.name);let h=Cl(a.cloneDeep(f.name));h!==""&&n.push(h)}),n=[...new Set(n)];const o=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});if(o.data.code!==200)return;let l=new WeakMap;(d=o.data.result)==null||d.forEach(f=>{var m,y,v,b;let h=[{key:f==null?void 0:f.id,name:((y=(m=f==null?void 0:f.value)==null?void 0:m.pageData)==null?void 0:y.name)??"",value:(v=f==null?void 0:f.value)==null?void 0:v.pageData}];l[f.key.pageKey]=((b=l[f.key.pageKey])==null?void 0:b.length)>0?[...l[f.key.pageKey],...h]:h});let r=new WeakMap;for(let f in l)n!=null&&n.find(h=>h===f)&&(r[f]=l[f]);let s=[],i=[],c=[];(p=a.cloneDeep(t))==null||p.forEach(f=>{var h,m;r!=null&&r[f.name]?(h=f==null?void 0:f.compData)==null||h.forEach(y=>{var v;(v=y==null?void 0:y.contents)==null||v.forEach(b=>{var k,E,C,g,S,w,N;if((b==null?void 0:b.comp)==="Table"){let V=rd((k=a.cloneDeep(b))==null?void 0:k.compData,(E=a.cloneDeep(r==null?void 0:r[f.name]))==null?void 0:E.find(_=>(_==null?void 0:_.name)===(b==null?void 0:b.name)));V==null||V.forEach(_=>{var P,T;i.push({key:{type:"data",pageKey:f==null?void 0:f.name,tableId:(T=(P=r==null?void 0:r[f.name])==null?void 0:P.find(D=>(D==null?void 0:D.name)===(b==null?void 0:b.name)))==null?void 0:T.key,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_}})})}else if((g=ha((C=a.cloneDeep(r))==null?void 0:C[f.name],a.cloneDeep(b)))!=null&&g.contents){let V=sd(a.cloneDeep(b),(S=ha(r==null?void 0:r[f.name],a.cloneDeep(b)))==null?void 0:S.contents);s!=null&&s.find(_=>{var P,T;return(_==null?void 0:_.id)===((T=ha((P=a.cloneDeep(r))==null?void 0:P[f.name],a.cloneDeep(b)))==null?void 0:T.key)})||s.push({id:(N=ha((w=a.cloneDeep(r))==null?void 0:w[f.name],a.cloneDeep(b)))==null?void 0:N.key,value:{pageData:V}})}})}):r!=null&&r[Cl(f.name)]&&((m=f==null?void 0:f.compData)==null||m.forEach(y=>{var v;(v=y==null?void 0:y.contents)==null||v.forEach(b=>{var k,E,C,g,S,w,N,V,_;if((b==null?void 0:b.comp)==="Table"){let P=(E=(k=r==null?void 0:r[Cl(f.name)])==null?void 0:k.find(D=>(D==null?void 0:D.name)===(b==null?void 0:b.name)))==null?void 0:E.value;i.push({key:{type:"structure",pageKey:f==null?void 0:f.name,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),version:1},value:{pageData:P}});let T=rd((C=a.cloneDeep(b))==null?void 0:C.compData,(g=a.cloneDeep(r==null?void 0:r[Cl(f.name)]))==null?void 0:g.find(D=>(D==null?void 0:D.name)===(b==null?void 0:b.name)));T==null||T.forEach(D=>{c.push({name:b.name,path:f.name,key:{type:"data",pageKey:f==null?void 0:f.name,tableId:"",systemKey:sessionStorage.getItem("systemKey")},value:{tableData:D}})})}else{let P=sd(a.cloneDeep(b),(_=(V=(N=(w=(S=a.cloneDeep(r==null?void 0:r[Cl(f.name)]))==null?void 0:S.find(T=>(T==null?void 0:T.name)===(b==null?void 0:b.name)))==null?void 0:w.value)==null?void 0:N.compData)==null?void 0:V.find(T=>(T==null?void 0:T.key)==="formContent"))==null?void 0:_.contents);i.push({key:{type:"structure",pageKey:f==null?void 0:f.name,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),version:1},value:{pageData:P}})}})}))}),i.length!==0&&(await a.batchAddInsofDataApi({dataList:i}),c.length!==0&&await IM(c),s.length!==0&&await a.batchUpdateInsofDataApi({dataList:s}))},sh=L.useMenuState(),Us=t=>t==null?void 0:t.map(n=>(n.contents&&(n.contents=n.contents.filter(o=>{var l;return((l=o.comp)==null?void 0:l.toUpperCase())!=="CALCULATOR"})),n.compData&&(n.compData=Us(n.compData)),n)),$M=async t=>{var o,l,r,s,i,c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V;const n=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if((t==null?void 0:t.length)===0){if(((o=n==null?void 0:n.data)==null?void 0:o.code)===200&&(s=(r=(l=n==null?void 0:n.data)==null?void 0:l.result)==null?void 0:r[0])!=null&&s.id){const _=(c=(i=n==null?void 0:n.data)==null?void 0:i.result)==null?void 0:c[0],P=(p=(d=(u=n==null?void 0:n.data)==null?void 0:u.result)==null?void 0:d[0])==null?void 0:p.key;P.systemType="管理系统",await a.updateInsofDataApi({id:_==null?void 0:_.id,key:P})}return}try{if(((f=n==null?void 0:n.data)==null?void 0:f.code)===200&&(y=(m=(h=n==null?void 0:n.data)==null?void 0:h.result)==null?void 0:m[0])!=null&&y.id){const _=(b=(v=n==null?void 0:n.data)==null?void 0:v.result)==null?void 0:b[0],P=(C=(E=(k=n==null?void 0:n.data)==null?void 0:k.result)==null?void 0:E[0])==null?void 0:C.key,T=(g=a.cloneDeep(t))==null?void 0:g.map(D=>{var z;return(z=D.compData)==null?void 0:z[0]});P.systemType=(w=(S=T==null?void 0:T.find(D=>(D==null?void 0:D.key)==="type"))==null?void 0:S.contents)==null?void 0:w[0],P.name=(V=(N=T==null?void 0:T.find(D=>(D==null?void 0:D.key)==="name"))==null?void 0:N.contents)==null?void 0:V[0],await a.updateInsofDataApi({id:_==null?void 0:_.id,key:P})}}catch(_){return Promise.reject(_)}},id=async t=>{var n,o,l,r;try{const s=await a.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"},value:{pageData:t}});if(((n=s==null?void 0:s.data)==null?void 0:n.code)===200){const i=(l=(o=t==null?void 0:t.compData)==null?void 0:o[0])==null?void 0:l.contents;sh.setRawMenus(i??[])}return(r=s==null?void 0:s.data)==null?void 0:r.code}catch(s){return Promise.reject(s)}},MM=async()=>{var t,n,o,l,r,s,i,c;try{const u=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"}});return((t=u==null?void 0:u.data)==null?void 0:t.code)===200&&((l=(o=(n=u==null?void 0:u.data)==null?void 0:n.result)==null?void 0:o[0])!=null&&l.id)&&await a.deleteInsofDataApi({id:(i=(s=(r=u==null?void 0:u.data)==null?void 0:r.result)==null?void 0:s[0])==null?void 0:i.id}),(c=u==null?void 0:u.data)==null?void 0:c.code}catch(u){return Promise.reject(u)}},ih=async(t,n)=>{var o,l,r,s;try{const i=await a.updateInsofDataApi({id:t,value:{pageData:n}});if(((o=i==null?void 0:i.data)==null?void 0:o.code)===200){const c=(r=(l=n==null?void 0:n.compData)==null?void 0:l[0])==null?void 0:r.contents;sh.setRawMenus(c??[])}return(s=i==null?void 0:i.data)==null?void 0:s.code}catch(i){return Promise.reject(i)}},xM=async()=>{var t;try{const n=L.generateKeyPair(),o=await a.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"},value:{cryptoInfo:{publicKey:n.publicKey,privateKey:n.privateKey}}});return((t=o==null?void 0:o.data)==null?void 0:t.code)===200}catch(n){throw n}},AM=async()=>{var n,o,l;const t=await a.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return!(((n=t==null?void 0:t.data)==null?void 0:n.code)===200&&((l=(o=t==null?void 0:t.data)==null?void 0:o.result)==null?void 0:l.length)>0)},zM=async()=>{var n,o,l;const t=await a.getInsofDataApi({key:{type:"system",pageKey:"secret",systemKey:sessionStorage.getItem("systemKey")}});return!(((n=t==null?void 0:t.data)==null?void 0:n.code)===200&&((l=(o=t==null?void 0:t.data)==null?void 0:o.result)==null?void 0:l.length)>0)},RM=async t=>{var o,l;let n=a.cloneDeep(t);if(n=[...n,gh.tempMenuPageData,yh.tempMainMenuPageData],sessionStorage.getItem("systemKey"))if(t!=null&&t.find(r=>(r==null?void 0:r.comp)==="System")){const r=n==null?void 0:n.find(d=>d.comp==="Menu"),s=n==null?void 0:n.filter(d=>d.comp==="System"),i=await AM(),c=await zM();i&&await id(r),await $M(s),c&&xM();const u=(o=Us(a.cloneDeep(n)))==null?void 0:o.filter(d=>{var p,f,h;return((p=d==null?void 0:d.comp)==null?void 0:p.toUpperCase())!=="MENU"&&((f=d==null?void 0:d.comp)==null?void 0:f.toUpperCase())!=="MENUTOP"&&((h=d==null?void 0:d.comp)==null?void 0:h.toUpperCase())!=="SYSTEM"});await PM(u),await DM(u)}else{const r=n==null?void 0:n.find(i=>i.comp==="Menu");await MM(),await id(r);const s=(l=Us(a.cloneDeep(n)))==null?void 0:l.filter(i=>{var c,u,d;return((c=i==null?void 0:i.comp)==null?void 0:c.toUpperCase())!=="MENU"&&((u=i==null?void 0:i.comp)==null?void 0:u.toUpperCase())!=="MENUTOP"&&((d=i==null?void 0:i.comp)==null?void 0:d.toUpperCase())!=="SYSTEM"});await OM(s)}};function LM(t="menu"){return{name:t,components:{ssMenu:no.ssMenu,DynamicIcon:no._sfc_main$1},setup(){const n=e.defineProps({mode:{type:String,default:"vertical"}}),o=e.ref("sub-menu-more"),l=L.useMenuState(),r=L.useModelComp(a.pinia),s=e.ref(0),i=Gs.useRouter(),{rawMenus:c,activeTopMenuPath:u,isRefreshMenus:d,menuTriggerType:p,permissionSideMenus:f,platform:h,cacheInputMenu:m,activeMainMenu:y,linkMenuInfo:v,updateMenuStatus:b}=a.storeToRefs(l),k=a.useLoginState(),{structureData:E}=a.storeToRefs(k),C=e.ref([]),g=e.ref([]),S=e.computed(()=>n==null?void 0:n.mode),w=e.ref({}),N=B=>B==null?void 0:B.map(I=>I.children&&I.children.length>0?{...I,children:I.level===0?[]:I.children??[],childMenus:N(I.children)}:I),V=(B,I)=>{var j,Y;return(Y=(j=g.value)==null?void 0:j.find($=>(B.title+I).includes($.value)))==null?void 0:Y.value},_=["系统管理/角色管理","系统管理/用户管理","系统管理/个人中心"],P=(B,I="",j=0)=>{var le;let Y=a.cloneDeep(B);const $=Array.from(new Set([...(le=E.value)==null?void 0:le.map(G=>{var W;return(W=G==null?void 0:G.key)==null?void 0:W.pageKey})]));return Array.isArray(Y)||(Y=[Y]),Y==null?void 0:Y.map(G=>{let W,re=I?`${I}/${G.title}`:G.title;_!=null&&_.includes(re)?W=I?`/${I}/${G.title}`:G.title:W=re;const ce={...G,path:W,level:j,show:!0,icon:V(G,j),carryData:$==null?void 0:$.includes(re),isPenultimate:!G.children,isRouter:_==null?void 0:_.includes(re),children:[],childMenus:[]};return G.children&&G.children.length>0&&(ce.children=P(G.children,W,j+1)),ce})},T=e.computed(()=>{let B=a.cloneDeep(C.value);if(B=[...B,...f.value],(B==null?void 0:B.length)===0)return i.push("/"),[];const I=J(B,K.value);I.isFlag||(B=I==null?void 0:I.data);const j=N(B);return l.setMenus(j),j}),D=async B=>{var $,te,le;let I,j;(B==null?void 0:B.level)===0?j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),rootNodePath:B==null?void 0:B.path,tableId:""}}:j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:"/平台管理/菜单管理/"+(B==null?void 0:B.path),tableId:""}};const Y=await a.getInsofDataApi(j);return(($=Y==null?void 0:Y.data)==null?void 0:$.code)===200&&(I=(le=(te=Y.data)==null?void 0:te.result)==null?void 0:le.map(G=>{var W;return{id:G==null?void 0:G.id,...(W=G==null?void 0:G.value)==null?void 0:W.tableData}}),(B==null?void 0:B.level)===0&&(w.value=a.cloneDeep(I))),(I==null?void 0:I.length)>0?I:null},z=(B,I)=>{var Y,$;const j=B==null?void 0:B.find(te=>(te==null?void 0:te.operateType)==="新增");return(($=(Y=m.value)==null?void 0:Y.data)==null?void 0:$.path)===(I==null?void 0:I.path)?j==null?void 0:j.menuIcon:V(I,I==null?void 0:I.level)},q=async(B,I)=>{if(!Array.isArray(I))return B;for(const j of I)if((j==null?void 0:j.path)===B.path)return{...B,config:await D(B)};return B},Z=e.ref(null),O=async(B,I=null)=>await Promise.all(B==null?void 0:B.map(async j=>{var te;let Y=await q(j,w.value);const $=(Y==null?void 0:Y.config)??((te=I==null?void 0:I.filter(le=>le.allowInherit))==null?void 0:te.map(le=>{var G;return{...le,structureIds:(G=I==null?void 0:I.find(W=>{var re;return((re=W==null?void 0:W.structureIds)==null?void 0:re.length)>0}))==null?void 0:G.structureIds}}));return Y!=null&&Y.childMenus&&(Y==null?void 0:Y.childMenus.length)>0&&(Y={...Y,icon:z($,j),config:$,children:await O(j==null?void 0:j.childMenus,$),childMenus:await O(j==null?void 0:j.childMenus,$)}),{...Y,icon:z($,j),config:$}})),M=async B=>(Z.value=null,await O(B.childMenus));e.watch(()=>v.value,B=>{var j,Y,$;if(!B)return;const I=(Y=(j=B==null?void 0:B.path)==null?void 0:j.split("/"))==null?void 0:Y[0];if(I){const te=($=C.value)==null?void 0:$.find(le=>(le==null?void 0:le.path)===I);if(!te||(l.setActiveTopMenuPath(I),!(te!=null&&te.children)))return;l.setAsideMenus(te==null?void 0:te.children),l.setActiveMenuPath(B==null?void 0:B.path),r.setRouteToChildPath(B==null?void 0:B.path)}},{immediate:!0});const x=async B=>{var I,j,Y,$;if(l.setLinkMenuInfo(null),l.setAsideMenuLoading(!0),r.setRouteToChildPath(""),l.setActiveTopMenuPath(B==null?void 0:B.path),l.setActiveMainMenu(B),Z.value=null,B!=null&&B.childMenus&&((I=B==null?void 0:B.childMenus)==null?void 0:I.length)>0){const te=await M(B),le=(te==null?void 0:te.length)===0?B==null?void 0:B.childMenus:te;l.setAsideMenus(le);const G=(Y=(j=B==null?void 0:B.childMenus)==null?void 0:j[0])==null?void 0:Y.path;l.setActiveMenuPath(G),l.setActiveAsideMenu(($=B==null?void 0:B.childMenus)==null?void 0:$[0])}else l.setAsideMenus([]);B.isRouter?i.push(B.path):i.push("/"),l.setAsideMenuLoading(!1)},A=B=>{r.setRouteToChildPath(""),p.value==="click"?s.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):B!==o.value&&l.setActiveMenuPath(B):l.setMenuTriggerType("click"),B!=null&&B.startsWith("/")?i.push(B):i.push("/"),s.value++},R=B=>{B!==o.value&&l.setActiveMenuPath(B)},F=B=>{const I=document.documentElement;B==null||B.forEach(j=>{I.style.setProperty(j.name,j.value)})};e.onMounted(()=>{s.value=1,g.value=xn.getSvgIcons()});const K=e.computed(()=>{const B=sessionStorage.getItem("authority");return B?JSON.parse(B):[]});e.watch(()=>h.value,B=>{B==="browser"?(F(bt.browserVerticalMenuClasses),F(bt.browserHorizontalMenuClasses)):B==="client"?(F(bt.clientHorizontalMenuClasses),F(bt.clientVerticalMenuClasses)):B==="three"&&(F(bt.threeHorizontalMenuClasses),F(bt.threeVerticalMenuClasses))},{immediate:!0}),e.watch(()=>c.value,B=>{if(g.value=xn.getSvgIcons(),B){l.setActiveTopMenuPath(""),l.setActiveMenuPath(""),l.setAsideMenus([]);const I=B;C.value=P(a.convertRawToTree(I))}},{immediate:!0});const H=(B,I)=>{function j(Y){Y==null||Y.forEach($=>{var le,G;const te=(le=$==null?void 0:$.path)!=null&&le.startsWith("/")?(G=$==null?void 0:$.path)==null?void 0:G.substring(1):$==null?void 0:$.path;$.show=I==null?void 0:I.some(W=>W==null?void 0:W.includes(te)),$.children&&j($.children)})}return j(B),B},J=(B,I)=>{if(Array.isArray(I)){const j=Array.from(new Set(I==null?void 0:I.map(Y=>Y==null?void 0:Y.substring(0,Y.lastIndexOf("/")))));return{data:H(B,j),isFlag:!1}}else return{isFlag:(I==null?void 0:I.toUpperCase())==="SUPERADMIN"}},U=B=>{var j;const I=[B==null?void 0:B.title];if(B!=null&&B.children&&((j=B==null?void 0:B.children)==null?void 0:j.length)>0){const Y=B.children.map($=>U($));I.push(...Y)}return I},oe=(B,I,j,Y)=>B.map($=>{var te,le;if($.path===j){const G={...$};return Y==="create"?G.children.push(I):Y==="update"?G.children=(te=G.children)==null?void 0:te.map(W=>(W==null?void 0:W.path)===(I==null?void 0:I.path)?I:W):Y==="delete"&&(G.children=(le=G.children)==null?void 0:le.filter(W=>(W==null?void 0:W.path)!==(I==null?void 0:I.path))),G}else return{...$,children:oe($.children,I,j,Y)}}),ae=async B=>{var j,Y,$,te,le,G;const I=(j=E.value)==null?void 0:j.find(W=>{var re;return((re=W==null?void 0:W.key)==null?void 0:re.pageKey)==="menu"});if(I){const W={...(Y=I.value)==null?void 0:Y.pageData,compData:(le=(te=($=I.value)==null?void 0:$.pageData)==null?void 0:te.compData)==null?void 0:le.map(ce=>ce.key==="menuContents"?{...ce,contents:B}:ce)};await ih(I==null?void 0:I.id,W);const re=(G=T.value)==null?void 0:G.find(ce=>(ce==null?void 0:ce.path)===u.value);re&&await x(re),l.setUpdateMenuStatus(!0),l.setAsideMenuLoading(!1),l.setIsRefreshMenus(!1),a.ElMessage.success("响应成功")}else l.setAsideMenuLoading(!1)},Q=async B=>{var Y,$,te,le,G;const I=await a.getInsofDataApi({id:B});let j;return((Y=I==null?void 0:I.data)==null?void 0:Y.code)===200&&(j=(G=(le=(te=($=I==null?void 0:I.data)==null?void 0:$.result)==null?void 0:te[0])==null?void 0:le.value)==null?void 0:G.pageData),j},X=async B=>{var G,W,re;const I=(re=(W=(G=B==null?void 0:B.config)==null?void 0:G.find(ce=>(ce==null?void 0:ce.operateType)==="新增"))==null?void 0:W.structureIds)==null?void 0:re.filter(ce=>(ce==null?void 0:ce.key)==="contentConfig"),j=I==null?void 0:I.map(ce=>ce==null?void 0:ce.id);let Y=[];j==null||j.forEach(ce=>{ce&&Y.push(Q(ce))});const $=await Promise.all(Y),te=$==null?void 0:$.map(ce=>{const{id:ne,...Se}=ce;return Se}),le=te==null?void 0:te.map(ce=>({key:{pageKey:B==null?void 0:B.path,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",version:1,type:"structure"},value:{pageData:ce}}));await a.batchAddInsofDataApi({dataList:le})};return e.watch(()=>d.value,async B=>{var I,j,Y,$,te,le,G,W;if(B)try{const re=(Y=(j=(I=m.value)==null?void 0:I.data)==null?void 0:j.path)==null?void 0:Y.split("/").slice(0,-1).join("/"),ce=oe(C.value,($=m.value)==null?void 0:$.data,re,(te=m.value)==null?void 0:te.type),ne=(le=ce==null?void 0:ce.filter(Te=>Te.path!=="平台管理"))==null?void 0:le.map(Te=>U(Te));await X((G=m.value)==null?void 0:G.data),l.setAsideMenuLoading(!0),await ae(ne);const Se=await M(y.value),Ne=(Se==null?void 0:Se.length)===0?(W=y.value)==null?void 0:W.childMenus:Se;l.setAsideMenus(Ne)}catch(re){throw a.ElMessage.error(re),new Error(re)}},{immediate:!0}),{mode:S,renderMenuList:T,clickMenu:x,openMenu:A,closeMenu:R,changeMenuStyle:F}}}}const FM=e.defineComponent(LM());function ch(t="menu"){return{name:t,components:{SvgIcon:mh.SvgIcon,ssMenu:no.ssMenu,DynamicIcon:no._sfc_main$1,ssDialog:ph.ssDialog,ssInput:xn._sfc_main$2},setup(n,{emit:o}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),r=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=L.useMenuState(),i=L.useModelComp(a.pinia),c=e.ref(0),u=Gs.useRouter(),d=e.ref(),{asideMenus:p,menuTriggerType:f,platform:h}=a.storeToRefs(s),{fixMenuStatus:m}=a.storeToRefs(i),y=e.computed(()=>l==null?void 0:l.mode),v=X=>X==null?void 0:X.map(I=>{var j,Y;return!(I!=null&&I.children)||((j=I==null?void 0:I.children)==null?void 0:j.length)===0?I.config=r.value:I!=null&&I.children&&((Y=I==null?void 0:I.children)==null?void 0:Y.length)>0&&(I.children=v(I.children)),I}),b=e.computed(()=>{let X=[...p.value];if((X==null?void 0:X.length)===0)return u.push("/"),[];const B=N(X,S.value);return B.isFlag||(X=B==null?void 0:B.data),X=X==null?void 0:X.map(I=>{var j,Y;return!(I!=null&&I.children)||((j=I==null?void 0:I.children)==null?void 0:j.length)===0?I.config=r.value:I!=null&&I.children&&((Y=I==null?void 0:I.children)==null?void 0:Y.length)>0&&(I.children=v(I.children)),I}),X}),k=async(X,B)=>{i.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(X==null?void 0:X.path),s.setActiveAsideMenu(X),X.isRouter?u.push(X.path):u.push("/"),o("node-click",X,B)},E=async X=>{const B=a.findNodeByPropInTree(b.value,"path",X);s.setActiveAsideMenu(B),i.setRouteToChildPath(""),m.value?i.setFixMenuStatus(!1):f.value==="click"?c.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(X):(s.setMenuTriggerType("click"),s.setActiveMenuPath(X)),X!=null&&X.startsWith("/")?u.push(X):u.push("/"),c.value++},C=X=>{s.setActiveMenuPath(X)},g=X=>{const B=document.documentElement;X==null||X.forEach(I=>{B.style.setProperty(I.name,I.value)})};e.onMounted(()=>{c.value=1});const S=e.computed(()=>{const X=sessionStorage.getItem("authority");return X?JSON.parse(X):[]});e.watch(()=>h.value,X=>{X==="browser"?g(bt.browserVerticalMenuClasses):X==="client"?(g(bt.clientHorizontalMenuClasses),g(bt.clientVerticalMenuClasses)):X==="three"&&(g(bt.threeHorizontalMenuClasses),g(bt.threeVerticalMenuClasses))},{immediate:!0});const w=(X,B)=>{function I(j){j==null||j.forEach(Y=>{var te,le;const $=(te=Y==null?void 0:Y.path)!=null&&te.startsWith("/")?(le=Y==null?void 0:Y.path)==null?void 0:le.substring(1):Y==null?void 0:Y.path;Y.show=B==null?void 0:B.some(G=>G==null?void 0:G.includes($)),Y.children&&I(Y.children)})}return I(X),X},N=(X,B)=>{if(Array.isArray(B)){const I=Array.from(new Set(B==null?void 0:B.map(j=>j.substring(0,j.lastIndexOf("/")))));return{data:w(X,I),isFlag:!1}}else return{isFlag:(B==null?void 0:B.toUpperCase())==="SUPERADMIN"}},V=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),_=X=>Fe.getComponent(X),P=e.ref({}),T=e.ref([]),D=e.ref({}),z=e.ref({}),q=X=>{switch(X){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Z=e.ref({}),O=X=>{s.setCacheInputMenu({type:V.type,data:X}),s.setIsRefreshMenus(!0)},M=(X,B,I,j,Y=0)=>{let $=X;return $!=null&&$.every(te=>Array.isArray(te))&&($!=null&&$.every(te=>Array.isArray(te)&&te.length===1)?$=$==null?void 0:$.map(te=>((te==null?void 0:te[0])===I&&(te=[j]),te)):$=$==null?void 0:$.map(te=>{if(te!=null&&te.find(le=>le===(B==null?void 0:B[Y]))&&(B==null?void 0:B.length)!==1){let le=a.cloneDeep(B),G=te==null?void 0:te.filter(ne=>ne!==(le==null?void 0:le[Y])),W=Y+1,re=M(G,le,I,j,W),ce=[];ce.push(te==null?void 0:te[0]),re==null||re.forEach(ne=>{ce.push(ne)}),te=ce}return te})),$},x=(X,B,I=0)=>{let j=X;return j!=null&&j.every(Y=>Array.isArray(Y))&&(j!=null&&j.every(Y=>Array.isArray(Y)&&Y.length===1)?j=j==null?void 0:j.filter(Y=>(Y==null?void 0:Y[0])!==(B==null?void 0:B[I])):j=j==null?void 0:j.map(Y=>{if(Y!=null&&Y.find($=>$===(B==null?void 0:B[I]))&&(B==null?void 0:B.length)!==1){let $=a.cloneDeep(B),te=Y==null?void 0:Y.filter(re=>re!==($==null?void 0:$[I])),le=I+1,G=x(te,$,le),W=[];W.push(Y==null?void 0:Y[0]),G==null||G.forEach(re=>{W.push(re)}),Y=W}return Y})),j},A=(X,B,I,j=0)=>{let Y=X;return Y!=null&&Y.every($=>Array.isArray($))&&(Y!=null&&Y.every($=>Array.isArray($)&&$.length===1)?Y.push([I]):Y=Y==null?void 0:Y.map($=>{if($!=null&&$.find(te=>te===(B==null?void 0:B[j]))&&(B==null?void 0:B.length)!==1){let te=a.cloneDeep(B),le=$==null?void 0:$.filter(ce=>ce!==(te==null?void 0:te[j])),G=j+1,W=A(le,te,I,G),re=[];re.push($==null?void 0:$[0]),W==null||W.forEach(ce=>{re.push(ce)}),$=re}return $})),Y},R=async(X,B,I)=>{var j,Y,$,te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se;if(B==="create"){let ue=(I==null?void 0:I.title)+"(1)",ge=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ve=(Y=(j=ge==null?void 0:ge.data)==null?void 0:j.result)==null?void 0:Y[0],Me=($=Ve==null?void 0:Ve.value)==null?void 0:$.pageData;Me.compData=(te=Me.compData)==null?void 0:te.map(ze=>{var pe;return(ze==null?void 0:ze.key)==="menuContents"&&(ze.contents=A(ze.contents,(pe=I==null?void 0:I.path)==null?void 0:pe.split("/"),ue)),ze}),await a.updateInsofDataApi({id:Ve==null?void 0:Ve.id,value:{pageData:Me}});let xe=(G=(le=I==null?void 0:I.path)==null?void 0:le.split("/"))==null?void 0:G.filter((ze,pe)=>{var De,be;return pe!==((be=(De=I==null?void 0:I.path)==null?void 0:De.split("/"))==null?void 0:be.length)-1});xe.push(ue),xe=xe==null?void 0:xe.join("/"),await ve.newLoadingConstruct(I==null?void 0:I.path,xe),s.setUpdateMenuStatus(!1),await Tr.verifyStructureDataToStore(),s.setActiveMenuPath((ce=(re=(W=I==null?void 0:I.path)==null?void 0:W.split("/"))==null?void 0:re.filter((ze,pe)=>{var De,be;return pe!==((be=(De=I==null?void 0:I.path)==null?void 0:De.split("/"))==null?void 0:be.length)-1}))==null?void 0:ce.join("/")),s.setActiveTopMenuPath((Se=(ne=I==null?void 0:I.path)==null?void 0:ne.split("/"))==null?void 0:Se[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(B==="update")d.value=I;else if(B==="delete"){let ue=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:I==null?void 0:I.path}}),ge=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ve=(Te=(Ne=ge==null?void 0:ge.data)==null?void 0:Ne.result)==null?void 0:Te[0],Me=(Ie=Ve==null?void 0:Ve.value)==null?void 0:Ie.pageData;if(Me.compData=(Le=Me.compData)==null?void 0:Le.map(xe=>{var ze;return(xe==null?void 0:xe.key)==="menuContents"&&(xe.contents=x(xe.contents,(ze=I==null?void 0:I.path)==null?void 0:ze.split("/"))),xe}),await a.updateInsofDataApi({id:Ve==null?void 0:Ve.id,value:{pageData:Me}}),((Ee=(ye=ue==null?void 0:ue.data)==null?void 0:ye.result)==null?void 0:Ee.length)>0){let xe=($e=(Oe=ue==null?void 0:ue.data)==null?void 0:Oe.result)==null?void 0:$e.map(ze=>ze==null?void 0:ze.id);(xe==null?void 0:xe.length)>0&&await a.batchDeleteInsofDataApi({ids:xe})}else{let xe=await ve.getItemData((ee=(ke=(de=I==null?void 0:I.path)==null?void 0:de.split("/"))==null?void 0:ke.filter((pe,De)=>{var be,Be;return De!==((Be=(be=I==null?void 0:I.path)==null?void 0:be.split("/"))==null?void 0:Be.length)-1}))==null?void 0:ee.join("/"),sessionStorage.getItem("systemKey"),""),ze=[];xe==null||xe.forEach(pe=>{var be,Be,Ue,We,rt,it,Ze;let De=(We=(Ue=(Be=(be=pe==null?void 0:pe.compData)==null?void 0:be.find(qe=>(qe==null?void 0:qe.key)==="header"))==null?void 0:Be.contents)==null?void 0:Ue[0])==null?void 0:We.prop;(Ze=(it=(rt=pe==null?void 0:pe.compData)==null?void 0:rt.find(qe=>(qe==null?void 0:qe.key)==="tableContents"))==null?void 0:it.contents)==null||Ze.forEach(qe=>{var dt,ct,St;(qe==null?void 0:qe.length)>1?(qe==null?void 0:qe[1])===(I==null?void 0:I.title)&&ze.push((dt=qe==null?void 0:qe[0])==null?void 0:dt.id):((ct=qe==null?void 0:qe[0])==null?void 0:ct[De])===(I==null?void 0:I.title)&&ze.push((St=qe==null?void 0:qe[0])==null?void 0:St.id)})}),(ze==null?void 0:ze.length)>0&&await a.batchDeleteInsofDataApi({ids:ze})}s.setUpdateMenuStatus(!1),await Tr.verifyStructureDataToStore(),s.setActiveMenuPath((ie=(we=(fe=I==null?void 0:I.path)==null?void 0:fe.split("/"))==null?void 0:we.filter((xe,ze)=>{var pe,De;return ze!==((De=(pe=I==null?void 0:I.path)==null?void 0:pe.split("/"))==null?void 0:De.length)-1}))==null?void 0:ie.join("/")),s.setActiveTopMenuPath((se=(Ce=I==null?void 0:I.path)==null?void 0:Ce.split("/"))==null?void 0:se[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},F=async(X,B)=>{var G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e;let I=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),j=(W=(G=I==null?void 0:I.data)==null?void 0:G.result)==null?void 0:W[0],Y=(re=j==null?void 0:j.value)==null?void 0:re.pageData;Y.compData=(ce=Y.compData)==null?void 0:ce.map(de=>{var ke,ee;return(de==null?void 0:de.key)==="menuContents"&&(de.contents=M(de.contents,(ke=B==null?void 0:B.path)==null?void 0:ke.split("/"),B==null?void 0:B.title,(ee=X==null?void 0:X.target)==null?void 0:ee.value)),de}),j!=null&&j.id&&await a.updateInsofDataApi({id:j==null?void 0:j.id,value:{pageData:Y}});let $=(Se=(ne=B==null?void 0:B.path)==null?void 0:ne.split("/"))==null?void 0:Se.filter((de,ke)=>{var ee,fe;return ke!==((fe=(ee=B==null?void 0:B.path)==null?void 0:ee.split("/"))==null?void 0:fe.length)-1});$.push((Ne=X==null?void 0:X.target)==null?void 0:Ne.value),$=$==null?void 0:$.join("/");let te=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:B==null?void 0:B.path}}),le=(Ie=(Te=te==null?void 0:te.data)==null?void 0:Te.result)==null?void 0:Ie.map(de=>({id:de==null?void 0:de.id,key:de==null?void 0:de.key}));le=le==null?void 0:le.map(de=>(de.key.pageKey=$,de)),(le==null?void 0:le.length)>0&&await a.batchUpdateInsofDataApi({dataList:le}),s.setUpdateMenuStatus(!1),await Tr.verifyStructureDataToStore(),s.setActiveMenuPath((Ee=(ye=(Le=B==null?void 0:B.path)==null?void 0:Le.split("/"))==null?void 0:ye.filter((de,ke)=>{var ee,fe;return ke!==((fe=(ee=B==null?void 0:B.path)==null?void 0:ee.split("/"))==null?void 0:fe.length)-1}))==null?void 0:Ee.join("/")),s.setActiveTopMenuPath(($e=(Oe=B==null?void 0:B.path)==null?void 0:Oe.split("/"))==null?void 0:$e[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),d.value=void 0},K=async(X,B)=>{V.type=q(B==null?void 0:B.operateType),await R(B,V.type,X),z.value=X,Z.value=B},H=()=>{V.show=!1},J=X=>X==null?void 0:X.filter(B=>B.allowInherit),U=()=>{var I,j,Y,$,te;let X;V.type==="create"&&(X=((I=z.value)==null?void 0:I.path)+"/"+D.value[(j=D.value)==null?void 0:j.prop]),V.type==="update"&&(X=(Y=z.value)==null?void 0:Y.path);const B={...z.value,config:J(($=z.value)==null?void 0:$.config),children:[],childMenus:[],title:D.value[(te=D.value)==null?void 0:te.prop],path:X};console.log("clickSubmitForm",Z.value,z.value,B),O(B),V.show=!1},oe=X=>{var I,j;const B=(I=X==null?void 0:X.contents)==null?void 0:I.find(Y=>Y.key==="formContent");B&&(D.value=(j=B==null?void 0:B.contents)==null?void 0:j.reduce((Y,$)=>(Y[$.key]=$.value,Y.prop=$.key,Y),{}))},ae=e.ref(!1);return{isCollapse:ae,handleMenuCollapse:()=>{ae.value=!ae.value},handleCompChange:oe,dialogForm:P,dialogRenderComps:T,getComponents:_,clickSubmitForm:U,dialogInfo:V,beforeDialogDestroy:H,clickMenuIcon:K,mode:y,renderMenuList:b,clickMenu:k,openMenu:E,closeMenu:C,changeMenuStyle:g,fixElement:d,onBlur:F}}}}e.defineComponent(ch());const KM=e.defineComponent(ch("ThreeMenu"));function uh(t="menu"){return{name:t,components:{ssMenu:no.ssMenu,DynamicIcon:no._sfc_main$1},setup(){const n=e.defineProps({mode:{type:String,default:"vertical"}}),o=e.ref("sub-menu-more"),l=L.useMenuState(),r=L.useModelComp(a.pinia),s=e.ref(0),i=Gs.useRouter(),{rawMenus:c,activeTopMenuPath:u,isRefreshMenus:d,menuTriggerType:p,permissionSideMenus:f,platform:h,cacheInputMenu:m,activeMainMenu:y,linkMenuInfo:v,updateMenuStatus:b}=a.storeToRefs(l),k=a.useLoginState(),{structureData:E}=a.storeToRefs(k),C=e.ref([]),g=e.ref([]),S=e.computed(()=>n==null?void 0:n.mode),w=e.ref({}),N=B=>B==null?void 0:B.map(I=>I.children&&I.children.length>0?{...I,children:I.level===0?[]:I.children??[],childMenus:N(I.children)}:I),V=(B,I)=>{var j,Y;return(Y=(j=g.value)==null?void 0:j.find($=>(B.title+I).includes($.value)))==null?void 0:Y.value},_=["系统管理/角色管理","系统管理/用户管理","系统管理/个人中心"],P=(B,I="",j=0)=>{var le;let Y=a.cloneDeep(B);const $=Array.from(new Set([...(le=E.value)==null?void 0:le.map(G=>{var W;return(W=G==null?void 0:G.key)==null?void 0:W.pageKey})]));return Array.isArray(Y)||(Y=[Y]),Y==null?void 0:Y.map(G=>{let W,re=I?`${I}/${G.title}`:G.title;_!=null&&_.includes(re)?W=I?`/${I}/${G.title}`:G.title:W=re;const ce={...G,path:W,level:j,show:!0,icon:V(G,j),carryData:$==null?void 0:$.includes(re),isPenultimate:!G.children,isRouter:_==null?void 0:_.includes(re),children:[],childMenus:[]};return G.children&&G.children.length>0&&(ce.children=P(G.children,W,j+1)),ce})},T=e.computed(()=>{let B=a.cloneDeep(C.value);if(B=[...B,...f.value],(B==null?void 0:B.length)===0)return i.push("/"),[];const I=J(B,K.value);I.isFlag||(B=I==null?void 0:I.data);const j=N(B);return l.setMenus(j),j}),D=async B=>{var $,te,le;let I,j;(B==null?void 0:B.level)===0?j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),rootNodePath:B==null?void 0:B.path,tableId:""}}:j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:"/平台管理/菜单管理/"+(B==null?void 0:B.path),tableId:""}};const Y=await a.getInsofDataApi(j);return(($=Y==null?void 0:Y.data)==null?void 0:$.code)===200&&(I=(le=(te=Y.data)==null?void 0:te.result)==null?void 0:le.map(G=>{var W;return{id:G==null?void 0:G.id,...(W=G==null?void 0:G.value)==null?void 0:W.tableData}}),(B==null?void 0:B.level)===0&&(w.value=a.cloneDeep(I))),(I==null?void 0:I.length)>0?I:null},z=(B,I)=>{var Y,$;const j=B==null?void 0:B.find(te=>(te==null?void 0:te.operateType)==="新增");return(($=(Y=m.value)==null?void 0:Y.data)==null?void 0:$.path)===(I==null?void 0:I.path)?j==null?void 0:j.menuIcon:V(I,I==null?void 0:I.level)},q=async(B,I)=>{if(!Array.isArray(I))return B;for(const j of I)if((j==null?void 0:j.path)===B.path)return{...B,config:await D(B)};return B},Z=e.ref(null),O=async(B,I=null)=>await Promise.all(B==null?void 0:B.map(async j=>{var te;let Y=await q(j,w.value);const $=(Y==null?void 0:Y.config)??((te=I==null?void 0:I.filter(le=>le.allowInherit))==null?void 0:te.map(le=>{var G;return{...le,structureIds:(G=I==null?void 0:I.find(W=>{var re;return((re=W==null?void 0:W.structureIds)==null?void 0:re.length)>0}))==null?void 0:G.structureIds}}));return Y!=null&&Y.childMenus&&(Y==null?void 0:Y.childMenus.length)>0&&(Y={...Y,icon:z($,j),config:$,children:await O(j==null?void 0:j.childMenus,$),childMenus:await O(j==null?void 0:j.childMenus,$)}),{...Y,icon:z($,j),config:$}})),M=async B=>(Z.value=null,await O(B.childMenus));e.watch(()=>v.value,B=>{var j,Y,$;if(!B)return;const I=(Y=(j=B==null?void 0:B.path)==null?void 0:j.split("/"))==null?void 0:Y[0];if(I){const te=($=C.value)==null?void 0:$.find(le=>(le==null?void 0:le.path)===I);if(!te||(l.setActiveTopMenuPath(I),!(te!=null&&te.children)))return;l.setAsideMenus(te==null?void 0:te.children),l.setActiveMenuPath(B==null?void 0:B.path),r.setRouteToChildPath(B==null?void 0:B.path)}},{immediate:!0});const x=async B=>{var I,j,Y,$;if(l.setLinkMenuInfo(null),l.setAsideMenuLoading(!0),r.setRouteToChildPath(""),l.setActiveTopMenuPath(B==null?void 0:B.path),l.setActiveMainMenu(B),Z.value=null,B!=null&&B.childMenus&&((I=B==null?void 0:B.childMenus)==null?void 0:I.length)>0){const te=await M(B),le=(te==null?void 0:te.length)===0?B==null?void 0:B.childMenus:te;l.setAsideMenus(le);const G=(Y=(j=B==null?void 0:B.childMenus)==null?void 0:j[0])==null?void 0:Y.path;l.setActiveMenuPath(G),l.setActiveAsideMenu(($=B==null?void 0:B.childMenus)==null?void 0:$[0])}else l.setAsideMenus([]);B.isRouter?i.push(B.path):i.push("/"),l.setAsideMenuLoading(!1)},A=B=>{r.setRouteToChildPath(""),p.value==="click"?s.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):B!==o.value&&l.setActiveMenuPath(B):l.setMenuTriggerType("click"),B!=null&&B.startsWith("/")?i.push(B):i.push("/"),s.value++},R=B=>{B!==o.value&&l.setActiveMenuPath(B)},F=B=>{const I=document.documentElement;B==null||B.forEach(j=>{I.style.setProperty(j.name,j.value)})};e.onMounted(()=>{s.value=1,g.value=xn.getSvgIcons()});const K=e.computed(()=>{const B=sessionStorage.getItem("authority");return B?JSON.parse(B):[]});e.watch(()=>h.value,B=>{B==="browser"?(F(bt.browserVerticalMenuClasses),F(bt.browserHorizontalMenuClasses)):B==="client"?(F(bt.clientHorizontalMenuClasses),F(bt.clientVerticalMenuClasses)):B==="three"&&(F(bt.threeHorizontalMenuClasses),F(bt.threeVerticalMenuClasses))},{immediate:!0}),e.watch(()=>c.value,B=>{if(g.value=xn.getSvgIcons(),B){l.setActiveTopMenuPath(""),l.setActiveMenuPath(""),l.setAsideMenus([]);const I=B;C.value=P(a.convertRawToTree(I))}},{immediate:!0});const H=(B,I)=>{function j(Y){Y==null||Y.forEach($=>{var le,G;const te=(le=$==null?void 0:$.path)!=null&&le.startsWith("/")?(G=$==null?void 0:$.path)==null?void 0:G.substring(1):$==null?void 0:$.path;$.show=I==null?void 0:I.some(W=>W==null?void 0:W.includes(te)),$.children&&j($.children)})}return j(B),B},J=(B,I)=>{if(Array.isArray(I)){const j=Array.from(new Set(I==null?void 0:I.map(Y=>Y==null?void 0:Y.substring(0,Y.lastIndexOf("/")))));return{data:H(B,j),isFlag:!1}}else return{isFlag:(I==null?void 0:I.toUpperCase())==="SUPERADMIN"}},U=B=>{var j;const I=[B==null?void 0:B.title];if(B!=null&&B.children&&((j=B==null?void 0:B.children)==null?void 0:j.length)>0){const Y=B.children.map($=>U($));I.push(...Y)}return I},oe=(B,I,j,Y)=>B.map($=>{var te,le;if($.path===j){const G={...$};return Y==="create"?G.children.push(I):Y==="update"?G.children=(te=G.children)==null?void 0:te.map(W=>(W==null?void 0:W.path)===(I==null?void 0:I.path)?I:W):Y==="delete"&&(G.children=(le=G.children)==null?void 0:le.filter(W=>(W==null?void 0:W.path)!==(I==null?void 0:I.path))),G}else return{...$,children:oe($.children,I,j,Y)}}),ae=async B=>{var j,Y,$,te,le,G;const I=(j=E.value)==null?void 0:j.find(W=>{var re;return((re=W==null?void 0:W.key)==null?void 0:re.pageKey)==="menu"});if(I){const W={...(Y=I.value)==null?void 0:Y.pageData,compData:(le=(te=($=I.value)==null?void 0:$.pageData)==null?void 0:te.compData)==null?void 0:le.map(ce=>ce.key==="menuContents"?{...ce,contents:B}:ce)};await ih(I==null?void 0:I.id,W);const re=(G=T.value)==null?void 0:G.find(ce=>(ce==null?void 0:ce.path)===u.value);re&&await x(re),l.setUpdateMenuStatus(!0),l.setAsideMenuLoading(!1),l.setIsRefreshMenus(!1),a.ElMessage.success("响应成功")}else l.setAsideMenuLoading(!1)},Q=async B=>{var Y,$,te,le,G;const I=await a.getInsofDataApi({id:B});let j;return((Y=I==null?void 0:I.data)==null?void 0:Y.code)===200&&(j=(G=(le=(te=($=I==null?void 0:I.data)==null?void 0:$.result)==null?void 0:te[0])==null?void 0:le.value)==null?void 0:G.pageData),j},X=async B=>{var G,W,re;const I=(re=(W=(G=B==null?void 0:B.config)==null?void 0:G.find(ce=>(ce==null?void 0:ce.operateType)==="新增"))==null?void 0:W.structureIds)==null?void 0:re.filter(ce=>(ce==null?void 0:ce.key)==="contentConfig"),j=I==null?void 0:I.map(ce=>ce==null?void 0:ce.id);let Y=[];j==null||j.forEach(ce=>{ce&&Y.push(Q(ce))});const $=await Promise.all(Y),te=$==null?void 0:$.map(ce=>{const{id:ne,...Se}=ce;return Se}),le=te==null?void 0:te.map(ce=>({key:{pageKey:B==null?void 0:B.path,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",version:1,type:"structure"},value:{pageData:ce}}));await a.batchAddInsofDataApi({dataList:le})};return e.watch(()=>d.value,async B=>{var I,j,Y,$,te,le,G,W;if(B)try{const re=(Y=(j=(I=m.value)==null?void 0:I.data)==null?void 0:j.path)==null?void 0:Y.split("/").slice(0,-1).join("/"),ce=oe(C.value,($=m.value)==null?void 0:$.data,re,(te=m.value)==null?void 0:te.type),ne=(le=ce==null?void 0:ce.filter(Te=>Te.path!=="平台管理"))==null?void 0:le.map(Te=>U(Te));await X((G=m.value)==null?void 0:G.data),l.setAsideMenuLoading(!0),await ae(ne);const Se=await M(y.value),Ne=(Se==null?void 0:Se.length)===0?(W=y.value)==null?void 0:W.childMenus:Se;l.setAsideMenus(Ne)}catch(re){throw a.ElMessage.error(re),new Error(re)}},{immediate:!0}),{mode:S,renderMenuList:T,clickMenu:x,openMenu:A,closeMenu:R,changeMenuStyle:F}}}}e.defineComponent(uh());const HM=e.defineComponent(uh("ThreeMenu")),jM=t=>({comp:"MenuTop",compData:[{key:"menuContents",contents:JSON.parse(t==null?void 0:t.value.trim().replaceAll("'",'"'))}],name:""}),WM=t=>{const n=t==null?void 0:t.filter(l=>{var r;return!((r=l==null?void 0:l.key)!=null&&r.includes("("))}),o=n==null?void 0:n.find(l=>{var r;return ve.IsJson(l.value.replaceAll("'",'"'))&&((r=JSON.parse(l.value.replaceAll("'",'"')))==null?void 0:r.every(s=>typeof s=="string"))});if(o)return jM(o)},UM=t=>{var r;let n=[];const o=t==null?void 0:t.filter(s=>{var i;return!((i=s==null?void 0:s.key)!=null&&i.includes("("))}),l=o==null?void 0:o.find(s=>{var i;return ve.IsJson(s.value.replaceAll("'",'"'))&&!((i=JSON.parse(s.value.replaceAll("'",'"')))!=null&&i.every(c=>typeof c=="string"))});if(l)return(r=JSON.parse(l.value.replaceAll("'",'"')))==null||r.forEach(s=>{var i,c,u,d;((i=Object.keys(s))==null?void 0:i[0])==="类型"?n.push({comp:"System",compData:[{key:"type",contents:[(c=Object.values(s))==null?void 0:c[0]]}]}):((u=Object.keys(s))==null?void 0:u[0])==="名称"&&n.push({comp:"System",compData:[{key:"name",contents:[(d=Object.values(s))==null?void 0:d[0]]}]})}),n};e.ref(0);const qM=t=>{const n=[];let o=[];return t==null||t.forEach((l,r)=>{var s;(o==null?void 0:o.length)===0?o.push(l):(o.push(l),((s=t[r+1])==null?void 0:s.key)==="groupName"&&(n.push(o),o=[]))}),n.push(o),n},dh=t=>{const n=[];let o=!1;return t.forEach(l=>{Array.isArray(l)&&(o=!0,l.forEach(r=>{const s=t.map(i=>i===l?r:i);n.push(...dh(s))}))}),o?n:[t]},YM=ve.useOriginalState(a.pinia),{originalPath:GM}=a.storeToRefs(YM),XM=t=>{var s,i,c;const n=(s=t.map(u=>{var p,f;let d=(f=(p=u.key.split("("))==null?void 0:p[1])==null?void 0:f.trim();return d==null?void 0:d.slice(0,d.length-1)}))==null?void 0:s.filter(u=>u),o=[];n==null||n.forEach(u=>{var p,f;const d=[];if((p=lo.contentTrans(u))==null||p.forEach(h=>{var m,y,v,b,k,E,C,g,S,w,N,V,_,P;if(h.includes("{")&&h.includes("[")){let T=a.cloneDeep(h).split(":");h=(E=(y=(m=a.cloneDeep(T))==null?void 0:m[0])==null?void 0:y.split("{"))==null?void 0:E[((k=(b=(v=a.cloneDeep(T))==null?void 0:v[0])==null?void 0:b.split("{"))==null?void 0:k.length)-1].replaceAll("'",""),d.push(h);let D=(S=(g=(C=T==null?void 0:T[(T==null?void 0:T.length)-1])==null?void 0:C.split("}"))==null?void 0:g[0])==null?void 0:S.replaceAll("'",'"'),z=[];(N=(w=D.slice(1,D.length-1))==null?void 0:w.split(","))==null||N.forEach(q=>{z.push(q)}),d.push(z)}else if(h.includes("{")){let T=(V=h.split(":"))==null?void 0:V[0];h=(P=T==null?void 0:T.split("{"))==null?void 0:P[((_=T==null?void 0:T.split("{"))==null?void 0:_.length)-1].replaceAll("'",""),d.push(h)}else d.push(h)}),!d.some(h=>Array.isArray(h)))o.push(d);else{let h=[];d==null||d.forEach((m,y)=>{y!==d.length-1&&h.push(m)}),(f=d==null?void 0:d[(d==null?void 0:d.length)-1])==null||f.forEach(m=>{let y=a.cloneDeep(h);y.push(m),o.push(y)})}});let l=[];o==null||o.forEach(u=>{var d;if(u!=null&&u.find(p=>p==null?void 0:p.includes("["))){let p=u==null?void 0:u.filter(h=>!(h!=null&&h.includes("["))),f=u==null?void 0:u.find(h=>h==null?void 0:h.includes("["));f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1),(d=f==null?void 0:f.split(","))==null||d.forEach(h=>{let m=a.cloneDeep(p);m.push(h),l.push(m)})}else l.push(u)});const r=(c=(i=l.filter(u=>u.length!==0))==null?void 0:i.filter(u=>u.length!==0))==null?void 0:c.map(u=>{let d="";return u.forEach(p=>{!p.includes("{")&&!(p!=null&&p.includes("$"))&&(d=d===""?d+a.cloneDeep(p):d+"/"+a.cloneDeep(p))}),d});return lo.menuArray([...new Set(r)])},JM=t=>({comp:"Menu",compData:[{contents:XM(a.cloneDeep(t)),key:"menuContents"}],name:""}),ZM=(t,n)=>{var c,u;if(!t)return;let o=[];const l=lo.getContentValue(t),r=a.cloneDeep(l).replaceAll("{","").replaceAll("}","").trim();let s=[];return r.split(":").forEach(d=>{var p;if(d.includes("[")){const f=(p=d.slice(1,d.length-1))==null?void 0:p.split(",");s.push(f)}else s.push(d)}),(c=dh(s))==null||c.forEach(d=>{o.push(d)}),o=[...new Set(o)],(u=o==null?void 0:o.filter(d=>d.length!==0))==null?void 0:u.map(d=>{let p="",f="",h=!0;return d.forEach(m=>{!m.includes("{")&&!(m!=null&&m.includes("$"))&&(m!=null&&m.includes("@")&&!(m!=null&&m.includes("@input"))&&!(m!=null&&m.includes("@output"))&&(m=""),p!=null&&p.includes("/")&&(n!=null&&n.includes(p))&&!(n!=null&&n.includes(p+"/"+m.trim()))&&h&&(n!=null&&n.includes(p+GM.value))&&(h=!1),h?p=p===""?p+m.trim():m.trim()===""?p+"/":(m.trim().includes("@"),p+"/"+m.trim()):p=p+"/"+m.trim()),m!=null&&m.includes("$")&&(f=m.replaceAll("$",""))}),{path:p,parentPath:f}})},QM=t=>{let n=t;const o=[];let l="";for(const r of n)r.includes("{")||l.includes("{")||r.includes("[")||l.includes("[")||r.includes("【")||l.includes("【")||r.includes("(")||l.includes("(")||r.includes("(")||l.includes("(")||r.includes("/*")||l.includes("/*")?(l+=r.trim(),l.split("{").length-1===l.split("}").length-1&&l.split("【").length-1===l.split("】").length-1&&l.split("[").length-1===l.split("]").length-1&&l.split("(").length-1===l.split(")").length-1&&l.split("(").length-1===l.split(")").length-1&&l.split("/*").length-1===l.split("*/").length-1&&(l.match(/'/g)||[]).length%2===0&&(l==null?void 0:l[(l==null?void 0:l.length)-1])===","&&(o.push(l),l="")):(l+=r.trim(),(l==null?void 0:l[(l==null?void 0:l.length)-1])===","&&(o.push(l),l=""));return(l==null?void 0:l.length)!==0&&o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),o};let pt="$R",Tl="$/";const ex=ve.useOriginalState(a.pinia),{originalPath:tx}=a.storeToRefs(ex),cd=(t,n)=>{var i,c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D;let o;if(o=(c=(i=t==null?void 0:t.replace("[",pt))==null?void 0:i.split(pt))==null?void 0:c[1],!o)return;const l=o.lastIndexOf("]"),r=o.substring(0,l)+pt+o.substring(l+1);o=(d=(u=r==null?void 0:r.split(pt))==null?void 0:u[0])==null?void 0:d.replaceAll("'",""),o=(o==null?void 0:o[0])===":"?'""'+o:o,n!=null&&n.includes("#")&&(o!=null&&o.includes("[")?o=((f=(p=n==null?void 0:n.split("#"))==null?void 0:p[0])==null?void 0:f.replaceAll("'",""))+"#("+o+")":o=((m=(h=n==null?void 0:n.split("#"))==null?void 0:h[0])==null?void 0:m.replaceAll("'",""))+"#"+o);let s=(S=(g=(C=(E=(v=(y=a.cloneDeep(t))==null?void 0:y.replace("(",pt))==null?void 0:v.split(pt))==null?void 0:E[((k=(b=t==null?void 0:t.replace("(",pt))==null?void 0:b.split(pt))==null?void 0:k.length)-1])==null?void 0:C.replace(")",pt))==null?void 0:g.split(pt))==null?void 0:S[0].replaceAll(":","/").replaceAll("'","");if(o.includes(":")&&!o.includes(":[")&&((N=s==null?void 0:s.split("/"))==null?void 0:N[((w=s==null?void 0:s.split("/"))==null?void 0:w.length)-1])!==""?o=o+"["+s+"]":o=o+"["+s+"]()",n!=null&&n.includes("#")&&((_=Fe.contentTransArrayToAllNoExtra((V=n==null?void 0:n.split("#"))==null?void 0:V[1],"/"))==null?void 0:_.length)>1){let z=(P=n==null?void 0:n.split("#"))==null?void 0:P[1],q=[];(D=(T=Fe.contentTransArrayToAllNoExtra(z,"/"))==null?void 0:T.filter(Z=>!(Z!=null&&Z.includes("("))))==null||D.forEach(Z=>{Z!=null&&Z[(Z==null?void 0:Z.length)-1]?q.push(Z.slice(0,(Z==null?void 0:Z.length)-1).replaceAll("'","")):q.push(Z.replaceAll("'",""))}),o=o+"&&#"+q.join(Tl)}return o},nx=t=>{var s;let n=t;const o=[];let l="",r=0;for(const i of n)r++,i.includes("(")||l.includes("(")||i.includes(")")||l.includes(")")||i.includes("&")||l.includes("&")||i.includes("|")||l.includes("|")?(l+=i.trim(),((s=a.cloneDeep(l))==null?void 0:s[(l==null?void 0:l.length)-1])===")"||a.cloneDeep(l).includes("||")||a.cloneDeep(l).includes("&&")?(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l=""):r===(t==null?void 0:t.length)&&(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):(l+=i.trim(),o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="");return(l==null?void 0:l.length)!==0&&o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),o},ox=t=>{var r;let n=(r=nx(t))==null?void 0:r.map(s=>(s!=null&&s.includes("(")&&(s="("+(s==null?void 0:s.replaceAll("(",""))),s)),o=[],l={};return n==null||n.forEach((s,i)=>{var c,u;if(s!=null&&s.includes("(")){let d=(c=s.slice(1,(s==null?void 0:s.length)-1))==null?void 0:c.split("#"),p=d[0].replaceAll("'",""),f=(u=d[1])==null?void 0:u.replaceAll("'","");(p==null?void 0:p[(p==null?void 0:p.length)-1])!=="!"?l[p]=f:l[p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)]="!"+f}else s==="&&"||s==="||"&&(o.push(l),l={});i===n.length-1&&(o.push(l),l={})}),o},lx=t=>{var o,l;let n=(l=(o=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1))==null?void 0:o.split(","))==null?void 0:l.map(r=>{var s,i,c,u,d;return(d=(u=(c=(i=(s=r==null?void 0:r.split("=="))==null?void 0:s[0])==null?void 0:i.replaceAll("'",""))==null?void 0:c.split("#"))==null?void 0:u[0])==null?void 0:d.trim()});return n=JSON.stringify(n),n},qs=t=>{let n=a.cloneDeep(t),o=[],l="",r="",s=(n==null?void 0:n[0])==="["?Fe.newContentTransArrayToAllNoExtra(n.slice(1,n.length-1),","):Fe.newContentTransArrayToAllNoExtra(n,",");return s==null||s.forEach((i,c)=>{var d,p,f,h,m,y,v,b;let u=i;if(u[u.length-1]===","&&(u=u.slice(0,u.length-1)),u.slice(1,(u==null?void 0:u.length)-1).includes("[")&&(u==null?void 0:u[0])==="["){let k=qs(u);if((s==null?void 0:s.length)===2&&((p=s==null?void 0:s[0])==null?void 0:p[((d=s==null?void 0:s[0])==null?void 0:d.length)-1])===":"){let E=s[c-1].replaceAll(",","").trim();E[E.length-1]===":"&&(E=E.slice(0,E.length-1));let C=(f=qs(u))==null?void 0:f.parentStringContent;C="["+((h=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1))==null?void 0:h.replaceAll("'",'"'))+"]";let g={[E]:C};o.push(g)}else r=r+u+",";l=l+(k==null?void 0:k.stringContent),r=r+(k==null?void 0:k.parentStringContent),o=[...o,...k==null?void 0:k.parentColumns]}else if((u==null?void 0:u[0])!=="["&&u[u.length-1]===":")u=u.slice(0,u.length-1),l=l+u+",",r=r+((m=u==null?void 0:u.split("#"))==null?void 0:m[0])+",";else if((u==null?void 0:u[0])==="["&&s[c-1]){(v=(y=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1))==null?void 0:y.split(","))==null||v.forEach(C=>{l=l+C+","});let k=s[c-1].replaceAll(",","").trim();k[k.length-1]===":"&&(k=k.slice(0,k.length-1));let E={[k]:lx(u)};o.push(E)}else l=l+u+",",r=r+((b=u==null?void 0:u.split("#"))==null?void 0:b[0])+","}),{parentColumns:o,stringContent:l,parentStringContent:r}},Gr=t=>{var f,h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y,$,te,le;((f=t==null?void 0:t.split("["))==null?void 0:f.length)!==((h=t==null?void 0:t.split("]"))==null?void 0:h.length)&&(t=t.replace(":[[","]:[["));let n=Fe.checkIsShowTable(t)?(m=Fe.contentTransArray(a.cloneDeep(t)))==null?void 0:m[0]:"[]";const o=Fe.checkIsShowTable(t)?"["+((y=Fe.contentTransArray(a.cloneDeep(t)))==null?void 0:y[2])+"]":"["+t+"]";let l=[],r=[],s="",i=[],c=[],u=[];const d=(b=(v=o==null?void 0:o.trim())==null?void 0:v.slice(1,(o==null?void 0:o.trim().length)-1))==null?void 0:b.replaceAll("'",'"');ve.IsJson(d)?l=JSON.parse(d):ve.IsJson((C=(E=(k=d==null?void 0:d.split("}"))==null?void 0:k[0])==null?void 0:E.replace(":",""))==null?void 0:C.replaceAll("\\","\\\\"))&&(l=JSON.parse((w=(S=(g=d==null?void 0:d.split("}"))==null?void 0:g[0])==null?void 0:S.replace(":",""))==null?void 0:w.replaceAll("\\","\\\\"))),l=l!=null&&l.every(G=>Array.isArray(G)&&G.every(W=>Array.isArray(W)))?l==null?void 0:l[0]:l;let p=QM(n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));if(p!=null&&p.some(G=>(G==null?void 0:G[0])==="["&&(G==null?void 0:G.includes("]#")))){let G=[];p==null||p.forEach(W=>{var re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee;if((W==null?void 0:W[0])==="["&&(W!=null&&W.includes("]#"))){let Oe=(re=W==null?void 0:W.split("#"))==null?void 0:re[1];s=(Le=(Ie=(Te=(Ne=(Se=(ne=(ce=Oe==null?void 0:Oe.replace("(",pt))==null?void 0:ce.split(pt))==null?void 0:ne[1])==null?void 0:Se.replace(")",pt))==null?void 0:Ne.split(pt))==null?void 0:Te[0])==null?void 0:Ie.replaceAll(":","/"))==null?void 0:Le.replaceAll("'",""),s=s+((Ee=(ye=Oe==null?void 0:Oe.replace(")",pt))==null?void 0:ye.split(pt))==null?void 0:Ee[1]),(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1))}else G.push(W)}),n="["+(G==null?void 0:G.join(""))+"]"}if((N=Fe.newContentTransArrayToAllNoExtra(n.slice(1,n.length-1),","))!=null&&N.some(G=>(G==null?void 0:G[0])==="["||G[(G==null?void 0:G.length)-1]===":")){let G=qs(n);u=G==null?void 0:G.parentColumns;let W=G==null?void 0:G.stringContent;n="["+(W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1))+"]"}if(n!=null&&n.includes("(")){let G=[],W=((x=(M=(O=(Z=(q=n==null?void 0:n.split("["))==null?void 0:q[((z=n==null?void 0:n.split("["))==null?void 0:z.length)-1])==null?void 0:Z.split("]"))==null?void 0:O[0])==null?void 0:M.split(":"))==null?void 0:x.length)!==1,re=(R=(A=n==null?void 0:n.replace("=",pt))==null?void 0:A.split(pt))==null?void 0:R[0];if(((F=Fe.contentTransArrayToAllNoExtra(n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1),","))==null?void 0:F.length)>1||W&&(re==null?void 0:re[(re==null?void 0:re.length)-1])!=="]"){let ce=(K=Fe.contentTransArrayToAllNoExtra(n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1),","))==null?void 0:K.map(ne=>((ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])===","&&(ne=a.cloneDeep(ne).slice(0,(ne==null?void 0:ne.length)-1)),ne));ce==null||ce.forEach(ne=>{var Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De;if((ne==null?void 0:ne[0])==="("&&(ne==null?void 0:ne[ne.length-1])===")")i=ox(ne);else if(!(ne!=null&&ne.includes("(")))ne!=null&&ne.includes("/")?G.push(ne!=null&&ne.includes('"')?((Ne=(Se=ne==null?void 0:ne.replaceAll("#","&&#"))==null?void 0:Se.replaceAll("/",Tl))==null?void 0:Ne.replaceAll('"',""))+"@-#isMain":(Te=ne==null?void 0:ne.replaceAll("#","&&#"))==null?void 0:Te.replaceAll("/",Tl)):G.push(ne!=null&&ne.includes('"')?((Ie=ne==null?void 0:ne.replaceAll("'",""))==null?void 0:Ie.replaceAll('"',""))+"@-#isMain":ne==null?void 0:ne.replaceAll("'",""));else if(ne!=null&&ne.includes("/")&&(ne!=null&&ne.includes("#"))&&((Le=ne==null?void 0:ne.toUpperCase())!=null&&Le.includes("@CONDITION")))G.push(ne!=null&&ne.includes('"')?((ye=ne==null?void 0:ne.replace("#","&&#"))==null?void 0:ye.replaceAll('"',""))+"@-#isMain":ne==null?void 0:ne.replace("#","&&#"));else if(ne!=null&&ne.includes("[")){let be;const Be=(se=(Ce=a.cloneDeep(ne))==null?void 0:Ce.replaceAll("{",""))==null?void 0:se.replaceAll("}","");if(((ge=(ue=Be==null?void 0:Be.split("#"))==null?void 0:ue[1])==null?void 0:ge[0])==="["||Be[0]==="["){let Ue,We="";Be!=null&&Be.includes("#")?(Ue=(Ve=Be==null?void 0:Be.split("#"))==null?void 0:Ve[1],We=((Me=Be==null?void 0:Be.split("#"))==null?void 0:Me[0])+"#["):(Ue=Be,We="["),Ue=(ze=a.cloneDeep(Ue))==null?void 0:ze.slice(1,((xe=a.cloneDeep(Ue))==null?void 0:xe.length)-1),(pe=Ue==null?void 0:Ue.split(","))==null||pe.forEach(rt=>{We=We+cd(rt,a.cloneDeep(rt))+","}),be=(We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1))+"]"}else be=cd(Be,a.cloneDeep(ne));G.push(ne!=null&&ne.includes('"')?((De=be==null?void 0:be.replaceAll('"',"'"))==null?void 0:De.replaceAll('"',""))+"@-#isMain":be==null?void 0:be.replaceAll('"',"'"))}else{let be=(ke=(de=($e=(Oe=ne==null?void 0:ne.split(":"))==null?void 0:Oe[((Ee=ne==null?void 0:ne.split(":"))==null?void 0:Ee.length)-1])==null?void 0:$e.split(")"))==null?void 0:de[0])==null?void 0:ke.replaceAll("'","");be=be+"["+((ie=(we=(fe=ne==null?void 0:ne.split("("))==null?void 0:fe[((ee=ne==null?void 0:ne.split("("))==null?void 0:ee.length)-1])==null?void 0:we.split(")"))==null?void 0:ie[0].replaceAll(":","/").replaceAll("'",""))+"]",G.push(ne!=null&&ne.includes('"')?(be==null?void 0:be.replaceAll('"',""))+"@-#isMain":be)}}),r=G}else{let ce=((oe=(U=(J=(H=n==null?void 0:n.slice(1,n==null?void 0:n.length))==null?void 0:H.split("("))==null?void 0:J[1])==null?void 0:U.split(")"))==null?void 0:oe[0]).replaceAll("{","").replaceAll("}","").replaceAll(":","/").replaceAll("'","");ce=ce.replaceAll("/[",tx.value+"[");let ne=(Q=(ae=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1))==null?void 0:ae.replace("[",pt))==null?void 0:Q.split(pt);s=s+ce+"["+(ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])}}else if(!(n!=null&&n.includes("{"))&&ve.IsJson(n==null?void 0:n.replaceAll("'",'"')))r=JSON.parse(n==null?void 0:n.replaceAll("'",'"'));else if(ve.IsJson((_=(V=n==null?void 0:n.split("{"))==null?void 0:V[1])==null?void 0:_.replaceAll("'",'"')))r=JSON.parse((T=(P=n==null?void 0:n.split("{"))==null?void 0:P[1])==null?void 0:T.replaceAll("'",'"'));else{let G=n.slice(1,n.length-1);(D=G==null?void 0:G.split(","))==null||D.forEach(W=>{var re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee;W!=null&&W.includes("#")?W!=null&&W.includes("/")?r.push(W!=null&&W.includes('"')?((Te=(Ne=W==null?void 0:W.replaceAll('"',""))==null?void 0:Ne.replaceAll("#","&&#"))==null?void 0:Te.replaceAll("/",Tl))+"@-#isMain":(Ie=W==null?void 0:W.replaceAll("#","&&#"))==null?void 0:Ie.replaceAll("/",Tl)):r.push(((ce=(re=W==null?void 0:W.split("#"))==null?void 0:re[0])==null?void 0:ce.replaceAll("'",""))+"@-"+((Se=(ne=W==null?void 0:W.split("#"))==null?void 0:ne[1])==null?void 0:Se.replaceAll("'",""))):r.push(W!=null&&W.includes('"')?((ye=(Le=W.trim())==null?void 0:Le.replaceAll('"',""))==null?void 0:ye.replaceAll("'",""))+"@-#isMain":(Ee=W.trim())==null?void 0:Ee.replaceAll("'",""))})}if(r=r==null?void 0:r.map(G=>G==null?void 0:G.replaceAll("'","")),l=l!=null&&l.every(G=>Array.isArray(G))?l:[l],l!=null&&l.some(G=>G==null?void 0:G.some(W=>Array.isArray(W)&&(W==null?void 0:W.length)===1))&&(l==null?void 0:l.length)>0&&(r==null?void 0:r.length)>0){let G=(X=l==null?void 0:l[0])==null?void 0:X.findIndex(W=>Array.isArray(W)&&(W==null?void 0:W.length)===1);if((s==null?void 0:s.length)>0){let W=($=(Y=(j=(I=s==null?void 0:s.split("["))==null?void 0:I[((B=s==null?void 0:s.split("["))==null?void 0:B.length)-1])==null?void 0:j.split("]"))==null?void 0:Y[0])==null?void 0:$.split(",");G=G-(W==null?void 0:W.length)}r=r==null?void 0:r.map((W,re)=>(re===G&&(W=W+"@-"+W),W)),l=l==null?void 0:l.map(W=>(W!=null&&W.some(re=>Array.isArray(re)&&(re==null?void 0:re.length)===1)&&(W=W==null?void 0:W.map(re=>(Array.isArray(re)&&(re==null?void 0:re.length)===1&&(re=re==null?void 0:re[0]),re))),W))}return{tableColumns:r,tableContents:l,tablePath:(te=s==null?void 0:s.toUpperCase())!=null&&te.includes("MAPPING")?"":s,filterContents:i,childTree:c,parentColumns:u,relatedPath:(le=s==null?void 0:s.toUpperCase())!=null&&le.includes("MAPPING")?s:""}};let tt="$R";const ax=t=>{var o;let n="[["+t+"]]";return ve.IsJson((o=n.slice(1,(n==null?void 0:n.length)-1))==null?void 0:o.replaceAll("'",'"'))},Ys=t=>{var l,r,s,i,c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y,$,te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le;let n="";t=t==null?void 0:t.replace("=",":"),t=t.replace(/:([^=]*)==/g,":");let o=t;if((Fe.checkIsShowGroup(a.cloneDeep(t))!==null||Fe.checkIsShowGroupForm(a.cloneDeep(t))!==null||Fe.checkIsUsingGroup(t))&&(n=(s=(r=(l=a.cloneDeep(t).replace(":",tt).split(tt))==null?void 0:l[0])==null?void 0:r.replaceAll("'",""))==null?void 0:s.replaceAll("]",""),o=(i=a.cloneDeep(t).replace(":",tt).split(tt))==null?void 0:i[1]),Fe.checkIsShowTable(a.cloneDeep(o).slice(1,((c=a.cloneDeep(o))==null?void 0:c.length)-1))||Fe.checkForTableContents(a.cloneDeep(o).slice(1,((u=a.cloneDeep(o))==null?void 0:u.length)-1))||Fe.checkIsTableCheck(o))if((o==null?void 0:o[0])!=="["&&(o==null?void 0:o[0])!=="{"&&(o="{["+o+"]:[[]]}"),((p=a.cloneDeep(o).slice(1,((d=a.cloneDeep(o))==null?void 0:d.length)-1))==null?void 0:p[1])!=="["){const ye=Gr(a.cloneDeep(o).slice(1,((f=a.cloneDeep(o))==null?void 0:f.length)-1));return{groupName:n,tableColumn:ye==null?void 0:ye.tableColumns,tableContents:ye==null?void 0:ye.tableContents,tableColumnPath:ye==null?void 0:ye.tablePath,filterContents:ye==null?void 0:ye.filterContents,childTree:ye==null?void 0:ye.childTree,parentColumns:ye==null?void 0:ye.parentColumns,relatedPath:ye==null?void 0:ye.relatedPath}}else if(a.cloneDeep(o).slice(1,((h=a.cloneDeep(o))==null?void 0:h.length)-1).includes("{")){let ye=a.cloneDeep(o).slice(1,((m=a.cloneDeep(o))==null?void 0:m.length)-1),Ee=ye.indexOf("{"),Oe=ye.slice(Ee,(ye==null?void 0:ye.length)-Ee);return(v=(y=Fe.contentTransArray(Oe))==null?void 0:y.filter(de=>de==null?void 0:de.includes("{")))==null?void 0:v.map((de,ke)=>{var fe;let ee=Gr(a.cloneDeep(de).slice(1,((fe=a.cloneDeep(de))==null?void 0:fe.length)-1));return{groupName:ke===0?n:"",tableColumn:ee==null?void 0:ee.tableColumns,tableContents:ee==null?void 0:ee.tableContents,tableColumnPath:ee==null?void 0:ee.tablePath,filterContents:ee==null?void 0:ee.filterContents,childTree:ee==null?void 0:ee.childTree,parentColumns:ee==null?void 0:ee.parentColumns,relatedPath:ee==null?void 0:ee.relatedPath}})}else{const ye=Gr(a.cloneDeep(o).slice(1,((b=a.cloneDeep(o))==null?void 0:b.length)-1));return{groupName:n,tableColumn:ye==null?void 0:ye.tableColumns,tableContents:ye==null?void 0:ye.tableContents,tableColumnPath:ye==null?void 0:ye.tablePath,filterContents:ye==null?void 0:ye.filterContents,childTree:ye==null?void 0:ye.childTree,parentColumns:ye==null?void 0:ye.parentColumns,relatedPath:ye==null?void 0:ye.relatedPath}}else{let ye=[];if(ve.IsJson((k=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:k.replaceAll("'",'"')))ye=[JSON.parse((E=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:E.replaceAll("'",'"'))];else if((!o.includes("(")||ax(o))&&!((o==null?void 0:o[0])==="["&&(o==null?void 0:o[1])==="["))if(o="[["+o+"]]",ve.IsJson((C=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:C.replaceAll("'",'"')))ye=JSON.parse((g=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:g.replaceAll("'",'"'));else if(o=o.slice(2,o.length-2),((N=(w=(S=o==null?void 0:o.replace(":",tt))==null?void 0:S.split(tt))==null?void 0:w[1])==null?void 0:N[0])!=="{"&&(o==null?void 0:o[0])!=="{"){o=((_=(V=o==null?void 0:o.replace(":",tt))==null?void 0:V.split(tt))==null?void 0:_[0])+":{["+((T=(P=o==null?void 0:o.replace(":",tt))==null?void 0:P.split(tt))==null?void 0:T[1])+"]}";const Ee=Ys(o);return Ee!=null&&Ee.tableColumn?{groupName:Ee==null?void 0:Ee.groupName,tableColumn:Ee==null?void 0:Ee.tableColumn,tableContents:Ee==null?void 0:Ee.tableContents,filterContents:Ee==null?void 0:Ee.filterContents,childTree:Ee==null?void 0:Ee.childTree,parentColumns:Ee==null?void 0:Ee.parentColumns,relatedPath:Ee==null?void 0:Ee.relatedPath}:{groupName:Ee==null?void 0:Ee.groupName,formContents:Ee==null?void 0:Ee.formContents}}else{let Ee=(z=(D=Fe.contentTransArrayToAllNoExtra(o,","))==null?void 0:D.map($e=>$e==null?void 0:$e.replaceAll(",","")))==null?void 0:z.map($e=>Fe.formToExtraContent(a.cloneDeep($e).slice(1,a.cloneDeep($e).length-1))),Oe=[];return(q=a.cloneDeep(Ee))==null||q.forEach($e=>{var de;(de=$e==null?void 0:$e.formContents)==null||de.forEach(ke=>{ke==null||ke.forEach(ee=>{Oe.push(ee)})})}),{groupName:(Z=Ee==null?void 0:Ee[0])==null?void 0:Z.groupName,formContents:Oe}}else if((o==null?void 0:o[0])!=="{"&&(o==null?void 0:o[0])!=="["){let Ee=(A=(x=(M=(O=a.cloneDeep(o))==null?void 0:O.split("]"))==null?void 0:M[0])==null?void 0:x.split("["))==null?void 0:A[1],Oe="",de=((U=(J=(H=(K=(F=(R=a.cloneDeep(o))==null?void 0:R.split(")"))==null?void 0:F[0])==null?void 0:K.split("("))==null?void 0:H[1])==null?void 0:J.replaceAll("[",""))==null?void 0:U.replaceAll("]","")).replaceAll("'","").replaceAll(":","/");(oe=de==null?void 0:de.split("/"))==null||oe.forEach((ee,fe)=>{var we;fe!==((we=de==null?void 0:de.split("/"))==null?void 0:we.length)-1&&(Oe=Oe===""?Oe+ee:Oe+"/"+ee)});let ke;return((B=(X=(Q=(ae=a.cloneDeep(o))==null?void 0:ae.replace(",",tt))==null?void 0:Q.split(tt))==null?void 0:X[1])==null?void 0:B[0])==="["&&(ke=Fe.getExtraContents((Y=(j=(I=a.cloneDeep(o))==null?void 0:I.replace(",",tt))==null?void 0:j.split(tt))==null?void 0:Y[1])),{groupName:"",extraButton:(te=Ee==null?void 0:Ee.split(":"))==null?void 0:te[(($=Ee==null?void 0:Ee.split(":"))==null?void 0:$.length)-1].replaceAll("'",""),extraPath:Oe,extraData:ke}}else if((o==null?void 0:o[0])==="["&&(o==null?void 0:o[1])==="["&&(o=o.slice(1,(o==null?void 0:o.length)-1).replaceAll('"',"'")),(o==null?void 0:o[0])!=="["){let Ee;(o==null?void 0:o[1])==="["?Ee=o.slice(2,(o==null?void 0:o.length)-2):Ee=o;let Oe=(G=(le=Fe.contentTransArray(Ee))==null?void 0:le.filter(de=>de!==","))==null?void 0:G.map(de=>Fe.formToExtraContent(a.cloneDeep(de).slice(1,a.cloneDeep(de).length-1))),$e=[];return(W=a.cloneDeep(Oe))==null||W.forEach(de=>{var ke;(ke=de==null?void 0:de.formContents)==null||ke.forEach(ee=>{ee==null||ee.forEach(fe=>{$e.push(fe)})})}),{groupName:(re=Oe==null?void 0:Oe[0])==null?void 0:re.groupName,formContents:$e}}else if((o==null?void 0:o[1])!=="["&&(o="["+o+"]"),(o==null?void 0:o[0])==="["&&(o==null?void 0:o[1])==="["){o=o.slice(1,(o==null?void 0:o.length)-1);let Ee=[],Oe=[];if(((ne=(ce=Fe.contentTransArray(o))==null?void 0:ce.filter($e=>$e!==","))==null?void 0:ne.length)===1){o=o.slice(1,(o==null?void 0:o.length)-1);let $e=(Ne=(Se=Fe.contentTransArrayToAllNoExtra(o,","))==null?void 0:Se.map(ke=>ke==null?void 0:ke.replaceAll(",","")))==null?void 0:Ne.map(ke=>Fe.formToExtraContent(a.cloneDeep(ke).slice(1,a.cloneDeep(ke).length-1))),de=[];(Te=a.cloneDeep($e))==null||Te.forEach(ke=>{var ee;(ee=ke==null?void 0:ke.formContents)==null||ee.forEach(fe=>{fe==null||fe.forEach(we=>{de.push(we)})})}),Ee.push(de)}else(Le=(Ie=Fe.contentTransArray(o))==null?void 0:Ie.filter($e=>$e!==","))==null||Le.forEach($e=>{var de,ke,ee,fe;if(!$e.includes("&"))Array.isArray(Wl($e))||Ee.push((de=Wl($e))==null?void 0:de.formContents);else{let we=(fe=(ee=(ke=a.cloneDeep($e))==null?void 0:ke.split("&"))==null?void 0:ee[1])==null?void 0:fe.replaceAll("'",'"');ve.IsJson(we)&&Oe.push({[JSON.parse(we)[0]]:JSON.parse(we)})}});return{groupName:n,formContents:Ee,formGroup:Oe}}return{groupName:n,formContents:ye}}},Wl=t=>{var r,s,i,c,u,d,p;let n=!1,o=[],l=Fe.checkIsShowGroup(t.slice(1,a.cloneDeep(t).length-1))!==null||Fe.checkIsShowGroupForm(t.slice(1,a.cloneDeep(t).length-1))!==null;if(l){let f=(c=(r=a.cloneDeep(t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)).replace(":",tt).split(tt))==null?void 0:r[1])==null?void 0:c.slice(1,((i=(s=a.cloneDeep(t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)).replace(":",tt).split(tt))==null?void 0:s[1])==null?void 0:i.length)-1);(f==null?void 0:f[0])==="["&&(f==null?void 0:f[1])==="["&&(f=f.slice(1,(f==null?void 0:f.length)-1));let h=(u=Fe.contentTransArrayToAllNoExtra(f,","))==null?void 0:u.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));h!=null&&h.every(m=>Fe.checkIsShowGroup(m.slice(1,a.cloneDeep(m).length-1))!==null||Fe.checkIsShowGroupForm(m.slice(1,a.cloneDeep(m).length-1))!==null)&&(n=!0)}return l&&n?((d=cr(t))==null||d.forEach(f=>{o.push(f)}),o):((p=Fe.contentTransArray(t))==null?void 0:p.length)===1?Ys(a.cloneDeep(t).slice(1,a.cloneDeep(t).length-1)):Ys(a.cloneDeep(t).slice(1,a.cloneDeep(t).length))},cr=(t,n=0)=>{var d,p,f,h,m;let o=t.slice(1,a.cloneDeep(t).length-1),l=(p=(d=a.cloneDeep(o).replace(":",tt).split(tt))==null?void 0:d[0])==null?void 0:p.replaceAll("'",""),r=(f=a.cloneDeep(o).replace(":",tt).split(tt))==null?void 0:f[1],s=[],i=!1;r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1);let c=(h=Fe.contentTransArrayToAllNoExtra(r,","))==null?void 0:h.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));if(c!=null&&c.every(y=>Fe.checkIsShowGroup(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsShowGroupForm(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsQuote(y)!==null)&&(i=!0),!i)s=cr(r,n+1);else{let y=[];c!=null&&c.some(v=>Fe.checkIsQuote(v)!==null)?y=c:y=(m=Fe.contentTransArray(r))==null?void 0:m.filter(v=>v!==","),y==null||y.forEach(v=>{var g,S,w,N,V;let b=v.slice(1,a.cloneDeep(v).length-1),k=(N=(g=a.cloneDeep(b).replace(":",tt).split(tt))==null?void 0:g[1])==null?void 0:N.slice(1,((w=(S=a.cloneDeep(b).replace(":",tt).split(tt))==null?void 0:S[1])==null?void 0:w.length)-1);(k==null?void 0:k[0])==="["&&(k==null?void 0:k[1])==="["&&(k=k.slice(1,(k==null?void 0:k.length)-1));let E=(V=Fe.contentTransArrayToAllNoExtra(k,","))==null?void 0:V.map(_=>((_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),_));(E==null?void 0:E.every(_=>Fe.checkIsShowGroup(_.slice(1,a.cloneDeep(_).length-1))!==null||Fe.checkIsShowGroupForm(_.slice(1,a.cloneDeep(_).length-1))!==null||Fe.checkIsQuote(_)!==null))?s=[...s,...cr(v,n+1)]:s=[...s,...fh(v)]})}return s==null?void 0:s.map(y=>(y["groupName"+n]=l,y))},fh=t=>{var o,l,r;let n=[];if((t==null?void 0:t[0])==="["&&(t==null?void 0:t[1])==="["){let s=(o=Fe.contentTransArray(t))==null?void 0:o.filter(i=>i!==",");s==null||s.forEach(i=>{n.push(Wl(i))})}else{let s=(r=(l=Fe.newContentTransArrayToAllNoExtra(t,","))==null?void 0:l.filter(i=>i!==","))==null?void 0:r.map(i=>(i[(i==null?void 0:i.length)-1]===","&&(i=i.slice(0,(i==null?void 0:i.length)-1)),i));s==null||s.forEach(i=>{var d,p,f;let c=!1,u=Fe.checkIsShowGroup(i.slice(1,a.cloneDeep(i).length-1))!==null||Fe.checkIsShowGroupForm(i.slice(1,a.cloneDeep(i).length-1))!==null;if(u){let h=(d=a.cloneDeep(i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)).replace(":",tt).split(tt))==null?void 0:d[1];(h==null?void 0:h[0])==="["&&(h==null?void 0:h[1])==="["&&(h=h.slice(1,(h==null?void 0:h.length)-1));let m=(p=Fe.contentTransArrayToAllNoExtra(h,","))==null?void 0:p.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));m!=null&&m.every(y=>Fe.checkIsShowGroup(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsShowGroupForm(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsQuote(y)!==null)&&(c=!0)}u&&c?(f=cr(i))==null||f.forEach(h=>{n.push(h)}):n.push(Wl(i))})}return n},kl=e.ref(0);let va="$R";const rx=ve.useOriginalState(a.pinia),{originalPath:Xr}=a.storeToRefs(rx),sx=(t,n)=>{var r;let o=[],l=n==null?void 0:n.length;return(r=a.cloneDeep(n))==null||r.forEach((s,i)=>{let c=[];s==null||s.forEach(u=>{var d,p,f,h,m,y,v,b,k,E;if(c.push(a.cloneDeep(u)),ve.IsJson(a.cloneDeep(t.trim()).replaceAll("'",'"'))&&((d=JSON.parse(a.cloneDeep(t.trim()).replaceAll("'",'"')))!=null&&d.every(C=>typeof C=="string")))(p=JSON.parse(a.cloneDeep(t.trim()).replaceAll("'",'"')))==null||p.forEach(C=>{var g,S,w;o.push([{key:(g=a.cloneDeep(u))==null?void 0:g.key,value:((S=a.cloneDeep(u))==null?void 0:S.value)+"/"+C,parentPath:(w=a.cloneDeep(u))==null?void 0:w.parentPath}])});else{let C=[];if(((f=a.cloneDeep(t.trim()))==null?void 0:f[0])==="["&&((h=a.cloneDeep(t.trim()))==null?void 0:h[1])==="["){let g=t.trim().slice(1,((m=t.trim())==null?void 0:m.length)-1),S=fh(g.trim());S!=null&&S.every(w=>Array.isArray(w))&&(S=S==null?void 0:S[0]),S==null||S.forEach(w=>{var N,V,_,P,T,D,z,q,Z,O,M,x,A;if(w!=null&&w.tableColumn)((V=(N=Object.keys(w))==null?void 0:N.filter(R=>R==null?void 0:R.includes("groupName")))==null?void 0:V.length)===1?c.push({key:"groupName",value:w==null?void 0:w.groupName}):(P=(_=Object.keys(w))==null?void 0:_.filter(R=>R==null?void 0:R.includes("groupName")))==null||P.forEach((R,F)=>{R==="groupName"?c.push({key:R,value:w==null?void 0:w[R]}):c.push({key:"groupName"+(F-1),value:w==null?void 0:w[R]})}),c.push({key:"tableColumn",value:w==null?void 0:w.tableColumn}),c.push({key:"tableContents",value:w==null?void 0:w.tableContents}),c.push({key:"tablePath",value:(w==null?void 0:w.tableColumnPath)??""}),c.push({key:"tableFilter",value:(w==null?void 0:w.filterContents)??[]}),c.push({key:"relatedPath",value:(w==null?void 0:w.relatedPath)??[]}),c.push({key:"childTree",value:(w==null?void 0:w.childTree)??[]}),c.push({key:"parentColumns",value:(w==null?void 0:w.parentColumns)??[]});else if(w!=null&&w.extraButton)c.push({key:"groupName",value:w==null?void 0:w.groupName}),c.push({key:"extraButton",value:w==null?void 0:w.extraButton,path:w==null?void 0:w.extraPath,data:w==null?void 0:w.extraData});else{let R=l===1?w==null?void 0:w.formContents:((T=w==null?void 0:w.formContents)==null?void 0:T.length)===1?(z=(D=w==null?void 0:w.formContents)==null?void 0:D[0])==null?void 0:z[i]:(q=w==null?void 0:w.formContents)==null?void 0:q[i];(R==null?void 0:R.length)>0&&(c.push({key:"groupName",value:w==null?void 0:w.groupName}),c.push({key:"formContent",value:l===1?w==null?void 0:w.formContents:((Z=w==null?void 0:w.formContents)==null?void 0:Z.length)===1?(M=(O=w==null?void 0:w.formContents)==null?void 0:O[0])==null?void 0:M[i]:(x=w==null?void 0:w.formContents)==null?void 0:x[i]}),c.push({key:"formGroup",value:l===1?w==null?void 0:w.formGroup:(A=w==null?void 0:w.formGroup)==null?void 0:A[i]}))}})}else if(C=Wl(a.cloneDeep(t.trim())),Array.isArray(C))C==null||C.forEach(g=>{var S,w,N,V,_,P,T,D,z,q,Z,O,M;if(g!=null&&g.tableColumn)((w=(S=Object.keys(g))==null?void 0:S.filter(x=>x==null?void 0:x.includes("groupName")))==null?void 0:w.length)===1?c.push({key:"groupName",value:g==null?void 0:g.groupName}):(V=(N=Object.keys(g))==null?void 0:N.filter(x=>x==null?void 0:x.includes("groupName")))==null||V.forEach(x=>{c.push({key:x,value:g==null?void 0:g[x]})}),c.push({key:"tableColumn",value:g==null?void 0:g.tableColumn}),c.push({key:"tableContents",value:g==null?void 0:g.tableContents}),c.push({key:"relatedPath",value:(g==null?void 0:g.relatedPath)??[]}),c.push({key:"tablePath",value:(g==null?void 0:g.tableColumnPath)??""}),c.push({key:"tableFilter",value:(g==null?void 0:g.filterContents)??[]}),c.push({key:"childTree",value:(g==null?void 0:g.childTree)??[]}),c.push({key:"parentColumns",value:(g==null?void 0:g.parentColumns)??[]});else if(g!=null&&g.extraButton)c.push({key:"groupName",value:g==null?void 0:g.groupName}),c.push({key:"extraButton",value:g==null?void 0:g.extraButton,path:g==null?void 0:g.extraPath,data:g==null?void 0:g.extraData});else{let x=l===1?g==null?void 0:g.formContents:((_=g==null?void 0:g.formContents)==null?void 0:_.length)===1?(T=(P=g==null?void 0:g.formContents)==null?void 0:P[0])==null?void 0:T[i]:(D=g==null?void 0:g.formContents)==null?void 0:D[i];(x==null?void 0:x.length)>0&&(c.push({key:"groupName",value:g==null?void 0:g.groupName}),c.push({key:"formContent",value:l===1?g==null?void 0:g.formContents:((z=g==null?void 0:g.formContents)==null?void 0:z.length)===1?(Z=(q=g==null?void 0:g.formContents)==null?void 0:q[0])==null?void 0:Z[i]:(O=g==null?void 0:g.formContents)==null?void 0:O[i]}),c.push({key:"formGroup",value:l===1?g==null?void 0:g.formGroup:(M=g==null?void 0:g.formGroup)==null?void 0:M[i]}))}});else if(C!=null&&C.tableColumn)c.push({key:"groupName",value:C==null?void 0:C.groupName}),c.push({key:"tableColumn",value:C==null?void 0:C.tableColumn}),c.push({key:"tableContents",value:l!==1?[(y=C==null?void 0:C.tableContents)==null?void 0:y[i]]:C==null?void 0:C.tableContents}),c.push({key:"relatedPath",value:(C==null?void 0:C.relatedPath)??[]}),c.push({key:"tableFilter",value:(C==null?void 0:C.filterContents)??[]}),c.push({key:"childTree",value:(C==null?void 0:C.childTree)??[]}),c.push({key:"parentColumns",value:(C==null?void 0:C.parentColumns)??[]});else{let g=l!==1?((v=C==null?void 0:C.formContents)==null?void 0:v.length)===1?[(k=(b=C==null?void 0:C.formContents)==null?void 0:b[0])==null?void 0:k[i]]:[(E=C==null?void 0:C.formContents)==null?void 0:E[i]]:C==null?void 0:C.formContents;(g==null?void 0:g.length)>0&&(c.push({key:"groupName",value:C==null?void 0:C.groupName}),c.push({key:"formContent",value:g}))}}}),o.push(c)}),o},ix=(t,n)=>{var s,i;const o=[],l=ZM((s=a.cloneDeep(t))==null?void 0:s.key,n);return l&&(l==null?void 0:l.length)>0&&(l==null||l.forEach(c=>{o.push([{key:"contentPath",value:c==null?void 0:c.path,parentPath:c==null?void 0:c.parentPath}])})),sx((i=a.cloneDeep(t))==null?void 0:i.value,o)},ud=t=>t.length===1&&(t==null?void 0:t[0])===void 0?[]:t,cx=(t,n,o)=>{const l=new Map;o.forEach(s=>{for(const[i,c]of Object.entries(s))try{l.set(i.replaceAll("'",""),JSON.parse(c))}catch{l.set(i,[])}});const r=s=>s.map(i=>{var d;const c={...i},u=l.get(i.label);if(u!=null&&u.length){const p=u.map(f=>n.find(h=>(h==null?void 0:h.label)===f)).filter(Boolean);c.children=(c.children||[]).concat(p)}return(d=c.children)!=null&&d.length&&(c.children=r(c.children)),c});return r(t)},ux=(t,n)=>{if(!n||(n==null?void 0:n.length)===0)return t;let o=[];n==null||n.forEach(s=>{var c,u;let i=(u=(c=Object.values(s))==null?void 0:c[0])==null?void 0:u.replaceAll("'",'"');if(ve.IsJson(i)){let d=JSON.parse(i);d=d==null?void 0:d.map(p=>{var f,h;return{parent:(h=(f=Object.keys(s))==null?void 0:f[0])==null?void 0:h.replaceAll("'",""),value:p}}),o=[...o,...d]}});let l=[],r=[];return t==null||t.forEach((s,i)=>{o!=null&&o.find(c=>(c==null?void 0:c.value)===(s==null?void 0:s.label))&&(t==null?void 0:t.findIndex(c=>{var u;return(c==null?void 0:c.label)===((u=o==null?void 0:o.find(d=>(d==null?void 0:d.value)===(s==null?void 0:s.label)))==null?void 0:u.parent)}))<i?r.push(s):l.push(s)}),cx(l,r,n)},dd=t=>{const n=t.lastIndexOf(")");return n===-1?[t,""]:[t.slice(0,n),t.slice(n+1)]},dx=t=>{var o,l;return(l=(o=a.cloneDeep(t))==null?void 0:o.map(r=>{var i,c,u;let s=[];if((i=qM(r==null?void 0:r.filter(d=>(d==null?void 0:d.key)!=="contentPath")))==null||i.forEach(d=>{var h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y;let p=[];if(d.length===0)return;let f=(m=(h=d.find($=>($==null?void 0:$.key)==="tableColumn"))==null?void 0:h.value)==null?void 0:m.map($=>({label:$}));if(Array.isArray(f)&&((y=d==null?void 0:d.find($=>($==null?void 0:$.key)==="tablePath"))!=null&&y.value&&((v=d==null?void 0:d.find($=>($==null?void 0:$.key)==="tablePath"))==null?void 0:v.value)!==""&&f.push({columnPath:(b=d==null?void 0:d.find($=>($==null?void 0:$.key)==="tablePath"))==null?void 0:b.value}),f=(k=a.cloneDeep(f))==null?void 0:k.map($=>{var te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De,be,Be,Ue,We,rt,it,Ze,qe,dt,ct,St,$t,Mt,xt,At,kt,me,Pe,Ke,Ye,Je,lt,nt,mt,gt,Qe,he,_e,Ae,Re,et,He,ot,ut,jt,hn,Wt,Nt,an,ko,Eo,wo,So,No,To,_o,Bo,Vo,Po,Do,Io,Oo,$o,Mo,xo,Ao,zo,Ro,Lo,Fo,Ko,Ho,jo,Wo,Uo,qo,Yo,Go,Xo,Jo,Zo,Qo,el,tl,nl,ol,ll,al,rl,sl,il,cl,ul,dl,fl,rn,ft,Nn,pl,vn,zt,ml,cc,uc;if((te=$==null?void 0:$.label)!=null&&te.includes("&&#"))if((G=(le=$==null?void 0:$.label)==null?void 0:le.toUpperCase())!=null&&G.includes("@CONDITION")){let je=(ge=(ue=(se=a.cloneDeep($==null?void 0:$.label))==null?void 0:se.split("&&#"))==null?void 0:ue[1])==null?void 0:ge.split("@Condition:"),at="("+(je==null?void 0:je[1]),aa=[];return(ze=(xe=(Me=(Ve=je==null?void 0:je[0])==null?void 0:Ve.replaceAll("(",""))==null?void 0:Me.replaceAll(")",""))==null?void 0:xe.split("||"))==null||ze.forEach(Pt=>{aa.push(Pt==null?void 0:Pt.split("/"))}),{label:(Ue=(Be=(be=(De=(pe=a.cloneDeep($==null?void 0:$.label))==null?void 0:pe.split("&&#"))==null?void 0:De[0].replaceAll("'",""))==null?void 0:be.split("#"))==null?void 0:Be[0])==null?void 0:Ue.replaceAll("$/","/"),isRoute:((We=d.find(Pt=>(Pt==null?void 0:Pt.key)==="tableColumn"))==null?void 0:We.isParent)??!1,allSelectionContents:aa,selectFilter:at==null?void 0:at.replaceAll(":","="),columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRun:((rt=d.find(Pt=>(Pt==null?void 0:Pt.key)==="tableColumn"))==null?void 0:rt.isRun)??!1,formType:"Select"}}else{let je=(ne=(ce=(re=(W=a.cloneDeep($==null?void 0:$.label))==null?void 0:W.split("&&#"))==null?void 0:re[1].replaceAll("'",""))==null?void 0:ce.split("$/"))==null?void 0:ne.map(at=>({label:at,value:at}));return{label:(Le=(Ie=(Te=(Ne=(Se=a.cloneDeep($==null?void 0:$.label))==null?void 0:Se.split("&&#"))==null?void 0:Ne[0].replaceAll("'",""))==null?void 0:Te.split("#"))==null?void 0:Ie[0])==null?void 0:Le.replaceAll("$/","/"),options:je,isRoute:((ye=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:ye.isParent)??!1,formMenuSelect:(ke=(de=($e=(Oe=(Ee=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ee.split("["))==null?void 0:Oe[1])==null?void 0:$e.split("]"))==null?void 0:de[0])==null?void 0:ke.split("/"),groupSelect:(ie=(we=(fe=(ee=a.cloneDeep($==null?void 0:$.label).replace("#",va))==null?void 0:ee.split(va))==null?void 0:fe[1])==null?void 0:we.split("["))==null?void 0:ie[0],columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRun:((Ce=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:Ce.isRun)??!1,formType:"Select"}}else{if((it=$==null?void 0:$.label)!=null&&it.includes("@-"))return{label:(dt=(qe=(Ze=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ze.split("@-"))==null?void 0:qe[0])==null?void 0:dt.replaceAll("$/","/"),directiveLabel:(St=(ct=a.cloneDeep($==null?void 0:$.label))==null?void 0:ct.split("@-"))==null?void 0:St[1],isRoute:(($t=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:$t.isParent)??!1,isRun:((Mt=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:Mt.isRun)??!1};if($!=null&&$.label&&!((xt=$==null?void 0:$.label)!=null&&xt.includes("[")))return{label:(At=$==null?void 0:$.label)==null?void 0:At.replaceAll("$/","/"),isRoute:((kt=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:kt.isParent)??!1,isRun:((me=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:me.isRun)??!1};if($!=null&&$.label&&((Pe=$==null?void 0:$.label)!=null&&Pe.includes(":")))if((Ke=$==null?void 0:$.label)!=null&&Ke.includes("#"))if((Ye=$==null?void 0:$.label)!=null&&Ye.includes("("))if(((Wt=(hn=(jt=$==null?void 0:$.label)==null?void 0:jt.split("#"))==null?void 0:hn[1])==null?void 0:Wt[0])==="["){let je=[];return(To=(No=(So=(an=(Nt=$==null?void 0:$.label)==null?void 0:Nt.split("#"))==null?void 0:an[1])==null?void 0:So.slice(1,((wo=(Eo=(ko=$==null?void 0:$.label)==null?void 0:ko.split("#"))==null?void 0:Eo[1])==null?void 0:wo.length)-1))==null?void 0:No.split(","))==null||To.forEach(at=>{var dc,fc,pc,mc,hc,vc,gc;let aa=(hc=(mc=(pc=(fc=(dc=a.cloneDeep(at))==null?void 0:dc.split("["))==null?void 0:fc[1])==null?void 0:pc.split("]"))==null?void 0:mc[0])==null?void 0:hc.split("/"),Pt=(gc=(vc=a.cloneDeep(at))==null?void 0:vc.split("["))==null?void 0:gc[0];je.push({formMenuSelect:aa,groupSelect:Pt})}),{label:(Po=(Vo=(Bo=(_o=a.cloneDeep($==null?void 0:$.label))==null?void 0:_o.split("#"))==null?void 0:Bo[0])==null?void 0:Vo.replaceAll("'",""))==null?void 0:Po.replaceAll("$/","/"),formMenuGroup:je,columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((Do=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:Do.isParent)??!1,isRun:((Io=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:Io.isRun)??!1}}else return{label:(Mo=($o=(Oo=a.cloneDeep($==null?void 0:$.label))==null?void 0:Oo.split("#"))==null?void 0:$o[0])==null?void 0:Mo.replaceAll("$/","/"),formMenuSelect:(Fo=(Lo=(Ro=(zo=(Ao=(xo=dd(a.cloneDeep($==null?void 0:$.label)))==null?void 0:xo[1])==null?void 0:Ao.split("["))==null?void 0:zo[1])==null?void 0:Ro.split("]"))==null?void 0:Lo[0])==null?void 0:Fo.split("/"),groupSelect:(Wo=(jo=dd((Ho=(Ko=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ko.split("#"))==null?void 0:Ho[1]))==null?void 0:jo[0])==null?void 0:Wo.replace("(",""),columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((Uo=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:Uo.isParent)??!1,isRun:((qo=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:qo.isRun)??!1};else return{label:(nt=(lt=(Je=a.cloneDeep($==null?void 0:$.label))==null?void 0:Je.split("#"))==null?void 0:lt[0])==null?void 0:nt.replaceAll("$/","/"),formMenuSelect:(_e=(he=(Qe=(gt=(mt=a.cloneDeep($==null?void 0:$.label))==null?void 0:mt.split("["))==null?void 0:gt[1])==null?void 0:Qe.split("]"))==null?void 0:he[0])==null?void 0:_e.split("/"),groupSelect:(He=(et=(Re=(Ae=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ae.split("#"))==null?void 0:Re[1])==null?void 0:et.split("["))==null?void 0:He[0],columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((ot=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:ot.isParent)??!1,isRun:((ut=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:ut.isRun)??!1};else return{label:(nl=(tl=(Xo=(Go=(Yo=a.cloneDeep($==null?void 0:$.label))==null?void 0:Yo.split("["))==null?void 0:Go[0])==null?void 0:Xo.split(":"))==null?void 0:tl[((el=(Qo=(Zo=(Jo=a.cloneDeep($==null?void 0:$.label))==null?void 0:Jo.split("["))==null?void 0:Zo[0])==null?void 0:Qo.split(":"))==null?void 0:el.length)-1])==null?void 0:nl.replaceAll("$/","/"),formMenuSelect:(sl=(rl=(al=(ll=(ol=a.cloneDeep($==null?void 0:$.label))==null?void 0:ol.split("["))==null?void 0:ll[1])==null?void 0:al.split("]"))==null?void 0:rl[0])==null?void 0:sl.split("/"),groupSelect:(cl=(il=a.cloneDeep($==null?void 0:$.label))==null?void 0:il.split("["))==null?void 0:cl[0],columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((ul=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:ul.isParent)??!1,isRun:((dl=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:dl.isRun)??!1};else return{label:(ft=(rn=(fl=a.cloneDeep($==null?void 0:$.label))==null?void 0:fl.split("["))==null?void 0:rn[0])==null?void 0:ft.replaceAll("$/","/"),formMenuSelect:(ml=(zt=(vn=(pl=(Nn=a.cloneDeep($==null?void 0:$.label))==null?void 0:Nn.split("["))==null?void 0:pl[1])==null?void 0:vn.split("]"))==null?void 0:zt[0])==null?void 0:ml.split("/"),columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((cc=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:cc.isParent)??!1,isRun:((uc=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:uc.isRun)??!1}}}),f=f==null?void 0:f.map($=>{let te=$;return te.prop=$.label,te.align="center",te}),f=ux(f,(E=d==null?void 0:d.find($=>($==null?void 0:$.key)==="parentColumns"))==null?void 0:E.value),f.length!==0&&f.push({label:"操作"}),(C=d==null?void 0:d.find($=>($==null?void 0:$.key)==="parentColumns"))!=null&&C.value&&((S=(g=d==null?void 0:d.find($=>($==null?void 0:$.key)==="parentColumns"))==null?void 0:g.value)==null?void 0:S.length)>0&&(f=[f])),d!=null&&d.find($=>($==null?void 0:$.key)==="formContent")){const $=(w=d.find(G=>(G==null?void 0:G.key)==="formContent"))==null?void 0:w.value,te=((N=d.find(G=>(G==null?void 0:G.key)==="formGroup"))==null?void 0:N.value)??[];let le=[];Array.isArray($)&&$.forEach(G=>{let W=1;Array.isArray(G)&&(G!=null&&G.every(re=>!Array.isArray(re)))&&(W=G.length),G&&(Array.isArray(G)||(G=[G]),G.forEach(re=>{Array.isArray(re)||(re=[re]);let ce=[];re==null||re.forEach(ne=>{var Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De,be,Be,Ue,We,rt,it,Ze,qe,dt,ct,St,$t,Mt,xt,At,kt,me,Pe,Ke,Ye,Je,lt,nt,mt,gt,Qe,he,_e,Ae,Re,et,He,ot,ut,jt,hn,Wt,Nt,an,ko,Eo,wo,So,No,To,_o,Bo,Vo,Po,Do,Io,Oo,$o,Mo,xo,Ao,zo,Ro,Lo,Fo,Ko,Ho,jo,Wo,Uo,qo,Yo,Go,Xo,Jo,Zo,Qo,el,tl,nl,ol,ll,al,rl,sl,il,cl,ul,dl,fl;if(kl.value++,Array.isArray((Se=Object.values(ne))==null?void 0:Se[0]))ce.push({id:kl.value,key:(Ne=Object.keys(ne))==null?void 0:Ne[0],prop:(Te=Object.keys(ne))==null?void 0:Te[0],label:(Ie=Object.keys(ne))==null?void 0:Ie[0],value:"",width:Math.max(W,re.length),type:"Select",isMain:!!(!((ye=(Le=Object.values(ne))==null?void 0:Le[0])!=null&&ye.includes("loginUser"))&&((Oe=(Ee=Object.values(ne))==null?void 0:Ee[0])!=null&&Oe.includes("@"))),optionUrl:{type:"Select",selectRelateType:"自定义绑定",defaultSelect:($e=Object.values(ne))==null?void 0:$e[0]}});else if(!((ke=(de=Object.values(ne))==null?void 0:de[0])!=null&&ke.includes("/")&&((fe=(ee=Object.values(ne))==null?void 0:ee[0])!=null&&fe.includes("[")))||(ie=(we=Object.values(ne))==null?void 0:we[0])!=null&&ie.includes("loginUserSign"))(se=(Ce=Object.values(ne))==null?void 0:Ce[0])!=null&&se.includes("&&")||(ge=(ue=Object.values(ne))==null?void 0:ue[0])!=null&&ge.includes("loginUserSign")?ce.push({id:kl.value,key:(Ve=Object.keys(ne))==null?void 0:Ve[0],prop:(Me=Object.keys(ne))==null?void 0:Me[0],label:(xe=Object.keys(ne))==null?void 0:xe[0],value:!((pe=(ze=Object.values(ne))==null?void 0:ze[0])!=null&&pe.includes("loginUser"))&&!((be=(De=Object.values(ne))==null?void 0:De[0])!=null&&be.includes("loginUserSign"))&&((Ue=(Be=Object.values(ne))==null?void 0:Be[0])!=null&&Ue.includes("@"))?"":(it=(rt=(We=Object.values(ne))==null?void 0:We[0])==null?void 0:rt.split("&&"))==null?void 0:it[0],isShow:((ct=(dt=(qe=(Ze=Object.values(ne))==null?void 0:Ze[0])==null?void 0:qe.split("&&"))==null?void 0:dt[1])==null?void 0:ct.replace("#","==="))??"originalSignature",width:Math.max(W,re.length),isMain:!!(!(($t=(St=Object.values(ne))==null?void 0:St[0])!=null&&$t.includes("loginUser"))&&!((xt=(Mt=Object.values(ne))==null?void 0:Mt[0])!=null&&xt.includes("loginUserSign"))&&((kt=(At=Object.values(ne))==null?void 0:At[0])!=null&&kt.includes("@")))}):ce.push({id:kl.value,key:(me=Object.keys(ne))==null?void 0:me[0],prop:(Pe=Object.keys(ne))==null?void 0:Pe[0],label:(Ke=Object.keys(ne))==null?void 0:Ke[0],value:!((Je=(Ye=Object.values(ne))==null?void 0:Ye[0])!=null&&Je.includes("loginUser"))&&((nt=(lt=Object.values(ne))==null?void 0:lt[0])!=null&&nt.includes("@"))?"":(mt=Object.values(ne))==null?void 0:mt[0],width:Math.max(W,re.length),isMain:!!(!((Qe=(gt=Object.values(ne))==null?void 0:gt[0])!=null&&Qe.includes("loginUser"))&&((_e=(he=Object.values(ne))==null?void 0:he[0])!=null&&_e.includes("@"))&&!((Re=(Ae=Object.values(ne))==null?void 0:Ae[0])!=null&&Re.includes("#@"))),isMainUrl:(He=(et=Object.values(ne))==null?void 0:et[0])==null?void 0:He.includes("#@")});else{let rn;if((ut=(ot=Object.values(ne))==null?void 0:ot[0])!=null&&ut.includes("(")){let vn;(hn=(jt=Object.values(ne))==null?void 0:jt[0])!=null&&hn.includes("$##")?vn=(wo=(Eo=(ko=(an=(Nt=(Wt=Object.values(ne))==null?void 0:Wt[0])==null?void 0:Nt.split("$##"))==null?void 0:an[1])==null?void 0:ko.split(")"))==null?void 0:Eo[0])==null?void 0:wo.replaceAll("(",""):vn=(_o=(To=(No=(So=Object.values(ne))==null?void 0:So[0])==null?void 0:No.split(")"))==null?void 0:To[0])==null?void 0:_o.replaceAll("(",""),rn=[],(Bo=Fe.contentTransArrayToAll(vn,"/"))==null||Bo.forEach(zt=>{var ml;zt!=null&&zt.includes("[")?rn.push((ml=zt==null?void 0:zt.replace("/",":"))==null?void 0:ml.replaceAll("/","")):rn.push(zt==null?void 0:zt.replaceAll("/",""))})}else(Po=(Vo=Object.values(ne))==null?void 0:Vo[0])!=null&&Po.includes("$##")?rn=(xo=(Mo=($o=(Oo=(Io=(Do=Object.values(ne))==null?void 0:Do[0])==null?void 0:Io.split("$##"))==null?void 0:Oo[1])==null?void 0:$o.split("["))==null?void 0:Mo[0])==null?void 0:xo.split("/"):rn=(Lo=(Ro=(zo=(Ao=Object.values(ne))==null?void 0:Ao[0])==null?void 0:zo.split("["))==null?void 0:Ro[0])==null?void 0:Lo.split("/");let ft;(Ko=(Fo=Object.values(ne))==null?void 0:Fo[0])!=null&&Ko.includes("$##")?ft=(qo=(Uo=(Wo=(jo=(Ho=Object.values(ne))==null?void 0:Ho[0])==null?void 0:jo.split("$##"))==null?void 0:Wo[1])==null?void 0:Uo.split("@"))==null?void 0:qo[0]:ft=(Xo=(Go=(Yo=Object.values(ne))==null?void 0:Yo[0])==null?void 0:Go.split("@"))==null?void 0:Xo[0],ft!=null&&ft.includes("(")&&(ft=(Jo=ft==null?void 0:ft.split(")"))==null?void 0:Jo[1]),ft=(Qo=(Zo=ft==null?void 0:ft.replace("[",va))==null?void 0:Zo.split(va))==null?void 0:Qo[1];let Nn=(tl=(el=ft==null?void 0:ft.slice(0,ft.length-1))==null?void 0:el.split(":"))==null?void 0:tl.map(vn=>vn.replaceAll("'","")),pl=Nn;(Nn==null?void 0:Nn.length)===1&&pl.unshift(""),ce.push({id:kl.value,key:(nl=Object.keys(ne))==null?void 0:nl[0],prop:(ol=Object.keys(ne))==null?void 0:ol[0],label:(ll=Object.keys(ne))==null?void 0:ll[0],value:"",width:Math.max(W,re.length),type:"Select",isMain:!!(!((rl=(al=Object.values(ne))==null?void 0:al[0])!=null&&rl.includes("loginUser"))&&((sl=Object.values(ne))==null?void 0:sl[0]).includes("@")),optionUrl:{type:"Select",selectRelateType:"关联绑定列",menuSelect:rn,groupSelect:pl,filter:(cl=(il=Object.values(ne))==null?void 0:il[0])!=null&&cl.includes("$##")?(fl=(dl=(ul=Object.values(ne))==null?void 0:ul[0])==null?void 0:dl.split("$##"))==null?void 0:fl[0]:""}})}}),ce==null||ce.forEach(ne=>{le.push(ne)})}))}),p.push({key:"formFlex",contents:""}),p.push({key:"formGroup",contents:te}),p.push({key:"formContent",contents:le}),s.push({comp:"Form",compData:a.cloneDeep(p),name:(_=(V=d.find(G=>(G==null?void 0:G.key)==="groupName"))==null?void 0:V.value)==null?void 0:_.replaceAll("'",""),isShow:!0})}else if(d!=null&&d.find($=>($==null?void 0:$.key)==="extraButton"))s.push({key:"extraButton",value:{method:(P=d==null?void 0:d.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:P.value,value:[],path:(T=d==null?void 0:d.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:T.path,data:(D=d==null?void 0:d.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:D.data}});else if((f==null?void 0:f.length)!==0||((q=(z=d.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:z.value)==null?void 0:q.length)>0||((O=(Z=d.find($=>($==null?void 0:$.key)==="relatedPath"))==null?void 0:Z.value)==null?void 0:O.length)>0)if(p.push({key:"header",contents:f}),p.push({key:"childTree",contents:ud((M=d.find($=>($==null?void 0:$.key)==="childTree"))==null?void 0:M.value)??[]}),p.push({key:"tableContents",contents:ud((x=d.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:x.value)}),(A=f==null?void 0:f.filter($=>($==null?void 0:$.label)!=="操作"))!=null&&A.every($=>($==null?void 0:$.isRoute)===!0)&&((K=(F=(R=r==null?void 0:r.find($=>($==null?void 0:$.key)==="contentPath"))==null?void 0:R.value)==null?void 0:F.split("/"))==null?void 0:K[0])!=="算法库"&&((H=f==null?void 0:f.filter($=>($==null?void 0:$.label)!=="操作"))==null?void 0:H.length)!==0?(p.push({key:"extraButton",contents:[{label:"新建"},{label:"修改模板"},{label:"批量删除"},{label:"导入",type:"upload"},{label:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}]}),p.push({key:"rowButton",contents:[{label:"复制新增"},{label:"删除"}]})):(p.push({key:"extraButton",contents:[{label:"新增"},{label:"批量删除"},{label:"导入",type:"upload"},{label:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}]}),(J=f==null?void 0:f.filter($=>($==null?void 0:$.label)!=="操作"))!=null&&J.every($=>($==null?void 0:$.isRun)===!0)||((ae=(oe=(U=r==null?void 0:r.find($=>($==null?void 0:$.key)==="contentPath"))==null?void 0:U.value)==null?void 0:oe.split("/"))==null?void 0:ae[0])==="算法库"?p.push({key:"rowButton",contents:[{label:"查看"},{label:"复制新增"},{label:"编辑"},{label:"执行"},{label:"删除"}]}):p.push({key:"rowButton",contents:[{label:"查看"},{label:"复制新增"},{label:"编辑"},{label:"删除"}]})),p.push({key:"relatedFilter",contents:(Q=d.find($=>($==null?void 0:$.key)==="relatedPath"))==null?void 0:Q.value}),p.push({key:"tableFilter",contents:(X=d.find($=>($==null?void 0:$.key)==="tableFilter"))==null?void 0:X.value}),((B=d==null?void 0:d.filter($=>{var te;return(te=$==null?void 0:$.key)==null?void 0:te.includes("groupName")}))==null?void 0:B.length)===1)s.push({comp:"Table",compData:p,name:(j=(I=d.find($=>($==null?void 0:$.key)==="groupName"))==null?void 0:I.value)==null?void 0:j.replaceAll("'",""),isShow:!0});else{let $={comp:"Table",compData:p,isShow:!0};(Y=d==null?void 0:d.filter(te=>{var le;return(le=te==null?void 0:te.key)==null?void 0:le.includes("groupName")}))==null||Y.forEach(te=>{$[te.key.replace("groupName","name")]=te.value}),s.push($)}}),(s==null?void 0:s.length)>0)return{comp:"Group",compData:[{key:"groupContents",contents:s}],name:(c=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="contentPath"))==null?void 0:c.value,parentPath:(u=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="contentPath"))==null?void 0:u.parentPath}}))==null?void 0:l.filter(r=>r)},fx=t=>{var r,s;const n=(r=t.map(i=>{var u,d;let c=(d=(u=i.key.split("("))==null?void 0:u[1])==null?void 0:d.trim();return c==null?void 0:c.slice(0,c.length-1)}))==null?void 0:r.filter(i=>i),o=[];n==null||n.forEach(i=>{var u,d;const c=[];if((u=lo.contentTrans(i))==null||u.forEach(p=>{var f,h,m,y,v,b,k,E,C,g,S,w,N,V;if(p.includes("{")&&p.includes("[")){let _=a.cloneDeep(p).split(":");p=(b=(h=(f=a.cloneDeep(_))==null?void 0:f[0])==null?void 0:h.split("{"))==null?void 0:b[((v=(y=(m=a.cloneDeep(_))==null?void 0:m[0])==null?void 0:y.split("{"))==null?void 0:v.length)-1].replaceAll("'",""),c.push(p);let P=(C=(E=(k=_==null?void 0:_[(_==null?void 0:_.length)-1])==null?void 0:k.split("}"))==null?void 0:E[0])==null?void 0:C.replaceAll("'",'"'),T=[];(S=(g=P.slice(1,P.length-1))==null?void 0:g.split(","))==null||S.forEach(D=>{T.push(D)}),c.push(T)}else if(p.includes("{")){let _=(w=p.split(":"))==null?void 0:w[0];p=(V=_==null?void 0:_.split("{"))==null?void 0:V[((N=_==null?void 0:_.split("{"))==null?void 0:N.length)-1].replaceAll("'",""),c.push(p)}else c.push(p)}),!c.some(p=>Array.isArray(p)))o.push(c);else{let p=[];c==null||c.forEach((f,h)=>{h!==c.length-1&&p.push(f)}),(d=c==null?void 0:c[(c==null?void 0:c.length)-1])==null||d.forEach(f=>{let h=a.cloneDeep(p);h.push(f),o.push(h)})}});const l=(s=o.filter(i=>i.length!==0))==null?void 0:s.map(i=>{let c="";return i.forEach(u=>{!u.includes("{")&&!(u!=null&&u.includes("$"))&&(c=c===""?c+a.cloneDeep(u):c+"/"+a.cloneDeep(u))}),c});return[...new Set(l)]},px=t=>{var d,p,f,h;let n=[];const o=fx(a.cloneDeep(t)),l=JM(a.cloneDeep(t));n.push(l);const r=WM(a.cloneDeep(t));r&&n.push(r);const s=UM(a.cloneDeep(t));s&&((d=a.cloneDeep(s))==null||d.forEach(m=>{n.push(m)}));const i=(p=a.cloneDeep(t))==null?void 0:p.filter(m=>{var y;return(y=m==null?void 0:m.key)==null?void 0:y.includes("(")}).map(m=>ix(m,o)).filter(m=>(m==null?void 0:m.length)!==0);let c=[];i==null||i.forEach(m=>{m==null||m.forEach(y=>{c!=null&&c.find(v=>{var b,k;return((b=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="contentPath"))==null?void 0:b.value)===((k=y==null?void 0:y.find(E=>(E==null?void 0:E.key)==="contentPath"))==null?void 0:k.value)})?c=c==null?void 0:c.map(v=>{var k,E;return((k=v==null?void 0:v.find(C=>(C==null?void 0:C.key)==="contentPath"))==null?void 0:k.value)===((E=y==null?void 0:y.find(C=>(C==null?void 0:C.key)==="contentPath"))==null?void 0:E.value)&&(v=[...v,...y.filter(C=>(C==null?void 0:C.key)!=="contentPath")]),v}):c.push(y)})});let u=(f=a.cloneDeep(i))==null?void 0:f.map(m=>{var y,v;return(v=(y=m==null?void 0:m[0])==null?void 0:y.find(b=>(b==null?void 0:b.key)==="contentPath"))==null?void 0:v.value});return u==null||u.forEach(m=>{u!=null&&u.includes(m+Xr.value)}),c=(h=a.cloneDeep(c))==null?void 0:h.map(m=>{var v,b,k;let y=(v=m==null?void 0:m.find(E=>(E==null?void 0:E.key)==="contentPath"))==null?void 0:v.value;return(b=a.cloneDeep(u))!=null&&b.find(E=>E===y+Xr.value)?m=m==null?void 0:m.map(E=>((E==null?void 0:E.key)==="tableColumn"&&(E.isParent=!0),E)):(y==null?void 0:y[(y==null?void 0:y.length)-1])===Xr.value?m=m==null?void 0:m.map(E=>((E==null?void 0:E.key)==="tableColumn"&&(m!=null&&m.find(C=>(C==null?void 0:C.key)==="groupName"&&(C==null?void 0:C.value)==="方法明细"))&&(E.isRun=!0),E)):((k=y==null?void 0:y.split("/"))==null?void 0:k[0])==="算法程序"&&(m=m==null?void 0:m.map(E=>((E==null?void 0:E.key)==="tableColumn"&&(E.isRun=!0),E))),m}),n=[...n,...dx(c)],n},fd=t=>{var s,i,c;let n=t;const o=[];let l="",r=0;for(const u of n)r++,u.includes("'")||l.includes("'")?(l+=u.trim(),((i=(s=a.cloneDeep(l))==null?void 0:s.split("'"))==null?void 0:i.length)===3&&((c=a.cloneDeep(l))==null?void 0:c[l.length-1])==="'"?(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l=""):r===(t==null?void 0:t.length)&&(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):(l+=u.trim(),o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="");return(l==null?void 0:l.length)!==0&&o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),o},mx=t=>{var r,s,i;const n=(s=(r=lo.contentTransArray(a.cloneDeep(t)))==null?void 0:r.filter(c=>c!==""))==null?void 0:s.map(c=>c.replaceAll("==","#").replaceAll(",",","));let o=(i=n==null?void 0:n.filter(c=>!c.includes("/*")&&!c.includes("*/")))==null?void 0:i.map(c=>lo.parseGroupValue(c));return o=o==null?void 0:o.map(c=>{var f,h;let u=(f=fd(a.cloneDeep(c).value))==null?void 0:f.map(m=>{var y;return(m==null?void 0:m.length)===1&&(m=(y=m==null?void 0:m.replaceAll("<","["))==null?void 0:y.replaceAll(">","]")),m}).join("");return{key:(h=fd(a.cloneDeep(c).key))==null?void 0:h.map(m=>{var y;return(m==null?void 0:m.length)===1&&(m=(y=m==null?void 0:m.replaceAll("<","["))==null?void 0:y.replaceAll(">","]")),m}).join(""),value:u}}),px(o)};exports._sfc_main=FM;exports._sfc_main$1=KM;exports._sfc_main$2=HM;exports.expandToNewContents=mx;exports.savePageDataAsync=RM;
|
|
37
|
+
`||d==="\r"){i=u;continue}if(s.includes(d)){const p=i===-1?l:i;c={pattern:r.slice(u+1,p),start:u+1,end:p,prefix:d,prefixIndex:u,splitIndex:i,selectionEnd:l};break}}return c},S$=(t,n={debug:!1,useSelectionEnd:!1})=>{const o=t.selectionStart!==null?t.selectionStart:0,l=t.selectionEnd!==null?t.selectionEnd:0,r=n.useSelectionEnd?l:o,s=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(n.debug){const h=document.querySelector("#input-textarea-caret-position-mirror-div");h!=null&&h.parentNode&&h.parentNode.removeChild(h)}const i=document.createElement("div");i.id="input-textarea-caret-position-mirror-div",document.body.appendChild(i);const c=i.style,u=window.getComputedStyle(t),d=t.nodeName==="INPUT";c.whiteSpace=d?"nowrap":"pre-wrap",d||(c.wordWrap="break-word"),c.position="absolute",n.debug||(c.visibility="hidden"),s.forEach(h=>{if(d&&h==="lineHeight")if(u.boxSizing==="border-box"){const m=Number.parseInt(u.height),y=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),v=y+Number.parseInt(u.lineHeight);m>v?c.lineHeight=`${m-y}px`:m===v?c.lineHeight=u.lineHeight:c.lineHeight="0"}else c.lineHeight=u.height;else c[h]=u[h]}),a.isFirefox()?t.scrollHeight>Number.parseInt(u.height)&&(c.overflowY="scroll"):c.overflow="hidden",i.textContent=t.value.slice(0,Math.max(0,r)),d&&i.textContent&&(i.textContent=i.textContent.replace(/\s/g," "));const p=document.createElement("span");p.textContent=t.value.slice(Math.max(0,r))||".",p.style.position="relative",p.style.left=`${-t.scrollLeft}px`,p.style.top=`${-t.scrollTop}px`,i.appendChild(p);const f={top:p.offsetTop+Number.parseInt(u.borderTopWidth),left:p.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return n.debug?p.style.backgroundColor="#aaa":document.body.removeChild(i),f.left>=t.clientWidth&&(f.left=t.clientWidth),f},N$=a.buildProps({...L.inputProps,options:{type:a.definePropType(Array),default:()=>[]},prefix:{type:a.definePropType([String,Array]),default:"@",validator:t=>a.isString(t)?t.length===1:t.every(n=>a.isString(n)&&n.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:a.definePropType([Boolean,Function]),default:()=>E$,validator:t=>t===!1?!0:a.isFunction(t)},placement:{type:a.definePropType(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:a.definePropType(Function)},modelValue:String,loading:Boolean,popperClass:Ge.popperClass,popperStyle:Ge.popperStyle,popperOptions:{type:a.definePropType(Object),default:()=>({})},props:{type:a.definePropType(Object),default:()=>eh}}),T$={[L.UPDATE_MODEL_EVENT]:t=>a.isString(t),"whole-remove":(t,n)=>a.isString(t)&&a.isString(n),input:t=>a.isString(t),search:(t,n)=>a.isString(t)&&a.isString(n),select:(t,n)=>a.isObject$1(t)&&a.isString(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},eh={value:"value",label:"label",disabled:"disabled"},_$=a.buildProps({options:{type:a.definePropType(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),B$={select:t=>a.isString(t.value)},V$=e.defineComponent({name:"ElMentionDropdown"}),P$=e.defineComponent({...V$,props:_$,emits:B$,setup(t,{expose:n,emit:o}){const l=t,r=a.useNamespace("mention"),{t:s}=a.useLocale(),i=e.ref(-1),c=e.ref(),u=e.ref(),d=e.ref(),p=(C,g)=>[r.be("dropdown","item"),r.is("hovering",i.value===g),r.is("disabled",C.disabled||l.disabled)],f=C=>{C.disabled||l.disabled||o("select",C)},h=C=>{i.value=C},m=e.computed(()=>l.disabled||l.options.every(C=>C.disabled)),y=e.computed(()=>l.options[i.value]),v=()=>{y.value&&o("select",y.value)},b=C=>{const{options:g}=l;if(g.length===0||m.value)return;C==="next"?(i.value++,i.value===g.length&&(i.value=0)):C==="prev"&&(i.value--,i.value<0&&(i.value=g.length-1));const S=g[i.value];if(S.disabled){b(C);return}e.nextTick(()=>k(S))},k=C=>{var g,S,w,N;const{options:V}=l,_=V.findIndex(T=>T.value===C.value),P=(g=u.value)==null?void 0:g[_];if(P){const T=(w=(S=d.value)==null?void 0:S.querySelector)==null?void 0:w.call(S,`.${r.be("dropdown","wrap")}`);T&&L.scrollIntoView(T,P)}(N=c.value)==null||N.handleScroll()},E=()=>{m.value||l.options.length===0?i.value=-1:i.value=0};return e.watch(()=>l.options,E,{immediate:!0}),n({hoveringIndex:i,navigateOptions:b,selectHoverOption:v,hoverOption:y}),(C,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:d,class:e.normalizeClass(e.unref(r).b("dropdown"))},[C.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).be("dropdown","header"))},[e.renderSlot(C.$slots,"header")],2)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createVNode(e.unref(Ut),{id:C.contentId,ref_key:"scrollbarRef",ref:c,tag:"ul","wrap-class":e.unref(r).be("dropdown","wrap"),"view-class":e.unref(r).be("dropdown","list"),role:"listbox","aria-label":C.ariaLabel,"aria-orientation":"vertical"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.options,(S,w)=>(e.openBlock(),e.createElementBlock("li",{id:`${C.contentId}-${w}`,ref_for:!0,ref_key:"optionRefs",ref:u,key:w,class:e.normalizeClass(p(S,w)),role:"option","aria-disabled":S.disabled||C.disabled||void 0,"aria-selected":i.value===w,onMousemove:N=>h(w),onClick:e.withModifiers(N=>f(S),["stop"])},[e.renderSlot(C.$slots,"label",{item:S,index:w},()=>{var N;return[e.createElementVNode("span",null,e.toDisplayString((N=S.label)!=null?N:S.value),1)]})],42,["id","aria-disabled","aria-selected","onMousemove","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[e.vShow,C.options.length>0&&!C.loading]]),C.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).be("dropdown","loading"))},[e.renderSlot(C.$slots,"loading",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("el.mention.loading")),1)])],2)):e.createCommentVNode("v-if",!0),C.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(r).be("dropdown","footer"))},[e.renderSlot(C.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],2))}});var D$=a._export_sfc(P$,[["__file","mention-dropdown.vue"]]);const I$=e.defineComponent({name:"ElMention",inheritAttrs:!1}),O$=e.defineComponent({...I$,props:N$,emits:T$,setup(t,{expose:n,emit:o}){const l=t,r=e.computed(()=>L.pick(l,Object.keys(L.inputProps))),s=a.useNamespace("mention"),i=L.useFormDisabled(),c=L.useId(),u=e.ref(),d=e.ref(),p=e.ref(),f=e.ref(!1),h=e.ref(),m=e.ref(),y=e.computed(()=>l.showArrow?l.placement:`${l.placement}-start`),v=e.computed(()=>l.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=e.computed(()=>({...eh,...l.props})),k=O=>{const M={label:O[b.value.label],value:O[b.value.value],disabled:O[b.value.disabled]};return{...O,...M}},E=e.computed(()=>l.options.map(k)),C=e.computed(()=>{const{filterOption:O}=l;return!m.value||!O?E.value:E.value.filter(M=>O(m.value.pattern,M))}),g=e.computed(()=>f.value&&(!!C.value.length||l.loading)),S=e.computed(()=>{var O;return`${c.value}-${(O=p.value)==null?void 0:O.hoveringIndex}`}),w=O=>{o(L.UPDATE_MODEL_EVENT,O),o(L.INPUT_EVENT,O),z()},N=O=>{var M,x,A,R;if((M=u.value)!=null&&M.isComposing)return;const F=a.getEventCode(O);switch(F){case a.EVENT_CODE.left:case a.EVENT_CODE.right:z();break;case a.EVENT_CODE.up:case a.EVENT_CODE.down:if(!f.value)return;O.preventDefault(),(x=p.value)==null||x.navigateOptions(F===a.EVENT_CODE.up?"prev":"next");break;case a.EVENT_CODE.enter:case a.EVENT_CODE.numpadEnter:if(!f.value){l.type!=="textarea"&&z();return}O.preventDefault(),(A=p.value)!=null&&A.hoverOption?(R=p.value)==null||R.selectHoverOption():f.value=!1;break;case a.EVENT_CODE.esc:if(!f.value)return;O.preventDefault(),f.value=!1;break;case a.EVENT_CODE.backspace:if(l.whole&&m.value){const{splitIndex:K,selectionEnd:H,pattern:J,prefixIndex:U,prefix:oe}=m.value,ae=D();if(!ae)return;const Q=ae.value,X=E.value.find(I=>I.value===J);if((a.isFunction(l.checkIsWhole)?l.checkIsWhole(J,oe):X)&&K!==-1&&K+1===H){O.preventDefault();const I=Q.slice(0,U)+Q.slice(K+1);o(L.UPDATE_MODEL_EVENT,I),o(L.INPUT_EVENT,I),o("whole-remove",J,oe);const j=U;e.nextTick(()=>{ae.selectionStart=j,ae.selectionEnd=j,Z()})}}}},{wrapperRef:V}=L.useFocusController(u,{disabled:i,afterFocus(){z()},beforeBlur(O){var M;return(M=d.value)==null?void 0:M.isFocusInsideContent(O)},afterBlur(){f.value=!1}}),_=()=>{z()},P=O=>l.options.find(M=>O.value===M[b.value.value]),T=O=>{if(!m.value)return;const M=D();if(!M)return;const x=M.value,{split:A}=l,R=x.slice(m.value.end),F=R.startsWith(A),K=`${O.value}${F?"":A}`,H=x.slice(0,m.value.start)+K+R;o(L.UPDATE_MODEL_EVENT,H),o(L.INPUT_EVENT,H),o("select",P(O),m.value.prefix);const J=m.value.start+K.length+(F?1:0);e.nextTick(()=>{M.selectionStart=J,M.selectionEnd=J,M.focus(),Z()})},D=()=>{var O,M;return l.type==="textarea"?(O=u.value)==null?void 0:O.textarea:(M=u.value)==null?void 0:M.input},z=()=>{setTimeout(()=>{q(),Z(),e.nextTick(()=>{var O;return(O=d.value)==null?void 0:O.updatePopper()})},0)},q=()=>{const O=D();if(!O)return;const M=S$(O),x=O.getBoundingClientRect(),A=V.value.getBoundingClientRect();h.value={position:"absolute",width:0,height:`${M.height}px`,left:`${M.left+x.left-A.left}px`,top:`${M.top+x.top-A.top}px`}},Z=()=>{const O=D();if(document.activeElement!==O){f.value=!1;return}const{prefix:M,split:x}=l;if(m.value=w$(O,M,x),m.value&&m.value.splitIndex===-1){f.value=!0,o("search",m.value.pattern,m.value.prefix);return}f.value=!1};return n({input:u,tooltip:d,dropdownVisible:g}),(O,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:V,class:e.normalizeClass(e.unref(s).b())},[e.createVNode(e.unref(L.ElInput),e.mergeProps(e.mergeProps(e.unref(r),O.$attrs),{ref_key:"elInputRef",ref:u,"model-value":O.modelValue,disabled:e.unref(i),role:e.unref(g)?"combobox":void 0,"aria-activedescendant":e.unref(g)?e.unref(S)||"":void 0,"aria-controls":e.unref(g)?e.unref(c):void 0,"aria-expanded":e.unref(g)||void 0,"aria-label":O.ariaLabel,"aria-autocomplete":e.unref(g)?"none":void 0,"aria-haspopup":e.unref(g)?"listbox":void 0,onInput:w,onKeydown:N,onMousedown:_}),e.createSlots({_:2},[e.renderList(O.$slots,(x,A)=>({name:A,fn:e.withCtx(R=>[e.renderSlot(O.$slots,A,e.normalizeProps(e.guardReactiveProps(R)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),e.createVNode(e.unref(yt),{ref_key:"tooltipRef",ref:d,visible:e.unref(g),"popper-class":[e.unref(s).e("popper"),O.popperClass],"popper-style":O.popperStyle,"popper-options":O.popperOptions,placement:e.unref(y),"fallback-placements":e.unref(v),effect:"light",pure:"",offset:O.offset,"show-arrow":O.showArrow},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(h.value)},null,4)]),content:e.withCtx(()=>{var x;return[e.createVNode(D$,{ref_key:"dropdownRef",ref:p,options:e.unref(C),disabled:e.unref(i),loading:O.loading,"content-id":e.unref(c),"aria-label":O.ariaLabel,onSelect:T,onClick:e.withModifiers((x=u.value)==null?void 0:x.focus,["stop"])},e.createSlots({_:2},[e.renderList(O.$slots,(A,R)=>({name:R,fn:e.withCtx(F=>[e.renderSlot(O.$slots,R,e.normalizeProps(e.guardReactiveProps(F)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var $$=a._export_sfc(O$,[["__file","mention.vue"]]);const M$=a.withInstall($$),x$=a.buildProps({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),th=Symbol("splitterRootContextKey");function A$(t){const n=e.ref(),{width:o,height:l}=a.useElementSize(n),r=e.computed(()=>t.value==="horizontal"?o.value:l.value);return{containerEl:n,containerSize:r}}function lc(t){return Number(t.slice(0,-1))/100}function ac(t){return Number(t.slice(0,-2))}function rc(t){return a.isString(t)&&t.endsWith("%")}function sc(t){return a.isString(t)&&t.endsWith("px")}function z$(t,n){const o=e.computed(()=>t.value.map(c=>c.size)),l=e.computed(()=>t.value.length),r=e.ref([]);e.watch([o,l,n],()=>{var c;let u=[],d=0;for(let f=0;f<l.value;f+=1){const h=(c=t.value[f])==null?void 0:c.size;if(rc(h))u[f]=lc(h);else if(sc(h))u[f]=ac(h)/n.value;else if(h||h===0){const m=Number(h);Number.isNaN(m)||(u[f]=m/n.value)}else d+=1,u[f]=void 0}const p=u.reduce((f,h)=>f+(h||0),0);if(p>1||!d){const f=1/p;u=u.map(h=>h===void 0?0:h*f)}else{const f=(1-p)/d;u=u.map(h=>h===void 0?f:h)}r.value=u});const s=c=>c*n.value,i=e.computed(()=>r.value.map(s));return{percentSizes:r,pxSizes:i}}function R$(t,n,o,l){const r=b=>b*n.value||0;function s(b,k){return rc(b)?r(lc(b)):sc(b)?ac(b):b??k}const i=e.ref(0),c=e.ref(null);let u=[],d=a.NOOP;const p=e.computed(()=>t.value.map(b=>[b.min,b.max]));e.watch(l,()=>{if(i.value){const b=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(b)}});const f=b=>{i.value=0,c.value={index:b,confirmed:!1},u=o.value},h=(b,k)=>{var E,C;let g=null;if((!c.value||!c.value.confirmed)&&k!==0){if(k>0)g=b,c.value={index:b,confirmed:!0};else for(let z=b;z>=0;z-=1)if(u[z]>0){g=z,c.value={index:z,confirmed:!0};break}}const S=(C=g??((E=c.value)==null?void 0:E.index))!=null?C:b,w=[...u],N=S+1,V=s(p.value[S][0],0),_=s(p.value[N][0],0),P=s(p.value[S][1],n.value||0),T=s(p.value[N][1],n.value||0);let D=k;w[S]+D<V&&(D=V-w[S]),w[N]-D<_&&(D=w[N]-_),w[S]+D>P&&(D=P-w[S]),w[N]-D>T&&(D=w[N]-T),w[S]+=D,w[N]-=D,i.value=D,d=()=>{t.value.forEach((z,q)=>{z.size=w[q]}),d=a.NOOP},l.value||d()},m=()=>{l.value&&d(),i.value=0,c.value=null,u=[]},y=[];return{lazyOffset:i,onMoveStart:f,onMoving:h,onMoveEnd:m,movingIndex:c,onCollapse:(b,k)=>{y.length||y.push(...o.value);const E=o.value,C=k==="start"?b:b+1,g=k==="start"?b+1:b,S=E[C],w=E[g];if(S!==0&&w!==0)E[C]=0,E[g]+=S,y[b]=S;else{const N=S+w,V=y[b],_=N-V;E[g]=V,E[C]=_}t.value.forEach((N,V)=>{N.size=E[V]})}}}const L$=e.defineComponent({name:"ElSplitter"}),F$=e.defineComponent({...L$,props:x$,emits:["resizeStart","resize","resizeEnd","collapse"],setup(t,{emit:n}){const o=t,l=a.useNamespace("splitter"),r=e.toRef(o,"layout"),s=e.toRef(o,"lazy"),{containerEl:i,containerSize:c}=A$(r),{removeChild:u,children:d,addChild:p,ChildrenSorter:f}=mr(e.getCurrentInstance(),"ElSplitterPanel");e.watch(d,()=>{d.value.forEach((_,P)=>{_.setIndex(P)})});const{percentSizes:h,pxSizes:m}=z$(d,c),{lazyOffset:y,movingIndex:v,onMoveStart:b,onMoving:k,onMoveEnd:E,onCollapse:C}=R$(d,c,m,s),g=e.computed(()=>({[l.cssVarBlockName("bar-offset")]:s.value?`${y.value}px`:void 0})),S=_=>{b(_),n("resizeStart",_,m.value)},w=(_,P)=>{k(_,P),s.value||n("resize",_,m.value)},N=async _=>{E(),await e.nextTick(),n("resizeEnd",_,m.value)},V=(_,P)=>{C(_,P),n("collapse",_,P,m.value)};return e.provide(th,e.reactive({panels:d,percentSizes:h,pxSizes:m,layout:r,lazy:s,movingIndex:v,containerSize:c,onMoveStart:S,onMoving:w,onMoveEnd:N,onCollapse:V,registerPanel:p,unregisterPanel:u})),(_,P)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerEl",ref:i,class:e.normalizeClass([e.unref(l).b(),e.unref(l).e(e.unref(r))]),style:e.normalizeStyle(e.unref(g))},[e.renderSlot(_.$slots,"default"),e.createVNode(e.unref(f)),e.createCommentVNode(" Prevent iframe touch events from breaking "),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("mask"),e.unref(l).e(`mask-${e.unref(r)}`)])},null,2)):e.createCommentVNode("v-if",!0)],6))}});var K$=a._export_sfc(F$,[["__file","splitter.vue"]]);function H$(t){return t&&a.isObject$1(t)?t:{start:!!t,end:!!t}}function nd(t,n,o,l){return!!(t!=null&&t.collapsible.end&&n>0||o!=null&&o.collapsible.start&&l===0&&n>0)}const j$=e.defineComponent({name:"ElSplitterBar"}),W$=e.defineComponent({...j$,props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(t,{emit:n}){const o=t,l=a.useNamespace("splitter-bar"),r=e.computed(()=>o.layout==="horizontal"),s=e.computed(()=>r.value?{width:0}:{height:0}),i=e.computed(()=>({width:r.value?"16px":"100%",height:r.value?"100%":"16px",cursor:o.resizable?r.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),c=e.computed(()=>{const k=l.e("dragger");return{[`${k}-horizontal`]:r.value,[`${k}-vertical`]:!r.value,[`${k}-active`]:!!u.value}}),u=e.ref(null),d=k=>{o.resizable&&(u.value=[k.pageX,k.pageY],n("moveStart",o.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",f))},p=k=>{if(o.resizable&&k.touches.length===1){k.preventDefault();const E=k.touches[0];u.value=[E.pageX,E.pageY],n("moveStart",o.index),window.addEventListener("touchend",y),window.addEventListener("touchmove",h)}},f=k=>{const{pageX:E,pageY:C}=k,g=E-u.value[0],S=C-u.value[1],w=r.value?g:S;n("moving",o.index,w)},h=k=>{if(k.touches.length===1){k.preventDefault();const E=k.touches[0],C=E.pageX-u.value[0],g=E.pageY-u.value[1],S=r.value?C:g;n("moving",o.index,S)}},m=()=>{u.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",f),n("moveEnd",o.index)},y=()=>{u.value=null,window.removeEventListener("touchend",y),window.removeEventListener("touchmove",h),n("moveEnd",o.index)},v=e.computed(()=>r.value?a.arrow_left_default:a.arrow_up_default),b=e.computed(()=>r.value?a.arrow_right_default:a.arrow_down_default);return(k,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b()]),style:e.normalizeStyle(e.unref(s))},[t.startCollapsible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("collapse-icon"),e.unref(l).e(`${t.layout}-collapse-icon-start`)]),onClick:C=>n("collapse",t.index,"start")},[e.renderSlot(k.$slots,"start-collapsible",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(v)),{style:{width:"12px",height:"12px"}}))])],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("dragger"),e.unref(c),e.unref(l).is("disabled",!t.resizable),e.unref(l).is("lazy",t.resizable&&t.lazy)]),style:e.normalizeStyle(e.unref(i)),onMousedown:d,onTouchstart:p},null,38),t.endCollapsible?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(l).e("collapse-icon"),e.unref(l).e(`${t.layout}-collapse-icon-end`)]),onClick:C=>n("collapse",t.index,"end")},[e.renderSlot(k.$slots,"end-collapsible",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b)),{style:{width:"12px",height:"12px"}}))])],10,["onClick"])):e.createCommentVNode("v-if",!0)],6))}});var U$=a._export_sfc(W$,[["__file","split-bar.vue"]]);const q$=a.buildProps({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),nh="ElSplitterPanel",Y$=e.defineComponent({name:nh}),G$=e.defineComponent({...Y$,props:q$,emits:["update:size"],setup(t,{emit:n}){const o=t,l=a.useNamespace("splitter-panel"),r=e.inject(th);r||a.throwError(nh,"usage: <el-splitter><el-splitter-panel /></el-splitter/>");const{panels:s,layout:i,lazy:c,containerSize:u,pxSizes:d}=e.toRefs(r),{registerPanel:p,unregisterPanel:f,onCollapse:h,onMoveEnd:m,onMoveStart:y,onMoving:v}=r,b=e.ref(),k=e.getCurrentInstance(),E=k.uid,C=e.ref(0),g=e.computed(()=>s.value[C.value]),S=O=>{C.value=O},w=e.computed(()=>{var O;return g.value&&(O=d.value[C.value])!=null?O:0}),N=e.computed(()=>{var O;return g.value&&(O=d.value[C.value+1])!=null?O:0}),V=e.computed(()=>g.value?s.value[C.value+1]:null),_=e.computed(()=>{var O;return V.value?o.resizable&&((O=V.value)==null?void 0:O.resizable)&&(w.value!==0||!o.min)&&(N.value!==0||!V.value.min):!1}),P=e.computed(()=>g.value?C.value!==s.value.length-1:!1),T=e.computed(()=>nd(g.value,w.value,V.value,N.value)),D=e.computed(()=>nd(V.value,N.value,g.value,w.value));function z(O){return rc(O)?lc(O)*u.value||0:sc(O)?ac(O):O??0}let q=!1;e.watch(()=>o.size,()=>{if(!q&&g.value){if(!u.value){g.value.size=o.size;return}const O=z(o.size),M=z(o.max),x=z(o.min),A=Math.min(Math.max(O,x||0),M||O);A!==O&&n("update:size",A),g.value.size=A}}),e.watch(()=>{var O;return(O=g.value)==null?void 0:O.size},O=>{O!==o.size&&(q=!0,n("update:size",O),e.nextTick(()=>q=!1))}),e.watch(()=>o.resizable,O=>{g.value&&(g.value.resizable=O)});const Z=e.reactive({el:b.value,uid:E,getVnode:()=>k.vnode,setIndex:S,...o,collapsible:e.computed(()=>H$(o.collapsible))});return p(Z),e.onBeforeUnmount(()=>f(Z)),(O,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({ref_key:"panelEl",ref:b,class:[e.unref(l).b()],style:{flexBasis:`${e.unref(w)}px`}},O.$attrs),[e.renderSlot(O.$slots,"default")],16),e.unref(P)?(e.openBlock(),e.createBlock(U$,{key:0,index:C.value,layout:e.unref(i),lazy:e.unref(c),resizable:e.unref(_),"start-collapsible":e.unref(T),"end-collapsible":e.unref(D),onMoveStart:e.unref(y),onMoving:e.unref(v),onMoveEnd:e.unref(m),onCollapse:e.unref(h)},{"start-collapsible":e.withCtx(()=>[e.renderSlot(O.$slots,"start-collapsible")]),"end-collapsible":e.withCtx(()=>[e.renderSlot(O.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):e.createCommentVNode("v-if",!0)],64))}});var oh=a._export_sfc(G$,[["__file","split-panel.vue"]]);const X$=a.withInstall(K$,{SplitPanel:oh}),J$=a.withNoopInstall(oh);var Z$=[uv,gv,Py,$P,xy,Hy,a.ElBadge,Jy,Zy,L.ElButton,L.ElButtonGroup,Cb,Nb,Ab,zb,zC,kf,jC,Ht,Jb,df,GC,dk,fk,vr,Of,Fk,Kk,eE,tE,nE,oE,lE,M0,qf,W0,U0,tw,tp,fw,Xw,Jw,Zw,up,XS,JS,a.ElIcon,iN,mp,L.ElInput,hp,wN,VN,YN,GN,XN,JN,oT,YT,e_,c_,jd,Sp,bf,cC,iC,b_,S_,D_,Ut,An,Ga,BT,i1,g1,y1,A1,K1,Ap,Q1,iB,cB,hB,SV,NV,OP,GP,XP,un,Ui,NE,rD,fD,pD,yt,TD,lr,UD,cI,TI,AI,o$,l$,m$,h$,k$,M$,X$,J$];const Dt="ElInfiniteScroll",Q$=50,eM=200,tM=0,nM={delay:{type:Number,default:eM},distance:{type:Number,default:tM},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},ic=(t,n)=>Object.entries(nM).reduce((o,[l,r])=>{var s,i;const{type:c,default:u}=r,d=t.getAttribute(`infinite-scroll-${l}`);let p=(i=(s=n[d])!=null?s:d)!=null?i:u;return p=p==="false"?!1:p,p=c(p),o[l]=Number.isNaN(p)?u:p,o},{}),lh=t=>{const{observer:n}=t[Dt];n&&(n.disconnect(),delete t[Dt].observer)},oM=(t,n)=>{const{container:o,containerEl:l,instance:r,observer:s,lastScrollTop:i}=t[Dt],{disabled:c,distance:u}=ic(t,r),{clientHeight:d,scrollHeight:p,scrollTop:f}=l,h=f-i;if(t[Dt].lastScrollTop=f,s||c||h<0)return;let m=!1;if(o===t)m=p-(d+f)<=u;else{const{clientTop:y,scrollHeight:v}=t,b=ls(t,l);m=f+d>=b+y+v-u}m&&n.call(r)};function Yr(t,n){const{containerEl:o,instance:l}=t[Dt],{disabled:r}=ic(t,l);r||o.clientHeight===0||(o.scrollHeight<=o.clientHeight?n.call(l):lh(t))}const lM={async mounted(t,n){const{instance:o,value:l}=n;L.useDeprecated({scope:Dt,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),a.isFunction(l)||a.throwError(Dt,"'v-infinite-scroll' binding value must be a function"),await e.nextTick();const{delay:r,immediate:s}=ic(t,o),i=L.getScrollContainer(t,!0),c=i===window?document.documentElement:i,u=In(oM.bind(null,t,l),r);if(i){if(t[Dt]={instance:o,container:i,containerEl:c,delay:r,cb:l,onScroll:u,lastScrollTop:c.scrollTop},s){const d=new MutationObserver(In(Yr.bind(null,t,l),Q$));t[Dt].observer=d,d.observe(t,{childList:!0,subtree:!0}),Yr(t,l)}i.addEventListener("scroll",u)}},unmounted(t){if(!t[Dt])return;const{container:n,onScroll:o}=t[Dt];n==null||n.removeEventListener("scroll",o),lh(t)},async updated(t){if(!t[Dt])await e.nextTick();else{const{containerEl:n,cb:o,observer:l}=t[Dt];n.clientHeight&&l&&Yr(t,o)}}},Ws=lM;Ws.install=t=>{t.directive("InfiniteScroll",Ws)};const aM=Ws,ah=["primary","success","info","warning","error"],rM=a.buildProps({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:a.iconPropType},id:{type:String,default:""},message:{type:a.definePropType([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:a.definePropType(Function),default:()=>{}},onClose:{type:a.definePropType(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...ah,""],default:""},zIndex:Number,closeIcon:{type:a.iconPropType,default:a.close_default}}),sM={destroy:()=>!0},iM=e.defineComponent({name:"ElNotification"}),cM=e.defineComponent({...iM,props:rM,emits:sM,setup(t,{expose:n}){const o=t,{ns:l,zIndex:r}=a.useGlobalComponentSettings("notification"),{nextZIndex:s,currentZIndex:i}=r,c=e.ref(!1);let u;const d=e.computed(()=>{const E=o.type;return E&&a.TypeComponentsMap[o.type]?l.m(E):""}),p=e.computed(()=>o.type&&a.TypeComponentsMap[o.type]||o.icon),f=e.computed(()=>o.position.endsWith("right")?"right":"left"),h=e.computed(()=>o.position.startsWith("top")?"top":"bottom"),m=e.computed(()=>{var E;return{[h.value]:`${o.offset}px`,zIndex:(E=o.zIndex)!=null?E:i.value}});function y(){o.duration>0&&({stop:u}=a.useTimeoutFn(()=>{c.value&&b()},o.duration))}function v(){u==null||u()}function b(){c.value=!1}function k(E){switch(a.getEventCode(E)){case a.EVENT_CODE.delete:case a.EVENT_CODE.backspace:v();break;case a.EVENT_CODE.esc:c.value&&b();break;default:y();break}}return e.onMounted(()=>{y(),s(),c.value=!0}),a.useEventListener(document,"keydown",k),n({visible:c,close:b}),(E,C)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(l).b("fade"),onBeforeLeave:E.onClose,onAfterLeave:g=>E.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:E.id,class:e.normalizeClass([e.unref(l).b(),E.customClass,e.unref(f)]),style:e.normalizeStyle(e.unref(m)),role:"alert",onMouseenter:v,onMouseleave:y,onClick:E.onClick},[e.unref(p)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass([e.unref(l).e("icon"),e.unref(d)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(p))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("group"))},[e.createElementVNode("h2",{class:e.normalizeClass(e.unref(l).e("title")),textContent:e.toDisplayString(E.title)},null,10,["textContent"]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content")),style:e.normalizeStyle(E.title?void 0:{margin:0})},[e.renderSlot(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{innerHTML:E.message},null,8,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0},e.toDisplayString(E.message),1))])],6),[[e.vShow,E.message]]),E.showClose?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0,class:e.normalizeClass(e.unref(l).e("closeBtn")),onClick:e.withModifiers(b,["stop"])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.closeIcon)))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],2)],46,["id","onClick"]),[[e.vShow,c.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var uM=a._export_sfc(cM,[["__file","notification.vue"]]);const yo={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},ir=16;let dM=1;const Fn=function(t={},n){if(!a.isClient)return{close:()=>{}};(a.isString(t)||e.isVNode(t))&&(t={message:t});const o=t.position||"top-right";let l=t.offset||0;yo[o].forEach(({vm:p})=>{var f;l+=(((f=p.el)==null?void 0:f.offsetHeight)||0)+ir}),l+=ir;const r=`notification_${dM++}`,s=t.onClose,i={...t,offset:l,id:r,onClose:()=>{fM(r,o,s)}};let c=document.body;a.isElement(t.appendTo)?c=t.appendTo:a.isString(t.appendTo)&&(c=document.querySelector(t.appendTo)),a.isElement(c)||(a.debugWarn("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),c=document.body);const u=document.createElement("div"),d=e.createVNode(uM,i,a.isFunction(i.message)?i.message:e.isVNode(i.message)?()=>i.message:null);return d.appContext=a.isUndefined(n)?Fn._context:n,d.props.onDestroy=()=>{e.render(null,u)},e.render(d,u),yo[o].push({vm:d}),c.appendChild(u.firstElementChild),{close:()=>{d.component.exposed.visible.value=!1}}};ah.forEach(t=>{Fn[t]=(n={},o)=>((a.isString(n)||e.isVNode(n))&&(n={message:n}),Fn({...n,type:t},o))});function fM(t,n,o){const l=yo[n],r=l.findIndex(({vm:d})=>{var p;return((p=d.component)==null?void 0:p.props.id)===t});if(r===-1)return;const{vm:s}=l[r];if(!s)return;o==null||o(s);const i=s.el.offsetHeight,c=n.split("-")[0];l.splice(r,1);const u=l.length;if(!(u<1))for(let d=r;d<u;d++){const{el:p,component:f}=l[d].vm,h=Number.parseInt(p.style[c],10)-i-ir;f.props.offset=h}}function pM(){for(const t of Object.values(yo))t.forEach(({vm:n})=>{n.component.exposed.visible.value=!1})}function mM(t="top-right"){var n,o,l,r;let s=((l=(o=(n=yo[t][0])==null?void 0:n.vm.component)==null?void 0:o.props)==null?void 0:l.offset)||0;for(const{vm:i}of yo[t])i.component.props.offset=s,s+=(((r=i.el)==null?void 0:r.offsetHeight)||0)+ir}Fn.closeAll=pM;Fn.updateOffsets=mM;Fn._context=null;const hM=a.withInstallFunction(Fn,"$notify");var vM=[aM,xn.ElLoading,a.ElMessage,L.ElMessageBox,hM,wp],gM=lv([...Z$,...vM]);const yM={key:0,class:"dialog-overlay"},bM={class:"dialog-content"},CM={class:"dialog"},kM={class:"dialog-value"},EM={class:"dialog-item"},wM={class:"dialog-child"},SM={class:"dialog-actions"},NM={__name:"index",setup(t,{expose:n}){const o=e.ref(!1),l=e.ref(null);e.ref(!0);const r=e.ref([]),s=e.ref({}),i=e.ref([{label:"保留",value:"保留"},{label:"替换",value:"替换"}]),c=p=>{var h;o.value=!0,r.value=Object.keys(p);let f={};return(h=Object.keys(p))==null||h.forEach(m=>{f[m]="替换"}),s.value=f,new Promise(m=>{l.value=m})},u=(p,f)=>{let h=a.cloneDeep(s.value);h[p]=f,s.value=h},d=()=>{var p;o.value=!1,(p=l.value)==null||p.call(l,a.cloneDeep(s.value))};return e.onUnmounted(()=>{BM()}),n({show:c}),(p,f)=>o.value?(e.openBlock(),e.createElementBlock("div",yM,[e.createElementVNode("div",bM,[e.createElementVNode("div",CM,[f[1]||(f[1]=e.createElementVNode("div",{class:"dialog-title"},e.toDisplayString("冲突页面选择"),-1)),e.createElementVNode("div",kM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,h=>(e.openBlock(),e.createElementBlock("div",EM,[e.createElementVNode("div",wM,[e.createElementVNode("div",null,e.toDisplayString(h),1),e.createElementVNode("div",null,[e.createVNode(xn.ssRadio,{content:i.value,modelValue:s.value[h],"onUpdate:modelValue":m=>s.value[h]=m,onChange:m=>u(h,m)},null,8,["content","modelValue","onUpdate:modelValue","onChange"])])])]))),256))])]),e.createElementVNode("div",SM,[e.createVNode(e.unref(hh._sfc_main),{class:"menu-button click-button",onClickTrigger:f[0]||(f[0]=h=>d()),modelValue:"继续"})])])])):e.createCommentVNode("",!0)}},TM=vh._export_sfc(NM,[["__scopeId","data-v-4033db15"]]);let Fa=null,st="$R";const od=L.useMenuState();let Nl=null;const _M=()=>{const t=e.createApp(TM);t.use(gM);const n=document.createElement("div");return document.body.appendChild(n),t.mount(n)},ld=(t,n)=>{var l;return(l=ve.tableEveryContents(a.cloneDeep(t)))==null?void 0:l.map(r=>{var s,i,c,u,d;if(t.comp==="Table"){let p={comp:(s=ve.tableToStruct(a.cloneDeep(r)))==null?void 0:s.comp,compData:(i=ve.tableToStruct(a.cloneDeep(r)))==null?void 0:i.compData,isShow:r==null?void 0:r.isShow};return(u=(c=Object.keys(r))==null?void 0:c.filter(f=>f==null?void 0:f.includes("name")))==null||u.forEach(f=>{var h;p[f]=(h=ve.tableToStruct(a.cloneDeep(r)))==null?void 0:h[f]}),{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(r==null?void 0:r.parentTableContents)??"",parentPageKey:n==null?void 0:n.parentPath},value:{pageData:p}}}else if((r==null?void 0:r.key)==="extraButton"){if(((d=Object.values(r==null?void 0:r.value))==null?void 0:d.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structureMethod",version:1},value:{pageData:r.value}}}else return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(r==null?void 0:r.parentTableContents)??"",parentPageKey:n==null?void 0:n.parentPath},value:{pageData:r}}})},BM=()=>{Nl==null||Nl(!0),Fa=null,Nl=null},VM=async t=>(Fa||(Fa=_M()),await new Promise(async n=>{Nl=n;const o=await Fa.show(t);n(o)})),PM=async t=>{var m,y,v,b,k,E,C;let n=[],o=[],l=await a.getInsofDataApi({key:{type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((m=l==null?void 0:l.data)==null?void 0:m.code)!==200)return;let r=new WeakMap,s=(v=(y=l==null?void 0:l.data)==null?void 0:y.result)==null?void 0:v.filter(g=>{var S;return((S=g==null?void 0:g.key)==null?void 0:S.pageKey)!=="menu"});(s==null?void 0:s.length)===0||s==null||s.forEach(g=>{r[g.key.pageKey]={id:g==null?void 0:g.id,contents:g==null?void 0:g.value}});const i=new WeakMap;t==null||t.forEach(g=>{r[g.name]&&(i[g.name]=r[g.name])});let c=[],u=[];if(((b=Object.keys(i))==null?void 0:b.length)>0){od.setImportLoading(!1);const g=await VM(i);for(let S in g)g[S]==="保留"?c.push(S):u.push(S);od.setImportLoading(!0)}let d=a.cloneDeep(t);if((u==null?void 0:u.length)>0){let g=[];const S=u==null?void 0:u.map(async w=>{var V,_,P,T;const N=await a.getInsofDataApi({key:{pageKey:w,systemKey:sessionStorage.getItem("systemKey")}});((_=(V=N==null?void 0:N.data)==null?void 0:V.result)==null?void 0:_.length)>0&&((T=(P=N==null?void 0:N.data)==null?void 0:P.result)==null||T.forEach(D=>{g.push(D==null?void 0:D.id)}))});await Promise.all(S),await a.batchDeleteInsofDataApi({ids:g})}(c==null?void 0:c.length)>0&&(d=(k=a.cloneDeep(d))==null?void 0:k.filter(g=>!c.includes(g==null?void 0:g.name)));let p=[];d==null||d.map(async g=>{var S;await((S=g.compData)==null?void 0:S.forEach(async w=>{var V;const N=(V=a.cloneDeep(w==null?void 0:w.contents))==null?void 0:V.map(_=>{if(!Array.isArray(_)){const P=ld(a.cloneDeep(_),g);return P==null?void 0:P[0]}});N==null||N.forEach(_=>{p.push(_)})}))}),(p==null?void 0:p.length)>0&&await a.batchAddInsofDataApi({dataList:p});let f=new WeakMap;(C=(E=(await a.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:"data,structure,structureMethod"})).data.result)==null?void 0:E.filter(g=>{var S,w;return((S=g==null?void 0:g.key)==null?void 0:S.pageKey)!=="menu"&&((w=g==null?void 0:g.key)==null?void 0:w.pageKey)!=="secret"}))==null||C.forEach(g=>{f[g.key.pageKey]?f[g.key.pageKey]=[...f[g.key.pageKey],g]:f[g.key.pageKey]=[g]}),await(d==null?void 0:d.map(async g=>{var S;await((S=g.compData)==null?void 0:S.forEach(async w=>{var V,_,P;const N=(V=a.cloneDeep(w==null?void 0:w.contents))==null?void 0:V.map(T=>{if(!Array.isArray(T)){const D=ld(a.cloneDeep(T),g);return D==null?void 0:D[0]}});o.push({parentKey:ve.getParentKey((_=a.cloneDeep(g))==null?void 0:_.name),content:N}),(P=w.contents)==null||P.map(async T=>{var D;Array.isArray(T)||(D=ve.tableEveryContents(a.cloneDeep(T)))==null||D.forEach(async z=>{var q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y,$,te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee;if(T.comp==="Table"){let fe={comp:(q=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:q.comp,compData:(Z=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:Z.compData,isShow:z==null?void 0:z.isShow};(M=(O=Object.keys(z))==null?void 0:O.filter(ue=>ue==null?void 0:ue.includes("name")))==null||M.forEach(ue=>{var ge;fe[ue]=(ge=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:ge[ue]});let we=[];fe!=null&&fe.name1?we=(x=f==null?void 0:f[g.name])==null?void 0:x.filter(ue=>{var ge,Ve,Me,xe,ze,pe,De;return((ge=ue==null?void 0:ue.key)==null?void 0:ge.type)==="structure"&&((Me=(Ve=ue==null?void 0:ue.value)==null?void 0:Ve.pageData)==null?void 0:Me.name)===(fe==null?void 0:fe.name)&&((ze=(xe=ue==null?void 0:ue.value)==null?void 0:xe.pageData)==null?void 0:ze.name0)===(fe==null?void 0:fe.name0)&&((De=(pe=ue==null?void 0:ue.value)==null?void 0:pe.pageData)==null?void 0:De.name1)===(fe==null?void 0:fe.name1)}):fe!=null&&fe.name0?we=(A=f==null?void 0:f[g.name])==null?void 0:A.filter(ue=>{var ge,Ve,Me,xe,ze;return((ge=ue==null?void 0:ue.key)==null?void 0:ge.type)==="structure"&&((Me=(Ve=ue==null?void 0:ue.value)==null?void 0:Ve.pageData)==null?void 0:Me.name)===(fe==null?void 0:fe.name)&&((ze=(xe=ue==null?void 0:ue.value)==null?void 0:xe.pageData)==null?void 0:ze.name0)===(fe==null?void 0:fe.name0)}):we=(R=f==null?void 0:f[g.name])==null?void 0:R.filter(ue=>{var ge,Ve,Me;return((ge=ue==null?void 0:ue.key)==null?void 0:ge.type)==="structure"&&((Me=(Ve=ue==null?void 0:ue.value)==null?void 0:Ve.pageData)==null?void 0:Me.name)===(fe==null?void 0:fe.name)});const ie=(F=we==null?void 0:we[0])==null?void 0:F.id;let Ce=[];if(((J=(H=(K=fe==null?void 0:fe.compData)==null?void 0:K.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:H.contents)==null?void 0:J.length)>2&&((ae=(oe=(U=fe==null?void 0:fe.compData)==null?void 0:U.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:oe.contents)!=null&&ae.find(ue=>ue==null?void 0:ue.columnPath))){let ue=(B=(X=(Q=fe==null?void 0:fe.compData)==null?void 0:Q.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:X.contents)==null?void 0:B.find(be=>be==null?void 0:be.columnPath),ge=(Y=(j=(I=ue==null?void 0:ue.columnPath)==null?void 0:I.replace("[",st))==null?void 0:j.split(st))==null?void 0:Y[0],Ve=(le=(te=($=ue==null?void 0:ue.columnPath)==null?void 0:$.replace("[",st))==null?void 0:te.split(st))==null?void 0:le[1],Me=(W=(G=Ve==null?void 0:Ve.replace("[",st))==null?void 0:G.split(st))==null?void 0:W[0],xe=(ce=(re=Ve==null?void 0:Ve.replace("[",st))==null?void 0:re.split(st))==null?void 0:ce[1];xe=(Ie=(Te=(Ne=(Se=(ne=xe==null?void 0:xe.replace("]",st))==null?void 0:ne.split(st))==null?void 0:Se[0])==null?void 0:Ne.replaceAll("'",""))==null?void 0:Te.split(","))==null?void 0:Ie.map(be=>({label:be,prop:be}));let ze="";(Me==null?void 0:Me[(Me==null?void 0:Me.length)-1])===":"&&(Me=Me==null?void 0:Me.slice(0,(Me==null?void 0:Me.length)-1)),ze=(Ee=(ye=Me==null?void 0:Me.split(":"))==null?void 0:ye[((Le=Me==null?void 0:Me.split(":"))==null?void 0:Le.length)-1])==null?void 0:Ee.replaceAll("'","");let pe=($e=(Oe=f==null?void 0:f[ge])==null?void 0:Oe.find(be=>{var Be,Ue;return((Ue=(Be=be==null?void 0:be.value)==null?void 0:Be.pageData)==null?void 0:Ue.name)===ze}))==null?void 0:$e.id;const De=(de=ve.tableToContents(a.cloneDeep(z)))==null?void 0:de.map(be=>{var Ue,We,rt,it;let Be=(rt=(We=(Ue=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:Ue.compData)==null?void 0:We.find(Ze=>(Ze==null?void 0:Ze.key)==="header"))==null?void 0:rt.contents;if((Be==null?void 0:Be.findIndex(Ze=>Ze==null?void 0:Ze.columnPath))===0)Be=[...xe,...Be];else{let Ze=Be==null?void 0:Be.findIndex(dt=>dt==null?void 0:dt.columnPath),qe=Be.slice(Ze-1,(Be==null?void 0:Be.length)-1)??[];Be=[...Be.slice(0,Ze-1),...xe],Be=[...Be,...qe]}if((be==null?void 0:be.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:g.name,type:"data",tableId:ie,parentId:pe},value:{tableData:ve.getValueToObjectValue(be,(it=ve.getColumnContents(Be))==null?void 0:it.filter(Ze=>Ze&&Ze!=="操作"))}}});Ce=[...Ce,...De]}else{const ue=(ke=ve.tableToContents(a.cloneDeep(z)))==null?void 0:ke.map(ge=>{var Ve,Me,xe,ze;if((ge==null?void 0:ge.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:g.name,type:"data",tableId:ie},value:{tableData:ve.getValueToObjectValue(ge,(ze=ve.getColumnContents((xe=(Me=(Ve=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:Ve.compData)==null?void 0:Me.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:xe.contents))==null?void 0:ze.filter(pe=>pe!=="操作"))}}});Ce=[...Ce,...ue]}if((Ce==null?void 0:Ce.length)>0){const ue=await a.batchAddInsofDataApi({dataList:Ce});n.push(ue)}const se=await((ee=ve.tableToContents(a.cloneDeep(z)))==null?void 0:ee.map(async ue=>{var xe,ze,pe,De,be;let ge;(ue==null?void 0:ue.length)!==0&&(ge=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:g.name,type:"data",tableId:ie},value:{tableData:ve.getValueToObjectValue(ue,(De=ve.getColumnContents((pe=(ze=(xe=ve.tableToStruct(a.cloneDeep(z)))==null?void 0:xe.compData)==null?void 0:ze.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:pe.contents))==null?void 0:De.filter(Be=>Be!=="操作"))}}));const Ve=(be=f==null?void 0:f[g.name])==null?void 0:be.filter(Be=>{var Ue,We;return((Ue=Be==null?void 0:Be.key)==null?void 0:Ue.tableId)===ie&&((We=Be==null?void 0:Be.key)==null?void 0:We.type)==="structure"});return await(Ve==null?void 0:Ve.map(async Be=>{var We,rt,it;return await a.updateInsofDataApi({id:Be.id,key:{systemKey:Be.key.systemKey,pageKey:Be.key.pageKey,type:Be.key.type,version:Be.key.version,parentTable:Be.key.parentTable===""?"":(it=(rt=(We=ge==null?void 0:ge.data)==null?void 0:We.result)==null?void 0:rt[0])==null?void 0:it.id}})}))}));n.push(se)}})})}))})),await Promise.all(n),await ve.getParentConstruct(o)},rh=(t,n,o="")=>{var c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V,_;let l=(u=(c=t==null?void 0:t.replace("[",st))==null?void 0:c.split(st))==null?void 0:u[0],r=o,s=(m=(h=(f=(p=(d=t==null?void 0:t.replace("[",st))==null?void 0:d.split(st))==null?void 0:p[1])==null?void 0:f.replace("[",st))==null?void 0:h.split(st))==null?void 0:m[0];s=(v=s==null?void 0:s.split(":")[((y=s==null?void 0:s.split(":"))==null?void 0:y.length)-2])==null?void 0:v.replaceAll("'",""),((b=t==null?void 0:t.split("("))==null?void 0:b.length)>1&&(r=r===""?r+((k=t==null?void 0:t.split("("))==null?void 0:k[1]):r+","+((E=t==null?void 0:t.split("("))==null?void 0:E[1]));let i=(V=(N=(w=(S=(g=(C=n==null?void 0:n[l])==null?void 0:C.find(P=>{var T,D;return((D=(T=P==null?void 0:P.value)==null?void 0:T.pageData)==null?void 0:D.name)===s}))==null?void 0:g.value)==null?void 0:S.pageData)==null?void 0:w.compData)==null?void 0:N.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:V.contents;if(i!=null&&i.find(P=>P==null?void 0:P.columnPath)){let P=rh((_=i==null?void 0:i.find(T=>T==null?void 0:T.columnPath))==null?void 0:_.columnPath,n,r);return{pageKey:P==null?void 0:P.pageKey,filter:P==null?void 0:P.filter}}else return{pageKey:l,filter:r}},DM=async t=>{var s,i;let n=[],o=new WeakMap;(i=(s=(await a.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:"data,structure,structureMethod"})).data.result)==null?void 0:s.filter(c=>{var u,d;return((u=c==null?void 0:c.key)==null?void 0:u.pageKey)!=="menu"&&((d=c==null?void 0:c.key)==null?void 0:d.pageKey)!=="secret"}))==null||i.forEach(c=>{o[c.key.pageKey]?o[c.key.pageKey]=[...o[c.key.pageKey],c]:o[c.key.pageKey]=[c]});let r=a.cloneDeep(t);r==null||r.map(async c=>{var u;await((u=c.compData)==null?void 0:u.forEach(async d=>{var p;(p=d.contents)==null||p.map(async f=>{var h;Array.isArray(f)||(h=ve.tableEveryContents(a.cloneDeep(f)))==null||h.forEach(async m=>{var y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y;if(f.comp==="Table"){let $={comp:(y=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:y.comp,compData:(v=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:v.compData,isShow:m==null?void 0:m.isShow};(k=(b=Object.keys(m))==null?void 0:b.filter(W=>W==null?void 0:W.includes("name")))==null||k.forEach(W=>{var re;$[W]=(re=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:re[W]});const te=(E=o==null?void 0:o[c.name])==null?void 0:E.filter(W=>{var re,ce,ne;return((re=W==null?void 0:W.key)==null?void 0:re.type)==="structure"&&((ne=(ce=W==null?void 0:W.value)==null?void 0:ce.pageData)==null?void 0:ne.name)===($==null?void 0:$.name)}),le=(C=te==null?void 0:te[0])==null?void 0:C.id;let G=[];if(((w=(S=(g=$==null?void 0:$.compData)==null?void 0:g.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:S.contents)==null?void 0:w.length)>2&&((_=(V=(N=$==null?void 0:$.compData)==null?void 0:N.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:V.contents)!=null&&_.find(W=>W==null?void 0:W.columnPath))){let W=(D=(T=(P=$==null?void 0:$.compData)==null?void 0:P.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:T.contents)==null?void 0:D.find(de=>de==null?void 0:de.columnPath),re=rh(W==null?void 0:W.columnPath,o),ce=re==null?void 0:re.pageKey,ne=(z=re==null?void 0:re.filter)==null?void 0:z.replaceAll(")",""),Se=(O=(Z=(q=W==null?void 0:W.columnPath)==null?void 0:q.replace("[",st))==null?void 0:Z.split(st))==null?void 0:O[1],Ne=(x=(M=Se==null?void 0:Se.replace("[",st))==null?void 0:M.split(st))==null?void 0:x[0],Te=(R=(A=Se==null?void 0:Se.replace("[",st))==null?void 0:A.split(st))==null?void 0:R[1];Te=(U=(J=(H=(K=(F=Te==null?void 0:Te.replace("]",st))==null?void 0:F.split(st))==null?void 0:K[0])==null?void 0:H.replaceAll("'",""))==null?void 0:J.split(","))==null?void 0:U.map(de=>({label:de,prop:de}));let Ie="";(Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])===":"&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ie=(Q=(ae=Ne==null?void 0:Ne.split(":"))==null?void 0:ae[((oe=Ne==null?void 0:Ne.split(":"))==null?void 0:oe.length)-1])==null?void 0:Q.replaceAll("'","");let Le=(B=(X=o==null?void 0:o[ce])==null?void 0:X.find(de=>{var ke,ee;return((ee=(ke=de==null?void 0:de.value)==null?void 0:ke.pageData)==null?void 0:ee.name)===Ie}))==null?void 0:B.id,ye=(I=o==null?void 0:o[ce])==null?void 0:I.filter(de=>{var ke;return((ke=de==null?void 0:de.key)==null?void 0:ke.tableId)===Le}),Ee=ye,Oe=(j=o==null?void 0:o[c.name])==null?void 0:j.filter(de=>{var ke;return((ke=de==null?void 0:de.key)==null?void 0:ke.tableId)===le}),$e=await((Y=ve.tableToContents(a.cloneDeep(m)))==null?void 0:Y.map(async de=>{var ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De,be,Be,Ue,We,rt,it,Ze,qe,dt,ct,St,$t,Mt,xt,At,kt,me,Pe,Ke,Ye,Je,lt,nt,mt,gt;if((de==null?void 0:de.length)!==0){let Qe=(fe=(ee=(ke=ve.tableToStruct(a.cloneDeep(m)))==null?void 0:ke.compData)==null?void 0:ee.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:fe.contents;if((Qe==null?void 0:Qe.findIndex(He=>He==null?void 0:He.columnPath))===0)Qe=[...Te,...Qe];else{let He=Qe==null?void 0:Qe.findIndex(ut=>ut==null?void 0:ut.columnPath),ot=Qe.slice(He-1,(Qe==null?void 0:Qe.length)-1)??[];Qe=[...Qe.slice(0,He-1),...Te],Qe=[...Qe,...ot]}let he=ve.getValueToObjectValue(de,(we=ve.getColumnContents(Qe))==null?void 0:we.filter(He=>He!=="操作")),_e=(ue=(se=(Ce=(ie=m==null?void 0:m.compData)==null?void 0:ie.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:Ce.contents)==null?void 0:se.find(He=>He==null?void 0:He.columnPath))==null?void 0:ue.columnPath,Ae=(ge=Oe==null?void 0:Oe.find(He=>{var ot;return ve.sameKeys(he,(ot=He==null?void 0:He.value)==null?void 0:ot.tableData)}))==null?void 0:ge.id;_e=(De=(pe=(ze=(xe=(Me=_e==null?void 0:_e.split("["))==null?void 0:Me[((Ve=_e==null?void 0:_e.split("["))==null?void 0:Ve.length)-1])==null?void 0:xe.split("]"))==null?void 0:ze[0])==null?void 0:pe.replaceAll("'",""))==null?void 0:De.split(",");let Re=(be=ye==null?void 0:ye.find(He=>{var ot;return ve.sameKeys(he,(ot=He==null?void 0:He.value)==null?void 0:ot.tableData,_e)}))==null?void 0:be.id,et=(Be=Ee==null?void 0:Ee.find(He=>{var ot;return ve.sameKeys(he,(ot=He==null?void 0:He.value)==null?void 0:ot.tableData,_e)}))==null?void 0:Be.id;if(!Re&&!et){let He=(ct=(dt=(qe=(Ze=(it=(Ue=W==null?void 0:W.columnPath)==null?void 0:Ue.split("["))==null?void 0:it[((rt=(We=W==null?void 0:W.columnPath)==null?void 0:We.split("["))==null?void 0:rt.length)-1])==null?void 0:Ze.split("]"))==null?void 0:qe[0])==null?void 0:dt.replaceAll("'",""))==null?void 0:ct.split(","),ot=(xt=(Mt=($t=(St=ne==null?void 0:ne.split(","))==null?void 0:St.filter(Nt=>Nt==null?void 0:Nt.includes("@Condition")))==null?void 0:$t[0])==null?void 0:Mt.split("&&"))==null?void 0:xt[0],ut=(kt=(At=ot==null?void 0:ot.split(":"))==null?void 0:At[1])==null?void 0:kt.replaceAll("'",""),jt={};for(let Nt in he)He!=null&&He.find(an=>an===Nt)&&(jt[Nt]=he==null?void 0:he[Nt]);jt[(me=ut==null?void 0:ut.split("="))==null?void 0:me[0]]=(Pe=ut==null?void 0:ut.split("="))==null?void 0:Pe[1];let hn={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ce,type:"data",tableId:(Ye=(Ke=ye==null?void 0:ye[0])==null?void 0:Ke.key)==null?void 0:Ye.tableId,createUserId:(lt=(Je=ye==null?void 0:ye[0])==null?void 0:Je.key)==null?void 0:lt.createUserId,createUserLayer:(mt=(nt=ye==null?void 0:ye[0])==null?void 0:nt.key)==null?void 0:mt.createUserLayer},value:{tableData:jt}},Wt=await a.createInsofDataApi(hn);Re=(gt=Wt==null?void 0:Wt.data)==null?void 0:gt.result}if(ye=ye==null?void 0:ye.filter(He=>(He==null?void 0:He.id)!==Re),Re&&Ae)return{id:Ae,key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:c.name,type:"data",tableId:le,parentId:Re}}}}));$e=await Promise.all($e),$e=$e==null?void 0:$e.filter(de=>de),$e&&(G=[...G,...$e])}if((G==null?void 0:G.length)>0){const W=await a.batchUpdateInsofDataApi({dataList:G});n.push(W)}}})})}))}),await Promise.all(n)},Cl=t=>{var l;let n="",o=[];return(l=a.cloneDeep(t).split("/"))==null||l.forEach((r,s)=>{s!==a.cloneDeep(t).split("/").length-1&&o.push(r)}),o==null||o.forEach(r=>{n=n===""?n+r:n+"/"+r}),n},ad=(t,n)=>{var r;let o=(r=t==null?void 0:t.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:r.map(s=>s==null?void 0:s.label);return n==null?void 0:n.map(s=>ve.getValueToObjectValue(s,o))},rd=(t,n)=>{var o,l,r,s,i,c,u,d;return((l=(o=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:o.contents)==null?void 0:l.length)===0?ad((i=(s=(r=n==null?void 0:n.value)==null?void 0:r.compData)==null?void 0:s.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:i.contents,(c=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:c.contents):ad((u=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:u.contents,(d=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:d.contents)},sd=(t,n)=>{var l;let o=a.cloneDeep(t);return o.compData=(l=a.cloneDeep(o.compData))==null?void 0:l.map(r=>((r==null?void 0:r.key)==="formContent"&&(r.contents=n==null?void 0:n.map(s=>{var i,c;return s.value=((c=(i=r.contents)==null?void 0:i.find(u=>u.key===s.key))==null?void 0:c.value)??"",s})),r)),o},IM=async t=>{var i,c,u;let n=(i=a.cloneDeep(t))==null?void 0:i.map(d=>d==null?void 0:d.path);const o=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});if(o.data.code!==200)return;let l=new WeakMap;(c=o.data.result)==null||c.forEach(d=>{var f,h,m,y;let p=[{key:d==null?void 0:d.id,name:((h=(f=d==null?void 0:d.value)==null?void 0:f.pageData)==null?void 0:h.name)??"",value:(m=d==null?void 0:d.value)==null?void 0:m.pageData}];l[d.key.pageKey]=((y=l[d.key.pageKey])==null?void 0:y.length)>0?[...l[d.key.pageKey],...p]:p});let r=new WeakMap;n==null||n.forEach(d=>{l[d]&&(r[d]=l[d])});let s=a.cloneDeep(t);s=(u=a.cloneDeep(s))==null?void 0:u.map(d=>{var f,h,m,y;let p=(f=a.cloneDeep(d))==null?void 0:f.key;return p.tableId=(m=(h=r[d==null?void 0:d.path])==null?void 0:h.find(v=>{var b;return(v==null?void 0:v.name)===((b=a.cloneDeep(d))==null?void 0:b.name)}))==null?void 0:m.key,d={key:p,value:(y=a.cloneDeep(d))==null?void 0:y.value},d}),s.length!==0&&await a.batchAddInsofDataApi({dataList:s})},ha=(t,n)=>{var o,l,r,s,i,c,u,d,p,f,h,m,y,v,b;if(((l=(o=a.cloneDeep(t))==null?void 0:o.filter(k=>{var E;return(k==null?void 0:k.name)===((E=a.cloneDeep(n))==null?void 0:E.name)}))==null?void 0:l.length)===1)return{contents:(u=(c=(i=(s=(r=a.cloneDeep(t))==null?void 0:r.find(k=>{var E;return(k==null?void 0:k.name)===((E=a.cloneDeep(n))==null?void 0:E.name)}))==null?void 0:s.value)==null?void 0:i.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:u.contents,key:(p=(d=a.cloneDeep(t))==null?void 0:d.find(k=>{var E;return(k==null?void 0:k.name)===((E=a.cloneDeep(n))==null?void 0:E.name)}))==null?void 0:p.key};{let k,E,C=(y=(m=(h=(f=a.cloneDeep(n))==null?void 0:f.compData)==null?void 0:h.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:m.contents)==null?void 0:y.map(g=>g==null?void 0:g.key);return(b=(v=a.cloneDeep(t))==null?void 0:v.filter(g=>{var S;return(g==null?void 0:g.name)===((S=a.cloneDeep(n))==null?void 0:S.name)}))==null||b.forEach(g=>{var w,N,V,_,P,T,D,z;let S=(P=(_=(V=(N=(w=a.cloneDeep(g))==null?void 0:w.value)==null?void 0:N.compData)==null?void 0:V.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:_.contents)==null?void 0:P.map(q=>q==null?void 0:q.key);S&&C.every(q=>S.includes(q))&&(k=(z=(D=(T=g==null?void 0:g.value)==null?void 0:T.compData)==null?void 0:D.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:z.contents,E=g==null?void 0:g.key)}),{contents:k,key:E}}},OM=async t=>{var u,d,p;let n=[];(u=a.cloneDeep(t))==null||u.forEach(f=>{n.push(f.name);let h=Cl(a.cloneDeep(f.name));h!==""&&n.push(h)}),n=[...new Set(n)];const o=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});if(o.data.code!==200)return;let l=new WeakMap;(d=o.data.result)==null||d.forEach(f=>{var m,y,v,b;let h=[{key:f==null?void 0:f.id,name:((y=(m=f==null?void 0:f.value)==null?void 0:m.pageData)==null?void 0:y.name)??"",value:(v=f==null?void 0:f.value)==null?void 0:v.pageData}];l[f.key.pageKey]=((b=l[f.key.pageKey])==null?void 0:b.length)>0?[...l[f.key.pageKey],...h]:h});let r=new WeakMap;for(let f in l)n!=null&&n.find(h=>h===f)&&(r[f]=l[f]);let s=[],i=[],c=[];(p=a.cloneDeep(t))==null||p.forEach(f=>{var h,m;r!=null&&r[f.name]?(h=f==null?void 0:f.compData)==null||h.forEach(y=>{var v;(v=y==null?void 0:y.contents)==null||v.forEach(b=>{var k,E,C,g,S,w,N;if((b==null?void 0:b.comp)==="Table"){let V=rd((k=a.cloneDeep(b))==null?void 0:k.compData,(E=a.cloneDeep(r==null?void 0:r[f.name]))==null?void 0:E.find(_=>(_==null?void 0:_.name)===(b==null?void 0:b.name)));V==null||V.forEach(_=>{var P,T;i.push({key:{type:"data",pageKey:f==null?void 0:f.name,tableId:(T=(P=r==null?void 0:r[f.name])==null?void 0:P.find(D=>(D==null?void 0:D.name)===(b==null?void 0:b.name)))==null?void 0:T.key,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_}})})}else if((g=ha((C=a.cloneDeep(r))==null?void 0:C[f.name],a.cloneDeep(b)))!=null&&g.contents){let V=sd(a.cloneDeep(b),(S=ha(r==null?void 0:r[f.name],a.cloneDeep(b)))==null?void 0:S.contents);s!=null&&s.find(_=>{var P,T;return(_==null?void 0:_.id)===((T=ha((P=a.cloneDeep(r))==null?void 0:P[f.name],a.cloneDeep(b)))==null?void 0:T.key)})||s.push({id:(N=ha((w=a.cloneDeep(r))==null?void 0:w[f.name],a.cloneDeep(b)))==null?void 0:N.key,value:{pageData:V}})}})}):r!=null&&r[Cl(f.name)]&&((m=f==null?void 0:f.compData)==null||m.forEach(y=>{var v;(v=y==null?void 0:y.contents)==null||v.forEach(b=>{var k,E,C,g,S,w,N,V,_;if((b==null?void 0:b.comp)==="Table"){let P=(E=(k=r==null?void 0:r[Cl(f.name)])==null?void 0:k.find(D=>(D==null?void 0:D.name)===(b==null?void 0:b.name)))==null?void 0:E.value;i.push({key:{type:"structure",pageKey:f==null?void 0:f.name,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),version:1},value:{pageData:P}});let T=rd((C=a.cloneDeep(b))==null?void 0:C.compData,(g=a.cloneDeep(r==null?void 0:r[Cl(f.name)]))==null?void 0:g.find(D=>(D==null?void 0:D.name)===(b==null?void 0:b.name)));T==null||T.forEach(D=>{c.push({name:b.name,path:f.name,key:{type:"data",pageKey:f==null?void 0:f.name,tableId:"",systemKey:sessionStorage.getItem("systemKey")},value:{tableData:D}})})}else{let P=sd(a.cloneDeep(b),(_=(V=(N=(w=(S=a.cloneDeep(r==null?void 0:r[Cl(f.name)]))==null?void 0:S.find(T=>(T==null?void 0:T.name)===(b==null?void 0:b.name)))==null?void 0:w.value)==null?void 0:N.compData)==null?void 0:V.find(T=>(T==null?void 0:T.key)==="formContent"))==null?void 0:_.contents);i.push({key:{type:"structure",pageKey:f==null?void 0:f.name,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),version:1},value:{pageData:P}})}})}))}),i.length!==0&&(await a.batchAddInsofDataApi({dataList:i}),c.length!==0&&await IM(c),s.length!==0&&await a.batchUpdateInsofDataApi({dataList:s}))},sh=L.useMenuState(),Us=t=>t==null?void 0:t.map(n=>(n.contents&&(n.contents=n.contents.filter(o=>{var l;return((l=o.comp)==null?void 0:l.toUpperCase())!=="CALCULATOR"})),n.compData&&(n.compData=Us(n.compData)),n)),$M=async t=>{var o,l,r,s,i,c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V;const n=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if((t==null?void 0:t.length)===0){if(((o=n==null?void 0:n.data)==null?void 0:o.code)===200&&(s=(r=(l=n==null?void 0:n.data)==null?void 0:l.result)==null?void 0:r[0])!=null&&s.id){const _=(c=(i=n==null?void 0:n.data)==null?void 0:i.result)==null?void 0:c[0],P=(p=(d=(u=n==null?void 0:n.data)==null?void 0:u.result)==null?void 0:d[0])==null?void 0:p.key;P.systemType="管理系统",await a.updateInsofDataApi({id:_==null?void 0:_.id,key:P})}return}try{if(((f=n==null?void 0:n.data)==null?void 0:f.code)===200&&(y=(m=(h=n==null?void 0:n.data)==null?void 0:h.result)==null?void 0:m[0])!=null&&y.id){const _=(b=(v=n==null?void 0:n.data)==null?void 0:v.result)==null?void 0:b[0],P=(C=(E=(k=n==null?void 0:n.data)==null?void 0:k.result)==null?void 0:E[0])==null?void 0:C.key,T=(g=a.cloneDeep(t))==null?void 0:g.map(D=>{var z;return(z=D.compData)==null?void 0:z[0]});P.systemType=(w=(S=T==null?void 0:T.find(D=>(D==null?void 0:D.key)==="type"))==null?void 0:S.contents)==null?void 0:w[0],P.name=(V=(N=T==null?void 0:T.find(D=>(D==null?void 0:D.key)==="name"))==null?void 0:N.contents)==null?void 0:V[0],await a.updateInsofDataApi({id:_==null?void 0:_.id,key:P})}}catch(_){return Promise.reject(_)}},id=async t=>{var n,o,l,r;try{const s=await a.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"},value:{pageData:t}});if(((n=s==null?void 0:s.data)==null?void 0:n.code)===200){const i=(l=(o=t==null?void 0:t.compData)==null?void 0:o[0])==null?void 0:l.contents;sh.setRawMenus(i??[])}return(r=s==null?void 0:s.data)==null?void 0:r.code}catch(s){return Promise.reject(s)}},MM=async()=>{var t,n,o,l,r,s,i,c;try{const u=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"}});return((t=u==null?void 0:u.data)==null?void 0:t.code)===200&&((l=(o=(n=u==null?void 0:u.data)==null?void 0:n.result)==null?void 0:o[0])!=null&&l.id)&&await a.deleteInsofDataApi({id:(i=(s=(r=u==null?void 0:u.data)==null?void 0:r.result)==null?void 0:s[0])==null?void 0:i.id}),(c=u==null?void 0:u.data)==null?void 0:c.code}catch(u){return Promise.reject(u)}},ih=async(t,n)=>{var o,l,r,s;try{const i=await a.updateInsofDataApi({id:t,value:{pageData:n}});if(((o=i==null?void 0:i.data)==null?void 0:o.code)===200){const c=(r=(l=n==null?void 0:n.compData)==null?void 0:l[0])==null?void 0:r.contents;sh.setRawMenus(c??[])}return(s=i==null?void 0:i.data)==null?void 0:s.code}catch(i){return Promise.reject(i)}},xM=async()=>{var t;try{const n=L.generateKeyPair(),o=await a.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"},value:{cryptoInfo:{publicKey:n.publicKey,privateKey:n.privateKey}}});return((t=o==null?void 0:o.data)==null?void 0:t.code)===200}catch(n){throw n}},AM=async()=>{var n,o,l;const t=await a.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return!(((n=t==null?void 0:t.data)==null?void 0:n.code)===200&&((l=(o=t==null?void 0:t.data)==null?void 0:o.result)==null?void 0:l.length)>0)},zM=async()=>{var n,o,l;const t=await a.getInsofDataApi({key:{type:"system",pageKey:"secret",systemKey:sessionStorage.getItem("systemKey")}});return!(((n=t==null?void 0:t.data)==null?void 0:n.code)===200&&((l=(o=t==null?void 0:t.data)==null?void 0:o.result)==null?void 0:l.length)>0)},RM=async t=>{var o,l;let n=a.cloneDeep(t);if(n=[...n,gh.tempMenuPageData,yh.tempMainMenuPageData],sessionStorage.getItem("systemKey"))if(t!=null&&t.find(r=>(r==null?void 0:r.comp)==="System")){const r=n==null?void 0:n.find(d=>d.comp==="Menu"),s=n==null?void 0:n.filter(d=>d.comp==="System"),i=await AM(),c=await zM();i&&await id(r),await $M(s),c&&xM();const u=(o=Us(a.cloneDeep(n)))==null?void 0:o.filter(d=>{var p,f,h;return((p=d==null?void 0:d.comp)==null?void 0:p.toUpperCase())!=="MENU"&&((f=d==null?void 0:d.comp)==null?void 0:f.toUpperCase())!=="MENUTOP"&&((h=d==null?void 0:d.comp)==null?void 0:h.toUpperCase())!=="SYSTEM"});await PM(u),await DM(u)}else{const r=n==null?void 0:n.find(i=>i.comp==="Menu");await MM(),await id(r);const s=(l=Us(a.cloneDeep(n)))==null?void 0:l.filter(i=>{var c,u,d;return((c=i==null?void 0:i.comp)==null?void 0:c.toUpperCase())!=="MENU"&&((u=i==null?void 0:i.comp)==null?void 0:u.toUpperCase())!=="MENUTOP"&&((d=i==null?void 0:i.comp)==null?void 0:d.toUpperCase())!=="SYSTEM"});await OM(s)}};function LM(t="menu"){return{name:t,components:{ssMenu:no.ssMenu,DynamicIcon:no._sfc_main$1},setup(){const n=e.defineProps({mode:{type:String,default:"vertical"}}),o=e.ref("sub-menu-more"),l=L.useMenuState(),r=L.useModelComp(a.pinia),s=e.ref(0),i=Gs.useRouter(),{rawMenus:c,activeTopMenuPath:u,isRefreshMenus:d,menuTriggerType:p,permissionSideMenus:f,platform:h,cacheInputMenu:m,activeMainMenu:y,linkMenuInfo:v,updateMenuStatus:b}=a.storeToRefs(l),k=a.useLoginState(),{structureData:E}=a.storeToRefs(k),C=e.ref([]),g=e.ref([]),S=e.computed(()=>n==null?void 0:n.mode),w=e.ref({}),N=B=>B==null?void 0:B.map(I=>I.children&&I.children.length>0?{...I,children:I.level===0?[]:I.children??[],childMenus:N(I.children)}:I),V=(B,I)=>{var j,Y;return(Y=(j=g.value)==null?void 0:j.find($=>(B.title+I).includes($.value)))==null?void 0:Y.value},_=["系统管理/角色管理","系统管理/用户管理","系统管理/个人中心"],P=(B,I="",j=0)=>{var le;let Y=a.cloneDeep(B);const $=Array.from(new Set([...(le=E.value)==null?void 0:le.map(G=>{var W;return(W=G==null?void 0:G.key)==null?void 0:W.pageKey})]));return Array.isArray(Y)||(Y=[Y]),Y==null?void 0:Y.map(G=>{let W,re=I?`${I}/${G.title}`:G.title;_!=null&&_.includes(re)?W=I?`/${I}/${G.title}`:G.title:W=re;const ce={...G,path:W,level:j,show:!0,icon:V(G,j),carryData:$==null?void 0:$.includes(re),isPenultimate:!G.children,isRouter:_==null?void 0:_.includes(re),children:[],childMenus:[]};return G.children&&G.children.length>0&&(ce.children=P(G.children,W,j+1)),ce})},T=e.computed(()=>{let B=a.cloneDeep(C.value);if(B=[...B,...f.value],(B==null?void 0:B.length)===0)return i.push("/"),[];const I=J(B,K.value);I.isFlag||(B=I==null?void 0:I.data);const j=N(B);return l.setMenus(j),j}),D=async B=>{var $,te,le;let I,j;(B==null?void 0:B.level)===0?j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),rootNodePath:B==null?void 0:B.path,tableId:""}}:j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:"/平台管理/菜单管理/"+(B==null?void 0:B.path),tableId:""}};const Y=await a.getInsofDataApi(j);return(($=Y==null?void 0:Y.data)==null?void 0:$.code)===200&&(I=(le=(te=Y.data)==null?void 0:te.result)==null?void 0:le.map(G=>{var W;return{id:G==null?void 0:G.id,...(W=G==null?void 0:G.value)==null?void 0:W.tableData}}),(B==null?void 0:B.level)===0&&(w.value=a.cloneDeep(I))),(I==null?void 0:I.length)>0?I:null},z=(B,I)=>{var Y,$;const j=B==null?void 0:B.find(te=>(te==null?void 0:te.operateType)==="新增");return(($=(Y=m.value)==null?void 0:Y.data)==null?void 0:$.path)===(I==null?void 0:I.path)?j==null?void 0:j.menuIcon:V(I,I==null?void 0:I.level)},q=async(B,I)=>{if(!Array.isArray(I))return B;for(const j of I)if((j==null?void 0:j.path)===B.path)return{...B,config:await D(B)};return B},Z=e.ref(null),O=async(B,I=null)=>await Promise.all(B==null?void 0:B.map(async j=>{var te;let Y=await q(j,w.value);const $=(Y==null?void 0:Y.config)??((te=I==null?void 0:I.filter(le=>le.allowInherit))==null?void 0:te.map(le=>{var G;return{...le,structureIds:(G=I==null?void 0:I.find(W=>{var re;return((re=W==null?void 0:W.structureIds)==null?void 0:re.length)>0}))==null?void 0:G.structureIds}}));return Y!=null&&Y.childMenus&&(Y==null?void 0:Y.childMenus.length)>0&&(Y={...Y,icon:z($,j),config:$,children:await O(j==null?void 0:j.childMenus,$),childMenus:await O(j==null?void 0:j.childMenus,$)}),{...Y,icon:z($,j),config:$}})),M=async B=>(Z.value=null,await O(B.childMenus));e.watch(()=>v.value,B=>{var j,Y,$;if(!B)return;const I=(Y=(j=B==null?void 0:B.path)==null?void 0:j.split("/"))==null?void 0:Y[0];if(I){const te=($=C.value)==null?void 0:$.find(le=>(le==null?void 0:le.path)===I);if(!te||(l.setActiveTopMenuPath(I),!(te!=null&&te.children)))return;l.setAsideMenus(te==null?void 0:te.children),l.setActiveMenuPath(B==null?void 0:B.path),r.setRouteToChildPath(B==null?void 0:B.path)}},{immediate:!0});const x=async B=>{var I,j,Y,$;if(l.setLinkMenuInfo(null),l.setAsideMenuLoading(!0),r.setRouteToChildPath(""),l.setActiveTopMenuPath(B==null?void 0:B.path),l.setActiveMainMenu(B),Z.value=null,B!=null&&B.childMenus&&((I=B==null?void 0:B.childMenus)==null?void 0:I.length)>0){const te=await M(B),le=(te==null?void 0:te.length)===0?B==null?void 0:B.childMenus:te;l.setAsideMenus(le);const G=(Y=(j=B==null?void 0:B.childMenus)==null?void 0:j[0])==null?void 0:Y.path;l.setActiveMenuPath(G),l.setActiveAsideMenu(($=B==null?void 0:B.childMenus)==null?void 0:$[0])}else l.setAsideMenus([]);B.isRouter?i.push(B.path):i.push("/"),l.setAsideMenuLoading(!1)},A=B=>{r.setRouteToChildPath(""),p.value==="click"?s.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):B!==o.value&&l.setActiveMenuPath(B):l.setMenuTriggerType("click"),B!=null&&B.startsWith("/")?i.push(B):i.push("/"),s.value++},R=B=>{B!==o.value&&l.setActiveMenuPath(B)},F=B=>{const I=document.documentElement;B==null||B.forEach(j=>{I.style.setProperty(j.name,j.value)})};e.onMounted(()=>{s.value=1,g.value=xn.getSvgIcons()});const K=e.computed(()=>{const B=sessionStorage.getItem("authority");return B?JSON.parse(B):[]});e.watch(()=>h.value,B=>{B==="browser"?(F(bt.browserVerticalMenuClasses),F(bt.browserHorizontalMenuClasses)):B==="client"?(F(bt.clientHorizontalMenuClasses),F(bt.clientVerticalMenuClasses)):B==="three"&&(F(bt.threeHorizontalMenuClasses),F(bt.threeVerticalMenuClasses))},{immediate:!0}),e.watch(()=>c.value,B=>{if(g.value=xn.getSvgIcons(),B){b.value&&l.setActiveTopMenuPath(""),l.setActiveMenuPath(""),l.setAsideMenus([]);const I=B;C.value=P(a.convertRawToTree(I))}},{immediate:!0});const H=(B,I)=>{function j(Y){Y==null||Y.forEach($=>{var le,G;const te=(le=$==null?void 0:$.path)!=null&&le.startsWith("/")?(G=$==null?void 0:$.path)==null?void 0:G.substring(1):$==null?void 0:$.path;$.show=I==null?void 0:I.some(W=>W==null?void 0:W.includes(te)),$.children&&j($.children)})}return j(B),B},J=(B,I)=>{if(Array.isArray(I)){const j=Array.from(new Set(I==null?void 0:I.map(Y=>Y==null?void 0:Y.substring(0,Y.lastIndexOf("/")))));return{data:H(B,j),isFlag:!1}}else return{isFlag:(I==null?void 0:I.toUpperCase())==="SUPERADMIN"}},U=B=>{var j;const I=[B==null?void 0:B.title];if(B!=null&&B.children&&((j=B==null?void 0:B.children)==null?void 0:j.length)>0){const Y=B.children.map($=>U($));I.push(...Y)}return I},oe=(B,I,j,Y)=>B.map($=>{var te,le;if($.path===j){const G={...$};return Y==="create"?G.children.push(I):Y==="update"?G.children=(te=G.children)==null?void 0:te.map(W=>(W==null?void 0:W.path)===(I==null?void 0:I.path)?I:W):Y==="delete"&&(G.children=(le=G.children)==null?void 0:le.filter(W=>(W==null?void 0:W.path)!==(I==null?void 0:I.path))),G}else return{...$,children:oe($.children,I,j,Y)}}),ae=async B=>{var j,Y,$,te,le,G;const I=(j=E.value)==null?void 0:j.find(W=>{var re;return((re=W==null?void 0:W.key)==null?void 0:re.pageKey)==="menu"});if(I){const W={...(Y=I.value)==null?void 0:Y.pageData,compData:(le=(te=($=I.value)==null?void 0:$.pageData)==null?void 0:te.compData)==null?void 0:le.map(ce=>ce.key==="menuContents"?{...ce,contents:B}:ce)};await ih(I==null?void 0:I.id,W);const re=(G=T.value)==null?void 0:G.find(ce=>(ce==null?void 0:ce.path)===u.value);re&&await x(re),l.setUpdateMenuStatus(!0),l.setAsideMenuLoading(!1),l.setIsRefreshMenus(!1),a.ElMessage.success("响应成功")}else l.setAsideMenuLoading(!1)},Q=async B=>{var Y,$,te,le,G;const I=await a.getInsofDataApi({id:B});let j;return((Y=I==null?void 0:I.data)==null?void 0:Y.code)===200&&(j=(G=(le=(te=($=I==null?void 0:I.data)==null?void 0:$.result)==null?void 0:te[0])==null?void 0:le.value)==null?void 0:G.pageData),j},X=async B=>{var G,W,re;const I=(re=(W=(G=B==null?void 0:B.config)==null?void 0:G.find(ce=>(ce==null?void 0:ce.operateType)==="新增"))==null?void 0:W.structureIds)==null?void 0:re.filter(ce=>(ce==null?void 0:ce.key)==="contentConfig"),j=I==null?void 0:I.map(ce=>ce==null?void 0:ce.id);let Y=[];j==null||j.forEach(ce=>{ce&&Y.push(Q(ce))});const $=await Promise.all(Y),te=$==null?void 0:$.map(ce=>{const{id:ne,...Se}=ce;return Se}),le=te==null?void 0:te.map(ce=>({key:{pageKey:B==null?void 0:B.path,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",version:1,type:"structure"},value:{pageData:ce}}));await a.batchAddInsofDataApi({dataList:le})};return e.watch(()=>d.value,async B=>{var I,j,Y,$,te,le,G,W;if(B)try{const re=(Y=(j=(I=m.value)==null?void 0:I.data)==null?void 0:j.path)==null?void 0:Y.split("/").slice(0,-1).join("/"),ce=oe(C.value,($=m.value)==null?void 0:$.data,re,(te=m.value)==null?void 0:te.type),ne=(le=ce==null?void 0:ce.filter(Te=>Te.path!=="平台管理"))==null?void 0:le.map(Te=>U(Te));await X((G=m.value)==null?void 0:G.data),l.setAsideMenuLoading(!0),await ae(ne);const Se=await M(y.value),Ne=(Se==null?void 0:Se.length)===0?(W=y.value)==null?void 0:W.childMenus:Se;l.setAsideMenus(Ne)}catch(re){throw a.ElMessage.error(re),new Error(re)}},{immediate:!0}),{mode:S,renderMenuList:T,clickMenu:x,openMenu:A,closeMenu:R,changeMenuStyle:F}}}}const FM=e.defineComponent(LM());function ch(t="menu"){return{name:t,components:{SvgIcon:mh.SvgIcon,ssMenu:no.ssMenu,DynamicIcon:no._sfc_main$1,ssDialog:ph.ssDialog,ssInput:xn._sfc_main$2},setup(n,{emit:o}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),r=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=L.useMenuState(),i=L.useModelComp(a.pinia),c=e.ref(0),u=Gs.useRouter(),d=e.ref(),{asideMenus:p,menuTriggerType:f,platform:h}=a.storeToRefs(s),{fixMenuStatus:m}=a.storeToRefs(i),y=e.computed(()=>l==null?void 0:l.mode),v=X=>X==null?void 0:X.map(I=>{var j,Y;return!(I!=null&&I.children)||((j=I==null?void 0:I.children)==null?void 0:j.length)===0?I.config=r.value:I!=null&&I.children&&((Y=I==null?void 0:I.children)==null?void 0:Y.length)>0&&(I.children=v(I.children)),I}),b=e.computed(()=>{let X=[...p.value];if((X==null?void 0:X.length)===0)return u.push("/"),[];const B=N(X,S.value);return B.isFlag||(X=B==null?void 0:B.data),X=X==null?void 0:X.map(I=>{var j,Y;return!(I!=null&&I.children)||((j=I==null?void 0:I.children)==null?void 0:j.length)===0?I.config=r.value:I!=null&&I.children&&((Y=I==null?void 0:I.children)==null?void 0:Y.length)>0&&(I.children=v(I.children)),I}),X}),k=async(X,B)=>{i.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(X==null?void 0:X.path),s.setActiveAsideMenu(X),X.isRouter?u.push(X.path):u.push("/"),o("node-click",X,B)},E=async X=>{const B=a.findNodeByPropInTree(b.value,"path",X);s.setActiveAsideMenu(B),i.setRouteToChildPath(""),m.value?i.setFixMenuStatus(!1):f.value==="click"?c.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(X):(s.setMenuTriggerType("click"),s.setActiveMenuPath(X)),X!=null&&X.startsWith("/")?u.push(X):u.push("/"),c.value++},C=X=>{s.setActiveMenuPath(X)},g=X=>{const B=document.documentElement;X==null||X.forEach(I=>{B.style.setProperty(I.name,I.value)})};e.onMounted(()=>{c.value=1});const S=e.computed(()=>{const X=sessionStorage.getItem("authority");return X?JSON.parse(X):[]});e.watch(()=>h.value,X=>{X==="browser"?g(bt.browserVerticalMenuClasses):X==="client"?(g(bt.clientHorizontalMenuClasses),g(bt.clientVerticalMenuClasses)):X==="three"&&(g(bt.threeHorizontalMenuClasses),g(bt.threeVerticalMenuClasses))},{immediate:!0});const w=(X,B)=>{function I(j){j==null||j.forEach(Y=>{var te,le;const $=(te=Y==null?void 0:Y.path)!=null&&te.startsWith("/")?(le=Y==null?void 0:Y.path)==null?void 0:le.substring(1):Y==null?void 0:Y.path;Y.show=B==null?void 0:B.some(G=>G==null?void 0:G.includes($)),Y.children&&I(Y.children)})}return I(X),X},N=(X,B)=>{if(Array.isArray(B)){const I=Array.from(new Set(B==null?void 0:B.map(j=>j.substring(0,j.lastIndexOf("/")))));return{data:w(X,I),isFlag:!1}}else return{isFlag:(B==null?void 0:B.toUpperCase())==="SUPERADMIN"}},V=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),_=X=>Fe.getComponent(X),P=e.ref({}),T=e.ref([]),D=e.ref({}),z=e.ref({}),q=X=>{switch(X){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Z=e.ref({}),O=X=>{s.setCacheInputMenu({type:V.type,data:X}),s.setIsRefreshMenus(!0)},M=(X,B,I,j,Y=0)=>{let $=X;return $!=null&&$.every(te=>Array.isArray(te))&&($!=null&&$.every(te=>Array.isArray(te)&&te.length===1)?$=$==null?void 0:$.map(te=>((te==null?void 0:te[0])===I&&(te=[j]),te)):$=$==null?void 0:$.map(te=>{if(te!=null&&te.find(le=>le===(B==null?void 0:B[Y]))&&(B==null?void 0:B.length)!==1){let le=a.cloneDeep(B),G=te==null?void 0:te.filter(ne=>ne!==(le==null?void 0:le[Y])),W=Y+1,re=M(G,le,I,j,W),ce=[];ce.push(te==null?void 0:te[0]),re==null||re.forEach(ne=>{ce.push(ne)}),te=ce}return te})),$},x=(X,B,I=0)=>{let j=X;return j!=null&&j.every(Y=>Array.isArray(Y))&&(j!=null&&j.every(Y=>Array.isArray(Y)&&Y.length===1)?j=j==null?void 0:j.filter(Y=>(Y==null?void 0:Y[0])!==(B==null?void 0:B[I])):j=j==null?void 0:j.map(Y=>{if(Y!=null&&Y.find($=>$===(B==null?void 0:B[I]))&&(B==null?void 0:B.length)!==1){let $=a.cloneDeep(B),te=Y==null?void 0:Y.filter(re=>re!==($==null?void 0:$[I])),le=I+1,G=x(te,$,le),W=[];W.push(Y==null?void 0:Y[0]),G==null||G.forEach(re=>{W.push(re)}),Y=W}return Y})),j},A=(X,B,I,j=0)=>{let Y=X;return Y!=null&&Y.every($=>Array.isArray($))&&(Y!=null&&Y.every($=>Array.isArray($)&&$.length===1)?Y.push([I]):Y=Y==null?void 0:Y.map($=>{if($!=null&&$.find(te=>te===(B==null?void 0:B[j]))&&(B==null?void 0:B.length)!==1){let te=a.cloneDeep(B),le=$==null?void 0:$.filter(ce=>ce!==(te==null?void 0:te[j])),G=j+1,W=A(le,te,I,G),re=[];re.push($==null?void 0:$[0]),W==null||W.forEach(ce=>{re.push(ce)}),$=re}return $})),Y},R=async(X,B,I)=>{var j,Y,$,te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se;if(B==="create"){let ue=(I==null?void 0:I.title)+"(1)",ge=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ve=(Y=(j=ge==null?void 0:ge.data)==null?void 0:j.result)==null?void 0:Y[0],Me=($=Ve==null?void 0:Ve.value)==null?void 0:$.pageData;Me.compData=(te=Me.compData)==null?void 0:te.map(ze=>{var pe;return(ze==null?void 0:ze.key)==="menuContents"&&(ze.contents=A(ze.contents,(pe=I==null?void 0:I.path)==null?void 0:pe.split("/"),ue)),ze}),await a.updateInsofDataApi({id:Ve==null?void 0:Ve.id,value:{pageData:Me}});let xe=(G=(le=I==null?void 0:I.path)==null?void 0:le.split("/"))==null?void 0:G.filter((ze,pe)=>{var De,be;return pe!==((be=(De=I==null?void 0:I.path)==null?void 0:De.split("/"))==null?void 0:be.length)-1});xe.push(ue),xe=xe==null?void 0:xe.join("/"),await ve.newLoadingConstruct(I==null?void 0:I.path,xe),s.setUpdateMenuStatus(!1),await Tr.verifyStructureDataToStore(),s.setActiveMenuPath((ce=(re=(W=I==null?void 0:I.path)==null?void 0:W.split("/"))==null?void 0:re.filter((ze,pe)=>{var De,be;return pe!==((be=(De=I==null?void 0:I.path)==null?void 0:De.split("/"))==null?void 0:be.length)-1}))==null?void 0:ce.join("/")),s.setActiveTopMenuPath((Se=(ne=I==null?void 0:I.path)==null?void 0:ne.split("/"))==null?void 0:Se[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(B==="update")d.value=I;else if(B==="delete"){let ue=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:I==null?void 0:I.path}}),ge=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ve=(Te=(Ne=ge==null?void 0:ge.data)==null?void 0:Ne.result)==null?void 0:Te[0],Me=(Ie=Ve==null?void 0:Ve.value)==null?void 0:Ie.pageData;if(Me.compData=(Le=Me.compData)==null?void 0:Le.map(xe=>{var ze;return(xe==null?void 0:xe.key)==="menuContents"&&(xe.contents=x(xe.contents,(ze=I==null?void 0:I.path)==null?void 0:ze.split("/"))),xe}),await a.updateInsofDataApi({id:Ve==null?void 0:Ve.id,value:{pageData:Me}}),((Ee=(ye=ue==null?void 0:ue.data)==null?void 0:ye.result)==null?void 0:Ee.length)>0){let xe=($e=(Oe=ue==null?void 0:ue.data)==null?void 0:Oe.result)==null?void 0:$e.map(ze=>ze==null?void 0:ze.id);(xe==null?void 0:xe.length)>0&&await a.batchDeleteInsofDataApi({ids:xe})}else{let xe=await ve.getItemData((ee=(ke=(de=I==null?void 0:I.path)==null?void 0:de.split("/"))==null?void 0:ke.filter((pe,De)=>{var be,Be;return De!==((Be=(be=I==null?void 0:I.path)==null?void 0:be.split("/"))==null?void 0:Be.length)-1}))==null?void 0:ee.join("/"),sessionStorage.getItem("systemKey"),""),ze=[];xe==null||xe.forEach(pe=>{var be,Be,Ue,We,rt,it,Ze;let De=(We=(Ue=(Be=(be=pe==null?void 0:pe.compData)==null?void 0:be.find(qe=>(qe==null?void 0:qe.key)==="header"))==null?void 0:Be.contents)==null?void 0:Ue[0])==null?void 0:We.prop;(Ze=(it=(rt=pe==null?void 0:pe.compData)==null?void 0:rt.find(qe=>(qe==null?void 0:qe.key)==="tableContents"))==null?void 0:it.contents)==null||Ze.forEach(qe=>{var dt,ct,St;(qe==null?void 0:qe.length)>1?(qe==null?void 0:qe[1])===(I==null?void 0:I.title)&&ze.push((dt=qe==null?void 0:qe[0])==null?void 0:dt.id):((ct=qe==null?void 0:qe[0])==null?void 0:ct[De])===(I==null?void 0:I.title)&&ze.push((St=qe==null?void 0:qe[0])==null?void 0:St.id)})}),(ze==null?void 0:ze.length)>0&&await a.batchDeleteInsofDataApi({ids:ze})}s.setUpdateMenuStatus(!1),await Tr.verifyStructureDataToStore(),s.setActiveMenuPath((ie=(we=(fe=I==null?void 0:I.path)==null?void 0:fe.split("/"))==null?void 0:we.filter((xe,ze)=>{var pe,De;return ze!==((De=(pe=I==null?void 0:I.path)==null?void 0:pe.split("/"))==null?void 0:De.length)-1}))==null?void 0:ie.join("/")),s.setActiveTopMenuPath((se=(Ce=I==null?void 0:I.path)==null?void 0:Ce.split("/"))==null?void 0:se[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},F=async(X,B)=>{var G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e;let I=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),j=(W=(G=I==null?void 0:I.data)==null?void 0:G.result)==null?void 0:W[0],Y=(re=j==null?void 0:j.value)==null?void 0:re.pageData;Y.compData=(ce=Y.compData)==null?void 0:ce.map(de=>{var ke,ee;return(de==null?void 0:de.key)==="menuContents"&&(de.contents=M(de.contents,(ke=B==null?void 0:B.path)==null?void 0:ke.split("/"),B==null?void 0:B.title,(ee=X==null?void 0:X.target)==null?void 0:ee.value)),de}),j!=null&&j.id&&await a.updateInsofDataApi({id:j==null?void 0:j.id,value:{pageData:Y}});let $=(Se=(ne=B==null?void 0:B.path)==null?void 0:ne.split("/"))==null?void 0:Se.filter((de,ke)=>{var ee,fe;return ke!==((fe=(ee=B==null?void 0:B.path)==null?void 0:ee.split("/"))==null?void 0:fe.length)-1});$.push((Ne=X==null?void 0:X.target)==null?void 0:Ne.value),$=$==null?void 0:$.join("/");let te=await a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:B==null?void 0:B.path}}),le=(Ie=(Te=te==null?void 0:te.data)==null?void 0:Te.result)==null?void 0:Ie.map(de=>({id:de==null?void 0:de.id,key:de==null?void 0:de.key}));le=le==null?void 0:le.map(de=>(de.key.pageKey=$,de)),(le==null?void 0:le.length)>0&&await a.batchUpdateInsofDataApi({dataList:le}),s.setUpdateMenuStatus(!1),await Tr.verifyStructureDataToStore(),s.setActiveMenuPath((Ee=(ye=(Le=B==null?void 0:B.path)==null?void 0:Le.split("/"))==null?void 0:ye.filter((de,ke)=>{var ee,fe;return ke!==((fe=(ee=B==null?void 0:B.path)==null?void 0:ee.split("/"))==null?void 0:fe.length)-1}))==null?void 0:Ee.join("/")),s.setActiveTopMenuPath(($e=(Oe=B==null?void 0:B.path)==null?void 0:Oe.split("/"))==null?void 0:$e[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),d.value=void 0},K=async(X,B)=>{V.type=q(B==null?void 0:B.operateType),await R(B,V.type,X),z.value=X,Z.value=B},H=()=>{V.show=!1},J=X=>X==null?void 0:X.filter(B=>B.allowInherit),U=()=>{var I,j,Y,$,te;let X;V.type==="create"&&(X=((I=z.value)==null?void 0:I.path)+"/"+D.value[(j=D.value)==null?void 0:j.prop]),V.type==="update"&&(X=(Y=z.value)==null?void 0:Y.path);const B={...z.value,config:J(($=z.value)==null?void 0:$.config),children:[],childMenus:[],title:D.value[(te=D.value)==null?void 0:te.prop],path:X};console.log("clickSubmitForm",Z.value,z.value,B),O(B),V.show=!1},oe=X=>{var I,j;const B=(I=X==null?void 0:X.contents)==null?void 0:I.find(Y=>Y.key==="formContent");B&&(D.value=(j=B==null?void 0:B.contents)==null?void 0:j.reduce((Y,$)=>(Y[$.key]=$.value,Y.prop=$.key,Y),{}))},ae=e.ref(!1);return{isCollapse:ae,handleMenuCollapse:()=>{ae.value=!ae.value},handleCompChange:oe,dialogForm:P,dialogRenderComps:T,getComponents:_,clickSubmitForm:U,dialogInfo:V,beforeDialogDestroy:H,clickMenuIcon:K,mode:y,renderMenuList:b,clickMenu:k,openMenu:E,closeMenu:C,changeMenuStyle:g,fixElement:d,onBlur:F}}}}e.defineComponent(ch());const KM=e.defineComponent(ch("ThreeMenu"));function uh(t="menu"){return{name:t,components:{ssMenu:no.ssMenu,DynamicIcon:no._sfc_main$1},setup(){const n=e.defineProps({mode:{type:String,default:"vertical"}}),o=e.ref("sub-menu-more"),l=L.useMenuState(),r=L.useModelComp(a.pinia),s=e.ref(0),i=Gs.useRouter(),{rawMenus:c,activeTopMenuPath:u,isRefreshMenus:d,menuTriggerType:p,permissionSideMenus:f,platform:h,cacheInputMenu:m,activeMainMenu:y,linkMenuInfo:v,updateMenuStatus:b}=a.storeToRefs(l),k=a.useLoginState(),{structureData:E}=a.storeToRefs(k),C=e.ref([]),g=e.ref([]),S=e.computed(()=>n==null?void 0:n.mode),w=e.ref({}),N=B=>B==null?void 0:B.map(I=>I.children&&I.children.length>0?{...I,children:I.level===0?[]:I.children??[],childMenus:N(I.children)}:I),V=(B,I)=>{var j,Y;return(Y=(j=g.value)==null?void 0:j.find($=>(B.title+I).includes($.value)))==null?void 0:Y.value},_=["系统管理/角色管理","系统管理/用户管理","系统管理/个人中心"],P=(B,I="",j=0)=>{var le;let Y=a.cloneDeep(B);const $=Array.from(new Set([...(le=E.value)==null?void 0:le.map(G=>{var W;return(W=G==null?void 0:G.key)==null?void 0:W.pageKey})]));return Array.isArray(Y)||(Y=[Y]),Y==null?void 0:Y.map(G=>{let W,re=I?`${I}/${G.title}`:G.title;_!=null&&_.includes(re)?W=I?`/${I}/${G.title}`:G.title:W=re;const ce={...G,path:W,level:j,show:!0,icon:V(G,j),carryData:$==null?void 0:$.includes(re),isPenultimate:!G.children,isRouter:_==null?void 0:_.includes(re),children:[],childMenus:[]};return G.children&&G.children.length>0&&(ce.children=P(G.children,W,j+1)),ce})},T=e.computed(()=>{let B=a.cloneDeep(C.value);if(B=[...B,...f.value],(B==null?void 0:B.length)===0)return i.push("/"),[];const I=J(B,K.value);I.isFlag||(B=I==null?void 0:I.data);const j=N(B);return l.setMenus(j),j}),D=async B=>{var $,te,le;let I,j;(B==null?void 0:B.level)===0?j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),rootNodePath:B==null?void 0:B.path,tableId:""}}:j={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:"/平台管理/菜单管理/"+(B==null?void 0:B.path),tableId:""}};const Y=await a.getInsofDataApi(j);return(($=Y==null?void 0:Y.data)==null?void 0:$.code)===200&&(I=(le=(te=Y.data)==null?void 0:te.result)==null?void 0:le.map(G=>{var W;return{id:G==null?void 0:G.id,...(W=G==null?void 0:G.value)==null?void 0:W.tableData}}),(B==null?void 0:B.level)===0&&(w.value=a.cloneDeep(I))),(I==null?void 0:I.length)>0?I:null},z=(B,I)=>{var Y,$;const j=B==null?void 0:B.find(te=>(te==null?void 0:te.operateType)==="新增");return(($=(Y=m.value)==null?void 0:Y.data)==null?void 0:$.path)===(I==null?void 0:I.path)?j==null?void 0:j.menuIcon:V(I,I==null?void 0:I.level)},q=async(B,I)=>{if(!Array.isArray(I))return B;for(const j of I)if((j==null?void 0:j.path)===B.path)return{...B,config:await D(B)};return B},Z=e.ref(null),O=async(B,I=null)=>await Promise.all(B==null?void 0:B.map(async j=>{var te;let Y=await q(j,w.value);const $=(Y==null?void 0:Y.config)??((te=I==null?void 0:I.filter(le=>le.allowInherit))==null?void 0:te.map(le=>{var G;return{...le,structureIds:(G=I==null?void 0:I.find(W=>{var re;return((re=W==null?void 0:W.structureIds)==null?void 0:re.length)>0}))==null?void 0:G.structureIds}}));return Y!=null&&Y.childMenus&&(Y==null?void 0:Y.childMenus.length)>0&&(Y={...Y,icon:z($,j),config:$,children:await O(j==null?void 0:j.childMenus,$),childMenus:await O(j==null?void 0:j.childMenus,$)}),{...Y,icon:z($,j),config:$}})),M=async B=>(Z.value=null,await O(B.childMenus));e.watch(()=>v.value,B=>{var j,Y,$;if(!B)return;const I=(Y=(j=B==null?void 0:B.path)==null?void 0:j.split("/"))==null?void 0:Y[0];if(I){const te=($=C.value)==null?void 0:$.find(le=>(le==null?void 0:le.path)===I);if(!te||(l.setActiveTopMenuPath(I),!(te!=null&&te.children)))return;l.setAsideMenus(te==null?void 0:te.children),l.setActiveMenuPath(B==null?void 0:B.path),r.setRouteToChildPath(B==null?void 0:B.path)}},{immediate:!0});const x=async B=>{var I,j,Y,$;if(l.setLinkMenuInfo(null),l.setAsideMenuLoading(!0),r.setRouteToChildPath(""),l.setActiveTopMenuPath(B==null?void 0:B.path),l.setActiveMainMenu(B),Z.value=null,B!=null&&B.childMenus&&((I=B==null?void 0:B.childMenus)==null?void 0:I.length)>0){const te=await M(B),le=(te==null?void 0:te.length)===0?B==null?void 0:B.childMenus:te;l.setAsideMenus(le);const G=(Y=(j=B==null?void 0:B.childMenus)==null?void 0:j[0])==null?void 0:Y.path;l.setActiveMenuPath(G),l.setActiveAsideMenu(($=B==null?void 0:B.childMenus)==null?void 0:$[0])}else l.setAsideMenus([]);B.isRouter?i.push(B.path):i.push("/"),l.setAsideMenuLoading(!1)},A=B=>{r.setRouteToChildPath(""),p.value==="click"?s.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):B!==o.value&&l.setActiveMenuPath(B):l.setMenuTriggerType("click"),B!=null&&B.startsWith("/")?i.push(B):i.push("/"),s.value++},R=B=>{B!==o.value&&l.setActiveMenuPath(B)},F=B=>{const I=document.documentElement;B==null||B.forEach(j=>{I.style.setProperty(j.name,j.value)})};e.onMounted(()=>{s.value=1,g.value=xn.getSvgIcons()});const K=e.computed(()=>{const B=sessionStorage.getItem("authority");return B?JSON.parse(B):[]});e.watch(()=>h.value,B=>{B==="browser"?(F(bt.browserVerticalMenuClasses),F(bt.browserHorizontalMenuClasses)):B==="client"?(F(bt.clientHorizontalMenuClasses),F(bt.clientVerticalMenuClasses)):B==="three"&&(F(bt.threeHorizontalMenuClasses),F(bt.threeVerticalMenuClasses))},{immediate:!0}),e.watch(()=>c.value,B=>{if(g.value=xn.getSvgIcons(),B){b.value&&l.setActiveTopMenuPath(""),l.setActiveMenuPath(""),l.setAsideMenus([]);const I=B;C.value=P(a.convertRawToTree(I))}},{immediate:!0});const H=(B,I)=>{function j(Y){Y==null||Y.forEach($=>{var le,G;const te=(le=$==null?void 0:$.path)!=null&&le.startsWith("/")?(G=$==null?void 0:$.path)==null?void 0:G.substring(1):$==null?void 0:$.path;$.show=I==null?void 0:I.some(W=>W==null?void 0:W.includes(te)),$.children&&j($.children)})}return j(B),B},J=(B,I)=>{if(Array.isArray(I)){const j=Array.from(new Set(I==null?void 0:I.map(Y=>Y==null?void 0:Y.substring(0,Y.lastIndexOf("/")))));return{data:H(B,j),isFlag:!1}}else return{isFlag:(I==null?void 0:I.toUpperCase())==="SUPERADMIN"}},U=B=>{var j;const I=[B==null?void 0:B.title];if(B!=null&&B.children&&((j=B==null?void 0:B.children)==null?void 0:j.length)>0){const Y=B.children.map($=>U($));I.push(...Y)}return I},oe=(B,I,j,Y)=>B.map($=>{var te,le;if($.path===j){const G={...$};return Y==="create"?G.children.push(I):Y==="update"?G.children=(te=G.children)==null?void 0:te.map(W=>(W==null?void 0:W.path)===(I==null?void 0:I.path)?I:W):Y==="delete"&&(G.children=(le=G.children)==null?void 0:le.filter(W=>(W==null?void 0:W.path)!==(I==null?void 0:I.path))),G}else return{...$,children:oe($.children,I,j,Y)}}),ae=async B=>{var j,Y,$,te,le,G;const I=(j=E.value)==null?void 0:j.find(W=>{var re;return((re=W==null?void 0:W.key)==null?void 0:re.pageKey)==="menu"});if(I){const W={...(Y=I.value)==null?void 0:Y.pageData,compData:(le=(te=($=I.value)==null?void 0:$.pageData)==null?void 0:te.compData)==null?void 0:le.map(ce=>ce.key==="menuContents"?{...ce,contents:B}:ce)};await ih(I==null?void 0:I.id,W);const re=(G=T.value)==null?void 0:G.find(ce=>(ce==null?void 0:ce.path)===u.value);re&&await x(re),l.setUpdateMenuStatus(!0),l.setAsideMenuLoading(!1),l.setIsRefreshMenus(!1),a.ElMessage.success("响应成功")}else l.setAsideMenuLoading(!1)},Q=async B=>{var Y,$,te,le,G;const I=await a.getInsofDataApi({id:B});let j;return((Y=I==null?void 0:I.data)==null?void 0:Y.code)===200&&(j=(G=(le=(te=($=I==null?void 0:I.data)==null?void 0:$.result)==null?void 0:te[0])==null?void 0:le.value)==null?void 0:G.pageData),j},X=async B=>{var G,W,re;const I=(re=(W=(G=B==null?void 0:B.config)==null?void 0:G.find(ce=>(ce==null?void 0:ce.operateType)==="新增"))==null?void 0:W.structureIds)==null?void 0:re.filter(ce=>(ce==null?void 0:ce.key)==="contentConfig"),j=I==null?void 0:I.map(ce=>ce==null?void 0:ce.id);let Y=[];j==null||j.forEach(ce=>{ce&&Y.push(Q(ce))});const $=await Promise.all(Y),te=$==null?void 0:$.map(ce=>{const{id:ne,...Se}=ce;return Se}),le=te==null?void 0:te.map(ce=>({key:{pageKey:B==null?void 0:B.path,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",version:1,type:"structure"},value:{pageData:ce}}));await a.batchAddInsofDataApi({dataList:le})};return e.watch(()=>d.value,async B=>{var I,j,Y,$,te,le,G,W;if(B)try{const re=(Y=(j=(I=m.value)==null?void 0:I.data)==null?void 0:j.path)==null?void 0:Y.split("/").slice(0,-1).join("/"),ce=oe(C.value,($=m.value)==null?void 0:$.data,re,(te=m.value)==null?void 0:te.type),ne=(le=ce==null?void 0:ce.filter(Te=>Te.path!=="平台管理"))==null?void 0:le.map(Te=>U(Te));await X((G=m.value)==null?void 0:G.data),l.setAsideMenuLoading(!0),await ae(ne);const Se=await M(y.value),Ne=(Se==null?void 0:Se.length)===0?(W=y.value)==null?void 0:W.childMenus:Se;l.setAsideMenus(Ne)}catch(re){throw a.ElMessage.error(re),new Error(re)}},{immediate:!0}),{mode:S,renderMenuList:T,clickMenu:x,openMenu:A,closeMenu:R,changeMenuStyle:F}}}}e.defineComponent(uh());const HM=e.defineComponent(uh("ThreeMenu")),jM=t=>({comp:"MenuTop",compData:[{key:"menuContents",contents:JSON.parse(t==null?void 0:t.value.trim().replaceAll("'",'"'))}],name:""}),WM=t=>{const n=t==null?void 0:t.filter(l=>{var r;return!((r=l==null?void 0:l.key)!=null&&r.includes("("))}),o=n==null?void 0:n.find(l=>{var r;return ve.IsJson(l.value.replaceAll("'",'"'))&&((r=JSON.parse(l.value.replaceAll("'",'"')))==null?void 0:r.every(s=>typeof s=="string"))});if(o)return jM(o)},UM=t=>{var r;let n=[];const o=t==null?void 0:t.filter(s=>{var i;return!((i=s==null?void 0:s.key)!=null&&i.includes("("))}),l=o==null?void 0:o.find(s=>{var i;return ve.IsJson(s.value.replaceAll("'",'"'))&&!((i=JSON.parse(s.value.replaceAll("'",'"')))!=null&&i.every(c=>typeof c=="string"))});if(l)return(r=JSON.parse(l.value.replaceAll("'",'"')))==null||r.forEach(s=>{var i,c,u,d;((i=Object.keys(s))==null?void 0:i[0])==="类型"?n.push({comp:"System",compData:[{key:"type",contents:[(c=Object.values(s))==null?void 0:c[0]]}]}):((u=Object.keys(s))==null?void 0:u[0])==="名称"&&n.push({comp:"System",compData:[{key:"name",contents:[(d=Object.values(s))==null?void 0:d[0]]}]})}),n};e.ref(0);const qM=t=>{const n=[];let o=[];return t==null||t.forEach((l,r)=>{var s;(o==null?void 0:o.length)===0?o.push(l):(o.push(l),((s=t[r+1])==null?void 0:s.key)==="groupName"&&(n.push(o),o=[]))}),n.push(o),n},dh=t=>{const n=[];let o=!1;return t.forEach(l=>{Array.isArray(l)&&(o=!0,l.forEach(r=>{const s=t.map(i=>i===l?r:i);n.push(...dh(s))}))}),o?n:[t]},YM=ve.useOriginalState(a.pinia),{originalPath:GM}=a.storeToRefs(YM),XM=t=>{var s,i,c;const n=(s=t.map(u=>{var p,f;let d=(f=(p=u.key.split("("))==null?void 0:p[1])==null?void 0:f.trim();return d==null?void 0:d.slice(0,d.length-1)}))==null?void 0:s.filter(u=>u),o=[];n==null||n.forEach(u=>{var p,f;const d=[];if((p=lo.contentTrans(u))==null||p.forEach(h=>{var m,y,v,b,k,E,C,g,S,w,N,V,_,P;if(h.includes("{")&&h.includes("[")){let T=a.cloneDeep(h).split(":");h=(E=(y=(m=a.cloneDeep(T))==null?void 0:m[0])==null?void 0:y.split("{"))==null?void 0:E[((k=(b=(v=a.cloneDeep(T))==null?void 0:v[0])==null?void 0:b.split("{"))==null?void 0:k.length)-1].replaceAll("'",""),d.push(h);let D=(S=(g=(C=T==null?void 0:T[(T==null?void 0:T.length)-1])==null?void 0:C.split("}"))==null?void 0:g[0])==null?void 0:S.replaceAll("'",'"'),z=[];(N=(w=D.slice(1,D.length-1))==null?void 0:w.split(","))==null||N.forEach(q=>{z.push(q)}),d.push(z)}else if(h.includes("{")){let T=(V=h.split(":"))==null?void 0:V[0];h=(P=T==null?void 0:T.split("{"))==null?void 0:P[((_=T==null?void 0:T.split("{"))==null?void 0:_.length)-1].replaceAll("'",""),d.push(h)}else d.push(h)}),!d.some(h=>Array.isArray(h)))o.push(d);else{let h=[];d==null||d.forEach((m,y)=>{y!==d.length-1&&h.push(m)}),(f=d==null?void 0:d[(d==null?void 0:d.length)-1])==null||f.forEach(m=>{let y=a.cloneDeep(h);y.push(m),o.push(y)})}});let l=[];o==null||o.forEach(u=>{var d;if(u!=null&&u.find(p=>p==null?void 0:p.includes("["))){let p=u==null?void 0:u.filter(h=>!(h!=null&&h.includes("["))),f=u==null?void 0:u.find(h=>h==null?void 0:h.includes("["));f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1),(d=f==null?void 0:f.split(","))==null||d.forEach(h=>{let m=a.cloneDeep(p);m.push(h),l.push(m)})}else l.push(u)});const r=(c=(i=l.filter(u=>u.length!==0))==null?void 0:i.filter(u=>u.length!==0))==null?void 0:c.map(u=>{let d="";return u.forEach(p=>{!p.includes("{")&&!(p!=null&&p.includes("$"))&&(d=d===""?d+a.cloneDeep(p):d+"/"+a.cloneDeep(p))}),d});return lo.menuArray([...new Set(r)])},JM=t=>({comp:"Menu",compData:[{contents:XM(a.cloneDeep(t)),key:"menuContents"}],name:""}),ZM=(t,n)=>{var c,u;if(!t)return;let o=[];const l=lo.getContentValue(t),r=a.cloneDeep(l).replaceAll("{","").replaceAll("}","").trim();let s=[];return r.split(":").forEach(d=>{var p;if(d.includes("[")){const f=(p=d.slice(1,d.length-1))==null?void 0:p.split(",");s.push(f)}else s.push(d)}),(c=dh(s))==null||c.forEach(d=>{o.push(d)}),o=[...new Set(o)],(u=o==null?void 0:o.filter(d=>d.length!==0))==null?void 0:u.map(d=>{let p="",f="",h=!0;return d.forEach(m=>{!m.includes("{")&&!(m!=null&&m.includes("$"))&&(m!=null&&m.includes("@")&&!(m!=null&&m.includes("@input"))&&!(m!=null&&m.includes("@output"))&&(m=""),p!=null&&p.includes("/")&&(n!=null&&n.includes(p))&&!(n!=null&&n.includes(p+"/"+m.trim()))&&h&&(n!=null&&n.includes(p+GM.value))&&(h=!1),h?p=p===""?p+m.trim():m.trim()===""?p+"/":(m.trim().includes("@"),p+"/"+m.trim()):p=p+"/"+m.trim()),m!=null&&m.includes("$")&&(f=m.replaceAll("$",""))}),{path:p,parentPath:f}})},QM=t=>{let n=t;const o=[];let l="";for(const r of n)r.includes("{")||l.includes("{")||r.includes("[")||l.includes("[")||r.includes("【")||l.includes("【")||r.includes("(")||l.includes("(")||r.includes("(")||l.includes("(")||r.includes("/*")||l.includes("/*")?(l+=r.trim(),l.split("{").length-1===l.split("}").length-1&&l.split("【").length-1===l.split("】").length-1&&l.split("[").length-1===l.split("]").length-1&&l.split("(").length-1===l.split(")").length-1&&l.split("(").length-1===l.split(")").length-1&&l.split("/*").length-1===l.split("*/").length-1&&(l.match(/'/g)||[]).length%2===0&&(l==null?void 0:l[(l==null?void 0:l.length)-1])===","&&(o.push(l),l="")):(l+=r.trim(),(l==null?void 0:l[(l==null?void 0:l.length)-1])===","&&(o.push(l),l=""));return(l==null?void 0:l.length)!==0&&o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),o};let pt="$R",Tl="$/";const ex=ve.useOriginalState(a.pinia),{originalPath:tx}=a.storeToRefs(ex),cd=(t,n)=>{var i,c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D;let o;if(o=(c=(i=t==null?void 0:t.replace("[",pt))==null?void 0:i.split(pt))==null?void 0:c[1],!o)return;const l=o.lastIndexOf("]"),r=o.substring(0,l)+pt+o.substring(l+1);o=(d=(u=r==null?void 0:r.split(pt))==null?void 0:u[0])==null?void 0:d.replaceAll("'",""),o=(o==null?void 0:o[0])===":"?'""'+o:o,n!=null&&n.includes("#")&&(o!=null&&o.includes("[")?o=((f=(p=n==null?void 0:n.split("#"))==null?void 0:p[0])==null?void 0:f.replaceAll("'",""))+"#("+o+")":o=((m=(h=n==null?void 0:n.split("#"))==null?void 0:h[0])==null?void 0:m.replaceAll("'",""))+"#"+o);let s=(S=(g=(C=(E=(v=(y=a.cloneDeep(t))==null?void 0:y.replace("(",pt))==null?void 0:v.split(pt))==null?void 0:E[((k=(b=t==null?void 0:t.replace("(",pt))==null?void 0:b.split(pt))==null?void 0:k.length)-1])==null?void 0:C.replace(")",pt))==null?void 0:g.split(pt))==null?void 0:S[0].replaceAll(":","/").replaceAll("'","");if(o.includes(":")&&!o.includes(":[")&&((N=s==null?void 0:s.split("/"))==null?void 0:N[((w=s==null?void 0:s.split("/"))==null?void 0:w.length)-1])!==""?o=o+"["+s+"]":o=o+"["+s+"]()",n!=null&&n.includes("#")&&((_=Fe.contentTransArrayToAllNoExtra((V=n==null?void 0:n.split("#"))==null?void 0:V[1],"/"))==null?void 0:_.length)>1){let z=(P=n==null?void 0:n.split("#"))==null?void 0:P[1],q=[];(D=(T=Fe.contentTransArrayToAllNoExtra(z,"/"))==null?void 0:T.filter(Z=>!(Z!=null&&Z.includes("("))))==null||D.forEach(Z=>{Z!=null&&Z[(Z==null?void 0:Z.length)-1]?q.push(Z.slice(0,(Z==null?void 0:Z.length)-1).replaceAll("'","")):q.push(Z.replaceAll("'",""))}),o=o+"&&#"+q.join(Tl)}return o},nx=t=>{var s;let n=t;const o=[];let l="",r=0;for(const i of n)r++,i.includes("(")||l.includes("(")||i.includes(")")||l.includes(")")||i.includes("&")||l.includes("&")||i.includes("|")||l.includes("|")?(l+=i.trim(),((s=a.cloneDeep(l))==null?void 0:s[(l==null?void 0:l.length)-1])===")"||a.cloneDeep(l).includes("||")||a.cloneDeep(l).includes("&&")?(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l=""):r===(t==null?void 0:t.length)&&(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):(l+=i.trim(),o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="");return(l==null?void 0:l.length)!==0&&o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),o},ox=t=>{var r;let n=(r=nx(t))==null?void 0:r.map(s=>(s!=null&&s.includes("(")&&(s="("+(s==null?void 0:s.replaceAll("(",""))),s)),o=[],l={};return n==null||n.forEach((s,i)=>{var c,u;if(s!=null&&s.includes("(")){let d=(c=s.slice(1,(s==null?void 0:s.length)-1))==null?void 0:c.split("#"),p=d[0].replaceAll("'",""),f=(u=d[1])==null?void 0:u.replaceAll("'","");(p==null?void 0:p[(p==null?void 0:p.length)-1])!=="!"?l[p]=f:l[p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)]="!"+f}else s==="&&"||s==="||"&&(o.push(l),l={});i===n.length-1&&(o.push(l),l={})}),o},lx=t=>{var o,l;let n=(l=(o=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1))==null?void 0:o.split(","))==null?void 0:l.map(r=>{var s,i,c,u,d;return(d=(u=(c=(i=(s=r==null?void 0:r.split("=="))==null?void 0:s[0])==null?void 0:i.replaceAll("'",""))==null?void 0:c.split("#"))==null?void 0:u[0])==null?void 0:d.trim()});return n=JSON.stringify(n),n},qs=t=>{let n=a.cloneDeep(t),o=[],l="",r="",s=(n==null?void 0:n[0])==="["?Fe.newContentTransArrayToAllNoExtra(n.slice(1,n.length-1),","):Fe.newContentTransArrayToAllNoExtra(n,",");return s==null||s.forEach((i,c)=>{var d,p,f,h,m,y,v,b;let u=i;if(u[u.length-1]===","&&(u=u.slice(0,u.length-1)),u.slice(1,(u==null?void 0:u.length)-1).includes("[")&&(u==null?void 0:u[0])==="["){let k=qs(u);if((s==null?void 0:s.length)===2&&((p=s==null?void 0:s[0])==null?void 0:p[((d=s==null?void 0:s[0])==null?void 0:d.length)-1])===":"){let E=s[c-1].replaceAll(",","").trim();E[E.length-1]===":"&&(E=E.slice(0,E.length-1));let C=(f=qs(u))==null?void 0:f.parentStringContent;C="["+((h=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1))==null?void 0:h.replaceAll("'",'"'))+"]";let g={[E]:C};o.push(g)}else r=r+u+",";l=l+(k==null?void 0:k.stringContent),r=r+(k==null?void 0:k.parentStringContent),o=[...o,...k==null?void 0:k.parentColumns]}else if((u==null?void 0:u[0])!=="["&&u[u.length-1]===":")u=u.slice(0,u.length-1),l=l+u+",",r=r+((m=u==null?void 0:u.split("#"))==null?void 0:m[0])+",";else if((u==null?void 0:u[0])==="["&&s[c-1]){(v=(y=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1))==null?void 0:y.split(","))==null||v.forEach(C=>{l=l+C+","});let k=s[c-1].replaceAll(",","").trim();k[k.length-1]===":"&&(k=k.slice(0,k.length-1));let E={[k]:lx(u)};o.push(E)}else l=l+u+",",r=r+((b=u==null?void 0:u.split("#"))==null?void 0:b[0])+","}),{parentColumns:o,stringContent:l,parentStringContent:r}},Gr=t=>{var f,h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y,$,te,le;((f=t==null?void 0:t.split("["))==null?void 0:f.length)!==((h=t==null?void 0:t.split("]"))==null?void 0:h.length)&&(t=t.replace(":[[","]:[["));let n=Fe.checkIsShowTable(t)?(m=Fe.contentTransArray(a.cloneDeep(t)))==null?void 0:m[0]:"[]";const o=Fe.checkIsShowTable(t)?"["+((y=Fe.contentTransArray(a.cloneDeep(t)))==null?void 0:y[2])+"]":"["+t+"]";let l=[],r=[],s="",i=[],c=[],u=[];const d=(b=(v=o==null?void 0:o.trim())==null?void 0:v.slice(1,(o==null?void 0:o.trim().length)-1))==null?void 0:b.replaceAll("'",'"');ve.IsJson(d)?l=JSON.parse(d):ve.IsJson((C=(E=(k=d==null?void 0:d.split("}"))==null?void 0:k[0])==null?void 0:E.replace(":",""))==null?void 0:C.replaceAll("\\","\\\\"))&&(l=JSON.parse((w=(S=(g=d==null?void 0:d.split("}"))==null?void 0:g[0])==null?void 0:S.replace(":",""))==null?void 0:w.replaceAll("\\","\\\\"))),l=l!=null&&l.every(G=>Array.isArray(G)&&G.every(W=>Array.isArray(W)))?l==null?void 0:l[0]:l;let p=QM(n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));if(p!=null&&p.some(G=>(G==null?void 0:G[0])==="["&&(G==null?void 0:G.includes("]#")))){let G=[];p==null||p.forEach(W=>{var re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee;if((W==null?void 0:W[0])==="["&&(W!=null&&W.includes("]#"))){let Oe=(re=W==null?void 0:W.split("#"))==null?void 0:re[1];s=(Le=(Ie=(Te=(Ne=(Se=(ne=(ce=Oe==null?void 0:Oe.replace("(",pt))==null?void 0:ce.split(pt))==null?void 0:ne[1])==null?void 0:Se.replace(")",pt))==null?void 0:Ne.split(pt))==null?void 0:Te[0])==null?void 0:Ie.replaceAll(":","/"))==null?void 0:Le.replaceAll("'",""),s=s+((Ee=(ye=Oe==null?void 0:Oe.replace(")",pt))==null?void 0:ye.split(pt))==null?void 0:Ee[1]),(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1))}else G.push(W)}),n="["+(G==null?void 0:G.join(""))+"]"}if((N=Fe.newContentTransArrayToAllNoExtra(n.slice(1,n.length-1),","))!=null&&N.some(G=>(G==null?void 0:G[0])==="["||G[(G==null?void 0:G.length)-1]===":")){let G=qs(n);u=G==null?void 0:G.parentColumns;let W=G==null?void 0:G.stringContent;n="["+(W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1))+"]"}if(n!=null&&n.includes("(")){let G=[],W=((x=(M=(O=(Z=(q=n==null?void 0:n.split("["))==null?void 0:q[((z=n==null?void 0:n.split("["))==null?void 0:z.length)-1])==null?void 0:Z.split("]"))==null?void 0:O[0])==null?void 0:M.split(":"))==null?void 0:x.length)!==1,re=(R=(A=n==null?void 0:n.replace("=",pt))==null?void 0:A.split(pt))==null?void 0:R[0];if(((F=Fe.contentTransArrayToAllNoExtra(n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1),","))==null?void 0:F.length)>1||W&&(re==null?void 0:re[(re==null?void 0:re.length)-1])!=="]"){let ce=(K=Fe.contentTransArrayToAllNoExtra(n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1),","))==null?void 0:K.map(ne=>((ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])===","&&(ne=a.cloneDeep(ne).slice(0,(ne==null?void 0:ne.length)-1)),ne));ce==null||ce.forEach(ne=>{var Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De;if((ne==null?void 0:ne[0])==="("&&(ne==null?void 0:ne[ne.length-1])===")")i=ox(ne);else if(!(ne!=null&&ne.includes("(")))ne!=null&&ne.includes("/")?G.push(ne!=null&&ne.includes('"')?((Ne=(Se=ne==null?void 0:ne.replaceAll("#","&&#"))==null?void 0:Se.replaceAll("/",Tl))==null?void 0:Ne.replaceAll('"',""))+"@-#isMain":(Te=ne==null?void 0:ne.replaceAll("#","&&#"))==null?void 0:Te.replaceAll("/",Tl)):G.push(ne!=null&&ne.includes('"')?((Ie=ne==null?void 0:ne.replaceAll("'",""))==null?void 0:Ie.replaceAll('"',""))+"@-#isMain":ne==null?void 0:ne.replaceAll("'",""));else if(ne!=null&&ne.includes("/")&&(ne!=null&&ne.includes("#"))&&((Le=ne==null?void 0:ne.toUpperCase())!=null&&Le.includes("@CONDITION")))G.push(ne!=null&&ne.includes('"')?((ye=ne==null?void 0:ne.replace("#","&&#"))==null?void 0:ye.replaceAll('"',""))+"@-#isMain":ne==null?void 0:ne.replace("#","&&#"));else if(ne!=null&&ne.includes("[")){let be;const Be=(se=(Ce=a.cloneDeep(ne))==null?void 0:Ce.replaceAll("{",""))==null?void 0:se.replaceAll("}","");if(((ge=(ue=Be==null?void 0:Be.split("#"))==null?void 0:ue[1])==null?void 0:ge[0])==="["||Be[0]==="["){let Ue,We="";Be!=null&&Be.includes("#")?(Ue=(Ve=Be==null?void 0:Be.split("#"))==null?void 0:Ve[1],We=((Me=Be==null?void 0:Be.split("#"))==null?void 0:Me[0])+"#["):(Ue=Be,We="["),Ue=(ze=a.cloneDeep(Ue))==null?void 0:ze.slice(1,((xe=a.cloneDeep(Ue))==null?void 0:xe.length)-1),(pe=Ue==null?void 0:Ue.split(","))==null||pe.forEach(rt=>{We=We+cd(rt,a.cloneDeep(rt))+","}),be=(We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1))+"]"}else be=cd(Be,a.cloneDeep(ne));G.push(ne!=null&&ne.includes('"')?((De=be==null?void 0:be.replaceAll('"',"'"))==null?void 0:De.replaceAll('"',""))+"@-#isMain":be==null?void 0:be.replaceAll('"',"'"))}else{let be=(ke=(de=($e=(Oe=ne==null?void 0:ne.split(":"))==null?void 0:Oe[((Ee=ne==null?void 0:ne.split(":"))==null?void 0:Ee.length)-1])==null?void 0:$e.split(")"))==null?void 0:de[0])==null?void 0:ke.replaceAll("'","");be=be+"["+((ie=(we=(fe=ne==null?void 0:ne.split("("))==null?void 0:fe[((ee=ne==null?void 0:ne.split("("))==null?void 0:ee.length)-1])==null?void 0:we.split(")"))==null?void 0:ie[0].replaceAll(":","/").replaceAll("'",""))+"]",G.push(ne!=null&&ne.includes('"')?(be==null?void 0:be.replaceAll('"',""))+"@-#isMain":be)}}),r=G}else{let ce=((oe=(U=(J=(H=n==null?void 0:n.slice(1,n==null?void 0:n.length))==null?void 0:H.split("("))==null?void 0:J[1])==null?void 0:U.split(")"))==null?void 0:oe[0]).replaceAll("{","").replaceAll("}","").replaceAll(":","/").replaceAll("'","");ce=ce.replaceAll("/[",tx.value+"[");let ne=(Q=(ae=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1))==null?void 0:ae.replace("[",pt))==null?void 0:Q.split(pt);s=s+ce+"["+(ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])}}else if(!(n!=null&&n.includes("{"))&&ve.IsJson(n==null?void 0:n.replaceAll("'",'"')))r=JSON.parse(n==null?void 0:n.replaceAll("'",'"'));else if(ve.IsJson((_=(V=n==null?void 0:n.split("{"))==null?void 0:V[1])==null?void 0:_.replaceAll("'",'"')))r=JSON.parse((T=(P=n==null?void 0:n.split("{"))==null?void 0:P[1])==null?void 0:T.replaceAll("'",'"'));else{let G=n.slice(1,n.length-1);(D=G==null?void 0:G.split(","))==null||D.forEach(W=>{var re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee;W!=null&&W.includes("#")?W!=null&&W.includes("/")?r.push(W!=null&&W.includes('"')?((Te=(Ne=W==null?void 0:W.replaceAll('"',""))==null?void 0:Ne.replaceAll("#","&&#"))==null?void 0:Te.replaceAll("/",Tl))+"@-#isMain":(Ie=W==null?void 0:W.replaceAll("#","&&#"))==null?void 0:Ie.replaceAll("/",Tl)):r.push(((ce=(re=W==null?void 0:W.split("#"))==null?void 0:re[0])==null?void 0:ce.replaceAll("'",""))+"@-"+((Se=(ne=W==null?void 0:W.split("#"))==null?void 0:ne[1])==null?void 0:Se.replaceAll("'",""))):r.push(W!=null&&W.includes('"')?((ye=(Le=W.trim())==null?void 0:Le.replaceAll('"',""))==null?void 0:ye.replaceAll("'",""))+"@-#isMain":(Ee=W.trim())==null?void 0:Ee.replaceAll("'",""))})}if(r=r==null?void 0:r.map(G=>G==null?void 0:G.replaceAll("'","")),l=l!=null&&l.every(G=>Array.isArray(G))?l:[l],l!=null&&l.some(G=>G==null?void 0:G.some(W=>Array.isArray(W)&&(W==null?void 0:W.length)===1))&&(l==null?void 0:l.length)>0&&(r==null?void 0:r.length)>0){let G=(X=l==null?void 0:l[0])==null?void 0:X.findIndex(W=>Array.isArray(W)&&(W==null?void 0:W.length)===1);if((s==null?void 0:s.length)>0){let W=($=(Y=(j=(I=s==null?void 0:s.split("["))==null?void 0:I[((B=s==null?void 0:s.split("["))==null?void 0:B.length)-1])==null?void 0:j.split("]"))==null?void 0:Y[0])==null?void 0:$.split(",");G=G-(W==null?void 0:W.length)}r=r==null?void 0:r.map((W,re)=>(re===G&&(W=W+"@-"+W),W)),l=l==null?void 0:l.map(W=>(W!=null&&W.some(re=>Array.isArray(re)&&(re==null?void 0:re.length)===1)&&(W=W==null?void 0:W.map(re=>(Array.isArray(re)&&(re==null?void 0:re.length)===1&&(re=re==null?void 0:re[0]),re))),W))}return{tableColumns:r,tableContents:l,tablePath:(te=s==null?void 0:s.toUpperCase())!=null&&te.includes("MAPPING")?"":s,filterContents:i,childTree:c,parentColumns:u,relatedPath:(le=s==null?void 0:s.toUpperCase())!=null&&le.includes("MAPPING")?s:""}};let tt="$R";const ax=t=>{var o;let n="[["+t+"]]";return ve.IsJson((o=n.slice(1,(n==null?void 0:n.length)-1))==null?void 0:o.replaceAll("'",'"'))},Ys=t=>{var l,r,s,i,c,u,d,p,f,h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y,$,te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le;let n="";t=t==null?void 0:t.replace("=",":"),t=t.replace(/:([^=]*)==/g,":");let o=t;if((Fe.checkIsShowGroup(a.cloneDeep(t))!==null||Fe.checkIsShowGroupForm(a.cloneDeep(t))!==null||Fe.checkIsUsingGroup(t))&&(n=(s=(r=(l=a.cloneDeep(t).replace(":",tt).split(tt))==null?void 0:l[0])==null?void 0:r.replaceAll("'",""))==null?void 0:s.replaceAll("]",""),o=(i=a.cloneDeep(t).replace(":",tt).split(tt))==null?void 0:i[1]),Fe.checkIsShowTable(a.cloneDeep(o).slice(1,((c=a.cloneDeep(o))==null?void 0:c.length)-1))||Fe.checkForTableContents(a.cloneDeep(o).slice(1,((u=a.cloneDeep(o))==null?void 0:u.length)-1))||Fe.checkIsTableCheck(o))if((o==null?void 0:o[0])!=="["&&(o==null?void 0:o[0])!=="{"&&(o="{["+o+"]:[[]]}"),((p=a.cloneDeep(o).slice(1,((d=a.cloneDeep(o))==null?void 0:d.length)-1))==null?void 0:p[1])!=="["){const ye=Gr(a.cloneDeep(o).slice(1,((f=a.cloneDeep(o))==null?void 0:f.length)-1));return{groupName:n,tableColumn:ye==null?void 0:ye.tableColumns,tableContents:ye==null?void 0:ye.tableContents,tableColumnPath:ye==null?void 0:ye.tablePath,filterContents:ye==null?void 0:ye.filterContents,childTree:ye==null?void 0:ye.childTree,parentColumns:ye==null?void 0:ye.parentColumns,relatedPath:ye==null?void 0:ye.relatedPath}}else if(a.cloneDeep(o).slice(1,((h=a.cloneDeep(o))==null?void 0:h.length)-1).includes("{")){let ye=a.cloneDeep(o).slice(1,((m=a.cloneDeep(o))==null?void 0:m.length)-1),Ee=ye.indexOf("{"),Oe=ye.slice(Ee,(ye==null?void 0:ye.length)-Ee);return(v=(y=Fe.contentTransArray(Oe))==null?void 0:y.filter(de=>de==null?void 0:de.includes("{")))==null?void 0:v.map((de,ke)=>{var fe;let ee=Gr(a.cloneDeep(de).slice(1,((fe=a.cloneDeep(de))==null?void 0:fe.length)-1));return{groupName:ke===0?n:"",tableColumn:ee==null?void 0:ee.tableColumns,tableContents:ee==null?void 0:ee.tableContents,tableColumnPath:ee==null?void 0:ee.tablePath,filterContents:ee==null?void 0:ee.filterContents,childTree:ee==null?void 0:ee.childTree,parentColumns:ee==null?void 0:ee.parentColumns,relatedPath:ee==null?void 0:ee.relatedPath}})}else{const ye=Gr(a.cloneDeep(o).slice(1,((b=a.cloneDeep(o))==null?void 0:b.length)-1));return{groupName:n,tableColumn:ye==null?void 0:ye.tableColumns,tableContents:ye==null?void 0:ye.tableContents,tableColumnPath:ye==null?void 0:ye.tablePath,filterContents:ye==null?void 0:ye.filterContents,childTree:ye==null?void 0:ye.childTree,parentColumns:ye==null?void 0:ye.parentColumns,relatedPath:ye==null?void 0:ye.relatedPath}}else{let ye=[];if(ve.IsJson((k=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:k.replaceAll("'",'"')))ye=[JSON.parse((E=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:E.replaceAll("'",'"'))];else if((!o.includes("(")||ax(o))&&!((o==null?void 0:o[0])==="["&&(o==null?void 0:o[1])==="["))if(o="[["+o+"]]",ve.IsJson((C=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:C.replaceAll("'",'"')))ye=JSON.parse((g=o.slice(1,(o==null?void 0:o.length)-1))==null?void 0:g.replaceAll("'",'"'));else if(o=o.slice(2,o.length-2),((N=(w=(S=o==null?void 0:o.replace(":",tt))==null?void 0:S.split(tt))==null?void 0:w[1])==null?void 0:N[0])!=="{"&&(o==null?void 0:o[0])!=="{"){o=((_=(V=o==null?void 0:o.replace(":",tt))==null?void 0:V.split(tt))==null?void 0:_[0])+":{["+((T=(P=o==null?void 0:o.replace(":",tt))==null?void 0:P.split(tt))==null?void 0:T[1])+"]}";const Ee=Ys(o);return Ee!=null&&Ee.tableColumn?{groupName:Ee==null?void 0:Ee.groupName,tableColumn:Ee==null?void 0:Ee.tableColumn,tableContents:Ee==null?void 0:Ee.tableContents,filterContents:Ee==null?void 0:Ee.filterContents,childTree:Ee==null?void 0:Ee.childTree,parentColumns:Ee==null?void 0:Ee.parentColumns,relatedPath:Ee==null?void 0:Ee.relatedPath}:{groupName:Ee==null?void 0:Ee.groupName,formContents:Ee==null?void 0:Ee.formContents}}else{let Ee=(z=(D=Fe.contentTransArrayToAllNoExtra(o,","))==null?void 0:D.map($e=>$e==null?void 0:$e.replaceAll(",","")))==null?void 0:z.map($e=>Fe.formToExtraContent(a.cloneDeep($e).slice(1,a.cloneDeep($e).length-1))),Oe=[];return(q=a.cloneDeep(Ee))==null||q.forEach($e=>{var de;(de=$e==null?void 0:$e.formContents)==null||de.forEach(ke=>{ke==null||ke.forEach(ee=>{Oe.push(ee)})})}),{groupName:(Z=Ee==null?void 0:Ee[0])==null?void 0:Z.groupName,formContents:Oe}}else if((o==null?void 0:o[0])!=="{"&&(o==null?void 0:o[0])!=="["){let Ee=(A=(x=(M=(O=a.cloneDeep(o))==null?void 0:O.split("]"))==null?void 0:M[0])==null?void 0:x.split("["))==null?void 0:A[1],Oe="",de=((U=(J=(H=(K=(F=(R=a.cloneDeep(o))==null?void 0:R.split(")"))==null?void 0:F[0])==null?void 0:K.split("("))==null?void 0:H[1])==null?void 0:J.replaceAll("[",""))==null?void 0:U.replaceAll("]","")).replaceAll("'","").replaceAll(":","/");(oe=de==null?void 0:de.split("/"))==null||oe.forEach((ee,fe)=>{var we;fe!==((we=de==null?void 0:de.split("/"))==null?void 0:we.length)-1&&(Oe=Oe===""?Oe+ee:Oe+"/"+ee)});let ke;return((B=(X=(Q=(ae=a.cloneDeep(o))==null?void 0:ae.replace(",",tt))==null?void 0:Q.split(tt))==null?void 0:X[1])==null?void 0:B[0])==="["&&(ke=Fe.getExtraContents((Y=(j=(I=a.cloneDeep(o))==null?void 0:I.replace(",",tt))==null?void 0:j.split(tt))==null?void 0:Y[1])),{groupName:"",extraButton:(te=Ee==null?void 0:Ee.split(":"))==null?void 0:te[(($=Ee==null?void 0:Ee.split(":"))==null?void 0:$.length)-1].replaceAll("'",""),extraPath:Oe,extraData:ke}}else if((o==null?void 0:o[0])==="["&&(o==null?void 0:o[1])==="["&&(o=o.slice(1,(o==null?void 0:o.length)-1).replaceAll('"',"'")),(o==null?void 0:o[0])!=="["){let Ee;(o==null?void 0:o[1])==="["?Ee=o.slice(2,(o==null?void 0:o.length)-2):Ee=o;let Oe=(G=(le=Fe.contentTransArray(Ee))==null?void 0:le.filter(de=>de!==","))==null?void 0:G.map(de=>Fe.formToExtraContent(a.cloneDeep(de).slice(1,a.cloneDeep(de).length-1))),$e=[];return(W=a.cloneDeep(Oe))==null||W.forEach(de=>{var ke;(ke=de==null?void 0:de.formContents)==null||ke.forEach(ee=>{ee==null||ee.forEach(fe=>{$e.push(fe)})})}),{groupName:(re=Oe==null?void 0:Oe[0])==null?void 0:re.groupName,formContents:$e}}else if((o==null?void 0:o[1])!=="["&&(o="["+o+"]"),(o==null?void 0:o[0])==="["&&(o==null?void 0:o[1])==="["){o=o.slice(1,(o==null?void 0:o.length)-1);let Ee=[],Oe=[];if(((ne=(ce=Fe.contentTransArray(o))==null?void 0:ce.filter($e=>$e!==","))==null?void 0:ne.length)===1){o=o.slice(1,(o==null?void 0:o.length)-1);let $e=(Ne=(Se=Fe.contentTransArrayToAllNoExtra(o,","))==null?void 0:Se.map(ke=>ke==null?void 0:ke.replaceAll(",","")))==null?void 0:Ne.map(ke=>Fe.formToExtraContent(a.cloneDeep(ke).slice(1,a.cloneDeep(ke).length-1))),de=[];(Te=a.cloneDeep($e))==null||Te.forEach(ke=>{var ee;(ee=ke==null?void 0:ke.formContents)==null||ee.forEach(fe=>{fe==null||fe.forEach(we=>{de.push(we)})})}),Ee.push(de)}else(Le=(Ie=Fe.contentTransArray(o))==null?void 0:Ie.filter($e=>$e!==","))==null||Le.forEach($e=>{var de,ke,ee,fe;if(!$e.includes("&"))Array.isArray(Wl($e))||Ee.push((de=Wl($e))==null?void 0:de.formContents);else{let we=(fe=(ee=(ke=a.cloneDeep($e))==null?void 0:ke.split("&"))==null?void 0:ee[1])==null?void 0:fe.replaceAll("'",'"');ve.IsJson(we)&&Oe.push({[JSON.parse(we)[0]]:JSON.parse(we)})}});return{groupName:n,formContents:Ee,formGroup:Oe}}return{groupName:n,formContents:ye}}},Wl=t=>{var r,s,i,c,u,d,p;let n=!1,o=[],l=Fe.checkIsShowGroup(t.slice(1,a.cloneDeep(t).length-1))!==null||Fe.checkIsShowGroupForm(t.slice(1,a.cloneDeep(t).length-1))!==null;if(l){let f=(c=(r=a.cloneDeep(t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)).replace(":",tt).split(tt))==null?void 0:r[1])==null?void 0:c.slice(1,((i=(s=a.cloneDeep(t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)).replace(":",tt).split(tt))==null?void 0:s[1])==null?void 0:i.length)-1);(f==null?void 0:f[0])==="["&&(f==null?void 0:f[1])==="["&&(f=f.slice(1,(f==null?void 0:f.length)-1));let h=(u=Fe.contentTransArrayToAllNoExtra(f,","))==null?void 0:u.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));h!=null&&h.every(m=>Fe.checkIsShowGroup(m.slice(1,a.cloneDeep(m).length-1))!==null||Fe.checkIsShowGroupForm(m.slice(1,a.cloneDeep(m).length-1))!==null)&&(n=!0)}return l&&n?((d=cr(t))==null||d.forEach(f=>{o.push(f)}),o):((p=Fe.contentTransArray(t))==null?void 0:p.length)===1?Ys(a.cloneDeep(t).slice(1,a.cloneDeep(t).length-1)):Ys(a.cloneDeep(t).slice(1,a.cloneDeep(t).length))},cr=(t,n=0)=>{var d,p,f,h,m;let o=t.slice(1,a.cloneDeep(t).length-1),l=(p=(d=a.cloneDeep(o).replace(":",tt).split(tt))==null?void 0:d[0])==null?void 0:p.replaceAll("'",""),r=(f=a.cloneDeep(o).replace(":",tt).split(tt))==null?void 0:f[1],s=[],i=!1;r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1);let c=(h=Fe.contentTransArrayToAllNoExtra(r,","))==null?void 0:h.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));if(c!=null&&c.every(y=>Fe.checkIsShowGroup(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsShowGroupForm(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsQuote(y)!==null)&&(i=!0),!i)s=cr(r,n+1);else{let y=[];c!=null&&c.some(v=>Fe.checkIsQuote(v)!==null)?y=c:y=(m=Fe.contentTransArray(r))==null?void 0:m.filter(v=>v!==","),y==null||y.forEach(v=>{var g,S,w,N,V;let b=v.slice(1,a.cloneDeep(v).length-1),k=(N=(g=a.cloneDeep(b).replace(":",tt).split(tt))==null?void 0:g[1])==null?void 0:N.slice(1,((w=(S=a.cloneDeep(b).replace(":",tt).split(tt))==null?void 0:S[1])==null?void 0:w.length)-1);(k==null?void 0:k[0])==="["&&(k==null?void 0:k[1])==="["&&(k=k.slice(1,(k==null?void 0:k.length)-1));let E=(V=Fe.contentTransArrayToAllNoExtra(k,","))==null?void 0:V.map(_=>((_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),_));(E==null?void 0:E.every(_=>Fe.checkIsShowGroup(_.slice(1,a.cloneDeep(_).length-1))!==null||Fe.checkIsShowGroupForm(_.slice(1,a.cloneDeep(_).length-1))!==null||Fe.checkIsQuote(_)!==null))?s=[...s,...cr(v,n+1)]:s=[...s,...fh(v)]})}return s==null?void 0:s.map(y=>(y["groupName"+n]=l,y))},fh=t=>{var o,l,r;let n=[];if((t==null?void 0:t[0])==="["&&(t==null?void 0:t[1])==="["){let s=(o=Fe.contentTransArray(t))==null?void 0:o.filter(i=>i!==",");s==null||s.forEach(i=>{n.push(Wl(i))})}else{let s=(r=(l=Fe.newContentTransArrayToAllNoExtra(t,","))==null?void 0:l.filter(i=>i!==","))==null?void 0:r.map(i=>(i[(i==null?void 0:i.length)-1]===","&&(i=i.slice(0,(i==null?void 0:i.length)-1)),i));s==null||s.forEach(i=>{var d,p,f;let c=!1,u=Fe.checkIsShowGroup(i.slice(1,a.cloneDeep(i).length-1))!==null||Fe.checkIsShowGroupForm(i.slice(1,a.cloneDeep(i).length-1))!==null;if(u){let h=(d=a.cloneDeep(i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)).replace(":",tt).split(tt))==null?void 0:d[1];(h==null?void 0:h[0])==="["&&(h==null?void 0:h[1])==="["&&(h=h.slice(1,(h==null?void 0:h.length)-1));let m=(p=Fe.contentTransArrayToAllNoExtra(h,","))==null?void 0:p.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));m!=null&&m.every(y=>Fe.checkIsShowGroup(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsShowGroupForm(y.slice(1,a.cloneDeep(y).length-1))!==null||Fe.checkIsQuote(y)!==null)&&(c=!0)}u&&c?(f=cr(i))==null||f.forEach(h=>{n.push(h)}):n.push(Wl(i))})}return n},kl=e.ref(0);let va="$R";const rx=ve.useOriginalState(a.pinia),{originalPath:Xr}=a.storeToRefs(rx),sx=(t,n)=>{var r;let o=[],l=n==null?void 0:n.length;return(r=a.cloneDeep(n))==null||r.forEach((s,i)=>{let c=[];s==null||s.forEach(u=>{var d,p,f,h,m,y,v,b,k,E;if(c.push(a.cloneDeep(u)),ve.IsJson(a.cloneDeep(t.trim()).replaceAll("'",'"'))&&((d=JSON.parse(a.cloneDeep(t.trim()).replaceAll("'",'"')))!=null&&d.every(C=>typeof C=="string")))(p=JSON.parse(a.cloneDeep(t.trim()).replaceAll("'",'"')))==null||p.forEach(C=>{var g,S,w;o.push([{key:(g=a.cloneDeep(u))==null?void 0:g.key,value:((S=a.cloneDeep(u))==null?void 0:S.value)+"/"+C,parentPath:(w=a.cloneDeep(u))==null?void 0:w.parentPath}])});else{let C=[];if(((f=a.cloneDeep(t.trim()))==null?void 0:f[0])==="["&&((h=a.cloneDeep(t.trim()))==null?void 0:h[1])==="["){let g=t.trim().slice(1,((m=t.trim())==null?void 0:m.length)-1),S=fh(g.trim());S!=null&&S.every(w=>Array.isArray(w))&&(S=S==null?void 0:S[0]),S==null||S.forEach(w=>{var N,V,_,P,T,D,z,q,Z,O,M,x,A;if(w!=null&&w.tableColumn)((V=(N=Object.keys(w))==null?void 0:N.filter(R=>R==null?void 0:R.includes("groupName")))==null?void 0:V.length)===1?c.push({key:"groupName",value:w==null?void 0:w.groupName}):(P=(_=Object.keys(w))==null?void 0:_.filter(R=>R==null?void 0:R.includes("groupName")))==null||P.forEach((R,F)=>{R==="groupName"?c.push({key:R,value:w==null?void 0:w[R]}):c.push({key:"groupName"+(F-1),value:w==null?void 0:w[R]})}),c.push({key:"tableColumn",value:w==null?void 0:w.tableColumn}),c.push({key:"tableContents",value:w==null?void 0:w.tableContents}),c.push({key:"tablePath",value:(w==null?void 0:w.tableColumnPath)??""}),c.push({key:"tableFilter",value:(w==null?void 0:w.filterContents)??[]}),c.push({key:"relatedPath",value:(w==null?void 0:w.relatedPath)??[]}),c.push({key:"childTree",value:(w==null?void 0:w.childTree)??[]}),c.push({key:"parentColumns",value:(w==null?void 0:w.parentColumns)??[]});else if(w!=null&&w.extraButton)c.push({key:"groupName",value:w==null?void 0:w.groupName}),c.push({key:"extraButton",value:w==null?void 0:w.extraButton,path:w==null?void 0:w.extraPath,data:w==null?void 0:w.extraData});else{let R=l===1?w==null?void 0:w.formContents:((T=w==null?void 0:w.formContents)==null?void 0:T.length)===1?(z=(D=w==null?void 0:w.formContents)==null?void 0:D[0])==null?void 0:z[i]:(q=w==null?void 0:w.formContents)==null?void 0:q[i];(R==null?void 0:R.length)>0&&(c.push({key:"groupName",value:w==null?void 0:w.groupName}),c.push({key:"formContent",value:l===1?w==null?void 0:w.formContents:((Z=w==null?void 0:w.formContents)==null?void 0:Z.length)===1?(M=(O=w==null?void 0:w.formContents)==null?void 0:O[0])==null?void 0:M[i]:(x=w==null?void 0:w.formContents)==null?void 0:x[i]}),c.push({key:"formGroup",value:l===1?w==null?void 0:w.formGroup:(A=w==null?void 0:w.formGroup)==null?void 0:A[i]}))}})}else if(C=Wl(a.cloneDeep(t.trim())),Array.isArray(C))C==null||C.forEach(g=>{var S,w,N,V,_,P,T,D,z,q,Z,O,M;if(g!=null&&g.tableColumn)((w=(S=Object.keys(g))==null?void 0:S.filter(x=>x==null?void 0:x.includes("groupName")))==null?void 0:w.length)===1?c.push({key:"groupName",value:g==null?void 0:g.groupName}):(V=(N=Object.keys(g))==null?void 0:N.filter(x=>x==null?void 0:x.includes("groupName")))==null||V.forEach(x=>{c.push({key:x,value:g==null?void 0:g[x]})}),c.push({key:"tableColumn",value:g==null?void 0:g.tableColumn}),c.push({key:"tableContents",value:g==null?void 0:g.tableContents}),c.push({key:"relatedPath",value:(g==null?void 0:g.relatedPath)??[]}),c.push({key:"tablePath",value:(g==null?void 0:g.tableColumnPath)??""}),c.push({key:"tableFilter",value:(g==null?void 0:g.filterContents)??[]}),c.push({key:"childTree",value:(g==null?void 0:g.childTree)??[]}),c.push({key:"parentColumns",value:(g==null?void 0:g.parentColumns)??[]});else if(g!=null&&g.extraButton)c.push({key:"groupName",value:g==null?void 0:g.groupName}),c.push({key:"extraButton",value:g==null?void 0:g.extraButton,path:g==null?void 0:g.extraPath,data:g==null?void 0:g.extraData});else{let x=l===1?g==null?void 0:g.formContents:((_=g==null?void 0:g.formContents)==null?void 0:_.length)===1?(T=(P=g==null?void 0:g.formContents)==null?void 0:P[0])==null?void 0:T[i]:(D=g==null?void 0:g.formContents)==null?void 0:D[i];(x==null?void 0:x.length)>0&&(c.push({key:"groupName",value:g==null?void 0:g.groupName}),c.push({key:"formContent",value:l===1?g==null?void 0:g.formContents:((z=g==null?void 0:g.formContents)==null?void 0:z.length)===1?(Z=(q=g==null?void 0:g.formContents)==null?void 0:q[0])==null?void 0:Z[i]:(O=g==null?void 0:g.formContents)==null?void 0:O[i]}),c.push({key:"formGroup",value:l===1?g==null?void 0:g.formGroup:(M=g==null?void 0:g.formGroup)==null?void 0:M[i]}))}});else if(C!=null&&C.tableColumn)c.push({key:"groupName",value:C==null?void 0:C.groupName}),c.push({key:"tableColumn",value:C==null?void 0:C.tableColumn}),c.push({key:"tableContents",value:l!==1?[(y=C==null?void 0:C.tableContents)==null?void 0:y[i]]:C==null?void 0:C.tableContents}),c.push({key:"relatedPath",value:(C==null?void 0:C.relatedPath)??[]}),c.push({key:"tableFilter",value:(C==null?void 0:C.filterContents)??[]}),c.push({key:"childTree",value:(C==null?void 0:C.childTree)??[]}),c.push({key:"parentColumns",value:(C==null?void 0:C.parentColumns)??[]});else{let g=l!==1?((v=C==null?void 0:C.formContents)==null?void 0:v.length)===1?[(k=(b=C==null?void 0:C.formContents)==null?void 0:b[0])==null?void 0:k[i]]:[(E=C==null?void 0:C.formContents)==null?void 0:E[i]]:C==null?void 0:C.formContents;(g==null?void 0:g.length)>0&&(c.push({key:"groupName",value:C==null?void 0:C.groupName}),c.push({key:"formContent",value:g}))}}}),o.push(c)}),o},ix=(t,n)=>{var s,i;const o=[],l=ZM((s=a.cloneDeep(t))==null?void 0:s.key,n);return l&&(l==null?void 0:l.length)>0&&(l==null||l.forEach(c=>{o.push([{key:"contentPath",value:c==null?void 0:c.path,parentPath:c==null?void 0:c.parentPath}])})),sx((i=a.cloneDeep(t))==null?void 0:i.value,o)},ud=t=>t.length===1&&(t==null?void 0:t[0])===void 0?[]:t,cx=(t,n,o)=>{const l=new Map;o.forEach(s=>{for(const[i,c]of Object.entries(s))try{l.set(i.replaceAll("'",""),JSON.parse(c))}catch{l.set(i,[])}});const r=s=>s.map(i=>{var d;const c={...i},u=l.get(i.label);if(u!=null&&u.length){const p=u.map(f=>n.find(h=>(h==null?void 0:h.label)===f)).filter(Boolean);c.children=(c.children||[]).concat(p)}return(d=c.children)!=null&&d.length&&(c.children=r(c.children)),c});return r(t)},ux=(t,n)=>{if(!n||(n==null?void 0:n.length)===0)return t;let o=[];n==null||n.forEach(s=>{var c,u;let i=(u=(c=Object.values(s))==null?void 0:c[0])==null?void 0:u.replaceAll("'",'"');if(ve.IsJson(i)){let d=JSON.parse(i);d=d==null?void 0:d.map(p=>{var f,h;return{parent:(h=(f=Object.keys(s))==null?void 0:f[0])==null?void 0:h.replaceAll("'",""),value:p}}),o=[...o,...d]}});let l=[],r=[];return t==null||t.forEach((s,i)=>{o!=null&&o.find(c=>(c==null?void 0:c.value)===(s==null?void 0:s.label))&&(t==null?void 0:t.findIndex(c=>{var u;return(c==null?void 0:c.label)===((u=o==null?void 0:o.find(d=>(d==null?void 0:d.value)===(s==null?void 0:s.label)))==null?void 0:u.parent)}))<i?r.push(s):l.push(s)}),cx(l,r,n)},dd=t=>{const n=t.lastIndexOf(")");return n===-1?[t,""]:[t.slice(0,n),t.slice(n+1)]},dx=t=>{var o,l;return(l=(o=a.cloneDeep(t))==null?void 0:o.map(r=>{var i,c,u;let s=[];if((i=qM(r==null?void 0:r.filter(d=>(d==null?void 0:d.key)!=="contentPath")))==null||i.forEach(d=>{var h,m,y,v,b,k,E,C,g,S,w,N,V,_,P,T,D,z,q,Z,O,M,x,A,R,F,K,H,J,U,oe,ae,Q,X,B,I,j,Y;let p=[];if(d.length===0)return;let f=(m=(h=d.find($=>($==null?void 0:$.key)==="tableColumn"))==null?void 0:h.value)==null?void 0:m.map($=>({label:$}));if(Array.isArray(f)&&((y=d==null?void 0:d.find($=>($==null?void 0:$.key)==="tablePath"))!=null&&y.value&&((v=d==null?void 0:d.find($=>($==null?void 0:$.key)==="tablePath"))==null?void 0:v.value)!==""&&f.push({columnPath:(b=d==null?void 0:d.find($=>($==null?void 0:$.key)==="tablePath"))==null?void 0:b.value}),f=(k=a.cloneDeep(f))==null?void 0:k.map($=>{var te,le,G,W,re,ce,ne,Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De,be,Be,Ue,We,rt,it,Ze,qe,dt,ct,St,$t,Mt,xt,At,kt,me,Pe,Ke,Ye,Je,lt,nt,mt,gt,Qe,he,_e,Ae,Re,et,He,ot,ut,jt,hn,Wt,Nt,an,ko,Eo,wo,So,No,To,_o,Bo,Vo,Po,Do,Io,Oo,$o,Mo,xo,Ao,zo,Ro,Lo,Fo,Ko,Ho,jo,Wo,Uo,qo,Yo,Go,Xo,Jo,Zo,Qo,el,tl,nl,ol,ll,al,rl,sl,il,cl,ul,dl,fl,rn,ft,Nn,pl,vn,zt,ml,cc,uc;if((te=$==null?void 0:$.label)!=null&&te.includes("&&#"))if((G=(le=$==null?void 0:$.label)==null?void 0:le.toUpperCase())!=null&&G.includes("@CONDITION")){let je=(ge=(ue=(se=a.cloneDeep($==null?void 0:$.label))==null?void 0:se.split("&&#"))==null?void 0:ue[1])==null?void 0:ge.split("@Condition:"),at="("+(je==null?void 0:je[1]),aa=[];return(ze=(xe=(Me=(Ve=je==null?void 0:je[0])==null?void 0:Ve.replaceAll("(",""))==null?void 0:Me.replaceAll(")",""))==null?void 0:xe.split("||"))==null||ze.forEach(Pt=>{aa.push(Pt==null?void 0:Pt.split("/"))}),{label:(Ue=(Be=(be=(De=(pe=a.cloneDeep($==null?void 0:$.label))==null?void 0:pe.split("&&#"))==null?void 0:De[0].replaceAll("'",""))==null?void 0:be.split("#"))==null?void 0:Be[0])==null?void 0:Ue.replaceAll("$/","/"),isRoute:((We=d.find(Pt=>(Pt==null?void 0:Pt.key)==="tableColumn"))==null?void 0:We.isParent)??!1,allSelectionContents:aa,selectFilter:at==null?void 0:at.replaceAll(":","="),columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRun:((rt=d.find(Pt=>(Pt==null?void 0:Pt.key)==="tableColumn"))==null?void 0:rt.isRun)??!1,formType:"Select"}}else{let je=(ne=(ce=(re=(W=a.cloneDeep($==null?void 0:$.label))==null?void 0:W.split("&&#"))==null?void 0:re[1].replaceAll("'",""))==null?void 0:ce.split("$/"))==null?void 0:ne.map(at=>({label:at,value:at}));return{label:(Le=(Ie=(Te=(Ne=(Se=a.cloneDeep($==null?void 0:$.label))==null?void 0:Se.split("&&#"))==null?void 0:Ne[0].replaceAll("'",""))==null?void 0:Te.split("#"))==null?void 0:Ie[0])==null?void 0:Le.replaceAll("$/","/"),options:je,isRoute:((ye=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:ye.isParent)??!1,formMenuSelect:(ke=(de=($e=(Oe=(Ee=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ee.split("["))==null?void 0:Oe[1])==null?void 0:$e.split("]"))==null?void 0:de[0])==null?void 0:ke.split("/"),groupSelect:(ie=(we=(fe=(ee=a.cloneDeep($==null?void 0:$.label).replace("#",va))==null?void 0:ee.split(va))==null?void 0:fe[1])==null?void 0:we.split("["))==null?void 0:ie[0],columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRun:((Ce=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:Ce.isRun)??!1,formType:"Select"}}else{if((it=$==null?void 0:$.label)!=null&&it.includes("@-"))return{label:(dt=(qe=(Ze=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ze.split("@-"))==null?void 0:qe[0])==null?void 0:dt.replaceAll("$/","/"),directiveLabel:(St=(ct=a.cloneDeep($==null?void 0:$.label))==null?void 0:ct.split("@-"))==null?void 0:St[1],isRoute:(($t=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:$t.isParent)??!1,isRun:((Mt=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:Mt.isRun)??!1};if($!=null&&$.label&&!((xt=$==null?void 0:$.label)!=null&&xt.includes("[")))return{label:(At=$==null?void 0:$.label)==null?void 0:At.replaceAll("$/","/"),isRoute:((kt=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:kt.isParent)??!1,isRun:((me=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:me.isRun)??!1};if($!=null&&$.label&&((Pe=$==null?void 0:$.label)!=null&&Pe.includes(":")))if((Ke=$==null?void 0:$.label)!=null&&Ke.includes("#"))if((Ye=$==null?void 0:$.label)!=null&&Ye.includes("("))if(((Wt=(hn=(jt=$==null?void 0:$.label)==null?void 0:jt.split("#"))==null?void 0:hn[1])==null?void 0:Wt[0])==="["){let je=[];return(To=(No=(So=(an=(Nt=$==null?void 0:$.label)==null?void 0:Nt.split("#"))==null?void 0:an[1])==null?void 0:So.slice(1,((wo=(Eo=(ko=$==null?void 0:$.label)==null?void 0:ko.split("#"))==null?void 0:Eo[1])==null?void 0:wo.length)-1))==null?void 0:No.split(","))==null||To.forEach(at=>{var dc,fc,pc,mc,hc,vc,gc;let aa=(hc=(mc=(pc=(fc=(dc=a.cloneDeep(at))==null?void 0:dc.split("["))==null?void 0:fc[1])==null?void 0:pc.split("]"))==null?void 0:mc[0])==null?void 0:hc.split("/"),Pt=(gc=(vc=a.cloneDeep(at))==null?void 0:vc.split("["))==null?void 0:gc[0];je.push({formMenuSelect:aa,groupSelect:Pt})}),{label:(Po=(Vo=(Bo=(_o=a.cloneDeep($==null?void 0:$.label))==null?void 0:_o.split("#"))==null?void 0:Bo[0])==null?void 0:Vo.replaceAll("'",""))==null?void 0:Po.replaceAll("$/","/"),formMenuGroup:je,columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((Do=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:Do.isParent)??!1,isRun:((Io=d.find(at=>(at==null?void 0:at.key)==="tableColumn"))==null?void 0:Io.isRun)??!1}}else return{label:(Mo=($o=(Oo=a.cloneDeep($==null?void 0:$.label))==null?void 0:Oo.split("#"))==null?void 0:$o[0])==null?void 0:Mo.replaceAll("$/","/"),formMenuSelect:(Fo=(Lo=(Ro=(zo=(Ao=(xo=dd(a.cloneDeep($==null?void 0:$.label)))==null?void 0:xo[1])==null?void 0:Ao.split("["))==null?void 0:zo[1])==null?void 0:Ro.split("]"))==null?void 0:Lo[0])==null?void 0:Fo.split("/"),groupSelect:(Wo=(jo=dd((Ho=(Ko=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ko.split("#"))==null?void 0:Ho[1]))==null?void 0:jo[0])==null?void 0:Wo.replace("(",""),columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((Uo=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:Uo.isParent)??!1,isRun:((qo=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:qo.isRun)??!1};else return{label:(nt=(lt=(Je=a.cloneDeep($==null?void 0:$.label))==null?void 0:Je.split("#"))==null?void 0:lt[0])==null?void 0:nt.replaceAll("$/","/"),formMenuSelect:(_e=(he=(Qe=(gt=(mt=a.cloneDeep($==null?void 0:$.label))==null?void 0:mt.split("["))==null?void 0:gt[1])==null?void 0:Qe.split("]"))==null?void 0:he[0])==null?void 0:_e.split("/"),groupSelect:(He=(et=(Re=(Ae=a.cloneDeep($==null?void 0:$.label))==null?void 0:Ae.split("#"))==null?void 0:Re[1])==null?void 0:et.split("["))==null?void 0:He[0],columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((ot=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:ot.isParent)??!1,isRun:((ut=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:ut.isRun)??!1};else return{label:(nl=(tl=(Xo=(Go=(Yo=a.cloneDeep($==null?void 0:$.label))==null?void 0:Yo.split("["))==null?void 0:Go[0])==null?void 0:Xo.split(":"))==null?void 0:tl[((el=(Qo=(Zo=(Jo=a.cloneDeep($==null?void 0:$.label))==null?void 0:Jo.split("["))==null?void 0:Zo[0])==null?void 0:Qo.split(":"))==null?void 0:el.length)-1])==null?void 0:nl.replaceAll("$/","/"),formMenuSelect:(sl=(rl=(al=(ll=(ol=a.cloneDeep($==null?void 0:$.label))==null?void 0:ol.split("["))==null?void 0:ll[1])==null?void 0:al.split("]"))==null?void 0:rl[0])==null?void 0:sl.split("/"),groupSelect:(cl=(il=a.cloneDeep($==null?void 0:$.label))==null?void 0:il.split("["))==null?void 0:cl[0],columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((ul=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:ul.isParent)??!1,isRun:((dl=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:dl.isRun)??!1};else return{label:(ft=(rn=(fl=a.cloneDeep($==null?void 0:$.label))==null?void 0:fl.split("["))==null?void 0:rn[0])==null?void 0:ft.replaceAll("$/","/"),formMenuSelect:(ml=(zt=(vn=(pl=(Nn=a.cloneDeep($==null?void 0:$.label))==null?void 0:Nn.split("["))==null?void 0:pl[1])==null?void 0:vn.split("]"))==null?void 0:zt[0])==null?void 0:ml.split("/"),columnPath:($==null?void 0:$.columnPath)??"",relatedPath:($==null?void 0:$.relatedPath)??"",isRoute:((cc=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:cc.isParent)??!1,isRun:((uc=d.find(je=>(je==null?void 0:je.key)==="tableColumn"))==null?void 0:uc.isRun)??!1}}}),f=f==null?void 0:f.map($=>{let te=$;return te.prop=$.label,te.align="center",te}),f=ux(f,(E=d==null?void 0:d.find($=>($==null?void 0:$.key)==="parentColumns"))==null?void 0:E.value),f.length!==0&&f.push({label:"操作"}),(C=d==null?void 0:d.find($=>($==null?void 0:$.key)==="parentColumns"))!=null&&C.value&&((S=(g=d==null?void 0:d.find($=>($==null?void 0:$.key)==="parentColumns"))==null?void 0:g.value)==null?void 0:S.length)>0&&(f=[f])),d!=null&&d.find($=>($==null?void 0:$.key)==="formContent")){const $=(w=d.find(G=>(G==null?void 0:G.key)==="formContent"))==null?void 0:w.value,te=((N=d.find(G=>(G==null?void 0:G.key)==="formGroup"))==null?void 0:N.value)??[];let le=[];Array.isArray($)&&$.forEach(G=>{let W=1;Array.isArray(G)&&(G!=null&&G.every(re=>!Array.isArray(re)))&&(W=G.length),G&&(Array.isArray(G)||(G=[G]),G.forEach(re=>{Array.isArray(re)||(re=[re]);let ce=[];re==null||re.forEach(ne=>{var Se,Ne,Te,Ie,Le,ye,Ee,Oe,$e,de,ke,ee,fe,we,ie,Ce,se,ue,ge,Ve,Me,xe,ze,pe,De,be,Be,Ue,We,rt,it,Ze,qe,dt,ct,St,$t,Mt,xt,At,kt,me,Pe,Ke,Ye,Je,lt,nt,mt,gt,Qe,he,_e,Ae,Re,et,He,ot,ut,jt,hn,Wt,Nt,an,ko,Eo,wo,So,No,To,_o,Bo,Vo,Po,Do,Io,Oo,$o,Mo,xo,Ao,zo,Ro,Lo,Fo,Ko,Ho,jo,Wo,Uo,qo,Yo,Go,Xo,Jo,Zo,Qo,el,tl,nl,ol,ll,al,rl,sl,il,cl,ul,dl,fl;if(kl.value++,Array.isArray((Se=Object.values(ne))==null?void 0:Se[0]))ce.push({id:kl.value,key:(Ne=Object.keys(ne))==null?void 0:Ne[0],prop:(Te=Object.keys(ne))==null?void 0:Te[0],label:(Ie=Object.keys(ne))==null?void 0:Ie[0],value:"",width:Math.max(W,re.length),type:"Select",isMain:!!(!((ye=(Le=Object.values(ne))==null?void 0:Le[0])!=null&&ye.includes("loginUser"))&&((Oe=(Ee=Object.values(ne))==null?void 0:Ee[0])!=null&&Oe.includes("@"))),optionUrl:{type:"Select",selectRelateType:"自定义绑定",defaultSelect:($e=Object.values(ne))==null?void 0:$e[0]}});else if(!((ke=(de=Object.values(ne))==null?void 0:de[0])!=null&&ke.includes("/")&&((fe=(ee=Object.values(ne))==null?void 0:ee[0])!=null&&fe.includes("[")))||(ie=(we=Object.values(ne))==null?void 0:we[0])!=null&&ie.includes("loginUserSign"))(se=(Ce=Object.values(ne))==null?void 0:Ce[0])!=null&&se.includes("&&")||(ge=(ue=Object.values(ne))==null?void 0:ue[0])!=null&&ge.includes("loginUserSign")?ce.push({id:kl.value,key:(Ve=Object.keys(ne))==null?void 0:Ve[0],prop:(Me=Object.keys(ne))==null?void 0:Me[0],label:(xe=Object.keys(ne))==null?void 0:xe[0],value:!((pe=(ze=Object.values(ne))==null?void 0:ze[0])!=null&&pe.includes("loginUser"))&&!((be=(De=Object.values(ne))==null?void 0:De[0])!=null&&be.includes("loginUserSign"))&&((Ue=(Be=Object.values(ne))==null?void 0:Be[0])!=null&&Ue.includes("@"))?"":(it=(rt=(We=Object.values(ne))==null?void 0:We[0])==null?void 0:rt.split("&&"))==null?void 0:it[0],isShow:((ct=(dt=(qe=(Ze=Object.values(ne))==null?void 0:Ze[0])==null?void 0:qe.split("&&"))==null?void 0:dt[1])==null?void 0:ct.replace("#","==="))??"originalSignature",width:Math.max(W,re.length),isMain:!!(!(($t=(St=Object.values(ne))==null?void 0:St[0])!=null&&$t.includes("loginUser"))&&!((xt=(Mt=Object.values(ne))==null?void 0:Mt[0])!=null&&xt.includes("loginUserSign"))&&((kt=(At=Object.values(ne))==null?void 0:At[0])!=null&&kt.includes("@")))}):ce.push({id:kl.value,key:(me=Object.keys(ne))==null?void 0:me[0],prop:(Pe=Object.keys(ne))==null?void 0:Pe[0],label:(Ke=Object.keys(ne))==null?void 0:Ke[0],value:!((Je=(Ye=Object.values(ne))==null?void 0:Ye[0])!=null&&Je.includes("loginUser"))&&((nt=(lt=Object.values(ne))==null?void 0:lt[0])!=null&&nt.includes("@"))?"":(mt=Object.values(ne))==null?void 0:mt[0],width:Math.max(W,re.length),isMain:!!(!((Qe=(gt=Object.values(ne))==null?void 0:gt[0])!=null&&Qe.includes("loginUser"))&&((_e=(he=Object.values(ne))==null?void 0:he[0])!=null&&_e.includes("@"))&&!((Re=(Ae=Object.values(ne))==null?void 0:Ae[0])!=null&&Re.includes("#@"))),isMainUrl:(He=(et=Object.values(ne))==null?void 0:et[0])==null?void 0:He.includes("#@")});else{let rn;if((ut=(ot=Object.values(ne))==null?void 0:ot[0])!=null&&ut.includes("(")){let vn;(hn=(jt=Object.values(ne))==null?void 0:jt[0])!=null&&hn.includes("$##")?vn=(wo=(Eo=(ko=(an=(Nt=(Wt=Object.values(ne))==null?void 0:Wt[0])==null?void 0:Nt.split("$##"))==null?void 0:an[1])==null?void 0:ko.split(")"))==null?void 0:Eo[0])==null?void 0:wo.replaceAll("(",""):vn=(_o=(To=(No=(So=Object.values(ne))==null?void 0:So[0])==null?void 0:No.split(")"))==null?void 0:To[0])==null?void 0:_o.replaceAll("(",""),rn=[],(Bo=Fe.contentTransArrayToAll(vn,"/"))==null||Bo.forEach(zt=>{var ml;zt!=null&&zt.includes("[")?rn.push((ml=zt==null?void 0:zt.replace("/",":"))==null?void 0:ml.replaceAll("/","")):rn.push(zt==null?void 0:zt.replaceAll("/",""))})}else(Po=(Vo=Object.values(ne))==null?void 0:Vo[0])!=null&&Po.includes("$##")?rn=(xo=(Mo=($o=(Oo=(Io=(Do=Object.values(ne))==null?void 0:Do[0])==null?void 0:Io.split("$##"))==null?void 0:Oo[1])==null?void 0:$o.split("["))==null?void 0:Mo[0])==null?void 0:xo.split("/"):rn=(Lo=(Ro=(zo=(Ao=Object.values(ne))==null?void 0:Ao[0])==null?void 0:zo.split("["))==null?void 0:Ro[0])==null?void 0:Lo.split("/");let ft;(Ko=(Fo=Object.values(ne))==null?void 0:Fo[0])!=null&&Ko.includes("$##")?ft=(qo=(Uo=(Wo=(jo=(Ho=Object.values(ne))==null?void 0:Ho[0])==null?void 0:jo.split("$##"))==null?void 0:Wo[1])==null?void 0:Uo.split("@"))==null?void 0:qo[0]:ft=(Xo=(Go=(Yo=Object.values(ne))==null?void 0:Yo[0])==null?void 0:Go.split("@"))==null?void 0:Xo[0],ft!=null&&ft.includes("(")&&(ft=(Jo=ft==null?void 0:ft.split(")"))==null?void 0:Jo[1]),ft=(Qo=(Zo=ft==null?void 0:ft.replace("[",va))==null?void 0:Zo.split(va))==null?void 0:Qo[1];let Nn=(tl=(el=ft==null?void 0:ft.slice(0,ft.length-1))==null?void 0:el.split(":"))==null?void 0:tl.map(vn=>vn.replaceAll("'","")),pl=Nn;(Nn==null?void 0:Nn.length)===1&&pl.unshift(""),ce.push({id:kl.value,key:(nl=Object.keys(ne))==null?void 0:nl[0],prop:(ol=Object.keys(ne))==null?void 0:ol[0],label:(ll=Object.keys(ne))==null?void 0:ll[0],value:"",width:Math.max(W,re.length),type:"Select",isMain:!!(!((rl=(al=Object.values(ne))==null?void 0:al[0])!=null&&rl.includes("loginUser"))&&((sl=Object.values(ne))==null?void 0:sl[0]).includes("@")),optionUrl:{type:"Select",selectRelateType:"关联绑定列",menuSelect:rn,groupSelect:pl,filter:(cl=(il=Object.values(ne))==null?void 0:il[0])!=null&&cl.includes("$##")?(fl=(dl=(ul=Object.values(ne))==null?void 0:ul[0])==null?void 0:dl.split("$##"))==null?void 0:fl[0]:""}})}}),ce==null||ce.forEach(ne=>{le.push(ne)})}))}),p.push({key:"formFlex",contents:""}),p.push({key:"formGroup",contents:te}),p.push({key:"formContent",contents:le}),s.push({comp:"Form",compData:a.cloneDeep(p),name:(_=(V=d.find(G=>(G==null?void 0:G.key)==="groupName"))==null?void 0:V.value)==null?void 0:_.replaceAll("'",""),isShow:!0})}else if(d!=null&&d.find($=>($==null?void 0:$.key)==="extraButton"))s.push({key:"extraButton",value:{method:(P=d==null?void 0:d.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:P.value,value:[],path:(T=d==null?void 0:d.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:T.path,data:(D=d==null?void 0:d.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:D.data}});else if((f==null?void 0:f.length)!==0||((q=(z=d.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:z.value)==null?void 0:q.length)>0||((O=(Z=d.find($=>($==null?void 0:$.key)==="relatedPath"))==null?void 0:Z.value)==null?void 0:O.length)>0)if(p.push({key:"header",contents:f}),p.push({key:"childTree",contents:ud((M=d.find($=>($==null?void 0:$.key)==="childTree"))==null?void 0:M.value)??[]}),p.push({key:"tableContents",contents:ud((x=d.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:x.value)}),(A=f==null?void 0:f.filter($=>($==null?void 0:$.label)!=="操作"))!=null&&A.every($=>($==null?void 0:$.isRoute)===!0)&&((K=(F=(R=r==null?void 0:r.find($=>($==null?void 0:$.key)==="contentPath"))==null?void 0:R.value)==null?void 0:F.split("/"))==null?void 0:K[0])!=="算法库"&&((H=f==null?void 0:f.filter($=>($==null?void 0:$.label)!=="操作"))==null?void 0:H.length)!==0?(p.push({key:"extraButton",contents:[{label:"新建"},{label:"修改模板"},{label:"批量删除"},{label:"导入",type:"upload"},{label:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}]}),p.push({key:"rowButton",contents:[{label:"复制新增"},{label:"删除"}]})):(p.push({key:"extraButton",contents:[{label:"新增"},{label:"批量删除"},{label:"导入",type:"upload"},{label:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}]}),(J=f==null?void 0:f.filter($=>($==null?void 0:$.label)!=="操作"))!=null&&J.every($=>($==null?void 0:$.isRun)===!0)||((ae=(oe=(U=r==null?void 0:r.find($=>($==null?void 0:$.key)==="contentPath"))==null?void 0:U.value)==null?void 0:oe.split("/"))==null?void 0:ae[0])==="算法库"?p.push({key:"rowButton",contents:[{label:"查看"},{label:"复制新增"},{label:"编辑"},{label:"执行"},{label:"删除"}]}):p.push({key:"rowButton",contents:[{label:"查看"},{label:"复制新增"},{label:"编辑"},{label:"删除"}]})),p.push({key:"relatedFilter",contents:(Q=d.find($=>($==null?void 0:$.key)==="relatedPath"))==null?void 0:Q.value}),p.push({key:"tableFilter",contents:(X=d.find($=>($==null?void 0:$.key)==="tableFilter"))==null?void 0:X.value}),((B=d==null?void 0:d.filter($=>{var te;return(te=$==null?void 0:$.key)==null?void 0:te.includes("groupName")}))==null?void 0:B.length)===1)s.push({comp:"Table",compData:p,name:(j=(I=d.find($=>($==null?void 0:$.key)==="groupName"))==null?void 0:I.value)==null?void 0:j.replaceAll("'",""),isShow:!0});else{let $={comp:"Table",compData:p,isShow:!0};(Y=d==null?void 0:d.filter(te=>{var le;return(le=te==null?void 0:te.key)==null?void 0:le.includes("groupName")}))==null||Y.forEach(te=>{$[te.key.replace("groupName","name")]=te.value}),s.push($)}}),(s==null?void 0:s.length)>0)return{comp:"Group",compData:[{key:"groupContents",contents:s}],name:(c=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="contentPath"))==null?void 0:c.value,parentPath:(u=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="contentPath"))==null?void 0:u.parentPath}}))==null?void 0:l.filter(r=>r)},fx=t=>{var r,s;const n=(r=t.map(i=>{var u,d;let c=(d=(u=i.key.split("("))==null?void 0:u[1])==null?void 0:d.trim();return c==null?void 0:c.slice(0,c.length-1)}))==null?void 0:r.filter(i=>i),o=[];n==null||n.forEach(i=>{var u,d;const c=[];if((u=lo.contentTrans(i))==null||u.forEach(p=>{var f,h,m,y,v,b,k,E,C,g,S,w,N,V;if(p.includes("{")&&p.includes("[")){let _=a.cloneDeep(p).split(":");p=(b=(h=(f=a.cloneDeep(_))==null?void 0:f[0])==null?void 0:h.split("{"))==null?void 0:b[((v=(y=(m=a.cloneDeep(_))==null?void 0:m[0])==null?void 0:y.split("{"))==null?void 0:v.length)-1].replaceAll("'",""),c.push(p);let P=(C=(E=(k=_==null?void 0:_[(_==null?void 0:_.length)-1])==null?void 0:k.split("}"))==null?void 0:E[0])==null?void 0:C.replaceAll("'",'"'),T=[];(S=(g=P.slice(1,P.length-1))==null?void 0:g.split(","))==null||S.forEach(D=>{T.push(D)}),c.push(T)}else if(p.includes("{")){let _=(w=p.split(":"))==null?void 0:w[0];p=(V=_==null?void 0:_.split("{"))==null?void 0:V[((N=_==null?void 0:_.split("{"))==null?void 0:N.length)-1].replaceAll("'",""),c.push(p)}else c.push(p)}),!c.some(p=>Array.isArray(p)))o.push(c);else{let p=[];c==null||c.forEach((f,h)=>{h!==c.length-1&&p.push(f)}),(d=c==null?void 0:c[(c==null?void 0:c.length)-1])==null||d.forEach(f=>{let h=a.cloneDeep(p);h.push(f),o.push(h)})}});const l=(s=o.filter(i=>i.length!==0))==null?void 0:s.map(i=>{let c="";return i.forEach(u=>{!u.includes("{")&&!(u!=null&&u.includes("$"))&&(c=c===""?c+a.cloneDeep(u):c+"/"+a.cloneDeep(u))}),c});return[...new Set(l)]},px=t=>{var d,p,f,h;let n=[];const o=fx(a.cloneDeep(t)),l=JM(a.cloneDeep(t));n.push(l);const r=WM(a.cloneDeep(t));r&&n.push(r);const s=UM(a.cloneDeep(t));s&&((d=a.cloneDeep(s))==null||d.forEach(m=>{n.push(m)}));const i=(p=a.cloneDeep(t))==null?void 0:p.filter(m=>{var y;return(y=m==null?void 0:m.key)==null?void 0:y.includes("(")}).map(m=>ix(m,o)).filter(m=>(m==null?void 0:m.length)!==0);let c=[];i==null||i.forEach(m=>{m==null||m.forEach(y=>{c!=null&&c.find(v=>{var b,k;return((b=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="contentPath"))==null?void 0:b.value)===((k=y==null?void 0:y.find(E=>(E==null?void 0:E.key)==="contentPath"))==null?void 0:k.value)})?c=c==null?void 0:c.map(v=>{var k,E;return((k=v==null?void 0:v.find(C=>(C==null?void 0:C.key)==="contentPath"))==null?void 0:k.value)===((E=y==null?void 0:y.find(C=>(C==null?void 0:C.key)==="contentPath"))==null?void 0:E.value)&&(v=[...v,...y.filter(C=>(C==null?void 0:C.key)!=="contentPath")]),v}):c.push(y)})});let u=(f=a.cloneDeep(i))==null?void 0:f.map(m=>{var y,v;return(v=(y=m==null?void 0:m[0])==null?void 0:y.find(b=>(b==null?void 0:b.key)==="contentPath"))==null?void 0:v.value});return u==null||u.forEach(m=>{u!=null&&u.includes(m+Xr.value)}),c=(h=a.cloneDeep(c))==null?void 0:h.map(m=>{var v,b,k;let y=(v=m==null?void 0:m.find(E=>(E==null?void 0:E.key)==="contentPath"))==null?void 0:v.value;return(b=a.cloneDeep(u))!=null&&b.find(E=>E===y+Xr.value)?m=m==null?void 0:m.map(E=>((E==null?void 0:E.key)==="tableColumn"&&(E.isParent=!0),E)):(y==null?void 0:y[(y==null?void 0:y.length)-1])===Xr.value?m=m==null?void 0:m.map(E=>((E==null?void 0:E.key)==="tableColumn"&&(m!=null&&m.find(C=>(C==null?void 0:C.key)==="groupName"&&(C==null?void 0:C.value)==="方法明细"))&&(E.isRun=!0),E)):((k=y==null?void 0:y.split("/"))==null?void 0:k[0])==="算法程序"&&(m=m==null?void 0:m.map(E=>((E==null?void 0:E.key)==="tableColumn"&&(E.isRun=!0),E))),m}),n=[...n,...dx(c)],n},fd=t=>{var s,i,c;let n=t;const o=[];let l="",r=0;for(const u of n)r++,u.includes("'")||l.includes("'")?(l+=u.trim(),((i=(s=a.cloneDeep(l))==null?void 0:s.split("'"))==null?void 0:i.length)===3&&((c=a.cloneDeep(l))==null?void 0:c[l.length-1])==="'"?(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l=""):r===(t==null?void 0:t.length)&&(o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):(l+=u.trim(),o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="");return(l==null?void 0:l.length)!==0&&o.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),o},mx=t=>{var r,s,i;const n=(s=(r=lo.contentTransArray(a.cloneDeep(t)))==null?void 0:r.filter(c=>c!==""))==null?void 0:s.map(c=>c.replaceAll("==","#").replaceAll(",",","));let o=(i=n==null?void 0:n.filter(c=>!c.includes("/*")&&!c.includes("*/")))==null?void 0:i.map(c=>lo.parseGroupValue(c));return o=o==null?void 0:o.map(c=>{var f,h;let u=(f=fd(a.cloneDeep(c).value))==null?void 0:f.map(m=>{var y;return(m==null?void 0:m.length)===1&&(m=(y=m==null?void 0:m.replaceAll("<","["))==null?void 0:y.replaceAll(">","]")),m}).join("");return{key:(h=fd(a.cloneDeep(c).key))==null?void 0:h.map(m=>{var y;return(m==null?void 0:m.length)===1&&(m=(y=m==null?void 0:m.replaceAll("<","["))==null?void 0:y.replaceAll(">","]")),m}).join(""),value:u}}),px(o)};exports._sfc_main=FM;exports._sfc_main$1=KM;exports._sfc_main$2=HM;exports.expandToNewContents=mx;exports.savePageDataAsync=RM;
|