ss-component-new 1.1.232 → 1.1.234
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/array-BaPCzYTt.cjs +7 -0
- package/dist/array-CKhZEpxs.js +3980 -0
- package/dist/{cloneDeep-Dof88Xfu.js → cloneDeep-MsUt4YlV.js} +1 -1
- package/dist/{cloneDeep-CktvOFQx.cjs → cloneDeep-ntGUb3kq.cjs} +1 -1
- package/dist/{index-MHmvswgz.cjs → index-0tU5JU4m.cjs} +1 -1
- package/dist/{index-BS5q4oAa.js → index-B2lKlXph.js} +5 -5
- package/dist/{index-CD_V87KZ.cjs → index-B4U92THu.cjs} +1 -1
- package/dist/{index-DJkyWXUQ.cjs → index-B5gSwi6Z.cjs} +1 -1
- package/dist/{index-DvpoH0CQ.js → index-BAEXj8gM.js} +7 -7
- package/dist/index-BBdSFBFW.cjs +1 -0
- package/dist/{index-CRzDMz2f.js → index-BLMw6MIQ.js} +7 -7
- package/dist/{index-6i92JFtr.cjs → index-BOA48lnC.cjs} +1 -1
- package/dist/{index-B1ACt1r8.cjs → index-BQ2GHLSV.cjs} +1 -1
- package/dist/{index-CP1rxlQW.cjs → index-BZs-ujaX.cjs} +1 -1
- package/dist/{index-B5ixqHZB.cjs → index-B_tbZ9aY.cjs} +1 -1
- package/dist/{index-CFrZVme4.js → index-Bb72F69W.js} +4 -4
- package/dist/{index-CXHQlToy.js → index-BfHPuXKR.js} +4 -4
- package/dist/{index-CTDvgz6D.js → index-BkHXqFWR.js} +4 -4
- package/dist/{index-D672QpxY.cjs → index-BlxgoQ5L.cjs} +1 -1
- package/dist/{index-BdcivI0n.js → index-BmKNSzeX.js} +9 -9
- package/dist/{index-BS-dYA6V.cjs → index-BqcpyTu9.cjs} +1 -1
- package/dist/{index-KAxfvpFC.cjs → index-ByodmiBA.cjs} +1 -1
- package/dist/{index-sjkdiuXH.cjs → index-C2_l30iB.cjs} +1 -1
- package/dist/{index-DtJQBHbx.js → index-C8QPo1ZE.js} +1 -1
- package/dist/{index-Q_XvzZ_1.js → index-C9s5L1GV.js} +3 -3
- package/dist/{index-Cz4RyK4P.js → index-CFVb_tT6.js} +1056 -1028
- package/dist/{index-Z1xr-ejC.js → index-CPi2XYWY.js} +1 -1
- package/dist/{index-CpL7Ek4u.cjs → index-ChPrN7hf.cjs} +1 -1
- package/dist/index-CkWH36_t.cjs +9 -0
- package/dist/{index-DXmlMdoB.cjs → index-Clck01Eg.cjs} +1 -1
- package/dist/{index-CiGPupSC.js → index-CocoTkxz.js} +1 -1
- package/dist/{index-BP9e1URk.js → index-D31kEqsu.js} +10 -10
- package/dist/{index-Dt26RGyl.cjs → index-D48ZSn5J.cjs} +2 -2
- package/dist/{index-DFsguBq1.cjs → index-D7WdubJ_.cjs} +1 -1
- package/dist/{index-DTl2kpLh.js → index-DKoGbWnQ.js} +5 -5
- package/dist/{index-By2WyWxQ.js → index-DNDm5VMx.js} +3 -3
- package/dist/{index-DAUiPeRo.js → index-DXk5SSco.js} +7 -7
- package/dist/{index-D7bfd1SP.js → index-DaGEGjI3.js} +6 -6
- package/dist/index-DbroAaW1.cjs +1 -0
- package/dist/{index-BHOafXrq.js → index-Dct3YNQ-.js} +80 -80
- package/dist/{index-Cy8P0O9s.cjs → index-DiA7gagB.cjs} +1 -1
- package/dist/{index-B27v9fmq.cjs → index-DqQBVHKG.cjs} +1 -1
- package/dist/{index-BoSTyMal.cjs → index-DutEOhxI.cjs} +1 -1
- package/dist/{index-CewL0ZVN.js → index-DvJz7Mon.js} +4 -4
- package/dist/{index-DEdZZ43j.js → index-DvuX7yeK.js} +1 -1
- package/dist/{index-1AAX7OWr.js → index-Ra6MTXM1.js} +1 -1
- package/dist/index-TQCx9Vc5.js +683 -0
- package/dist/{index-CRxtHDjt.cjs → index-YNnlrVVi.cjs} +1 -1
- package/dist/{index-BhkmOuOr.js → index-_s5X5HOA.js} +1 -1
- package/dist/{index-DBVoOuwx.js → index-fYmlidtK.js} +5 -5
- package/dist/{index-CrBfrGyt.cjs → index-h4qeU22u.cjs} +1 -1
- package/dist/{index-B1DkFC1_.cjs → index-vJUk855Y.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CHN4GMRq.js → index.vue_vue_type_script_setup_true_lang-BSq8NAqW.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-D3T3IoTp.cjs → index.vue_vue_type_script_setup_true_lang-BoCoafuN.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Bg0LXFmQ.cjs → index.vue_vue_type_script_setup_true_lang-DJrnK8-U.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BTS3qCYJ.js → index.vue_vue_type_script_setup_true_lang-Uu9vz3yj.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BdYMXloP.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-D7ge7WCM.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BmL8jkus.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-ITwPAWNg.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Ctz7x3hQ.js → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-7cGf0Pg7.js} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Du4fk0u8.cjs → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CKA2LQee.cjs} +1 -1
- package/dist/{login-TVZKm0bS.cjs → login-CgEq3BxR.cjs} +1 -1
- package/dist/{login-DnqNwFzD.js → login-j-9FJN7H.js} +2 -2
- package/dist/{main-DqSAQJ-I.js → main-Cp2hVZRs.js} +6 -6
- package/dist/{main-jkBzFk0x.cjs → main-aOPkyKz4.cjs} +1 -1
- package/dist/{menu-xHRrBcoq.cjs → menu-BYfZvhv4.cjs} +1 -1
- package/dist/{menu-DNjiqLiy.js → menu-DeN_WX32.js} +1 -1
- package/dist/{modelComp-BZYWE77x.js → modelComp-C43krUzp.js} +12 -4
- package/dist/modelComp-D7hOkuHj.cjs +1 -0
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/array-CX_klfYT.cjs +0 -7
- package/dist/array-CcAct9KU.js +0 -3587
- package/dist/index-BNG8jvzJ.js +0 -662
- package/dist/index-BaGt6aM0.cjs +0 -9
- package/dist/index-SZd8Ei1D.cjs +0 -1
- package/dist/index-kkjIPdQ2.cjs +0 -1
- package/dist/modelComp-Dq1Brxk6.cjs +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const oe=require("./index-D48ZSn5J.cjs"),e=require("vue"),de=require("./index-D7WdubJ_.cjs"),Y=require("./index-CkWH36_t.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p=require("./cloneDeep-ntGUb3kq.cjs"),ce=require("./menu-BYfZvhv4.cjs"),fe=require("./index-ByodmiBA.cjs"),ml=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),yl=require("./modelComp-D7hOkuHj.cjs"),Oe=require("./index.vue_vue_type_script_setup_true_lang-DJrnK8-U.cjs"),kl=a=>a.match(/\((.*)\)/)[1],ve=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],ge=[{label:"输入框",value:"Input"},{label:"单选框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"}],gl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ge},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"}],vl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ge},{key:"originalContent",label:"初始值",type:"Select"},{key:"contents",label:"选项值",type:"Input"}],bl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ge},{key:"originalContent",label:"初始值",type:"Date"}],Cl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ge},{key:"originalContent",label:"初始值",type:"Input"}],Dl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ge}],te=[{key:"Input",value:gl},{key:"Select",value:vl},{key:"Date",value:bl},{key:"TextArea",value:Cl},{key:"Upload",value:Dl}],El=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],ie=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:El},{key:"background",label:"颜色",type:"Color"}],_l={class:"form-content"},xl={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(a,{emit:s}){const n=a,l=s,o=e.ref([]),r=e.ref(!1),c=e.ref([]),d=oe.useFormToTableComp(de.pinia),v=e.ref(!1),h=e.ref(),f=C=>{var k,D,t,u;const w=(D=(k=p.cloneDeep(n.itemData))==null?void 0:k.find(i=>(i==null?void 0:i.key)==="formContent"))==null?void 0:D.contents,y=p.cloneDeep(C.content);let J={};y&&((t=Object.values(y))==null?void 0:t.length)>0&&((u=Object.values(y))==null||u.forEach((i,b)=>{J[w[b].key]=i}));const g={content:J,index:n==null?void 0:n.index,buttonName:C==null?void 0:C.buttonName};l("change",g)},N=C=>{var J,g;if(!C)return;if(((J=Object.values(p.cloneDeep(C)))==null?void 0:J.length)>0){const k=(g=Object.values(p.cloneDeep(C)))==null?void 0:g.map(t=>t);let D="";k==null||k.forEach(t=>{t!==""&&t!==void 0&&(D=D===""?t:D+"/"+t)}),d.setSelectArray(k),d.setSelectString(D)}const w=p.cloneDeep(n.itemData),y=w==null?void 0:w.map(k=>{var D;return(k==null?void 0:k.key)==="formContent"&&((D=k.contents)==null||D.map((t,u)=>{var i,b,L,R,j,$,T,V,m,O,_,S,B,M,U,Z,K,ee,ne;return t.type=t!=null&&t.type?t.type:(R=(L=(b=(i=t==null?void 0:t.key)==null?void 0:i.split("$"))==null?void 0:b[1])==null?void 0:L.split("("))!=null&&R[0]?(j=ve==null?void 0:ve.find(ae=>{var re,x,E,I;return(ae==null?void 0:ae.key)===((I=(E=(x=(re=t==null?void 0:t.key)==null?void 0:re.split("$"))==null?void 0:x[1])==null?void 0:E.split("("))==null?void 0:I[0])}))==null?void 0:j.value:"Input",t.options=t!=null&&t.options?t.options:((V=(T=($=t==null?void 0:t.key)==null?void 0:$.split("$"))==null?void 0:T[1])==null?void 0:V.length)>0?(S=(_=kl((O=(m=t==null?void 0:t.key)==null?void 0:m.split("$"))==null?void 0:O[1]))==null?void 0:_.split(","))==null?void 0:S.map(ae=>({label:ae,value:ae})):[],(B=t==null?void 0:t.key)!=null&&B.includes("$")&&(t.key=(U=(M=t==null?void 0:t.key)==null?void 0:M.split("$"))==null?void 0:U[0]),t.value=Array.isArray((Z=Object.values(C))==null?void 0:Z[u])?(ee=(K=Object.values(C))==null?void 0:K[u])==null?void 0:ee[0]:(ne=Object.values(C))==null?void 0:ne[u],t})),k});l("contentChange",{contents:y,index:n.index})};return e.watch(()=>n.itemData,()=>{var k,D,t,u,i,b,L,R,j,$,T;const C=(k=p.cloneDeep(n.itemData))==null?void 0:k.find(V=>(V==null?void 0:V.key)==="formContent"),w=(D=p.cloneDeep(n.itemData))==null?void 0:D.find(V=>(V==null?void 0:V.key)==="formButton"),y=(t=p.cloneDeep(n.itemData))==null?void 0:t.find(V=>(V==null?void 0:V.key)==="formFlex"),J=(u=p.cloneDeep(n.itemData))==null?void 0:u.find(V=>(V==null?void 0:V.key)==="formWrap"),g=(i=p.cloneDeep(n.itemData))==null?void 0:i.find(V=>(V==null?void 0:V.key)==="enableWrap");if((J==null?void 0:J.contents)==="纵向"?r.value=!1:r.value=!0,v.value=(g==null?void 0:g.contents)===void 0?!1:g==null?void 0:g.contents,h.value=typeof(y==null?void 0:y.contents)!="boolean"?!(!(y!=null&&y.contents)===""||((b=y==null?void 0:y.contents)==null?void 0:b.toUpperCase())==="VERTICAL"):y==null?void 0:y.contents,((L=C==null?void 0:C.contents)==null?void 0:L.length)>0&&Array.isArray(C==null?void 0:C.contents)){const V=[];(R=C==null?void 0:C.contents)==null||R.forEach((_,S)=>{var B,M,U,Z,K,ee,ne,ae,re,x;if((_==null?void 0:_.label)!==""){let E=(_==null?void 0:_.label)??(_==null?void 0:_.key)??"",I=(_==null?void 0:_.type)??"",A=(_==null?void 0:_.options)??[];if((B=_==null?void 0:_.key)!=null&&B.includes("$")&&(E=(M=p.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:M[0],((Z=(U=p.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:U[1])==null?void 0:Z.length)>0)){const[z,W]=(ee=(K=p.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:K[1])==null?void 0:ee.split(/[()]/);I=((ne=ve.find(q=>(q==null?void 0:q.key)===z))==null?void 0:ne.value)??"",((ae=W==null?void 0:W.split(","))==null?void 0:ae.length)>0&&(A=(re=W==null?void 0:W.split(","))==null?void 0:re.map(q=>({label:q,value:q})))}V.push({label:E??"",name:"t"+S,type:I===""?"Input":I,value:_!=null&&_.value?_.value:(A==null?void 0:A.length)>0?(x=A==null?void 0:A[0])==null?void 0:x.value:(_==null?void 0:_.value)??"",id:(_==null?void 0:_.id)??S,contents:A??[],width:(_==null?void 0:_.width)??1})}});const m=(j=p.cloneDeep(V))==null?void 0:j.map(_=>_.value);let O="";m==null||m.forEach(_=>{_!==""&&_!==void 0&&(O=O===""?_:O+"/"+_)}),d.setSelectArray(m),d.setSelectString(O),o.value=V}else o.value=[];if((($=w==null?void 0:w.contents)==null?void 0:$.length)>0){const V=[];(T=w==null?void 0:w.contents)==null||T.forEach((m,O)=>{(m==null?void 0:m.label)!==""&&V.push({label:(m==null?void 0:m.label)??"",id:(m==null?void 0:m.id)??O,type:(m==null?void 0:m.type)??"",background:m==null?void 0:m.background})}),c.value=V}else c.value=[]},{deep:!0,immediate:!0}),(C,w)=>(e.openBlock(),e.createElementBlock("div",_l,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:o.value,formRules:a.formRules,buttonValue:c.value,isRowFlex:h.value,isEnableWrap:v.value,onOnButtonClick:f,onChange:N,isButtonRow:r.value,key:n.itemData},null,8,["rowContents","formRules","buttonValue","isRowFlex","isEnableWrap","isButtonRow"]))]))}},Fe=se._export_sfc(xl,[["__scopeId","data-v-63ad44fd"]]),_e=e.ref(0),Me=a=>{var s;return!a||(a==null?void 0:a.length)===0?[]:(s=p.cloneDeep(a))==null?void 0:s.map(l=>(_e.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"center",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??_e.value,children:Me(l==null?void 0:l.children)},l))},Nl=a=>{var n;return(n=p.cloneDeep(a))==null?void 0:n.map(l=>(_e.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"center",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??_e.value,children:Me(l==null?void 0:l.children)},l))},Ge=(a,s)=>{var n;return a!=null&&a.find(l=>(l==null?void 0:l.id)===s)?(n=p.cloneDeep(a))==null?void 0:n.filter(o=>(o==null?void 0:o.id)!==s):(a=a==null?void 0:a.map(l=>(l.children=Ge(l==null?void 0:l.children,s),l)),a)},qe=(a,s)=>{var n;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(n=p.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(s==null?void 0:s.id)&&(o=s),o)):(a=a==null?void 0:a.map(l=>(l.children=qe(l==null?void 0:l.children,s),l)),a)},Ze=(a,s)=>{var n;return a!=null&&a.find(l=>{var o;return(l==null?void 0:l.id)===((o=s==null?void 0:s.contents)==null?void 0:o.id)})?(n=p.cloneDeep(a))==null?void 0:n.map(o=>{var r;return(o==null?void 0:o.id)===((r=s==null?void 0:s.contents)==null?void 0:r.id)&&(o=s==null?void 0:s.contents),o}):(a=a==null?void 0:a.map(l=>(l.children=Ze(l==null?void 0:l.children,s),l)),a)},He=(a,s)=>{var n;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(n=p.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(s==null?void 0:s.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(s.contents)),o)):(a=a==null?void 0:a.map(l=>(l.children=He(l==null?void 0:l.children,s),l)),a)},H=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],$l=[{label:"view",value:"查看"},{label:"fix",value:"修改"},{label:"delete",value:"删除"}],Bl=[{label:"add",value:"新增"}],ue=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Bl},{key:"background",label:"按钮背景色",type:"Color"}],pe=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:$l},{key:"textColor",label:"按钮颜色",type:"Color"}],Ke=ce.defineStore("modelTableComp",{state:()=>({tableIndex:0}),actions:{setTableIndex(a){this.tableIndex=a}}}),Al={class:"table-header-child"},wl={class:"table-header-child-main"},Vl={class:"table-header-child-content"},Il={class:"table-header-child-content-item"},Tl={class:"fix-button"},Sl=["onClick"],Ol=["onClick"],Fl=["onClick"],Ll={key:0},jl={class:"form-content"},Ul={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:s}){const n=a,l=s,o=e.ref(!1),r=e.ref(""),c=Ke(de.pinia),{tableIndex:d}=ce.storeToRefs(c);e.ref(0);const v=e.ref(""),h=e.ref([]),f=e.ref([]),N=t=>{var i;o.value=!0;let u=[];H==null||H.forEach(b=>{let L=p.cloneDeep(d.value)+1;c.setTableIndex(L),u.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:t[b.key],id:d.value,contents:b==null?void 0:b.options})}),t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&u.push({children:t==null?void 0:t.children,isFormColHidden:!0}),v.value=t==null?void 0:t.id,h.value=u,f.value=u},C=t=>{l("fixChange",p.cloneDeep(t))},w=t=>{l("deleteChange",p.cloneDeep(t))},y=t=>{o.value=!0;let u=[];H==null||H.forEach(i=>{let b=p.cloneDeep(d.value)+1;c.setTableIndex(b),u.push({label:i==null?void 0:i.label,name:i==null?void 0:i.label,type:i.type,value:"",id:d.value,contents:i==null?void 0:i.options})}),r.value=t==null?void 0:t.id,h.value=u,f.value=u},J=t=>{let u=p.cloneDeep(f.value);u=u==null?void 0:u.map(i=>(i.children||(i.value=t==null?void 0:t[i.name]),i)),f.value=u},g=()=>{var u,i;h.value=f.value;let t={};if(v.value!=="")t.id=v.value,(u=h.value)==null||u.forEach(b=>{const L=H==null?void 0:H.find(R=>(R==null?void 0:R.label)===(b==null?void 0:b.label));L?t[L.key]=b.value:b!=null&&b.children&&b.children.length>0&&(t.children=b.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"fix"});else{let b=p.cloneDeep(d.value)+1;c.setTableIndex(b),t.id="id"+d.value,(i=h.value)==null||i.forEach(L=>{const R=H==null?void 0:H.find(j=>(j==null?void 0:j.label)===(L==null?void 0:L.label));R?t[R.key]=L.value:L!=null&&L.children&&L.children.length>0&&(t.children=L.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"add"})}v.value="",h.value=[],f.value=[]},k=()=>{o.value=!1,v.value="",r.value="",h.value=[],f.value=[]},D=t=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",t),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(t,u)=>(e.openBlock(),e.createElementBlock("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(i,b)=>(e.openBlock(),e.createElementBlock("div",wl,[e.createElementVNode("div",Vl,[e.createElementVNode("div",Il,e.toDisplayString(i.label),1),e.createElementVNode("div",Tl,[e.createElementVNode("div",{class:"icon-content",onClick:L=>y(i)},e.toDisplayString("新增"),8,Sl),e.createElementVNode("div",{class:"icon-content",onClick:L=>N(i)},e.toDisplayString("修改"),8,Ol),e.createElementVNode("div",{class:"icon-content",onClick:L=>D(i)},e.toDisplayString("删除"),8,Fl)])]),i!=null&&i.children&&i.children.length>0?(e.openBlock(),e.createElementBlock("div",Ll,[e.createVNode(Qe,{tableChildContents:i==null?void 0:i.children,onDeleteChange:w,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Y.ssDialog,{visible:o.value,onBeforeDestroy:k,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",jl,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!0,onChange:J},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:k,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:g},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Jl=se._export_sfc(Ul,[["__scopeId","data-v-50120da7"]]),Rl={class:"table-header-child"},Pl={class:"table-header-child-main"},Wl={class:"table-header-child-content"},zl={class:"table-header-child-content-item"},Ml={class:"fix-button"},Gl=["onClick"],ql=["onClick"],Zl=["onClick"],Hl={key:0},Kl={class:"form-content"},Ql={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:s}){const n=a,l=s,o=e.ref(!1),r=e.ref(""),c=Ke(de.pinia),{tableIndex:d}=ce.storeToRefs(c),v=e.ref(""),h=e.ref([]),f=e.ref([]),N=t=>{l("fixChange",p.cloneDeep(t))},C=t=>{var i;o.value=!0;let u=[];H==null||H.forEach(b=>{let L=p.cloneDeep(d.value)+1;c.setTableIndex(L),u.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:t[b.key],id:d.value,contents:b==null?void 0:b.options})}),t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&u.push({children:t==null?void 0:t.children,isFormColHidden:!0}),v.value=t==null?void 0:t.id,h.value=u,f.value=u},w=t=>{o.value=!0;let u=[];H==null||H.forEach(i=>{let b=p.cloneDeep(d.value)+1;c.setTableIndex(b),u.push({label:i==null?void 0:i.label,name:i==null?void 0:i.label,type:i.type,value:"",id:d.value,contents:i==null?void 0:i.options})}),r.value=t==null?void 0:t.id,h.value=u,f.value=u},y=t=>{let u=p.cloneDeep(f.value);u=u==null?void 0:u.map(i=>(i.children||(i.value=t==null?void 0:t[i.name]),i)),f.value=u},J=()=>{var u,i;h.value=f.value;let t={};if(v.value!=="")t.id=v.value,(u=h.value)==null||u.forEach(b=>{const L=H==null?void 0:H.find(R=>(R==null?void 0:R.label)===(b==null?void 0:b.label));L?t[L.key]=b.value:b!=null&&b.children&&b.children.length>0&&(t.children=b.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"fix"});else{let b=p.cloneDeep(d.value)+1;c.setTableIndex(b),t.id="idChild"+d.value,(i=h.value)==null||i.forEach(L=>{const R=H==null?void 0:H.find(j=>(j==null?void 0:j.label)===(L==null?void 0:L.label));R?t[R.key]=L.value:L!=null&&L.children&&L.children.length>0&&(t.children=L.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"add"})}v.value="",h.value=[],f.value=[]},g=()=>{o.value=!1,v.value="",r.value="",h.value=[],f.value=[]},k=t=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",t),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},D=t=>{l("deleteChange",t)};return(t,u)=>(e.openBlock(),e.createElementBlock("div",Rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(i,b)=>(e.openBlock(),e.createElementBlock("div",Pl,[e.createElementVNode("div",Wl,[e.createElementVNode("div",zl,e.toDisplayString(i.label),1),e.createElementVNode("div",Ml,[e.createElementVNode("div",{class:"icon-content",onClick:L=>w(i)},e.toDisplayString("新增"),8,Gl),e.createElementVNode("div",{class:"icon-content",onClick:L=>C(i)},e.toDisplayString("修改"),8,ql),e.createElementVNode("div",{class:"icon-content",onClick:L=>k(i)},e.toDisplayString("删除"),8,Zl)])]),i!=null&&i.children&&i.children.length>0?(e.openBlock(),e.createElementBlock("div",Hl,[e.createVNode(Jl,{tableChildContents:i==null?void 0:i.children,onDeleteChange:D,onFixChange:N},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Y.ssDialog,{visible:o.value,onBeforeDestroy:g,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kl,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:g,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:J},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Qe=se._export_sfc(Ql,[["__scopeId","data-v-aa24990b"]]),Xl={class:"table-operate-content"},Yl={class:"table-operate-item"},en={class:"operate-title"},ln={class:"operate-content"},nn={class:"fix-content"},an={class:"fix-content-label"},on={class:"fix-button"},sn=["onClick"],rn=["onClick"],tn=["onClick"],cn={key:0},un={class:"operate-title"},pn={class:"operate-content"},dn={class:"fix-content"},fn={class:"fix-content-label"},hn={class:"fix-button"},mn=["onClick"],yn=["onClick"],kn={class:"operate-title"},gn={class:"operate-content"},vn={class:"fix-content"},bn={class:"fix-content-label"},Cn={class:"fix-button"},Dn=["onClick"],En=["onClick"],_n={class:"operate-content"},xn={style:{display:"flex","justify-content":"space-between"}},Nn={class:"form-content"},$n={class:"form-content"},Bn={class:"form-content"},An={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const n=a,l=s,o=e.ref([]),r=e.ref(!1),c=e.ref([]),d=e.ref(!1),v=e.ref([]),h=e.ref(!1),f=e.ref([]),N=e.ref(""),C=e.ref(""),w=e.ref([]),y=e.ref([]),J=e.ref([]),g=e.ref([]),k=e.ref(!1),D=e.ref([]),t=e.ref([]),u=e.ref(0),i=()=>{k.value=!0;let x=[];ue==null||ue.forEach(E=>{u.value++,x.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:(E==null?void 0:E.key)==="background"?"var(--ssComponent-primary-color)":"",id:u.value,contents:E==null?void 0:E.options})}),D.value=x,t.value=x},b=x=>{k.value=!0;let E=[];ue==null||ue.forEach(I=>{u.value++,E.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:x[I.key],id:u.value,contents:I==null?void 0:I.options})}),N.value=x==null?void 0:x.id,D.value=E,t.value=E};e.watch(()=>h.value,()=>{var E,I;let x=p.cloneDeep(n.originalItemContents);(E=p.cloneDeep(n.originalItemContents))!=null&&E.find(A=>(A==null?void 0:A.key)==="page")?x=(I=p.cloneDeep(n.originalItemContents))==null?void 0:I.map(A=>((A==null?void 0:A.key)==="page"&&(A.contents=h.value),A)):x.push({key:"page",contents:h.value}),l("change",x)},{deep:!0,immediate:!0});const L=x=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,I;y.value=(E=p.cloneDeep(y.value))==null?void 0:E.filter(A=>(A==null?void 0:A.id)!==(x==null?void 0:x.id)),l("change",(I=p.cloneDeep(n.originalItemContents))==null?void 0:I.map(A=>((A==null?void 0:A.key)==="extraButton"&&(A.contents=y.value),A))),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>{var I,A,z,W,q;D.value=t.value;let x={};if(N.value!==""?x.id=N.value:(u.value++,x.id="id"+u.value),(I=D.value)==null||I.forEach(P=>{const G=ue==null?void 0:ue.find(le=>(le==null?void 0:le.label)===(P==null?void 0:P.label));G?x[G.key]=P.value:P!=null&&P.children&&P.children.length>0&&(x.children=P.children)}),(A=y.value)!=null&&A.find(P=>P.id===x.id))y.value=(z=y.value)==null?void 0:z.map(P=>(P.id===x.id&&(P=x),P));else{let P=p.cloneDeep(y.value);P.push(x),y.value=P}k.value=!1,N.value="";let E=p.cloneDeep(n.originalItemContents);(W=p.cloneDeep(n.originalItemContents))!=null&&W.find(P=>(P==null?void 0:P.key)==="extraButton")?E=(q=p.cloneDeep(n.originalItemContents))==null?void 0:q.map(P=>((P==null?void 0:P.key)==="extraButton"&&(P.contents=y.value),P)):E.push({key:"extraButton",contents:y.value}),l("change",E)},j=x=>{let E=p.cloneDeep(t.value);E=E==null?void 0:E.map(I=>(I.children||(I.value=x==null?void 0:x[I.name]),I)),t.value=E},$=()=>{k.value=!1,D.value=[],N.value=""},T=x=>{d.value=!0;let E=[];pe==null||pe.forEach(I=>{u.value++,E.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:x[I.key],id:u.value,contents:I==null?void 0:I.options})}),N.value=x==null?void 0:x.id,J.value=E,g.value=E},V=x=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,I;w.value=(E=p.cloneDeep(w.value))==null?void 0:E.filter(A=>(A==null?void 0:A.id)!==(x==null?void 0:x.id)),l("change",(I=p.cloneDeep(n.originalItemContents))==null?void 0:I.map(A=>((A==null?void 0:A.key)==="rowButton"&&(A.contents=w.value),A))),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},m=()=>{r.value=!0;let x=[];H==null||H.forEach(E=>{u.value++,x.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:"",id:u.value,contents:E==null?void 0:E.options})}),v.value=x,f.value=x},O=()=>{d.value=!0;let x=[];pe==null||pe.forEach(E=>{u.value++,x.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:"",id:u.value,contents:E==null?void 0:E.options})}),J.value=x,g.value=x},_=x=>{let E=p.cloneDeep(g.value);E=E==null?void 0:E.map(I=>(I.children||(I.value=x==null?void 0:x[I.name]),I)),g.value=E},S=()=>{var I,A,z,W,q;J.value=g.value;let x={};if(N.value!==""?x.id=N.value:(u.value++,x.id="id"+u.value),(I=J.value)==null||I.forEach(P=>{const G=pe==null?void 0:pe.find(le=>(le==null?void 0:le.label)===(P==null?void 0:P.label));G?x[G.key]=P.value:P!=null&&P.children&&P.children.length>0&&(x.children=P.children)}),(A=w.value)!=null&&A.find(P=>P.id===x.id))w.value=(z=w.value)==null?void 0:z.map(P=>(P.id===x.id&&(P=x),P));else{let P=p.cloneDeep(w.value);P.push(x),w.value=P}d.value=!1,N.value="";let E=p.cloneDeep(n.originalItemContents);(W=p.cloneDeep(n.originalItemContents))!=null&&W.find(P=>(P==null?void 0:P.key)==="rowButton")?E=(q=p.cloneDeep(n.originalItemContents))==null?void 0:q.map(P=>((P==null?void 0:P.key)==="rowButton"&&(P.contents=w.value),P)):E.push({key:"rowButton",contents:w.value}),l("change",E)},B=()=>{d.value=!1,N.value="",g.value=[],J.value=[]},M=x=>{r.value=!0;let E=[];H==null||H.forEach(I=>{u.value++,E.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:u.value,contents:I==null?void 0:I.options})}),v.value=E,C.value=x==null?void 0:x.id,f.value=E},U=x=>{var E;c.value=Ge(p.cloneDeep(c.value),x==null?void 0:x.id),l("change",(E=p.cloneDeep(n.originalItemContents))==null?void 0:E.map(I=>{var A;return(I==null?void 0:I.key)==="header"&&(I.contents=(A=c.value)!=null&&A.some(z=>z==null?void 0:z.children)?[c.value]:c.value),I}))},Z=x=>{var I,A,z;x.type==="fix"?x.id!==""?c.value=Ze(c.value,x):c.value=qe(c.value,x==null?void 0:x.contents):c.value=He(c.value,x),c.value=(I=c.value)!=null&&I.some(W=>W==null?void 0:W.children)?[c.value]:c.value,N.value="";let E=p.cloneDeep(n.originalItemContents);(A=p.cloneDeep(n.originalItemContents))!=null&&A.find(W=>(W==null?void 0:W.key)==="header")?E=(z=p.cloneDeep(n.originalItemContents))==null?void 0:z.map(W=>((W==null?void 0:W.key)==="header"&&(W.contents=c.value),W)):E.push({key:"header",contents:c.value}),l("change",E)},K=x=>{var I;r.value=!0;let E=[];H==null||H.forEach(A=>{u.value++,E.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:x[A.key],id:u.value,contents:A==null?void 0:A.options})}),x!=null&&x.children&&((I=x==null?void 0:x.children)==null?void 0:I.length)>0&&E.push({children:x==null?void 0:x.children,isFormColHidden:!0}),N.value=x==null?void 0:x.id,C.value="",v.value=E,f.value=E},ee=x=>{let E=p.cloneDeep(f.value);E=E==null?void 0:E.map(I=>(I.children||(I.value=x==null?void 0:x[I.name]),I)),f.value=E},ne=()=>{r.value=!1,N.value="",C.value="",f.value=[]},ae=()=>{var I,A,z,W,q,P;v.value=f.value;let x={};if(N.value!==""?x.id=N.value:(u.value++,x.id="id"+u.value),(I=v.value)==null||I.forEach(G=>{const le=H==null?void 0:H.find(he=>(he==null?void 0:he.label)===(G==null?void 0:G.label));le?x[le.key]=G.value:G!=null&&G.children&&G.children.length>0&&(x.children=G.children)}),(A=c.value)!=null&&A.find(G=>G.id===x.id))c.value=(z=c.value)==null?void 0:z.map(G=>(G.id===x.id&&(G=x),G));else{let G=p.cloneDeep(c.value)??[];C.value===""?G.push(x):G=G==null?void 0:G.map(le=>(le.id===C.value&&(le.children||(le.children=[]),le.children.push(x)),le)),c.value=G}c.value=(W=c.value)!=null&&W.some(G=>G==null?void 0:G.children)?[c.value]:c.value,r.value=!1,N.value="",C.value="";let E=p.cloneDeep(n.originalItemContents);(q=p.cloneDeep(n.originalItemContents))!=null&&q.find(G=>(G==null?void 0:G.key)==="header")?E=(P=p.cloneDeep(n.originalItemContents))==null?void 0:P.map(G=>((G==null?void 0:G.key)==="header"&&(G.contents=c.value),G)):E.push({key:"header",contents:c.value}),l("change",E)},re=x=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var E,I;c.value=(E=p.cloneDeep(c.value))==null?void 0:E.filter(A=>(A==null?void 0:A.id)!==(x==null?void 0:x.id)),l("change",(I=p.cloneDeep(n.originalItemContents))==null?void 0:I.map(A=>{var z;return(A==null?void 0:A.key)==="header"&&(A.contents=(z=c.value)!=null&&z.some(W=>W==null?void 0:W.children)?[c.value]:c.value),A})),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var x,E,I,A,z,W,q,P,G,le,he,Te,Se;!n.originalItemContents||n.originalItemContents.length===0||(o.value=p.cloneDeep(n.originalItemContents),c.value=(E=(x=o.value)==null?void 0:x.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:E.contents,w.value=(A=(I=o.value)==null?void 0:I.find(F=>(F==null?void 0:F.key)==="rowButton"))==null?void 0:A.contents,y.value=(W=(z=o.value)==null?void 0:z.find(F=>(F==null?void 0:F.key)==="extraButton"))==null?void 0:W.contents,h.value=((P=(q=o.value)==null?void 0:q.find(F=>(F==null?void 0:F.key)==="page"))==null?void 0:P.contents)??!1,c.value=(G=c.value)==null?void 0:G.map((F,ye)=>(Array.isArray(F)?F=Nl(F):F={label:(F==null?void 0:F.label)??"",prop:(F==null?void 0:F.label)==="操作"?"operate":F==null?void 0:F.prop,width:F!=null&&F.width?parseInt(F.width):"",fixed:(F==null?void 0:F.fixed)??void 0,sortable:(F==null?void 0:F.sortable)??!1,align:(F==null?void 0:F.align)??"center",showOverflowTooltip:(F==null?void 0:F.showOverflowTooltip)??!0,isNotDrag:(F==null?void 0:F.isNotDrag)??!1,isEditCol:(F==null?void 0:F.isEditCol)??!1,isOperate:(F==null?void 0:F.isOperate)??!1,id:(F==null?void 0:F.id)??ye},F)),c.value=(le=c.value)!=null&&le.every(F=>Array.isArray(F))?(he=c.value)==null?void 0:he[0]:c.value,w.value=(Te=w.value)==null?void 0:Te.map((F,ye)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",textColor:(F==null?void 0:F.textColor)??"#000000",id:(F==null?void 0:F.id)??ye}),y.value=(Se=y.value)==null?void 0:Se.map((F,ye)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",background:(F==null?void 0:F.background)??"var(--ssComponent-primary-color)",id:(F==null?void 0:F.id)??ye}))},{deep:!0,immediate:!0}),(x,E)=>{const I=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Xl,[e.createElementVNode("div",Yl,[e.createElementVNode("div",en,[E[2]||(E[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:m},[e.createVNode(I,{name:"Plus",class:"icon-size"}),E[1]||(E[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,z)=>(e.openBlock(),e.createElementBlock("div",{key:z},[e.createElementVNode("div",nn,[e.createElementVNode("div",an,e.toDisplayString(A==null?void 0:A.label),1),e.createElementVNode("div",on,[e.createElementVNode("div",{class:"icon-content",onClick:W=>M(A)},e.toDisplayString("新增"),8,sn),e.createElementVNode("div",{class:"icon-content",onClick:W=>K(A)},e.toDisplayString("修改"),8,rn),e.createElementVNode("div",{class:"icon-content",onClick:W=>re(A)},e.toDisplayString("删除"),8,tn)])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",cn,[e.createVNode(Qe,{tableChildContents:A==null?void 0:A.children,onDeleteChange:U,onFixChange:Z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",un,[E[4]||(E[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:O},[e.createVNode(I,{name:"Plus",class:"icon-size"}),E[3]||(E[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(A,z)=>(e.openBlock(),e.createElementBlock("div",{key:z},[e.createElementVNode("div",dn,[e.createElementVNode("div",fn,e.toDisplayString(A==null?void 0:A.label),1),e.createElementVNode("div",hn,[e.createElementVNode("div",{class:"icon-content",onClick:W=>T(A)},e.toDisplayString("修改"),8,mn),e.createElementVNode("div",{class:"icon-content",onClick:W=>V(A)},e.toDisplayString("删除"),8,yn)])])]))),128))]),e.createElementVNode("div",kn,[E[6]||(E[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:i},[e.createVNode(I,{name:"Plus",class:"icon-size"}),E[5]||(E[5]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(A,z)=>(e.openBlock(),e.createElementBlock("div",{key:z},[e.createElementVNode("div",vn,[e.createElementVNode("div",bn,e.toDisplayString(A==null?void 0:A.label),1),e.createElementVNode("div",Cn,[e.createElementVNode("div",{class:"icon-content",onClick:W=>b(A)},e.toDisplayString("修改"),8,Dn),e.createElementVNode("div",{class:"icon-content",onClick:W=>L(A)},e.toDisplayString("删除"),8,En)])])]))),128))]),E[8]||(E[8]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",_n,[e.createElementVNode("div",xn,[E[7]||(E[7]=e.createElementVNode("div",null,e.toDisplayString("是否分页"),-1)),e.createVNode(Y._sfc_main$1,{modelValue:h.value,"onUpdate:modelValue":E[0]||(E[0]=A=>h.value=A)},null,8,["modelValue"])])])]),e.createVNode(Y.ssDialog,{visible:r.value,onBeforeDestroy:ne,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Nn,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!0,onChange:ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ne,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ae},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(Y.ssDialog,{visible:d.value,onBeforeDestroy:B,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$n,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:B,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:S},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(Y.ssDialog,{visible:k.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Bn,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:j},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:$,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:R},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},wn=se._export_sfc(An,[["__scopeId","data-v-212d896e"]]),Vn={class:"form-operate-content"},In={class:"form-operate-item"},Tn={class:"operate-title"},Sn={class:"operate-content"},On={class:"fix-content"},Fn={class:"fix-button"},Ln=["onClick"],jn=["onClick"],Un={class:"operate-title"},Jn={class:"operate-content"},Rn={class:"fix-content"},Pn={class:"fix-button"},Wn=["onClick"],zn=["onClick"],Mn={class:"form-content"},Gn={class:"form-content"},qn={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const n=a,l=s,o=e.ref(!1),r=e.ref([]),c=e.ref([]),d=e.ref(!1),v=e.ref([]),h=e.ref([]),f=e.ref(""),N=e.ref(!1),C=e.ref(0),w=e.ref([]),y=e.ref([]),J=$=>{var V,m;o.value=!0;let T=[];(m=(V=te==null?void 0:te.find(O=>(O==null?void 0:O.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:V.value)==null||m.forEach(O=>{C.value++,T.push({label:O==null?void 0:O.label,name:O==null?void 0:O.label,type:O.type,value:(O==null?void 0:O.label)==="类型"&&$[O.key]===""?"Input":$[O.key],id:C.value,contents:O==null?void 0:O.options})}),f.value=$==null?void 0:$.id,r.value=T,c.value=T},g=$=>{d.value=!0;let T=[];ie==null||ie.forEach(V=>{C.value++,T.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.label)==="类型"&&$[V.key]===""?"normal":$[V.key],id:C.value,contents:V==null?void 0:V.options})}),w.value=T,y.value=T,f.value=$==null?void 0:$.id};e.watch(()=>N.value,()=>{var T,V;let $=p.cloneDeep(n.originalItemContents);(T=p.cloneDeep(n.originalItemContents))!=null&&T.find(m=>(m==null?void 0:m.key)==="enableWrap")?$=(V=p.cloneDeep(n.originalItemContents))==null?void 0:V.map(m=>((m==null?void 0:m.key)==="enableWrap"&&(m.contents=!N.value),m)):$.push({key:"enableWrap",contents:!N.value}),l("change",$)},{deep:!0,immediate:!0});const k=()=>{var V,m,O,_,S;w.value=y.value;let $={};if(f.value!==""?$.id=f.value:(C.value++,$.id="id"+C.value),(V=w.value)==null||V.forEach(B=>{const M=ie==null?void 0:ie.find(U=>(U==null?void 0:U.label)===(B==null?void 0:B.label));M&&($[M.key]=B.value)}),(m=v.value)!=null&&m.find(B=>B.id===$.id))v.value=(O=v.value)==null?void 0:O.map(B=>(B.id===$.id&&(B=$),B));else{let B=p.cloneDeep(v.value);v.value||(v.value=[]),B.push($),v.value=B}d.value=!1,f.value="";let T=p.cloneDeep(n.originalItemContents);(_=p.cloneDeep(n.originalItemContents))!=null&&_.find(B=>(B==null?void 0:B.key)==="formButton")?T=(S=p.cloneDeep(n.originalItemContents))==null?void 0:S.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=v.value),B)):T.push({key:"formButton",contents:v.value}),l("change",T)},D=$=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var T,V;h.value=(T=p.cloneDeep(h.value))==null?void 0:T.filter(m=>(m==null?void 0:m.id)!==($==null?void 0:$.id)),l("change",(V=p.cloneDeep(n.originalItemContents))==null?void 0:V.map(m=>((m==null?void 0:m.key)==="formContent"&&(m.contents=h.value),m))),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},t=$=>{fe.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var T,V;v.value=(T=p.cloneDeep(v.value))==null?void 0:T.filter(m=>(m==null?void 0:m.id)!==($==null?void 0:$.id)),l("change",(V=p.cloneDeep(n.originalItemContents))==null?void 0:V.map(m=>((m==null?void 0:m.key)==="formButton"&&(m.contents=v.value),m))),ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},u=()=>{d.value=!0;let $=[];ie==null||ie.forEach(T=>{C.value++,$.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:(T==null?void 0:T.label)==="类型"?"normal":"",id:C.value,contents:T==null?void 0:T.options})}),w.value=$,y.value=$},i=()=>{var T,V;o.value=!0;let $=[];(V=(T=te==null?void 0:te.find(m=>(m==null?void 0:m.key)==="Input"))==null?void 0:T.value)==null||V.forEach(m=>{C.value++,$.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:(m==null?void 0:m.label)==="类型"?"Input":"",id:C.value,contents:m==null?void 0:m.options})}),r.value=$,c.value=$},b=$=>{let T=p.cloneDeep(y.value);T=T==null?void 0:T.map(V=>(V.value=$==null?void 0:$[V.name],V)),y.value=T},L=$=>{var T,V,m,O;if(($==null?void 0:$.类型)!==((V=(T=c.value)==null?void 0:T.find(_=>(_==null?void 0:_.label)==="类型"))==null?void 0:V.value)){let _=[];(O=(m=te==null?void 0:te.find(S=>(S==null?void 0:S.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:m.value)==null||O.forEach(S=>{C.value++,_.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:($==null?void 0:$[S.label])??"",id:C.value,contents:S==null?void 0:S.options})}),c.value=_,r.value=_}else{let _=p.cloneDeep(c.value);_=_==null?void 0:_.map(S=>(S.value=$==null?void 0:$[S.name],S)),c.value=_}},R=()=>{var m,O,_,S,B,M;r.value=c.value;let $={};f.value!==""?$.id=f.value:(C.value++,$.id="id"+C.value);let T=(m=te==null?void 0:te.find(U=>{var Z,K;return(U==null?void 0:U.key)===(((K=(Z=r.value)==null?void 0:Z.find(ee=>(ee==null?void 0:ee.label)==="类型"))==null?void 0:K.value)??"label")}))==null?void 0:m.value;if((O=r.value)==null||O.forEach(U=>{const Z=T==null?void 0:T.find(K=>(K==null?void 0:K.label)===(U==null?void 0:U.label));Z&&($[Z.key]=U.value)}),$.width=1,(_=h.value)!=null&&_.find(U=>U.id===$.id))h.value=(S=h.value)==null?void 0:S.map(U=>(U.id===$.id&&(U=$),U));else{let U=p.cloneDeep(h.value);U.push($),h.value=U}o.value=!1,f.value="";let V=p.cloneDeep(n.originalItemContents);(B=p.cloneDeep(n.originalItemContents))!=null&&B.find(U=>(U==null?void 0:U.key)==="formContent")?V=(M=p.cloneDeep(n.originalItemContents))==null?void 0:M.map(U=>((U==null?void 0:U.key)==="formContent"&&(U.contents=h.value),U)):V.push({key:"formContent",contents:h.value}),l("change",V)},j=()=>{o.value=!1,d.value=!1,f.value="",c.value=[],y.value=[]};return e.watch(()=>n.originalItemContents,()=>{var T,V,m,O,_,S;if(!n.originalItemContents||n.originalItemContents.length===0)return;const $=p.cloneDeep(n.originalItemContents);h.value=((T=$==null?void 0:$.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:T.contents)??[],v.value=((V=$==null?void 0:$.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:V.contents)??[],N.value=(m=$==null?void 0:$.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&m.contents?!((O=$==null?void 0:$.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&O.contents):!0,h.value=(_=p.cloneDeep(h.value))==null?void 0:_.map((B,M)=>B={label:(B==null?void 0:B.key)??(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",contents:(B==null?void 0:B.options)??"",id:(B==null?void 0:B.id)??M,value:(B==null?void 0:B.value)??""}),v.value=(S=v.value)==null?void 0:S.map((B,M)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",background:(B==null?void 0:B.background)??"var(--ssComponent-primary-color)",id:(B==null?void 0:B.id)??M})},{deep:!0,immediate:!0}),($,T)=>{const V=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Vn,[e.createElementVNode("div",In,[e.createElementVNode("div",Tn,[T[1]||(T[1]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:i},[e.createVNode(V,{name:"Plus",class:"icon-size"}),T[0]||(T[0]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(m,O)=>(e.openBlock(),e.createElementBlock("div",{key:O},[e.createElementVNode("div",On,[e.createElementVNode("div",null,e.toDisplayString(m.label),1),e.createElementVNode("div",Fn,[e.createElementVNode("div",{class:"icon-content",onClick:_=>J(m)},e.toDisplayString("修改"),8,Ln),e.createElementVNode("div",{class:"icon-content",onClick:_=>D(m)},e.toDisplayString("删除"),8,jn)])])]))),128))]),e.createElementVNode("div",Un,[T[3]||(T[3]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:u},[e.createVNode(V,{name:"Plus",class:"icon-size"}),T[2]||(T[2]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Jn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(m,O)=>(e.openBlock(),e.createElementBlock("div",{key:O},[e.createElementVNode("div",Rn,[e.createElementVNode("div",null,e.toDisplayString(m.label),1),e.createElementVNode("div",Pn,[e.createElementVNode("div",{class:"icon-content",onClick:_=>g(m)},e.toDisplayString("修改"),8,Wn),e.createElementVNode("div",{class:"icon-content",onClick:_=>t(m)},e.toDisplayString("删除"),8,zn)])])]))),128))]),T[4]||(T[4]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1))]),e.createVNode(Y.ssDialog,{visible:o.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Mn,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:r.value,key:r.value,isEnableWrap:!0,onChange:L},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:R},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(Y.ssDialog,{visible:d.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Gn,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:k},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Le=se._export_sfc(qn,[["__scopeId","data-v-0e069362"]]),Zn={class:"step-module content"},Hn={class:"module-data"},Kn={class:"step-module layout"},Qn={class:"form-content"},Xn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const n=a,l=s,o=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),r=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),c=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),d=e.reactive({visible:!1,width:"40%",title:"步骤条"}),v=e.ref("create"),h=e.ref({}),f=e.ref([]),N=g=>{var k;h.value=g,l("change",(k=y())==null?void 0:k.compData)},C=(g,k)=>{var D,t;switch(g){case"create":(D=r.value)==null||D.forEach(u=>{u.value=""}),v.value="create",d.visible=!0;break;case"update":(t=r.value)==null||t.forEach(u=>{u.value=k[u==null?void 0:u.prop]}),v.value="update",d.visible=!0;break;case"delete":f.value.splice(k,1),v.value="delete";break}},w=g=>{var k,D,t;if((g==null?void 0:g.buttonName)==="确认"){const u=p.cloneDeep(g==null?void 0:g.content);switch(Object.keys(u).forEach(i=>{u[i]===""&&delete u[i]}),v.value){case"create":f.value.push({...u,index:((k=f.value)==null?void 0:k.length)+1});break;case"update":f.value=(D=f.value)==null?void 0:D.map(i=>i.index===(u==null?void 0:u.index)?{...i,title:u==null?void 0:u.title,description:u==null?void 0:u.description}:i);break}l("change",(t=y())==null?void 0:t.compData),d.visible=!1}else d.visible=!1},y=()=>({comp:"Step",compData:[{key:"stepList",contents:f.value},{key:"stepConfig",contents:h.value}]}),J=()=>{d.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,g=>{var k,D;g&&(h.value=((k=g==null?void 0:g.find(t=>t.key==="stepConfig"))==null?void 0:k.contents)??{},f.value=((D=g==null?void 0:g.find(t=>t.key==="stepList"))==null?void 0:D.contents)??[])},{immediate:!0}),(g,k)=>{const D=e.resolveComponent("svg-icon"),t=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Zn,[k[2]||(k[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:k[0]||(k[0]=u=>C("create"))},[e.createVNode(D,{name:"Plus",class:"icon-size"}),k[1]||(k[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",Hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(u,i)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:i},[e.createElementVNode("span",null,e.toDisplayString(u==null?void 0:u.title),1),e.createElementVNode("div",null,[e.createVNode(t,{type:"primary",size:"small",onClick:b=>C("update",{...u,index:i+1})},{default:e.withCtx(()=>k[3]||(k[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(t,{type:"danger",size:"small",onClick:b=>C("delete",i)},{default:e.withCtx(()=>k[4]||(k[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Kn,[k[5]||(k[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Y.ssForm,{rowContents:o.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Y.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:J,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qn,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:r.value,key:r.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:c.value,onOnButtonClick:w},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Yn=se._export_sfc(Xn,[["__scopeId","data-v-9361c99f"]]),ea={class:"step-module content"},la={class:"module-data"},na={class:"step-module layout"},aa={class:"form-content"},oa=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const n=a,l=s,o=e.ref("create"),r=e.ref({}),c=e.ref([]),d=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),v=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),f=e.reactive({visible:!1,width:"40%",title:"时间线"}),N=g=>{var k;r.value=g,console.log(1212,g),l("change",(k=y())==null?void 0:k.compData)},C=(g,k)=>{var D,t;switch(g){case"create":(D=v.value)==null||D.forEach(u=>{u.value=""}),o.value="create",f.visible=!0;break;case"update":(t=v.value)==null||t.forEach(u=>{u.value=k[u==null?void 0:u.prop]}),o.value="update",f.visible=!0;break;case"delete":c.value.splice(k,1),o.value="delete";break}},w=g=>{var k,D,t,u;if((g==null?void 0:g.buttonName)==="确认"){const i=p.cloneDeep(g==null?void 0:g.content);switch(Object.keys(i).forEach(b=>{i[b]===""&&delete i[b]}),o.value){case"create":console.log(1335,c.value,i),(D=c.value)==null||D.push({...i,index:((k=c.value)==null?void 0:k.length)+1});break;case"update":c.value=(t=c.value)==null?void 0:t.map(b=>b.index===(i==null?void 0:i.index)?{...b,content:i==null?void 0:i.content,timestamp:i==null?void 0:i.timestamp}:b);break}l("change",(u=y())==null?void 0:u.compData),f.visible=!1}else f.visible=!1},y=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:c.value},{key:"timeLineConfig",contents:r.value}]}),J=()=>{f.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,g=>{var k,D;g&&(r.value=((k=g==null?void 0:g.find(t=>t.key==="timeLineConfig"))==null?void 0:k.contents)??{},c.value=((D=g==null?void 0:g.find(t=>t.key==="timeLineList"))==null?void 0:D.contents)??[])},{immediate:!0}),(g,k)=>{const D=e.resolveComponent("svg-icon"),t=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",ea,[k[2]||(k[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:k[0]||(k[0]=u=>C("create"))},[e.createVNode(D,{name:"Plus",class:"icon-size"}),k[1]||(k[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",la,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(u,i)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:i},[e.createElementVNode("span",null,e.toDisplayString(u==null?void 0:u.content),1),e.createElementVNode("div",null,[e.createVNode(t,{type:"primary",size:"small",onClick:b=>C("update",{...u,index:i+1})},{default:e.withCtx(()=>k[3]||(k[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(t,{type:"danger",size:"small",onClick:b=>C("delete",i)},{default:e.withCtx(()=>k[4]||(k[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",na,[k[5]||(k[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Y.ssForm,{rowContents:d.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Y.ssDialog,{visible:f.visible,title:f.title,onBeforeDestroy:J,width:f.width},{default:e.withCtx(()=>[e.createElementVNode("div",aa,[(e.openBlock(),e.createBlock(Y.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:w},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),sa=se._export_sfc(oa,[["__scopeId","data-v-40aea043"]]),ra={class:"extra-content"},ta={key:0},ca={key:1},ia={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:s}){const n=a,l=e.ref(0),o=e.ref(),r=e.ref(),c=s,d=e.ref(!1),v=e.ref({}),h=e.ref({}),f=e.ref();e.watch(()=>[n.itemData],()=>{var u;const t=p.cloneDeep(n.itemData);o.value=(u=p.cloneDeep(t))==null?void 0:u.map(i=>{var b;if(i.key==="extra"){let L=[];(b=i.value)==null||b.forEach(R=>{var j;L.push((j=Object.values(R))==null?void 0:j[0])}),i.value=L}return i})},{deep:!0,immediate:!0});const N=(t,u,i,b)=>{var R;let L={};((R=t==null?void 0:t[0])==null?void 0:R.contents)==="详情"&&(d.value=!0,L[u]=t,r.value=t==null?void 0:t.filter(j=>(j==null?void 0:j.key)!=="tableContentName"),v.value=L,h.value=i,f.value=b.id)},C=t=>{var j,$,T,V;const u=($=(j=Object.values(p.cloneDeep(v.value)))==null?void 0:j[0])==null?void 0:$.filter(m=>(m==null?void 0:m.key)==="tableContentName"),i=(V=(T=Object.values(p.cloneDeep(v.value)))==null?void 0:T[0])==null?void 0:V.filter(m=>(m==null?void 0:m.key)!=="tableContentName"),b=i==null?void 0:i.map((m,O)=>{var _;return O===t.index&&(m==null?void 0:m.comp)==="Table"&&(m.compData=(_=m.compData)==null?void 0:_.map(S=>{var B,M;return(S==null?void 0:S.key)==="tableContents"&&(S.contents=(M=(B=t.content)==null?void 0:B.map(U=>{let Z={};for(let K in U)K!=="id"&&(Z[K]=U[K]);return Z}))==null?void 0:M.map(U=>Object.values(U))),S})),m});b.unshift(u==null?void 0:u[0]);let L=p.cloneDeep(v.value),R={};for(let m in L)R[m]=b;v.value=R},w=()=>{d.value=!1,v.value={},h.value={},f.value=void 0,l.value++},y=t=>{var j,$,T,V;const u=($=(j=Object.values(p.cloneDeep(v.value)))==null?void 0:j[0])==null?void 0:$.filter(m=>(m==null?void 0:m.key)==="tableContentName"),i=(V=(T=Object.values(p.cloneDeep(v.value)))==null?void 0:T[0])==null?void 0:V.filter(m=>(m==null?void 0:m.key)!=="tableContentName"),b=i==null?void 0:i.map((m,O)=>(O===t.index&&(m.compData=t.contents),m));b.unshift(u==null?void 0:u[0]);let L=p.cloneDeep(v.value),R={};for(let m in L)R[m]=b;v.value=R},J=()=>{var u,i;let t={};for(let b in h.value)b===((u=Object.keys(v.value))==null?void 0:u[0])?t[b]=(i=Object.values(v.value))==null?void 0:i[0]:t[b]=h.value[b];c("change",{buttonName:"编辑",index:f.value,singleContent:t},"methodData"),d.value=!1,v.value={},h.value={},f.value=void 0},g=()=>{d.value=!1,v.value={},h.value={},f.value=void 0},k=t=>{c("change",t,"methodData")},D=t=>Xe(t);return(t,u)=>(e.openBlock(),e.createElementBlock("div",ra,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(i,b)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(i==null?void 0:i.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ta)):(e.openBlock(),e.createElementBlock("div",ca,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:b,index:(i==null?void 0:i.id)??b,onContentClick:N,onChange:k},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Y.ssDialog,{visible:d.value,onBeforeDestroy:g},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(i,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(i.comp)),{itemData:i==null?void 0:i.compData,onChange:C,childItemData:i==null?void 0:i.itemChildData,key:b,onContentChange:y,index:(i==null?void 0:i.id)??b,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{class:"cancel-button footer-button",onClick:w},e.toDisplayString("取消")),e.createElementVNode("div",{class:"confirm-button footer-button",onClick:J},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},ua=se._export_sfc(ia,[["__scopeId","data-v-b0b2f71f"]]),pa={class:"method-content"},da=["onClick"],fa={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const s=e.ref([]),n=a,l=yl.useModelComp(de.pinia),{itemData:o,isEdit:r}=ce.storeToRefs(l),c=(h,f)=>{var C;const N=(C=f==null?void 0:f[0])==null?void 0:C.children;return h==null?void 0:h.map(w=>{var y;return w=(y=w==null?void 0:w.map((J,g)=>{var k;return{key:(k=N[g])==null?void 0:k.label,value:J}}))==null?void 0:y.filter(J=>J.key),w})};e.watch(()=>o.value,async()=>{r.value=="view"&&await v(p.cloneDeep(n.itemData))},{deep:!0});const d=async h=>{var t,u,i,b,L,R;let f={};if((t=p.cloneDeep(h.content))==null||t.forEach((j,$)=>{var T,V,m,O,_,S,B,M,U,Z,K,ee,ne,ae,re,x,E;if((j==null?void 0:j.comp)==="Table"){let I=(O=(m=(V=(T=j==null?void 0:j.compData)==null?void 0:T.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:V.contents)==null?void 0:m[0])==null?void 0:O.some(q=>q==null?void 0:q.children),A=(B=(S=(_=j==null?void 0:j.compData)==null?void 0:_.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:S.contents)==null?void 0:B.map(q=>q.slice(1)),z=(ee=(K=(Z=(U=(M=j==null?void 0:j.compData)==null?void 0:M.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:U.contents)==null?void 0:Z[0])==null?void 0:K[0])==null?void 0:ee.label,W=(re=(ae=(ne=j==null?void 0:j.compData)==null?void 0:ne.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:ae.contents)==null?void 0:re[0];if(I)f[z]=c(A,W);else{const q=[];W=W.slice(1,W.length-1),W==null||W.forEach((P,G)=>{A==null||A.forEach(le=>{q.push({key:P.label+le[0],value:le[G+1]})})}),f["form"+$]=q}}else{const I=(E=(x=j.compData)==null?void 0:x.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:E.contents;f.form={};const A=[];I==null||I.forEach(z=>{z.key!==""&&(z={key:z==null?void 0:z.key,value:z==null?void 0:z.value},A.push(z))}),f.form=A}}),h.api){const j=await de.axios.post(h.api,{data:f,templateFileName:(u=h==null?void 0:h.extraContent)==null?void 0:u[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var N=new Blob([j.data],{type:"application/octet-stream;charset=UTF-8"}),C=j.headers["content-disposition"],w=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),y=w.exec(C),J=((L=(b=(i=h==null?void 0:h.extraContent)==null?void 0:i[0])==null?void 0:b.split("."))==null?void 0:L[0])+"."+((R=y[1].split("."))==null?void 0:R[1]),g=document.createElement("a"),k=window.URL.createObjectURL(N),D=/^["](.*)["]$/g;g.style.display="none",g.href=k,g.download=decodeURI(J.replace(D,"$1")),document.body.appendChild(g),g.click(),document.body.removeChild(g),window.URL.revokeObjectURL(k)}},v=async h=>{var w;const f=p.cloneDeep(h),N=f==null?void 0:f.map(async y=>{var u,i,b,L,R,j,$;const g=(u=(await de.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:y.method}})).data.result)==null?void 0:u[0],k=await de.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:g==null?void 0:g.id}}),D=await oe.getItemData((i=y==null?void 0:y.value)==null?void 0:i[0],sessionStorage.getItem("systemKey"),""),t=(b=k.data.result)==null?void 0:b[0];return{buttonName:(L=g==null?void 0:g.key)==null?void 0:L.methodKey,api:(j=(R=t==null?void 0:t.value)==null?void 0:R.tableData)==null?void 0:j[0],content:D==null?void 0:D.filter(T=>T.comp!=="methodButton"),extraContent:($=p.cloneDeep(y.value))==null?void 0:$.slice(1)}}),C=await Promise.all(N);s.value=C==null?void 0:C.filter(y=>y==null?void 0:y.extraContent),(w=s.value)==null||w.forEach(y=>{var J;y.api===""&&((J=y.content)==null||J.forEach(g=>{var k;g.comp=="Table"&&l.setExtraContents(oe.methodTableToContent(g.compData,(k=y.extraContent)==null?void 0:k[0]))}))})};return e.watch(()=>n.itemData,async()=>{r.value=="view"&&await v(p.cloneDeep(n.itemData))},{immediate:!0,deep:!0}),(h,f)=>(e.openBlock(),e.createElementBlock("div",pa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,N=>(e.openBlock(),e.createElementBlock("div",null,[N.api!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:C=>d(N),class:"method-buttons"},e.toDisplayString(N.buttonName),9,da)):e.createCommentVNode("",!0)]))),256))]))}},ha=se._export_sfc(fa,[["__scopeId","data-v-9df085f9"]]),ma={};function ya(a,s){return" 567 "}const ka=se._export_sfc(ma,[["render",ya]]),ga={};function va(a,s){return" 1212 "}const ba=se._export_sfc(ga,[["render",va]]),Ca=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:s}){const n=a,l=s,o=e.ref(1),r=e.computed(()=>{var N,C;return(N=n==null?void 0:n.stepConfig)!=null&&N.allowTrigger?o.value:(C=n==null?void 0:n.stepConfig)==null?void 0:C.active}),c=(N,C)=>{o.value=C,l("clickStep",N,C)},d=N=>Y.getComponent(N),v=()=>{var C;const N=(C=n==null?void 0:n.stepList)==null?void 0:C.find((w,y)=>y+1===r.value);return console.log("findStep",N),N?N==null?void 0:N.children:[]},h=N=>{l("clickTrigger",N)},f=N=>{l("changeTrigger",N)};return(N,C)=>{var J,g,k,D,t;const w=e.resolveComponent("el-step"),y=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(y,{direction:(J=a.stepConfig)==null?void 0:J.direction,active:r.value,"finish-status":"success",simple:(g=a.stepConfig)==null?void 0:g.simple,"align-center":(k=a.stepConfig)==null?void 0:k.alignCenter},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(u,i)=>(e.openBlock(),e.createBlock(w,{key:i,class:"step-item",onClick:b=>c(u,i+1)},{title:e.withCtx(()=>[e.renderSlot(N.$slots,"title",{title:u==null?void 0:u.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(N.$slots,"description",{description:u==null?void 0:u.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(D=a.stepConfig)!=null&&D.allowTrigger&&((t=a.stepConfig)!=null&&t.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(v(),(u,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(u==null?void 0:u.type)),{modelValue:u.value,"onUpdate:modelValue":b=>u.value=b,onClickTrigger:h,onChangeTrigger:f,content:u==null?void 0:u.content},e.createSlots({_:2},[e.renderList(N.$slots,(b,L)=>({name:L,fn:e.withCtx(R=>[e.renderSlot(N.$slots,L,e.mergeProps({ref_for:!0},R||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Da=se._export_sfc(Ca,[["__scopeId","data-v-003d9390"]]),Ea=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:s}){const n=a,l=s,o=e.ref({}),r=e.ref([]),c=(d,v)=>{l("clickStep",d,v)};return e.watch(()=>n==null?void 0:n.itemData,d=>{var v,h;r.value=(v=d==null?void 0:d.find(f=>(f==null?void 0:f.key)==="stepList"))==null?void 0:v.contents,o.value=(h=d==null?void 0:d.find(f=>(f==null?void 0:f.key)==="stepConfig"))==null?void 0:h.contents},{immediate:!0}),(d,v)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Da,{stepConfig:o.value,stepList:r.value,onClickStep:c},{icon:e.withCtx(()=>[e.createVNode(h,{name:"import"})]),title:e.withCtx(({title:f})=>[e.createTextVNode(e.toDisplayString(f),1)]),description:e.withCtx(({description:f})=>[e.createTextVNode(e.toDisplayString(f),1)]),_:1},8,["stepConfig","stepList"])}}}),_a=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(s,n)=>{const l=e.resolveComponent("el-timeline-item"),o=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(r,c)=>(e.openBlock(),e.createBlock(l,{key:c,timestamp:r.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"content",{content:r==null?void 0:r.content,timestamp:r==null?void 0:r.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),xa=se._export_sfc(_a,[["__scopeId","data-v-4172a886"]]),Na={class:"line-content"},$a={class:"line-time"},Ba=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const s=a,n=e.ref({}),l=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,o=>{var r,c;l.value=(r=o==null?void 0:o.find(d=>(d==null?void 0:d.key)==="timeLineList"))==null?void 0:r.contents,n.value=(c=o==null?void 0:o.find(d=>(d==null?void 0:d.key)==="timeLineConfig"))==null?void 0:c.contents},{immediate:!0}),(o,r)=>(e.openBlock(),e.createBlock(xa,{activities:l.value,timeLineConfig:n.value},{content:e.withCtx(({content:c,timestamp:d})=>[e.createElementVNode("span",Na,e.toDisplayString(c),1),e.createElementVNode("span",$a,e.toDisplayString(d),1)]),_:1},8,["activities","timeLineConfig"]))}}),Aa=se._export_sfc(Ba,[["__scopeId","data-v-b4d9deed"]]),wa=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"}]),Va={TABLE:oe.ssTable,FORM:Fe,TABLEOPERATE:wn,FORMOPERATE:Le,FOLD:ml._sfc_main,CALCULATOR:ua,METHODBUTTON:ha,AVATARUPLOAD:Oe.ssAvatar,SIGNATURE:Oe._sfc_main,FORMTOP:Fe,STEP:Ea,STEPOPERATE:Yn,TIMELINE:Aa,TIMELINEOPERATE:sa,FORMTOPOPERATE:Le,SIGNATUREOPERATE:ba,AVATARUPLOADOPERATE:ka};function Xe(a){return Va[a==null?void 0:a.toUpperCase()]||null}const X=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],Q=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],me=e.ref(0),Ia=a=>{const[s,n]=a.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),o=n.replace(/^['"]|['"]$/g,"");return{key:l,value:o}},De=a=>{try{return JSON.parse(a),!0}catch{return!1}},Ta=a=>a.includes("$")&&a.trim().endsWith("(")?a+")":a,Sa=a=>{let s=a;const n=[];let l="";for(const o of s)o.includes("{")||l.includes("{")||o.includes("[")||l.includes("[")||o.includes("【")||l.includes("【")||o.includes("(")||l.includes("(")||o.includes("(")||l.includes("(")||o.includes("/*")||l.includes("/*")?(l+=o.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l),l="")):n.push(o.trim());return n==null?void 0:n.filter(o=>o.includes("{"))},Oa=a=>{var n;let s=[];return(n=Sa(a.slice(1,-1)))==null||n.forEach(l=>{var r,c,d,v;let o=((c=(r=l.slice(1,-1))==null?void 0:r.split(","))==null?void 0:c.length)??1;(v=(d=l.slice(1,-1))==null?void 0:d.split(","))==null||v.forEach(h=>{var w,y,J,g,k,D,t,u,i,b,L,R,j;let f=h==null?void 0:h.split(":"),N=f!=null&&f[0]?(f==null?void 0:f[1].split("$").length)-1===1?((w=f==null?void 0:f[0])==null?void 0:w.replace(/^"(.*)"$/,"$1"))+((y=f==null?void 0:f[1])==null?void 0:y.replace(/^"(.*)"$/,"$1")):Array.isArray((g=(J=f==null?void 0:f[1])==null?void 0:J.replace(/^"(.*)"$/,"$1"))==null?void 0:g.split("("))&&((t=(D=(k=f==null?void 0:f[1])==null?void 0:k.replace(/^"(.*)"$/,"$1"))==null?void 0:D.split("("))==null?void 0:t.length)>1?((u=f==null?void 0:f[0])==null?void 0:u.replace(/^"(.*)"$/,"$1"))+((L=(b=(i=f==null?void 0:f[1])==null?void 0:i.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))==null?void 0:L[0])+"()":(R=f==null?void 0:f[0])==null?void 0:R.replace(/^"(.*)"$/,"$1"):"",C=(f==null?void 0:f[1].split("$").length)-1===0?(j=f==null?void 0:f[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"):"";me.value++,s.push({id:me.value,key:N,value:C,width:o,extraContent:f==null?void 0:f[1]})})}),s},Ye=a=>{var s,n;try{const l=a.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let o=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(De(o)&&!o.includes("$")||(o=o.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),De(o)){const r=JSON.parse(o);let c=[];return r==null||r.forEach(d=>{var v;(v=Object.entries(p.cloneDeep(d)))==null||v.forEach(h=>{me.value++,c.push({id:me.value,key:(h==null?void 0:h[0])??"",value:(h==null?void 0:h[1])===""?"":h==null?void 0:h[1],width:Object.keys(p.cloneDeep(d)).length})})}),c}else return l.trim().startsWith("{{")?Oa(l.trim()):Be(o)}else if(De(l)){const o=JSON.parse(l);return Object.entries(o).map(([r,c])=>(me.value++,{id:me.value,key:r,value:c===""?"":c,width:1}))}else return((s=Be(l))==null?void 0:s.length)===0?l:(n=Be(l))==null?void 0:n.map(o=>({label:o.label,method:Ta(o.method)}))}catch(l){return console.error("转换失败:",l),[]}},Be=a=>{a=a.trim().replace(/^\{|\}$/g,"").trim();const s=[];let n=0;for(;n<a.length;){const l=a.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const o=l[1];n+=l[0].length;let r="",c=0,d=!1,v="";for(let h=n;h<a.length;h++){const f=a[h];if((f==='"'||f==="'")&&!d?(d=!0,v=f):f===v&&d&&(d=!1,v=""),!d&&((f==="{"||f==="("||f==="[")&&c++,(f==="}"||f===")"||f==="]")&&c--,f===","&&c===0||h===a.length-1)){r=a.slice(n,h+1).trim(),n=h+1;break}}s.push({label:o,method:r})}return s},Fa=(a,s)=>{try{if(X!=null&&X.find(n=>(n==null?void 0:n.key)===s))return a.replace(/['"]/g,"").trim();if(p.cloneDeep(a).split("[").length-1>1){const n=p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(De(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(o=>({label:o})):l}else return Ye(p.cloneDeep(a))}}catch(n){return console.error("解析失败:",n),a}},La=a=>({[a==null?void 0:a.key]:Fa(a==null?void 0:a.value,a==null?void 0:a.key)}),ja=a=>{try{if(p.cloneDeep(a).split("[").length-1>1){const s=p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(s){return console.error("解析失败:",s),a}},Ua=a=>{const s=a.match(/\(([^)]+)\)/);return s?s[1]:""},Ja=a=>{const s=a.match(/^([^(]+)\s*\(/);return s?s[1].trim():a},je=a=>a.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(s=>s.trim()).filter(s=>s).join("/"),Ra=a=>{var c,d;let s=[],n=[];const l=(c=p.cloneDeep(a))==null?void 0:c.map(v=>v==null?void 0:v.key),o=[...new Set((d=p.cloneDeep(l))==null?void 0:d.map(v=>Ua(v)))];o==null||o.forEach(v=>{let h=a==null?void 0:a.filter(C=>C.key.includes(v));h==null||h.forEach(C=>{C!=null&&C.key.includes("Menus")&&(s.push({key:"GroupName",value:je(C==null?void 0:C.value)}),n.push(je(C==null?void 0:C.value)))});let f=a==null?void 0:a.filter(C=>C.key.includes(v)&&!(C!=null&&C.key.includes("Menus")));f=f==null?void 0:f.map(C=>(C.key=Ja(C.key),C));const N={key:"GroupContents",value:f};s.push(N)});const r={key:"Menus",value:n};return s.unshift(r),s},el=a=>{var s,n;if(Array.isArray(Object.keys(a))&&((s=Object.keys(a))==null?void 0:s.length)>0){let l=[];return(n=Object.entries(a))==null||n.forEach(([o,r])=>{var d,v;let c=[];if(c.push(o),((d=Object.keys(r))==null?void 0:d.length)>0){let h=[];(v=el(r))==null||v.forEach(f=>{h.push(f)}),h==null||h.forEach(f=>{c.push(f)})}l.push(c)}),l}},Pa=(a,s)=>{var l;let n=s;return Array.isArray(Object.keys(a))&&((l=Object.entries(a))==null||l.forEach(([o,r])=>{let c=[o];if(typeof r=="object"&&r!==null){let d=el(r);d==null||d.forEach(v=>{c.push(v)})}n.push(c)})),n},Wa=a=>{const s={};return a.forEach(l=>{const o=l.split("/");let r=s;o.forEach(c=>{r[c]||(r[c]={}),r=r[c]})}),Pa(s,[])},ll=a=>Wa(a),za=a=>{var s,n,l,o,r,c,d,v;try{const h=Ne((n=(s=p.cloneDeep(a))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")),f=(o=(l=p.cloneDeep(h))==null?void 0:l.filter(y=>!y.includes("/*")))==null?void 0:o.map(y=>Ia(y)),N=Ra(f),C=[];if(((r=N==null?void 0:N.find(y=>(y==null?void 0:y.key)==="Menus"))==null?void 0:r.value.length)===0)return!1;(c=p.cloneDeep(N))==null||c.forEach(y=>{var J,g,k,D,t;X!=null&&X.find(u=>{var i,b;return((i=u==null?void 0:u.key)==null?void 0:i.toUpperCase())===((b=y==null?void 0:y.key)==null?void 0:b.toUpperCase())})?C.push({comp:((J=X==null?void 0:X.find(u=>{var i,b;return((i=u==null?void 0:u.key)==null?void 0:i.toUpperCase())===((b=y==null?void 0:y.key)==null?void 0:b.toUpperCase())}))==null?void 0:J.value)??"",name:(g=y==null?void 0:y.value)==null?void 0:g.replace(/[’]|[‘]|[']/g,""),compData:[]}):Q!=null&&Q.find(u=>{var i,b;return((i=u==null?void 0:u.key)==null?void 0:i.toUpperCase())===((b=y==null?void 0:y.key)==null?void 0:b.toUpperCase())})&&((C==null?void 0:C.length)===0&&(k=y.key)!=null&&k.includes("Menus")&&C.push({comp:"Menu",name:"",compData:[]}),(D=C==null?void 0:C[(C==null?void 0:C.length)-1])!=null&&D.compData&&C[(C==null?void 0:C.length)-1].compData.push({key:(t=Q==null?void 0:Q.find(u=>{var i,b;return((i=u==null?void 0:u.key)==null?void 0:i.toUpperCase())===((b=y==null?void 0:y.key)==null?void 0:b.toUpperCase())}))==null?void 0:t.value,contents:y==null?void 0:y.value}))});let w=(d=p.cloneDeep(C))==null?void 0:d.map(y=>{var J;return y!=null&&y.compData&&(y.compData=(J=y==null?void 0:y.compData)==null?void 0:J.map(g=>{var k,D,t,u,i,b,L,R,j,$,T;if((g==null?void 0:g.key)==="formFlex")g.contents=((D=(k=g.contents)==null?void 0:k.replace(/[’]|[‘]|[']/g,""))==null?void 0:D.toUpperCase())!=="Vertical".toUpperCase();else if((g==null?void 0:g.key)==="groupContents")g.contents=(t=p.cloneDeep(g.contents))==null?void 0:t.map(V=>La(p.cloneDeep(V)));else if(Array.isArray(g==null?void 0:g.contents))g.contents=ll(g.contents);else if(((i=(u=g==null?void 0:g.contents)==null?void 0:u.trim())!=null&&i.startsWith("[")||(L=(b=g.contents)==null?void 0:b.trim())!=null&&L.startsWith("【"))&&((j=(R=g.contents)==null?void 0:R.trim())!=null&&j.endsWith("]")||(T=($=g.contents)==null?void 0:$.trim())!=null&&T.endsWith("】")))g.contents=ja(p.cloneDeep(g.contents));else{if(!g.contents)return;g.contents=Ye(p.cloneDeep(g.contents))}return g})),y});return w=(v=p.cloneDeep(w))==null?void 0:v.map(y=>{var J;return(y==null?void 0:y.comp)==="Group"&&(y.compData=(J=y.compData)==null?void 0:J.map(g=>{var D;let k=[];return(D=g.contents)==null||D.forEach(t=>{var u,i,b,L,R,j,$,T,V,m,O,_;if(X!=null&&X.find(S=>{var B,M,U;return((B=S==null?void 0:S.key)==null?void 0:B.toUpperCase())===((U=(M=Object.keys(t))==null?void 0:M[0])==null?void 0:U.toUpperCase())}))k.push({comp:(u=X==null?void 0:X.find(S=>{var B,M,U;return((B=S==null?void 0:S.key)==null?void 0:B.toUpperCase())===((U=(M=Object.keys(t))==null?void 0:M[0])==null?void 0:U.toUpperCase())}))==null?void 0:u.value,name:(b=(i=Object.values(t))==null?void 0:i[0])==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(Q!=null&&Q.find(S=>{var B,M,U;return((B=S==null?void 0:S.key)==null?void 0:B.toUpperCase())===((U=(M=Object.keys(t))==null?void 0:M[0])==null?void 0:U.toUpperCase())})){if((k==null?void 0:k.length)===0)return;(L=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&L.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(R=Q==null?void 0:Q.find(S=>{var B,M,U;return((B=S==null?void 0:S.key)==null?void 0:B.toUpperCase())===((U=(M=Object.keys(t))==null?void 0:M[0])==null?void 0:U.toUpperCase())}))==null?void 0:R.value,contents:(j=Object.values(t))==null?void 0:j[0]})}else if((T=($=Object.keys(t))==null?void 0:$[0])!=null&&T.includes("$")){const S=(m=(V=Object.keys(p.cloneDeep(t)))==null?void 0:V[0])==null?void 0:m.split("$");k[(k==null?void 0:k.length)-1].compData.push({key:(O=Q==null?void 0:Q.find(B=>{var M,U;return((M=B==null?void 0:B.key)==null?void 0:M.toUpperCase())===((U=S==null?void 0:S[0])==null?void 0:U.toUpperCase())}))==null?void 0:O.value,contents:(_=Object.values(t))==null?void 0:_[0],selectLabel:S==null?void 0:S[1]})}return t}),g.contents=k,g})),y}),w}catch{return!1}},Ue=e.ref(0),nl=a=>{const s=[];let n=null;for(let l=0;l<a.length;l++){const o=a[l];if(Array.isArray(o))n&&(n.children=nl(o));else{const r={label:o};s.push(r),n=r}}return s},al=a=>{let s=0;for(const n of a)s++,n.children&&(s+=al(n.children));return s},ol=(a,s,n=[])=>{let l=0;for(const o of s){if(l>=a.length)break;const r=[...a[l]];if(n.push(r),l++,o.children&&o.children.length>0){const c=[];ol(a.slice(l),o.children,c),c.length>0&&(r.push(c),l+=al(o.children))}}return n},Ma=(a,s)=>{let n=[];return a==null||a.forEach(o=>{o.some(r=>Array.isArray(r))?n.push(...o):n.push(o)}),ol(n,s)},Ve=a=>{const s={label:a[0].trim()};if(a.length>1){const n=a.slice(1);n.length===1&&Array.isArray(n[0])?s.children=n[0].map(l=>Array.isArray(l)?Ve(l):{label:l.trim()}):s.children=n.map(l=>Array.isArray(l)?Ve(l):{label:l.trim()})}return s},Je=a=>{let s=a.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return s=s.replace(/:}(?=,|]|}|$)/g,':""}'),s=s.replace(/:,(?=\s*")/g,':"",'),s=s.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(n,l,o)=>`"${l}://${o}"`),s=s.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),s},Ga=a=>{var n;return a.some(l=>!Array.isArray(l))?a:(n=p.cloneDeep(a))==null?void 0:n.map(l=>{let o=[];return l.some(r=>Array.isArray(r))?l==null||l.forEach(r=>{Array.isArray(r)&&o.push(Ve(r))}):l.some(r=>r.includes("["))?o.push(l):o=l.map(r=>({label:r.trim()})),o})},sl=(a,s,n)=>{let l=a,o=n,r=s;return r.children&&(Array.isArray(o[o.length-1])?o[o.length-1].push(l[0]):o.push(l[0]),l.shift(),r=r.children),Array.isArray(r)&&r.forEach(c=>{if(c.children){const d=sl(l,c,o);o=d[0],l=d[1]}}),[o,l]},qa=(a,s)=>{let n=a,l=[];return s.length>0?s==null||s.forEach(o=>{let r=n==null?void 0:n[0];n.shift();const c=sl(p.cloneDeep(n),o,r);r=c[0],n=c[1],l.push(r)}):l=n,l},Ie=(a,s)=>{const n=Ga(p.cloneDeep(a));return qa(n,s)},Za=a=>{const s=[];let n=0;const l=a.length;for(;n<l;){const o=a[n];o.key==="tableColumns"&&n+1<l&&a[n+1].key==="tableContents"?(s.push({comp:"Table",compData:[o,a[n+1]],name:""}),n+=2):(s.push(o),n+=1)}return s},rl=a=>Ie([a],[]),xe=a=>{const s=[];return a==null||a.forEach(n=>n==null?void 0:n.forEach(o=>{var r,c;Ue.value++,s.push({id:Ue.value,key:(r=Object.keys(o))==null?void 0:r[0],value:(c=Object.values(o))==null?void 0:c[0],width:n.length})})),s},Re=a=>{let s=Za(a);return s=s==null?void 0:s.map(n=>{var l,o,r,c;if(n.comp==="Table")(l=n.compData)!=null&&l.find(d=>(d==null?void 0:d.key)==="header")||(n.compData=(o=n.compData)==null?void 0:o.map(d=>(d.key==="tableColumns"?d={key:"header",contents:Ie(d.value,[])}:d={key:d.key,contents:d.value},d)),n.compData.push({key:"extraButton",contents:[{label:"新增"}]}),n.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(n.key==="form"){const d=(r=n==null?void 0:n.value)==null?void 0:r.map(v=>(Array.isArray(v)||(v=[v]),v));n={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:xe(d)}],name:""}}else if(n.key==="formTop"){const d=(c=n==null?void 0:n.value)==null?void 0:c.map(v=>(Array.isArray(v)||(v=[v]),v));n={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:xe(d)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return n}),s},Ha=(a,s)=>{var d,v,h,f,N,C;const n=[],l=nl((v=(d=a==null?void 0:a.find(w=>w.key==="tableIndex"))==null?void 0:d.value)==null?void 0:v[0]);n.push({key:"tableIndexColumn",contents:s}),n.push({key:"tableIndex",contents:l});let o=[];const r=(h=a==null?void 0:a.find(w=>w.key==="tableColumns"))==null?void 0:h.value;r.length===1&&!(r!=null&&r[0].some(w=>Array.isArray(w)))?o=(f=r==null?void 0:r[0])==null?void 0:f.map(w=>({label:w})):o=Ie((N=a==null?void 0:a.find(w=>w.key==="tableColumns"))==null?void 0:N.value,l),n.push({key:"header",contents:o});const c=Ma((C=a==null?void 0:a.find(w=>w.key==="tableContents"))==null?void 0:C.value,l);return n.push({key:"tableContents",contents:c}),n.push({key:"extraButton",contents:[{label:"新增"}]}),n.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),n},tl=a=>a.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(s,n,l)=>{const o=tl(l);return`"${n}",${o}`}),be=a=>{const s=a.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return tl(s).replace(/^"(.*)"$/,"$1")},Ka=a=>{const s=new Set;return a.filter(n=>{const l=JSON.stringify(n);return s.has(l)?!1:s.add(l)})},Pe=a=>{var n;let s=[];return(n=p.cloneDeep(a))==null||n.forEach(l=>{var o;(o=l.contents)==null||o.forEach(r=>{s.push(r)})}),s=Ka(s),s.push({label:"操作"}),[s]},Qa=(a,s)=>a.reduce((n,l,o)=>{const r=Math.floor(o/s);return n[r]||(n[r]=[]),n[r].push(l),n},[]),cl=a=>a.reduce((s,n)=>n.children&&n.children.length>0?s+cl(n.children):s+1,0),Xa=(a,s)=>{var l;let n=[];return(l=Qa(a,cl(s==null?void 0:s[0])-1))==null||l.forEach(o=>{let r=[];o.forEach(c=>{var d;Array.isArray(c.contents)?(d=c.contents)==null||d.forEach(v=>{r.push(v)}):r.push(c.contents)}),n.push(r)}),[n]},Ya=["方法体","输入","输出"],We=e.ref(1),Ne=a=>{let s;a.replaceAll(" ",`\r
|
|
2
|
+
`).includes(`\r
|
|
3
|
+
`)?s=a.replaceAll(" ",`\r
|
|
4
|
+
`).split(`\r
|
|
5
|
+
`).filter(o=>o.trim()!==""):s=a.replaceAll(" ",`\r
|
|
6
|
+
`).split(`
|
|
7
|
+
`).filter(o=>o.trim()!=="");const n=[];let l="";for(const o of s)o.includes("{")||l.includes("{")||o.includes("[")||l.includes("[")||o.includes("【")||l.includes("【")||o.includes("(")||l.includes("(")||o.includes("(")||l.includes("(")||o.includes("/*")||l.includes("/*")?(l+=o.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},il=a=>{const[s,n]=a.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),o=n.replace(/^['"]|['"]$/g,"");return{key:l,value:o}},$e=a=>{let s;a!=null&&a.includes(":")?s=a.split(":").filter(o=>o.trim()!==""):s=a==null?void 0:a.split(":").filter(o=>o.trim()!=="");const n=[];let l="";for(const o of s)o.includes("{")||l.includes("{")||o.includes("[")||l.includes("[")||o.includes("【")||l.includes("【")||o.includes("(")||l.includes("(")||o.includes("(")||l.includes("(")||o.includes("/*")||l.includes("/*")?(l=l!==""?l+":"+o.trim():o.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},eo=a=>/^[\x00-\x7F]*$/.test(a),ul=a=>{var o,r;const s=(o=a.map(c=>{var v,h;let d=(h=(v=c.key.split("("))==null?void 0:v[1])==null?void 0:h.trim();return d==null?void 0:d.slice(0,d.length-1)}))==null?void 0:o.filter(c=>c),n=s==null?void 0:s.map(c=>{var v;return(v=$e(c))==null?void 0:v.map(h=>{var f;if(h.includes("{")){let N=(f=h.split(":"))==null?void 0:f[0];h=N.slice(1,N.length)}return h})}).filter(c=>c.length!==0),l=(r=n==null?void 0:n.filter(c=>c.length!==0))==null?void 0:r.map(c=>{let d="";return c.forEach(v=>{v.includes("{")||(d=d===""?d+p.cloneDeep(v):d+"/"+p.cloneDeep(v))}),d});return ll([...new Set(l)])},pl=a=>{var n,l,o,r,c,d,v,h;const s=(l=(n=a.split("("))==null?void 0:n[1])==null?void 0:l.trim();return((o=$e(s.slice(0,s.length-1)))==null?void 0:o.length)>0?s.slice(0,s.length-1):(h=(v=(d=(c=(r=a.split("("))==null?void 0:r[1])==null?void 0:c.trim())==null?void 0:d.split(")"))==null?void 0:v[0])==null?void 0:h.trim()},lo=a=>{var o;if(!a)return;const s=pl(a),n=(o=$e(s))==null?void 0:o.map(r=>{var c;if(r.includes("{")){let d=(c=r.split(":"))==null?void 0:c[0];r=d.slice(1,d.length)}return r});let l="";return n.forEach(r=>{r.includes("{")||(l=l===""?l+p.cloneDeep(r):l+"/"+p.cloneDeep(r))}),l},no=a=>{const s=a.match(/\[(.*)\]/s);if(s){const n=`[${s[1]}]`;try{const l=n.replace(/([^\[\],\s]+)/g,'"$1"');return JSON.parse(l)}catch{return JSON.parse(n.replace(/\[(\s*)(,|])/g,'[""$2').replace(/([^\[\],\s]+)/g,'"$1"').replace(/""/g,'"'))}}},ao=a=>{var r;if(!a)return;const s=pl(a);let n=[],l=[],o=[];return(r=$e(s))==null||r.forEach(c=>{var d;c.includes("[")?n.push(no(c)):c.includes("{")&&(eo((d=c.slice(1,c.length-1).split(":"))==null?void 0:d[0])?o.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):oe.IsJson(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):c.includes("$"))}),[n,l,o]},oo=a=>{const s=[];let n="";for(const l of a)l.includes("[")||n.includes("[")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),p.cloneDeep(n).split("{").length-1===p.cloneDeep(n).split("}").length-1&&p.cloneDeep(n).split("【").length-1===p.cloneDeep(n).split("】").length-1&&p.cloneDeep(n).split("[").length-1===p.cloneDeep(n).split("]").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("/*").length-1===p.cloneDeep(n).split("*/").length-1&&(s.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):s.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},ze=a=>{var c,d;const s=[],n=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=a.match(n);if(l){const v=l[1]||l[3],h=l[2]||l[4];if(v&&h){const f=`${v}/${h}`;s.push(f)}}const o=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,r=a.match(o);return r?s.push(r[0].replace(/\)+$/,"")):(a==null?void 0:a.split(",").length)===2&&s.push((d=(c=a==null?void 0:a.split(","))==null?void 0:c[1])==null?void 0:d.trim()),s},Ae=a=>{let s=a.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return s=s.replace(/\[\s*,/g,'[{"": ""},'),s=s.replace(/,\s*,/g,', {"": ""},'),s=s.replace(/,\s*\]/g,', {"": ""}]'),s=s.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(n,l,o,r,c)=>o.includes("'")?`:${l}${o}${r}${c}`:`:${l}"${o}"${r}${c}`),s=s.replace(/:\s*([,\]}])/g,': ""$1'),s},so=a=>!/\[[^\]]*\{[^\]]*\]/.test(a),ro=a=>{const s=p.cloneDeep(a).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),n=s?`${s[2]}/${s[3]}`:null,l=a.match(/\[\{([^}]+)\}\]/),o=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let r=null;if(o)try{r=JSON.parse(o)}catch(c){console.error("解析数组失败:",c)}return[n,r]},to=a=>{var d,v,h,f,N,C,w,y,J,g,k;let s=[],n=[],l={},o=[],r=a.trim(),c=[];if(r.trim().includes("输入")&&r.trim().includes("输出")){let D=[],t=a.trim();t=p.cloneDeep(t).slice(1,p.cloneDeep(t).length-1);const u=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(y=t.match(u))==null||y.forEach((i,b)=>{var j;const L=i;let R=[];(j=L.slice(1,L.length-1).replace(":","$:").split("$:"))==null||j.forEach($=>{var T,V,m;if(Ya.find(O=>$.includes(O)))if(!$.includes("=="))R.push({key:"tableIndexColumn",contents:$.replaceAll("'","")});else{let O=[];const _=$.replaceAll("'","").split("==");O.push(_==null?void 0:_[0]),_!=null&&_[1].includes("[")?O.push(_==null?void 0:_[1].trim().slice(1,(_==null?void 0:_[1].length)-1).split(",")):O.push([_==null?void 0:_[1]]),R.push({key:"header",contents:[(V=(T=rl([O]))==null?void 0:T[0])==null?void 0:V[0]]})}else{let O=$.trim().replaceAll(",",",").replaceAll("'",'"');if(b%3===0)O.slice(1,O.length-1).includes("[")?D.push({key:"tableIndex",contents:[{label:O}]}):D.push({key:"tableIndex",contents:[{label:O.slice(1,O.length-1)}]});else if((O==null?void 0:O[0])==="{"){let _=[];const S=O.slice(1,O.length-1).split(":");if(S.every(B=>oe.IsJson(B.trim()))){_.push({key:"tableContentName",contents:"详情"});let B=[];S.forEach((M,U)=>{if(U===0){const Z=JSON.parse(M).map(K=>({label:K}));Z.push({label:"操作"}),B.push({key:"header",contents:Z})}else B.push({key:"tableContents",contents:JSON.parse(M)})}),B.push({key:"extraButton",contents:[{label:"新增"}]}),B.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),_.push({comp:"Table",compData:B,name:""}),D.push({key:"tableContents",contents:[_]})}}else{let _=O;_.slice(1,_.length-1).includes("[")||_.slice(1,_.length-1).includes("{")?oe.IsJson(Je(_.replace(/\s+/g,"")))&&((m=JSON.parse(Je(_.replace(/\s+/g,""))))==null||m.map(S=>{if(Array.isArray(S==null?void 0:S[0])){const B=[];B.push({key:"tableContentName",contents:"详情"});let M=[];S.forEach(U=>{U.forEach(Z=>{var K,ee;We.value++,M.push({id:We.value,key:(K=Object.keys(Z))==null?void 0:K[0],value:(ee=Object.values(Z))==null?void 0:ee[0],width:U.length})})}),B.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:M}],name:""}),D.push({key:"tableContents",contents:[B]})}else D.push({key:"tableContents",contents:S==null?void 0:S[0]})})):D.push({key:"tableContents",contents:_.trim().slice(1,_.length-1)})}}}),D.push(R==null?void 0:R[0])}),c.push({key:"tableIndex",contents:(J=D==null?void 0:D.filter(i=>(i==null?void 0:i.key)==="tableIndex"))==null?void 0:J.map(i=>{var b;return(b=i.contents)==null?void 0:b[0]})}),c.push({key:"extraButton",contents:[{label:"新增"}]}),c.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),c.push({key:"tableIndexColumn",contents:(k=(g=D==null?void 0:D.filter(i=>(i==null?void 0:i.key)==="tableIndexColumn"))==null?void 0:g[0])==null?void 0:k.contents}),c.push({key:"header",contents:Pe(D==null?void 0:D.filter(i=>(i==null?void 0:i.key)==="header"))}),c.push({key:"tableContents",contents:Xa(D==null?void 0:D.filter(i=>(i==null?void 0:i.key)==="tableContents"),Pe(D==null?void 0:D.filter(i=>(i==null?void 0:i.key)==="header")))})}else{const D=(d=r.trim().split(",$"))==null?void 0:d[0];D[0]==="["?r=D.slice(1,D.length-1):r.includes(",$")&&(r=(v=r.trim().split(",$"))==null?void 0:v[0]);let t;if(r.includes("$")){r=p.cloneDeep(r),l.method=(f=(h=p.cloneDeep(r).trim())==null?void 0:h.slice(1,r.length).split("("))==null?void 0:f[0];let u;ze(r.slice(1,r.length-2)).length>1?u=ze(r.slice(1,r.length-2)):u=ro(r),l.value=u}else oe.IsJson("["+Ae(r).replaceAll("'",'"')+"]")&&!so(Ae(r).replaceAll("'",'"'))?(r=JSON.parse("["+Ae(r).replaceAll("'",'"')+"]"),o=r):t=(C=(N=p.cloneDeep(r).split("}"))==null?void 0:N.filter(u=>u!==""))==null?void 0:C.map(u=>{let i=u;return i[0]===","?i=i.slice(2,i.length):i=i.slice(1,i.length),i});(w=p.cloneDeep(t))==null||w.forEach(u=>{var i,b,L,R,j,$,T,V,m,O,_,S,B,M,U;if(u.includes("==")){const Z=(S=u==null?void 0:u.split(":"))==null?void 0:S[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),K=(B=u==null?void 0:u.split(":"))==null?void 0:B[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(oe.IsJson(K.trim())?n.push(JSON.parse(K.trim())):n.push(JSON.parse(K.replaceAll("'",'"').trim())),Z[0]!=="["){let ee=[];oe.IsJson("["+be(Z)+"]")?ee.push(JSON.parse("["+be(Z)+"]")):oe.IsJson("["+be(Z).replaceAll("==",",")+"]")&&ee.push(JSON.parse("["+be(Z).replaceAll("==",",")+"]"));const ne=p.cloneDeep(ee);ne.push(["操作"]),s.push(ne)}else{const ee=(M=Z.slice(1,Z.length-1).replaceAll(",",",|"))==null?void 0:M.split("|"),ne=(U=oo(ee))==null?void 0:U.map(x=>((x==null?void 0:x[x.length-1])===","&&(x=x.slice(0,x.length-1)),x));let ae=[];ne==null||ne.forEach(x=>{var I,A,z,W;let E=[];E.push((I=x.split("=="))==null?void 0:I[0].trim().replace(/^"|"$/g,"")),((A=x.split("=="))==null?void 0:A[1].trim()[0])==="["?E.push(JSON.parse((z=x.split("=="))==null?void 0:z[1].trim())):E.push([JSON.parse((W=x.split("=="))==null?void 0:W[1].trim())]),ae.push(E)});const re=p.cloneDeep(ae);re.push(["操作"]),s.push(re)}}else{if(oe.IsJson((i=u==null?void 0:u.split(":"))==null?void 0:i[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let Z=JSON.parse((b=u==null?void 0:u.split(":"))==null?void 0:b[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(Z)||(Z=[Z]),Z.push("操作"),s.push(Z)}oe.IsJson((j=(R=(L=u==null?void 0:u.split(":"))==null?void 0:L[1])==null?void 0:R.replace(/^"|"$/g,"'"))==null?void 0:j.replace(/'([^']+)'/g,'"$1"'))?n.push(JSON.parse(($=u==null?void 0:u.split(":"))==null?void 0:$[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):oe.IsJson((O=(m=(V=(T=u==null?void 0:u.split(":"))==null?void 0:T[1])==null?void 0:V.replace(/^"|"$/g,"'"))==null?void 0:m.replaceAll("'",'"'))==null?void 0:O.replace(/'([^']+)'/g,'"$1"'))&&n.push(JSON.parse((_=u==null?void 0:u.split(":"))==null?void 0:_[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[s,n,c,l,o]},co=a=>{const s=[],n=lo(a==null?void 0:a.key),l=ao(a==null?void 0:a.key),o=to(a==null?void 0:a.value),r=l==null?void 0:l[0],c=o==null?void 0:o[4],d=l==null?void 0:l[1],v=l==null?void 0:l[2],h=o==null?void 0:o[0],f=o==null?void 0:o[1],N=o==null?void 0:o[2],C=o==null?void 0:o[3];return n&&s.push({key:"contentPath",value:n}),(r==null?void 0:r.length)>0&&s.push({key:"tableIndex",value:r}),C&&s.push({key:"extraButton",value:C}),(c==null?void 0:c.length)>0&&s.push({key:"form",value:c}),(d==null?void 0:d.length)>0&&s.push({key:"formTop",value:d}),(v==null?void 0:v.length)>0&&s.push({key:"extra",value:v}),(N==null?void 0:N.length)>0&&s.push({comp:"Table",compData:N,name:""}),(h==null?void 0:h.length)>0&&s.push({key:"tableColumns",value:h}),(f==null?void 0:f.length)>0&&s.push({key:"tableContents",value:f}),s},io=a=>{let s=[],n=[];a==null||a.forEach(o=>{Array.isArray(o)&&(o==null||o.forEach(r=>{var c;r.comp==="FormTop"&&((c=r.compData)==null||c.forEach(d=>{(d==null?void 0:d.key)==="formContent"&&(n=[...n,...d.contents])}))}))});const l=n.reduce((o,r)=>o.find(d=>(d==null?void 0:d.key)===(r==null?void 0:r.key))?o:o.concat([r]),[]);return l.length!==0&&s.push([{comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:l},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}]}]),a==null||a.forEach(o=>{if(Array.isArray(o)){const r=o.filter(c=>c.comp!=="FormTop");s.push(r)}else o.comp!=="FormTop"&&s.push(o)}),s},uo=(a,s)=>{const n=s.split("/");let l=[];return a==null||a.forEach(o=>{var d,v,h,f,N,C,w,y,J,g,k;const r=[],c=(v=(d=o.find(D=>D.key==="tableIndex"))==null?void 0:d.value)==null?void 0:v[0];if(c&&!c.some(D=>Array.isArray(D))){const D=(f=(h=o.find(t=>t.key==="tableColumns"))==null?void 0:h.value)==null?void 0:f[0];r.push({key:"tableIndexColumn",contents:n[n.length-1]}),r.push({key:"tableIndex",contents:c==null?void 0:c.map(t=>({label:t}))}),r.push({key:"extraButton",contents:[{label:"新增"}]}),r.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(D)&&D.some(t=>Array.isArray(t))?r.push({key:"header",contents:rl(D)}):r.push({key:"header",contents:Array.isArray(D)?D==null?void 0:D.map(t=>({label:t})):[D].map(t=>({label:t}))}),r.push({key:"tableContents",contents:Array.isArray(D)?(C=(N=o.find(t=>t.key==="tableContents"))==null?void 0:N.value)==null?void 0:C[0]:(J=(y=(w=o.find(t=>t.key==="tableContents"))==null?void 0:w.value)==null?void 0:y[0])==null?void 0:J.map(t=>[t])}),l.push({comp:"Table",name:"",compData:r}),o!=null&&o.find(t=>(t==null?void 0:t.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:xe([(g=o==null?void 0:o.find(t=>(t==null?void 0:t.key)==="formTop"))==null?void 0:g.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})}else c?(l.push({comp:"Table",name:"",compData:Ha(o,n[n.length-1])}),o!=null&&o.find(D=>(D==null?void 0:D.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:xe([(k=o==null?void 0:o.find(D=>(D==null?void 0:D.key)==="formTop"))==null?void 0:k.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})):o.some(D=>D.key==="extra")?l.push({comp:"calculator",name:"",compData:Re(o)}):l.push(Re(o))}),io(l)},po=(a,s)=>{var o,r;const n=a.map(c=>c.filter(d=>d.key!=="contentPath"));return{comp:"Group",compData:[{contents:uo(n,s),key:"groupContents"}],name:(r=(o=a[0])==null?void 0:o.find(c=>c.key==="contentPath"))==null?void 0:r.value}},fo=a=>{var o;const s=[],n=p.cloneDeep(a).map(r=>{var c;if(r!=null&&r.find(d=>(d==null?void 0:d.key)==="contentPath"))return(c=r==null?void 0:r.find(d=>(d==null?void 0:d.key)==="contentPath"))==null?void 0:c.value}).filter(r=>r!==""),l=[...new Set(n)];return(o=l==null?void 0:l.filter(r=>r))==null||o.forEach(r=>{var c;s.push(po((c=p.cloneDeep(a))==null?void 0:c.filter(d=>d.find(v=>v.key==="contentPath"&&v.value===r)),r))}),s},ho=a=>{let s=[];s.push({comp:"Menu",compData:[{contents:ul(p.cloneDeep(a)),key:"menuContents"}],name:""});const n=a.map(l=>co(l)).filter(l=>l.length!==0);return s=[...s,...fo(n)],s},mo=a=>{var s,n,l,o,r;try{const c=(l=Ne((n=(s=p.cloneDeep(a))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")))==null?void 0:l.filter(h=>h!==""),d=(r=(o=p.cloneDeep(c))==null?void 0:o.filter(h=>!h.includes("/*")))==null?void 0:r.map(h=>il(h));return ho(d)}catch{return!1}},Ce=e.ref(0),we=e.ref(0),yo=a=>{const s=a.trim().replace(/^'|'$/g,""),n=/((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g,l={};let o;for(;(o=n.exec(s))!==null;){const r=o[1];let c=o[2].trim();(c.match(/\[/g)||[]).length!==(c.match(/\]/g)||[]).length&&(c=c==null?void 0:c.replace(/]$/,"")),l[r]?(l[r+we.value]&&we.value++,l[r+we.value]=r+"="+c):l[r]=r+"="+c}return l},dl=a=>{const[s,n]=a.split("=").map(r=>r.trim()),l=s.replace(/['"]/g,""),o=n.replace(/^['"]|['"]$/g,"");return{key:l,value:o}},ko=a=>{var c;let s=[];const[n,l]=a.split(/=(.+)/),o=n.replace(/['"]/g,"").trim(),r=l.replace(/^['"]|['"]$/g,"");return(c=Object.values(yo(r)))==null||c.forEach(d=>{s.push(dl(d))}),{key:o,value:s}},Ee=a=>{try{return JSON.parse(a),!0}catch{return!1}},fl=a=>{try{const s=a.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(s).split("{").length-1>1){let n=p.cloneDeep(s).replace(/^\{(.*)\}$/,"[$1]");if(Ee(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),Ee(n)){const l=JSON.parse(n);let o=[];return l==null||l.forEach(r=>{var c;(c=Object.entries(p.cloneDeep(r)))==null||c.forEach(d=>{Ce.value++,o.push({id:Ce.value,key:(d==null?void 0:d[0])??"",value:(d==null?void 0:d[1])===""?"":d==null?void 0:d[1],width:Object.keys(p.cloneDeep(r)).length})})}),o}else return console.error("转换类型不正确:"),[]}else if(Ee(s)){const n=JSON.parse(s);return Object.entries(n).map(([l,o])=>(Ce.value++,{id:Ce.value,key:l,value:o===""?"":o,width:1}))}else return s}catch(s){return console.error("转换失败:",s),[]}},go=(a,s)=>{try{if(X!=null&&X.find(n=>(n==null?void 0:n.key)===s))return JSON.parse(a.replace(/[’]|[‘]|[']/g,'"'));if(p.cloneDeep(a).split("[").length-1>1){const n=p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(Ee(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(o=>({label:o})):l}else return fl(p.cloneDeep(a))}}catch(n){return console.error("解析失败:",n),a}},vo=a=>({[a==null?void 0:a.key]:go(a==null?void 0:a.value,a==null?void 0:a.key)}),bo=a=>{try{if(p.cloneDeep(a).split("[").length-1>1){const s=p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(p.cloneDeep(a).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(s){return console.error("解析失败:",s),a}},hl=a=>{var s,n,l,o,r,c;try{const d=Ne((n=(s=p.cloneDeep(a))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")),v=(l=p.cloneDeep(d))==null?void 0:l.map(N=>{var w,y;let C=(y=(w=p.cloneDeep(N))==null?void 0:w.split("="))==null?void 0:y[0];return C!=null&&C.includes("GroupContents")?ko(N):dl(N)}),h=[];(o=p.cloneDeep(v))==null||o.forEach(N=>{var C,w,y,J,g;X!=null&&X.find(k=>{var D,t;return((D=k==null?void 0:k.key)==null?void 0:D.toUpperCase())===((t=N==null?void 0:N.key)==null?void 0:t.toUpperCase())})?h.push({comp:((C=X==null?void 0:X.find(k=>{var D,t;return((D=k==null?void 0:k.key)==null?void 0:D.toUpperCase())===((t=N==null?void 0:N.key)==null?void 0:t.toUpperCase())}))==null?void 0:C.value)??"",name:(w=N==null?void 0:N.value)==null?void 0:w.replace(/[’]|[‘]|[']/g,""),compData:[]}):Q!=null&&Q.find(k=>{var D,t;return((D=k==null?void 0:k.key)==null?void 0:D.toUpperCase())===((t=N==null?void 0:N.key)==null?void 0:t.toUpperCase())})&&((h==null?void 0:h.length)===0&&(y=N.key)!=null&&y.includes("Menus")&&h.push({comp:"Menu",name:"",compData:[]}),(J=h==null?void 0:h[(h==null?void 0:h.length)-1])!=null&&J.compData&&h[(h==null?void 0:h.length)-1].compData.push({key:(g=Q==null?void 0:Q.find(k=>{var D,t;return((D=k==null?void 0:k.key)==null?void 0:D.toUpperCase())===((t=N==null?void 0:N.key)==null?void 0:t.toUpperCase())}))==null?void 0:g.value,contents:N==null?void 0:N.value}))}),console.log("newContents",h);let f=(r=p.cloneDeep(h))==null?void 0:r.map(N=>{var C;return N!=null&&N.compData&&(N.compData=(C=N==null?void 0:N.compData)==null?void 0:C.map(w=>{var y,J,g,k,D,t,u,i,b,L,R;if((w==null?void 0:w.key)==="formFlex")w.contents=((J=(y=w.contents)==null?void 0:y.replace(/[’]|[‘]|[']/g,""))==null?void 0:J.toUpperCase())!=="Vertical".toUpperCase();else if((w==null?void 0:w.key)==="groupContents")w.contents=(g=p.cloneDeep(w.contents))==null?void 0:g.map(j=>vo(p.cloneDeep(j)));else if(((D=(k=w.contents)==null?void 0:k.trim())!=null&&D.startsWith("[")||(u=(t=w.contents)==null?void 0:t.trim())!=null&&u.startsWith("【"))&&((b=(i=w.contents)==null?void 0:i.trim())!=null&&b.endsWith("]")||(R=(L=w.contents)==null?void 0:L.trim())!=null&&R.endsWith("】")))w.contents=bo(p.cloneDeep(w.contents));else{if(!w.contents)return;w.contents=fl(p.cloneDeep(w.contents))}return w})),N});return f=(c=p.cloneDeep(f))==null?void 0:c.map(N=>{var C;return(N==null?void 0:N.comp)==="Group"&&(N.compData=(C=N.compData)==null?void 0:C.map(w=>{var J;let y=[];return(J=w.contents)==null||J.forEach(g=>{var k,D,t,u,i,b,L,R,j,$,T,V;if(X!=null&&X.find(m=>{var O,_,S;return((O=m==null?void 0:m.key)==null?void 0:O.toUpperCase())===((S=(_=Object.keys(g))==null?void 0:_[0])==null?void 0:S.toUpperCase())}))y.push({comp:(k=X==null?void 0:X.find(m=>{var O,_,S;return((O=m==null?void 0:m.key)==null?void 0:O.toUpperCase())===((S=(_=Object.keys(g))==null?void 0:_[0])==null?void 0:S.toUpperCase())}))==null?void 0:k.value,name:(t=(D=Object.values(g))==null?void 0:D[0])==null?void 0:t.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(Q!=null&&Q.find(m=>{var O,_,S;return((O=m==null?void 0:m.key)==null?void 0:O.toUpperCase())===((S=(_=Object.keys(g))==null?void 0:_[0])==null?void 0:S.toUpperCase())})){if((y==null?void 0:y.length)===0)return;(u=y==null?void 0:y[(y==null?void 0:y.length)-1])!=null&&u.compData&&y[(y==null?void 0:y.length)-1].compData.push({key:(i=Q==null?void 0:Q.find(m=>{var O,_,S;return((O=m==null?void 0:m.key)==null?void 0:O.toUpperCase())===((S=(_=Object.keys(g))==null?void 0:_[0])==null?void 0:S.toUpperCase())}))==null?void 0:i.value,contents:(b=Object.values(g))==null?void 0:b[0]})}else if((R=(L=Object.keys(g))==null?void 0:L[0])!=null&&R.includes("$")){const m=($=(j=Object.keys(p.cloneDeep(g)))==null?void 0:j[0])==null?void 0:$.split("$");y[(y==null?void 0:y.length)-1].compData.push({key:(T=Q==null?void 0:Q.find(O=>{var _,S;return((_=O==null?void 0:O.key)==null?void 0:_.toUpperCase())===((S=m==null?void 0:m[0])==null?void 0:S.toUpperCase())}))==null?void 0:T.value,contents:(V=Object.values(g))==null?void 0:V[0],selectLabel:m==null?void 0:m[1]})}return g}),w.contents=y,w})),N}),f}catch{return!1}},Co=a=>hl(a),Do=a=>!!hl(a),ke=e.ref(0),Eo=a=>a.reduce((n,l)=>{var r,c;const o=Object.values(n);return(((r=Object.keys(n))==null?void 0:r.length)===0||o[o.length-1].length>=(l==null?void 0:l.width))&&(n[ke.value]=[],ke.value++),n[ke.value-1].push(l),((c=Object.keys(n))==null?void 0:c.length)===(l==null?void 0:l.width)&&(n[ke.value]=[],ke.value++),n},{});exports.arrayToNumberArray=Eo;exports.contentTransArray=Ne;exports.expandContentStringToJson=mo;exports.expandNewStringToJson=za;exports.expandStringToJson=Co;exports.getComponent=Xe;exports.isExpandStringToJson=Do;exports.parseGroupValue=il;exports.slotContent=wa;exports.transToMenu=ul;
|