ss-component-new 1.1.415 → 1.1.416
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-58d570LL.cjs +7 -0
- package/dist/array-DEqtaw54.js +346 -0
- package/dist/{crypto-BRyGpjGR.js → crypto-Cq-QCViO.js} +178 -186
- package/dist/{crypto-CRbcEKIz.cjs → crypto-DX0stRPJ.cjs} +5 -5
- package/dist/{index-DuwxEG2Y.js → index-B36maAk9.js} +1 -1
- package/dist/index-B3ZWxITJ.js +1145 -0
- package/dist/{index-BJiXsb3E.cjs → index-B7pGY6s-.cjs} +1 -1
- package/dist/{index-WPbX9sqP.cjs → index-BEJ2yw6L.cjs} +1 -1
- package/dist/{index-9QTlnrEQ.cjs → index-BEZVG2w4.cjs} +1 -1
- package/dist/{index-BOzZXj2f.js → index-BMDwIj9Q.js} +7 -7
- package/dist/index-BN5_bPlI.js +711 -0
- package/dist/index-BQE6u3FY.cjs +7 -0
- package/dist/{index-DrUjNhjW.js → index-BTjvMH2-.js} +1 -1
- package/dist/{index-9srnYnzT.js → index-BXxCcVg9.js} +9 -9
- package/dist/{index-DIv5glVC.js → index-BZFpxFyZ.js} +422 -422
- package/dist/{index-Dm1_86kX.js → index-BgYMdBaM.js} +4 -5
- package/dist/index-BgwUuCZn.cjs +1 -0
- package/dist/{index-BJitBJZu.cjs → index-BvLNLX2m.cjs} +2 -2
- package/dist/{index-DoIHM98M.js → index-BvQxCFwq.js} +1 -1
- package/dist/{index-CilqH8oC.cjs → index-BvYov-FM.cjs} +1 -1
- package/dist/{index-DjhZHYH_.cjs → index-BxqdT6ZG.cjs} +1 -1
- package/dist/{index-B6_X9xq9.js → index-C-BnL_J8.js} +5 -6
- package/dist/{index-FBp-XX6h.js → index-C43LmEa1.js} +7051 -7021
- package/dist/{index-DbuzlHfh.js → index-C4kRcJZB.js} +21 -21
- package/dist/{index-8nzu3dKT.js → index-C9jJnj5S.js} +7 -7
- package/dist/{index-BVuLbYm9.cjs → index-CEGtcyt7.cjs} +1 -1
- package/dist/{index-Bhg9ISur.js → index-CHVY3mt7.js} +8 -9
- package/dist/index-CHXbD46C.cjs +87 -0
- package/dist/{index-BSAEf__V.js → index-CJja2QG9.js} +7 -7
- package/dist/{index-CNQtTLfb.cjs → index-CK03QmTY.cjs} +1 -1
- package/dist/index-CbfDuVGd.cjs +1 -0
- package/dist/{index-BxHhG5PY.js → index-CcbpKTyr.js} +3 -3
- package/dist/{index-BHxsT1eb.cjs → index-CiowzSFS.cjs} +1 -1
- package/dist/{index-CTTEAggF.cjs → index-CvagfQk6.cjs} +1 -1
- package/dist/{index-DrCpGMdZ.js → index-D-45U022.js} +11 -12
- package/dist/{index-UYsrvpRs.js → index-D9Mgi3hi.js} +4 -4
- package/dist/{index-AzrB9NlT.js → index-DGX_omwS.js} +4 -4
- package/dist/{index-BibIA5-P.cjs → index-DHhoPw_A.cjs} +1 -1
- package/dist/{index-CffNkMWN.cjs → index-DQycMGEY.cjs} +1 -1
- package/dist/{index-C8jmJvXd.cjs → index-DRpTJPjg.cjs} +1 -1
- package/dist/{index-BJIMXITA.js → index-DT0rIFKm.js} +6 -6
- package/dist/index-DcIVU-Ov.cjs +1 -0
- package/dist/{index-3dpRV7yS.cjs → index-DgY-01TT.cjs} +1 -1
- package/dist/{index-DHhMROzm.cjs → index-Dp0i47OJ.cjs} +1 -1
- package/dist/{index-DPm-3I4S.js → index-DqHrwwb1.js} +6 -6
- package/dist/{index-CA9lI4P8.js → index-DseMLCbI.js} +5 -5
- package/dist/{index-ZUmqWSaw.cjs → index-Dt5TGPLg.cjs} +1 -1
- package/dist/{index-BPDslvev.js → index-DtYFEnXc.js} +2 -2
- package/dist/{index-eSv5uzFM.js → index-NEUjKmq0.js} +354 -359
- package/dist/{index-VOSN3Mnh.js → index-NIMrswsz.js} +9 -9
- package/dist/{index-DMp2zGXo.js → index-ZuGl0u3I.js} +7 -7
- package/dist/{index-BimZK7wy.cjs → index-jESujSgy.cjs} +1 -1
- package/dist/{index-Dxfzna5p.cjs → index-jghM2Y0h.cjs} +1 -1
- package/dist/{index-BszUQuvL.cjs → index-sKVluUJX.cjs} +1 -1
- package/dist/{index-CdLmmvxi.cjs → index-uVl30He2.cjs} +1 -1
- package/dist/index-zMtEEusk.cjs +1 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dr6igsfU.cjs → index.vue_vue_type_script_setup_true_lang-BaYvLcMI.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CKDefrVd.js → index.vue_vue_type_script_setup_true_lang-CAcdw_AX.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B4LEhoqI.cjs} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CaGB6aRQ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CopMGaPW.js} +11 -17
- package/dist/{index.vue_vue_type_style_index_0_scoped_306ecd73_lang-CMsb25AU.js → index.vue_vue_type_style_index_0_scoped_306ecd73_lang-BOZV3S47.js} +90 -89
- package/dist/index.vue_vue_type_style_index_0_scoped_306ecd73_lang-Dt5xjsaj.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-CTM5_Xpt.js +1429 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-DhLcXmdy.cjs +1 -0
- package/dist/login-BkG9ft6j.js +75 -0
- package/dist/login-uBBsyOif.cjs +1 -0
- package/dist/{main-C7zpT64X.js → main-B29DPpx0.js} +6 -6
- package/dist/{main-NoOanZcQ.cjs → main-DqvMBu9E.cjs} +1 -1
- package/dist/{menu-B-Z5KAh5.cjs → menu-CEY-shM3.cjs} +4 -4
- package/dist/{menu-D9x5_s9p.js → menu-Dz_fVXUK.js} +8 -8
- package/dist/menuIndex-BWim3TlH.js +33 -0
- package/dist/menuIndex-Cg6xI-jR.cjs +1 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/dist/{threeModel-MVkoDB-c.cjs → threeModel-Djd02U60.cjs} +1 -1
- package/dist/{threeModel-BazaxATJ.js → threeModel-V5HRhps2.js} +5 -6
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CnQhvwfL.js → threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-B08ZEGHO.js} +2 -2
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs → threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-BTtFKEwD.cjs} +1 -1
- package/package.json +1 -1
- package/dist/array-CYOvmzeK.js +0 -1310
- package/dist/array-DAoy3WS9.cjs +0 -7
- package/dist/index-BA-Qtevs.cjs +0 -1
- package/dist/index-Bvr0YvSP.cjs +0 -74
- package/dist/index-CyOcoFxe.cjs +0 -1
- package/dist/index-D68A4TXc.cjs +0 -1
- package/dist/index-DBB_scdx.cjs +0 -1
- package/dist/index-Dnq8JVuW.cjs +0 -7
- package/dist/index-TEDdJfFz.js +0 -677
- package/dist/index-faxMOO3y.js +0 -1717
- package/dist/index.vue_vue_type_style_index_0_scoped_306ecd73_lang-B7CgbfdF.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-COxDD0Fj.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-DDi07ZiD.js +0 -1593
- package/dist/login-CARNmuDg.js +0 -103
- package/dist/login-DsWsywlE.cjs +0 -1
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
package/dist/index-CyOcoFxe.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ye=require("./index-BimZK7wy.cjs"),qe=require("./index-DjhZHYH_.cjs"),m=require("./index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-COxDD0Fj.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),n=require("./menu-B-Z5KAh5.cjs"),tt=require("./login-DsWsywlE.cjs"),Ce=require("./index-BpPyaNFa.cjs"),Je=require("./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs"),be=require("./index-BA-Qtevs.cjs"),ot=require("./index-BJitBJZu.cjs"),Oe=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs"),gt=require("./threeModel-MVkoDB-c.cjs"),xe=require("./index-C8jmJvXd.cjs"),wt=require("./index-3dpRV7yS.cjs"),Ze=require("./index-BszUQuvL.cjs"),Re=require("./array-DAoy3WS9.cjs"),et=require("./index.vue_vue_type_style_index_0_scoped_306ecd73_lang-B7CgbfdF.cjs");function Ct(R,me,l,M,j,ee){const i=e.resolveComponent("svg-icon"),X=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(X,{mode:R.mode,menuList:R.renderMenuList,onClickMenu:R.clickMenu,onOpenMenu:R.openMenu,onCloseMenu:R.closeMenu},{title:e.withCtx(({menu:z})=>[e.createVNode(i,{name:z.icon??"Fold",style:{width:"clamp(16px, 1.25rem, 20px)",height:"clamp(16px, 1.25rem, 20px)","margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(z.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const at=Me._export_sfc(m._sfc_main,[["render",Ct],["__scopeId","data-v-5c2d7ed2"]]),_t={class:"bread-content"},yt=["onClick"],vt={key:0,class:"split-title"},kt={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(R,{emit:me}){const l=R,M=e.ref([]),j=me;e.onMounted(()=>{M.value=l==null?void 0:l.breadArray}),e.watch(()=>l==null?void 0:l.breadArray,()=>{M.value=l==null?void 0:l.breadArray},{deep:!0,immediate:!0});const ee=i=>{j("click",i)};return(i,X)=>(e.openBlock(),e.createElementBlock("div",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(z,te)=>{var oe;return e.openBlock(),e.createElementBlock("div",{key:te,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:ce=>ee(z),style:e.normalizeStyle({opacity:((oe=M.value)==null?void 0:oe.length)-1===te?"0.7":"1"})},e.toDisplayString(z.value),13,yt),te!==M.value.length-1&&Array.isArray(M.value)?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},nt=Me._export_sfc(kt,[["__scopeId","data-v-ded7e2bd"]]),Bt={class:"structure-buttons"},xt={class:"structure-paths"},bt={class:"client-header-user"},Vt={class:"model-select"},Nt={class:"model-show"},Tt={class:"model-fill"},St={class:"client-header-menu"},Rt={class:"client-header-user"},Ft={class:"drop-menu"},Et={class:"client-main-operate"},Dt={key:0,class:"item-view-group"},At={class:"client-main-operate"},Ut=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(R){const me=be.useUnit(n.pinia),{selectTitle:l}=n.storeToRefs(me),M=tt.useLoginState(),{loginUserInfo:j}=n.storeToRefs(M),ee=Je.useModelComp(n.pinia),{isEdit:i,routeToChildPath:X}=n.storeToRefs(ee),z=n.useMenuState(n.pinia),{importLoading:te,activeTopMenuPath:oe}=n.storeToRefs(z),ce=e.ref(""),P=e.computed(()=>oe.value==="系统管理"||oe.value==="平台管理"),L=()=>{sessionStorage.clear(),window.location.reload()},Y=()=>{z.setActiveMenuPath(X.value),ee.setRouteToChildPath("")};return(de,V)=>{const se=e.resolveComponent("el-button"),H=e.resolveComponent("el-avatar"),ve=e.resolveComponent("el-header"),I=e.resolveComponent("el-container"),ae=e.resolveComponent("el-icon"),Ve=e.resolveComponent("el-input"),Pe=e.resolveComponent("ss-avatar"),ke=e.resolveComponent("ss-button"),N=e.resolveComponent("ss-drop"),U=e.resolveComponent("el-aside"),ue=e.resolveComponent("el-main"),W=e.resolveComponent("router-view"),ie=e.resolveDirective("loading");return e.unref(i)==="edit"?(e.openBlock(),e.createBlock(I,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(ve,{class:"client-structure-header"},{default:e.withCtx(()=>{var y;return[e.createElementVNode("div",Bt,[e.createVNode(se,{id:"transparentBgButton",onClick:e.unref(m.onBack)},{default:e.withCtx(()=>V[2]||(V[2]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[2]},8,["onClick"]),e.createVNode(se,{id:"transparentBgButton",onClick:V[0]||(V[0]=f=>{var he,Ne;return e.unref(m.clickSavePage)((Ne=(he=e.unref(l))==null?void 0:he.map(Ke=>Ke.value))==null?void 0:Ne.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 保存页面 "))]),_:1,__:[3]})]),e.createElementVNode("div",xt,[(e.openBlock(),e.createBlock(nt,{key:e.unref(l),breadArray:e.unref(l),onClick:e.unref(m.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",bt,[e.renderSlot(de.$slots,"default",{},void 0,!0),e.createVNode(H,{size:35,src:(y=e.unref(j))==null?void 0:y.avatarUrl},{default:e.withCtx(()=>{var f;return[e.createTextVNode(e.toDisplayString(((f=e.unref(j))==null?void 0:f.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(i)==="edit"?(e.openBlock(),e.createBlock(I,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vt,[e.createVNode(ye.modelSelect)]),e.createElementVNode("div",Nt,[e.createVNode(ye.modelShow)]),e.createElementVNode("div",Tt,[e.createVNode(ye.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(I,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(ve,{class:"client-header"},{default:e.withCtx(()=>[V[6]||(V[6]=e.createElementVNode("div",{class:"client-header-logo"}," ISIP ",-1)),e.createElementVNode("div",St,[e.createVNode(at,{mode:"horizontal"})]),e.createElementVNode("div",Rt,[e.createVNode(Ve,{modelValue:ce.value,"onUpdate:modelValue":V[1]||(V[1]=y=>ce.value=y),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(ae,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ot.search_default))]),_:1})]),_:1},8,["modelValue"]),R.showButton?(e.openBlock(),e.createBlock(se,{key:0,id:"transparentBgButton",onClick:e.unref(m.clickGenerateApp)},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[V[4]||(V[4]=e.createTextVNode(" 生成APP "))]),_:1,__:[4]},8,["onClick"])):e.createCommentVNode("",!0),R.showButton&&e.unref(i)==="view"?(e.openBlock(),e.createBlock(se,{key:1,id:"transparentBgButton",onClick:e.unref(m.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 修改布局 "))]),_:1,__:[5]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(de.$slots,"default",{},void 0,!0),e.createVNode(N,null,{dropTitle:e.withCtx(()=>{var y;return[e.createVNode(Pe,{size:"35",avatarUrl:(y=e.unref(j))==null?void 0:y.avatarUrl,showCropper:!1,banClick:!0},{avatarDefault:e.withCtx(()=>{var f;return[e.createTextVNode(e.toDisplayString(((f=e.unref(j))==null?void 0:f.account)??"未知"),1)]}),_:1},8,["avatarUrl"])]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Ft,[e.createVNode(ke,{emptyColor:!0,class:"menu-button",onClickTrigger:L,modelValue:"退出登录",buttonType:""})])]),_:1})])]),_:3,__:[6]}),e.createVNode(I,{class:"client-body"},{default:e.withCtx(()=>[P.value?(e.openBlock(),e.createBlock(ue,{key:1,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(qe.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",At,[e.createVNode(W)])]),_:1})):(e.openBlock(),e.createBlock(ue,{key:0,class:"client-main"},{default:e.withCtx(()=>{var y;return[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(qe.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",Et,[e.unref(X)!==""?(e.openBlock(),e.createBlock(ke,{key:0,class:"calculator-content back-content",onClickTrigger:Y,modelValue:"返回"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((y=e.unref(Oe.cloneDeep)(e.unref(m.showItems)))==null?void 0:y.filter(f=>f.comp!=="FormTop"),(f,he)=>{var Ne;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:he},[((Ne=f==null?void 0:f.comp)==null?void 0:Ne.toUpperCase())!=="TABLE"&&f.name?(e.openBlock(),e.createElementBlock("div",Dt,e.toDisplayString(f.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m.getComponents)(f.comp)),{compName:f.name,itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:(f==null?void 0:f.id)??he,onChange:e.unref(m.onChange),index:(f==null?void 0:f.id)??he,onContentChange:e.unref(m.onContentChange),onPageChange:e.unref(m.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128))])]}),_:1}))]),_:1})]),_:3})),[[ie,e.unref(te)]])}}}),Mt=Me._export_sfc(Ut,[["__scopeId","data-v-96b95789"]]),g=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],Ue=[{key:"型线生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"},{key:"曲面生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"},{key:"叶片生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"},{key:"轨迹规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"},{key:"加工规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"},{key:"产品检测",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/source.pcd,http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/target.pcd"},{key:"参数筛选训练方法",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"}],Pt=["src"],$t={class:"structure-buttons"},jt={class:"structure-paths"},Lt={class:"client-header-user"},It={class:"model-select"},Ot={class:"model-show"},zt={class:"model-fill"},qt={class:"client-header-logo"},Jt={class:"client-header-menu"},Kt={class:"client-header-user"},Gt={class:"drop-menu"},Ht={class:"client-main-content"},Wt={key:0,class:"item-view-group"},Qt={key:0,class:"calculator"},Xt={key:1,class:"calculator"},Yt={key:2,class:"calculator"},Zt={key:3,class:"calculator"},eo={class:"router-aside"},to={class:"router-main"},oo=e.defineComponent({__name:"index",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},emits:["showChild","buildContent"],setup(R,{emit:me}){const l=be.useUnit(n.pinia),M=e.ref(0),j=e.ref(!1),{selectTitle:ee}=n.storeToRefs(l),i=e.ref(!1),X=e.ref(!1),z=e.ref(!1),te=be.useTableComp(n.pinia),oe=e.ref(!1),{tableShowThree:ce}=n.storeToRefs(te),P=tt.useLoginState(),{loginUserInfo:L}=n.storeToRefs(P),Y=e.ref(null),de=Je.useModelComp(n.pinia),{isEdit:V}=n.storeToRefs(de),se=n.useMenuState(n.pinia),H=wt.useFormComp(n.pinia),{objUrl:ve,blobUrls:I}=n.storeToRefs(H),ae=e.ref(null),Ve=e.ref(!1),Pe=e.ref(!0),ke=e.ref(!1),{importLoading:N,activeMenuPath:U,activeTopMenuPath:ue,platName:W}=n.storeToRefs(se),ie=e.ref(!1),y=e.ref(!1),f=e.ref(!1),he=me;e.watch(()=>U.value,async o=>{o&&(f.value=!0),o==="弯管仿真加工管理/仿真动画生成"?ie.value=!0:ie.value=!1,o==="弯管仿真加工管理/程序输出"?y.value=!0:y.value=!1,Ue!=null&&Ue.find(t=>{var c;return(t==null?void 0:t.key)===((c=o==null?void 0:o.split("/"))==null?void 0:c[(o==null?void 0:o.split("/").length)-1])})?oe.value=!0:oe.value=!1},{immediate:!0});const Ne=()=>{ae.value.startRunningAnimation()},Ke=o=>{if((o==null?void 0:o.type)==="table"){let t=Object.values(o==null?void 0:o.row),c=t==null?void 0:t.find(p=>(p==null?void 0:p.includes(".urdf"))||(p==null?void 0:p.includes(".obj")));c&&he("showChild",{url:c,row:o==null?void 0:o.row})}},lt=()=>{sessionStorage.clear(),window.location.reload()},st=async()=>{var a,_,k;let o="";(a=m.showItems.value)==null||a.forEach((r,b)=>{var D,T,q;b===m.showItems.value.length-1&&(o=(q=(T=(D=r.compData)==null?void 0:D[0])==null?void 0:T.contents)==null?void 0:q[0].value)});const t=await n.axios.get(o,{responseType:"blob",headers:{"Content-Type":"application/json"}}),c=new Blob([t.data],{type:"application/octet-stream;charset=UTF-8"});let p="";(k=(_=t.config.url)==null?void 0:_.split("/"))==null||k.forEach((r,b)=>{var D,T;((T=(D=t.config.url)==null?void 0:D.split("/"))==null?void 0:T.length)-1===b&&(p=r)});var s=document.createElement("a"),u=window.URL.createObjectURL(c);s.style.display="none",s.href=u,s.download=decodeURI(p),document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(u)},it=async()=>{var p;let o="";(p=m.showItems.value)==null||p.forEach((s,u)=>{var a,_,k;u===m.showItems.value.length-1&&(o=(k=(_=(a=s.compData)==null?void 0:a[0])==null?void 0:_.contents)==null?void 0:k[0].value)});const t=await n.axios.get(o,{responseType:"blob",headers:{"Content-Type":"application/json"}}),c=new Blob([t.data],{type:"text/plain"});Y.value&&URL.revokeObjectURL(Y.value),Y.value=URL.createObjectURL(c),Ve.value=!0},rt=async()=>{var u,a,_,k,r;ke.value=!0;const o=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");let t=((_=(a=(u=Ue==null?void 0:Ue.find(b=>{var D,T,q;return(b==null?void 0:b.key)===((q=(D=U.value)==null?void 0:D.split("/"))==null?void 0:q[((T=U.value)==null?void 0:T.split("/").length)-1])}))==null?void 0:u.value)==null?void 0:a.split(","))==null?void 0:_[0])??"";const c=await n.axios.post(t,null,{responseType:"blob",headers:{Authorization:o,"Content-Type":"application/json"}}),p=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});let s={suffix:"."+((r=t==null?void 0:t.split("."))==null?void 0:r[((k=t==null?void 0:t.split("."))==null?void 0:k.length)-1]),blob:p,mtlBlobs:[]};ke.value=!1,ae.value.loadModelByDefaultPath([s])},ct=async o=>{var p,s,u,a,_,k,r;const t=(p=o==null?void 0:o.split("/"))==null?void 0:p[0],c=await n.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:t}});return((s=c==null?void 0:c.data)==null?void 0:s.type)==="success"?((r=(k=(_=(a=(u=c==null?void 0:c.data)==null?void 0:u.result)==null?void 0:a[0])==null?void 0:_.value)==null?void 0:k.tableData)==null?void 0:r.隐藏三维显示)!==!0:!0};e.watch(()=>m.showItems.value,()=>{var o,t,c,p,s;if(((o=m.showItems.value)==null?void 0:o.length)===2&&((t=m.showItems.value)!=null&&t.find(u=>(u==null?void 0:u.name)==="输入"))&&((c=m.showItems.value)!=null&&c.find(u=>(u==null?void 0:u.name)==="输出"))){const u=(p=m.showItems.value)==null?void 0:p.find(a=>(a==null?void 0:a.name)==="输出");X.value=((s=u==null?void 0:u.comp)==null?void 0:s.toUpperCase())==="FORM",i.value=!0}else i.value=!1,X.value=!1},{deep:!0,immediate:!0}),e.watch(()=>U.value,async()=>{U.value&&(Pe.value=await ct(U.value))},{deep:!0,immediate:!0}),e.watch(()=>[ve.value,ae.value],()=>{var o;((o=ve.value)==null?void 0:o.length)>0&&ae.value&&ae.value.addModelsFromUrls(ve.value)},{immediate:!0,deep:!0}),e.watch(()=>I==null?void 0:I.value,async()=>{var o,t,c,p;if(I!=null&&I.value&&((o=I==null?void 0:I.value)==null?void 0:o.length)>0&&!oe.value&&!((t=m.showItems.value)!=null&&t.find(s=>(s==null?void 0:s.name)==="输入")&&((c=m.showItems.value)!=null&&c.find(s=>(s==null?void 0:s.name)==="输出")))){let s=[];const u=await((p=Oe.cloneDeep(I==null?void 0:I.value))==null?void 0:p.map(async a=>{var D,T,q,fe,ge,S,d,ne,le,we;let _,k;const r=(T=(D=a==null?void 0:a.blob)==null?void 0:D.split("undefined,"))==null?void 0:T[1];let b=r==null?void 0:r.split(",");if((b==null?void 0:b.length)>1){let re=await(b==null?void 0:b.map(async F=>{var B,$e,pe,J,w,Z;_=await n.axios.get(F,{responseType:"blob",headers:{"Content-Type":"application/json"}});let $=[];if(((B=a==null?void 0:a.mtlBlobs)==null?void 0:B.length)>0){let Fe=await(($e=a==null?void 0:a.mtlBlobs)==null?void 0:$e.map(async E=>{let Be=await n.axios.get(E,{responseType:"blob",headers:{"Content-Type":"application/json"}});return $.push(new Blob([Be.data],{type:"application/octet-stream;charset=UTF-8"})),Be}));await Promise.all(Fe)}return((J=F==null?void 0:F.split("."))==null?void 0:J[((pe=F==null?void 0:F.split("."))==null?void 0:pe.length)-1])!=="undefined"&&s.push({suffix:"."+((Z=F==null?void 0:F.split("."))==null?void 0:Z[((w=F==null?void 0:F.split("."))==null?void 0:w.length)-1]),blob:new Blob([_.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:$}),_}));await Promise.all(re)}else if(!(r!=null&&r.includes("https://"))&&!(r!=null&&r.includes("http://"))){_=await Ze.downloadAvatarApi({url:r});let re=[];if(((q=a==null?void 0:a.mtlBlobs)==null?void 0:q.length)>0){let F=await((fe=a==null?void 0:a.mtlBlobs)==null?void 0:fe.map(async $=>{let B=await Ze.downloadAvatarApi({url:$});return re.push(new Blob([B.data],{type:"application/octet-stream;charset=UTF-8"})),B}));await Promise.all(F)}k={suffix:"."+((S=r==null?void 0:r.split("."))==null?void 0:S[((ge=r==null?void 0:r.split("."))==null?void 0:ge.length)-1]),blob:new Blob([_.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:re}}else{_=await n.axios.get(r,{responseType:"blob",headers:{"Content-Type":"application/json"}});let re=[];if(((d=a==null?void 0:a.mtlBlobs)==null?void 0:d.length)>0){let F=await((ne=a==null?void 0:a.mtlBlobs)==null?void 0:ne.map(async $=>{let B=await n.axios.get($,{responseType:"blob",headers:{"Content-Type":"application/json"}});return re.push(new Blob([B.data],{type:"application/octet-stream;charset=UTF-8"})),B}));await Promise.all(F)}k={suffix:"."+((we=r==null?void 0:r.split("."))==null?void 0:we[((le=r==null?void 0:r.split("."))==null?void 0:le.length)-1]),blob:new Blob([_.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:re}}k&&s.push(k)}));await Promise.all(u),(s==null?void 0:s.length)!==0&&ae.value.loadModelByDefaultPath(s)}},{immediate:!0,deep:!0}),e.watch(()=>ce.value,async()=>{var t,c,p,s;if(ce.value!==""&&ce.value){let u=(t=U.value)==null?void 0:t.split("/"),a=u[(u==null?void 0:u.length)-2];const k=(((c=g==null?void 0:g.find(T=>(T==null?void 0:T.key)===a))==null?void 0:c.download)??"")+"/"+ce.value,r=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),b=await n.axios.post(k,null,{responseType:"blob",headers:{Authorization:r,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var o=new Blob([b.data],{type:"application/octet-stream;charset=UTF-8"});const D=[{suffix:"."+((s=(p=ce.value)==null?void 0:p.split("."))==null?void 0:s[1]),blob:o,mtlBlobs:[]}];ae.value.loadModelByDefaultPath(D)}},{deep:!0,immediate:!0});const dt=async()=>{var _,k,r,b,D,T,q,fe,ge,S,d,ne,le,we,re,F,$;j.value=!0;let o=(_=U.value)==null?void 0:_.split("/"),t=o[(o==null?void 0:o.length)-2];const c=((k=g==null?void 0:g.find(B=>(B==null?void 0:B.key)===t))==null?void 0:k.value)??"";let p="";const s=await n.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((r=s==null?void 0:s.data)==null?void 0:r.code)===200&&(p=`Bearer ${(D=(b=s.data)==null?void 0:b.result)==null?void 0:D.accessToken}`,sessionStorage.setItem("magicToken",p));const u=p===""?"123456":p,a=await n.axios.post(c,null,{headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((T=a==null?void 0:a.data)==null?void 0:T.type)==="success"&&be.IsJson((fe=(q=a==null?void 0:a.data)==null?void 0:q.result)==null?void 0:fe.result)){const B=(le=(ne=(d=JSON.parse((S=(ge=a==null?void 0:a.data)==null?void 0:ge.result)==null?void 0:S.result))==null?void 0:d.lines_file_paths)==null?void 0:ne[0])==null?void 0:le.split("\\"),pe=(((we=g==null?void 0:g.find(w=>(w==null?void 0:w.key)===t))==null?void 0:we.resources)??"")+"/"+(((B==null?void 0:B[(B==null?void 0:B.length)-2])==="inputResources"?"outputResources":B==null?void 0:B[(B==null?void 0:B.length)-2])??"outputResources"),J=await n.axios.post(pe,null,{headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((re=J==null?void 0:J.data)==null?void 0:re.type)==="success"){const w=(F=J==null?void 0:J.data)==null?void 0:F.result,Z=m.showItems.value,Fe=await(($=Oe.cloneDeep(Z))==null?void 0:$.map(async E=>{var Be,je,Le,K,v,_e;if((E==null?void 0:E.name)==="输出"){if((E==null?void 0:E.comp)==="Table")E.compData=(Be=E==null?void 0:E.compData)==null?void 0:Be.map(h=>{var x,Q;return(h==null?void 0:h.key)==="tableContents"&&(h.contents=(Q=(x=h==null?void 0:h.contents)==null?void 0:x.map(A=>(A=A==null?void 0:A.map((C,G)=>{var O,Te,Ee;return typeof C=="string"&&G>1?((O=h==null?void 0:h.contents)==null?void 0:O.length)>1?C=((Te=w==null?void 0:w[G-1])!=null&&Te.includes("input")?C:w==null?void 0:w[G-1])??C:C=w==null?void 0:w[0]:C=((Ee=w==null?void 0:w[G-1])!=null&&Ee.includes("input")?C:w==null?void 0:w[G-1])??C,C}),A)))==null?void 0:Q.filter((A,C)=>C<=(w==null?void 0:w.length)-1)),h});else if((E==null?void 0:E.comp)==="Form"){let h="";if(w==null||w.forEach(x=>{h=h===""?h+x:h+","+x}),E.compData=(je=E==null?void 0:E.compData)==null?void 0:je.map(x=>{var Q;return(x==null?void 0:x.key)==="formContent"&&(x.contents=(Q=x.contents)==null?void 0:Q.map(A=>(A.value=h,A))),x}),(Le=h==null?void 0:h.split(","))!=null&&Le.find(x=>x.includes(".obj"))){let x={};x.suffix=".obj";const Q=[];let A=await((v=(K=h==null?void 0:h.split(","))==null?void 0:K.filter(C=>C.includes(".obj")||C.includes(".mtl")))==null?void 0:v.map(async C=>{var O,Te;if(C.includes(".obj")){const Ie=(((O=g==null?void 0:g.find(Se=>(Se==null?void 0:Se.key)===t))==null?void 0:O.download)??"")+"/"+C,De=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ae=await n.axios.post(Ie,null,{responseType:"blob",headers:{Authorization:De,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var G=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"});x.blob=G}else if(C.includes(".mtl")){const Ie=(((Te=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.key)===t))==null?void 0:Te.download)??"")+"/"+C,De=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ae=await n.axios.post(Ie,null,{responseType:"blob",headers:{Authorization:De,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var G=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"});Q.push(G)}}));await Promise.all(A),x.mtlBlobs=Q,ae.value.loadModelByDefaultPath([x])}else{const x=[];let Q=await((_e=h==null?void 0:h.split(","))==null?void 0:_e.map(async A=>{var De,Ae;let C={};C.suffix="."+((De=A==null?void 0:A.split("."))==null?void 0:De[1]);const O=(((Ae=g==null?void 0:g.find(Se=>(Se==null?void 0:Se.key)===t))==null?void 0:Ae.download)??"")+"/"+A,Te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ee=await n.axios.post(O,null,{responseType:"blob",headers:{Authorization:Te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var Ie=new Blob([Ee.data],{type:"application/octet-stream;charset=UTF-8"});C.blob=Ie,x.push(C)}));await Promise.all(Q),ae.value.loadModelByDefaultPath(x)}}}return E}));m.showItems.value=await Promise.all(Fe)}}M.value++,j.value=!1},Xe=e.ref(""),Ge=e.ref("open"),He=e.ref("open"),ze=e.ref(!1),ut=o=>{const t=document.getElementById("menuCollapse");o==="open"?(t.style.width="13rem",t.style.height="96%",t.style.overflow="auto"):(t.style.width="50px",t.style.minWidth="50px",t.style.height="50px",t.style.overflow="hidden")},pt=o=>{const t=document.getElementById("operateCollapse");o==="open"?(t.style.width="25rem",t.style.height="96%",t.style.overflow="auto"):(t.style.width="50px",t.style.height="50px",t.style.overflow="hidden")},mt=()=>{ze.value=!ze.value;const o=document.getElementById("operateCollapse"),t=document.getElementById("menuCollapse");ze.value?(t.style.width="13rem",o.style.width="calc(100% - 18rem)"):o.style.width="400px"},We=o=>{const t=URL.createObjectURL(o),c=document.createElement("a");c.href=t,c.download="file.txt",document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(t),z.value=!1},ht=async()=>{var _,k,r,b,D,T,q,fe,ge,S,d,ne,le,we,re,F;z.value=!0;let o=(_=U.value)==null?void 0:_.split("/"),t=o[(o==null?void 0:o.length)-2];const c=((k=g==null?void 0:g.find($=>($==null?void 0:$.key)===t))==null?void 0:k.value)??"";let p="";const s=await n.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});if(((r=s==null?void 0:s.data)==null?void 0:r.code)===200)p=`Bearer ${(D=(b=s.data)==null?void 0:b.result)==null?void 0:D.accessToken}`,sessionStorage.setItem("magicToken",p);else throw n.ElMessage.error("响应出错了"),new Error("响应出错了");const u=p===""?"123456":p,a=await n.axios.post(c,null,{headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((T=a==null?void 0:a.data)==null?void 0:T.code)===200){if(be.IsJson((fe=(q=a==null?void 0:a.data)==null?void 0:q.result)==null?void 0:fe.result)){const $=(le=(ne=(d=JSON.parse((S=(ge=a==null?void 0:a.data)==null?void 0:ge.result)==null?void 0:S.result))==null?void 0:d.lines_file_paths)==null?void 0:ne[0])==null?void 0:le.split("\\"),$e=(((we=g==null?void 0:g.find(J=>(J==null?void 0:J.key)===t))==null?void 0:we.resources)??"")+"/"+(($==null?void 0:$[($==null?void 0:$.length)-2])??"outputResources"),pe=await n.axios.post($e,null,{headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((re=pe==null?void 0:pe.data)==null?void 0:re.code)===200){const J=(F=pe==null?void 0:pe.data)==null?void 0:F.result,w=Oe.cloneDeep(m.showItems.value);w==null||w.map(async Z=>{var Fe,E,Be,je,Le;if((Z==null?void 0:Z.name)==="输出"&&(Z==null?void 0:Z.comp)==="Form"){let K="";J==null||J.forEach(v=>{K=K===""?K+v:K+","+v}),Z.compData=(Fe=Z==null?void 0:Z.compData)==null?void 0:Fe.map(v=>{var _e;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(_e=v.contents)==null?void 0:_e.map(h=>(h.value=K,h))),v}),(E=K==null?void 0:K.split(","))!=null&&E.find(v=>v.includes(".obj"))?(je=(Be=K==null?void 0:K.split(","))==null?void 0:Be.filter(v=>v.includes(".obj")||v.includes(".mtl")))==null||je.map(async v=>{var _e,h;if(v.includes(".obj")){const Q=(((_e=g==null?void 0:g.find(O=>(O==null?void 0:O.key)===t))==null?void 0:_e.download)??"")+"/"+v,A=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),C=await n.axios.post(Q,null,{responseType:"blob",headers:{Authorization:A,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let G=new Blob([C.data],{type:"application/octet-stream;charset=UTF-8"});We(G)}else if(v.includes(".mtl")){const Q=(((h=g==null?void 0:g.find(O=>(O==null?void 0:O.key)===t))==null?void 0:h.download)??"")+"/"+v,A=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),C=await n.axios.post(Q,null,{responseType:"blob",headers:{Authorization:A,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let G=new Blob([C.data],{type:"application/octet-stream;charset=UTF-8"});We(G)}}):(Le=K==null?void 0:K.split(","))==null||Le.map(async v=>{var C,G;""+((C=v==null?void 0:v.split("."))==null?void 0:C[1]);const h=(((G=g==null?void 0:g.find(O=>(O==null?void 0:O.key)===t))==null?void 0:G.download)??"")+"/"+v,x=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Q=await n.axios.post(h,null,{responseType:"blob",headers:{Authorization:x,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let A=new Blob([Q.data],{type:"application/octet-stream;charset=UTF-8"});We(A)})}})}else throw n.ElMessage.error("响应出错了"),new Error("响应出错了")}}else throw n.ElMessage.error("响应出错了"),new Error("响应出错了")},ft=e.computed(()=>m.showItems.value),Ye=e.computed(()=>ue.value==="系统管理"||ue.value==="平台管理");return(o,t)=>{const c=e.resolveComponent("el-button"),p=e.resolveComponent("el-avatar"),s=e.resolveComponent("el-header"),u=e.resolveComponent("el-container"),a=e.resolveComponent("el-icon"),_=e.resolveComponent("el-input"),k=e.resolveComponent("ss-avatar"),r=e.resolveComponent("ss-drop"),b=e.resolveComponent("el-aside"),D=e.resolveComponent("el-collapse-item"),T=e.resolveComponent("el-collapse"),q=e.resolveComponent("el-main"),fe=e.resolveComponent("router-view"),ge=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(xe.ssDialog,{visible:Ve.value,onBeforeDestroy:t[0]||(t[0]=S=>Ve.value=!1)},{default:e.withCtx(()=>[Y.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:Y.value,style:{width:"100%",height:"500px",border:"1px solid #ccc"}},null,8,Pt)):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.unref(V)==="edit"?(e.openBlock(),e.createBlock(u,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(s,{class:"client-structure-header"},{default:e.withCtx(()=>{var S;return[e.createElementVNode("div",$t,[e.createVNode(c,{id:"transparentBgButton",onClick:e.unref(m.onBack)},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[6]},8,["onClick"]),e.createVNode(c,{id:"transparentBgButton",onClick:t[1]||(t[1]=d=>{var ne,le;return e.unref(m.clickSavePage)((le=(ne=e.unref(ee))==null?void 0:ne.map(we=>we.value))==null?void 0:le.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[t[7]||(t[7]=e.createTextVNode(" 保存页面 "))]),_:1,__:[7]})]),e.createElementVNode("div",jt,[(e.openBlock(),e.createBlock(nt,{key:e.unref(ee),breadArray:e.unref(ee),onClick:e.unref(m.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",Lt,[e.renderSlot(o.$slots,"default",{},void 0,!0),e.createVNode(p,{size:35,src:(S=e.unref(L))==null?void 0:S.avatarUrl},{default:e.withCtx(()=>{var d;return[e.createTextVNode(e.toDisplayString(((d=e.unref(L))==null?void 0:d.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(V)==="edit"?(e.openBlock(),e.createBlock(u,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",It,[e.createVNode(ye.modelSelect)]),e.createElementVNode("div",Ot,[e.createVNode(ye.modelShow)]),e.createElementVNode("div",zt,[e.createVNode(ye.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(u,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(s,{class:"client-header"},{default:e.withCtx(()=>[e.createElementVNode("div",qt,[e.createVNode(Ce.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),e.createTextVNode(" "+e.toDisplayString(e.unref(W)===""?"CPMPIP":e.unref(W)),1)]),e.createElementVNode("div",Jt,[e.createVNode(at,{mode:"horizontal"})]),e.createElementVNode("div",Kt,[e.createVNode(_,{modelValue:Xe.value,"onUpdate:modelValue":t[2]||(t[2]=S=>Xe.value=S),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(a,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ot.search_default))]),_:1})]),_:1},8,["modelValue"]),R.showButton?(e.openBlock(),e.createBlock(c,{key:0,id:"transparentBgButton",onClick:e.unref(m.clickGenerateApp)},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[t[8]||(t[8]=e.createTextVNode(" 生成APP "))]),_:1,__:[8]},8,["onClick"])):e.createCommentVNode("",!0),R.showButton&&e.unref(V)==="view"?(e.openBlock(),e.createBlock(c,{key:1,id:"transparentBgButton",onClick:e.unref(m.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[t[9]||(t[9]=e.createTextVNode(" 修改布局 "))]),_:1,__:[9]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0),e.createVNode(r,null,{dropTitle:e.withCtx(()=>{var S;return[e.createVNode(k,{size:"35",avatarUrl:(S=e.unref(L))==null?void 0:S.avatarUrl,showCropper:!1,banClick:!0},{avatarDefault:e.withCtx(()=>{var d;return[e.createTextVNode(e.toDisplayString(((d=e.unref(L))==null?void 0:d.account)??"未知"),1)]}),_:1},8,["avatarUrl"])]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Gt,[e.createVNode(xe._sfc_main,{emptyColor:!0,class:"menu-button",onClickTrigger:lt,modelValue:"退出登录",buttonType:""})])]),_:1})])]),_:3}),e.createVNode(u,{class:"client-body"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(q,{class:"client-main"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:Ge.value,"onUpdate:modelValue":t[3]||(t[3]=S=>Ge.value=S),accordion:"",class:"client-aside",id:"menuCollapse",onChange:ut},{default:e.withCtx(()=>[e.createVNode(D,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:Ge.value===""?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>[e.createVNode(b,{style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(qe.default,{mode:"vertical"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",Ht,[e.createVNode(gt.default,{isShow:f.value,windowConfig:R.windowConfig,ref_key:"threeModelRef",ref:ae},null,8,["isShow","windowConfig"])]),e.createVNode(T,{modelValue:He.value,"onUpdate:modelValue":t[5]||(t[5]=S=>He.value=S),accordion:"",class:"client-main-operate",id:"operateCollapse",onChange:pt},{default:e.withCtx(()=>[e.createVNode(D,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Ce.SvgIcon,{name:He.value==="open"?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>{var S;return[e.createElementVNode("div",null,[e.createVNode(Ce.SvgIcon,{class:"fold-icon",name:ze.value?"Right":"Left",onClick:mt},null,8,["name"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=ft.value)==null?void 0:S.filter(d=>d.comp!=="FormTop"),(d,ne)=>{var le;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:d==null?void 0:d.id},[((le=d==null?void 0:d.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&d.name?(e.openBlock(),e.createElementBlock("div",Wt,e.toDisplayString(d.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m.getComponents)(d.comp)),{compName:d.name,itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:(d==null?void 0:d.id)??ne,onChange:e.unref(m.onChange),index:(d==null?void 0:d.id)??ne,onContentChange:e.unref(m.onContentChange),onPageChange:e.unref(m.onPageChange),onRowClick:Ke},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),i.value?(e.openBlock(),e.createElementBlock("div",Qt,[X.value?(e.openBlock(),e.createBlock(xe._sfc_main,{key:0,class:"calculator-content",onClickTrigger:ht,loading:z.value,modelValue:"预览"},null,8,["loading"])):e.createCommentVNode("",!0),e.createVNode(xe._sfc_main,{class:"calculator-content",onClickTrigger:t[4]||(t[4]=d=>dt()),loading:j.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",Xt,[e.createVNode(xe._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:rt,loading:ke.value},null,8,["loading"])])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(xe._sfc_main,{class:"calculator-content",modelValue:"播放动画",onClickTrigger:Ne})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Zt,[e.createVNode(xe._sfc_main,{class:"calculator-content",onClickTrigger:it,modelValue:"预览"}),e.createVNode(xe._sfc_main,{class:"calculator-content",onClickTrigger:st,modelValue:"下载"})])):e.createCommentVNode("",!0)])]}),_:1})]),_:1},8,["modelValue"])]),_:1},512),[[e.vShow,!Ye.value]]),e.withDirectives(e.createVNode(q,{class:"client-router"},{default:e.withCtx(()=>[e.createElementVNode("div",eo,[e.createVNode(b,{width:"300px"},{default:e.withCtx(()=>[e.createVNode(qe.default,{mode:"vertical"})]),_:1})]),e.createElementVNode("div",to,[e.createVNode(fe)])]),_:1},512),[[e.vShow,Ye.value]])]),_:1})]),_:3})),[[ge,e.unref(N)]])],64)}}}),ao=Me._export_sfc(oo,[["__scopeId","data-v-09646213"]]),no={class:"system-wrap"},lo={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},showButton:{type:Boolean,default:!0},content:String,jsonContents:Array},emits:["buildContent","showChild"],setup(R,{emit:me}){const l=Je.useModelComp(n.pinia),M=be.useUnit(n.pinia),j=n.useMenuState();e.ref(!1);const ee=e.ref(!0),i=R,X=me,z=P=>{X("showChild",P)},te=e.computed(()=>{switch(i==null?void 0:i.platform){case"browser":return et.browserThemeConfig;case"client":return et.clientThemeConfig}}),oe=P=>{const L=document.documentElement;P==null||P.forEach(Y=>{L.style.setProperty(Y.name,Y.value)})};e.watch(()=>i.platform,(P,L)=>{P&&oe(te.value)},{immediate:!0});const ce=()=>{X("buildContent")};return e.watch(()=>[i==null?void 0:i.content,i==null?void 0:i.jsonContents],async()=>{var Y,de,V,se;if(((Y=i==null?void 0:i.jsonContents)==null?void 0:Y.length)>0){l.setOriginalData(i==null?void 0:i.jsonContents);return}if(!(i!=null&&i.content)||((de=i==null?void 0:i.content)==null?void 0:de.length)===0)return;ee.value=!0,j.setImportLoading(!0);let P=[],L=[];M.setSelectTitle([]),M.setSelectIndex(""),M.setSelectMenu(""),(se=(V=i==null?void 0:i.content)==null?void 0:V.filter(H=>H!==""))==null||se.forEach(H=>{Re.isExpandStringToJson(H)?L.push(Re.expandStringToJson(H)):Re.expandNewStringToJson(H)?L.push(Re.expandNewStringToJson(H)):Re.expandContentStringToJson(H)?L.push(Re.expandContentStringToJson(H)):L.push(m.expandToNewContents(H))}),P=L==null?void 0:L[0],await m.savePageDataAsync(P),await be.loadingSystemType(),l.setOriginalData(P),j.setImportLoading(!1)},{deep:!0,immediate:!0}),(P,L)=>(e.openBlock(),e.createElementBlock("div",no,[R.platform==="browser"?(e.openBlock(),e.createBlock(Mt,{key:0,showButton:R.showButton},{default:e.withCtx(()=>[e.renderSlot(P.$slots,"default",{},void 0,!0)]),_:3},8,["showButton"])):(e.openBlock(),e.createBlock(ao,{key:1,windowConfig:R.windowConfig,showButton:R.showButton,onBuildContent:ce,onShowChild:z},{default:e.withCtx(()=>[e.renderSlot(P.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig","showButton"]))]))}},so=Me._export_sfc(lo,[["__scopeId","data-v-5f2a4306"]]),io={class:"add-model-content"},ro={key:0,class:"model-operate"},co={class:"model-select"},uo={class:"model-fill"},po={key:1,class:"model-view"},mo={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},pathContent:{type:String,default:""}},emits:["change","contentChange","buildContent","openThreeBuild"],setup(R,{emit:me}){const l=R,M=me,j=e.ref([]),ee=e.ref(0),i=e.ref([]),X=e.ref([]),z=e.ref(0),te=Je.useModelComp(n.pinia),oe=n.useMenuState(n.pinia),{itemData:ce,originalData:P}=n.storeToRefs(te),{activeMenuPath:L,platform:Y}=n.storeToRefs(oe),de=e.ref(null),V=e.ref(0),se=e.ref([]);e.ref("");const H=e.ref(0),ve=()=>{M("buildContent")},I=N=>{M("openThreeBuild",N)};e.watch(()=>l==null?void 0:l.pathContent,()=>{(l==null?void 0:l.pathContent)!==""&&te.setSystemPath(l==null?void 0:l.pathContent)},{deep:!0,immediate:!0});const ae=N=>{M("contentChange",N)},Ve=N=>{var ue;const U=(ue=Oe.cloneDeep(N==null?void 0:N.wholeValue))==null?void 0:ue.map(W=>{var ie;return(W==null?void 0:W.comp)==="Form"&&(W.compData=(ie=W.compData)==null?void 0:ie.map(y=>((y==null?void 0:y.key)==="formContent"&&(y.contents=Re.arrayToNumberArray(y==null?void 0:y.contents)),y))),W});M("change",{originalContents:P.value,currentContents:N==null?void 0:N.wholeValue,editContent:N==null?void 0:N.editValue,arrayToContents:U})};e.watch(()=>i.value,()=>{H.value===i.value.length&&i.value.length!==0&&(j.value=i.value)},{deep:!0,immediate:!0});const Pe=()=>{de.value!==null&&de.value.click()},ke=async N=>{const U=N.target.files;if(!U)return;new FileReader,j.value=[],i.value=[],H.value=U.length;const ue=Array.from(U).map(async W=>await new Promise(ie=>{const y=new FileReader;y.onload=f=>{try{i.value.push(f.target.result),V.value++}catch(he){console.error("解析失败:",he);return}},y.onerror=()=>ie(`读取 ${W.name} 失败`),y.readAsText(W),N.target.value="",de.value=null,ee.value++}));await Promise.all(ue)};return e.watch(()=>[l==null?void 0:l.content,l==null?void 0:l.jsonContents],async()=>{await be.loadingSystemType(),j.value=l.content,X.value=l==null?void 0:l.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>V.value,()=>{var N;((N=se.value)==null?void 0:N.length)!==0&&(te.setOriginalData(se.value),te.setItemData(se.value))},{deep:!0,immediate:!0}),(N,U)=>{const ue=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",io,[(l==null?void 0:l.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ro,[e.createElementVNode("div",co,[e.createVNode(ye.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:z.value},[e.createVNode(ye.modelShow)])),e.createElementVNode("div",uo,[e.createVNode(ye.modelFill)])])):e.createCommentVNode("",!0),(l==null?void 0:l.mode)==="view"?(e.openBlock(),e.createElementBlock("div",po,[(e.openBlock(),e.createBlock(so,{showButton:R.showButton,platform:e.unref(Y),content:j.value,onChange:Ve,jsonContents:X.value,onContentChange:ae,onBuildContent:ve,key:z.value,onShowChild:I},{default:e.withCtx(()=>{var ie;return[((ie=l==null?void 0:l.jsonContents)==null?void 0:ie.length)===0&&(l!=null&&l.showButton)?(e.openBlock(),e.createBlock(W,{key:0,id:"transparentBgButton",onClick:Pe},{icon:e.withCtx(()=>[e.createVNode(ue,{name:"import"})]),default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("input",{type:"file",key:ee.value,ref_key:"fileInput",ref:de,accept:".txt, .inm",onChange:ke,style:{display:"none"},multiple:""},null,32)),U[0]||(U[0]=e.createTextVNode(" 导入模型 "))]),_:1,__:[0]})):e.createCommentVNode("",!0)]}),_:1},8,["showButton","platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},ho=Me._export_sfc(mo,[["__scopeId","data-v-7ee96c6e"]]);exports.default=ho;
|
package/dist/index-D68A4TXc.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),v=require("./menu-B-Z5KAh5.cjs"),m=require("./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs"),U=require("./index-BA-Qtevs.cjs"),ee=require("./index-BHxsT1eb.cjs"),te=require("./login-DsWsywlE.cjs"),B=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs"),$=require("./index-C8jmJvXd.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=m.useModelComp(v.pinia),W=U.useUnit(v.pinia),_=v.useMenuState(v.pinia),{menus:G,configMenu:N,activeMenuPath:A,cacheStructures:S}=v.storeToRefs(_),R=a.ref(!1),oe=a.computed(()=>{var t,e;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(e=(t=B.cloneDeep(G.value))==null?void 0:t.map(o=>({...o,menuType:"系统菜单"})))==null?void 0:e.filter(o=>o.title!=="系统管理"&&o.title!=="平台管理")}]}),q=a.ref([]),K=a.ref([{label:"新建"}]),ae=a.computed(()=>[{key:"extraButton",contents:K.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:q.value}]),J=a.ref([]),T=a.ref({}),ne=a.ref({}),j=a.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构"},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),V=t=>{var e;console.log("formatFormData",t),J.value=t?(e=j.value)==null?void 0:e.map(o=>o.prop==="dialogConfig"||o.prop==="contentConfig"||o.prop==="trigger"?o:{...o,value:t?t[o==null?void 0:o.prop]:""}):j.value},re=a.ref([{label:"查询"},{label:"重置"}]),se=async()=>{},Q=t=>t.map(e=>e.childMenus&&e.childMenus.length>0?{...e,value:e==null?void 0:e.title,label:e==null?void 0:e.title,children:Q(e.childMenus)}:{...e,value:e==null?void 0:e.title,label:e==null?void 0:e.title}),h=a.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),H=a.ref([]),k=a.ref({}),b=a.ref(null),D=a.ref([]),X=a.computed(()=>{var t;return(t=Q(G.value))==null?void 0:t.filter(e=>e.title!=="系统管理"&&e.title!=="平台管理")}),Y=async t=>{var o,u,r,c;const e=await v.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:t,version:1}});((o=e==null?void 0:e.data)==null?void 0:o.code)===200&&(u=e.data)!=null&&u.result&&(D.value=(c=(r=e.data)==null?void 0:r.result)==null?void 0:c.map(n=>{var i;return{id:n==null?void 0:n.id,...(i=n==null?void 0:n.value)==null?void 0:i.pageData}}))},ue=async t=>{var e;R.value=!0,b.value={...t,rootNode:te.findRootNodeByPath(X.value,t.path)},(t==null?void 0:t.level)===0?K.value.splice(0):(K.value=[{label:"新建"}],H.value=(e=t==null?void 0:t.path)==null?void 0:e.split("/")),await _.setConfigMenu(null),await Y(t==null?void 0:t.path),await P(t)},ce=t=>{switch(t){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},ie=async(t,e)=>{var o,u;if(!b.value)return v.ElMessage.warning("请先选择菜单");if(h.type=ce(t),H.value=[],I.setSubmitCurStructure(!1),W.setSelectTitle([]),_.setCacheStructures(null),k.value=B.cloneDeep(e),h.type!=="delete"){switch(h.type){case"create":V(null),await _.setConfigMenu(null);break;case"update":V(k.value),await _.setConfigMenu(k.value);break}await a.nextTick(),h.title=`【${h.type==="create"?(o=b.value)==null?void 0:o.path:(u=k.value)==null?void 0:u.path}】菜单配置${t}`,h.show=!0}else await Z(k.value,h.type)},de=async t=>{var e;T.value=t,await _.setConfigMenu({...T.value,path:(e=b.value)==null?void 0:e.path})},pe=a.ref(null),ge=async(t,e)=>{var n,i,p,d,g;if(h.type==="create"&&((n=D.value)==null?void 0:n.length)>0&&e==="contentConfig"&&I.setItemData(D.value),!(t!=null&&t.structureIds)||((i=t==null?void 0:t.structureIds)==null?void 0:i.length)===0)return;const o=(d=(p=t==null?void 0:t.structureIds)==null?void 0:p.filter(l=>(l==null?void 0:l.key)===e))==null?void 0:d.map(l=>l==null?void 0:l.id);console.log("getTriggerStructures",t==null?void 0:t.structureIds,e);let u=o==null?void 0:o.map(l=>{if(l)return v.getInsofDataApi({id:l})});const r=await Promise.all(u);if(r==null?void 0:r.every(l=>{var f;return((f=l==null?void 0:l.data)==null?void 0:f.code)===200}))if((r==null?void 0:r.length)>0){const l=r==null?void 0:r.map(f=>{var C,w,s,x,F,M,y,O;return{id:(s=(w=(C=f==null?void 0:f.data)==null?void 0:C.result)==null?void 0:w[0])==null?void 0:s.id,...(O=(y=(M=(F=(x=f==null?void 0:f.data)==null?void 0:x.result)==null?void 0:F[0])==null?void 0:M.value)==null?void 0:y.pageData)==null?void 0:O.structure}});I.setItemData(l),console.log("clickTrigger2",l)}else((g=D.value)==null?void 0:g.length)>0&&e==="contentConfig"&&I.setItemData(D.value)},fe=async t=>{var r,c,n,i,p,d,g,l;const e=t==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";if(_.setButtonTriggerType(e),h.type==="create"&&((r=S.value)==null?void 0:r.length)>0){const f=(n=(c=S.value)==null?void 0:c.filter(C=>(C==null?void 0:C.key)===e))==null?void 0:n.flatMap(C=>C==null?void 0:C.data);console.log("clickTrigger",e,S.value,f),I.setItemData(f)}else await ge(k.value,e);let o;(i=T.value)!=null&&i.subMenus&&((p=T.value)==null?void 0:p.subMenus.length)>0&&(o=(d=H.value)==null?void 0:d.map(f=>({value:f})),o.unshift({value:(g=k.value)==null?void 0:g.title}));let u;h.type==="create"?u={...T.value,path:(l=b.value)==null?void 0:l.path}:h.type==="update"&&(u=N.value),await _.setConfigMenu(u),W.setSelectTitle(o),I.setIsEdit("edit")},P=async t=>{var o,u,r,c,n,i;const e=await v.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:A.value+"/"+(t==null?void 0:t.path),tableId:""}});((o=e==null?void 0:e.data)==null?void 0:o.code)===200&&(u=e.data)!=null&&u.result&&(q.value=((c=(r=e.data)==null?void 0:r.result)==null?void 0:c.length)>0?(i=(n=e.data)==null?void 0:n.result)==null?void 0:i.map(p=>{var d;return{id:p==null?void 0:p.id,...(d=p==null?void 0:p.value)==null?void 0:d.tableData}}):[]),R.value=!1},E=async(t,e,o="contentConfig")=>{var u,r,c,n,i,p;console.log("clickSubmitForm4",t);try{let d,g;if(e==="create")d={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:A.value+"/"+((u=b.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(r=b.value)==null?void 0:r.rootNode)==null?void 0:c.path,structureBelong:o,parentTable:"",version:1},value:{pageData:t}},g=v.createInsofDataApi;else if(e==="update"){const f=B.cloneDeep(t.data);f==null||delete f.id,d={id:t==null?void 0:t.id,value:{pageData:f}},g=v.updateInsofDataApi}else e==="delete"&&(d={id:t},g=v.deleteInsofDataApi);const l=await g(d);if(((n=l==null?void 0:l.data)==null?void 0:n.code)!==200)throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败");return{status:((i=l==null?void 0:l.data)==null?void 0:i.code)===200,data:{id:(p=l==null?void 0:l.data)==null?void 0:p.result,key:o}}}catch{v.ElMessage.error("保存响应失败")}},L=(t,e)=>{var p,d,g;const o=(p=t==null?void 0:t.flatMap(l=>l==null?void 0:l.data))==null?void 0:p.map(l=>l==null?void 0:l.id),u=e.filter(l=>!(o!=null&&o.includes(l))),r=o==null?void 0:o.filter(l=>!e.includes(l));let c=null,n=null,i=null;return c=[...u,...r].filter(l=>l),n=(d=t==null?void 0:t.flatMap(l=>l==null?void 0:l.data))==null?void 0:d.filter(l=>!(l!=null&&l.id)),i=(g=t==null?void 0:t.flatMap(l=>l==null?void 0:l.data))==null?void 0:g.filter(l=>l==null?void 0:l.id),{deleteIds:c,createComps:n,updateComps:i}},z=(t,e)=>{var u,r,c,n,i,p;let o=[];return((u=e==null?void 0:e.deleteIds)==null?void 0:u.length)>0&&((r=e==null?void 0:e.deleteIds)==null||r.forEach(d=>{o.push(E(d,"delete",t))})),((c=e==null?void 0:e.createComps)==null?void 0:c.length)>0&&((n=e==null?void 0:e.createComps)==null||n.forEach(d=>{var g,l;o.push(E({menuConfig:N.value,structure:d,rootNodePath:(l=(g=b.value)==null?void 0:g.rootNode)==null?void 0:l.path},"create",t))})),((i=e==null?void 0:e.updateComps)==null?void 0:i.length)>0&&((p=e==null?void 0:e.updateComps)==null||p.forEach(d=>{var g,l;o.push(E({menuConfig:N.value,structure:d,rootNodePath:(l=(g=b.value)==null?void 0:g.rootNode)==null?void 0:l.path},"update",t))})),o},ve=async(t,e)=>{var l,f,C,w;const o=(l=D.value)==null?void 0:l.map(s=>s==null?void 0:s.id),u=t==null?void 0:t.filter(s=>(s==null?void 0:s.key)==="contentConfig"),r=t==null?void 0:t.filter(s=>(s==null?void 0:s.key)==="dialogConfig"),c=(w=(C=(f=S.value)==null?void 0:f.filter(s=>(s==null?void 0:s.key)==="dialogConfig"))==null?void 0:C.flatMap(s=>s==null?void 0:s.data))==null?void 0:w.map(s=>s==null?void 0:s.id),n=L(r,c),i=L(u,o);console.log("clickSubmitForm1",n,i,e);const p=z("dialogConfig",n),d=z("contentConfig",i),g=[...p,...d];await Promise.all(g).then(s=>{var M;const x=s==null?void 0:s.every(y=>y.status);if(console.log("clickSubmitForm3Promise:",s,g,k.value,h.type),!x)return;const F=(M=s==null?void 0:s.flatMap(y=>y==null?void 0:y.data))==null?void 0:M.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);Z({...e,structureIds:F},h.type)}).catch(s=>{v.ElMessage.error(s)})},Z=async(t,e)=>{var r,c;let o,u;e==="create"?(o={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:A.value+"/"+((r=b.value)==null?void 0:r.path),tableId:""},value:{tableData:t}},u=v.createInsofDataApi):e==="update"?(o={id:t==null?void 0:t.id,value:{tableData:t}},u=v.updateInsofDataApi):e==="delete"&&(o={ids:[t.id,...(c=t==null?void 0:t.structureIds)==null?void 0:c.map(n=>n.id)]},u=v.batchDeleteInsofDataApi),ee.handleSubmitAsync(u,o,e).then(n=>{e==="create"&&q.value.push({...t,id:n}),e&&n&&v.ElMessage.success("响应成功"),P(b.value)})},he=async()=>{var o,u,r,c,n;const t=B.cloneDeep(S.value);await a.nextTick();const e=h.type==="create"?{...N.value,rootNodePath:(u=(o=b.value)==null?void 0:o.rootNode)==null?void 0:u.path}:{...N.value,rootNodePath:(c=(r=b.value)==null?void 0:r.rootNode)==null?void 0:c.path,id:(n=k.value)==null?void 0:n.id};await ve(t,e),T.value={},h.show=!1,await P(b.value)},ye=()=>{h.show=!1},be=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:ye,buttonValue:re,changeTrigger:de,changedRow:ne,clickNodeTrigger:ue,clickRowButton:ie,clickSubmitForm:he,clickTrigger:fe,dialogInfo:h,formatFormData:V,getTableDataAsync:P,handleItemDataChange:se,handleSubInitialStructure:Y,inputForm:T,menuPageData:ae,operatingForm:pe,pageData:oe,renderFormData:J,tableLoading:R,treeData:X},Symbol.toStringTag,{value:"Module"})),Ce={class:"menu-module"},ke={class:"tree-wrap"},_e={class:"table-wrap","element-loading-text":"加载中..."},Te={class:"module-dialog-default"},De=a.defineComponent({__name:"index",setup(t){const e=a.reactive({...be}),o=a.ref(null),u=v.useMenuState(v.pinia),{configMenu:r}=v.storeToRefs(u);return a.onMounted(()=>{var c;e.formatFormData(r.value),console.log(12345,r.value),a.nextTick(()=>{var n,i;(i=o.value)==null||i.setCurrentKey((n=r.value)==null?void 0:n.path)}),r.value&&e.handleSubInitialStructure((c=r.value)==null?void 0:c.path)}),(c,n)=>{const i=a.resolveComponent("el-tree"),p=a.resolveComponent("el-button"),d=a.resolveDirective("loading");return a.openBlock(),a.createElementBlock("div",Ce,[a.createElementVNode("div",ke,[a.createVNode(i,{ref_key:"treeRef",ref:o,data:e.treeData,"expand-on-click-node":!1,"node-key":"path",props:{children:"children",label:"label",path:"path"},"highlight-current":"","default-expand-all":"","check-on-click-leaf":!1,"check-strictly":"",onNodeClick:e.clickNodeTrigger},null,8,["data","onNodeClick"])]),a.withDirectives((a.openBlock(),a.createElementBlock("div",_e,[a.createVNode(U.ssTable,{itemData:e.menuPageData,changedContent:e.changedRow,operatingForm:e.operatingForm,onOnFormChange:e.changeTrigger,onChange:e.handleItemDataChange,onClickTrigger:e.clickTrigger,onOnButtonClick:e.clickRowButton},null,8,["itemData","changedContent","operatingForm","onOnFormChange","onChange","onClickTrigger","onOnButtonClick"])])),[[d,e.tableLoading]]),a.createVNode($.ssDialog,{class:"module-dialog",title:e.dialogInfo.title,visible:e.dialogInfo.show,width:e.dialogInfo.width,onBeforeDestroy:e.beforeDialogDestroy},{default:a.withCtx(()=>[a.createElementVNode("div",Te,[a.createVNode($.ssForm,{rowContents:e.renderFormData,isEnableWrap:!1,isEdit:!0,onChange:e.changeTrigger,onClickTrigger:e.clickTrigger},null,8,["rowContents","onChange","onClickTrigger"])])]),footer:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(p,{onClick:e.beforeDialogDestroy,id:"themeBorderButton"},{default:a.withCtx(()=>n[0]||(n[0]=[a.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),a.createVNode(p,{id:"themeButton",onClick:e.clickSubmitForm},{default:a.withCtx(()=>n[1]||(n[1]=[a.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])])}}}),Ie=le._export_sfc(De,[["__scopeId","data-v-541cf007"]]);exports.default=Ie;
|
package/dist/index-DBB_scdx.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("vue"),r=require("./menu-B-Z5KAh5.cjs"),R=require("./login-DsWsywlE.cjs"),F=require("./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs"),m=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs"),q=r.useMenuState(),{activeMenuPath:b}=r.storeToRefs(q),I=R.useLoginState(),{structureData:z}=r.storeToRefs(I),O=F.useModelComp(),{itemData:j}=r.storeToRefs(O),H=c.ref([{label:"角色名称",value:"",name:"roleName"}]),L=c.ref([{label:"查询"},{label:"重置"}]),w=c.reactive({isFilter:!1,filterForm:{}}),Q=c.ref(!1),U=a=>{console.log("handleQueryChange",a),w.isFilter=!0,w.filterForm=a},f=c.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"授权",textColor:"blue"},{label:"编辑"},{label:"删除",textColor:"red"}]},{key:"header",contents:[{label:"角色名称",prop:"roleName"},{label:"角色状态",formType:"Radio",prop:"roleStatus",options:[{label:"启用",value:"启用"},{label:"禁用",value:"禁用"}]},{label:"角色排序",prop:"roleOrder",formType:"Number"},{label:"备注",prop:"remark",formType:"TextArea"},{label:"权限",prop:"roleAuthority",isTableColHidden:!0,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:[]}]),V=c.computed(()=>f.value),$=a=>{C(a.singleContent,a.buttonName)},A=c.ref({}),k=c.ref(),d=async(a,e,l)=>{var t,n;try{const s=await a(e);return((t=s==null?void 0:s.data)==null?void 0:t.code)===200?(l!=="查询"&&await I.setLogRecordAsync({type:l,data:e},b.value),s.data.result||((n=s==null?void 0:s.data)==null?void 0:n.code)===200):null}catch(s){r.ElMessage.error(s)}},M=(a,e)=>{e==null||e.forEach(l=>{a==null||a.forEach(t=>{var n;t.path==l.path&&(t.checkedButtons=l.checkedButtons),t.children&&((n=t.children)==null?void 0:n.length)>0&&M(t.children,e)})})},T=a=>a==null?void 0:a.map(e=>{var t;const l={...e,checkedButtons:[]};return l.children&&((t=l.children)==null?void 0:t.length)>0&&(l.children=T(l.children)),l}),G=async(a,e)=>{switch(A.value=m.cloneDeep(e),a){case"授权":u.title=`【${e.roleName}】授权`,u.show=!0,await c.nextTick(),e.roleAuthority&&Array.isArray(e.roleAuthority)&&M(p.value,e.roleAuthority);break}},J=()=>{u.show=!1},g=c.ref(),W=async a=>{const e=await d(r.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:a}},"查询"),l=e==null?void 0:e.map(t=>{var n;return{id:t.id,tableData:(n=t==null?void 0:t.value)==null?void 0:n.tableData}});return l==null?void 0:l.map(t=>{var n;if(Array.isArray(t==null?void 0:t.tableData)){let s={id:t.id};return(n=t==null?void 0:t.tableData)==null||n.forEach((o,y)=>{s[`a${y}`]=o}),s}else return{...t.tableData,id:t.id}})},C=(a,e)=>{const l=m.cloneDeep(a);l!=null&&l.id&&delete l.id,e==="新增"?d(r.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:b.value,tableId:v.value},value:{tableData:l}},e).then(t=>{g.value={...a,newId:t},e&&t&&r.ElMessage.success(e+"成功")}):e==="编辑"?(console.log("编辑角色",l),d(r.updateInsofDataApi,{id:a.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:b.value,tableId:v.value},value:{tableData:l}},e).then(t=>{e&&t&&r.ElMessage.success(e+"成功"),u.show=!1})):e==="删除"&&d(r.deleteInsofDataApi,{id:a.id},e).then(t=>{e&&t&&r.ElMessage.success(e+"成功")})},K=a=>{let e=[];return a==null||a.forEach(l=>{var t;if(l.checkedButtons&&((t=l.checkedButtons)==null?void 0:t.length)>0){const n={path:l.path,checkedButtons:l.checkedButtons};e=e.concat(n)}l.children&&(e=e.concat(K(l.children)))}),e},X=()=>{g.value={...A.value,roleAuthority:K(p.value)},c.nextTick(()=>{console.log("clickSubmitAuthority",g.value,f.value),C(g.value,"编辑")})},u=c.reactive({show:!1,title:"角色授权",width:"35%",draggable:!0}),Y=({isPenultimate:a},e)=>{var l,t;return console.log("isPenultimate",a,e),((t=(l=e==null?void 0:e.data)==null?void 0:l.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},v=c.ref(0),x=async()=>{var l,t,n,s,o;let a;const e=await r.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:b.value}});return((l=e==null?void 0:e.data)==null?void 0:l.code)===200&&(t=e==null?void 0:e.data)!=null&&t.result&&((n=e==null?void 0:e.data)==null?void 0:n.result.length)>0&&(a=(o=(s=e==null?void 0:e.data.result)==null?void 0:s[0])==null?void 0:o.id),a},p=c.ref([]),Z=c.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),ee=(a,e)=>{var l;a.checkedButtons=e?(l=a.renderButtons)==null?void 0:l.map(t=>t.path):[],console.log("handleNodeCheckChange",a,e)},h=c.ref([]),te=(a,e)=>{var l,t,n;e.checkedButtons=a,((l=e.checkedButtons)==null?void 0:l.length)===((t=e.renderButtons)==null?void 0:t.length)?h.value.push(e.path):(a==null?void 0:a.length)===0&&(h.value=(n=h.value)==null?void 0:n.filter(s=>s!==e.path))};c.watch(()=>h.value.length,()=>{var e,l;const a=(e=k.value)==null?void 0:e.getCheckedKeys();console.log(112,h.value,a),(l=k.value)==null||l.setCheckedKeys([...h.value])});c.watch(()=>u.show,a=>{a||(p.value=T(p.value))});const D=c.computed(()=>{var l;const a=(l=m.cloneDeep(z.value))==null?void 0:l.filter(t=>{var n,s;return((s=(n=t==null?void 0:t.key)==null?void 0:n.pageKey)==null?void 0:s.toUpperCase())!=="MENU"});return[...a==null?void 0:a.map(t=>{var o,y,_,S;const n=/button/i;let s=(_=(y=(o=t==null?void 0:t.value)==null?void 0:o.pageData)==null?void 0:y.compData)==null?void 0:_.filter(i=>n.test(i==null?void 0:i.key));return s=Array.from(new Set(s==null?void 0:s.flatMap(i=>i.contents.map(N=>N.label)))),{path:(S=t==null?void 0:t.key)==null?void 0:S.pageKey,buttons:s}}),...P.value]}),P=c.ref([]),B=(a,e)=>{if(Array.isArray(a))return a==null?void 0:a.map(l=>{var n,s;const t=e==null?void 0:e.find(o=>(o==null?void 0:o.path)===(l==null?void 0:l.path));return l.childMenus&&l.childMenus.length>0?{...l,renderButtons:l.carryData?(n=t==null?void 0:t.buttons)==null?void 0:n.map(o=>({title:o,path:l.path+"/"+o})):[],checkedButtons:[],children:B(l.childMenus,D.value),childMenus:B(l.childMenus,D.value)}:{...l,renderButtons:l.carryData?(s=t==null?void 0:t.buttons)==null?void 0:s.map(o=>({title:o,path:l.path+"/"+o})):[],checkedButtons:[]}})},E={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:f.value,name:""}]}]};c.watch(()=>j.value,a=>{var e;a&&(a==null?void 0:a.length)>0&&(f.value=(e=a==null?void 0:a[0])==null?void 0:e.compData)});const ae=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:B,authorizeDialog:u,buttonValue:L,changedRow:g,clickRow:A,clickRowButton:G,clickSubmitAuthority:X,closeAuthorizeDialog:J,customNodeClass:Y,getActivePageStructureId:x,getPageDataAsync:W,handleItemDataChange:$,handleNodeBtnChange:te,handleNodeCheckChange:ee,handleQueryChange:U,handleSubmitAsync:d,isPageDataExist:Q,menuData:p,menusButtons:Z,pageData:f,pageDataFiltered:V,queryFormData:H,structureButtons:D,structureId:v,submitTableAsyncByVerify:C,tempRolePageData:E,tempSysMenus:P,treeRef:k},Symbol.toStringTag,{value:"Module"}));exports.State=ae;exports.authorizeDialog=u;exports.getActivePageStructureId=x;exports.tempRolePageData=E;
|
package/dist/index-Dnq8JVuW.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),l=require("./index-BJitBJZu.cjs"),Nt=require("./menu-B-Z5KAh5.cjs"),_=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs"),it=require("./index.vue_vue_type_script_setup_true_lang-Dr6igsfU.cjs");function It(e){return e}function xt(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var Mt=800,At=16,Vt=Date.now;function Rt(e){var n=0,o=0;return function(){var r=Vt(),a=At-(r-o);if(o=r,a>0){if(++n>=Mt)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Lt(e){return function(){return e}}var Pt=_.defineProperty?function(e,n){return _.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:Lt(n),writable:!0})}:It,zt=Rt(Pt),$e=Math.max;function Ot(e,n,o){return n=$e(n===void 0?e.length-1:n,0),function(){for(var r=arguments,a=-1,s=$e(r.length-n,0),i=Array(s);++a<s;)i[a]=r[n+a];a=-1;for(var u=Array(n+1);++a<n;)u[a]=r[a];return u[n]=o(i),xt(e,this,u)}}var Ue=l.Symbol?l.Symbol.isConcatSpreadable:void 0;function Ft(e){return l.isArray(e)||_.isArguments(e)||!!(Ue&&e&&e[Ue])}function _t(e,n,o,r,a){var s=-1,i=e.length;for(o||(o=Ft),a||(a=[]);++s<i;){var u=e[s];o(u)?_.arrayPush(a,u):a[a.length]=u}return a}function Ht(e){var n=e==null?0:e.length;return n?_t(e):[]}function Dt(e){return zt(Ot(e,void 0,Ht),e+"")}function $t(e,n){return e!=null&&n in Object(e)}function Ut(e,n,o){n=l.castPath(n,e);for(var r=-1,a=n.length,s=!1;++r<a;){var i=l.toKey(n[r]);if(!(s=e!=null&&o(e,i)))break;e=e[i]}return s||++r!=a?s:(a=e==null?0:e.length,!!a&&_.isLength(a)&&_.isIndex(i,a)&&(l.isArray(e)||_.isArguments(e)))}function Kt(e,n){return e!=null&&Ut(e,n,$t)}function Wt(e,n,o,r){if(!l.isObject$1(e))return e;n=l.castPath(n,e);for(var a=-1,s=n.length,i=s-1,u=e;u!=null&&++a<s;){var d=l.toKey(n[a]),f=o;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=i){var g=u[d];f=void 0,f===void 0&&(f=l.isObject$1(g)?g:_.isIndex(n[a+1])?[]:{})}_.assignValue(u,d,f),u=u[d]}return e}function Yt(e,n,o){for(var r=-1,a=n.length,s={};++r<a;){var i=n[r],u=l.baseGet(e,i);o(u,i)&&Wt(s,l.castPath(i,e),u)}return s}function Gt(e,n){return Yt(e,n,function(o,r){return Kt(e,r)})}var jt=Dt(function(e,n){return e==null?{}:Gt(e,n)});const Ee="update:modelValue",Ke="change",We="input";let re;const qt=e=>{var n;if(!l.isClient)return 0;if(re!==void 0)return re;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",o.appendChild(a);const s=a.offsetWidth;return(n=o.parentNode)==null||n.removeChild(o),re=r-s,re},Xt=()=>l.isClient&&/firefox/i.test(window.navigator.userAgent);let M;const Jt={height:"0",visibility:"hidden",overflow:Xt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Zt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Qt(e){const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),a=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Zt.map(i=>[i,n.getPropertyValue(i)]),paddingSize:r,borderSize:a,boxSizing:o}}function Ye(e,n=1,o){var r;M||(M=document.createElement("textarea"),document.body.appendChild(M));const{paddingSize:a,borderSize:s,boxSizing:i,contextStyle:u}=Qt(e);u.forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S)),Object.entries(Jt).forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S,"important")),M.value=e.value||e.placeholder||"";let d=M.scrollHeight;const f={};i==="border-box"?d=d+s:i==="content-box"&&(d=d-a),M.value="";const g=M.scrollHeight-a;if(l.isNumber(n)){let m=g*n;i==="border-box"&&(m=m+a+s),d=Math.max(m,d),f.minHeight=`${m}px`}if(l.isNumber(o)){let m=g*o;i==="border-box"&&(m=m+a+s),d=Math.min(m,d)}return f.height=`${d}px`,(r=M.parentNode)==null||r.removeChild(M),M=void 0,f}const en=l.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),tn=e=>jt(en,e),nn=l.buildProps({id:{type:String,default:void 0},size:l.useSizeProp,disabled:Boolean,modelValue:{type:l.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:l.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:l.iconPropType},prefixIcon:{type:l.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:l.definePropType([Object,Array,String]),default:()=>Nt.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...tn(["ariaLabel"]),inputmode:{type:l.definePropType(String),default:void 0},name:String}),on={[Ee]:e=>l.isString(e),input:e=>l.isString(e),change:e=>l.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},rn=["class","style"],an=/^on[A-Z]/,sn=(e={})=>{const{excludeListeners:n=!1,excludeKeys:o}=e,r=t.computed(()=>((o==null?void 0:o.value)||[]).concat(rn)),a=t.getCurrentInstance();return a?t.computed(()=>{var s;return l.fromPairs(Object.entries((s=a.proxy)==null?void 0:s.$attrs).filter(([i])=>!r.value.includes(i)&&!(n&&an.test(i))))}):(l.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),t.computed(()=>({})))},Ce={prefix:Math.floor(Math.random()*1e4),current:0},ln=Symbol("elIdInjection"),un=()=>t.getCurrentInstance()?t.inject(ln,Ce):Ce,we=e=>{const n=un();!l.isClient&&n===Ce&&l.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
2
|
-
usage: app.provide(ID_INJECTION_KEY, {
|
|
3
|
-
prefix: number,
|
|
4
|
-
current: number,
|
|
5
|
-
})`);const o=l.useGetDerivedNamespace();return l.computedEager(()=>t.unref(e)||`${o.value}-id-${n.prefix}-${n.current++}`)},Be=Symbol("formContextKey"),lt=Symbol("formItemContextKey"),ut=()=>{const e=t.inject(Be,void 0),n=t.inject(lt,void 0);return{form:e,formItem:n}},cn=(e,{formItemContext:n,disableIdGeneration:o,disableIdManagement:r})=>{o||(o=t.ref(!1)),r||(r=t.ref(!1));const a=t.ref();let s;const i=t.computed(()=>{var u;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((u=n.inputIds)==null?void 0:u.length)<=1)});return t.onMounted(()=>{s=t.watch([t.toRef(e,"id"),o],([u,d])=>{const f=u??(d?void 0:we().value);f!==a.value&&(n!=null&&n.removeInputId&&(a.value&&n.removeInputId(a.value),!(r!=null&&r.value)&&!d&&f&&n.addInputId(f)),a.value=f)},{immediate:!0})}),t.onUnmounted(()=>{s&&s(),n!=null&&n.removeInputId&&a.value&&n.removeInputId(a.value)}),{isLabeledByFormItem:i,inputId:a}},ct=e=>{const n=t.getCurrentInstance();return t.computed(()=>{var o,r;return(r=(o=n==null?void 0:n.proxy)==null?void 0:o.$props)==null?void 0:r[e]})},dt=(e,n={})=>{const o=t.ref(void 0),r=n.prop?o:ct("size"),a=n.global?o:l.useGlobalSize(),s=n.form?{size:void 0}:t.inject(Be,void 0),i=n.formItem?{size:void 0}:t.inject(lt,void 0);return t.computed(()=>r.value||t.unref(e)||(i==null?void 0:i.size)||(s==null?void 0:s.size)||a.value||"")},Ne=e=>{const n=ct("disabled"),o=t.inject(Be,void 0);return t.computed(()=>n.value||t.unref(e)||(o==null?void 0:o.disabled)||!1)},dn='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',fn=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Ge=e=>Array.from(e.querySelectorAll(dn)).filter(n=>Ie(n)&&fn(n)),Ie=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}};function pn(e,{disabled:n,beforeFocus:o,afterFocus:r,beforeBlur:a,afterBlur:s}={}){const i=t.getCurrentInstance(),{emit:u}=i,d=t.shallowRef(),f=t.ref(!1),g=y=>{const c=l.isFunction(o)?o(y):!1;t.unref(n)||f.value||c||(f.value=!0,u("focus",y),r==null||r())},m=y=>{var c;const b=l.isFunction(a)?a(y):!1;t.unref(n)||y.relatedTarget&&((c=d.value)!=null&&c.contains(y.relatedTarget))||b||(f.value=!1,u("blur",y),s==null||s())},S=y=>{var c,b;t.unref(n)||Ie(y.target)||(c=d.value)!=null&&c.contains(document.activeElement)&&d.value!==document.activeElement||(b=e.value)==null||b.focus()};return t.watch([d,()=>t.unref(n)],([y,c])=>{y&&(c?y.removeAttribute("tabindex"):y.setAttribute("tabindex","-1"))}),l.useEventListener(d,"focus",g,!0),l.useEventListener(d,"blur",m,!0),l.useEventListener(d,"click",S,!0),process.env.NODE_ENV==="test"&&t.onMounted(()=>{const y=l.isElement(e.value)?e.value:document.querySelector("input,textarea");y&&(l.useEventListener(y,"focus",g,!0),l.useEventListener(y,"blur",m,!0))}),{isFocused:f,wrapperRef:d,handleFocus:g,handleBlur:m}}const vn=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function mn({afterComposition:e,emit:n}){const o=t.ref(!1),r=u=>{n==null||n("compositionstart",u),o.value=!0},a=u=>{var d;n==null||n("compositionupdate",u);const f=(d=u.target)==null?void 0:d.value,g=f[f.length-1]||"";o.value=!vn(g)},s=u=>{n==null||n("compositionend",u),o.value&&(o.value=!1,t.nextTick(()=>e(u)))};return{isComposing:o,handleComposition:u=>{u.type==="compositionend"?s(u):a(u)},handleCompositionStart:r,handleCompositionUpdate:a,handleCompositionEnd:s}}function hn(e){let n;function o(){if(e.value==null)return;const{selectionStart:a,selectionEnd:s,value:i}=e.value;if(a==null||s==null)return;const u=i.slice(0,Math.max(0,a)),d=i.slice(Math.max(0,s));n={selectionStart:a,selectionEnd:s,value:i,beforeTxt:u,afterTxt:d}}function r(){if(e.value==null||n==null)return;const{value:a}=e.value,{beforeTxt:s,afterTxt:i,selectionStart:u}=n;if(s==null||i==null||u==null)return;let d=a.length;if(a.endsWith(i))d=a.length-i.length;else if(a.startsWith(s))d=s.length;else{const f=s[u-1],g=a.indexOf(f,u-1);g!==-1&&(d=g+1)}e.value.setSelectionRange(d,d)}return[o,r]}const ft="ElInput",gn=t.defineComponent({name:ft,inheritAttrs:!1}),bn=t.defineComponent({...gn,props:nn,emits:on,setup(e,{expose:n,emit:o}){const r=e,a=t.useAttrs(),s=sn(),i=t.useSlots(),u=t.computed(()=>[r.type==="textarea"?b.b():c.b(),c.m(S.value),c.is("disabled",y.value),c.is("exceed",bt.value),{[c.b("group")]:i.prepend||i.append,[c.m("prefix")]:i.prefix||r.prefixIcon,[c.m("suffix")]:i.suffix||r.suffixIcon||r.clearable||r.showPassword,[c.bm("suffix","password-clear")]:I.value&&j.value,[c.b("hidden")]:r.type==="hidden"},a.class]),d=t.computed(()=>[c.e("wrapper"),c.is("focus",L.value)]),{form:f,formItem:g}=ut(),{inputId:m}=cn(r,{formItemContext:g}),S=dt(),y=Ne(),c=l.useNamespace("input"),b=l.useNamespace("textarea"),v=t.shallowRef(),h=t.shallowRef(),E=t.ref(!1),T=t.ref(!1),P=t.ref(),V=t.shallowRef(r.inputStyle),R=t.computed(()=>v.value||h.value),{wrapperRef:x,isFocused:L,handleFocus:O,handleBlur:W}=pn(R,{disabled:y,afterBlur(){var p;r.validateEvent&&((p=g==null?void 0:g.validate)==null||p.call(g,"blur").catch(C=>l.debugWarn(C)))}}),H=t.computed(()=>{var p;return(p=f==null?void 0:f.statusIcon)!=null?p:!1}),B=t.computed(()=>(g==null?void 0:g.validateState)||""),ne=t.computed(()=>B.value&&l.ValidateComponentsMap[B.value]),oe=t.computed(()=>T.value?l.view_default:l.hide_default),fe=t.computed(()=>[a.style]),w=t.computed(()=>[r.inputStyle,V.value,{resize:r.resize}]),k=t.computed(()=>it.isNil(r.modelValue)?"":String(r.modelValue)),I=t.computed(()=>r.clearable&&!y.value&&!r.readonly&&!!k.value&&(L.value||E.value)),j=t.computed(()=>r.showPassword&&!y.value&&!!k.value),q=t.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!y.value&&!r.readonly&&!r.showPassword),pe=t.computed(()=>k.value.length),bt=t.computed(()=>!!q.value&&pe.value>Number(r.maxlength)),yt=t.computed(()=>!!i.suffix||!!r.suffixIcon||I.value||r.showPassword||q.value||!!B.value&&H.value),[Ae,Ve]=hn(v);l.useResizeObserver(h,p=>{if(Et(),!q.value||r.resize!=="both")return;const C=p[0],{width:X}=C.contentRect;P.value={right:`calc(100% - ${X+15+6}px)`}});const Q=()=>{const{type:p,autosize:C}=r;if(!(!l.isClient||p!=="textarea"||!h.value))if(C){const X=l.isObject(C)?C.minRows:void 0,He=l.isObject(C)?C.maxRows:void 0,De=Ye(h.value,X,He);V.value={overflowY:"hidden",...De},t.nextTick(()=>{h.value.offsetHeight,V.value=De})}else V.value={minHeight:Ye(h.value).minHeight}},Et=(p=>{let C=!1;return()=>{var X;if(C||!r.autosize)return;((X=h.value)==null?void 0:X.offsetParent)===null||(p(),C=!0)}})(Q),ee=()=>{const p=R.value,C=r.formatter?r.formatter(k.value):k.value;!p||p.value===C||(p.value=C)},ve=async p=>{Ae();let{value:C}=p.target;if(r.formatter&&r.parser&&(C=r.parser(C)),!Le.value){if(C===k.value){ee();return}o(Ee,C),o(We,C),await t.nextTick(),ee(),Ve()}},Re=p=>{let{value:C}=p.target;r.formatter&&r.parser&&(C=r.parser(C)),o(Ke,C)},{isComposing:Le,handleCompositionStart:Pe,handleCompositionUpdate:ze,handleCompositionEnd:Oe}=mn({emit:o,afterComposition:ve}),Ct=()=>{Ae(),T.value=!T.value,setTimeout(Ve)},wt=()=>{var p;return(p=R.value)==null?void 0:p.focus()},St=()=>{var p;return(p=R.value)==null?void 0:p.blur()},kt=p=>{E.value=!1,o("mouseleave",p)},Tt=p=>{E.value=!0,o("mouseenter",p)},Fe=p=>{o("keydown",p)},Bt=()=>{var p;(p=R.value)==null||p.select()},_e=()=>{o(Ee,""),o(Ke,""),o("clear"),o(We,"")};return t.watch(()=>r.modelValue,()=>{var p;t.nextTick(()=>Q()),r.validateEvent&&((p=g==null?void 0:g.validate)==null||p.call(g,"change").catch(C=>l.debugWarn(C)))}),t.watch(k,()=>ee()),t.watch(()=>r.type,async()=>{await t.nextTick(),ee(),Q()}),t.onMounted(()=>{!r.formatter&&r.parser&&l.debugWarn(ft,"If you set the parser, you also need to set the formatter."),ee(),t.nextTick(Q)}),n({input:v,textarea:h,ref:R,textareaStyle:w,autosize:t.toRef(r,"autosize"),isComposing:Le,focus:wt,blur:St,select:Bt,clear:_e,resizeTextarea:Q}),(p,C)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(u),{[t.unref(c).bm("group","append")]:p.$slots.append,[t.unref(c).bm("group","prepend")]:p.$slots.prepend}]),style:t.normalizeStyle(t.unref(fe)),onMouseenter:Tt,onMouseleave:kt},[t.createCommentVNode(" input "),p.type!=="textarea"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createCommentVNode(" prepend slot "),p.$slots.prepend?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(c).be("group","prepend"))},[t.renderSlot(p.$slots,"prepend")],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{ref_key:"wrapperRef",ref:x,class:t.normalizeClass(t.unref(d))},[t.createCommentVNode(" prefix slot "),p.$slots.prefix||p.prefixIcon?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(t.unref(c).e("prefix"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).e("prefix-inner"))},[t.renderSlot(p.$slots,"prefix"),p.prefixIcon?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:0,class:t.normalizeClass(t.unref(c).e("icon"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.prefixIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("input",t.mergeProps({id:t.unref(m),ref_key:"input",ref:v,class:t.unref(c).e("inner")},t.unref(s),{name:p.name,minlength:p.minlength,maxlength:p.maxlength,type:p.showPassword?T.value?"text":"password":p.type,disabled:t.unref(y),readonly:p.readonly,autocomplete:p.autocomplete,tabindex:p.tabindex,"aria-label":p.ariaLabel,placeholder:p.placeholder,style:p.inputStyle,form:p.form,autofocus:p.autofocus,role:p.containerRole,inputmode:p.inputmode,onCompositionstart:t.unref(Pe),onCompositionupdate:t.unref(ze),onCompositionend:t.unref(Oe),onInput:ve,onChange:Re,onKeydown:Fe}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),t.createCommentVNode(" suffix slot "),t.unref(yt)?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(t.unref(c).e("suffix"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).e("suffix-inner"))},[!t.unref(I)||!t.unref(j)||!t.unref(q)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(p.$slots,"suffix"),p.suffixIcon?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:0,class:t.normalizeClass(t.unref(c).e("icon"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.suffixIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],64)):t.createCommentVNode("v-if",!0),t.unref(I)?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:1,class:t.normalizeClass([t.unref(c).e("icon"),t.unref(c).e("clear")]),onMousedown:t.withModifiers(t.unref(l.NOOP),["prevent"]),onClick:_e},{default:t.withCtx(()=>[t.createVNode(t.unref(l.circle_close_default))]),_:1},8,["class","onMousedown"])):t.createCommentVNode("v-if",!0),t.unref(j)?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:2,class:t.normalizeClass([t.unref(c).e("icon"),t.unref(c).e("password")]),onClick:Ct},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(oe))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.unref(q)?(t.openBlock(),t.createElementBlock("span",{key:3,class:t.normalizeClass(t.unref(c).e("count"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).e("count-inner"))},t.toDisplayString(t.unref(pe))+" / "+t.toDisplayString(p.maxlength),3)],2)):t.createCommentVNode("v-if",!0),t.unref(B)&&t.unref(ne)&&t.unref(H)?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:4,class:t.normalizeClass([t.unref(c).e("icon"),t.unref(c).e("validateIcon"),t.unref(c).is("loading",t.unref(B)==="validating")])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ne))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],2)):t.createCommentVNode("v-if",!0)],2),t.createCommentVNode(" append slot "),p.$slots.append?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(t.unref(c).be("group","append"))},[t.renderSlot(p.$slots,"append")],2)):t.createCommentVNode("v-if",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" textarea "),t.createElementVNode("textarea",t.mergeProps({id:t.unref(m),ref_key:"textarea",ref:h,class:[t.unref(b).e("inner"),t.unref(c).is("focus",t.unref(L))]},t.unref(s),{minlength:p.minlength,maxlength:p.maxlength,tabindex:p.tabindex,disabled:t.unref(y),readonly:p.readonly,autocomplete:p.autocomplete,style:t.unref(w),"aria-label":p.ariaLabel,placeholder:p.placeholder,form:p.form,autofocus:p.autofocus,rows:p.rows,role:p.containerRole,onCompositionstart:t.unref(Pe),onCompositionupdate:t.unref(ze),onCompositionend:t.unref(Oe),onInput:ve,onFocus:t.unref(O),onBlur:t.unref(W),onChange:Re,onKeydown:Fe}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),t.unref(q)?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(P.value),class:t.normalizeClass(t.unref(c).e("count"))},t.toDisplayString(t.unref(pe))+" / "+t.toDisplayString(p.maxlength),7)):t.createCommentVNode("v-if",!0)],64))],38))}});var yn=l._export_sfc(bn,[["__file","input.vue"]]);const En=l.withInstall(yn),me="focus-trap.focus-after-trapped",he="focus-trap.focus-after-released",Cn="focus-trap.focusout-prevented",je={cancelable:!0,bubbles:!1},wn={cancelable:!0,bubbles:!1},qe="focusAfterTrapped",Xe="focusAfterReleased",Sn=Symbol("elFocusTrap"),xe=t.ref(),de=t.ref(0),Me=t.ref(0);let ae=0;const pt=e=>{const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n},Je=(e,n)=>{for(const o of e)if(!kn(o,n))return o},kn=(e,n)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Tn=e=>{const n=pt(e),o=Je(n,e),r=Je(n.reverse(),e);return[o,r]},Bn=e=>e instanceof HTMLInputElement&&"select"in e,$=(e,n)=>{if(e&&e.focus){const o=document.activeElement;let r=!1;l.isElement(e)&&!Ie(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),Me.value=window.performance.now(),e!==o&&Bn(e)&&n&&e.select(),l.isElement(e)&&r&&e.removeAttribute("tabindex")}};function Ze(e,n){const o=[...e],r=e.indexOf(n);return r!==-1&&o.splice(r,1),o}const Nn=()=>{let e=[];return{push:r=>{const a=e[0];a&&r!==a&&a.pause(),e=Ze(e,r),e.unshift(r)},remove:r=>{var a,s;e=Ze(e,r),(s=(a=e[0])==null?void 0:a.resume)==null||s.call(a)}}},In=(e,n=!1)=>{const o=document.activeElement;for(const r of e)if($(r,n),document.activeElement!==o)return},Qe=Nn(),xn=()=>de.value>Me.value,se=()=>{xe.value="pointer",de.value=window.performance.now()},et=()=>{xe.value="keyboard",de.value=window.performance.now()},Mn=()=>(t.onMounted(()=>{ae===0&&(document.addEventListener("mousedown",se),document.addEventListener("touchstart",se),document.addEventListener("keydown",et)),ae++}),t.onBeforeUnmount(()=>{ae--,ae<=0&&(document.removeEventListener("mousedown",se),document.removeEventListener("touchstart",se),document.removeEventListener("keydown",et))}),{focusReason:xe,lastUserFocusTimestamp:de,lastAutomatedFocusTimestamp:Me}),ie=e=>new CustomEvent(Cn,{...wn,detail:e});let J=[];const tt=e=>{e.code===l.EVENT_CODE.esc&&J.forEach(n=>n(e))},An=e=>{t.onMounted(()=>{J.length===0&&document.addEventListener("keydown",tt),l.isClient&&J.push(e)}),t.onBeforeUnmount(()=>{J=J.filter(n=>n!==e),J.length===0&&l.isClient&&document.removeEventListener("keydown",tt)})},Vn=t.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[qe,Xe,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const o=t.ref();let r,a;const{focusReason:s}=Mn();An(c=>{e.trapped&&!i.paused&&n("release-requested",c)});const i={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},u=c=>{if(!e.loop&&!e.trapped||i.paused)return;const{code:b,altKey:v,ctrlKey:h,metaKey:E,currentTarget:T,shiftKey:P}=c,{loop:V}=e,R=b===l.EVENT_CODE.tab&&!v&&!h&&!E,x=document.activeElement;if(R&&x){const L=T,[O,W]=Tn(L);if(O&&W){if(!P&&x===W){const B=ie({focusReason:s.value});n("focusout-prevented",B),B.defaultPrevented||(c.preventDefault(),V&&$(O,!0))}else if(P&&[O,L].includes(x)){const B=ie({focusReason:s.value});n("focusout-prevented",B),B.defaultPrevented||(c.preventDefault(),V&&$(W,!0))}}else if(x===L){const B=ie({focusReason:s.value});n("focusout-prevented",B),B.defaultPrevented||c.preventDefault()}}};t.provide(Sn,{focusTrapRef:o,onKeydown:u}),t.watch(()=>e.focusTrapEl,c=>{c&&(o.value=c)},{immediate:!0}),t.watch([o],([c],[b])=>{c&&(c.addEventListener("keydown",u),c.addEventListener("focusin",g),c.addEventListener("focusout",m)),b&&(b.removeEventListener("keydown",u),b.removeEventListener("focusin",g),b.removeEventListener("focusout",m))});const d=c=>{n(qe,c)},f=c=>n(Xe,c),g=c=>{const b=t.unref(o);if(!b)return;const v=c.target,h=c.relatedTarget,E=v&&b.contains(v);e.trapped||h&&b.contains(h)||(r=h),E&&n("focusin",c),!i.paused&&e.trapped&&(E?a=v:$(a,!0))},m=c=>{const b=t.unref(o);if(!(i.paused||!b))if(e.trapped){const v=c.relatedTarget;!it.isNil(v)&&!b.contains(v)&&setTimeout(()=>{if(!i.paused&&e.trapped){const h=ie({focusReason:s.value});n("focusout-prevented",h),h.defaultPrevented||$(a,!0)}},0)}else{const v=c.target;v&&b.contains(v)||n("focusout",c)}};async function S(){await t.nextTick();const c=t.unref(o);if(c){Qe.push(i);const b=c.contains(document.activeElement)?r:document.activeElement;if(r=b,!c.contains(b)){const h=new Event(me,je);c.addEventListener(me,d),c.dispatchEvent(h),h.defaultPrevented||t.nextTick(()=>{let E=e.focusStartEl;l.isString(E)||($(E),document.activeElement!==E&&(E="first")),E==="first"&&In(pt(c),!0),(document.activeElement===b||E==="container")&&$(c)})}}}function y(){const c=t.unref(o);if(c){c.removeEventListener(me,d);const b=new CustomEvent(he,{...je,detail:{focusReason:s.value}});c.addEventListener(he,f),c.dispatchEvent(b),!b.defaultPrevented&&(s.value=="keyboard"||!xn()||c.contains(document.activeElement))&&$(r??document.body),c.removeEventListener(he,f),Qe.remove(i)}}return t.onMounted(()=>{e.trapped&&S(),t.watch(()=>e.trapped,c=>{c?S():y()})}),t.onBeforeUnmount(()=>{e.trapped&&y(),o.value&&(o.value.removeEventListener("keydown",u),o.value.removeEventListener("focusin",g),o.value.removeEventListener("focusout",m),o.value=void 0)}),{onKeydown:u}}});function Rn(e,n,o,r,a,s){return t.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ln=l._export_sfc(Vn,[["render",Rn],["__file","focus-trap.vue"]]);const vt=Symbol("buttonGroupContextKey"),Pn=({from:e,replacement:n,scope:o,version:r,ref:a,type:s="API"},i)=>{t.watch(()=>t.unref(i),u=>{u&&l.debugWarn(o,`[${s}] ${e} is about to be deprecated in version ${r}, please use ${n} instead.
|
|
6
|
-
For more detail, please visit: ${a}
|
|
7
|
-
`)},{immediate:!0})},zn=(e,n)=>{Pn({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},t.computed(()=>e.type==="text"));const o=t.inject(vt,void 0),r=l.useGlobalConfig("button"),{form:a}=ut(),s=dt(t.computed(()=>o==null?void 0:o.size)),i=Ne(),u=t.ref(),d=t.useSlots(),f=t.computed(()=>{var v;return e.type||(o==null?void 0:o.type)||((v=r.value)==null?void 0:v.type)||""}),g=t.computed(()=>{var v,h,E;return(E=(h=e.autoInsertSpace)!=null?h:(v=r.value)==null?void 0:v.autoInsertSpace)!=null?E:!1}),m=t.computed(()=>{var v,h,E;return(E=(h=e.plain)!=null?h:(v=r.value)==null?void 0:v.plain)!=null?E:!1}),S=t.computed(()=>{var v,h,E;return(E=(h=e.round)!=null?h:(v=r.value)==null?void 0:v.round)!=null?E:!1}),y=t.computed(()=>e.tag==="button"?{ariaDisabled:i.value||e.loading,disabled:i.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),c=t.computed(()=>{var v;const h=(v=d.default)==null?void 0:v.call(d);if(g.value&&(h==null?void 0:h.length)===1){const E=h[0];if((E==null?void 0:E.type)===t.Text){const T=E.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(T.trim())}}return!1});return{_disabled:i,_size:s,_type:f,_ref:u,_props:y,_plain:m,_round:S,shouldAddSpace:c,handleClick:v=>{if(i.value||e.loading){v.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),n("click",v)}}},On=["default","primary","success","warning","info","danger","text",""],Fn=["button","submit","reset"],Se=l.buildProps({size:l.useSizeProp,disabled:Boolean,type:{type:String,values:On,default:""},icon:{type:l.iconPropType},nativeType:{type:String,values:Fn,default:"button"},loading:Boolean,loadingIcon:{type:l.iconPropType,default:()=>l.loading_default},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:l.definePropType([String,Object]),default:"button"}}),_n={click:e=>e instanceof MouseEvent};function N(e,n){Hn(e)&&(e="100%");var o=Dn(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function le(e){return Math.min(1,Math.max(0,e))}function Hn(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Dn(e){return typeof e=="string"&&e.indexOf("%")!==-1}function mt(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ue(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Y(e){return e.length===1?"0"+e:String(e)}function $n(e,n,o){return{r:N(e,255)*255,g:N(n,255)*255,b:N(o,255)*255}}function nt(e,n,o){e=N(e,255),n=N(n,255),o=N(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),s=0,i=0,u=(r+a)/2;if(r===a)i=0,s=0;else{var d=r-a;switch(i=u>.5?d/(2-r-a):d/(r+a),r){case e:s=(n-o)/d+(n<o?6:0);break;case n:s=(o-e)/d+2;break;case o:s=(e-n)/d+4;break}s/=6}return{h:s,s:i,l:u}}function ge(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*(6*o):o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function Un(e,n,o){var r,a,s;if(e=N(e,360),n=N(n,100),o=N(o,100),n===0)a=o,s=o,r=o;else{var i=o<.5?o*(1+n):o+n-o*n,u=2*o-i;r=ge(u,i,e+1/3),a=ge(u,i,e),s=ge(u,i,e-1/3)}return{r:r*255,g:a*255,b:s*255}}function ot(e,n,o){e=N(e,255),n=N(n,255),o=N(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),s=0,i=r,u=r-a,d=r===0?0:u/r;if(r===a)s=0;else{switch(r){case e:s=(n-o)/u+(n<o?6:0);break;case n:s=(o-e)/u+2;break;case o:s=(e-n)/u+4;break}s/=6}return{h:s,s:d,v:i}}function Kn(e,n,o){e=N(e,360)*6,n=N(n,100),o=N(o,100);var r=Math.floor(e),a=e-r,s=o*(1-n),i=o*(1-a*n),u=o*(1-(1-a)*n),d=r%6,f=[o,i,s,s,u,o][d],g=[u,o,o,i,s,s][d],m=[s,s,u,o,o,i][d];return{r:f*255,g:g*255,b:m*255}}function rt(e,n,o,r){var a=[Y(Math.round(e).toString(16)),Y(Math.round(n).toString(16)),Y(Math.round(o).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Wn(e,n,o,r,a){var s=[Y(Math.round(e).toString(16)),Y(Math.round(n).toString(16)),Y(Math.round(o).toString(16)),Y(Yn(r))];return a&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Yn(e){return Math.round(parseFloat(e)*255).toString(16)}function at(e){return A(e)/255}function A(e){return parseInt(e,16)}function Gn(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ke={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function jn(e){var n={r:0,g:0,b:0},o=1,r=null,a=null,s=null,i=!1,u=!1;return typeof e=="string"&&(e=Jn(e)),typeof e=="object"&&(F(e.r)&&F(e.g)&&F(e.b)?(n=$n(e.r,e.g,e.b),i=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):F(e.h)&&F(e.s)&&F(e.v)?(r=ue(e.s),a=ue(e.v),n=Kn(e.h,r,a),i=!0,u="hsv"):F(e.h)&&F(e.s)&&F(e.l)&&(r=ue(e.s),s=ue(e.l),n=Un(e.h,r,s),i=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=mt(o),{ok:i,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var qn="[-\\+]?\\d+%?",Xn="[-\\+]?\\d*\\.\\d+%?",K="(?:".concat(Xn,")|(?:").concat(qn,")"),be="[\\s|\\(]+(".concat(K,")[,|\\s]+(").concat(K,")[,|\\s]+(").concat(K,")\\s*\\)?"),ye="[\\s|\\(]+(".concat(K,")[,|\\s]+(").concat(K,")[,|\\s]+(").concat(K,")[,|\\s]+(").concat(K,")\\s*\\)?"),z={CSS_UNIT:new RegExp(K),rgb:new RegExp("rgb"+be),rgba:new RegExp("rgba"+ye),hsl:new RegExp("hsl"+be),hsla:new RegExp("hsla"+ye),hsv:new RegExp("hsv"+be),hsva:new RegExp("hsva"+ye),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Jn(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(ke[e])e=ke[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=z.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=z.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=z.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=z.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=z.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=z.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=z.hex8.exec(e),o?{r:A(o[1]),g:A(o[2]),b:A(o[3]),a:at(o[4]),format:n?"name":"hex8"}:(o=z.hex6.exec(e),o?{r:A(o[1]),g:A(o[2]),b:A(o[3]),format:n?"name":"hex"}:(o=z.hex4.exec(e),o?{r:A(o[1]+o[1]),g:A(o[2]+o[2]),b:A(o[3]+o[3]),a:at(o[4]+o[4]),format:n?"name":"hex8"}:(o=z.hex3.exec(e),o?{r:A(o[1]+o[1]),g:A(o[2]+o[2]),b:A(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function F(e){return!!z.CSS_UNIT.exec(String(e))}var Zn=function(){function e(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=Gn(n)),this.originalInput=n;var a=jn(n);this.originalInput=n,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),o,r,a,s=n.r/255,i=n.g/255,u=n.b/255;return s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),u<=.03928?a=u/12.92:a=Math.pow((u+.055)/1.055,2.4),.2126*o+.7152*r+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=mt(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=ot(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=ot(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=nt(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=nt(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),rt(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),Wn(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(N(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(N(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+rt(this.r,this.g,this.b,!1),o=0,r=Object.entries(ke);o<r.length;o++){var a=r[o],s=a[0],i=a[1];if(n===i)return s}return!1},e.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,a=this.a<1&&this.a>=0,s=!o&&a&&(n.startsWith("hex")||n==="name");return s?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=le(o.l),new e(o)},e.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new e(o)},e.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=le(o.l),new e(o)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=le(o.s),new e(o)},e.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=le(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),a=new e(n).toRgb(),s=o/100,i={r:(a.r-r.r)*s+r.r,g:(a.g-r.g)*s+r.g,b:(a.b-r.b)*s+r.b,a:(a.a-r.a)*s+r.a};return new e(i)},e.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),a=360/o,s=[this];for(r.h=(r.h-(a*n>>1)+720)%360;--n;)r.h=(r.h+a)%360,s.push(new e(r));return s},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,a=o.s,s=o.v,i=[],u=1/n;n--;)i.push(new e({h:r,s:a,v:s})),s=(s+u)%1;return i},e.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new e({h:(o+72)%360,s:n.s,l:n.l}),new e({h:(o+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var o=this.toRgb(),r=new e(n).toRgb(),a=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/a,g:(o.g*o.a+r.g*r.a*(1-o.a))/a,b:(o.b*o.a+r.b*r.a*(1-o.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,a=[this],s=360/n,i=1;i<n;i++)a.push(new e({h:(r+i*s)%360,s:o.s,l:o.l}));return a},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function D(e,n=20){return e.mix("#141414",n).toString()}function Qn(e){const n=Ne(),o=l.useNamespace("button");return t.computed(()=>{let r={},a=e.color;if(a){const s=a.match(/var\((.*?)\)/);s&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const i=new Zn(a),u=e.dark?i.tint(20).toString():D(i,20);if(e.plain)r=o.cssVarBlock({"bg-color":e.dark?D(i,90):i.tint(90).toString(),"text-color":a,"border-color":e.dark?D(i,50):i.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":u,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":u}),n.value&&(r[o.cssVarBlockName("disabled-bg-color")]=e.dark?D(i,90):i.tint(90).toString(),r[o.cssVarBlockName("disabled-text-color")]=e.dark?D(i,50):i.tint(50).toString(),r[o.cssVarBlockName("disabled-border-color")]=e.dark?D(i,80):i.tint(80).toString());else{const d=e.dark?D(i,30):i.tint(30).toString(),f=i.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(r=o.cssVarBlock({"bg-color":a,"text-color":f,"border-color":a,"hover-bg-color":d,"hover-text-color":f,"hover-border-color":d,"active-bg-color":u,"active-border-color":u}),n.value){const g=e.dark?D(i,50):i.tint(50).toString();r[o.cssVarBlockName("disabled-bg-color")]=g,r[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,r[o.cssVarBlockName("disabled-border-color")]=g}}}return r})}const eo=t.defineComponent({name:"ElButton"}),to=t.defineComponent({...eo,props:Se,emits:_n,setup(e,{expose:n,emit:o}){const r=e,a=Qn(r),s=l.useNamespace("button"),{_ref:i,_size:u,_type:d,_disabled:f,_props:g,_plain:m,_round:S,shouldAddSpace:y,handleClick:c}=zn(r,o),b=t.computed(()=>[s.b(),s.m(d.value),s.m(u.value),s.is("disabled",f.value),s.is("loading",r.loading),s.is("plain",m.value),s.is("round",S.value),s.is("circle",r.circle),s.is("text",r.text),s.is("link",r.link),s.is("has-bg",r.bg)]);return n({ref:i,size:u,type:d,disabled:f,shouldAddSpace:y}),(v,h)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.tag),t.mergeProps({ref_key:"_ref",ref:i},t.unref(g),{class:t.unref(b),style:t.unref(a),onClick:t.unref(c)}),{default:t.withCtx(()=>[v.loading?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[v.$slots.loading?t.renderSlot(v.$slots,"loading",{key:0}):(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:1,class:t.normalizeClass(t.unref(s).is("loading"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.loadingIcon)))]),_:1},8,["class"]))],64)):v.icon||v.$slots.icon?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:1},{default:t.withCtx(()=>[v.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.icon),{key:0})):t.renderSlot(v.$slots,"icon",{key:1})]),_:3})):t.createCommentVNode("v-if",!0),v.$slots.default?(t.openBlock(),t.createElementBlock("span",{key:2,class:t.normalizeClass({[t.unref(s).em("text","expand")]:t.unref(y)})},[t.renderSlot(v.$slots,"default")],2)):t.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var no=l._export_sfc(to,[["__file","button.vue"]]);const oo={size:Se.size,type:Se.type},ro=t.defineComponent({name:"ElButtonGroup"}),ao=t.defineComponent({...ro,props:oo,setup(e){const n=e;t.provide(vt,t.reactive({size:t.toRef(n,"size"),type:t.toRef(n,"type")}));const o=l.useNamespace("button");return(r,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(o).b("group"))},[t.renderSlot(r.$slots,"default")],2))}});var ht=l._export_sfc(ao,[["__file","button-group.vue"]]);const so=l.withInstall(no,{ButtonGroup:ht});l.withNoopInstall(ht);var ce=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(ce||{});const gt=e=>{if(!e)return{onClick:l.NOOP,onMousedown:l.NOOP,onMouseup:l.NOOP};let n=!1,o=!1;return{onClick:i=>{n&&o&&e(i),n=o=!1},onMousedown:i=>{n=i.target===i.currentTarget},onMouseup:i=>{o=i.target===i.currentTarget}}},io=l.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:l.definePropType([String,Array,Object])},zIndex:{type:l.definePropType([String,Number])}}),lo={click:e=>e instanceof MouseEvent},uo="overlay";var co=t.defineComponent({name:"ElOverlay",props:io,emits:lo,setup(e,{slots:n,emit:o}){const r=l.useNamespace(uo),a=d=>{o("click",d)},{onClick:s,onMousedown:i,onMouseup:u}=gt(e.customMaskEvent?void 0:a);return()=>e.mask?t.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:i,onMouseup:u},[t.renderSlot(n,"default")],ce.STYLE|ce.CLASS|ce.PROPS,["onClick","onMouseup","onMousedown"]):t.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[t.renderSlot(n,"default")])}});const fo=co,po=(e,n,o,r)=>{const a={offsetX:0,offsetY:0},s=(m,S)=>{if(e.value){const{offsetX:y,offsetY:c}=a,b=e.value.getBoundingClientRect(),v=b.left,h=b.top,E=b.width,T=b.height,P=document.documentElement.clientWidth,V=document.documentElement.clientHeight,R=-v+y,x=-h+c,L=P-v-E+y,O=V-h-(T<V?T:0)+c;r!=null&&r.value||(m=Math.min(Math.max(m,R),L),S=Math.min(Math.max(S,x),O)),a.offsetX=m,a.offsetY=S,e.value.style.transform=`translate(${l.addUnit(m)}, ${l.addUnit(S)})`}},i=m=>{const S=m.clientX,y=m.clientY,{offsetX:c,offsetY:b}=a,v=E=>{const T=c+E.clientX-S,P=b+E.clientY-y;s(T,P)},h=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",h)},u=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",i),window.addEventListener("resize",g))},d=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",i),window.removeEventListener("resize",g))},f=()=>{a.offsetX=0,a.offsetY=0,e.value&&(e.value.style.transform="")},g=()=>{const{offsetX:m,offsetY:S}=a;s(m,S)};return t.onMounted(()=>{t.watchEffect(()=>{o.value?u():d()})}),t.onBeforeUnmount(()=>{d()}),{resetPosition:f,updatePosition:g}},vo=(e,n={})=>{t.isRef(e)||l.throwError("[useLockscreen]","You need to pass a ref param to this function");const o=n.ns||l.useNamespace("popup"),r=t.computed(()=>o.bm("parent","hidden"));if(!l.isClient||l.hasClass(document.body,r.value))return;let a=0,s=!1,i="0";const u=()=>{setTimeout(()=>{typeof document>"u"||s&&document&&(document.body.style.width=i,l.removeClass(document.body,r.value))},200)};t.watch(e,d=>{if(!d){u();return}s=!l.hasClass(document.body,r.value),s&&(i=document.body.style.width,l.addClass(document.body,r.value)),a=qt(o.namespace.value);const f=document.documentElement.clientHeight<document.body.scrollHeight,g=l.getStyle(document.body,"overflowY");a>0&&(f||g==="scroll")&&s&&(document.body.style.width=`calc(100% - ${a}px)`)}),t.onScopeDispose(()=>u())},mo=e=>["",...l.componentSizes].includes(e),Te="_trap-focus-children",G=[],st=e=>{var n;if(G.length===0)return;const o=G[G.length-1][Te];if(o.length>0&&e.code===l.EVENT_CODE.tab){if(o.length===1){e.preventDefault(),document.activeElement!==o[0]&&o[0].focus();return}const r=e.shiftKey,a=e.target===o[0],s=e.target===o[o.length-1];if(a&&r&&(e.preventDefault(),o[o.length-1].focus()),s&&!r&&(e.preventDefault(),o[0].focus()),process.env.NODE_ENV==="test"){const i=o.indexOf(e.target);i!==-1&&((n=o[r?i-1:i+1])==null||n.focus())}}},ho={beforeMount(e){e[Te]=Ge(e),G.push(e),G.length<=1&&document.addEventListener("keydown",st)},updated(e){t.nextTick(()=>{e[Te]=Ge(e)})},unmounted(){G.shift(),G.length===0&&document.removeEventListener("keydown",st)}},go=t.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ho},components:{ElButton:so,ElFocusTrap:Ln,ElInput:En,ElOverlay:fo,ElIcon:l.ElIcon,...l.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:mo},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{locale:o,zIndex:r,ns:a,size:s}=l.useGlobalComponentSettings("message-box",t.computed(()=>e.buttonSize)),{t:i}=o,{nextZIndex:u}=r,d=t.ref(!1),f=t.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:t.markRaw(l.loading_default),cancelButtonLoadingIcon:t.markRaw(l.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:u()}),g=t.computed(()=>{const w=f.type;return{[a.bm("icon",w)]:w&&l.TypeComponentsMap[w]}}),m=we(),S=we(),y=t.computed(()=>{const w=f.type;return f.icon||w&&l.TypeComponentsMap[w]||""}),c=t.computed(()=>!!f.message),b=t.ref(),v=t.ref(),h=t.ref(),E=t.ref(),T=t.ref(),P=t.computed(()=>f.confirmButtonClass);t.watch(()=>f.inputValue,async w=>{await t.nextTick(),e.boxType==="prompt"&&w&&B()},{immediate:!0}),t.watch(()=>d.value,w=>{var k,I;w&&(e.boxType!=="prompt"&&(f.autofocus?h.value=(I=(k=T.value)==null?void 0:k.$el)!=null?I:b.value:h.value=b.value),f.zIndex=u()),e.boxType==="prompt"&&(w?t.nextTick().then(()=>{var j;E.value&&E.value.$el&&(f.autofocus?h.value=(j=ne())!=null?j:b.value:h.value=b.value)}):(f.editorErrorMessage="",f.validateError=!1))});const V=t.computed(()=>e.draggable),R=t.computed(()=>e.overflow);po(b,v,V,R),t.onMounted(async()=>{await t.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",x)}),t.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",x)});function x(){d.value&&(d.value=!1,t.nextTick(()=>{f.action&&n("action",f.action)}))}const L=()=>{e.closeOnClickModal&&H(f.distinguishCancelAndClose?"close":"cancel")},O=gt(L),W=w=>{if(f.inputType!=="textarea")return w.preventDefault(),H("confirm")},H=w=>{var k;e.boxType==="prompt"&&w==="confirm"&&!B()||(f.action=w,f.beforeClose?(k=f.beforeClose)==null||k.call(f,w,f,x):x())},B=()=>{if(e.boxType==="prompt"){const w=f.inputPattern;if(w&&!w.test(f.inputValue||""))return f.editorErrorMessage=f.inputErrorMessage||i("el.messagebox.error"),f.validateError=!0,!1;const k=f.inputValidator;if(l.isFunction(k)){const I=k(f.inputValue);if(I===!1)return f.editorErrorMessage=f.inputErrorMessage||i("el.messagebox.error"),f.validateError=!0,!1;if(l.isString(I))return f.editorErrorMessage=I,f.validateError=!0,!1}}return f.editorErrorMessage="",f.validateError=!1,!0},ne=()=>{var w,k;const I=(w=E.value)==null?void 0:w.$refs;return(k=I==null?void 0:I.input)!=null?k:I==null?void 0:I.textarea},oe=()=>{H("close")},fe=()=>{e.closeOnPressEscape&&oe()};return e.lockScroll&&vo(d),{...t.toRefs(f),ns:a,overlayEvent:O,visible:d,hasMessage:c,typeClass:g,contentId:m,inputId:S,btnSize:s,iconComponent:y,confirmButtonClasses:P,rootRef:b,focusStartRef:h,headerRef:v,inputRef:E,confirmRef:T,doClose:x,handleClose:oe,onCloseRequested:fe,handleWrapperClick:L,handleInputEnter:W,handleAction:H,t:i}}});function bo(e,n,o,r,a,s){const i=t.resolveComponent("el-icon"),u=t.resolveComponent("el-input"),d=t.resolveComponent("el-button"),f=t.resolveComponent("el-focus-trap"),g=t.resolveComponent("el-overlay");return t.openBlock(),t.createBlock(t.Transition,{name:"fade-in-linear",onAfterLeave:m=>e.$emit("vanish"),persisted:""},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(g,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:t.withCtx(()=>[t.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:t.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[t.createVNode(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"rootRef",class:t.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:t.normalizeStyle(e.customStyle),tabindex:"-1",onClick:t.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"headerRef",class:t.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(t.openBlock(),t.createBlock(i,{key:0,class:t.normalizeClass([e.ns.e("status"),e.typeClass])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",null,t.toDisplayString(e.title),1)],2),e.showClose?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:t.withKeys(t.withModifiers(m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[t.createVNode(i,{class:t.normalizeClass(e.ns.e("close"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):t.createCommentVNode("v-if",!0)],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{id:e.contentId,class:t.normalizeClass(e.ns.e("content"))},[t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(t.openBlock(),t.createBlock(i,{key:0,class:t.normalizeClass([e.ns.e("status"),e.typeClass])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),e.hasMessage?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.ns.e("message"))},[t.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):t.createCommentVNode("v-if",!0)],2),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("input"))},[t.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":m=>e.inputValue=m,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:t.normalizeClass({invalid:e.validateError}),onKeydown:t.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("errormsg")),style:t.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},t.toDisplayString(e.editorErrorMessage),7)],2),[[t.vShow,e.showInput]])],10,["id"]),t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(t.openBlock(),t.createBlock(d,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:t.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:m=>e.handleAction("cancel"),onKeydown:t.withKeys(t.withModifiers(m=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode(d,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:t.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:m=>e.handleAction("confirm"),onKeydown:t.withKeys(t.withModifiers(m=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[t.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[t.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var yo=l._export_sfc(go,[["render",bo],["__file","index.vue"]]);const te=new Map,Eo=e=>{let n=document.body;return e.appendTo&&(l.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),l.isElement(e.appendTo)&&(n=e.appendTo),l.isElement(n)||(l.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},Co=(e,n,o=null)=>{const r=t.createVNode(yo,e,l.isFunction(e.message)||t.isVNode(e.message)?{default:l.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=o,t.render(r,n),Eo(e).appendChild(n.firstElementChild),r.component},wo=()=>document.createElement("div"),So=(e,n)=>{const o=wo();e.onVanish=()=>{t.render(null,o),te.delete(a)},e.onAction=s=>{const i=te.get(a);let u;e.showInput?u={value:a.inputValue,action:s}:u=s,e.callback?e.callback(u,r.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?i.reject("close"):i.reject("cancel"):i.resolve(u)};const r=Co(e,o,n),a=r.proxy;for(const s in e)l.hasOwn(e,s)&&!l.hasOwn(a.$props,s)&&(s==="closeIcon"&&l.isObject(e[s])?a[s]=t.markRaw(e[s]):a[s]=e[s]);return a.visible=!0,a};function Z(e,n=null){if(!l.isClient)return Promise.reject();let o;return l.isString(e)||t.isVNode(e)?e={message:e}:o=e.callback,new Promise((r,a)=>{const s=So(e,n??Z._context);te.set(s,{options:e,callback:o,resolve:r,reject:a})})}const ko=["alert","confirm","prompt"],To={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ko.forEach(e=>{Z[e]=Bo(e)});function Bo(e){return(n,o,r,a)=>{let s="";return l.isObject(o)?(r=o,s=""):l.isUndefined(o)?s="":s=o,Z(Object.assign({title:s,message:n,type:"",...To[e]},r,{boxType:e}),a)}}Z.close=()=>{te.forEach((e,n)=>{n.doClose()}),te.clear()};Z._context=null;const U=Z;U.install=e=>{U._context=e._context,e.config.globalProperties.$msgbox=U,e.config.globalProperties.$messageBox=U,e.config.globalProperties.$alert=U.alert,e.config.globalProperties.$confirm=U.confirm,e.config.globalProperties.$prompt=U.prompt};const No=U;exports.ElMessageBox=No;
|