k5web/assets/dialog.99d3be01.js
2024-07-02 10:58:02 +08:00

47 lines
20 KiB
JavaScript

import{t as Ye,_,u as ae}from"./useConfig.c667f475.js";import{d as N,c as d,f as k,p as Ze,bD as Je,aI as p,bC as D,g as Qe,w as be,o as Ce,b as Oe,z as qe,n as en,by as nn,bg as re,bh as tn,bE as an,bF as rn}from"./arco.7f845a67.js";import{u as M,r as L,_ as I,a as on}from"./useGlobalIcon.4dd7bc0d.js";import{N as ln,O as cn,P as sn,Q as un,S as vn,i as fn,T as dn,U as mn,V as gn,W as pn,X as hn,Y as yn,c as _e,f as oe,e as W,G as H,b as bn,d as Cn}from"./index.84328ebd.js";import{_ as we,a as On,b as _n,u as wn}from"./index.fdc89ad5.js";import{B as K}from"./index.310652f9.js";import{c as Sn}from"./helper.895b8d7d.js";function le(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,a)}return t}function ie(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?le(Object(t),!0).forEach(function(a){I(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}var En={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM7.5 10.59l3 3 6-6L17.91 9l-7.41 7.41L6.09 12l1.41-1.41z"}}]},Bn=N({name:"CheckCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(n,e){var{attrs:t}=e,a=d(()=>n.size),{className:r,style:c}=M(a),m=d(()=>["t-icon","t-icon-check-circle-filled",r.value]),u=d(()=>ie(ie({},c.value),t.style)),v=d(()=>({class:m.value,style:u.value,onClick:i=>{var o;return(o=n.onClick)===null||o===void 0?void 0:o.call(n,{e:i})}}));return()=>L(En,v.value)}});const Pn=Bn;function ce(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,a)}return t}function se(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ce(Object(t),!0).forEach(function(a){I(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}var kn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z"}}]},Fn=N({name:"CloseIcon",props:{size:{type:String},onClick:{type:Function}},setup(n,e){var{attrs:t}=e,a=d(()=>n.size),{className:r,style:c}=M(a),m=d(()=>["t-icon","t-icon-close",r.value]),u=d(()=>se(se({},c.value),t.style)),v=d(()=>({class:m.value,style:u.value,onClick:i=>{var o;return(o=n.onClick)===null||o===void 0?void 0:o.call(n,{e:i})}}));return()=>L(kn,v.value)}});const Nn=Fn;function ue(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,a)}return t}function ve(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ue(Object(t),!0).forEach(function(a){I(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}var jn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"}}]},Dn=N({name:"ErrorCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(n,e){var{attrs:t}=e,a=d(()=>n.size),{className:r,style:c}=M(a),m=d(()=>["t-icon","t-icon-error-circle-filled",r.value]),u=d(()=>ve(ve({},c.value),t.style)),v=d(()=>({class:m.value,style:u.value,onClick:i=>{var o;return(o=n.onClick)===null||o===void 0?void 0:o.call(n,{e:i})}}));return()=>L(jn,v.value)}});const Mn=Dn;function fe(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,a)}return t}function de(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fe(Object(t),!0).forEach(function(a){I(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}var Ln={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM11 8.5v-2h2v2h-2zm2 1.5v7.5h-2V10h2z"}}]},In=N({name:"InfoCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(n,e){var{attrs:t}=e,a=d(()=>n.size),{className:r,style:c}=M(a),m=d(()=>["t-icon","t-icon-info-circle-filled",r.value]),u=d(()=>de(de({},c.value),t.style)),v=d(()=>({class:m.value,style:u.value,onClick:i=>{var o;return(o=n.onClick)===null||o===void 0?void 0:o.call(n,{e:i})}}));return()=>L(Ln,v.value)}});const xn=In;/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var An="t-display-none-element-refresh";function Tn(){var n=k(0);Ze(An,n),Je(function(){n.value+=1})}/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/function $n(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}var zn=$n;/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var me=ln,Wn=vn,Hn=fn,ge=me?me.isConcatSpreadable:void 0;function Kn(n){return Hn(n)||Wn(n)||!!(ge&&n&&n[ge])}var Gn=Kn,Un=un,Xn=Gn;function Se(n,e,t,a,r){var c=-1,m=n.length;for(t||(t=Xn),r||(r=[]);++c<m;){var u=n[c];e>0&&t(u)?e>1?Se(u,e-1,t,a,r):Un(r,u):a||(r[r.length]=u)}return r}var Vn=Se,Rn=Vn;function Yn(n){var e=n==null?0:n.length;return e?Rn(n,1):[]}var Zn=Yn,Jn=Zn,Qn=cn,qn=sn;function et(n){return qn(Qn(n,void 0,Jn),n+"")}var nt=et;/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var tt=_n,at=hn;function rt(n,e){return e.length<2?n:tt(n,at(e,0,-1))}var ot=rt,lt=we,it=zn,ct=ot,st=On;function ut(n,e){return e=lt(e,n),n=ct(n,e),n==null||delete n[st(it(e))]}var vt=ut,ft=yn;function dt(n){return ft(n)?void 0:n}var mt=dt,gt=dn,pt=pn,ht=vt,yt=we,bt=mn,Ct=mt,Ot=nt,_t=gn,wt=1,St=2,Et=4,Bt=Ot(function(n,e){var t={};if(n==null)return t;var a=!1;e=gt(e,function(c){return c=yt(c,n),a||(a=c.length>1),c}),bt(n,_t(n),t),a&&(t=pt(t,wt|St|Et,Ct));for(var r=e.length;r--;)ht(t,e[r]);return t}),Pt=Bt;/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/function kt(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function pe(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,Ye(a.key),a)}}function Ft(n,e,t){return e&&pe(n.prototype,e),t&&pe(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var Nt={attach:{type:[String,Function]},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function]},closeBtn:{type:[String,Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function]},confirmLoading:{type:Boolean,default:void 0},confirmOnEnter:Boolean,default:{type:[String,Function]},destroyOnClose:Boolean,draggable:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"modal",validator:function(e){return e?["modal","modeless","normal","full-screen"].includes(e):!0}},placement:{type:String,default:"top",validator:function(e){return e?["top","center"].includes(e):!0}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return e?["default","info","warning","danger","success"].includes(e):!0}},top:{type:[String,Number]},visible:Boolean,width:{type:[String,Number]},zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onClosed:Function,onConfirm:Function,onEscKeydown:Function,onOpened:Function,onOverlayClick:Function};/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/function he(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,a)}return t}function E(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?he(Object(t),!0).forEach(function(a){_(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):he(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}function jt(n){var e=Qe(),t=_e(),a=function(i){var o,g=i.globalConfirm,h=i.theme,y=i.globalConfirmBtnTheme,O=((o=Pt(y,["info"]))===null||o===void 0?void 0:o[h])||"primary",w={theme:O,size:i.size,onClick:function(x){n.confirmBtnAction(x)}};return W(g)?w.content=g:H(g)&&(w=E(E({},w),g)),w},r=function(i){var o=i.globalCancel,g={theme:"default",size:i.size,onClick:function(y){n.cancelBtnAction(y)}};return W(o)?g.content=o:H(o)&&(g=E(E({},g),o)),g},c=function(i,o){var g=o.defaultButtonProps,h=o.className,y=o.confirmLoading,O=g;return W(i)?O.content=i:H(i)&&(O=E(E({},O),i)),y!==void 0&&(O.loading=y),p(K,D({class:h},O),null)},m=function(i){var o=i.confirmBtn,g=i.className,h=i.confirmLoading;if(o===null)return null;o&&e.slots.confirmBtn&&console.warn("Both $props.confirmBtn and $scopedSlots.confirmBtn exist, $props.confirmBtn is preferred.");var y=a(i);return!o&&!e.slots.confirmBtn?p(K,D({class:g,loading:h},y),null):o&&["string","object"].includes(oe(o))?c(o,{defaultButtonProps:y,className:g,confirmLoading:h}):t("confirmBtn")},u=function(i){var o=i.cancelBtn,g=i.className;if(o===null)return null;o&&e.slots.cancelBtn&&console.warn("Both $props.cancelBtn and $scopedSlots.cancelBtn exist, $props.cancelBtn is preferred.");var h=r(i);return!o&&!e.slots.cancelBtn?p(K,D({class:g},h),null):o&&["string","object"].includes(oe(o))?c(o,{defaultButtonProps:h}):t("cancelBtn")};return{getConfirmBtn:m,getCancelBtn:u}}function Dt(n){var e=!1,t=!1,a=function(u){e&&t&&n(u),e=!1,t=!1},r=function(u){e=u.target===u.currentTarget},c=function(u){t=u.target===u.currentTarget};return{onClick:a,onMousedown:r,onMouseup:c}}/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/function Zt(){var n=6;if(typeof navigator>"u"||!navigator||/(Chrome|Safari)/i.test(navigator.userAgent))return n;var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),/Firefox/.test(navigator.userAgent)&&(t-=4),Sn()<=11&&(t=12),t}function Mt(){var n=document.createElement("div");n.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(n);var e=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),e}/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var Lt=1e3,It=5e3,xt=1,At=Ft(function n(){var e=this;kt(this,n),_(this,"popupStack",{popup:new Set,dialog:new Set,message:new Set}),_(this,"getNextZIndex",function(t){var a=t==="message"?Array.from(e.popupStack.message).pop()||It:Array.from(e.popupStack.popup).pop()||Lt;return a+xt}),_(this,"add",function(t){var a=e.getNextZIndex(t);return e.popupStack[t].add(a),t==="dialog"&&e.popupStack.popup.add(a),a}),_(this,"delete",function(t,a){e.popupStack[a].delete(t),a==="dialog"&&e.popupStack.popup.delete(t)}),_(this,"isLastDialog",function(t){return e.popupStack.dialog.size>1?t===Array.from(e.popupStack.dialog).pop():!0})}),G=new At;function Tt(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.visible,a=e.runOnMounted,r=k(0),c=function(){r.value=G.add(n)},m=function(){G.delete(r.value,n)},u=function(){return n==="dialog"?G.isLastDialog(r.value):!1};return be(function(){return t==null?void 0:t.value},function(v){v?c():m()},{immediate:!0}),a&&(Ce(function(){c()}),Oe(function(){m()})),{zIndex:qe(r),open:c,close:m,isLastDialog:u}}/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/function ye(n){return Number.isNaN(Number(n))?n:"".concat(Number(n),"px")}var F,$t=function(e){F={x:e.clientX,y:e.clientY},setTimeout(function(){F=null},100)};typeof window<"u"&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",$t,!0);function zt(n){var e=n,t=window.innerWidth||document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight;e.addEventListener("mousedown",function(r){var c=r.clientX-e.offsetLeft,m=r.clientY-e.offsetTop,u=e.offsetWidth,v=e.offsetHeight;if(u>t||v>a)return;function i(g){var h=g.clientX-c,y=g.clientY-m;h<0&&(h=0),y<0&&(y=0),t-e.offsetWidth-h<0&&(h=t-e.offsetWidth),a-e.offsetHeight-y<0&&(y=a-e.offsetHeight),e.style.position="absolute",e.style.left="".concat(h,"px"),e.style.top="".concat(y,"px")}function o(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)}document.addEventListener("mousemove",i),document.addEventListener("mouseup",o),document.addEventListener("dragend",o)})}var Wt=1,Jt=N({name:"TDialog",directives:{draggable:function(e,t){e&&t&&t.value&&zt(e)}},inheritAttrs:!1,props:Nt,emits:["update:visible"],setup:function(e,t){var a=this,r=ae("dialog"),c=ae(),m=bn(),u=_e(),v=k(null),i=Cn("dialog"),o=i.globalConfig,g=on({CloseIcon:Nn,InfoCircleFilledIcon:xn,CheckCircleFilledIcon:Pn,ErrorCircleFilledIcon:Mn}),h=g.CloseIcon,y=g.InfoCircleFilledIcon,O=g.CheckCircleFilledIcon,w=g.ErrorCircleFilledIcon,U=function(l){var s;(s=e.onConfirm)===null||s===void 0||s.call(e,{e:l})},x=function(l){var s;(s=e.onCancel)===null||s===void 0||s.call(e,{e:l}),j({e:l,trigger:"cancel"})},X=jt({confirmBtnAction:U,cancelBtnAction:x}),Ee=X.getConfirmBtn,Be=X.getCancelBtn,Pe=wn(function(){return e.attach});Tn();var V=k(),S=k(),R=d(function(){return e.mode==="modal"}),B=d(function(){return e.mode==="modeless"}),Y=d(function(){return e.mode==="normal"}),C=d(function(){return e.mode==="full-screen"}),ke=d(function(){return e.visible}),Fe=d(function(){return["".concat(r.value,"__mask"),!e.showOverlay&&"".concat(c.value,"-is-hidden")]}),Ne=d(function(){return Y.value?[]:C.value?["".concat(r.value,"__position_fullscreen")]:["".concat(r.value,"__position"),!!e.top&&"".concat(r.value,"--top"),"".concat(e.placement&&!e.top?"".concat(r.value,"--").concat(e.placement):"")]}),je=d(function(){return[!Y.value&&"".concat(r.value,"__wrap")]}),De=d(function(){if(C.value)return{};var f=e.top,l={};if(f!==void 0){var s=ye(f);l={paddingTop:s}}return l}),Z=d(function(){var f=["".concat(r.value),"".concat(r.value,"__modal-").concat(e.theme),B.value&&e.draggable&&"".concat(r.value,"--draggable")];return C.value?f.push("".concat(r.value,"__fullscreen")):f.push.apply(f,["".concat(r.value,"--default"),"".concat(r.value,"--").concat(e.placement)]),f}),J=d(function(){return C.value?{}:{width:ye(e.width)}}),Me=Tt("dialog",{visible:ke}),Q=Me.isLastDialog;be(function(){return e.visible},function(f){if(f){var l;(R.value&&!e.showInAttachedElement||C.value)&&(e.preventScrollThrough&&document.body.appendChild(S.value),en(function(){F&&v.value&&(v.value.style.transformOrigin="".concat(F.x-v.value.offsetLeft,"px ").concat(F.y-v.value.offsetTop,"px"))})),(l=document.activeElement)===null||l===void 0||l.blur()}else Le();ee(f)});function q(){var f,l;(f=S.value.parentNode)===null||f===void 0||(l=f.removeChild)===null||l===void 0||l.call(f,S.value)}function Le(){clearTimeout(V.value),V.value=setTimeout(function(){q()},150)}var ee=function(l){l?(document.addEventListener("keydown",te),e.confirmOnEnter&&document.addEventListener("keydown",ne)):(document.removeEventListener("keydown",te),e.confirmOnEnter&&document.removeEventListener("keydown",ne))},ne=function(l){var s=l.target;if(s.tagName.toLowerCase()!=="input"){var b=l.code;if((b==="Enter"||b==="NumpadEnter")&&Q()){var P;(P=e.onConfirm)===null||P===void 0||P.call(e,{e:l})}}},te=function(l){if(l.code==="Escape"&&Q()){var s,b;(s=e.onEscKeydown)===null||s===void 0||s.call(e,{e:l}),((b=e.closeOnEscKeydown)!==null&&b!==void 0?b:o.value.closeOnEscKeydown)&&j({e:l,trigger:"esc"})}},Ie=function(l){var s;if(e.showOverlay&&((s=e.closeOnOverlayClick)!==null&&s!==void 0?s:o.value.closeOnOverlayClick)){var b;(b=e.onOverlayClick)===null||b===void 0||b.call(e,{e:l}),j({e:l,trigger:"overlay"})}},A=Dt(Ie),xe=A.onClick,Ae=A.onMousedown,Te=A.onMouseup,$e=function(l){var s;(s=e.onCloseBtnClick)===null||s===void 0||s.call(e,{e:l}),j({trigger:"close-btn",e:l})},ze=function(){var l;(l=e.onOpened)===null||l===void 0||l.call(e)},We=function(){var l;B.value&&e.draggable&&v.value&&(v.value.style.position="relative",v.value.style.left="unset",v.value.style.top="unset"),(l=e.onClosed)===null||l===void 0||l.call(e)},j=function(l){var s;(s=e.onClose)===null||s===void 0||s.call(e,l),t.emit("update:visible",!1)},He=function(l){var s,b=(s=a._events)===null||s===void 0?void 0:s[l];return!!(b!=null&&b.length)},Ke=function(){var l={info:p(y,{class:"".concat(c.value,"-is-info")},null),warning:p(w,{class:"".concat(c.value,"-is-warning")},null),danger:p(w,{class:"".concat(c.value,"-is-error")},null),success:p(O,{class:"".concat(c.value,"-is-success")},null)};return l[e.theme]},Ge=function(){var l=p("h5",{class:"title"},null),s=p(h,null,null),b=m("default","body"),P=p("div",null,[Be({cancelBtn:e.cancelBtn,globalCancel:o.value.cancel,className:"".concat(r.value,"__cancel")}),Ee({theme:e.theme,confirmBtn:e.confirmBtn,globalConfirm:o.value.confirm,globalConfirmBtnTheme:o.value.confirmBtnTheme,className:"".concat(r.value,"__confirm"),confirmLoading:e.confirmLoading})]),Ue=C.value?["".concat(r.value,"__header"),"".concat(r.value,"__header--fullscreen")]:"".concat(r.value,"__header"),Xe=C.value?["".concat(r.value,"__close"),"".concat(r.value,"__close--fullscreen")]:"".concat(r.value,"__close"),T=e.theme==="default"?["".concat(r.value,"__body")]:["".concat(r.value,"__body__icon")],$=u("footer",P);C.value&&$?T.push("".concat(r.value,"__body--fullscreen")):C.value&&T.push("".concat(r.value,"__body--fullscreen--without-footer"));var Ve=C.value?["".concat(r.value,"__footer"),"".concat(r.value,"__footer--fullscreen")]:"".concat(r.value,"__footer"),z=function(Re){B.value&&e.draggable&&Re.stopPropagation()};return p("div",{class:je.value},[p("div",{class:Ne.value,style:De.value,onClick:xe,onMousedown:Ae,onMouseup:Te},[re(p("div",{key:"dialog",class:Z.value,style:J.value,ref:v},[p("div",{class:Ue,onMousedown:z},[p("div",{class:"".concat(r.value,"__header-content")},[Ke(),u("header",l)]),e.closeBtn?p("span",{class:Xe,onClick:$e},[u("closeBtn",s)]):null]),p("div",{class:T,onMousedown:z},[b]),$&&p("div",{class:Ve,onMousedown:z},[$])]),[[rn("draggable"),B.value&&e.draggable]])])])};return Ce(function(){var f=document.documentElement.scrollHeight>document.documentElement.clientHeight,l=f?Mt():0;S.value=document.createElement("style"),S.value.dataset.id="td_dialog_".concat(+new Date,"_").concat(Wt+=1),S.value.innerHTML=`
html body {
overflow-y: hidden;
width: calc(100% - `.concat(l,`px);
}
`)}),Oe(function(){ee(!1),q()}),{COMPONENT_NAME:r,isModal:R,isModeLess:B,isFullScreen:C,maskClass:Fe,dialogClass:Z,dialogStyle:J,dialogEle:v,afterEnter:ze,afterLeave:We,hasEventOn:He,renderDialog:Ge,teleportElement:Pe}},render:function(){var e=this,t=this.COMPONENT_NAME,a=(this.isModal||this.isFullScreen)&&p("div",{key:"mask",class:this.maskClass},null),r=this.renderDialog(),c=[a,r],m={zIndex:this.zIndex},u=["".concat(t,"__ctx"),_(_(_({},"".concat(t,"__ctx--fixed"),this.isModal||this.isFullScreen),"".concat(t,"__ctx--absolute"),this.isModal&&this.showInAttachedElement),"".concat(t,"__ctx--modeless"),this.isModeLess)];return p(an,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[p(nn,{duration:300,name:"".concat(t,"-zoom__vue"),onAfterEnter:e.afterEnter,onAfterLeave:e.afterLeave},{default:function(){return[(!e.destroyOnClose||e.visible)&&re(p("div",D({class:u,style:m},e.$attrs),[c]),[[tn,e.visible]])]}})]}})}});export{Pn as C,Mn as E,Jt as _,nt as a,Nn as b,Vn as c,Ft as d,kt as e,jt as f,Zt as g,Mt as h,zn as l,Pt as o,Tt as u};