The "سفارش مشتریان" / "مشتریان من" entries are shown from session.isSalesExpert, which was fetched from /expert/whoami only once, at sign-in. A slow or failed request (silently swallowed) left the flag false until the next login, so an expert saw a customer-only menu. The dashboard now asks again on mount and on every re-activation, and keeps the current value when the request fails. Rebuilds user-app and user-app-v2 dist. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2 lines
21 KiB
JavaScript
2 lines
21 KiB
JavaScript
import{a9 as k,aj as h,d as se,o as Ce,a1 as ae,Y as Q,a6 as Le,aT as ce,ay as be,ag as W,q as E,h as V,i as te,Q as Re,aB as Se,a5 as Xe,aG as Ne,a as Ye,aa as Ke,aq as Ue,av as qe,ap as Be,aY as Ze,ax as $e,ah as Ge,ai as Qe,an as fe,aZ as ve,a_ as Je,aw as et}from"./index-CW3p0GOu.js";import{K as tt,s as nt,P as at}from"./KeyCode-XNgVk4n7.js";import{o as Ae,_ as ot,a as rt}from"./classCallCheck-D2PNRTXv.js";import{w as Ee}from"./raf-nDFcuFT6.js";var me;function pe(s){if(typeof document>"u")return 0;if(s||me===void 0){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(e),document.body.appendChild(n);var a=e.offsetWidth;n.style.overflow="scroll";var d=e.offsetWidth;a===d&&(d=n.clientWidth),document.body.removeChild(n),me=a-d}return me}var Ve=function(){return{prefixCls:String,width:h.oneOfType([h.string,h.number]),height:h.oneOfType([h.string,h.number]),style:{type:Object,default:void 0},class:String,placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:{type:Object,default:void 0},autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0}}},lt=function(){return k(k({},Ve()),{},{forceRender:{type:Boolean,default:void 0},getContainer:h.oneOfType([h.string,h.func,h.object,h.looseBool])})},it=function(){return k(k({},Ve()),{},{getContainer:Function,getOpenCount:Function,scrollLocker:h.any,switchScrollingEffect:Function})};function ct(s){return Array.isArray(s)?s:[s]}var He={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},st=Object.keys(He).filter(function(s){if(typeof document>"u")return!1;var e=document.getElementsByTagName("html")[0];return s in(e?e.style:{})})[0],Pe=He[st];function Oe(s,e,n,o){s.addEventListener?s.addEventListener(e,n,o):s.attachEvent&&s.attachEvent("on".concat(e),n)}function Te(s,e,n,o){s.removeEventListener?s.removeEventListener(e,n,o):s.attachEvent&&s.detachEvent("on".concat(e),n)}function ut(s,e){var n=typeof s=="function"?s(e):s;return Array.isArray(n)?n.length===2?n:[n[0],n[1]]:[n]}var xe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},he=!(typeof window<"u"&&window.document&&window.document.createElement),dt=function s(e,n,o,a){if(!n||n===document||n instanceof Document)return!1;if(n===e.parentNode)return!0;var d=Math.max(Math.abs(o),Math.abs(a))===Math.abs(a),y=Math.max(Math.abs(o),Math.abs(a))===Math.abs(o),C=n.scrollHeight-n.clientHeight,r=n.scrollWidth-n.clientWidth,c=document.defaultView.getComputedStyle(n),S=c.overflowY==="auto"||c.overflowY==="scroll",D=c.overflowX==="auto"||c.overflowX==="scroll",_=C&&S,$=r&&D;return d&&(!_||_&&(n.scrollTop>=C&&a<0||n.scrollTop<=0&&a>0))||y&&(!$||$&&(n.scrollLeft>=r&&o<0||n.scrollLeft<=0&&o>0))?s(e,n.parentNode,o,a):!1},ft=["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class"],ee={},De=se({compatConfig:{MODE:3},inheritAttrs:!1,props:it(),emits:["close","handleClick","change"],setup:function(e,n){var o=n.emit,a=n.slots,d=Re({startPos:{x:null,y:null}}),y,C=V(),r=V(),c=V(),S=V(),D=V(),_=[],$="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),P=!he&&nt?{passive:!1}:!1;Ce(function(){ae(function(){var l=e.open,t=e.getContainer,i=e.showMask,v=e.autofocus,m=t==null?void 0:t();if(x(e),l&&(m&&m.parentNode===document.body&&(ee[$]=l),q(),ae(function(){v&&b()}),i)){var w;(w=e.scrollLocker)===null||w===void 0||w.lock()}})}),Q(function(){return e.level},function(){x(e)},{flush:"post"}),Q(function(){return e.open},function(){var l=e.open,t=e.getContainer,i=e.scrollLocker,v=e.showMask,m=e.autofocus,w=t==null?void 0:t();w&&w.parentNode===document.body&&(ee[$]=!!l),q(),l?(m&&b(),v&&(i==null||i.lock())):i==null||i.unLock()},{flush:"post"}),Le(function(){var l,t=e.open;delete ee[$],t&&(oe(!1),document.body.style.touchAction=""),(l=e.scrollLocker)===null||l===void 0||l.unLock()}),Q(function(){return e.placement},function(l){l&&(D.value=null)});var b=function(){var t,i;(t=r.value)===null||t===void 0||(i=t.focus)===null||i===void 0||i.call(t)},O=function(t){t.touches.length>1||(d.startPos={x:t.touches[0].clientX,y:t.touches[0].clientY})},A=function(t){if(!(t.changedTouches.length>1)){var i=t.currentTarget,v=t.changedTouches[0].clientX-d.startPos.x,m=t.changedTouches[0].clientY-d.startPos.y;(i===c.value||i===S.value||i===D.value&&dt(i,t.target,v,m))&&t.cancelable&&t.preventDefault()}},j=function l(t){var i=t.target;Te(i,Pe,l),i.style.transition=""},L=function(t){o("close",t)},X=function(t){t.keyCode===tt.ESC&&(t.stopPropagation(),L(t))},U=function(t){var i=e.open,v=e.afterVisibleChange;t.target===C.value&&t.propertyName.match(/transform$/)&&(r.value.style.transition="",!i&&T()&&(document.body.style.overflowX="",c.value&&(c.value.style.left="",c.value.style.width="")),v&&v(!!i))},R=te(function(){var l=e.placement,t=l==="left"||l==="right",i="translate".concat(t?"X":"Y");return{isHorizontal:t,placementName:i}}),q=function(){var t=e.open,i=e.width,v=e.height,m=R.value,w=m.isHorizontal,p=m.placementName,N=D.value?D.value.getBoundingClientRect()[w?"width":"height"]:0,B=(w?i:v)||N;ue(t,p,B)},oe=function(t,i,v,m){var w=e.placement,p=e.levelMove,N=e.duration,B=e.ease,F=e.showMask;_.forEach(function(Z){Z.style.transition="transform ".concat(N," ").concat(B),Oe(Z,Pe,j);var Y=t?v:0;if(p){var re=ut(p,{target:Z,open:t});Y=t?re[0]:re[1]||0}var le=typeof Y=="number"?"".concat(Y,"px"):Y,K=w==="left"||w==="top"?le:"-".concat(le);K=F&&w==="right"&&m?"calc(".concat(K," + ").concat(m,"px)"):K,Z.style.transform=Y?"".concat(i,"(").concat(K,")"):""})},ue=function(t,i,v){if(!he){var m=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?pe(!0):0;oe(t,i,v,m),g(m)}o("change",t)},g=function(t){var i=e.getContainer,v=e.showMask,m=e.open,w=i==null?void 0:i();if(w&&w.parentNode===document.body&&v){var p=["touchstart"],N=[document.body,c.value,S.value,D.value];m&&document.body.style.overflow!=="hidden"?(t&&u(t),document.body.style.touchAction="none",N.forEach(function(B,F){B&&Oe(B,p[F]||"touchmove",F?A:O,P)})):T()&&(document.body.style.touchAction="",t&&f(t),N.forEach(function(B,F){B&&Te(B,p[F]||"touchmove",F?A:O,P)}))}},u=function(t){var i=e.placement,v=e.duration,m=e.ease,w="width ".concat(v," ").concat(m),p="transform ".concat(v," ").concat(m);switch(r.value.style.transition="none",i){case"right":r.value.style.transform="translateX(-".concat(t,"px)");break;case"top":case"bottom":r.value.style.width="calc(100% - ".concat(t,"px)"),r.value.style.transform="translateZ(0)";break}clearTimeout(y),y=setTimeout(function(){r.value&&(r.value.style.transition="".concat(p,",").concat(w),r.value.style.width="",r.value.style.transform="")})},f=function(t){var i=e.placement,v=e.duration,m=e.ease;r.value.style.transition="none";var w,p="width ".concat(v," ").concat(m),N="transform ".concat(v," ").concat(m);switch(i){case"left":{r.value.style.width="100%",p="width 0s ".concat(m," ").concat(v);break}case"right":{r.value.style.transform="translateX(".concat(t,"px)"),r.value.style.width="100%",p="width 0s ".concat(m," ").concat(v),c.value&&(c.value.style.left="-".concat(t,"px"),c.value.style.width="calc(100% + ".concat(t,"px)"));break}case"top":case"bottom":{r.value.style.width="calc(100% + ".concat(t,"px)"),r.value.style.height="100%",r.value.style.transform="translateZ(0)",w="height 0s ".concat(m," ").concat(v);break}}clearTimeout(y),y=setTimeout(function(){r.value&&(r.value.style.transition="".concat(N,",").concat(w?"".concat(w,","):"").concat(p),r.value.style.transform="",r.value.style.width="",r.value.style.height="")})},T=function(){return!Object.keys(ee).some(function(t){return ee[t]})},x=function(t){var i=t.level,v=t.getContainer;if(!he){var m=v==null?void 0:v(),w=m?m.parentNode:null;if(_=[],i==="all"){var p=w?Array.prototype.slice.call(w.children):[];p.forEach(function(N){N.nodeName!=="SCRIPT"&&N.nodeName!=="STYLE"&&N.nodeName!=="LINK"&&N!==m&&_.push(N)})}else i&&ct(i).forEach(function(N){document.querySelectorAll(N).forEach(function(B){_.push(B)})})}},M=function(t){o("handleClick",t)},I=V(!1);return Q(r,function(){ae(function(){I.value=!0})}),function(){var l,t,i,v=e.width,m=e.height,w=e.open,p=e.prefixCls,N=e.placement;e.level,e.levelMove,e.ease,e.duration,e.getContainer,e.onChange,e.afterVisibleChange;var B=e.showMask,F=e.maskClosable,Z=e.maskStyle,Y=e.keyboard;e.getOpenCount,e.scrollLocker;var re=e.contentWrapperStyle,le=e.style,K=e.class,je=ce(e,ft),de=w&&I.value,Ie=be(p,(l={},W(l,"".concat(p,"-").concat(N),!0),W(l,"".concat(p,"-open"),de),W(l,K,!!K),W(l,"no-mask",!B),l)),Fe=R.value.placementName,ze=N==="left"||N==="top"?"-100%":"100%",ke=de?"":"".concat(Fe,"(").concat(ze,")");return E("div",k(k({},Ae(je,["switchScrollingEffect","autofocus"])),{},{tabindex:-1,class:Ie,style:le,ref:r,onKeydown:de&&Y?X:void 0,onTransitionend:U}),[B&&E("div",{class:"".concat(p,"-mask"),onClick:F?L:void 0,style:Z,ref:c},null),E("div",{class:"".concat(p,"-content-wrapper"),style:k({transform:ke,msTransform:ke,width:xe(v)?"".concat(v,"px"):v,height:xe(m)?"".concat(m,"px"):m},re),ref:C},[E("div",{class:"".concat(p,"-content"),ref:D},[(t=a.default)===null||t===void 0?void 0:t.call(a)]),a.handler?E("div",{onClick:M,ref:S},[(i=a.handler)===null||i===void 0?void 0:i.call(a)]):null])])}}});function J(s){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.element,o=n===void 0?document.body:n,a={},d=Object.keys(s);return d.forEach(function(y){a[y]=o.style[y]}),d.forEach(function(y){o.style[y]=s[y]}),a}function vt(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ye={};const Me=function(s){if(!(!vt()&&!s)){var e="ant-scrolling-effect",n=new RegExp("".concat(e),"g"),o=document.body.className;if(s){if(!n.test(o))return;J(ye),ye={},document.body.className=o.replace(n,"").trim();return}var a=pe();if(a&&(ye=J({position:"relative",width:"calc(100% - ".concat(a,"px)")}),!n.test(o))){var d="".concat(o," ").concat(e);document.body.className=d.trim()}}};var H=[],We="ant-scrolling-effect",ge=new RegExp("".concat(We),"g"),mt=0,we=new Map,ht=ot(function s(e){var n=this;rt(this,s),W(this,"getContainer",function(){var o;return(o=n.options)===null||o===void 0?void 0:o.container}),W(this,"reLock",function(o){var a=H.find(function(d){var y=d.target;return y===n.lockTarget});a&&n.unLock(),n.options=o,a&&(a.options=o,n.lock())}),W(this,"lock",function(){var o;if(!H.some(function(r){var c=r.target;return c===n.lockTarget})){if(H.some(function(r){var c,S=r.options;return(S==null?void 0:S.container)===((c=n.options)===null||c===void 0?void 0:c.container)})){H=[].concat(Se(H),[{target:n.lockTarget,options:n.options}]);return}var a=0,d=((o=n.options)===null||o===void 0?void 0:o.container)||document.body;(d===document.body&&window.innerWidth-document.documentElement.clientWidth>0||d.scrollHeight>d.clientHeight)&&(a=pe());var y=d.className;if(H.filter(function(r){var c,S=r.options;return(S==null?void 0:S.container)===((c=n.options)===null||c===void 0?void 0:c.container)}).length===0&&we.set(d,J({width:a!==0?"calc(100% - ".concat(a,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:d})),!ge.test(y)){var C="".concat(y," ").concat(We);d.className=C.trim()}H=[].concat(Se(H),[{target:n.lockTarget,options:n.options}])}}),W(this,"unLock",function(){var o,a=H.find(function(C){var r=C.target;return r===n.lockTarget});if(H=H.filter(function(C){var r=C.target;return r!==n.lockTarget}),!(!a||H.some(function(C){var r,c=C.options;return(c==null?void 0:c.container)===((r=a.options)===null||r===void 0?void 0:r.container)}))){var d=((o=n.options)===null||o===void 0?void 0:o.container)||document.body,y=d.className;ge.test(y)&&(J(we.get(d),{element:d}),we.delete(d),d.className=d.className.replace(ge,"").trim())}}),this.lockTarget=mt++,this.options=e}),z=0,ne=qe(),ie={},G=function(e){if(!ne)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(Ue(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body};const yt=se({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:h.any,visible:{type:Boolean,default:void 0}},setup:function(e,n){var o=n.slots,a=V(),d=V(),y=V(),C=new ht({container:G(e.getContainer)}),r=function(){var b,O;(b=a.value)===null||b===void 0||(O=b.parentNode)===null||O===void 0||O.removeChild(a.value)},c=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(b||a.value&&!a.value.parentNode){var O=G(e.getContainer);return O?(O.appendChild(a.value),!0):!1}return!0},S=function(){return ne?(a.value||(a.value=document.createElement("div"),c(!0)),D(),a.value):null},D=function(){var b=e.wrapperClassName;a.value&&b&&b!==a.value.className&&(a.value.className=b)};Xe(function(){D(),c()});var _=function(){z===1&&!Object.keys(ie).length?(Me(),ie=J({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):z||(J(ie),ie={},Me(!0))},$=Ke();return Ce(function(){var P=!1;Q([function(){return e.visible},function(){return e.getContainer}],function(b,O){var A=Ne(b,2),j=A[0],L=A[1],X=Ne(O,2),U=X[0],R=X[1];if(ne&&G(e.getContainer)===document.body&&(j&&!U?z+=1:P&&(z-=1)),P){var q=typeof L=="function"&&typeof R=="function";(q?L.toString()!==R.toString():L!==R)&&r(),j&&j!==U&&ne&&G(L)!==C.getContainer()&&C.reLock({container:G(L)})}P=!0},{immediate:!0,flush:"post"}),ae(function(){c()||(y.value=Ee(function(){$.update()}))})}),Ye(function(){var P=e.visible,b=e.getContainer;ne&&G(b)===document.body&&(z=P&&z?z-1:z),r(),Ee.cancel(y.value)}),function(){var P=e.forceRender,b=e.visible,O=null,A={getOpenCount:function(){return z},getContainer:S,switchScrollingEffect:_,scrollLocker:C};return(P||b||d.value)&&(O=E(at,{getContainer:S,ref:d},{default:function(){var L;return(L=o.default)===null||L===void 0?void 0:L.call(o,A)}})),O}}});var gt=["afterVisibleChange","getContainer","wrapperClassName","forceRender"],wt=["visible","afterClose"],bt=se({compatConfig:{MODE:3},inheritAttrs:!1,props:Be(lt(),{prefixCls:"drawer",placement:"left",getContainer:"body",level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",afterVisibleChange:function(){},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],slots:["handler"],setup:function(e,n){var o=n.emit,a=n.slots,d=V(null),y=function(c){o("handleClick",c)},C=function(c){o("close",c)};return function(){e.afterVisibleChange;var r=e.getContainer,c=e.wrapperClassName,S=e.forceRender,D=ce(e,gt),_=null;if(!r)return E("div",{class:c,ref:d},[E(De,k(k({},D),{},{open:e.open,getContainer:function(){return d.value},onClose:C,onHandleClick:y}),a)]);var $=!!a.handler||S;return($||e.open||d.value)&&(_=E(yt,{visible:e.open,forceRender:$,getContainer:r,wrapperClassName:c},{default:function(b){var O=b.visible,A=b.afterClose,j=ce(b,wt);return E(De,k(k(k({ref:d},D),j),{},{open:O!==void 0?O:e.open,afterVisibleChange:A!==void 0?A:e.afterVisibleChange,onClose:C,onHandleClick:y}),a)}})),_}}}),Ct=["width","height","visible","placement","mask","wrapClassName","class"],pt=$e("top","right","bottom","left");$e("default","large");var _e={distance:180},kt=function(){return{autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:h.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:h.any,maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},wrapStyle:{type:Object,default:void 0},style:{type:Object,default:void 0},class:h.any,wrapClassName:String,size:{type:String},drawerStyle:{type:Object,default:void 0},headerStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},contentWrapperStyle:{type:Object,default:void 0},title:h.any,visible:{type:Boolean,default:void 0},width:h.oneOfType([h.string,h.number]),height:h.oneOfType([h.string,h.number]),zIndex:Number,prefixCls:String,push:h.oneOfType([h.looseBool,{type:Object}]),placement:h.oneOf(pt),keyboard:{type:Boolean,default:void 0},extra:h.any,footer:h.any,footerStyle:{type:Object,default:void 0},level:h.any,levelMove:{type:[Number,Array,Function]},handle:h.any,afterVisibleChange:Function,onAfterVisibleChange:Function,"onUpdate:visible":Function,onClose:Function}},St=se({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:Be(kt(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:_e}),slots:["closeIcon","title","extra","footer","handle"],setup:function(e,n){var o=n.emit,a=n.slots,d=n.attrs,y=V(!1),C=V(!1),r=V(null),c=Ge("parentDrawerOpts",null),S=Qe("drawer",e),D=S.prefixCls;fe(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),fe(e.wrapStyle===void 0,"Drawer","`wrapStyle` prop is deprecated, please use `style` instead"),fe(e.wrapClassName===void 0,"Drawer","`wrapClassName` prop is deprecated, please use `class` instead");var _=function(){y.value=!0},$=function(){y.value=!1,ae(function(){P()})};et("parentDrawerOpts",{setPush:_,setPull:$}),Ce(function(){var g=e.visible;g&&c&&c.setPush()}),Le(function(){c&&c.setPull()}),Q(function(){return e.visible},function(g){c&&(g?c.setPush():c.setPull())},{flush:"post"});var P=function(){var u,f;(u=r.value)===null||u===void 0||(f=u.domFocus)===null||f===void 0||f.call(u)},b=function(u){o("update:visible",!1),o("close",u)},O=function(u){var f;(f=e.afterVisibleChange)===null||f===void 0||f.call(e,u),o("afterVisibleChange",u)},A=te(function(){return e.destroyOnClose&&!e.visible}),j=function(){var u=A.value;u&&(e.visible||(C.value=!0))},L=te(function(){var g=e.push,u=e.placement,f;return typeof g=="boolean"?f=g?_e.distance:0:f=g.distance,f=parseFloat(String(f||0)),u==="left"||u==="right"?"translateX(".concat(u==="left"?f:-f,"px)"):u==="top"||u==="bottom"?"translateY(".concat(u==="top"?f:-f,"px)"):null}),X=te(function(){var g=e.visible,u=e.mask,f=e.placement,T=e.size,x=T===void 0?"default":T,M=e.width,I=e.height;if(!g&&!u)return{};var l={};if(f==="left"||f==="right"){var t=x==="large"?736:378;l.width=typeof M>"u"?t:M,l.width=typeof l.width=="string"?l.width:"".concat(l.width,"px")}else{var i=x==="large"?736:378;l.height=typeof I>"u"?i:I,l.height=typeof l.height=="string"?l.height:"".concat(l.height,"px")}return l}),U=te(function(){var g=e.zIndex,u=e.wrapStyle,f=e.mask,T=e.style,x=f?{}:X.value;return k(k(k({zIndex:g,transform:y.value?L.value:void 0},x),u),T)}),R=function(u){var f=e.closable,T=e.headerStyle,x=ve(a,e,"extra"),M=ve(a,e,"title");return!M&&!f?null:E("div",{class:be("".concat(u,"-header"),W({},"".concat(u,"-header-close-only"),f&&!M&&!x)),style:T},[E("div",{class:"".concat(u,"-header-title")},[q(u),M&&E("div",{class:"".concat(u,"-title")},[M])]),x&&E("div",{class:"".concat(u,"-extra")},[x])])},q=function(u){var f,T=e.closable,x=a.closeIcon?(f=a.closeIcon)===null||f===void 0?void 0:f.call(a):e.closeIcon;return T&&E("button",{key:"closer",onClick:b,"aria-label":"Close",class:"".concat(u,"-close")},[x===void 0?E(Je,null,null):x])},oe=function(u){var f;if(C.value&&!e.visible)return null;C.value=!1;var T=e.bodyStyle,x=e.drawerStyle,M={},I=A.value;return I&&(M.opacity=0,M.transition="opacity .3s"),E("div",{class:"".concat(u,"-wrapper-body"),style:k(k({},M),x),onTransitionend:j},[R(u),E("div",{key:"body",class:"".concat(u,"-body"),style:T},[(f=a.default)===null||f===void 0?void 0:f.call(a)]),ue(u)])},ue=function(u){var f=ve(a,e,"footer");if(!f)return null;var T="".concat(u,"-footer");return E("div",{class:T,style:e.footerStyle},[f])};return function(){var g;e.width,e.height;var u=e.visible,f=e.placement,T=e.mask,x=e.wrapClassName,M=e.class,I=ce(e,Ct),l=T?X.value:{},t=T?"":"no-mask",i=k(k(k(k({},d),Ae(I,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","wrapStyle","onAfterVisibleChange","onClose","onUpdate:visible"])),l),{},{onClose:b,afterVisibleChange:O,handler:!1,prefixCls:D.value,open:u,showMask:T,placement:f,class:be((g={},W(g,M,M),W(g,x,!!x),W(g,t,!!t),g)),style:U.value,ref:r});return E(bt,i,{handler:e.handle?function(){return e.handle}:a.handle,default:function(){return oe(D.value)}})}}});const Tt=Ze(St);export{Tt as D};
|