@acedatacloud/nexior 3.17.7 → 3.18.0
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/assets/{Auth-dzXu54ez.js → Auth-YkU_SytW.js} +1 -1
- package/dist/assets/{Callback-BRLf1vNX.js → Callback-xxVfD2p4.js} +1 -1
- package/dist/assets/{Console-BTWU1dGn.js → Console-BCzAamf-.js} +1 -1
- package/dist/assets/{Conversation-CBoisJCu.js → Conversation-BWSJhAFb.js} +10 -10
- package/dist/assets/{Conversation-Bf5vKePm.css → Conversation-t9mI4KIt.css} +1 -1
- package/dist/assets/{CopyToClipboard-IxJR61wg.js → CopyToClipboard-MNFOHaqI.js} +1 -1
- package/dist/assets/{Detail-CQaB0jBV.js → Detail-lydJ490z.js} +1 -1
- package/dist/assets/{EditArray-BEexyJll.js → EditArray-7TB_XCQ-.js} +1 -1
- package/dist/assets/{Extra-CbvGWu3X.js → Extra-CBGLz_VW.js} +1 -1
- package/dist/assets/{FilePreview-By9MS07q.js → FilePreview-D_6PFLOY.js} +1 -1
- package/dist/assets/{History-BATa21l2.js → History-BgdY4Y1R.js} +1 -1
- package/dist/assets/{ImagePreview-GXlfENrf.js → ImagePreview-CET7KBKE.js} +1 -1
- package/dist/assets/{ImageWrapper-Dtbv93SE.js → ImageWrapper-BH86BJsH.js} +1 -1
- package/dist/assets/Index-5gnVQGkt.js +1 -0
- package/dist/assets/Index-BmDYsPbN.js +1 -0
- package/dist/assets/{Index-B1xaDJNM.js → Index-Bolmm8xo.js} +1 -1
- package/dist/assets/Index-C5DJuhKj.js +1 -0
- package/dist/assets/Index-CHZtk3p_.js +1 -0
- package/dist/assets/Index-Ce75G1Zn.js +1 -0
- package/dist/assets/{Index-BGBX0Hbh.js → Index-D1j0pXfx.js} +1 -1
- package/dist/assets/Index-D5AYdUSj.css +1 -0
- package/dist/assets/{Index-HHYYDRsb.js → Index-DMJiWqIm.js} +1 -1
- package/dist/assets/{Index-DsGikYEE.js → Index-DahYAZoZ.js} +1 -1
- package/dist/assets/Index-DleiyNcv.js +1 -0
- package/dist/assets/Index-DxPsg9rS.js +1 -0
- package/dist/assets/Index-DzKQkHQz.js +1 -0
- package/dist/assets/{Index-BFQNJh_A.js → Index-YX9C99Fw.js} +1 -1
- package/dist/assets/{Index-ENANQbXH.js → Index-azHe5jHn.js} +1 -1
- package/dist/assets/{InfoIcon-CwVCPHCP.js → InfoIcon-nWEOcBLm.js} +1 -1
- package/dist/assets/{Invitees-cKRYypfO.js → Invitees-FtlIybpF.js} +1 -1
- package/dist/assets/List-CU4_X2Fj.js +1 -0
- package/dist/assets/List-CujK44q3.js +1 -0
- package/dist/assets/List-xLFrAXJP.js +1 -0
- package/dist/assets/{Login-2WKjLHHE.js → Login-WX-IkmIQ.js} +1 -1
- package/dist/assets/{Main-BFZm-MAx.js → Main-B7QToEHd.js} +1 -1
- package/dist/assets/{Navigator-Ceq4Wad_.css → Navigator-BVabXyZw.css} +1 -1
- package/dist/assets/{Navigator-DQZknvN0.js → Navigator-DeQEcJIk.js} +1 -1
- package/dist/assets/NoTasks-BdeBQAXO.js +1 -0
- package/dist/assets/{Pagination-azxdzNrH.js → Pagination-B7VBZ08A.js} +1 -1
- package/dist/assets/{Status-BJn6Jsz9.js → Status-nhyKVjFD.js} +1 -1
- package/dist/assets/{Subscribe-Cm2cvVEn.js → Subscribe-B4u5tphs.js} +1 -1
- package/dist/assets/{VideoPlayer-BdCTnWuK.js → VideoPlayer-Dhhv87vC.js} +1 -1
- package/dist/assets/{_Uint8Array-Djk9lJCp.js → _Uint8Array-BP0U7Iu_.js} +1 -1
- package/dist/assets/{_baseClone-_0JJYp5J.js → _baseClone-BBG0IH2E.js} +1 -1
- package/dist/assets/{_baseIteratee-CvFPRO8v.js → _baseIteratee-CxKAS7w7.js} +1 -1
- package/dist/assets/{_initCloneObject-CdQfCT40.js → _initCloneObject-D12d2S1r.js} +1 -1
- package/dist/assets/{castArray-B-n0ZfD-.js → castArray-DKMGoQO3.js} +1 -1
- package/dist/assets/{debounce-94P5SC1k.js → debounce-CH-Z-bEk.js} +1 -1
- package/dist/assets/{distribution-BwfEOWPq.js → distribution-Cm5iZXNQ.js} +1 -1
- package/dist/assets/{dropdown-D5AAT6ZH.js → dropdown-BgJeLUwR.js} +1 -1
- package/dist/assets/{index-CAScKEAu.js → index-98VGGErr.js} +2 -2
- package/dist/assets/{index-D6GwvWcD.js → index-B307mgep.js} +1 -1
- package/dist/assets/{index-HJfhXT93.js → index-B9tmKJTL.js} +1 -1
- package/dist/assets/{index-BSAjcrrC.js → index-BDa8awCt.js} +1 -1
- package/dist/assets/{index-Dd1VRLRi.css → index-BY-0WHwt.css} +1 -1
- package/dist/assets/{index-CJePgca8.js → index-B_oL3gLq.js} +1 -1
- package/dist/assets/{index-TJ2qXY2t.js → index-Be00AR5y.js} +1 -1
- package/dist/assets/{index-Cc85uiiK.js → index-BeqHYC-h.js} +1 -1
- package/dist/assets/{index-DWqHqFJY.js → index-BjvJ8MZp.js} +1 -1
- package/dist/assets/{index-74_Ssoda.js → index-ByXZ-2lh.js} +1 -1
- package/dist/assets/{index-Bzr3IjSr.js → index-CEAOvLtE.js} +1 -1
- package/dist/assets/{index-U_t6doDH.js → index-CQjyBwMm.js} +1 -1
- package/dist/assets/{index-BQExLqgj.js → index-CcyWuqA_.js} +1 -1
- package/dist/assets/{index-CSpB1F5W.js → index-ChfW7Lcp.js} +1 -1
- package/dist/assets/{index-Aqgtd2nL.js → index-CiX1WALY.js} +1 -1
- package/dist/assets/{index-NhRVpwT0.js → index-Cr8oY95Z.js} +1 -1
- package/dist/assets/{index-CXzCPe-2.js → index-CwD7WKHl.js} +1 -1
- package/dist/assets/{index-WRG1ce6I.js → index-D-7-e_ZW.js} +1 -1
- package/dist/assets/{index-CgrHCRIp.js → index-DE0NLUHP.js} +1 -1
- package/dist/assets/{index-C1rnYNjG.js → index-DQLaLsnP.js} +1 -1
- package/dist/assets/{index-4lEOv1Ve.js → index-DfAeDMXy.js} +1 -1
- package/dist/assets/{index-GI4Qjwb_.js → index-DlKgExzj.js} +1 -1
- package/dist/assets/{index-DpEzbAMX.js → index-DvdaM5kg.js} +1 -1
- package/dist/assets/{index-C4777Kma.js → index-DzX5B-3h.js} +1 -1
- package/dist/assets/{index-Bm0eHRgH.js → index-TZWWVHIQ.js} +1 -1
- package/dist/assets/{index-osd68rOb.js → index-W1lJvRgD.js} +1 -1
- package/dist/assets/{index-Cgnfn5bX.js → index-_DEa56hX.js} +1 -1
- package/dist/assets/{index-LAL8pDPz.js → index-bhFxQQDC.js} +1 -1
- package/dist/assets/{index-1c2qdYrk.js → index-nkzmx8qJ.js} +1 -1
- package/dist/assets/{index-Dw-sPEJy.js → index-w-DB8id9.js} +1 -1
- package/dist/assets/{index.es-Ds1LLYZB.js → index.es-BGVkY8oJ.js} +1 -1
- package/dist/assets/{isEqual-BCLzbsf0.js → isEqual-0nIQYJnJ.js} +1 -1
- package/dist/assets/{isPlainObject-Dgu9CGNL.js → isPlainObject-L3A-QG3u.js} +1 -1
- package/dist/assets/{order-BpuNlv-w.js → order-Clpmfbyf.js} +1 -1
- package/dist/assets/{price-lH10nUr5.js → price-Cu8efP-h.js} +1 -1
- package/dist/assets/{strings-CZWcdhe2.js → strings-BCHZaT3A.js} +1 -1
- package/dist/assets/{typescript-WjCVvA-y.js → typescript-1ic-flAv.js} +1 -1
- package/dist/assets/{use-form-item-DTrPd0ld.js → use-form-item-94xb2lbs.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/dist/assets/BotPlaceholder-DovcLg2h.js +0 -1
- package/dist/assets/Index-3VhuOM_h.js +0 -1
- package/dist/assets/Index-BMVRcaL2.js +0 -1
- package/dist/assets/Index-Bu-Ijnq-.js +0 -1
- package/dist/assets/Index-C-ur-OUi.js +0 -1
- package/dist/assets/Index-C8OKal7v.js +0 -1
- package/dist/assets/Index-CgwTK6_y.js +0 -1
- package/dist/assets/Index-D1W0vKj1.css +0 -1
- package/dist/assets/Index-G6NXKb-v.js +0 -1
- package/dist/assets/Index-U0r_bJMR.js +0 -1
- package/dist/assets/List-BuL_ha7Z.js +0 -1
- package/dist/assets/List-DO_90voW.js +0 -1
- package/dist/assets/List-HRuTvGfZ.css +0 -1
- package/dist/assets/List-un9qdR5s.js +0 -1
- package/dist/assets/NoTasks-Cgq80HtK.js +0 -1
- /package/dist/assets/{BotPlaceholder-C_P7dqM5.css → NoTasks-C_P7dqM5.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dM as O,aj as q,dN as H,_ as M,d as A,u as U,bO as V,c as v,al as C,a as j,b1 as G,dO as J,bn as K,i as Q,o,j as r,k as d,aT as W,e,J as X,dP as Y,aG as Z,t as E,ay as _,ah as x,b as i,y as l,n as t,r as u,x as ee,E as ae,b3 as se,K as te,aU as oe,g as le}from"./index-
|
|
1
|
+
import{dM as O,aj as q,dN as H,_ as M,d as A,u as U,bO as V,c as v,al as C,a as j,b1 as G,dO as J,bn as K,i as Q,o,j as r,k as d,aT as W,e,J as X,dP as Y,aG as Z,t as E,ay as _,ah as x,b as i,y as l,n as t,r as u,x as ee,E as ae,b3 as se,K as te,aU as oe,g as le}from"./index-98VGGErr.js";const re=q({...H,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),de=O,ie=A({name:"ElDrawer",inheritAttrs:!1}),ne=A({...ie,props:re,emits:de,setup(g,{expose:R}){const n=g,S=U();V({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},v(()=>!!S.title));const f=C(),y=C(),s=j("drawer"),{t:F}=G(),{afterEnter:m,afterLeave:h,beforeLeave:T,visible:c,rendered:L,titleId:p,bodyId:k,zIndex:B,onModalClick:D,onOpenAutoFocus:P,onCloseAutoFocus:z,onFocusoutPrevented:$,onCloseRequested:I,handleClose:b}=J(n,f),N=v(()=>n.direction==="rtl"||n.direction==="ltr"),w=v(()=>K(n.size));return R({handleClose:b,afterEnter:m,afterLeave:h}),(a,fe)=>(o(),Q(e(oe),{to:a.appendTo,disabled:a.appendTo!=="body"?!1:!a.appendToBody},{default:r(()=>[d(W,{name:e(s).b("fade"),onAfterEnter:e(m),onAfterLeave:e(h),onBeforeLeave:e(T),persisted:""},{default:r(()=>[X(d(e(Y),{mask:a.modal,"overlay-class":a.modalClass,"z-index":e(B),onClick:e(D)},{default:r(()=>[d(e(Z),{loop:"",trapped:e(c),"focus-trap-el":f.value,"focus-start-el":y.value,onFocusAfterTrapped:e(P),onFocusAfterReleased:e(z),onFocusoutPrevented:e($),onReleaseRequested:e(I)},{default:r(()=>[E("div",_({ref_key:"drawerRef",ref:f,"aria-modal":"true","aria-label":a.title||void 0,"aria-labelledby":a.title?void 0:e(p),"aria-describedby":e(k)},a.$attrs,{class:[e(s).b(),a.direction,e(c)&&"open"],style:e(N)?"width: "+e(w):"height: "+e(w),role:"dialog",onClick:x(()=>{},["stop"])}),[E("span",{ref_key:"focusStartRef",ref:y,class:t(e(s).e("sr-focus")),tabindex:"-1"},null,2),a.withHeader?(o(),i("header",{key:0,class:t([e(s).e("header"),a.headerClass])},[a.$slots.title?u(a.$slots,"title",{key:1},()=>[l(" DEPRECATED SLOT ")]):u(a.$slots,"header",{key:0,close:e(b),titleId:e(p),titleClass:e(s).e("title")},()=>[a.$slots.title?l("v-if",!0):(o(),i("span",{key:0,id:e(p),role:"heading","aria-level":a.headerAriaLevel,class:t(e(s).e("title"))},ee(a.title),11,["id","aria-level"]))]),a.showClose?(o(),i("button",{key:2,"aria-label":e(F)("el.drawer.close"),class:t(e(s).e("close-btn")),type:"button",onClick:e(b)},[d(e(ae),{class:t(e(s).e("close"))},{default:r(()=>[d(e(se))]),_:1},8,["class"])],10,["aria-label","onClick"])):l("v-if",!0)],2)):l("v-if",!0),e(L)?(o(),i("div",{key:1,id:e(k),class:t([e(s).e("body"),a.bodyClass])},[u(a.$slots,"default")],10,["id"])):l("v-if",!0),a.$slots.footer?(o(),i("div",{key:2,class:t([e(s).e("footer"),a.footerClass])},[u(a.$slots,"footer")],2)):l("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[te,e(c)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ue=M(ne,[["__file","drawer.vue"]]);const pe=le(ue);export{pe as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bh as w,ak as $,aM as z,aj as B,cg as V,ch as R,bS as P,al as E,an as J,c as b,bM as F,bo as Q,bQ as X,bO as Y,_ as k,d as y,a as I,b as G,o as C,t as _,J as D,di as x,e,ah as h,n as f,c_ as A,r as N,D as K,x as M,bc as U,f as Z,aW as ee,av as ae,am as oe,bG as le,ca as se,aw as te,bN as ne,w as L,g as re}from"./index-
|
|
1
|
+
import{bh as w,ak as $,aM as z,aj as B,cg as V,ch as R,bS as P,al as E,an as J,c as b,bM as F,bo as Q,bQ as X,bO as Y,_ as k,d as y,a as I,b as G,o as C,t as _,J as D,di as x,e,ah as h,n as f,c_ as A,r as N,D as K,x as M,bc as U,f as Z,aW as ee,av as ae,am as oe,bG as le,ca as se,aw as te,bN as ne,w as L,g as re}from"./index-98VGGErr.js";import{u as ie}from"./index-DQLaLsnP.js";import{u as de,a as ue}from"./use-form-item-94xb2lbs.js";const T=B({modelValue:{type:[String,Number,Boolean],default:void 0},size:P,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),ce=B({...T,border:Boolean}),j={[R]:o=>w(o)||$(o)||z(o),[V]:o=>w(o)||$(o)||z(o)},O=Symbol("radioGroupKey"),W=(o,u)=>{const s=E(),a=J(O,void 0),i=b(()=>!!a),c=b(()=>F(o.value)?o.label:o.value),r=b({get(){return i.value?a.modelValue:o.modelValue},set(t){i.value?a.changeEvent(t):u&&u(R,t),s.value.checked=o.modelValue===c.value}}),d=Q(b(()=>a?.size)),l=X(b(()=>a?.disabled)),n=E(!1),p=b(()=>l.value||i.value&&r.value!==c.value?-1:0);return Y({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},b(()=>i.value&&F(o.value))),{radioRef:s,isGroup:i,radioGroup:a,focus:n,size:d,disabled:l,tabIndex:p,modelValue:r,actualValue:c}},pe=y({name:"ElRadio"}),me=y({...pe,props:ce,emits:j,setup(o,{emit:u}){const s=o,a=I("radio"),{radioRef:i,radioGroup:c,focus:r,size:d,disabled:l,modelValue:n,actualValue:p}=W(s,u);function t(){U(()=>u(V,n.value))}return(m,g)=>{var v;return C(),G("label",{class:f([e(a).b(),e(a).is("disabled",e(l)),e(a).is("focus",e(r)),e(a).is("bordered",m.border),e(a).is("checked",e(n)===e(p)),e(a).m(e(d))])},[_("span",{class:f([e(a).e("input"),e(a).is("disabled",e(l)),e(a).is("checked",e(n)===e(p))])},[D(_("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":S=>A(n)?n.value=S:null,class:f(e(a).e("original")),value:e(p),name:m.name||((v=e(c))==null?void 0:v.name),disabled:e(l),checked:e(n)===e(p),type:"radio",onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onChange:t,onClick:h(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[x,e(n)]]),_("span",{class:f(e(a).e("inner"))},null,2)],2),_("span",{class:f(e(a).e("label")),onKeydown:h(()=>{},["stop"])},[N(m.$slots,"default",{},()=>[K(M(m.label),1)])],42,["onKeydown"])],2)}}});var be=k(me,[["__file","radio.vue"]]);const fe=B({...T}),ve=y({name:"ElRadioButton"}),_e=y({...ve,props:fe,setup(o){const u=o,s=I("radio"),{radioRef:a,focus:i,size:c,disabled:r,modelValue:d,radioGroup:l,actualValue:n}=W(u),p=b(()=>({backgroundColor:l?.fill||"",borderColor:l?.fill||"",boxShadow:l?.fill?`-1px 0 0 0 ${l.fill}`:"",color:l?.textColor||""}));return(t,m)=>{var g;return C(),G("label",{class:f([e(s).b("button"),e(s).is("active",e(d)===e(n)),e(s).is("disabled",e(r)),e(s).is("focus",e(i)),e(s).bm("button",e(c))])},[D(_("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":v=>A(d)?d.value=v:null,class:f(e(s).be("button","original-radio")),value:e(n),type:"radio",name:t.name||((g=e(l))==null?void 0:g.name),disabled:e(r),onFocus:v=>i.value=!0,onBlur:v=>i.value=!1,onClick:h(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[x,e(d)]]),_("span",{class:f(e(s).be("button","inner")),style:Z(e(d)===e(n)?e(p):{}),onKeydown:h(()=>{},["stop"])},[N(t.$slots,"default",{},()=>[K(M(t.label),1)])],46,["onKeydown"])],2)}}});var q=k(_e,[["__file","radio-button.vue"]]);const ye=B({id:{type:String,default:void 0},size:P,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...ie(["ariaLabel"])}),ge=j,he=y({name:"ElRadioGroup"}),Be=y({...he,props:ye,emits:ge,setup(o,{emit:u}){const s=o,a=I("radio"),i=ee(),c=E(),{formItem:r}=de(),{inputId:d,isLabeledByFormItem:l}=ue(s,{formItemContext:r}),n=t=>{u(R,t),U(()=>u(V,t))};ae(()=>{const t=c.value.querySelectorAll("[type=radio]"),m=t[0];!Array.from(t).some(g=>g.checked)&&m&&(m.tabIndex=0)});const p=b(()=>s.name||i.value);return oe(O,le({...se(s),changeEvent:n,name:p})),te(()=>s.modelValue,()=>{s.validateEvent&&r?.validate("change").catch(t=>ne())}),(t,m)=>(C(),G("div",{id:e(d),ref_key:"radioGroupRef",ref:c,class:f(e(a).b("group")),role:"radiogroup","aria-label":e(l)?void 0:t.ariaLabel||"radio-group","aria-labelledby":e(l)?e(r).labelId:void 0},[N(t.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var H=k(Be,[["__file","radio-group.vue"]]);re(be,{RadioButton:q,RadioGroup:H});const Re=L(H),ke=L(q);export{ke as E,Re as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c1 as Se,b_ as de,b$ as Re,cX as Oe,aC as ae,d as V,bm as $e,dY as W,av as fe,bK as xe,cz as Be,aj as q,ap as H,_ as be,an as re,bE as ie,a as J,al as T,aw as K,ao as ve,b as me,o as pe,f as ke,n as he,e as B,bF as ne,bc as X,c as D,bU as Ae,k as m,E as Y,b4 as Fe,b5 as Le,aI as F,b3 as ze,bh as Me,ak as Ve,r as se,dZ as Ie,ch as ge,aK as _e,am as Ke,u as De,aS as ce,bG as Ue,d_ as Ge,J as We,y as Ye,K as He,w as Xe,g as qe}from"./index-CAScKEAu.js";import{m as le,b as oe,e as Je,f as Ze}from"./typescript-WjCVvA-y.js";import{c as L}from"./strings-CZWcdhe2.js";import{g as Qe,b as je}from"./_baseClone-_0JJYp5J.js";import{c as et}from"./_initCloneObject-CdQfCT40.js";import{i as tt}from"./isPlainObject-Dgu9CGNL.js";import{f as at}from"./index-C1rnYNjG.js";function nt(e,t,s){var u=-1,a=e.length;t<0&&(t=-t>a?0:a+t),s=s>a?a:s,s<0&&(s+=a),a=t>s?0:s-t>>>0,t>>>=0;for(var l=Array(a);++u<a;)l[u]=e[u+t];return l}function st(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function lt(e,t){return t.length<2?e:Se(e,nt(t,0,-1))}function ot(e,t){return t=de(t,e),e=lt(e,t),e==null||delete e[Re(st(t))]}function rt(e){return tt(e)?void 0:e}var it=1,ct=2,ut=4,dt=at(function(e,t){var s={};if(e==null)return s;var u=!1;t=Oe(t,function(l){return l=de(l,e),u||(u=l.length>1),l}),et(e,Qe(e),s),u&&(s=je(s,it|ct|ut,rt));for(var a=t.length;a--;)ot(s,t[a]);return s});const ft=(e,t,s)=>xe(e.subTree).filter(l=>{var P;return Be(l)&&((P=l.type)==null?void 0:P.name)===t&&!!l.component}).map(l=>l.component.uid).map(l=>s[l]).filter(l=>!!l),bt=(e,t)=>{const s=ae({}),u=ae([]),a=new WeakMap,l=v=>{s.value[v.uid]=v,W(s),fe(()=>{const d=v.getVnode().el,n=d.parentNode;if(!a.has(n)){a.set(n,[]);const f=n.insertBefore.bind(n);n.insertBefore=(_,c)=>(a.get(n).some(N=>_===N||c===N)&&W(s),f(_,c))}a.get(n).push(d)})},P=v=>{delete s.value[v.uid],W(s);const d=v.getVnode().el,n=d.parentNode,f=a.get(n),_=f.indexOf(d);f.splice(_,1)},p=()=>{u.value=ft(e,t,s.value)},g=v=>v.render(),h=V({setup(v,{slots:d}){return()=>(p(),d.default?$e(g,{render:d.default}):null)}});return{children:u,addChild:l,removeChild:P,ChildrenSorter:h}},Z=Symbol("tabsRootContextKey"),vt=q({tabs:{type:H(Array),default:()=>le([])},tabRefs:{type:H(Object),default:()=>le({})}}),ye="ElTabBar",mt=V({name:ye}),pt=V({...mt,props:vt,setup(e,{expose:t}){const s=e,u=re(Z);u||ie(ye,"<el-tabs><el-tab-bar /></el-tabs>");const a=J("tabs"),l=T(),P=T(),p=()=>{let n=0,f=0;const _=["top","bottom"].includes(u.props.tabPosition)?"width":"height",c=_==="width"?"x":"y",R=c==="x"?"left":"top";return s.tabs.every(N=>{if(ne(N.paneName))return!1;const r=s.tabRefs[N.paneName];if(!r)return!1;if(!N.active)return!0;n=r[`offset${L(R)}`],f=r[`client${L(_)}`];const C=window.getComputedStyle(r);return _==="width"&&(f-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),n+=Number.parseFloat(C.paddingLeft)),!1}),{[_]:`${f}px`,transform:`translate${L(c)}(${n}px)`}},g=()=>P.value=p(),h=[],v=()=>{h.forEach(n=>n.stop()),h.length=0,Object.values(s.tabRefs).forEach(n=>{h.push(oe(n,g))})};K(()=>s.tabs,async()=>{await X(),g(),v()},{immediate:!0});const d=oe(l,()=>g());return ve(()=>{h.forEach(n=>n.stop()),h.length=0,d.stop()}),t({ref:l,update:g}),(n,f)=>(pe(),me("div",{ref_key:"barRef",ref:l,class:he([B(a).e("active-bar"),B(a).is(B(u).props.tabPosition)]),style:ke(P.value)},null,6))}});var ht=be(pt,[["__file","tab-bar.vue"]]);const gt=q({panes:{type:H(Array),default:()=>le([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),_t={tabClick:(e,t,s)=>s instanceof Event,tabRemove:(e,t)=>t instanceof Event},ue="ElTabNav",yt=V({name:ue,props:gt,emits:_t,setup(e,{expose:t,emit:s}){const u=re(Z);u||ie(ue,"<el-tabs><tab-nav /></el-tabs>");const a=J("tabs"),l=Je(),P=Ze(),p=T(),g=T(),h=T(),v=T({}),d=T(),n=T(!1),f=T(0),_=T(!1),c=T(!0),R=ae(),N=D(()=>["top","bottom"].includes(u.props.tabPosition)?"width":"height"),r=D(()=>({transform:`translate${N.value==="width"?"X":"Y"}(-${f.value}px)`})),C=()=>{if(!p.value)return;const i=p.value[`offset${L(N.value)}`],b=f.value;if(!b)return;const o=b>i?b-i:0;f.value=o},S=()=>{if(!p.value||!g.value)return;const i=g.value[`offset${L(N.value)}`],b=p.value[`offset${L(N.value)}`],o=f.value;if(i-o<=b)return;const E=i-o>b*2?o+b:i-b;f.value=E},k=async()=>{const i=g.value;if(!n.value||!h.value||!p.value||!i)return;await X();const b=v.value[e.currentName];if(!b)return;const o=p.value,E=["top","bottom"].includes(u.props.tabPosition),y=b.getBoundingClientRect(),w=o.getBoundingClientRect(),U=E?i.offsetWidth-w.width:i.offsetHeight-w.height,A=f.value;let $=A;E?(y.left<w.left&&($=A-(w.left-y.left)),y.right>w.right&&($=A+y.right-w.right)):(y.top<w.top&&($=A-(w.top-y.top)),y.bottom>w.bottom&&($=A+(y.bottom-w.bottom))),$=Math.max($,0),f.value=Math.min($,U)},z=()=>{var i;if(!g.value||!p.value)return;e.stretch&&((i=d.value)==null||i.update());const b=g.value[`offset${L(N.value)}`],o=p.value[`offset${L(N.value)}`],E=f.value;o<b?(n.value=n.value||{},n.value.prev=E,n.value.next=E+o<b,b-E<o&&(f.value=b-o)):(n.value=!1,E>0&&(f.value=0))},I=i=>{let b=0;switch(i.code){case F.left:case F.up:b=-1;break;case F.right:case F.down:b=1;break;default:return}const o=Array.from(i.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let y=o.indexOf(i.target)+b;y<0?y=o.length-1:y>=o.length&&(y=0),o[y].focus({preventScroll:!0}),o[y].click(),M()},M=()=>{c.value&&(_.value=!0)},O=()=>_.value=!1,Q=(i,b)=>{v.value[b]=i},Te=async()=>{await X();const i=v.value[e.currentName];i?.focus({preventScroll:!0})};return K(l,i=>{i==="hidden"?c.value=!1:i==="visible"&&setTimeout(()=>c.value=!0,50)}),K(P,i=>{i?setTimeout(()=>c.value=!0,50):c.value=!1}),oe(h,z),fe(()=>setTimeout(()=>k(),0)),Ae(()=>z()),t({scrollToActiveTab:k,removeFocus:O,focusActiveTab:Te,tabListRef:g,tabBarRef:d,scheduleRender:()=>W(R)}),()=>{const i=n.value?[m("span",{class:[a.e("nav-prev"),a.is("disabled",!n.value.prev)],onClick:C},[m(Y,null,{default:()=>[m(Fe,null,null)]})]),m("span",{class:[a.e("nav-next"),a.is("disabled",!n.value.next)],onClick:S},[m(Y,null,{default:()=>[m(Le,null,null)]})])]:null,b=e.panes.map((o,E)=>{var y,w,U,A;const $=o.uid,j=o.props.disabled,G=(w=(y=o.props.name)!=null?y:o.index)!=null?w:`${E}`,ee=!j&&(o.isClosable||e.editable);o.index=`${E}`;const Pe=ee?m(Y,{class:"is-icon-close",onClick:x=>s("tabRemove",o,x)},{default:()=>[m(ze,null,null)]}):null,Ee=((A=(U=o.slots).label)==null?void 0:A.call(U))||o.props.label,we=!j&&o.active?0:-1;return m("div",{ref:x=>Q(x,G),class:[a.e("item"),a.is(u.props.tabPosition),a.is("active",o.active),a.is("disabled",j),a.is("closable",ee),a.is("focus",_.value)],id:`tab-${G}`,key:`tab-${$}`,"aria-controls":`pane-${G}`,role:"tab","aria-selected":o.active,tabindex:we,onFocus:()=>M(),onBlur:()=>O(),onClick:x=>{O(),s("tabClick",o,G,x)},onKeydown:x=>{ee&&(x.code===F.delete||x.code===F.backspace)&&s("tabRemove",o,x)}},[Ee,Pe])});return R.value,m("div",{ref:h,class:[a.e("nav-wrap"),a.is("scrollable",!!n.value),a.is(u.props.tabPosition)]},[i,m("div",{class:a.e("nav-scroll"),ref:p},[e.panes.length>0?m("div",{class:[a.e("nav"),a.is(u.props.tabPosition),a.is("stretch",e.stretch&&["top","bottom"].includes(u.props.tabPosition))],ref:g,style:r.value,role:"tablist",onKeydown:I},[e.type?null:m(ht,{ref:d,tabs:[...e.panes],tabRefs:v.value},null),b]):null])])}}}),Nt=q({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:H(Function),default:()=>!0},stretch:Boolean}),te=e=>Me(e)||Ve(e),Ct={[ge]:e=>te(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>te(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>te(e),tabAdd:()=>!0},Tt=V({name:"ElTabs",props:Nt,emits:Ct,setup(e,{emit:t,slots:s,expose:u}){var a;const l=J("tabs"),P=D(()=>["left","right"].includes(e.tabPosition)),{children:p,addChild:g,removeChild:h,ChildrenSorter:v}=bt(_e(),"ElTabPane"),d=T(),n=T((a=e.modelValue)!=null?a:"0"),f=async(r,C=!1)=>{var S,k,z,I;if(!(n.value===r||ne(r)))try{let M;if(e.beforeLeave){const O=e.beforeLeave(r,n.value);M=O instanceof Promise?await O:O}else M=!0;if(M!==!1){const O=(S=p.value.find(Q=>Q.paneName===n.value))==null?void 0:S.isFocusInsidePane();n.value=r,C&&(t(ge,r),t("tabChange",r)),(z=(k=d.value)==null?void 0:k.removeFocus)==null||z.call(k),O&&((I=d.value)==null||I.focusActiveTab())}}catch{}},_=(r,C,S)=>{r.props.disabled||(t("tabClick",r,S),f(C,!0))},c=(r,C)=>{r.props.disabled||ne(r.props.name)||(C.stopPropagation(),t("edit",r.props.name,"remove"),t("tabRemove",r.props.name))},R=()=>{t("edit",void 0,"add"),t("tabAdd")},N=r=>{const C=r.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?r.children[0].el:r.children[1].el;C!==S&&C.before(S)};return K(()=>e.modelValue,r=>f(r)),K(n,async()=>{var r;await X(),(r=d.value)==null||r.scrollToActiveTab()}),Ke(Z,{props:e,currentName:n,registerPane:g,unregisterPane:h,nav$:d}),u({currentName:n,get tabNavRef(){return dt(d.value,["scheduleRender"])}}),()=>{const r=s["add-icon"],C=e.editable||e.addable?m("div",{class:[l.e("new-tab"),P.value&&l.e("new-tab-vertical")],tabindex:"0",onClick:R,onKeydown:I=>{[F.enter,F.numpadEnter].includes(I.code)&&R()}},[r?se(s,"add-icon"):m(Y,{class:l.is("icon-plus")},{default:()=>[m(Ie,null,null)]})]):null,S=()=>m(yt,{ref:d,currentName:n.value,editable:e.editable,type:e.type,panes:p.value,stretch:e.stretch,onTabClick:_,onTabRemove:c},null),k=m("div",{class:[l.e("header"),P.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[m(v,null,{default:S,$stable:!0}),C]),z=m("div",{class:l.e("content")},[se(s,"default")]);return m("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:N,onVnodeUpdated:N},[z,k])}}});var Pt=Tt;const Et=q({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Ne="ElTabPane",wt=V({name:Ne}),St=V({...wt,props:Et,setup(e){const t=e,s=_e(),u=De(),a=re(Z);a||ie(Ne,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const l=J("tab-pane"),P=T(),p=T(),g=D(()=>t.closable||a.props.closable),h=ce(()=>{var c;return a.currentName.value===((c=t.name)!=null?c:p.value)}),v=T(h.value),d=D(()=>{var c;return(c=t.name)!=null?c:p.value}),n=ce(()=>!t.lazy||v.value||h.value),f=()=>{var c;return(c=P.value)==null?void 0:c.contains(document.activeElement)};K(h,c=>{c&&(v.value=!0)});const _=Ue({uid:s.uid,getVnode:()=>s.vnode,slots:u,props:t,paneName:d,active:h,index:p,isClosable:g,isFocusInsidePane:f});return a.registerPane(_),ve(()=>{a.unregisterPane(_)}),Ge(()=>{var c;u.label&&((c=a.nav$.value)==null||c.scheduleRender())}),(c,R)=>B(n)?We((pe(),me("div",{key:0,id:`pane-${B(d)}`,ref_key:"paneRef",ref:P,class:he(B(l).b()),role:"tabpanel","aria-hidden":!B(h),"aria-labelledby":`tab-${B(d)}`},[se(c.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[He,B(h)]]):Ye("v-if",!0)}});var Ce=be(St,[["__file","tab-pane.vue"]]);const Ft=qe(Pt,{TabPane:Ce}),Lt=Xe(Ce);export{Lt as E,Ft as a};
|
|
1
|
+
import{c1 as Se,b_ as de,b$ as Re,cX as Oe,aC as ae,d as V,bm as $e,dY as W,av as fe,bK as xe,cz as Be,aj as q,ap as H,_ as be,an as re,bE as ie,a as J,al as T,aw as K,ao as ve,b as me,o as pe,f as ke,n as he,e as B,bF as ne,bc as X,c as D,bU as Ae,k as m,E as Y,b4 as Fe,b5 as Le,aI as F,b3 as ze,bh as Me,ak as Ve,r as se,dZ as Ie,ch as ge,aK as _e,am as Ke,u as De,aS as ce,bG as Ue,d_ as Ge,J as We,y as Ye,K as He,w as Xe,g as qe}from"./index-98VGGErr.js";import{m as le,b as oe,e as Je,f as Ze}from"./typescript-1ic-flAv.js";import{c as L}from"./strings-BCHZaT3A.js";import{g as Qe,b as je}from"./_baseClone-BBG0IH2E.js";import{c as et}from"./_initCloneObject-D12d2S1r.js";import{i as tt}from"./isPlainObject-L3A-QG3u.js";import{f as at}from"./index-DQLaLsnP.js";function nt(e,t,s){var u=-1,a=e.length;t<0&&(t=-t>a?0:a+t),s=s>a?a:s,s<0&&(s+=a),a=t>s?0:s-t>>>0,t>>>=0;for(var l=Array(a);++u<a;)l[u]=e[u+t];return l}function st(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function lt(e,t){return t.length<2?e:Se(e,nt(t,0,-1))}function ot(e,t){return t=de(t,e),e=lt(e,t),e==null||delete e[Re(st(t))]}function rt(e){return tt(e)?void 0:e}var it=1,ct=2,ut=4,dt=at(function(e,t){var s={};if(e==null)return s;var u=!1;t=Oe(t,function(l){return l=de(l,e),u||(u=l.length>1),l}),et(e,Qe(e),s),u&&(s=je(s,it|ct|ut,rt));for(var a=t.length;a--;)ot(s,t[a]);return s});const ft=(e,t,s)=>xe(e.subTree).filter(l=>{var P;return Be(l)&&((P=l.type)==null?void 0:P.name)===t&&!!l.component}).map(l=>l.component.uid).map(l=>s[l]).filter(l=>!!l),bt=(e,t)=>{const s=ae({}),u=ae([]),a=new WeakMap,l=v=>{s.value[v.uid]=v,W(s),fe(()=>{const d=v.getVnode().el,n=d.parentNode;if(!a.has(n)){a.set(n,[]);const f=n.insertBefore.bind(n);n.insertBefore=(_,c)=>(a.get(n).some(N=>_===N||c===N)&&W(s),f(_,c))}a.get(n).push(d)})},P=v=>{delete s.value[v.uid],W(s);const d=v.getVnode().el,n=d.parentNode,f=a.get(n),_=f.indexOf(d);f.splice(_,1)},p=()=>{u.value=ft(e,t,s.value)},g=v=>v.render(),h=V({setup(v,{slots:d}){return()=>(p(),d.default?$e(g,{render:d.default}):null)}});return{children:u,addChild:l,removeChild:P,ChildrenSorter:h}},Z=Symbol("tabsRootContextKey"),vt=q({tabs:{type:H(Array),default:()=>le([])},tabRefs:{type:H(Object),default:()=>le({})}}),ye="ElTabBar",mt=V({name:ye}),pt=V({...mt,props:vt,setup(e,{expose:t}){const s=e,u=re(Z);u||ie(ye,"<el-tabs><el-tab-bar /></el-tabs>");const a=J("tabs"),l=T(),P=T(),p=()=>{let n=0,f=0;const _=["top","bottom"].includes(u.props.tabPosition)?"width":"height",c=_==="width"?"x":"y",R=c==="x"?"left":"top";return s.tabs.every(N=>{if(ne(N.paneName))return!1;const r=s.tabRefs[N.paneName];if(!r)return!1;if(!N.active)return!0;n=r[`offset${L(R)}`],f=r[`client${L(_)}`];const C=window.getComputedStyle(r);return _==="width"&&(f-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),n+=Number.parseFloat(C.paddingLeft)),!1}),{[_]:`${f}px`,transform:`translate${L(c)}(${n}px)`}},g=()=>P.value=p(),h=[],v=()=>{h.forEach(n=>n.stop()),h.length=0,Object.values(s.tabRefs).forEach(n=>{h.push(oe(n,g))})};K(()=>s.tabs,async()=>{await X(),g(),v()},{immediate:!0});const d=oe(l,()=>g());return ve(()=>{h.forEach(n=>n.stop()),h.length=0,d.stop()}),t({ref:l,update:g}),(n,f)=>(pe(),me("div",{ref_key:"barRef",ref:l,class:he([B(a).e("active-bar"),B(a).is(B(u).props.tabPosition)]),style:ke(P.value)},null,6))}});var ht=be(pt,[["__file","tab-bar.vue"]]);const gt=q({panes:{type:H(Array),default:()=>le([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),_t={tabClick:(e,t,s)=>s instanceof Event,tabRemove:(e,t)=>t instanceof Event},ue="ElTabNav",yt=V({name:ue,props:gt,emits:_t,setup(e,{expose:t,emit:s}){const u=re(Z);u||ie(ue,"<el-tabs><tab-nav /></el-tabs>");const a=J("tabs"),l=Je(),P=Ze(),p=T(),g=T(),h=T(),v=T({}),d=T(),n=T(!1),f=T(0),_=T(!1),c=T(!0),R=ae(),N=D(()=>["top","bottom"].includes(u.props.tabPosition)?"width":"height"),r=D(()=>({transform:`translate${N.value==="width"?"X":"Y"}(-${f.value}px)`})),C=()=>{if(!p.value)return;const i=p.value[`offset${L(N.value)}`],b=f.value;if(!b)return;const o=b>i?b-i:0;f.value=o},S=()=>{if(!p.value||!g.value)return;const i=g.value[`offset${L(N.value)}`],b=p.value[`offset${L(N.value)}`],o=f.value;if(i-o<=b)return;const E=i-o>b*2?o+b:i-b;f.value=E},k=async()=>{const i=g.value;if(!n.value||!h.value||!p.value||!i)return;await X();const b=v.value[e.currentName];if(!b)return;const o=p.value,E=["top","bottom"].includes(u.props.tabPosition),y=b.getBoundingClientRect(),w=o.getBoundingClientRect(),U=E?i.offsetWidth-w.width:i.offsetHeight-w.height,A=f.value;let $=A;E?(y.left<w.left&&($=A-(w.left-y.left)),y.right>w.right&&($=A+y.right-w.right)):(y.top<w.top&&($=A-(w.top-y.top)),y.bottom>w.bottom&&($=A+(y.bottom-w.bottom))),$=Math.max($,0),f.value=Math.min($,U)},z=()=>{var i;if(!g.value||!p.value)return;e.stretch&&((i=d.value)==null||i.update());const b=g.value[`offset${L(N.value)}`],o=p.value[`offset${L(N.value)}`],E=f.value;o<b?(n.value=n.value||{},n.value.prev=E,n.value.next=E+o<b,b-E<o&&(f.value=b-o)):(n.value=!1,E>0&&(f.value=0))},I=i=>{let b=0;switch(i.code){case F.left:case F.up:b=-1;break;case F.right:case F.down:b=1;break;default:return}const o=Array.from(i.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let y=o.indexOf(i.target)+b;y<0?y=o.length-1:y>=o.length&&(y=0),o[y].focus({preventScroll:!0}),o[y].click(),M()},M=()=>{c.value&&(_.value=!0)},O=()=>_.value=!1,Q=(i,b)=>{v.value[b]=i},Te=async()=>{await X();const i=v.value[e.currentName];i?.focus({preventScroll:!0})};return K(l,i=>{i==="hidden"?c.value=!1:i==="visible"&&setTimeout(()=>c.value=!0,50)}),K(P,i=>{i?setTimeout(()=>c.value=!0,50):c.value=!1}),oe(h,z),fe(()=>setTimeout(()=>k(),0)),Ae(()=>z()),t({scrollToActiveTab:k,removeFocus:O,focusActiveTab:Te,tabListRef:g,tabBarRef:d,scheduleRender:()=>W(R)}),()=>{const i=n.value?[m("span",{class:[a.e("nav-prev"),a.is("disabled",!n.value.prev)],onClick:C},[m(Y,null,{default:()=>[m(Fe,null,null)]})]),m("span",{class:[a.e("nav-next"),a.is("disabled",!n.value.next)],onClick:S},[m(Y,null,{default:()=>[m(Le,null,null)]})])]:null,b=e.panes.map((o,E)=>{var y,w,U,A;const $=o.uid,j=o.props.disabled,G=(w=(y=o.props.name)!=null?y:o.index)!=null?w:`${E}`,ee=!j&&(o.isClosable||e.editable);o.index=`${E}`;const Pe=ee?m(Y,{class:"is-icon-close",onClick:x=>s("tabRemove",o,x)},{default:()=>[m(ze,null,null)]}):null,Ee=((A=(U=o.slots).label)==null?void 0:A.call(U))||o.props.label,we=!j&&o.active?0:-1;return m("div",{ref:x=>Q(x,G),class:[a.e("item"),a.is(u.props.tabPosition),a.is("active",o.active),a.is("disabled",j),a.is("closable",ee),a.is("focus",_.value)],id:`tab-${G}`,key:`tab-${$}`,"aria-controls":`pane-${G}`,role:"tab","aria-selected":o.active,tabindex:we,onFocus:()=>M(),onBlur:()=>O(),onClick:x=>{O(),s("tabClick",o,G,x)},onKeydown:x=>{ee&&(x.code===F.delete||x.code===F.backspace)&&s("tabRemove",o,x)}},[Ee,Pe])});return R.value,m("div",{ref:h,class:[a.e("nav-wrap"),a.is("scrollable",!!n.value),a.is(u.props.tabPosition)]},[i,m("div",{class:a.e("nav-scroll"),ref:p},[e.panes.length>0?m("div",{class:[a.e("nav"),a.is(u.props.tabPosition),a.is("stretch",e.stretch&&["top","bottom"].includes(u.props.tabPosition))],ref:g,style:r.value,role:"tablist",onKeydown:I},[e.type?null:m(ht,{ref:d,tabs:[...e.panes],tabRefs:v.value},null),b]):null])])}}}),Nt=q({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:H(Function),default:()=>!0},stretch:Boolean}),te=e=>Me(e)||Ve(e),Ct={[ge]:e=>te(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>te(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>te(e),tabAdd:()=>!0},Tt=V({name:"ElTabs",props:Nt,emits:Ct,setup(e,{emit:t,slots:s,expose:u}){var a;const l=J("tabs"),P=D(()=>["left","right"].includes(e.tabPosition)),{children:p,addChild:g,removeChild:h,ChildrenSorter:v}=bt(_e(),"ElTabPane"),d=T(),n=T((a=e.modelValue)!=null?a:"0"),f=async(r,C=!1)=>{var S,k,z,I;if(!(n.value===r||ne(r)))try{let M;if(e.beforeLeave){const O=e.beforeLeave(r,n.value);M=O instanceof Promise?await O:O}else M=!0;if(M!==!1){const O=(S=p.value.find(Q=>Q.paneName===n.value))==null?void 0:S.isFocusInsidePane();n.value=r,C&&(t(ge,r),t("tabChange",r)),(z=(k=d.value)==null?void 0:k.removeFocus)==null||z.call(k),O&&((I=d.value)==null||I.focusActiveTab())}}catch{}},_=(r,C,S)=>{r.props.disabled||(t("tabClick",r,S),f(C,!0))},c=(r,C)=>{r.props.disabled||ne(r.props.name)||(C.stopPropagation(),t("edit",r.props.name,"remove"),t("tabRemove",r.props.name))},R=()=>{t("edit",void 0,"add"),t("tabAdd")},N=r=>{const C=r.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?r.children[0].el:r.children[1].el;C!==S&&C.before(S)};return K(()=>e.modelValue,r=>f(r)),K(n,async()=>{var r;await X(),(r=d.value)==null||r.scrollToActiveTab()}),Ke(Z,{props:e,currentName:n,registerPane:g,unregisterPane:h,nav$:d}),u({currentName:n,get tabNavRef(){return dt(d.value,["scheduleRender"])}}),()=>{const r=s["add-icon"],C=e.editable||e.addable?m("div",{class:[l.e("new-tab"),P.value&&l.e("new-tab-vertical")],tabindex:"0",onClick:R,onKeydown:I=>{[F.enter,F.numpadEnter].includes(I.code)&&R()}},[r?se(s,"add-icon"):m(Y,{class:l.is("icon-plus")},{default:()=>[m(Ie,null,null)]})]):null,S=()=>m(yt,{ref:d,currentName:n.value,editable:e.editable,type:e.type,panes:p.value,stretch:e.stretch,onTabClick:_,onTabRemove:c},null),k=m("div",{class:[l.e("header"),P.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[m(v,null,{default:S,$stable:!0}),C]),z=m("div",{class:l.e("content")},[se(s,"default")]);return m("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:N,onVnodeUpdated:N},[z,k])}}});var Pt=Tt;const Et=q({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Ne="ElTabPane",wt=V({name:Ne}),St=V({...wt,props:Et,setup(e){const t=e,s=_e(),u=De(),a=re(Z);a||ie(Ne,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const l=J("tab-pane"),P=T(),p=T(),g=D(()=>t.closable||a.props.closable),h=ce(()=>{var c;return a.currentName.value===((c=t.name)!=null?c:p.value)}),v=T(h.value),d=D(()=>{var c;return(c=t.name)!=null?c:p.value}),n=ce(()=>!t.lazy||v.value||h.value),f=()=>{var c;return(c=P.value)==null?void 0:c.contains(document.activeElement)};K(h,c=>{c&&(v.value=!0)});const _=Ue({uid:s.uid,getVnode:()=>s.vnode,slots:u,props:t,paneName:d,active:h,index:p,isClosable:g,isFocusInsidePane:f});return a.registerPane(_),ve(()=>{a.unregisterPane(_)}),Ge(()=>{var c;u.label&&((c=a.nav$.value)==null||c.scheduleRender())}),(c,R)=>B(n)?We((pe(),me("div",{key:0,id:`pane-${B(d)}`,ref_key:"paneRef",ref:P,class:he(B(l).b()),role:"tabpanel","aria-hidden":!B(h),"aria-labelledby":`tab-${B(d)}`},[se(c.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[He,B(h)]]):Ye("v-if",!0)}});var Ce=be(St,[["__file","tab-pane.vue"]]);const Ft=qe(Pt,{TabPane:Ce}),Lt=Xe(Ce);export{Lt as E,Ft as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aN as g,ax as x,aB as C}from"./index-
|
|
1
|
+
import{aN as g,ax as x,aB as C}from"./index-98VGGErr.js";const s=new Map;if(C){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const n of s.values())for(const{documentHandler:o}of n)o(t,e);e=void 0}})}function i(e,t){let n=[];return g(t.arg)?n=t.arg:x(t.arg)&&n.push(t.arg),function(o,a){const c=t.instance.popperRef,r=o.target,d=a?.target,l=!t||!t.instance,f=!r||!d,p=e.contains(r)||e.contains(d),m=e===r,h=n.length&&n.some(u=>u?.contains(r))||n.length&&n.includes(d),v=c&&(c.contains(r)||c.contains(d));l||f||p||m||h||v||t.value(o,a)}}const H={beforeMount(e,t){s.has(e)||s.set(e,[]),s.get(e).push({documentHandler:i(e,t),bindingFn:t.value})},updated(e,t){s.has(e)||s.set(e,[]);const n=s.get(e),o=n.findIndex(c=>c.bindingFn===t.oldValue),a={documentHandler:i(e,t),bindingFn:t.value};o>=0?n.splice(o,1,a):n.push(a)},unmounted(e){s.delete(e)}};export{H as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O,b as ee}from"./typescript-
|
|
1
|
+
import{a as O,b as ee}from"./typescript-1ic-flAv.js";import{aj as j,_ as D,d as x,an as I,a as J,bE as te,al as u,c as L,ao as le,aO as X,i as W,o as P,j as Q,J as ae,t as A,ah as oe,n as R,e as g,f as $,K as se,aT as re,aB as ne,b as Z,k as Y,F as ie,ak as N,ap as ce,bn as V,aw as q,am as ue,bG as ve,bT as fe,av as me,bc as F,bU as de,y as pe,r as he,b8 as be,as as ye,g as ge}from"./index-98VGGErr.js";import{u as Se}from"./index-DQLaLsnP.js";const k=4,we={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},ze=({move:d,size:v,bar:s})=>({[s.size]:v,transform:`translate${s.axis}(${d}%)`}),K=Symbol("scrollbarContextKey"),Ee=j({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),_e="Thumb",He=x({__name:"thumb",props:Ee,setup(d){const v=d,s=I(K),a=J("scrollbar");s||te(_e,"can not inject scrollbar context");const c=u(),f=u(),p=u({}),i=u(!1);let n=!1,m=!1,T=0,l=0,o=ne?document.onselectstart:null;const t=L(()=>we[v.vertical?"vertical":"horizontal"]),h=L(()=>ze({size:v.size,move:v.move,bar:t.value})),w=L(()=>c.value[t.value.offset]**2/s.wrapElement[t.value.scrollSize]/v.ratio/f.value[t.value.offset]),_=r=>{var y;if(r.stopPropagation(),r.ctrlKey||[1,2].includes(r.button))return;(y=window.getSelection())==null||y.removeAllRanges(),z(r);const H=r.currentTarget;H&&(p.value[t.value.axis]=H[t.value.offset]-(r[t.value.client]-H.getBoundingClientRect()[t.value.direction]))},S=r=>{if(!f.value||!c.value||!s.wrapElement)return;const y=Math.abs(r.target.getBoundingClientRect()[t.value.direction]-r[t.value.client]),H=f.value[t.value.offset]/2,M=(y-H)*100*w.value/c.value[t.value.offset];s.wrapElement[t.value.scroll]=M*s.wrapElement[t.value.scrollSize]/100},z=r=>{r.stopImmediatePropagation(),n=!0,T=s.wrapElement.scrollHeight,l=s.wrapElement.scrollWidth,document.addEventListener("mousemove",B),document.addEventListener("mouseup",C),o=document.onselectstart,document.onselectstart=()=>!1},B=r=>{if(!c.value||!f.value||n===!1)return;const y=p.value[t.value.axis];if(!y)return;const H=(c.value.getBoundingClientRect()[t.value.direction]-r[t.value.client])*-1,M=f.value[t.value.offset]-y,U=(H-M)*100*w.value/c.value[t.value.offset];t.value.scroll==="scrollLeft"?s.wrapElement[t.value.scroll]=U*l/100:s.wrapElement[t.value.scroll]=U*T/100},C=()=>{n=!1,p.value[t.value.axis]=0,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",C),b(),m&&(i.value=!1)},E=()=>{m=!1,i.value=!!v.size},e=()=>{m=!0,i.value=n};le(()=>{b(),document.removeEventListener("mouseup",C)});const b=()=>{document.onselectstart!==o&&(document.onselectstart=o)};return O(X(s,"scrollbarElement"),"mousemove",E),O(X(s,"scrollbarElement"),"mouseleave",e),(r,y)=>(P(),W(re,{name:g(a).b("fade"),persisted:""},{default:Q(()=>[ae(A("div",{ref_key:"instance",ref:c,class:R([g(a).e("bar"),g(a).is(g(t).key)]),onMousedown:S,onClick:oe(()=>{},["stop"])},[A("div",{ref_key:"thumb",ref:f,class:R(g(a).e("thumb")),style:$(g(h)),onMousedown:_},null,38)],42,["onClick"]),[[se,r.always||i.value]])]),_:1},8,["name"]))}});var G=D(He,[["__file","thumb.vue"]]);const Te=j({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),ke=x({__name:"bar",props:Te,setup(d,{expose:v}){const s=d,a=I(K),c=u(0),f=u(0),p=u(""),i=u(""),n=u(1),m=u(1);return v({handleScroll:o=>{if(o){const t=o.offsetHeight-k,h=o.offsetWidth-k;f.value=o.scrollTop*100/t*n.value,c.value=o.scrollLeft*100/h*m.value}},update:()=>{const o=a?.wrapElement;if(!o)return;const t=o.offsetHeight-k,h=o.offsetWidth-k,w=t**2/o.scrollHeight,_=h**2/o.scrollWidth,S=Math.max(w,s.minSize),z=Math.max(_,s.minSize);n.value=w/(t-w)/(S/(t-S)),m.value=_/(h-_)/(z/(h-z)),i.value=S+k<t?`${S}px`:"",p.value=z+k<h?`${z}px`:""}}),(o,t)=>(P(),Z(ie,null,[Y(G,{move:c.value,ratio:m.value,size:p.value,always:o.always},null,8,["move","ratio","size","always"]),Y(G,{move:f.value,ratio:n.value,size:i.value,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}});var Le=D(ke,[["__file","bar.vue"]]);const Ce=j({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:ce([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Se(["ariaLabel","ariaOrientation"])}),Ne={"end-reached":d=>["left","right","top","bottom"].includes(d),scroll:({scrollTop:d,scrollLeft:v})=>[d,v].every(N)},Pe="ElScrollbar",Re=x({name:Pe}),Be=x({...Re,props:Ce,emits:Ne,setup(d,{expose:v,emit:s}){const a=d,c=J("scrollbar");let f,p,i=0,n=0,m="";const T=u(),l=u(),o=u(),t=u(),h=L(()=>{const e={};return a.height&&(e.height=V(a.height)),a.maxHeight&&(e.maxHeight=V(a.maxHeight)),[a.wrapStyle,e]}),w=L(()=>[a.wrapClass,c.e("wrap"),{[c.em("wrap","hidden-default")]:!a.native}]),_=L(()=>[c.e("view"),a.viewClass]),S=()=>{var e;if(l.value){(e=t.value)==null||e.handleScroll(l.value);const b=i,r=n;i=l.value.scrollTop,n=l.value.scrollLeft;const y={bottom:i+l.value.clientHeight>=l.value.scrollHeight,top:i<=0&&b!==0,right:n+l.value.clientWidth>=l.value.scrollWidth&&r!==n,left:n<=0&&r!==0};b!==i&&(m=i>b?"bottom":"top"),r!==n&&(m=n>r?"right":"left"),s("scroll",{scrollTop:i,scrollLeft:n}),y[m]&&s("end-reached",m)}};function z(e,b){ye(e)?l.value.scrollTo(e):N(e)&&N(b)&&l.value.scrollTo(e,b)}const B=e=>{N(e)&&(l.value.scrollTop=e)},C=e=>{N(e)&&(l.value.scrollLeft=e)},E=()=>{var e;(e=t.value)==null||e.update()};return q(()=>a.noresize,e=>{e?(f?.(),p?.()):({stop:f}=ee(o,E),p=O("resize",E))},{immediate:!0}),q(()=>[a.maxHeight,a.height],()=>{a.native||F(()=>{var e;E(),l.value&&((e=t.value)==null||e.handleScroll(l.value))})}),ue(K,ve({scrollbarElement:T,wrapElement:l})),fe(()=>{l.value&&(l.value.scrollTop=i,l.value.scrollLeft=n)}),me(()=>{a.native||F(()=>{E()})}),de(()=>E()),v({wrapRef:l,update:E,scrollTo:z,setScrollTop:B,setScrollLeft:C,handleScroll:S}),(e,b)=>(P(),Z("div",{ref_key:"scrollbarRef",ref:T,class:R(g(c).b())},[A("div",{ref_key:"wrapRef",ref:l,class:R(g(w)),style:$(g(h)),tabindex:e.tabindex,onScroll:S},[(P(),W(be(e.tag),{id:e.id,ref_key:"resizeRef",ref:o,class:R(g(_)),style:$(e.viewStyle),role:e.role,"aria-label":e.ariaLabel,"aria-orientation":e.ariaOrientation},{default:Q(()=>[he(e.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),e.native?pe("v-if",!0):(P(),W(Le,{key:0,ref_key:"barRef",ref:t,always:e.always,"min-size":e.minSize},null,8,["always","min-size"]))],2))}});var xe=D(Be,[["__file","scrollbar.vue"]]);const Ae=ge(xe);export{Ae as E,Ne as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aN as te,bh as Pe,aM as Te,aj as Fe,ap as de,c9 as Ce,al as $,c as E,_ as De,d as Y,bG as ce,bo as ze,a as qe,aw as re,am as Ue,ca as Ge,cb as xe,b as Je,o as pe,r as k,n as G,e as x,aL as Ke,bN as st,an as ne,bE as ot,av as Ze,ao as Ye,bU as ft,k as ie,F as lt,bc as He,aF as ve,u as ut,aW as dt,cc as ct,bn as Se,cd as fe,t as Ae,j as le,i as pt,y as je,b8 as vt,f as Re,D as mt,x as Ne,ce as ht,w as gt,g as yt}from"./index-
|
|
1
|
+
import{aN as te,bh as Pe,aM as Te,aj as Fe,ap as de,c9 as Ce,al as $,c as E,_ as De,d as Y,bG as ce,bo as ze,a as qe,aw as re,am as Ue,ca as Ge,cb as xe,b as Je,o as pe,r as k,n as G,e as x,aL as Ke,bN as st,an as ne,bE as ot,av as Ze,ao as Ye,bU as ft,k as ie,F as lt,bc as He,aF as ve,u as ut,aW as dt,cc as ct,bn as Se,cd as fe,t as Ae,j as le,i as pt,y as je,b8 as vt,f as Re,D as mt,x as Ne,ce as ht,w as gt,g as yt}from"./index-98VGGErr.js";import{c as me}from"./castArray-DKMGoQO3.js";import{b as bt}from"./typescript-1ic-flAv.js";import{b as wt}from"./_baseClone-BBG0IH2E.js";var Ft=4;function Ve(i){return wt(i,Ft)}const qt=Fe({size:{type:String,values:Ce},disabled:Boolean}),xt=Fe({...qt,model:Object,rules:{type:de(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean],default:!0}}),Ot={validate:(i,e,t)=>(te(i)||Pe(i))&&Te(e)&&Pe(t)};function Et(){const i=$([]),e=E(()=>{if(!i.value.length)return"0";const a=Math.max(...i.value);return a?`${a}px`:""});function t(a){const s=i.value.indexOf(a);return s===-1&&e.value,s}function r(a,s){if(a&&s){const o=t(s);i.value.splice(o,1,a)}else a&&i.value.push(a)}function n(a){const s=t(a);s>-1&&i.value.splice(s,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:n}}const Q=(i,e)=>{const t=me(e).map(r=>te(r)?r.join("."):r);return t.length>0?i.filter(r=>r.propString&&t.includes(r.propString)):i},_t="ElForm",Pt=Y({name:_t}),St=Y({...Pt,props:xt,emits:Ot,setup(i,{expose:e,emit:t}){const r=i,n=$(),a=ce([]),s=ze(),o=qe("form"),u=E(()=>{const{labelPosition:l,inline:m}=r;return[o.b(),o.m(s.value||"default"),{[o.m(`label-${l}`)]:l,[o.m("inline")]:m}]}),w=l=>Q(a,[l])[0],p=l=>{a.push(l)},g=l=>{l.prop&&a.splice(a.indexOf(l),1)},F=(l=[])=>{r.model&&Q(a,l).forEach(m=>m.resetField())},O=(l=[])=>{Q(a,l).forEach(m=>m.clearValidate())},S=E(()=>!!r.model),c=l=>{if(a.length===0)return[];const m=Q(a,l);return m.length?m:[]},y=async l=>j(void 0,l),f=async(l=[])=>{if(!S.value)return!1;const m=c(l);if(m.length===0)return!0;let b={};for(const R of m)try{await R.validate(""),R.validateState==="error"&&R.resetField()}catch(_){b={...b,..._}}return Object.keys(b).length===0?!0:Promise.reject(b)},j=async(l=[],m)=>{let b=!1;const R=!Ke(m);try{return b=await f(l),b===!0&&await m?.(b),b}catch(_){if(_ instanceof Error)throw _;const W=_;if(r.scrollToError&&n.value){const B=n.value.querySelector(`.${o.b()}-item.is-error`);B?.scrollIntoView(r.scrollIntoViewOptions)}return!b&&await m?.(!1,W),R&&Promise.reject(W)}},v=l=>{var m;const b=w(l);b&&((m=b.$el)==null||m.scrollIntoView(r.scrollIntoViewOptions))};return re(()=>r.rules,()=>{r.validateOnRuleChange&&y().catch(l=>st())},{deep:!0,flush:"post"}),Ue(xe,ce({...Ge(r),emit:t,resetFields:F,clearValidate:O,validateField:j,getField:w,addField:p,removeField:g,...Et()})),e({validate:y,validateField:j,resetFields:F,clearValidate:O,scrollToField:v,getField:w,fields:a}),(l,m)=>(pe(),Je("form",{ref_key:"formRef",ref:n,class:G(x(u))},[k(l.$slots,"default")],2))}});var At=De(St,[["__file","form.vue"]]);function T(){return T=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},T.apply(this,arguments)}function jt(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,Z(i,e)}function he(i){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(i)}function Z(i,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Z(i,e)}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ee(i,e,t){return Rt()?ee=Reflect.construct.bind():ee=function(n,a,s){var o=[null];o.push.apply(o,a);var u=Function.bind.apply(n,o),w=new u;return s&&Z(w,s.prototype),w},ee.apply(null,arguments)}function Nt(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function ge(i){var e=typeof Map=="function"?new Map:void 0;return ge=function(r){if(r===null||!Nt(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,n)}function n(){return ee(r,arguments,he(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Z(n,r)},ge(i)}var Vt=/%[sdj%]/g,Mt=function(){};function ye(i){if(!i||!i.length)return null;var e={};return i.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function M(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var n=0,a=t.length;if(typeof i=="function")return i.apply(null,t);if(typeof i=="string"){var s=i.replace(Vt,function(o){if(o==="%%")return"%";if(n>=a)return o;switch(o){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch{return"[Circular]"}break;default:return o}});return s}return i}function Wt(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function P(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||Wt(e)&&typeof i=="string"&&!i)}function It(i,e,t){var r=[],n=0,a=i.length;function s(o){r.push.apply(r,o||[]),n++,n===a&&t(r)}i.forEach(function(o){e(o,s)})}function Me(i,e,t){var r=0,n=i.length;function a(s){if(s&&s.length){t(s);return}var o=r;r=r+1,o<n?e(i[o],a):t([])}a([])}function Lt(i){var e=[];return Object.keys(i).forEach(function(t){e.push.apply(e,i[t]||[])}),e}var We=function(i){jt(e,i);function e(t,r){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=t,n.fields=r,n}return e}(ge(Error));function $t(i,e,t,r,n){if(e.first){var a=new Promise(function(F,O){var S=function(f){return r(f),f.length?O(new We(f,ye(f))):F(n)},c=Lt(i);Me(c,t,S)});return a.catch(function(F){return F}),a}var s=e.firstFields===!0?Object.keys(i):e.firstFields||[],o=Object.keys(i),u=o.length,w=0,p=[],g=new Promise(function(F,O){var S=function(y){if(p.push.apply(p,y),w++,w===u)return r(p),p.length?O(new We(p,ye(p))):F(n)};o.length||(r(p),F(n)),o.forEach(function(c){var y=i[c];s.indexOf(c)!==-1?Me(y,t,S):It(y,t,S)})});return g.catch(function(F){return F}),g}function Bt(i){return!!(i&&i.message!==void 0)}function Tt(i,e){for(var t=i,r=0;r<e.length;r++){if(t==null)return t;t=t[e[r]]}return t}function Ie(i,e){return function(t){var r;return i.fullFields?r=Tt(e,i.fullFields):r=e[t.field||i.fullField],Bt(t)?(t.field=t.field||i.fullField,t.fieldValue=r,t):{message:typeof t=="function"?t():t,fieldValue:r,field:t.field||i.fullField}}}function Le(i,e){if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r=="object"&&typeof i[t]=="object"?i[t]=T({},i[t],r):i[t]=r}}return i}var Qe=function(e,t,r,n,a,s){e.required&&(!r.hasOwnProperty(e.field)||P(t,s||e.type))&&n.push(M(a.messages.required,e.fullField))},Ct=function(e,t,r,n,a){(/^\s+$/.test(t)||t==="")&&n.push(M(a.messages.whitespace,e.fullField))},X,Dt=function(){if(X)return X;var i="[a-fA-F\\d:]",e=function(l){return l&&l.includeBoundaries?"(?:(?<=\\s|^)(?="+i+")|(?<="+i+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",n=(`
|
|
2
2
|
(?:
|
|
3
3
|
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
4
4
|
(?:`+r+":){6}(?:"+t+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bO as A,c as d,an as R,bP as U,bo as M,bQ as F,al as Q,u as q,at as H,aj as J,ap as L,bR as W,bI as E,bS as X,a as z,_ as D,d as B,i as y,o as m,j as N,b as $,y as P,F as Y,r as _,e as u,E as T,n as w,b8 as V,ay as Z,am as tt,bG as et,aO as G,g as ot,w as at}from"./index-
|
|
1
|
+
import{bO as A,c as d,an as R,bP as U,bo as M,bQ as F,al as Q,u as q,at as H,aj as J,ap as L,bR as W,bI as E,bS as X,a as z,_ as D,d as B,i as y,o as m,j as N,b as $,y as P,F as Y,r as _,e as u,E as T,n as w,b8 as V,ay as Z,am as tt,bG as et,aO as G,g as ot,w as at}from"./index-98VGGErr.js";import{u as nt}from"./use-form-item-94xb2lbs.js";import{T as lt}from"./index-r5W6hzzQ.js";const j=Symbol("buttonGroupContextKey"),st=(t,c)=>{A({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},d(()=>t.type==="text"));const n=R(j,void 0),a=U("button"),{form:s}=nt(),l=M(d(()=>n?.size)),o=F(),b=Q(),v=q(),p=d(()=>{var e;return t.type||n?.type||((e=a.value)==null?void 0:e.type)||""}),g=d(()=>{var e,r,i;return(i=(r=t.autoInsertSpace)!=null?r:(e=a.value)==null?void 0:e.autoInsertSpace)!=null?i:!1}),S=d(()=>{var e,r,i;return(i=(r=t.plain)!=null?r:(e=a.value)==null?void 0:e.plain)!=null?i:!1}),h=d(()=>{var e,r,i;return(i=(r=t.round)!=null?r:(e=a.value)==null?void 0:e.round)!=null?i:!1}),k=d(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),C=d(()=>{var e;const r=(e=v.default)==null?void 0:e.call(v);if(g.value&&r?.length===1){const i=r[0];if(i?.type===H){const O=i.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(O.trim())}}return!1});return{_disabled:o,_size:l,_type:p,_ref:b,_props:k,_plain:S,_round:h,shouldAddSpace:C,handleClick:e=>{if(o.value||t.loading){e.stopPropagation();return}t.nativeType==="reset"&&s?.resetFields(),c("click",e)}}},rt=["default","primary","success","warning","info","danger","text",""],it=["button","submit","reset"],x=J({size:X,disabled:Boolean,type:{type:String,values:rt,default:""},icon:{type:E},nativeType:{type:String,values:it,default:"button"},loading:Boolean,loadingIcon:{type:E,default:()=>W},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([String,Object]),default:"button"}}),ct={click:t=>t instanceof MouseEvent};function f(t,c=20){return t.mix("#141414",c).toString()}function ut(t){const c=F(),n=z("button");return d(()=>{let a={},s=t.color;if(s){const l=s.match(/var\((.*?)\)/);l&&(s=window.getComputedStyle(window.document.documentElement).getPropertyValue(l[1]));const o=new lt(s),b=t.dark?o.tint(20).toString():f(o,20);if(t.plain)a=n.cssVarBlock({"bg-color":t.dark?f(o,90):o.tint(90).toString(),"text-color":s,"border-color":t.dark?f(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":b,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":b}),c.value&&(a[n.cssVarBlockName("disabled-bg-color")]=t.dark?f(o,90):o.tint(90).toString(),a[n.cssVarBlockName("disabled-text-color")]=t.dark?f(o,50):o.tint(50).toString(),a[n.cssVarBlockName("disabled-border-color")]=t.dark?f(o,80):o.tint(80).toString());else{const v=t.dark?f(o,30):o.tint(30).toString(),p=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(a=n.cssVarBlock({"bg-color":s,"text-color":p,"border-color":s,"hover-bg-color":v,"hover-text-color":p,"hover-border-color":v,"active-bg-color":b,"active-border-color":b}),c.value){const g=t.dark?f(o,50):o.tint(50).toString();a[n.cssVarBlockName("disabled-bg-color")]=g,a[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,a[n.cssVarBlockName("disabled-border-color")]=g}}}return a})}const dt=B({name:"ElButton"}),bt=B({...dt,props:x,emits:ct,setup(t,{expose:c,emit:n}){const a=t,s=ut(a),l=z("button"),{_ref:o,_size:b,_type:v,_disabled:p,_props:g,_plain:S,_round:h,shouldAddSpace:k,handleClick:C}=st(a,n),I=d(()=>[l.b(),l.m(v.value),l.m(b.value),l.is("disabled",p.value),l.is("loading",a.loading),l.is("plain",S.value),l.is("round",h.value),l.is("circle",a.circle),l.is("text",a.text),l.is("link",a.link),l.is("has-bg",a.bg)]);return c({ref:o,size:b,type:v,disabled:p,shouldAddSpace:k}),(e,r)=>(m(),y(V(e.tag),Z({ref_key:"_ref",ref:o},u(g),{class:u(I),style:u(s),onClick:u(C)}),{default:N(()=>[e.loading?(m(),$(Y,{key:0},[e.$slots.loading?_(e.$slots,"loading",{key:0}):(m(),y(u(T),{key:1,class:w(u(l).is("loading"))},{default:N(()=>[(m(),y(V(e.loadingIcon)))]),_:1},8,["class"]))],64)):e.icon||e.$slots.icon?(m(),y(u(T),{key:1},{default:N(()=>[e.icon?(m(),y(V(e.icon),{key:0})):_(e.$slots,"icon",{key:1})]),_:3})):P("v-if",!0),e.$slots.default?(m(),$("span",{key:2,class:w({[u(l).em("text","expand")]:u(k)})},[_(e.$slots,"default")],2)):P("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var vt=D(bt,[["__file","button.vue"]]);const ft={size:x.size,type:x.type},mt=B({name:"ElButtonGroup"}),pt=B({...mt,props:ft,setup(t){const c=t;tt(j,et({size:G(c,"size"),type:G(c,"type")}));const n=z("button");return(a,s)=>(m(),$("div",{class:w(u(n).b("group"))},[_(a.$slots,"default")],2))}});var K=D(pt,[["__file","button-group.vue"]]);const _t=ot(vt,{ButtonGroup:K});at(K);export{_t as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aj as b,ap as B,_ as w,d as p,a as h,b as u,o as i,i as N,y as S,e as t,dd as E,n as m,as as v,al as I,av as P,aw as $,ak as T,bF as V,aO as j,r as _,F as f,v as g,k as C,ay as y,bf as F,g as O,w as z}from"./index-
|
|
1
|
+
import{aj as b,ap as B,_ as w,d as p,a as h,b as u,o as i,i as N,y as S,e as t,dd as E,n as m,as as v,al as I,av as P,aw as $,ak as T,bF as V,aO as j,r as _,F as f,v as g,k as C,ay as y,bf as F,g as O,w as z}from"./index-98VGGErr.js";const L=b({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:B([Number,Object])}}),R=b({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),H=p({name:"ElSkeletonItem"}),M=p({...H,props:R,setup(l){const e=h("skeleton");return(o,s)=>(i(),u("div",{class:m([t(e).e("item"),t(e).e(o.variant)])},[o.variant==="image"?(i(),N(t(E),{key:0})):S("v-if",!0)],2))}});var c=w(M,[["__file","skeleton-item.vue"]]);const U=(l,e=0)=>{if(e===0)return l;const o=v(e)&&!!e.initVal,s=I(o);let r=null;const a=n=>{if(V(n)){s.value=l.value;return}r&&clearTimeout(r),r=setTimeout(()=>{s.value=l.value},n)},d=n=>{n==="leading"?T(e)?a(e):a(e.leading):v(e)?a(e.trailing):s.value=!1};return P(()=>d("leading")),$(()=>l.value,n=>{d(n?"leading":"trailing")}),s},q=p({name:"ElSkeleton"}),A=p({...q,props:L,setup(l,{expose:e}){const o=l,s=h("skeleton"),r=U(j(o,"loading"),o.throttle);return e({uiLoading:r}),(a,d)=>t(r)?(i(),u("div",y({key:0,class:[t(s).b(),t(s).is("animated",a.animated)]},a.$attrs),[(i(!0),u(f,null,g(a.count,n=>(i(),u(f,{key:n},[t(r)?_(a.$slots,"template",{key:n},()=>[C(c,{class:m(t(s).is("first")),variant:"p"},null,8,["class"]),(i(!0),u(f,null,g(a.rows,k=>(i(),N(c,{key:k,class:m([t(s).e("paragraph"),t(s).is("last",k===a.rows&&a.rows>1)]),variant:"p"},null,8,["class"]))),128))]):S("v-if",!0)],64))),128))],16)):_(a.$slots,"default",F(y({key:1},a.$attrs)))}});var D=w(A,[["__file","skeleton.vue"]]);const J=O(D,{SkeletonItem:c}),K=z(c);export{J as E,K as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,aD as o,aK as u}from"./index-
|
|
1
|
+
import{c as e,aD as o,aK as u}from"./index-98VGGErr.js";const i=["class","style"],E=/^on[A-Z]/,f=(a={})=>{const{excludeListeners:c=!1,excludeKeys:t}=a,l=e(()=>(t?.value||[]).concat(i)),s=u();return s?e(()=>{var n;return o(Object.entries((n=s.proxy)==null?void 0:n.$attrs).filter(([r])=>!l.value.includes(r)&&!(c&&E.test(r))))}):e(()=>({}))};export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aC as tt,al as E,c as u,aj as al,an as ge,bE as nt,as as F,d0 as at,cZ as X,aw as j,aK as ye,_ as Se,d as re,J as ae,K as ke,b as I,o as g,r as k,t as V,x as W,ah as B,n as v,a as se,aW as ol,e as Ee,ca as De,bG as ie,ao as sl,bc as H,y as M,f as he,av as Re,b1 as ot,d2 as st,aN as P,ck as it,bo as rt,bF as be,bx as Ze,bJ as ut,aL as ne,bN as Xe,d3 as dt,ch as Z,aI as ct,cs as pt,cg as il,aB as ft,ak as vt,bh as mt,d4 as bt,ap as le,d5 as Ye,A as ht,bI as _e,cn as gt,bS as yt,l as G,cN as St,k as q,j as L,i as A,F as xe,v as el,D as ll,c8 as te,d6 as Ct,b8 as Ve,d7 as Ot,E as wt,c7 as It,am as rl,bK as Et,cz as Vt,w as ul,g as Tt}from"./index-CAScKEAu.js";import{u as tl,b as kt,E as Dt}from"./index-4lEOv1Ve.js";import{s as Rt,E as Mt}from"./index-Bzr3IjSr.js";import{e as $t}from"./strings-CZWcdhe2.js";import{c as U}from"./castArray-B-n0ZfD-.js";import{i as oe}from"./isEqual-BCLzbsf0.js";import{b as Q,d as Lt}from"./typescript-WjCVvA-y.js";import{u as Nt,a as Bt}from"./use-form-item-DTrPd0ld.js";import{u as Wt,a as Ft}from"./index-DpEzbAMX.js";import{d as Pt}from"./debounce-94P5SC1k.js";import{b as zt}from"./_baseIteratee-CvFPRO8v.js";import{u as Kt}from"./index-C1rnYNjG.js";import{C as At}from"./index-74_Ssoda.js";function Ht(e,o,a,m){e.length;for(var c=a+1;c--;)if(o(e[c],c,e))return c;return-1}function Ut(e,o,a){var m=e==null?0:e.length;if(!m)return-1;var c=m-1;return Ht(e,zt(o),c)}function jt(){const e=tt(),o=E(0),a=11,m=u(()=>({minWidth:`${Math.max(o.value,a)}px`}));return Q(e,()=>{var S,t;o.value=(t=(S=e.value)==null?void 0:S.getBoundingClientRect().width)!=null?t:0}),{calculatorRef:e,calculatorWidth:o,inputStyle:m}}const dl=Symbol("ElSelectGroup"),Ce=Symbol("ElSelect"),Te="ElOption",Gt=al({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function qt(e,o){const a=ge(Ce);a||nt(Te,"usage: <el-select><el-option /></el-select/>");const m=ge(dl,{disabled:!1}),c=u(()=>f(U(a.props.modelValue),e.value)),S=u(()=>{var s;if(a.props.multiple){const p=U((s=a.props.modelValue)!=null?s:[]);return!c.value&&p.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),t=u(()=>{var s;return(s=e.label)!=null?s:F(e.value)?"":e.value}),C=u(()=>e.value||e.label||""),h=u(()=>e.disabled||o.groupDisabled||S.value),b=ye(),f=(s=[],p)=>{if(F(e.value)){const w=a.props.valueKey;return s&&s.some(T=>at(X(T,w))===X(p,w))}else return s&&s.includes(p)},d=()=>{!e.disabled&&!m.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(b.proxy))},i=s=>{const p=new RegExp($t(s),"i");o.visible=p.test(String(t.value))||e.created};return j(()=>t.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),j(()=>e.value,(s,p)=>{const{remote:w,valueKey:T}=a.props;if((w?s!==p:!oe(s,p))&&(a.onOptionDestroy(p,b.proxy),a.onOptionCreate(b.proxy)),!e.created&&!w){if(T&&F(s)&&F(p)&&s[T]===p[T])return;a.setSelected()}}),j(()=>m.disabled,()=>{o.groupDisabled=m.disabled},{immediate:!0}),{select:a,currentLabel:t,currentValue:C,itemSelected:c,isDisabled:h,hoverItem:d,updateOption:i}}const Qt=re({name:Te,componentName:Te,props:Gt,setup(e){const o=se("select"),a=ol(),m=u(()=>[o.be("dropdown","item"),o.is("disabled",Ee(C)),o.is("selected",Ee(t)),o.is("hovering",Ee(i))]),c=ie({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:S,itemSelected:t,isDisabled:C,select:h,hoverItem:b,updateOption:f}=qt(e,c),{visible:d,hover:i}=De(c),s=ye().proxy;h.onOptionCreate(s),sl(()=>{const w=s.value,{selected:T}=h.states,D=T.some(y=>y.value===s.value);H(()=>{h.states.cachedOptions.get(w)===s&&!D&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,s)});function p(){C.value||h.handleOptionSelect(s)}return{ns:o,id:a,containerKls:m,currentLabel:S,itemSelected:t,isDisabled:C,select:h,visible:d,hover:i,states:c,hoverItem:b,updateOption:f,selectOptionClick:p}}});function Jt(e,o){return ae((g(),I("li",{id:e.id,class:v(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:B(e.selectOptionClick,["stop"])},[k(e.$slots,"default",{},()=>[V("span",null,W(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ke,e.visible]])}var Me=Se(Qt,[["render",Jt],["__file","option.vue"]]);const Zt=re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ge(Ce),o=se("select"),a=u(()=>e.props.popperClass),m=u(()=>e.props.multiple),c=u(()=>e.props.fitInputWidth),S=E("");function t(){var C;S.value=`${(C=e.selectRef)==null?void 0:C.offsetWidth}px`}return Re(()=>{t(),Q(e.selectRef,t)}),{ns:o,minWidth:S,popperClass:a,isMultiple:m,isFitInputWidth:c}}});function Xt(e,o,a,m,c,S){return g(),I("div",{class:v([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:he({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),I("div",{key:0,class:v(e.ns.be("dropdown","header"))},[k(e.$slots,"header")],2)):M("v-if",!0),k(e.$slots,"default"),e.$slots.footer?(g(),I("div",{key:1,class:v(e.ns.be("dropdown","footer"))},[k(e.$slots,"footer")],2)):M("v-if",!0)],6)}var Yt=Se(Zt,[["render",Xt],["__file","select-dropdown.vue"]]);const _t=(e,o)=>{const{t:a}=ot(),m=ol(),c=se("select"),S=se("input"),t=ie({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),C=E(),h=E(),b=E(),f=E(),d=E(),i=E(),s=E(),p=E(),w=E(),T=E(),D=E(),y=E(!1),N=E(),{form:ue,formItem:z}=Nt(),{inputId:pl}=Bt(e,{formItemContext:z}),{valueOnClear:fl,isEmptyValue:vl}=st(e),{isComposing:$e,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl}=Wt({afterComposition:l=>He(l)}),Y=u(()=>e.disabled||!!ue?.disabled),{wrapperRef:Le,isFocused:Ne,handleBlur:gl}=Ft(d,{disabled:Y,afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,t.menuVisibleOnFocus=!0)},beforeBlur(l){var n,r;return((n=b.value)==null?void 0:n.isFocusInsideContent(l))||((r=f.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;y.value=!1,t.menuVisibleOnFocus=!1,e.validateEvent&&((l=z?.validate)==null||l.call(z,"blur").catch(n=>Xe()))}}),Oe=u(()=>P(e.modelValue)?e.modelValue.length>0:!vl(e.modelValue)),yl=u(()=>{var l;return(l=ue?.statusIcon)!=null?l:!1}),Sl=u(()=>e.clearable&&!Y.value&&t.inputHovering&&Oe.value),Be=u(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Cl=u(()=>c.is("reverse",!!(Be.value&&y.value))),we=u(()=>z?.validateState||""),Ol=u(()=>we.value&&it[we.value]),wl=u(()=>e.remote?300:0),Il=u(()=>e.remote&&!t.inputValue&&t.options.size===0),El=u(()=>e.loading?e.loadingText||a("el.select.loading"):e.filterable&&t.inputValue&&t.options.size>0&&_.value===0?e.noMatchText||a("el.select.noMatch"):t.options.size===0?e.noDataText||a("el.select.noData"):null),_=u(()=>R.value.filter(l=>l.visible).length),R=u(()=>{const l=Array.from(t.options.values()),n=[];return t.optionValues.forEach(r=>{const O=l.findIndex($=>$.value===r);O>-1&&n.push(l[O])}),n.length>=l.length?n:l}),Vl=u(()=>Array.from(t.cachedOptions.values())),Tl=u(()=>{const l=R.value.filter(n=>!n.created).some(n=>n.currentLabel===t.inputValue);return e.filterable&&e.allowCreate&&t.inputValue!==""&&!l}),We=()=>{e.filterable&&ne(e.filterMethod)||e.filterable&&e.remote&&ne(e.remoteMethod)||R.value.forEach(l=>{var n;(n=l.updateOption)==null||n.call(l,t.inputValue)})},Fe=rt(),kl=u(()=>["small"].includes(Fe.value)?"small":"default"),Dl=u({get(){return y.value&&!Il.value},set(l){y.value=l}}),Rl=u(()=>{if(e.multiple&&!be(e.modelValue))return U(e.modelValue).length===0&&!t.inputValue;const l=P(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||be(l)?!t.inputValue:!0}),Ml=u(()=>{var l;const n=(l=e.placeholder)!=null?l:a("el.select.placeholder");return e.multiple||!Oe.value?n:t.selectedLabel}),$l=u(()=>Ze?null:"mouseenter");j(()=>e.modelValue,(l,n)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(t.inputValue="",de("")),ce(),!oe(l,n)&&e.validateEvent&&z?.validate("change").catch(r=>Xe())},{flush:"post",deep:!0}),j(()=>y.value,l=>{l?de(t.inputValue):(t.inputValue="",t.previousQuery=null,t.isBeforeHide=!0),o("visible-change",l)}),j(()=>t.options.entries(),()=>{ft&&(ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value&&Pe())},{flush:"post"}),j([()=>t.hoveringIndex,R],([l])=>{vt(l)&&l>-1?N.value=R.value[l]||{}:N.value={},R.value.forEach(n=>{n.hover=N.value===n})}),ut(()=>{t.isBeforeHide||We()});const de=l=>{t.previousQuery===l||$e.value||(t.previousQuery=l,e.filterable&&ne(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&ne(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value?H(Pe):H(Ll))},Pe=()=>{const l=R.value.filter($=>$.visible&&!$.disabled&&!$.states.groupDisabled),n=l.find($=>$.created),r=l[0],O=R.value.map($=>$.value);t.hoveringIndex=qe(O,n||r)},ce=()=>{if(e.multiple)t.selectedLabel="";else{const n=P(e.modelValue)?e.modelValue[0]:e.modelValue,r=ze(n);t.selectedLabel=r.currentLabel,t.selected=[r];return}const l=[];be(e.modelValue)||U(e.modelValue).forEach(n=>{l.push(ze(n))}),t.selected=l},ze=l=>{let n;const r=pt(l);for(let J=t.cachedOptions.size-1;J>=0;J--){const K=Vl.value[J];if(r?X(K.value,e.valueKey)===X(l,e.valueKey):K.value===l){n={value:l,currentLabel:K.currentLabel,get isDisabled(){return K.isDisabled}};break}}if(n)return n;const O=r?l.label:l??"";return{value:l,currentLabel:O}},Ll=()=>{t.hoveringIndex=R.value.findIndex(l=>t.selected.some(n=>ve(n)===ve(l)))},Nl=()=>{t.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Bl=()=>{t.collapseItemWidth=T.value.getBoundingClientRect().width},Ie=()=>{var l,n;(n=(l=b.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ke=()=>{var l,n;(n=(l=f.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ae=()=>{t.inputValue.length>0&&!y.value&&(y.value=!0),de(t.inputValue)},He=l=>{if(t.inputValue=l.target.value,e.remote)Ue();else return Ae()},Ue=Pt(()=>{Ae()},wl.value),x=l=>{oe(e.modelValue,l)||o(il,l)},Wl=l=>Ut(l,n=>{const r=t.cachedOptions.get(n);return r&&!r.disabled&&!r.states.groupDisabled}),Fl=l=>{if(e.multiple&&l.code!==ct.delete&&l.target.value.length<=0){const n=U(e.modelValue).slice(),r=Wl(n);if(r<0)return;const O=n[r];n.splice(r,1),o(Z,n),x(n),o("remove-tag",O)}},Pl=(l,n)=>{const r=t.selected.indexOf(n);if(r>-1&&!Y.value){const O=U(e.modelValue).slice();O.splice(r,1),o(Z,O),x(O),o("remove-tag",n.value)}l.stopPropagation(),fe()},je=l=>{l.stopPropagation();const n=e.multiple?[]:fl.value;if(e.multiple)for(const r of t.selected)r.isDisabled&&n.push(r.value);o(Z,n),x(n),t.hoveringIndex=-1,y.value=!1,o("clear"),fe()},Ge=l=>{var n;if(e.multiple){const r=U((n=e.modelValue)!=null?n:[]).slice(),O=qe(r,l);O>-1?r.splice(O,1):(e.multipleLimit<=0||r.length<e.multipleLimit)&&r.push(l.value),o(Z,r),x(r),l.created&&de(""),e.filterable&&!e.reserveKeyword&&(t.inputValue="")}else o(Z,l.value),x(l.value),y.value=!1;fe(),!y.value&&H(()=>{pe(l)})},qe=(l,n)=>be(n)?-1:F(n.value)?l.findIndex(r=>oe(X(r,e.valueKey),ve(n))):l.indexOf(n.value),pe=l=>{var n,r,O,$,J;const K=P(l)?l[0]:l;let me=null;if(K?.value){const ee=R.value.filter(lt=>lt.value===K.value);ee.length>0&&(me=ee[0].$el)}if(b.value&&me){const ee=($=(O=(r=(n=b.value)==null?void 0:n.popperRef)==null?void 0:r.contentRef)==null?void 0:O.querySelector)==null?void 0:$.call(O,`.${c.be("dropdown","wrap")}`);ee&&dt(ee,me)}(J=D.value)==null||J.handleScroll()},zl=l=>{t.options.set(l.value,l),t.cachedOptions.set(l.value,l)},Kl=(l,n)=>{t.options.get(l)===n&&t.options.delete(l)},Al=u(()=>{var l,n;return(n=(l=b.value)==null?void 0:l.popperRef)==null?void 0:n.contentRef}),Hl=()=>{t.isBeforeHide=!1,H(()=>{var l;(l=D.value)==null||l.update(),pe(t.selected)})},fe=()=>{var l;(l=d.value)==null||l.focus()},Ul=()=>{var l;if(y.value){y.value=!1,H(()=>{var n;return(n=d.value)==null?void 0:n.blur()});return}(l=d.value)==null||l.blur()},jl=l=>{je(l)},Gl=l=>{if(y.value=!1,Ne.value){const n=new FocusEvent("focus",l);H(()=>gl(n))}},ql=()=>{t.inputValue.length>0?t.inputValue="":y.value=!1},Qe=()=>{Y.value||(Ze&&(t.inputHovering=!0),t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:y.value=!y.value)},Ql=()=>{if(!y.value)Qe();else{const l=R.value[t.hoveringIndex];l&&!l.isDisabled&&Ge(l)}},ve=l=>F(l.value)?X(l.value,e.valueKey):l.value,Jl=u(()=>R.value.filter(l=>l.visible).every(l=>l.isDisabled)),Zl=u(()=>e.multiple?e.collapseTags?t.selected.slice(0,e.maxCollapseTags):t.selected:[]),Xl=u(()=>e.multiple?e.collapseTags?t.selected.slice(e.maxCollapseTags):[]:[]),Je=l=>{if(!y.value){y.value=!0;return}if(!(t.options.size===0||_.value===0||$e.value)&&!Jl.value){l==="next"?(t.hoveringIndex++,t.hoveringIndex===t.options.size&&(t.hoveringIndex=0)):l==="prev"&&(t.hoveringIndex--,t.hoveringIndex<0&&(t.hoveringIndex=t.options.size-1));const n=R.value[t.hoveringIndex];(n.isDisabled||!n.visible)&&Je(l),H(()=>pe(N.value))}},Yl=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},_l=u(()=>{const l=Yl();return{maxWidth:`${T.value&&e.maxCollapseTags===1?t.selectionWidth-t.collapseItemWidth-l:t.selectionWidth}px`}}),xl=u(()=>({maxWidth:`${t.selectionWidth}px`})),et=l=>{o("popup-scroll",l)};return Q(h,Nl),Q(p,Ie),Q(Le,Ie),Q(w,Ke),Q(T,Bl),Re(()=>{ce()}),{inputId:pl,contentId:m,nsSelect:c,nsInput:S,states:t,isFocused:Ne,expanded:y,optionsArray:R,hoverOption:N,selectSize:Fe,filteredOptionsCount:_,updateTooltip:Ie,updateTagTooltip:Ke,debouncedOnInputChange:Ue,onInput:He,deletePrevTag:Fl,deleteTag:Pl,deleteSelected:je,handleOptionSelect:Ge,scrollToOption:pe,hasModelValue:Oe,shouldShowPlaceholder:Rl,currentPlaceholder:Ml,mouseEnterEventName:$l,needStatusIcon:yl,showClose:Sl,iconComponent:Be,iconReverse:Cl,validateState:we,validateIcon:Ol,showNewOption:Tl,updateOptions:We,collapseTagSize:kl,setSelected:ce,selectDisabled:Y,emptyText:El,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl,onOptionCreate:zl,onOptionDestroy:Kl,handleMenuEnter:Hl,focus:fe,blur:Ul,handleClearClick:jl,handleClickOutside:Gl,handleEsc:ql,toggleMenu:Qe,selectOption:Ql,getValueKey:ve,navigateOptions:Je,dropdownMenuVisible:Dl,showTagList:Zl,collapseTagList:Xl,popupScroll:et,tagStyle:_l,collapseTagStyle:xl,popperRef:Al,inputRef:d,tooltipRef:b,tagTooltipRef:f,prefixRef:i,suffixRef:s,selectRef:C,wrapperRef:Le,selectionRef:h,scrollbarRef:D,menuRef:p,tagMenuRef:w,collapseItemRef:T}};var xt=re({name:"ElOptions",setup(e,{slots:o}){const a=ge(Ce);let m=[];return()=>{var c,S;const t=(c=o.default)==null?void 0:c.call(o),C=[];function h(b){P(b)&&b.forEach(f=>{var d,i,s,p;const w=(d=f?.type||{})==null?void 0:d.name;w==="ElOptionGroup"?h(!mt(f.children)&&!P(f.children)&&ne((i=f.children)==null?void 0:i.default)?(s=f.children)==null?void 0:s.default():f.children):w==="ElOption"?C.push((p=f.props)==null?void 0:p.value):P(f.children)&&h(f.children)})}return t.length&&h((S=t[0])==null?void 0:S.children),oe(C,m)||(m=C,a&&(a.states.optionValues=C)),t}}});const en=al({name:String,id:String,modelValue:{type:le([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:yt,effect:{type:le(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:le(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:tl.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:_e,default:gt},fitInputWidth:Boolean,suffixIcon:{type:_e,default:ht},tagType:{...Ye.type,default:"info"},tagEffect:{...Ye.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:le(String),values:kt,default:"bottom-start"},fallbackPlacements:{type:le(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:tl.appendTo,...bt,...Kt(["ariaLabel"])});Rt.scroll;const nl="ElSelect",ln=re({name:nl,componentName:nl,components:{ElSelectMenu:Yt,ElOption:Me,ElOptions:xt,ElTag:It,ElScrollbar:Mt,ElTooltip:Dt,ElIcon:wt},directives:{ClickOutside:At},props:en,emits:[Z,il,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:o,slots:a}){const m=ye();m.appContext.config.warnHandler=(...i)=>{!i[0]||i[0].includes('Slot "default" invoked outside of the render function')||console.warn(...i)};const c=u(()=>{const{modelValue:i,multiple:s}=e,p=s?[]:void 0;return P(i)?s?i:p:s?p:i}),S=ie({...De(e),modelValue:c}),t=_t(S,o),{calculatorRef:C,inputStyle:h}=jt(),b=i=>i.reduce((s,p)=>(s.push(p),p.children&&p.children.length>0&&s.push(...b(p.children)),s),[]),f=i=>{Et(i||[]).forEach(p=>{var w;if(F(p)&&(p.type.name==="ElOption"||p.type.name==="ElTree")){const T=p.type.name;if(T==="ElTree"){const D=((w=p.props)==null?void 0:w.data)||[];b(D).forEach(N=>{N.currentLabel=N.label||(F(N.value)?"":N.value),t.onOptionCreate(N)})}else if(T==="ElOption"){const D={...p.props};D.currentLabel=D.label||(F(D.value)?"":D.value),t.onOptionCreate(D)}}})};j(()=>{var i;return(i=a.default)==null?void 0:i.call(a)},i=>{e.persistent||f(i)},{immediate:!0}),rl(Ce,ie({props:S,states:t.states,selectRef:t.selectRef,optionsArray:t.optionsArray,setSelected:t.setSelected,handleOptionSelect:t.handleOptionSelect,onOptionCreate:t.onOptionCreate,onOptionDestroy:t.onOptionDestroy}));const d=u(()=>e.multiple?t.states.selected.map(i=>i.currentLabel):t.states.selectedLabel);return sl(()=>{m.appContext.config.warnHandler=void 0}),{...t,modelValue:c,selectedLabel:d,calculatorRef:C,inputStyle:h}}});function tn(e,o){const a=G("el-tag"),m=G("el-tooltip"),c=G("el-icon"),S=G("el-option"),t=G("el-options"),C=G("el-scrollbar"),h=G("el-select-menu"),b=St("click-outside");return ae((g(),I("div",{ref:"selectRef",class:v([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[Ot(e.mouseEnterEventName)]:f=>e.states.inputHovering=!0,onMouseleave:f=>e.states.inputHovering=!1},[q(m,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:f=>e.states.isBeforeHide=!1},{default:L(()=>{var f;return[V("div",{ref:"wrapperRef",class:v([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:B(e.toggleMenu,["prevent"])},[e.$slots.prefix?(g(),I("div",{key:0,ref:"prefixRef",class:v(e.nsSelect.e("prefix"))},[k(e.$slots,"prefix")],2)):M("v-if",!0),V("div",{ref:"selectionRef",class:v([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?k(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(g(!0),I(xe,null,el(e.showTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.tagStyle),onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),A(m,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,teleported:e.teleported},{default:L(()=>[V("div",{ref:"collapseItemRef",class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.collapseTagStyle)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))}," + "+W(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:L(()=>[V("div",{ref:"tagMenuRef",class:v(e.nsSelect.e("selection"))},[(g(!0),I(xe,null,el(e.collapseTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):M("v-if",!0)]):M("v-if",!0),V("div",{class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[ae(V("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:v([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:he(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((f=e.hoverOption)==null?void 0:f.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[te(B(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),te(B(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),te(B(e.handleEsc,["stop","prevent"]),["esc"]),te(B(e.selectOption,["stop","prevent"]),["enter"]),te(B(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:B(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ct,e.states.inputValue]]),e.filterable?(g(),I("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:v(e.nsSelect.e("input-calculator")),textContent:W(e.states.inputValue)},null,10,["textContent"])):M("v-if",!0)],2),e.shouldShowPlaceholder?(g(),I("div",{key:1,class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?k(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[V("span",null,W(e.currentPlaceholder),1)]):(g(),I("span",{key:1},W(e.currentPlaceholder),1))],2)):M("v-if",!0)],2),V("div",{ref:"suffixRef",class:v(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),A(c,{key:0,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:L(()=>[(g(),A(Ve(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),e.showClose&&e.clearIcon?(g(),A(c,{key:1,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:L(()=>[(g(),A(Ve(e.clearIcon)))]),_:1},8,["class","onClick"])):M("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(g(),A(c,{key:2,class:v([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:L(()=>[(g(),A(Ve(e.validateIcon)))]),_:1},8,["class"])):M("v-if",!0)],2)],10,["onClick"])]}),content:L(()=>[q(h,{ref:"menuRef"},{default:L(()=>[e.$slots.header?(g(),I("div",{key:0,class:v(e.nsSelect.be("dropdown","header")),onClick:B(()=>{},["stop"])},[k(e.$slots,"header")],10,["onClick"])):M("v-if",!0),ae(q(C,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:v([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:L(()=>[e.showNewOption?(g(),A(S,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):M("v-if",!0),q(t,null,{default:L(()=>[k(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ke,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),I("div",{key:1,class:v(e.nsSelect.be("dropdown","loading"))},[k(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),I("div",{key:2,class:v(e.nsSelect.be("dropdown","empty"))},[k(e.$slots,"empty",{},()=>[V("span",null,W(e.emptyText),1)])],2)):M("v-if",!0),e.$slots.footer?(g(),I("div",{key:3,class:v(e.nsSelect.be("dropdown","footer")),onClick:B(()=>{},["stop"])},[k(e.$slots,"footer")],10,["onClick"])):M("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[b,e.handleClickOutside,e.popperRef]])}var nn=Se(ln,[["render",tn],["__file","select.vue"]]);const an=re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=se("select"),a=E(),m=ye(),c=E([]);rl(dl,ie({...De(e)}));const S=u(()=>c.value.some(b=>b.visible===!0)),t=b=>{var f;return b.type.name==="ElOption"&&!!((f=b.component)!=null&&f.proxy)},C=b=>{const f=U(b),d=[];return f.forEach(i=>{var s;Vt(i)&&(t(i)?d.push(i.component.proxy):P(i.children)&&i.children.length?d.push(...C(i.children)):(s=i.component)!=null&&s.subTree&&d.push(...C(i.component.subTree)))}),d},h=()=>{c.value=C(m.subTree)};return Re(()=>{h()}),Lt(a,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:S,ns:o}}});function on(e,o,a,m,c,S){return ae((g(),I("ul",{ref:"groupRef",class:v(e.ns.be("group","wrap"))},[V("li",{class:v(e.ns.be("group","title"))},W(e.label),3),V("li",null,[V("ul",{class:v(e.ns.b("group"))},[k(e.$slots,"default")],2)])],2)),[[ke,e.visible]])}var cl=Se(an,[["render",on],["__file","option-group.vue"]]);const Sn=Tt(nn,{Option:Me,OptionGroup:cl}),Cn=ul(Me);ul(cl);export{Cn as E,Sn as a};
|
|
1
|
+
import{aC as tt,al as E,c as u,aj as al,an as ge,bE as nt,as as F,d0 as at,cZ as X,aw as j,aK as ye,_ as Se,d as re,J as ae,K as ke,b as I,o as g,r as k,t as V,x as W,ah as B,n as v,a as se,aW as ol,e as Ee,ca as De,bG as ie,ao as sl,bc as H,y as M,f as he,av as Re,b1 as ot,d2 as st,aN as P,ck as it,bo as rt,bF as be,bx as Ze,bJ as ut,aL as ne,bN as Xe,d3 as dt,ch as Z,aI as ct,cs as pt,cg as il,aB as ft,ak as vt,bh as mt,d4 as bt,ap as le,d5 as Ye,A as ht,bI as _e,cn as gt,bS as yt,l as G,cN as St,k as q,j as L,i as A,F as xe,v as el,D as ll,c8 as te,d6 as Ct,b8 as Ve,d7 as Ot,E as wt,c7 as It,am as rl,bK as Et,cz as Vt,w as ul,g as Tt}from"./index-98VGGErr.js";import{u as tl,b as kt,E as Dt}from"./index-DfAeDMXy.js";import{s as Rt,E as Mt}from"./index-CEAOvLtE.js";import{e as $t}from"./strings-BCHZaT3A.js";import{c as U}from"./castArray-DKMGoQO3.js";import{i as oe}from"./isEqual-0nIQYJnJ.js";import{b as Q,d as Lt}from"./typescript-1ic-flAv.js";import{u as Nt,a as Bt}from"./use-form-item-94xb2lbs.js";import{u as Wt,a as Ft}from"./index-DvdaM5kg.js";import{d as Pt}from"./debounce-CH-Z-bEk.js";import{b as zt}from"./_baseIteratee-CxKAS7w7.js";import{u as Kt}from"./index-DQLaLsnP.js";import{C as At}from"./index-ByXZ-2lh.js";function Ht(e,o,a,m){e.length;for(var c=a+1;c--;)if(o(e[c],c,e))return c;return-1}function Ut(e,o,a){var m=e==null?0:e.length;if(!m)return-1;var c=m-1;return Ht(e,zt(o),c)}function jt(){const e=tt(),o=E(0),a=11,m=u(()=>({minWidth:`${Math.max(o.value,a)}px`}));return Q(e,()=>{var S,t;o.value=(t=(S=e.value)==null?void 0:S.getBoundingClientRect().width)!=null?t:0}),{calculatorRef:e,calculatorWidth:o,inputStyle:m}}const dl=Symbol("ElSelectGroup"),Ce=Symbol("ElSelect"),Te="ElOption",Gt=al({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function qt(e,o){const a=ge(Ce);a||nt(Te,"usage: <el-select><el-option /></el-select/>");const m=ge(dl,{disabled:!1}),c=u(()=>f(U(a.props.modelValue),e.value)),S=u(()=>{var s;if(a.props.multiple){const p=U((s=a.props.modelValue)!=null?s:[]);return!c.value&&p.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),t=u(()=>{var s;return(s=e.label)!=null?s:F(e.value)?"":e.value}),C=u(()=>e.value||e.label||""),h=u(()=>e.disabled||o.groupDisabled||S.value),b=ye(),f=(s=[],p)=>{if(F(e.value)){const w=a.props.valueKey;return s&&s.some(T=>at(X(T,w))===X(p,w))}else return s&&s.includes(p)},d=()=>{!e.disabled&&!m.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(b.proxy))},i=s=>{const p=new RegExp($t(s),"i");o.visible=p.test(String(t.value))||e.created};return j(()=>t.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),j(()=>e.value,(s,p)=>{const{remote:w,valueKey:T}=a.props;if((w?s!==p:!oe(s,p))&&(a.onOptionDestroy(p,b.proxy),a.onOptionCreate(b.proxy)),!e.created&&!w){if(T&&F(s)&&F(p)&&s[T]===p[T])return;a.setSelected()}}),j(()=>m.disabled,()=>{o.groupDisabled=m.disabled},{immediate:!0}),{select:a,currentLabel:t,currentValue:C,itemSelected:c,isDisabled:h,hoverItem:d,updateOption:i}}const Qt=re({name:Te,componentName:Te,props:Gt,setup(e){const o=se("select"),a=ol(),m=u(()=>[o.be("dropdown","item"),o.is("disabled",Ee(C)),o.is("selected",Ee(t)),o.is("hovering",Ee(i))]),c=ie({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:S,itemSelected:t,isDisabled:C,select:h,hoverItem:b,updateOption:f}=qt(e,c),{visible:d,hover:i}=De(c),s=ye().proxy;h.onOptionCreate(s),sl(()=>{const w=s.value,{selected:T}=h.states,D=T.some(y=>y.value===s.value);H(()=>{h.states.cachedOptions.get(w)===s&&!D&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,s)});function p(){C.value||h.handleOptionSelect(s)}return{ns:o,id:a,containerKls:m,currentLabel:S,itemSelected:t,isDisabled:C,select:h,visible:d,hover:i,states:c,hoverItem:b,updateOption:f,selectOptionClick:p}}});function Jt(e,o){return ae((g(),I("li",{id:e.id,class:v(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:B(e.selectOptionClick,["stop"])},[k(e.$slots,"default",{},()=>[V("span",null,W(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ke,e.visible]])}var Me=Se(Qt,[["render",Jt],["__file","option.vue"]]);const Zt=re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ge(Ce),o=se("select"),a=u(()=>e.props.popperClass),m=u(()=>e.props.multiple),c=u(()=>e.props.fitInputWidth),S=E("");function t(){var C;S.value=`${(C=e.selectRef)==null?void 0:C.offsetWidth}px`}return Re(()=>{t(),Q(e.selectRef,t)}),{ns:o,minWidth:S,popperClass:a,isMultiple:m,isFitInputWidth:c}}});function Xt(e,o,a,m,c,S){return g(),I("div",{class:v([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:he({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),I("div",{key:0,class:v(e.ns.be("dropdown","header"))},[k(e.$slots,"header")],2)):M("v-if",!0),k(e.$slots,"default"),e.$slots.footer?(g(),I("div",{key:1,class:v(e.ns.be("dropdown","footer"))},[k(e.$slots,"footer")],2)):M("v-if",!0)],6)}var Yt=Se(Zt,[["render",Xt],["__file","select-dropdown.vue"]]);const _t=(e,o)=>{const{t:a}=ot(),m=ol(),c=se("select"),S=se("input"),t=ie({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),C=E(),h=E(),b=E(),f=E(),d=E(),i=E(),s=E(),p=E(),w=E(),T=E(),D=E(),y=E(!1),N=E(),{form:ue,formItem:z}=Nt(),{inputId:pl}=Bt(e,{formItemContext:z}),{valueOnClear:fl,isEmptyValue:vl}=st(e),{isComposing:$e,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl}=Wt({afterComposition:l=>He(l)}),Y=u(()=>e.disabled||!!ue?.disabled),{wrapperRef:Le,isFocused:Ne,handleBlur:gl}=Ft(d,{disabled:Y,afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,t.menuVisibleOnFocus=!0)},beforeBlur(l){var n,r;return((n=b.value)==null?void 0:n.isFocusInsideContent(l))||((r=f.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;y.value=!1,t.menuVisibleOnFocus=!1,e.validateEvent&&((l=z?.validate)==null||l.call(z,"blur").catch(n=>Xe()))}}),Oe=u(()=>P(e.modelValue)?e.modelValue.length>0:!vl(e.modelValue)),yl=u(()=>{var l;return(l=ue?.statusIcon)!=null?l:!1}),Sl=u(()=>e.clearable&&!Y.value&&t.inputHovering&&Oe.value),Be=u(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Cl=u(()=>c.is("reverse",!!(Be.value&&y.value))),we=u(()=>z?.validateState||""),Ol=u(()=>we.value&&it[we.value]),wl=u(()=>e.remote?300:0),Il=u(()=>e.remote&&!t.inputValue&&t.options.size===0),El=u(()=>e.loading?e.loadingText||a("el.select.loading"):e.filterable&&t.inputValue&&t.options.size>0&&_.value===0?e.noMatchText||a("el.select.noMatch"):t.options.size===0?e.noDataText||a("el.select.noData"):null),_=u(()=>R.value.filter(l=>l.visible).length),R=u(()=>{const l=Array.from(t.options.values()),n=[];return t.optionValues.forEach(r=>{const O=l.findIndex($=>$.value===r);O>-1&&n.push(l[O])}),n.length>=l.length?n:l}),Vl=u(()=>Array.from(t.cachedOptions.values())),Tl=u(()=>{const l=R.value.filter(n=>!n.created).some(n=>n.currentLabel===t.inputValue);return e.filterable&&e.allowCreate&&t.inputValue!==""&&!l}),We=()=>{e.filterable&&ne(e.filterMethod)||e.filterable&&e.remote&&ne(e.remoteMethod)||R.value.forEach(l=>{var n;(n=l.updateOption)==null||n.call(l,t.inputValue)})},Fe=rt(),kl=u(()=>["small"].includes(Fe.value)?"small":"default"),Dl=u({get(){return y.value&&!Il.value},set(l){y.value=l}}),Rl=u(()=>{if(e.multiple&&!be(e.modelValue))return U(e.modelValue).length===0&&!t.inputValue;const l=P(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||be(l)?!t.inputValue:!0}),Ml=u(()=>{var l;const n=(l=e.placeholder)!=null?l:a("el.select.placeholder");return e.multiple||!Oe.value?n:t.selectedLabel}),$l=u(()=>Ze?null:"mouseenter");j(()=>e.modelValue,(l,n)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(t.inputValue="",de("")),ce(),!oe(l,n)&&e.validateEvent&&z?.validate("change").catch(r=>Xe())},{flush:"post",deep:!0}),j(()=>y.value,l=>{l?de(t.inputValue):(t.inputValue="",t.previousQuery=null,t.isBeforeHide=!0),o("visible-change",l)}),j(()=>t.options.entries(),()=>{ft&&(ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value&&Pe())},{flush:"post"}),j([()=>t.hoveringIndex,R],([l])=>{vt(l)&&l>-1?N.value=R.value[l]||{}:N.value={},R.value.forEach(n=>{n.hover=N.value===n})}),ut(()=>{t.isBeforeHide||We()});const de=l=>{t.previousQuery===l||$e.value||(t.previousQuery=l,e.filterable&&ne(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&ne(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value?H(Pe):H(Ll))},Pe=()=>{const l=R.value.filter($=>$.visible&&!$.disabled&&!$.states.groupDisabled),n=l.find($=>$.created),r=l[0],O=R.value.map($=>$.value);t.hoveringIndex=qe(O,n||r)},ce=()=>{if(e.multiple)t.selectedLabel="";else{const n=P(e.modelValue)?e.modelValue[0]:e.modelValue,r=ze(n);t.selectedLabel=r.currentLabel,t.selected=[r];return}const l=[];be(e.modelValue)||U(e.modelValue).forEach(n=>{l.push(ze(n))}),t.selected=l},ze=l=>{let n;const r=pt(l);for(let J=t.cachedOptions.size-1;J>=0;J--){const K=Vl.value[J];if(r?X(K.value,e.valueKey)===X(l,e.valueKey):K.value===l){n={value:l,currentLabel:K.currentLabel,get isDisabled(){return K.isDisabled}};break}}if(n)return n;const O=r?l.label:l??"";return{value:l,currentLabel:O}},Ll=()=>{t.hoveringIndex=R.value.findIndex(l=>t.selected.some(n=>ve(n)===ve(l)))},Nl=()=>{t.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Bl=()=>{t.collapseItemWidth=T.value.getBoundingClientRect().width},Ie=()=>{var l,n;(n=(l=b.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ke=()=>{var l,n;(n=(l=f.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ae=()=>{t.inputValue.length>0&&!y.value&&(y.value=!0),de(t.inputValue)},He=l=>{if(t.inputValue=l.target.value,e.remote)Ue();else return Ae()},Ue=Pt(()=>{Ae()},wl.value),x=l=>{oe(e.modelValue,l)||o(il,l)},Wl=l=>Ut(l,n=>{const r=t.cachedOptions.get(n);return r&&!r.disabled&&!r.states.groupDisabled}),Fl=l=>{if(e.multiple&&l.code!==ct.delete&&l.target.value.length<=0){const n=U(e.modelValue).slice(),r=Wl(n);if(r<0)return;const O=n[r];n.splice(r,1),o(Z,n),x(n),o("remove-tag",O)}},Pl=(l,n)=>{const r=t.selected.indexOf(n);if(r>-1&&!Y.value){const O=U(e.modelValue).slice();O.splice(r,1),o(Z,O),x(O),o("remove-tag",n.value)}l.stopPropagation(),fe()},je=l=>{l.stopPropagation();const n=e.multiple?[]:fl.value;if(e.multiple)for(const r of t.selected)r.isDisabled&&n.push(r.value);o(Z,n),x(n),t.hoveringIndex=-1,y.value=!1,o("clear"),fe()},Ge=l=>{var n;if(e.multiple){const r=U((n=e.modelValue)!=null?n:[]).slice(),O=qe(r,l);O>-1?r.splice(O,1):(e.multipleLimit<=0||r.length<e.multipleLimit)&&r.push(l.value),o(Z,r),x(r),l.created&&de(""),e.filterable&&!e.reserveKeyword&&(t.inputValue="")}else o(Z,l.value),x(l.value),y.value=!1;fe(),!y.value&&H(()=>{pe(l)})},qe=(l,n)=>be(n)?-1:F(n.value)?l.findIndex(r=>oe(X(r,e.valueKey),ve(n))):l.indexOf(n.value),pe=l=>{var n,r,O,$,J;const K=P(l)?l[0]:l;let me=null;if(K?.value){const ee=R.value.filter(lt=>lt.value===K.value);ee.length>0&&(me=ee[0].$el)}if(b.value&&me){const ee=($=(O=(r=(n=b.value)==null?void 0:n.popperRef)==null?void 0:r.contentRef)==null?void 0:O.querySelector)==null?void 0:$.call(O,`.${c.be("dropdown","wrap")}`);ee&&dt(ee,me)}(J=D.value)==null||J.handleScroll()},zl=l=>{t.options.set(l.value,l),t.cachedOptions.set(l.value,l)},Kl=(l,n)=>{t.options.get(l)===n&&t.options.delete(l)},Al=u(()=>{var l,n;return(n=(l=b.value)==null?void 0:l.popperRef)==null?void 0:n.contentRef}),Hl=()=>{t.isBeforeHide=!1,H(()=>{var l;(l=D.value)==null||l.update(),pe(t.selected)})},fe=()=>{var l;(l=d.value)==null||l.focus()},Ul=()=>{var l;if(y.value){y.value=!1,H(()=>{var n;return(n=d.value)==null?void 0:n.blur()});return}(l=d.value)==null||l.blur()},jl=l=>{je(l)},Gl=l=>{if(y.value=!1,Ne.value){const n=new FocusEvent("focus",l);H(()=>gl(n))}},ql=()=>{t.inputValue.length>0?t.inputValue="":y.value=!1},Qe=()=>{Y.value||(Ze&&(t.inputHovering=!0),t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:y.value=!y.value)},Ql=()=>{if(!y.value)Qe();else{const l=R.value[t.hoveringIndex];l&&!l.isDisabled&&Ge(l)}},ve=l=>F(l.value)?X(l.value,e.valueKey):l.value,Jl=u(()=>R.value.filter(l=>l.visible).every(l=>l.isDisabled)),Zl=u(()=>e.multiple?e.collapseTags?t.selected.slice(0,e.maxCollapseTags):t.selected:[]),Xl=u(()=>e.multiple?e.collapseTags?t.selected.slice(e.maxCollapseTags):[]:[]),Je=l=>{if(!y.value){y.value=!0;return}if(!(t.options.size===0||_.value===0||$e.value)&&!Jl.value){l==="next"?(t.hoveringIndex++,t.hoveringIndex===t.options.size&&(t.hoveringIndex=0)):l==="prev"&&(t.hoveringIndex--,t.hoveringIndex<0&&(t.hoveringIndex=t.options.size-1));const n=R.value[t.hoveringIndex];(n.isDisabled||!n.visible)&&Je(l),H(()=>pe(N.value))}},Yl=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},_l=u(()=>{const l=Yl();return{maxWidth:`${T.value&&e.maxCollapseTags===1?t.selectionWidth-t.collapseItemWidth-l:t.selectionWidth}px`}}),xl=u(()=>({maxWidth:`${t.selectionWidth}px`})),et=l=>{o("popup-scroll",l)};return Q(h,Nl),Q(p,Ie),Q(Le,Ie),Q(w,Ke),Q(T,Bl),Re(()=>{ce()}),{inputId:pl,contentId:m,nsSelect:c,nsInput:S,states:t,isFocused:Ne,expanded:y,optionsArray:R,hoverOption:N,selectSize:Fe,filteredOptionsCount:_,updateTooltip:Ie,updateTagTooltip:Ke,debouncedOnInputChange:Ue,onInput:He,deletePrevTag:Fl,deleteTag:Pl,deleteSelected:je,handleOptionSelect:Ge,scrollToOption:pe,hasModelValue:Oe,shouldShowPlaceholder:Rl,currentPlaceholder:Ml,mouseEnterEventName:$l,needStatusIcon:yl,showClose:Sl,iconComponent:Be,iconReverse:Cl,validateState:we,validateIcon:Ol,showNewOption:Tl,updateOptions:We,collapseTagSize:kl,setSelected:ce,selectDisabled:Y,emptyText:El,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl,onOptionCreate:zl,onOptionDestroy:Kl,handleMenuEnter:Hl,focus:fe,blur:Ul,handleClearClick:jl,handleClickOutside:Gl,handleEsc:ql,toggleMenu:Qe,selectOption:Ql,getValueKey:ve,navigateOptions:Je,dropdownMenuVisible:Dl,showTagList:Zl,collapseTagList:Xl,popupScroll:et,tagStyle:_l,collapseTagStyle:xl,popperRef:Al,inputRef:d,tooltipRef:b,tagTooltipRef:f,prefixRef:i,suffixRef:s,selectRef:C,wrapperRef:Le,selectionRef:h,scrollbarRef:D,menuRef:p,tagMenuRef:w,collapseItemRef:T}};var xt=re({name:"ElOptions",setup(e,{slots:o}){const a=ge(Ce);let m=[];return()=>{var c,S;const t=(c=o.default)==null?void 0:c.call(o),C=[];function h(b){P(b)&&b.forEach(f=>{var d,i,s,p;const w=(d=f?.type||{})==null?void 0:d.name;w==="ElOptionGroup"?h(!mt(f.children)&&!P(f.children)&&ne((i=f.children)==null?void 0:i.default)?(s=f.children)==null?void 0:s.default():f.children):w==="ElOption"?C.push((p=f.props)==null?void 0:p.value):P(f.children)&&h(f.children)})}return t.length&&h((S=t[0])==null?void 0:S.children),oe(C,m)||(m=C,a&&(a.states.optionValues=C)),t}}});const en=al({name:String,id:String,modelValue:{type:le([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:yt,effect:{type:le(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:le(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:tl.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:_e,default:gt},fitInputWidth:Boolean,suffixIcon:{type:_e,default:ht},tagType:{...Ye.type,default:"info"},tagEffect:{...Ye.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:le(String),values:kt,default:"bottom-start"},fallbackPlacements:{type:le(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:tl.appendTo,...bt,...Kt(["ariaLabel"])});Rt.scroll;const nl="ElSelect",ln=re({name:nl,componentName:nl,components:{ElSelectMenu:Yt,ElOption:Me,ElOptions:xt,ElTag:It,ElScrollbar:Mt,ElTooltip:Dt,ElIcon:wt},directives:{ClickOutside:At},props:en,emits:[Z,il,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:o,slots:a}){const m=ye();m.appContext.config.warnHandler=(...i)=>{!i[0]||i[0].includes('Slot "default" invoked outside of the render function')||console.warn(...i)};const c=u(()=>{const{modelValue:i,multiple:s}=e,p=s?[]:void 0;return P(i)?s?i:p:s?p:i}),S=ie({...De(e),modelValue:c}),t=_t(S,o),{calculatorRef:C,inputStyle:h}=jt(),b=i=>i.reduce((s,p)=>(s.push(p),p.children&&p.children.length>0&&s.push(...b(p.children)),s),[]),f=i=>{Et(i||[]).forEach(p=>{var w;if(F(p)&&(p.type.name==="ElOption"||p.type.name==="ElTree")){const T=p.type.name;if(T==="ElTree"){const D=((w=p.props)==null?void 0:w.data)||[];b(D).forEach(N=>{N.currentLabel=N.label||(F(N.value)?"":N.value),t.onOptionCreate(N)})}else if(T==="ElOption"){const D={...p.props};D.currentLabel=D.label||(F(D.value)?"":D.value),t.onOptionCreate(D)}}})};j(()=>{var i;return(i=a.default)==null?void 0:i.call(a)},i=>{e.persistent||f(i)},{immediate:!0}),rl(Ce,ie({props:S,states:t.states,selectRef:t.selectRef,optionsArray:t.optionsArray,setSelected:t.setSelected,handleOptionSelect:t.handleOptionSelect,onOptionCreate:t.onOptionCreate,onOptionDestroy:t.onOptionDestroy}));const d=u(()=>e.multiple?t.states.selected.map(i=>i.currentLabel):t.states.selectedLabel);return sl(()=>{m.appContext.config.warnHandler=void 0}),{...t,modelValue:c,selectedLabel:d,calculatorRef:C,inputStyle:h}}});function tn(e,o){const a=G("el-tag"),m=G("el-tooltip"),c=G("el-icon"),S=G("el-option"),t=G("el-options"),C=G("el-scrollbar"),h=G("el-select-menu"),b=St("click-outside");return ae((g(),I("div",{ref:"selectRef",class:v([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[Ot(e.mouseEnterEventName)]:f=>e.states.inputHovering=!0,onMouseleave:f=>e.states.inputHovering=!1},[q(m,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:f=>e.states.isBeforeHide=!1},{default:L(()=>{var f;return[V("div",{ref:"wrapperRef",class:v([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:B(e.toggleMenu,["prevent"])},[e.$slots.prefix?(g(),I("div",{key:0,ref:"prefixRef",class:v(e.nsSelect.e("prefix"))},[k(e.$slots,"prefix")],2)):M("v-if",!0),V("div",{ref:"selectionRef",class:v([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?k(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(g(!0),I(xe,null,el(e.showTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.tagStyle),onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),A(m,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,teleported:e.teleported},{default:L(()=>[V("div",{ref:"collapseItemRef",class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.collapseTagStyle)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))}," + "+W(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:L(()=>[V("div",{ref:"tagMenuRef",class:v(e.nsSelect.e("selection"))},[(g(!0),I(xe,null,el(e.collapseTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):M("v-if",!0)]):M("v-if",!0),V("div",{class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[ae(V("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:v([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:he(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((f=e.hoverOption)==null?void 0:f.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[te(B(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),te(B(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),te(B(e.handleEsc,["stop","prevent"]),["esc"]),te(B(e.selectOption,["stop","prevent"]),["enter"]),te(B(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:B(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ct,e.states.inputValue]]),e.filterable?(g(),I("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:v(e.nsSelect.e("input-calculator")),textContent:W(e.states.inputValue)},null,10,["textContent"])):M("v-if",!0)],2),e.shouldShowPlaceholder?(g(),I("div",{key:1,class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?k(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[V("span",null,W(e.currentPlaceholder),1)]):(g(),I("span",{key:1},W(e.currentPlaceholder),1))],2)):M("v-if",!0)],2),V("div",{ref:"suffixRef",class:v(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),A(c,{key:0,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:L(()=>[(g(),A(Ve(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),e.showClose&&e.clearIcon?(g(),A(c,{key:1,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:L(()=>[(g(),A(Ve(e.clearIcon)))]),_:1},8,["class","onClick"])):M("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(g(),A(c,{key:2,class:v([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:L(()=>[(g(),A(Ve(e.validateIcon)))]),_:1},8,["class"])):M("v-if",!0)],2)],10,["onClick"])]}),content:L(()=>[q(h,{ref:"menuRef"},{default:L(()=>[e.$slots.header?(g(),I("div",{key:0,class:v(e.nsSelect.be("dropdown","header")),onClick:B(()=>{},["stop"])},[k(e.$slots,"header")],10,["onClick"])):M("v-if",!0),ae(q(C,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:v([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:L(()=>[e.showNewOption?(g(),A(S,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):M("v-if",!0),q(t,null,{default:L(()=>[k(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ke,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),I("div",{key:1,class:v(e.nsSelect.be("dropdown","loading"))},[k(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),I("div",{key:2,class:v(e.nsSelect.be("dropdown","empty"))},[k(e.$slots,"empty",{},()=>[V("span",null,W(e.emptyText),1)])],2)):M("v-if",!0),e.$slots.footer?(g(),I("div",{key:3,class:v(e.nsSelect.be("dropdown","footer")),onClick:B(()=>{},["stop"])},[k(e.$slots,"footer")],10,["onClick"])):M("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[b,e.handleClickOutside,e.popperRef]])}var nn=Se(ln,[["render",tn],["__file","select.vue"]]);const an=re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=se("select"),a=E(),m=ye(),c=E([]);rl(dl,ie({...De(e)}));const S=u(()=>c.value.some(b=>b.visible===!0)),t=b=>{var f;return b.type.name==="ElOption"&&!!((f=b.component)!=null&&f.proxy)},C=b=>{const f=U(b),d=[];return f.forEach(i=>{var s;Vt(i)&&(t(i)?d.push(i.component.proxy):P(i.children)&&i.children.length?d.push(...C(i.children)):(s=i.component)!=null&&s.subTree&&d.push(...C(i.component.subTree)))}),d},h=()=>{c.value=C(m.subTree)};return Re(()=>{h()}),Lt(a,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:S,ns:o}}});function on(e,o,a,m,c,S){return ae((g(),I("ul",{ref:"groupRef",class:v(e.ns.be("group","wrap"))},[V("li",{class:v(e.ns.be("group","title"))},W(e.label),3),V("li",null,[V("ul",{class:v(e.ns.b("group"))},[k(e.$slots,"default")],2)])],2)),[[ke,e.visible]])}var cl=Se(an,[["render",on],["__file","option-group.vue"]]);const Sn=Tt(nn,{Option:Me,OptionGroup:cl}),Cn=ul(Me);ul(cl);export{Cn as E,Sn as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aj as M,ap as b,_ as V,d as T,a as j,c as o,cL as O,cp as q,cn as R,cq as U,b3 as G,aL as H,bh as B,b as c,o as l,y as C,n as i,e as t,t as y,f,r as N,x as D,i as I,j as J,b8 as K,E as Q,g as X}from"./index-
|
|
1
|
+
import{aj as M,ap as b,_ as V,d as T,a as j,c as o,cL as O,cp as q,cn as R,cq as U,b3 as G,aL as H,bh as B,b as c,o as l,y as C,n as i,e as t,t as y,f,r as N,x as D,i as I,j as J,b8 as K,E as Q,g as X}from"./index-98VGGErr.js";const Y=M({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:u=>u>=0&&u<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:b(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:b([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:b(Function),default:u=>`${u}%`}}),Z=T({name:"ElProgress"}),_=T({...Z,props:Y,setup(u){const s=u,m={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},a=j("progress"),F=o(()=>{const e={width:`${s.percentage}%`,animationDuration:`${s.duration}s`},r=P(s.percentage);return r.includes("gradient")?e.background=r:e.backgroundColor=r,e}),g=o(()=>(s.strokeWidth/s.width*100).toFixed(1)),v=o(()=>["circle","dashboard"].includes(s.type)?Number.parseInt(`${50-Number.parseFloat(g.value)/2}`,10):0),w=o(()=>{const e=v.value,r=s.type==="dashboard";return`
|
|
2
2
|
M 50 50
|
|
3
3
|
m 0 ${r?"":"-"}${e}
|
|
4
4
|
a ${e} ${e} 0 1 1 0 ${r?"-":""}${e*2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as je,b as Re}from"./typescript-WjCVvA-y.js";import{_ as le,d as N,a as O,i as he,o as W,j as X,r as B,ay as Se,bz as Fe,e as C,aT as we,g as ke,aI as E,bA as Z,bB as Y,bC as qe,bD as ce,c as m,aj as be,an as ee,bE as te,al as T,A as Ve,b5 as Ke,bF as Oe,bG as ge,aw as Q,am as me,aK as Me,av as ye,ao as Ne,bm as I,E as Pe,bh as R,J as $e,K as Ue,F as Ie,bH as Te,bI as G,aN as Be,as as Ge,bJ as Je,bK as Ye,aA as Ee,ap as ne,bL as Ze,bc as Qe,bM as Xe,bN as et,aO as tt,b as ae,t as ve,n as oe,D as nt,x as at,w as xe}from"./index-CAScKEAu.js";import{E as ze}from"./index-4lEOv1Ve.js";import{T as ot}from"./index-r5W6hzzQ.js";import{C as st}from"./index-74_Ssoda.js";const lt=N({name:"ElCollapseTransition"}),ut=N({...lt,setup(t){const n=O("collapse-transition"),s=e=>{e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},a={beforeEnter(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height&&(e.dataset.elExistsHeight=e.style.height),e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){requestAnimationFrame(()=>{e.dataset.oldOverflow=e.style.overflow,e.dataset.elExistsHeight?e.style.maxHeight=e.dataset.elExistsHeight:e.scrollHeight!==0?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow="hidden"})},afterEnter(e){e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow},enterCancelled(e){s(e)},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){e.scrollHeight!==0&&(e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){s(e)},leaveCancelled(e){s(e)}};return(e,h)=>(W(),he(we,Se({name:C(n).b()},Fe(a)),{default:X(()=>[B(e.$slots,"default")]),_:3},16,["name"]))}});var it=le(ut,[["__file","collapse-transition.vue"]]);const rt=ke(it);let ct=class{constructor(n,s){this.parent=n,this.domNode=s,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(n){n===this.subMenuItems.length?n=0:n<0&&(n=this.subMenuItems.length-1),this.subMenuItems[n].focus(),this.subIndex=n}addListeners(){const n=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,s=>{s.addEventListener("keydown",a=>{let e=!1;switch(a.code){case E.down:{this.gotoSubIndex(this.subIndex+1),e=!0;break}case E.up:{this.gotoSubIndex(this.subIndex-1),e=!0;break}case E.tab:{Z(n,"mouseleave");break}case E.enter:case E.numpadEnter:case E.space:{e=!0,a.currentTarget.click();break}}return e&&(a.preventDefault(),a.stopPropagation()),!1})})}},dt=class{constructor(n,s){this.domNode=n,this.submenu=null,this.submenu=null,this.init(s)}init(n){this.domNode.setAttribute("tabindex","0");const s=this.domNode.querySelector(`.${n}-menu`);s&&(this.submenu=new ct(this,s)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",n=>{let s=!1;switch(n.code){case E.down:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),s=!0;break}case E.up:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),s=!0;break}case E.tab:{Z(n.currentTarget,"mouseleave");break}case E.enter:case E.numpadEnter:case E.space:{s=!0,n.currentTarget.click();break}}s&&n.preventDefault()})}},pt=class{constructor(n,s){this.domNode=n,this.init(s)}init(n){const s=this.domNode.childNodes;Array.from(s).forEach(a=>{a.nodeType===1&&new dt(a,n)})}};const mt=N({name:"ElMenuCollapseTransition"}),vt=N({...mt,setup(t){const n=O("menu"),s={onBeforeEnter:a=>a.style.opacity="0.2",onEnter(a,e){Y(a,`${n.namespace.value}-opacity-transition`),a.style.opacity="1",e()},onAfterEnter(a){ce(a,`${n.namespace.value}-opacity-transition`),a.style.opacity=""},onBeforeLeave(a){a.dataset||(a.dataset={}),qe(a,n.m("collapse"))?(ce(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),Y(a,n.m("collapse"))):(Y(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),ce(a,n.m("collapse"))),a.style.width=`${a.scrollWidth}px`,a.style.overflow="hidden"},onLeave(a){Y(a,"horizontal-collapse-transition"),a.style.width=`${a.dataset.scrollWidth}px`}};return(a,e)=>(W(),he(we,Se({mode:"out-in"},C(s)),{default:X(()=>[B(a.$slots,"default")]),_:3},16))}});var ft=le(vt,[["__file","menu-collapse-transition.vue"]]);function Ae(t,n){const s=m(()=>{let e=t.parent;const h=[n.value];for(;e.type.name!=="ElMenu";)e.props.index&&h.unshift(e.props.index),e=e.parent;return h});return{parentMenu:m(()=>{let e=t.parent;for(;e&&!["ElMenu","ElSubMenu"].includes(e.type.name);)e=e.parent;return e}),indexPath:s}}function ht(t){return m(()=>{const s=t.backgroundColor;return s?new ot(s).shade(20).toString():""})}const He=(t,n)=>{const s=O("menu");return m(()=>s.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":ht(t).value||"","active-color":t.activeTextColor||"",level:`${n}`}))},Ce="rootMenu",se="subMenu:",bt=be({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:G},expandOpenIcon:{type:G},collapseCloseIcon:{type:G},collapseOpenIcon:{type:G}}),de="ElSubMenu";var _e=N({name:de,props:bt,setup(t,{slots:n,expose:s}){const a=Me(),{indexPath:e,parentMenu:h}=Ae(a,m(()=>t.index)),v=O("menu"),M=O("sub-menu"),i=ee(Ce);i||te(de,"can not inject root menu");const c=ee(`${se}${h.value.uid}`);c||te(de,"can not inject sub menu");const b=T({}),y=T({});let f;const _=T(!1),w=T(),F=T(),z=m(()=>H.value==="horizontal"&&A.value?"bottom-start":"right-start"),D=m(()=>H.value==="horizontal"&&A.value||H.value==="vertical"&&!i.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?k.value?t.expandOpenIcon:t.expandCloseIcon:Ve:t.collapseCloseIcon&&t.collapseOpenIcon?k.value?t.collapseOpenIcon:t.collapseCloseIcon:Ke),A=m(()=>c.level===0),q=m(()=>{const u=t.teleported;return Oe(u)?A.value:u}),ue=m(()=>i.props.collapse?`${v.namespace.value}-zoom-in-left`:`${v.namespace.value}-zoom-in-top`),J=m(()=>H.value==="horizontal"&&A.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),k=m(()=>i.openedMenus.includes(t.index)),j=m(()=>[...Object.values(b.value),...Object.values(y.value)].some(({active:u})=>u)),H=m(()=>i.props.mode),ie=m(()=>i.props.persistent),L=ge({index:t.index,indexPath:e,active:j}),V=He(i.props,c.level+1),K=m(()=>{var u;return(u=t.popperOffset)!=null?u:i.props.popperOffset}),U=m(()=>{var u;return(u=t.popperClass)!=null?u:i.props.popperClass}),re=m(()=>{var u;return(u=t.showTimeout)!=null?u:i.props.showTimeout}),o=m(()=>{var u;return(u=t.hideTimeout)!=null?u:i.props.hideTimeout}),l=()=>{var u,x,g;return(g=(x=(u=F.value)==null?void 0:u.popperRef)==null?void 0:x.popperInstanceRef)==null?void 0:g.destroy()},r=u=>{u||l()},d=()=>{i.props.menuTrigger==="hover"&&i.props.mode==="horizontal"||i.props.collapse&&i.props.mode==="vertical"||t.disabled||i.handleSubMenuClick({index:t.index,indexPath:e.value,active:j.value})},p=(u,x=re.value)=>{var g;if(u.type!=="focus"){if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"||t.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,f?.(),{stop:f}=Te(()=>{i.openMenu(t.index,e.value)},x),q.value&&((g=h.value.vnode.el)==null||g.dispatchEvent(new MouseEvent("mouseenter")))}},S=(u=!1)=>{var x;if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"){c.mouseInChild.value=!1;return}f?.(),c.mouseInChild.value=!1,{stop:f}=Te(()=>!_.value&&i.closeMenu(t.index,e.value),o.value),q.value&&u&&((x=c.handleMouseleave)==null||x.call(c,!0))};Q(()=>i.props.collapse,u=>r(!!u));{const u=g=>{y.value[g.index]=g},x=g=>{delete y.value[g.index]};me(`${se}${a.uid}`,{addSubMenu:u,removeSubMenu:x,handleMouseleave:S,mouseInChild:_,level:c.level+1})}return s({opened:k}),ye(()=>{i.addSubMenu(L),c.addSubMenu(L)}),Ne(()=>{c.removeSubMenu(L),i.removeSubMenu(L)}),()=>{var u;const x=[(u=n.title)==null?void 0:u.call(n),I(Pe,{class:M.e("icon-arrow"),style:{transform:k.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&i.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>R(D.value)?I(a.appContext.components[D.value]):I(D.value)})],g=i.isMenuPopup?I(ze,{ref:F,visible:k.value,effect:"light",pure:!0,offset:K.value,showArrow:!1,persistent:ie.value,popperClass:U.value,placement:z.value,teleported:q.value,fallbackPlacements:J.value,transition:ue.value,gpuAcceleration:!1},{content:()=>{var P;return I("div",{class:[v.m(H.value),v.m("popup-container"),U.value],onMouseenter:$=>p($,100),onMouseleave:()=>S(!0),onFocus:$=>p($,100)},[I("ul",{class:[v.b(),v.m("popup"),v.m(`popup-${z.value}`)],style:V.value},[(P=n.default)==null?void 0:P.call(n)])])},default:()=>I("div",{class:M.e("title"),onClick:d},x)}):I(Ie,{},[I("div",{class:M.e("title"),ref:w,onClick:d},x),I(rt,{},{default:()=>{var P;return $e(I("ul",{role:"menu",class:[v.b(),v.m("inline")],style:V.value},[(P=n.default)==null?void 0:P.call(n)]),[[Ue,k.value]])}})]);return I("li",{class:[M.b(),M.is("active",j.value),M.is("opened",k.value),M.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:k.value,onMouseenter:p,onMouseleave:()=>S(),onFocus:p},[g])}}});const gt=be({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ne(Array),default:()=>je([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:G,default:()=>Ze},popperEffect:{type:ne(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),pe=t=>Be(t)&&t.every(n=>R(n)),Mt={close:(t,n)=>R(t)&&pe(n),open:(t,n)=>R(t)&&pe(n),select:(t,n,s,a)=>R(t)&&pe(n)&&Ge(s)&&(Oe(a)||a instanceof Promise)};var yt=N({name:"ElMenu",props:gt,emits:Mt,setup(t,{emit:n,slots:s,expose:a}){const e=Me(),h=e.appContext.config.globalProperties.$router,v=T(),M=O("menu"),i=O("sub-menu"),c=T(-1),b=T(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),y=T(t.defaultActive),f=T({}),_=T({}),w=m(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),F=()=>{const o=y.value&&f.value[y.value];if(!o||t.mode==="horizontal"||t.collapse)return;o.indexPath.forEach(r=>{const d=_.value[r];d&&z(r,d.indexPath)})},z=(o,l)=>{b.value.includes(o)||(t.uniqueOpened&&(b.value=b.value.filter(r=>l.includes(r))),b.value.push(o),n("open",o,l))},D=o=>{const l=b.value.indexOf(o);l!==-1&&b.value.splice(l,1)},A=(o,l)=>{D(o),n("close",o,l)},q=({index:o,indexPath:l})=>{b.value.includes(o)?A(o,l):z(o,l)},ue=o=>{(t.mode==="horizontal"||t.collapse)&&(b.value=[]);const{index:l,indexPath:r}=o;if(!(Ee(l)||Ee(r)))if(t.router&&h){const d=o.route||l,p=h.push(d).then(S=>(S||(y.value=l),S));n("select",l,r,{index:l,indexPath:r,route:d},p)}else y.value=l,n("select",l,r,{index:l,indexPath:r})},J=o=>{var l;const r=f.value,d=r[o]||y.value&&r[y.value]||r[t.defaultActive];y.value=(l=d?.index)!=null?l:o},k=o=>{const l=getComputedStyle(o),r=Number.parseInt(l.marginLeft,10),d=Number.parseInt(l.marginRight,10);return o.offsetWidth+r+d||0},j=()=>{var o,l;if(!v.value)return-1;const r=Array.from((l=(o=v.value)==null?void 0:o.childNodes)!=null?l:[]).filter($=>$.nodeName!=="#text"||$.nodeValue),d=64,p=getComputedStyle(v.value),S=Number.parseInt(p.paddingLeft,10),u=Number.parseInt(p.paddingRight,10),x=v.value.clientWidth-S-u;let g=0,P=0;return r.forEach(($,De)=>{$.nodeName!=="#comment"&&(g+=k($),g<=x-d&&(P=De+1))}),P===r.length?-1:P},H=o=>_.value[o].indexPath,ie=(o,l=33.34)=>{let r;return()=>{r&&clearTimeout(r),r=setTimeout(()=>{o()},l)}};let L=!0;const V=()=>{if(c.value===j())return;const o=()=>{c.value=-1,Qe(()=>{c.value=j()})};L?o():ie(o)(),L=!1};Q(()=>t.defaultActive,o=>{f.value[o]||(y.value=""),J(o)}),Q(()=>t.collapse,o=>{o&&(b.value=[])}),Q(f.value,F);let K;Je(()=>{t.mode==="horizontal"&&t.ellipsis?K=Re(v,V).stop:K?.()});const U=T(!1);{const o=p=>{_.value[p.index]=p},l=p=>{delete _.value[p.index]};me(Ce,ge({props:t,openedMenus:b,items:f,subMenus:_,activeIndex:y,isMenuPopup:w,addMenuItem:p=>{f.value[p.index]=p},removeMenuItem:p=>{delete f.value[p.index]},addSubMenu:o,removeSubMenu:l,openMenu:z,closeMenu:A,handleMenuItemClick:ue,handleSubMenuClick:q})),me(`${se}${e.uid}`,{addSubMenu:o,removeSubMenu:l,mouseInChild:U,level:0})}ye(()=>{t.mode==="horizontal"&&new pt(e.vnode.el,M.namespace.value)}),a({open:l=>{const{indexPath:r}=_.value[l];r.forEach(d=>z(d,r))},close:D,updateActiveIndex:J,handleResize:V});const re=He(t,0);return()=>{var o,l;let r=(l=(o=s.default)==null?void 0:o.call(s))!=null?l:[];const d=[];if(t.mode==="horizontal"&&v.value){const u=Ye(r),x=c.value===-1?u:u.slice(0,c.value),g=c.value===-1?[]:u.slice(c.value);g?.length&&t.ellipsis&&(r=x,d.push(I(_e,{index:"sub-menu-more",class:i.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>I(Pe,{class:i.e("icon-more")},{default:()=>I(t.ellipsisIcon)}),default:()=>g})))}const p=t.closeOnClickOutside?[[st,()=>{b.value.length&&(U.value||(b.value.forEach(u=>n("close",u,H(u))),b.value=[]))}]]:[],S=$e(I("ul",{key:String(t.collapse),role:"menubar",ref:v,style:re.value,class:{[M.b()]:!0,[M.m(t.mode)]:!0,[M.m("collapse")]:t.collapse}},[...r,...d]),p);return t.collapseTransition&&t.mode==="vertical"?I(ft,()=>S):S}}});const It=be({index:{type:ne([String,null]),default:null},route:{type:ne([String,Object])},disabled:Boolean}),xt={click:t=>R(t.index)&&Be(t.indexPath)},fe="ElMenuItem",Ct=N({name:fe}),_t=N({...Ct,props:It,emits:xt,setup(t,{expose:n,emit:s}){const a=t;Xe(a.index)&&et();const e=Me(),h=ee(Ce),v=O("menu"),M=O("menu-item");h||te(fe,"can not inject root menu");const{parentMenu:i,indexPath:c}=Ae(e,tt(a,"index")),b=ee(`${se}${i.value.uid}`);b||te(fe,"can not inject sub menu");const y=m(()=>a.index===h.activeIndex),f=ge({index:a.index,indexPath:c,active:y}),_=()=>{a.disabled||(h.handleMenuItemClick({index:a.index,indexPath:c.value,route:a.route}),s("click",f))};return ye(()=>{b.addSubMenu(f),h.addMenuItem(f)}),Ne(()=>{b.removeSubMenu(f),h.removeMenuItem(f)}),n({parentMenu:i,rootMenu:h,active:y,nsMenu:v,nsMenuItem:M,handleClick:_}),(w,F)=>(W(),ae("li",{class:oe([C(M).b(),C(M).is("active",C(y)),C(M).is("disabled",w.disabled)]),role:"menuitem",tabindex:"-1",onClick:_},[C(i).type.name==="ElMenu"&&C(h).props.collapse&&w.$slots.title?(W(),he(C(ze),{key:0,effect:C(h).props.popperEffect,placement:"right","fallback-placements":["left"],persistent:C(h).props.persistent},{content:X(()=>[B(w.$slots,"title")]),default:X(()=>[ve("div",{class:oe(C(v).be("tooltip","trigger"))},[B(w.$slots,"default")],2)]),_:3},8,["effect","persistent"])):(W(),ae(Ie,{key:1},[B(w.$slots,"default"),B(w.$slots,"title")],64))],2))}});var Le=le(_t,[["__file","menu-item.vue"]]);const Tt={title:String},Et=N({name:"ElMenuItemGroup"}),St=N({...Et,props:Tt,setup(t){const n=O("menu-item-group");return(s,a)=>(W(),ae("li",{class:oe(C(n).b())},[ve("div",{class:oe(C(n).e("title"))},[s.$slots.title?B(s.$slots,"title",{key:1}):(W(),ae(Ie,{key:0},[nt(at(s.title),1)],64))],2),ve("ul",null,[B(s.$slots,"default")])],2))}});var We=le(St,[["__file","menu-item-group.vue"]]);const At=ke(yt,{MenuItem:Le,MenuItemGroup:We,SubMenu:_e}),Ht=xe(Le);xe(We);xe(_e);export{Ht as E,At as a};
|
|
1
|
+
import{m as je,b as Re}from"./typescript-1ic-flAv.js";import{_ as le,d as N,a as O,i as he,o as W,j as X,r as B,ay as Se,bz as Fe,e as C,aT as we,g as ke,aI as E,bA as Z,bB as Y,bC as qe,bD as ce,c as m,aj as be,an as ee,bE as te,al as T,A as Ve,b5 as Ke,bF as Oe,bG as ge,aw as Q,am as me,aK as Me,av as ye,ao as Ne,bm as I,E as Pe,bh as R,J as $e,K as Ue,F as Ie,bH as Te,bI as G,aN as Be,as as Ge,bJ as Je,bK as Ye,aA as Ee,ap as ne,bL as Ze,bc as Qe,bM as Xe,bN as et,aO as tt,b as ae,t as ve,n as oe,D as nt,x as at,w as xe}from"./index-98VGGErr.js";import{E as ze}from"./index-DfAeDMXy.js";import{T as ot}from"./index-r5W6hzzQ.js";import{C as st}from"./index-ByXZ-2lh.js";const lt=N({name:"ElCollapseTransition"}),ut=N({...lt,setup(t){const n=O("collapse-transition"),s=e=>{e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},a={beforeEnter(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height&&(e.dataset.elExistsHeight=e.style.height),e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){requestAnimationFrame(()=>{e.dataset.oldOverflow=e.style.overflow,e.dataset.elExistsHeight?e.style.maxHeight=e.dataset.elExistsHeight:e.scrollHeight!==0?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow="hidden"})},afterEnter(e){e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow},enterCancelled(e){s(e)},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){e.scrollHeight!==0&&(e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){s(e)},leaveCancelled(e){s(e)}};return(e,h)=>(W(),he(we,Se({name:C(n).b()},Fe(a)),{default:X(()=>[B(e.$slots,"default")]),_:3},16,["name"]))}});var it=le(ut,[["__file","collapse-transition.vue"]]);const rt=ke(it);let ct=class{constructor(n,s){this.parent=n,this.domNode=s,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(n){n===this.subMenuItems.length?n=0:n<0&&(n=this.subMenuItems.length-1),this.subMenuItems[n].focus(),this.subIndex=n}addListeners(){const n=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,s=>{s.addEventListener("keydown",a=>{let e=!1;switch(a.code){case E.down:{this.gotoSubIndex(this.subIndex+1),e=!0;break}case E.up:{this.gotoSubIndex(this.subIndex-1),e=!0;break}case E.tab:{Z(n,"mouseleave");break}case E.enter:case E.numpadEnter:case E.space:{e=!0,a.currentTarget.click();break}}return e&&(a.preventDefault(),a.stopPropagation()),!1})})}},dt=class{constructor(n,s){this.domNode=n,this.submenu=null,this.submenu=null,this.init(s)}init(n){this.domNode.setAttribute("tabindex","0");const s=this.domNode.querySelector(`.${n}-menu`);s&&(this.submenu=new ct(this,s)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",n=>{let s=!1;switch(n.code){case E.down:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),s=!0;break}case E.up:{Z(n.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),s=!0;break}case E.tab:{Z(n.currentTarget,"mouseleave");break}case E.enter:case E.numpadEnter:case E.space:{s=!0,n.currentTarget.click();break}}s&&n.preventDefault()})}},pt=class{constructor(n,s){this.domNode=n,this.init(s)}init(n){const s=this.domNode.childNodes;Array.from(s).forEach(a=>{a.nodeType===1&&new dt(a,n)})}};const mt=N({name:"ElMenuCollapseTransition"}),vt=N({...mt,setup(t){const n=O("menu"),s={onBeforeEnter:a=>a.style.opacity="0.2",onEnter(a,e){Y(a,`${n.namespace.value}-opacity-transition`),a.style.opacity="1",e()},onAfterEnter(a){ce(a,`${n.namespace.value}-opacity-transition`),a.style.opacity=""},onBeforeLeave(a){a.dataset||(a.dataset={}),qe(a,n.m("collapse"))?(ce(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),Y(a,n.m("collapse"))):(Y(a,n.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),ce(a,n.m("collapse"))),a.style.width=`${a.scrollWidth}px`,a.style.overflow="hidden"},onLeave(a){Y(a,"horizontal-collapse-transition"),a.style.width=`${a.dataset.scrollWidth}px`}};return(a,e)=>(W(),he(we,Se({mode:"out-in"},C(s)),{default:X(()=>[B(a.$slots,"default")]),_:3},16))}});var ft=le(vt,[["__file","menu-collapse-transition.vue"]]);function Ae(t,n){const s=m(()=>{let e=t.parent;const h=[n.value];for(;e.type.name!=="ElMenu";)e.props.index&&h.unshift(e.props.index),e=e.parent;return h});return{parentMenu:m(()=>{let e=t.parent;for(;e&&!["ElMenu","ElSubMenu"].includes(e.type.name);)e=e.parent;return e}),indexPath:s}}function ht(t){return m(()=>{const s=t.backgroundColor;return s?new ot(s).shade(20).toString():""})}const He=(t,n)=>{const s=O("menu");return m(()=>s.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":ht(t).value||"","active-color":t.activeTextColor||"",level:`${n}`}))},Ce="rootMenu",se="subMenu:",bt=be({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:G},expandOpenIcon:{type:G},collapseCloseIcon:{type:G},collapseOpenIcon:{type:G}}),de="ElSubMenu";var _e=N({name:de,props:bt,setup(t,{slots:n,expose:s}){const a=Me(),{indexPath:e,parentMenu:h}=Ae(a,m(()=>t.index)),v=O("menu"),M=O("sub-menu"),i=ee(Ce);i||te(de,"can not inject root menu");const c=ee(`${se}${h.value.uid}`);c||te(de,"can not inject sub menu");const b=T({}),y=T({});let f;const _=T(!1),w=T(),F=T(),z=m(()=>H.value==="horizontal"&&A.value?"bottom-start":"right-start"),D=m(()=>H.value==="horizontal"&&A.value||H.value==="vertical"&&!i.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?k.value?t.expandOpenIcon:t.expandCloseIcon:Ve:t.collapseCloseIcon&&t.collapseOpenIcon?k.value?t.collapseOpenIcon:t.collapseCloseIcon:Ke),A=m(()=>c.level===0),q=m(()=>{const u=t.teleported;return Oe(u)?A.value:u}),ue=m(()=>i.props.collapse?`${v.namespace.value}-zoom-in-left`:`${v.namespace.value}-zoom-in-top`),J=m(()=>H.value==="horizontal"&&A.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),k=m(()=>i.openedMenus.includes(t.index)),j=m(()=>[...Object.values(b.value),...Object.values(y.value)].some(({active:u})=>u)),H=m(()=>i.props.mode),ie=m(()=>i.props.persistent),L=ge({index:t.index,indexPath:e,active:j}),V=He(i.props,c.level+1),K=m(()=>{var u;return(u=t.popperOffset)!=null?u:i.props.popperOffset}),U=m(()=>{var u;return(u=t.popperClass)!=null?u:i.props.popperClass}),re=m(()=>{var u;return(u=t.showTimeout)!=null?u:i.props.showTimeout}),o=m(()=>{var u;return(u=t.hideTimeout)!=null?u:i.props.hideTimeout}),l=()=>{var u,x,g;return(g=(x=(u=F.value)==null?void 0:u.popperRef)==null?void 0:x.popperInstanceRef)==null?void 0:g.destroy()},r=u=>{u||l()},d=()=>{i.props.menuTrigger==="hover"&&i.props.mode==="horizontal"||i.props.collapse&&i.props.mode==="vertical"||t.disabled||i.handleSubMenuClick({index:t.index,indexPath:e.value,active:j.value})},p=(u,x=re.value)=>{var g;if(u.type!=="focus"){if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"||t.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,f?.(),{stop:f}=Te(()=>{i.openMenu(t.index,e.value)},x),q.value&&((g=h.value.vnode.el)==null||g.dispatchEvent(new MouseEvent("mouseenter")))}},S=(u=!1)=>{var x;if(i.props.menuTrigger==="click"&&i.props.mode==="horizontal"||!i.props.collapse&&i.props.mode==="vertical"){c.mouseInChild.value=!1;return}f?.(),c.mouseInChild.value=!1,{stop:f}=Te(()=>!_.value&&i.closeMenu(t.index,e.value),o.value),q.value&&u&&((x=c.handleMouseleave)==null||x.call(c,!0))};Q(()=>i.props.collapse,u=>r(!!u));{const u=g=>{y.value[g.index]=g},x=g=>{delete y.value[g.index]};me(`${se}${a.uid}`,{addSubMenu:u,removeSubMenu:x,handleMouseleave:S,mouseInChild:_,level:c.level+1})}return s({opened:k}),ye(()=>{i.addSubMenu(L),c.addSubMenu(L)}),Ne(()=>{c.removeSubMenu(L),i.removeSubMenu(L)}),()=>{var u;const x=[(u=n.title)==null?void 0:u.call(n),I(Pe,{class:M.e("icon-arrow"),style:{transform:k.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&i.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>R(D.value)?I(a.appContext.components[D.value]):I(D.value)})],g=i.isMenuPopup?I(ze,{ref:F,visible:k.value,effect:"light",pure:!0,offset:K.value,showArrow:!1,persistent:ie.value,popperClass:U.value,placement:z.value,teleported:q.value,fallbackPlacements:J.value,transition:ue.value,gpuAcceleration:!1},{content:()=>{var P;return I("div",{class:[v.m(H.value),v.m("popup-container"),U.value],onMouseenter:$=>p($,100),onMouseleave:()=>S(!0),onFocus:$=>p($,100)},[I("ul",{class:[v.b(),v.m("popup"),v.m(`popup-${z.value}`)],style:V.value},[(P=n.default)==null?void 0:P.call(n)])])},default:()=>I("div",{class:M.e("title"),onClick:d},x)}):I(Ie,{},[I("div",{class:M.e("title"),ref:w,onClick:d},x),I(rt,{},{default:()=>{var P;return $e(I("ul",{role:"menu",class:[v.b(),v.m("inline")],style:V.value},[(P=n.default)==null?void 0:P.call(n)]),[[Ue,k.value]])}})]);return I("li",{class:[M.b(),M.is("active",j.value),M.is("opened",k.value),M.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:k.value,onMouseenter:p,onMouseleave:()=>S(),onFocus:p},[g])}}});const gt=be({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ne(Array),default:()=>je([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:G,default:()=>Ze},popperEffect:{type:ne(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),pe=t=>Be(t)&&t.every(n=>R(n)),Mt={close:(t,n)=>R(t)&&pe(n),open:(t,n)=>R(t)&&pe(n),select:(t,n,s,a)=>R(t)&&pe(n)&&Ge(s)&&(Oe(a)||a instanceof Promise)};var yt=N({name:"ElMenu",props:gt,emits:Mt,setup(t,{emit:n,slots:s,expose:a}){const e=Me(),h=e.appContext.config.globalProperties.$router,v=T(),M=O("menu"),i=O("sub-menu"),c=T(-1),b=T(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),y=T(t.defaultActive),f=T({}),_=T({}),w=m(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),F=()=>{const o=y.value&&f.value[y.value];if(!o||t.mode==="horizontal"||t.collapse)return;o.indexPath.forEach(r=>{const d=_.value[r];d&&z(r,d.indexPath)})},z=(o,l)=>{b.value.includes(o)||(t.uniqueOpened&&(b.value=b.value.filter(r=>l.includes(r))),b.value.push(o),n("open",o,l))},D=o=>{const l=b.value.indexOf(o);l!==-1&&b.value.splice(l,1)},A=(o,l)=>{D(o),n("close",o,l)},q=({index:o,indexPath:l})=>{b.value.includes(o)?A(o,l):z(o,l)},ue=o=>{(t.mode==="horizontal"||t.collapse)&&(b.value=[]);const{index:l,indexPath:r}=o;if(!(Ee(l)||Ee(r)))if(t.router&&h){const d=o.route||l,p=h.push(d).then(S=>(S||(y.value=l),S));n("select",l,r,{index:l,indexPath:r,route:d},p)}else y.value=l,n("select",l,r,{index:l,indexPath:r})},J=o=>{var l;const r=f.value,d=r[o]||y.value&&r[y.value]||r[t.defaultActive];y.value=(l=d?.index)!=null?l:o},k=o=>{const l=getComputedStyle(o),r=Number.parseInt(l.marginLeft,10),d=Number.parseInt(l.marginRight,10);return o.offsetWidth+r+d||0},j=()=>{var o,l;if(!v.value)return-1;const r=Array.from((l=(o=v.value)==null?void 0:o.childNodes)!=null?l:[]).filter($=>$.nodeName!=="#text"||$.nodeValue),d=64,p=getComputedStyle(v.value),S=Number.parseInt(p.paddingLeft,10),u=Number.parseInt(p.paddingRight,10),x=v.value.clientWidth-S-u;let g=0,P=0;return r.forEach(($,De)=>{$.nodeName!=="#comment"&&(g+=k($),g<=x-d&&(P=De+1))}),P===r.length?-1:P},H=o=>_.value[o].indexPath,ie=(o,l=33.34)=>{let r;return()=>{r&&clearTimeout(r),r=setTimeout(()=>{o()},l)}};let L=!0;const V=()=>{if(c.value===j())return;const o=()=>{c.value=-1,Qe(()=>{c.value=j()})};L?o():ie(o)(),L=!1};Q(()=>t.defaultActive,o=>{f.value[o]||(y.value=""),J(o)}),Q(()=>t.collapse,o=>{o&&(b.value=[])}),Q(f.value,F);let K;Je(()=>{t.mode==="horizontal"&&t.ellipsis?K=Re(v,V).stop:K?.()});const U=T(!1);{const o=p=>{_.value[p.index]=p},l=p=>{delete _.value[p.index]};me(Ce,ge({props:t,openedMenus:b,items:f,subMenus:_,activeIndex:y,isMenuPopup:w,addMenuItem:p=>{f.value[p.index]=p},removeMenuItem:p=>{delete f.value[p.index]},addSubMenu:o,removeSubMenu:l,openMenu:z,closeMenu:A,handleMenuItemClick:ue,handleSubMenuClick:q})),me(`${se}${e.uid}`,{addSubMenu:o,removeSubMenu:l,mouseInChild:U,level:0})}ye(()=>{t.mode==="horizontal"&&new pt(e.vnode.el,M.namespace.value)}),a({open:l=>{const{indexPath:r}=_.value[l];r.forEach(d=>z(d,r))},close:D,updateActiveIndex:J,handleResize:V});const re=He(t,0);return()=>{var o,l;let r=(l=(o=s.default)==null?void 0:o.call(s))!=null?l:[];const d=[];if(t.mode==="horizontal"&&v.value){const u=Ye(r),x=c.value===-1?u:u.slice(0,c.value),g=c.value===-1?[]:u.slice(c.value);g?.length&&t.ellipsis&&(r=x,d.push(I(_e,{index:"sub-menu-more",class:i.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>I(Pe,{class:i.e("icon-more")},{default:()=>I(t.ellipsisIcon)}),default:()=>g})))}const p=t.closeOnClickOutside?[[st,()=>{b.value.length&&(U.value||(b.value.forEach(u=>n("close",u,H(u))),b.value=[]))}]]:[],S=$e(I("ul",{key:String(t.collapse),role:"menubar",ref:v,style:re.value,class:{[M.b()]:!0,[M.m(t.mode)]:!0,[M.m("collapse")]:t.collapse}},[...r,...d]),p);return t.collapseTransition&&t.mode==="vertical"?I(ft,()=>S):S}}});const It=be({index:{type:ne([String,null]),default:null},route:{type:ne([String,Object])},disabled:Boolean}),xt={click:t=>R(t.index)&&Be(t.indexPath)},fe="ElMenuItem",Ct=N({name:fe}),_t=N({...Ct,props:It,emits:xt,setup(t,{expose:n,emit:s}){const a=t;Xe(a.index)&&et();const e=Me(),h=ee(Ce),v=O("menu"),M=O("menu-item");h||te(fe,"can not inject root menu");const{parentMenu:i,indexPath:c}=Ae(e,tt(a,"index")),b=ee(`${se}${i.value.uid}`);b||te(fe,"can not inject sub menu");const y=m(()=>a.index===h.activeIndex),f=ge({index:a.index,indexPath:c,active:y}),_=()=>{a.disabled||(h.handleMenuItemClick({index:a.index,indexPath:c.value,route:a.route}),s("click",f))};return ye(()=>{b.addSubMenu(f),h.addMenuItem(f)}),Ne(()=>{b.removeSubMenu(f),h.removeMenuItem(f)}),n({parentMenu:i,rootMenu:h,active:y,nsMenu:v,nsMenuItem:M,handleClick:_}),(w,F)=>(W(),ae("li",{class:oe([C(M).b(),C(M).is("active",C(y)),C(M).is("disabled",w.disabled)]),role:"menuitem",tabindex:"-1",onClick:_},[C(i).type.name==="ElMenu"&&C(h).props.collapse&&w.$slots.title?(W(),he(C(ze),{key:0,effect:C(h).props.popperEffect,placement:"right","fallback-placements":["left"],persistent:C(h).props.persistent},{content:X(()=>[B(w.$slots,"title")]),default:X(()=>[ve("div",{class:oe(C(v).be("tooltip","trigger"))},[B(w.$slots,"default")],2)]),_:3},8,["effect","persistent"])):(W(),ae(Ie,{key:1},[B(w.$slots,"default"),B(w.$slots,"title")],64))],2))}});var Le=le(_t,[["__file","menu-item.vue"]]);const Tt={title:String},Et=N({name:"ElMenuItemGroup"}),St=N({...Et,props:Tt,setup(t){const n=O("menu-item-group");return(s,a)=>(W(),ae("li",{class:oe(C(n).b())},[ve("div",{class:oe(C(n).e("title"))},[s.$slots.title?B(s.$slots,"title",{key:1}):(W(),ae(Ie,{key:0},[nt(at(s.title),1)],64))],2),ve("ul",null,[B(s.$slots,"default")])],2))}});var We=le(St,[["__file","menu-item-group.vue"]]);const At=ke(yt,{MenuItem:Le,MenuItemGroup:We,SubMenu:_e}),Ht=xe(Le);xe(We);xe(_e);export{Ht as E,At as a};
|