1import{E as Q,bk as ae,H as W,d as N,ap as se,aK as Z,e as S,f as U,o as w,l as M,k as q,C as E,m as p,h as e,t as te,g as R,w as m,i as K,a7 as ne,c4 as re,O as ie,n as X,Y as de,G,bi as ue,aq as ce,$ as J,q as k,c5 as fe,c6 as ve,bo as ye,D as Y,z as pe,c7 as H,ak as me,v as ge,aZ as Ce,bM as be,I as he,ai as Ee,U as ke,ae as Se,V as we,ad as De,aQ as Ie,J as Te}from"./Y4ICXCuc.js";import{u as Be,a as Fe,E as Ae,b as Pe}from"./DVzYJwT5.js";import{F as $e,E as Le}from"./DbDwZyaJ.js";import{i as Oe,E as Me}from"./CGgbl_zB.js";import{c as Re}from"./DbdTMwVV.js";import{U as _}from"./BE20p1dL.js";const x=Symbol("dialogInjectionKey"),ee=Q({center:Boolean,alignCenter:Boolean,closeIcon:{type:ae},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Ne={close:()=>!0},ze=N({name:"ElDialogContent"}),Ve=N({...ze,props:ee,emits:Ne,setup(l,{expose:r}){const t=l,{t:A}=se(),{Close:n}=re,{dialogRef:f,headerRef:g,bodyId:C,ns:a,style:i}=Z(x),{focusTrapRef:v}=Z($e),y=S(()=>[a.b(),a.is("fullscreen",t.fullscreen),a.is("draggable",t.draggable),a.is("align-center",t.alignCenter),{[a.m("center")]:t.center}]),b=Re(v,f),u=S(()=>t.draggable),c=S(()=>t.overflow),{resetPosition:D}=Be(f,g,u,c);return r({resetPosition:D}),(s,P)=>(w(),U("div",{ref:e(b),class:p(e(y)),style:X(e(i)),tabindex:"-1"},[M("header",{ref_key:"headerRef",ref:g,class:p([e(a).e("header"),s.headerClass,{"show-close":s.showClose}])},[E(s.$slots,"header",{},()=>[M("span",{role:"heading","aria-level":s.ariaLevel,class:p(e(a).e("title"))},te(s.title),11,["aria-level"])]),s.showClose?(w(),U("button",{key:0,"aria-label":e(A)("el.dialog.close"),class:p(e(a).e("headerbtn")),type:"button",onClick:I=>s.$emit("close")},[R(e(ie),{class:p(e(a).e("close"))},{default:m(()=>[(w(),K(ne(s.closeIcon||e(n))))]),_:1},8,["class"])],10,["aria-label","onClick"])):q("v-if",!0)],2),M("div",{id:e(C),class:p([e(a).e("body"),s.bodyClass])},[E(s.$slots,"default")],10,["id"]),s.$slots.footer?(w(),U("footer",{key:0,class:p([e(a).e("footer"),s.footerClass])},[E(s.$slots,"footer")],2)):q("v-if",!0)],6))}});var Ue=W(Ve,[["__file","dialog-content.vue"]]);const qe=Q({...ee,appendToBody:Boolean,appendTo:{type:G([String,Object]),default:"body"},beforeClose:{type:G(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),Ke={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[_]:l=>de(l),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},je=(l,r)=>{var t;const n=ue().emit,{nextZIndex:f}=ce();let g="";const C=J(),a=J(),i=k(!1),v=k(!1),y=k(!1),b=k((t=l.zIndex)!=null?t:f());let u,c;const D=fe("namespace",ve),s=S(()=>{const d={},h=`--${D.value}-dialog`;return l.fullscreen||(l.top&&(d[`${h}-margin-top`]=l.top),l.width&&(d[`${h}-width`]=ye(l.width))),d}),P=S(()=>l.alignCenter?{display:"flex"}:{});function I(){n("opened")}function z(){n("closed"),n(_,!1),l.destroyOnClose&&(y.value=!1)}function V(){n("close")}function $(){c==null||c(),u==null||u(),l.openDelay&&l.openDelay>0?{stop:u}=H(()=>L(),l.openDelay):L()}function T(){u==null||u(),c==null||c(),l.closeDelay&&l.closeDelay>0?{stop:c}=H(()=>O(),l.closeDelay):O()}function B(){function d(h){h||(v.value=!0,i.value=!1)}l.beforeClose?l.beforeClose(d):T()}function F(){l.closeOnClickModal&&B()}function L(){me&&(i.value=!0)}function O(){i.value=!1}function o(){n("openAutoFocus")}function j(){n("closeAutoFocus")}function oe(d){var h;((h=d.detail)==null?void 0:h.focusReason)==="pointer"&&d.preventDefault()}l.lockScroll&&Fe(i);function le(){l.closeOnPressEscape&&B()}return Y(()=>l.modelValue,d=>{d?(v.value=!1,$(),y.value=!0,b.value=Oe(l.zIndex)?f():b.value++,ge(()=>{n("open"),r.value&&(r.value.parentElement.scrollTop=0,r.value.parentElement.scrollLeft=0,r.value.scrollTop=0)})):i.value&&T()}),Y(()=>l.fullscreen,d=>{r.value&&(d?(g=r.value.style.transform,r.value.style.transform=""):r.value.style.transform=g)}),pe(()=>{l.modelValue&&(i.value=!0,y.value=!0,$())}
1),{afterEnter:I,afterLeave:z,beforeLeave:V,handleClose:B,onModalClick:F,close:T,doClose:O,onOpenAutoFocus:o,onCloseAutoFocus:j,onCloseRequested:le,onFocusoutPrevented:oe,titleId:C,bodyId:a,closed:v,style:s,overlayDialogStyle:P,rendered:y,visible:i,zIndex:b}},Ze=N({name:"ElDialog",inheritAttrs:!1}),Ge=N({...Ze,props:qe,emits:Ke,setup(l,{expose:r}){const t=l,A=Ce();be({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},S(()=>!!A.title));const n=he("dialog"),f=k(),g=k(),C=k(),{visible:a,titleId:i,bodyId:v,style:y,overlayDialogStyle:b,rendered:u,zIndex:c,afterEnter:D,afterLeave:s,beforeLeave:P,handleClose:I,onModalClick:z,onOpenAutoFocus:V,onCloseAutoFocus:$,onCloseRequested:T,onFocusoutPrevented:B}=je(t,f);Ie(x,{dialogRef:f,headerRef:g,bodyId:v,ns:n,rendered:u,style:y});const F=Pe(z),L=S(()=>t.draggable&&!t.fullscreen);return r({visible:a,dialogContentRef:C,resetPosition:()=>{var o;(o=C.value)==null||o.resetPosition()}}),(o,j)=>(w(),K(e(Me),{to:o.appendTo,disabled:o.appendTo!=="body"?!1:!o.appendToBody},{default:m(()=>[R(Ee,{name:"dialog-fade",onAfterEnter:e(D),onAfterLeave:e(s),onBeforeLeave:e(P),persisted:""},{default:m(()=>[ke(R(e(Ae),{"custom-mask-event":"",mask:o.modal,"overlay-class":o.modalClass,"z-index":e(c)},{default:m(()=>[M("div",{role:"dialog","aria-modal":"true","aria-label":o.title||void 0,"aria-labelledby":o.title?void 0:e(i),"aria-describedby":e(v),class:p(`${e(n).namespace.value}-overlay-dialog`),style:X(e(b)),onClick:e(F).onClick,onMousedown:e(F).onMousedown,onMouseup:e(F).onMouseup},[R(e(Le),{loop:"",trapped:e(a),"focus-start-el":"container",onFocusAfterTrapped:e(V),onFocusAfterReleased:e($),onFocusoutPrevented:e(B),onReleaseRequested:e(T)},{default:m(()=>[e(u)?(w(),K(Ue,Se({key:0,ref_key:"dialogContentRef",ref:C},o.$attrs,{center:o.center,"align-center":o.alignCenter,"close-icon":o.closeIcon,draggable:e(L),overflow:o.overflow,fullscreen:o.fullscreen,"header-class":o.headerClass,"body-class":o.bodyClass,"footer-class":o.footerClass,"show-close":o.showClose,title:o.title,"aria-level":o.headerAriaLevel,onClose:e(I)}),we({header:m(()=>[o.$slots.title?E(o.$slots,"title",{key:1}):E(o.$slots,"header",{key:0,close:e(I),titleId:e(i),titleClass:e(n).e("title")})]),default:m(()=>[E(o.$slots,"default")]),_:2},[o.$slots.footer?{name:"footer",fn:m(()=>[E(o.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):q("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[De,e(a)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Je=W(Ge,[["__file","dialog.vue"]]);const xe=Te(Je);export{xe as E};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.