PageSourceSearch

https://www.vben.pro/js/message-B7mZicJS.js

js vben.pro collected 2026-09-25 21:23:57 UTC 36,561 bytes, 1 lines download raw bytes

1import{D as e,En as t,Ht as n,J as r,L as i,On as a,Q as o,Tn as s,Ut as c,Z as l,ct as u,et as d,g as f,gn as p,gt as m,k as h,pn as g,u as _,vn as v,wn as y,xn as b}from"./runtime-core.esm-bundler-BqIb1SNH.js";import{f as x,n as S}from"./runtime-dom.esm-bundler-Bnb-V1jf.js";import{t as C}from"./objectSpread2-BmonrgTA.js";import{t as w}from"./objectWithoutProperties-CjlH8YfO.js";import{G as T,J as E,Q as D,X as O,Y as k,Z as A,bt as j,et as M,i as N,l as P,n as F,nt as I,r as L,rt as ee,s as R,st as z,tt as B,v as V,x as H,xt as U}from"./genStyleUtils-C_boNFfb.js";import{t as te}from"./warning-CEDUDbFc.js";import{n as W,t as ne}from"./config-provider-DElWMKfS.js";import{n as re}from"./dist-Cxv7fRNY.js";import{t as ie}from"./CheckCircleFilled-B3PQ148D.js";import{t as ae}from"./CloseCircleFilled-D1f_3G62.js";import{t as oe}from"./ExclamationCircleFilled-DAemHxIP.js";import{t as se}from"./InfoCircleFilled-BUFuOVkQ.js";import{t as ce}from"./LoadingOutlined-B1-_ddEQ.js";import{t as le}from"./useZIndex-dKLW-73J.js";import{t as G}from"./useCSSVarCls-DyuilhAh.js";import{t as ue}from"./pickAttrs-CAzoxF9m.js";function de(e){let{motionDurationMid:t,motionEaseInOut:n}=e,r=`${t} ${n}`;return{transform:`scale(var(--notification-scale, 1))`,transition:[`transform`,`inset`,`clip-path`,`opacity`].map(e=>`${e} ${r}`).join(`, `)}}function fe(e,t){let{componentCls:n,antCls:r,colorSuccess:i,colorInfo:a,colorWarning:o,colorError:s,colorTextHeading:c,colorText:l,boxShadow:u,borderRadiusLG:d,fontSize:f,lineHeight:p,notificationBg:m,notificationPadding:h,notificationMarginEdge:g,margin:_,calc:v}=e,y=`${n}-notice`,[b,x]=F(r,`notification`);return{[y]:C(C(C({position:`absolute`,width:t.width,maxWidth:`calc(100vw - ${H(v(g).mul(2).equal())})`,padding:h,pointerEvents:`auto`,[b(`icon-font-size`)]:t.iconFontSize,[b(`title-font-size`)]:t.titleFontSize,[b(`title-line-height`)]:t.titleLineHeight,boxSizing:`border-box`,color:l,background:m,borderRadius:d,boxShadow:u,fontSize:f,lineHeight:p,wordWrap:`break-word`,overflow:`visible`},de(e)),t.noticeStyle),{},{"&::after":{position:`absolute`,insetInline:0,top:v(_).mul(-1).equal(),height:_,content:`""`}},t.typeStyle&&{"&-success":{background:x(`color-success-bg`,m)},"&-error":{background:x(`color-error-bg`,m)},"&-info":{background:x(`color-info-bg`,m)},"&-warning":{background:x(`color-warning-bg`,m)}}),[`${y}-wrapper`]:C({display:`flex`},t.contentStyle),[`${y}-title`]:{color:c,fontSize:x(`title-font-size`),lineHeight:x(`title-line-height`)},[`${y}-icon`]:{flex:`none`,fontSize:x(`icon-font-size`),lineHeight:1,[`&${y}-icon-success`]:{color:i},[`&${y}-icon-info, &${y}-icon-loading`]:{color:a},[`&${y}-icon-warning`]:{color:o},[`&${y}-icon-error`]:{color:s}}}}function pe(e){let{componentCls:t,progressBg:n,notificationProgressHeight:r,fontSize:i,borderRadiusLG:a,width:o,notificationIconSize:s,colorText:c,motionDurationMid:l,fontSizeLG:u,lineHeightLG:d,marginSM:f,marginXS:p,paddingLG:m,notificationPaddingVertical:h,notificationPaddingHorizontal:g,notificationCloseButtonSize:_,colorIcon:v,borderRadiusSM:y,colorIconHover:b,colorBgTextHover:x,colorBgTextActive:S}=e,w=`${t}-notice`;return C(C({},fe(e,{width:o,iconFontSize:s,titleFontSize:u,titleLineHeight:d,contentStyle:{alignItems:`flex-start`,gap:f},typeStyle:!0})),{},{[`${w}-section`]:{display:`flex`,flexDirection:`column`,flex:`auto`,gap:p,minWidth:0},[`${w}-description`]:{color:c,fontSize:i},[`${w}-closable ${w}-title`]:{paddingInlineEnd:m},[`${w}-closable ${w}-description`]:{paddingInlineEnd:m},[`${w}-closable ${w}-title + ${w}-description`]:{paddingInlineEnd:0},[`${w}-close`]:C({position:`absolute`,top:h,insetInlineEnd:g,display:`flex`,alignItems:`center`,justifyContent:`center`,width:_,height:_,color:v,background:`none`,border:`none`,borderRadius:y,outline:`none`,transition:[`color`,`background-color`].map(e=>`${e} ${l}`).join(`, `),"&:hover":{color:b,backgroundColor:x},"&:active":{backgroundColor:S}},R(e)),[`${w}-progress`]:{position:`absolute`,bottom:0,display:`block`,appearance:`none`,inlineSize:`calc(100% - ${H(a)} * 2)`,blockSize:r,border:0,left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:`rgba(0, 0, 0, 0.04)`},"&::-moz-progress-bar":{background:n},"&::-webkit-progress-value":{borderRadius:a,background:n}},[`${w}-actions`]:{float:`right`,marginTop:f}})}
1function me(e){let{componentCls:t,width:n}=e,r=`${t}-notice`,i=`${r}-actions`,a=pe(e);return{[`${r}-pure-panel`]:C(C({width:n,maxWidth:`100%`},a),{},{[r]:C(C({},a[r]),{},{position:`relative`,width:`100%`,maxWidth:`100%`}),[i]:C(C({},a[i]),{},{float:`none`,textAlign:`end`})})}}var he=e=>{let{componentCls:t}=e;return{[t]:pe(e)}},ge=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],_e=`--notification-margin-edge`;function ve(e,t){return{blockEnd:e===`top`?`bottom`:`top`,inlineEnd:t===`left`?`right`:`left`}}function ye(e){var t,n;return`translate3d(${(t=e==null?void 0:e.x)==null?`0`:t}, ${(n=e==null?void 0:e.y)==null?`0`:n}, 0) scale(var(--notification-scale, 1))`}function be(e,t){let n=e.startsWith(`bottom`)?`bottom`:`top`,r=e.endsWith(`Right`)?`right`:`left`,{blockEnd:i,inlineEnd:a}=ve(n,r),o=e===`top`||e===`bottom`,s=e===`top`||e.endsWith(`Left`)?`-${t}`:t;return{placement:e,vertical:n,blockEnd:i,horizontal:r,inlineEnd:a,motionOffset:o?{x:`-50%`,y:s}:{x:s},baseMotionOffset:o?{x:`-50%`}:void 0,isCenterPlacement:o}}function xe(e){return e===`bottom`?`column-reverse`:`column`}function Se(e){let t=`var(${_e}, 0px)`;return`calc(var(--notification-${e}, ${t}) - ${t})`}function Ce(e){return e===`bottom`?`center top`:`center bottom`}function we(e){return H(e.calc(e.marginXXL).mul(-1).equal())}function Te(e){let t=we(e);return`inset(${t} ${t} ${t} ${t})`}function Ee(e,t){let n=we(e);return t===`bottom`?`inset(${n} ${n} 50% ${n})`:`inset(50% ${n} ${n} ${n})`}function De(e,t){let{componentCls:n}=e,{placement:r,vertical:i,blockEnd:a,horizontal:o,inlineEnd:s,isCenterPlacement:c}=t,l=`${n}-notice`,u=`${l}${n}-fade`,d=ye(t.motionOffset),f=ye(t.baseMotionOffset),p=Ce(i);return{[`&${n}-${r}`]:C(C({[i]:Se(i),[a]:`auto`,display:`flex`,flexDirection:xe(i)},c?{marginInline:0,left:`50%`,right:`auto`,transform:`translateX(-50%)`}:{[o]:0,[s]:`auto`}),{},{[l]:C(C({[i]:`var(--notification-y, 0)`},c?{left:`50%`,transform:f}:{[o]:`var(--notification-x, 0)`}),{},{transformOrigin:p}),[`${u}-appear-prepare, ${u}-enter-prepare`]:{opacity:0,transform:d,transition:`none`},[`${u}-appear-start, ${u}-enter-start`]:{opacity:0,transform:d},[`${u}-appear-active, ${u}-enter-active`]:{opacity:1,transform:f},[`${u}-leave-start`]:{opacity:1,transform:f},[`${u}-leave-active`]:{opacity:0,transform:d},[`&${n}-stack:not(${n}-stack-expanded)`]:{[l]:{clipPath:Ee(e,i)},[`${l}[data-notification-index='0']`]:{clipPath:Te(e)}}})}}function Oe(e,t=ge){let{notificationMotionOffset:n}=e,r=H(n);return C({},t.reduce((t,n)=>C(C({},t),De(e,be(n,r))),{}))}var ke=e=>{let{componentCls:t}=e;return{[t]:Oe(e)}},Ae=3;function je(e){return{zIndexPopup:e.zIndexPopupBase+le+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}}var K=e=>{let t=e.paddingMD,n=e.paddingLG;return V(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${H(e.paddingMD)} ${H(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,notificationProgressHeight:2,notificationMotionOffset:64})};function Me(e){return`inset(${e} ${e} ${e} ${e})`}var Ne=e=>{let{componentCls:t,motionDurationMid:n,motionDurationSlow:r,motionEaseInOut:i}=e,a=`${`${t}-list`}-content`;return{[a]:{position:`relative`,display:`flex`,flexShrink:0,flexDirection:`column`,gap:e.notificationMarginBottom,width:`100%`,willChange:`height, transform`,transition:`none`,[`&${a}-decrease`]:{transition:`height calc(${r} * 2) ${i} ${n}`}},[`${t}-fade`]:{backfaceVisibility:`hidden`,willChange:`transform, opacity`}}};function Pe(e,t){var n;let{componentCls:r,notificationMarginEdge:i}=e,a=`--notification-margin-edge`,o=`${r}-notice`,s=`${r}-list`,c=t.listWidthKey?e.calc(e[t.listWidthKey]).add(e.calc(i).mul(2)).equal():`100%`,l=`${o}:nth-last-child(n + ${((n=t.stackVisibleCount)==null?Ae:n)+1})`,u=Me(H(e.calc(e.marginXXL).mul(-1).equal()));return{[r]:C(C(C({},P(e)),{},{[a]:H(i),position:`fixed`,zIndex:e.zIndexPopup,width:c,maxWidth:`100vw`,height:`100vh`,overflow:`hidden`,overscrollBehavior:`contain`,[`${r}-hook-holder`]:{position:`relative`},[`&${s}`]:{maxHeight:`100vh`,padding:`var(${a})`,overflowX:`hidden`,overflowY:`auto`,overscrollBehavior:`contain`,scrollbarWidth:`none`,msOverflowStyle:`none`,pointerEvents:`none`,"&::-webkit-scrollbar":{display:`none`,width:0,height:0}}},Ne(e)),{},{[`&${r}-stack`]:{[o]:{clipPath:u},[`&:not(${r}-stack-expanded)`]:{[o]:{"--notification-scale":`calc(1 - min(var(--notification-index, 0), 2) * 0.06)`},[`${o}
1:not(${o}-stack-in-threshold)`]:{opacity:0,pointerEvents:`none`},[l]:{opacity:0,pointerEvents:`none`}}},"&-rtl":{direction:`rtl`,[`${o}-actions`]:{float:`left`}}})}}var Fe=N([`Notification`,`PurePanel`],e=>me(K(e)),je);function Ie(e,t){var n;let r=(n=t.itemStyle)==null?he:n;return[Pe(e,t),r(e),ke(e)]}var Le=L(`Notification`,e=>Ie(K(e),{listWidthKey:`width`}),je),Re=[`&::after`],ze=e=>{let t=e.calc(e.controlHeightLG).sub(e.calc(e.fontSize).mul(e.lineHeight)).div(2).equal(),n=e.paddingSM;return V(K(e),{notificationBg:e.contentBg,notificationPadding:e.contentPadding,notificationPaddingVertical:t,notificationPaddingHorizontal:n})},Be=e=>({zIndexPopup:e.zIndexPopupBase+le+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});function q(e){let{fontSize:t,fontSizeLG:n,lineHeight:r}=e;return fe(e,{width:`max-content`,iconFontSize:n,titleFontSize:t,titleLineHeight:r,contentStyle:{alignItems:`center`,gap:e.marginXS},noticeStyle:{zIndex:1}})}var Ve=e=>{let{componentCls:t}=e,n=`${t}-notice`,r=`${t}-list-content`,i=q(e)[n],{"&::after":a}=i,o=w(i,Re),s=C(C({},o),{},{position:`absolute`,zIndex:-1,left:`50%`,height:e.calc(e.marginXS).mul(2).equal(),padding:0,boxShadow:e.boxShadowTertiary,opacity:0,pointerEvents:`none`,transform:`translateX(-50%) translateY(100%)`,transition:[`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,`transform ${e.motionDurationFast} ${e.motionEaseInOut}`,`width ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(`, `),content:`""`});return{[t]:{[`&${t}-stack`]:{[r]:{isolation:`isolate`,"&::before":C(C({},s),{},{top:`calc(var(--top-notificiation-height) - ${H(e.marginXS)})`,width:`calc(var(--top-notificiation-width) - ${H(e.margin)})`}),"&::after":C(C({},s),{},{zIndex:-2,top:`var(--top-notificiation-height)`,width:`calc(var(--top-notificiation-width) - ${H(e.calc(e.margin).mul(2).equal())})`})},[`&:not(${t}-stack-expanded)`]:{[r]:{"&::before, &::after":{opacity:1,transform:`translateX(-50%) translateY(0)`}}}}}}},He=e=>{let{componentCls:t}=e,n=`${t}-notice`,r=q(e);return{[`${n}-pure-panel`]:C(C({width:`max-content`,maxWidth:`100%`},r),{},{[n]:C(C({},r[n]),{},{position:`relative`,width:`max-content`,maxWidth:`100%`})})}};N([`Message`,`PurePanel`],e=>He(ze(e)),Be);var Ue=e=>({[e.componentCls]:q(e)}),J=L(`Message`,e=>{let t=ze(e);return[Ie(t,{stackVisibleCount:1,itemStyle:Ue}),Ve(t)]},Be),We=h(t=>()=>e(`progress`,{class:t.className,max:`100`,value:t.percent,style:t.style},null),{props:{className:{type:String,required:!1,default:void 0},style:{type:Object,required:!1,default:void 0},percent:{type:Number,required:!0}},name:`NotificationProgress`,inheritAttrs:!1});function Ge(e){let t=f(()=>{let t=e.value;return t===!1?{closeIcon:null,disabled:!0}:typeof t==`object`&&t?t:{}}),n=f(()=>{var e;let n=t.value;return C(C({},n),{},{closeIcon:`closeIcon`in n?n.closeIcon:`×`,disabled:(e=n.disabled)!=null&&e})}),r=f(()=>ue(n.value,!0));return[f(()=>!!e.value),n,r]}function Ke(e,t,r){let i=b(0),a=b(!1),o=0,s=null,c=null,l=()=>{let e=Date.now();s!==null&&(o+=e-s),s=e},u=()=>{c!==null&&(cancelAnimationFrame(c),c=null)};return n(e,()=>{let t=typeof e.value==`number`?e.value:0;i.value=Math.max(t,0)*1e3,o=0,a.value=i.value>0},{immediate:!0}),n(a,e=>{if(u(),!e)return;s=Date.now();let n=()=>{if(l(),o>=i.value){r(1),t();return}r(Math.min(o/i.value,1)),c=requestAnimationFrame(n)};n()},{immediate:!0}),g(()=>{u()}),[()=>{i.value>0?(s=Date.now(),a.value=!0):r(0)},()=>{l(),a.value=!1}]}var qe=h((t,{attrs:r,expose:i})=>{let a=v(null),o=b(0),s=b(!1);i({nativeElement:a});let[c,l,u]=Ge(f(()=>t.closable)),p=()=>{var e,n,r;(e=(n=l.value).onClose)==null||e.call(n),(r=t.onClose)==null||r.call(t)},[m,h]=Ke(f(()=>t.duration===void 0?4.5:t.duration),p,e=>{o.value=e});n([()=>t.hovering,s,()=>t.pauseOnHover],()=>{var e;((e=t.pauseOnHover)==null||e)&&(t.hovering?h():s.value||m())},{immediate:!0});let g=b(t.offset),_=b(t.notificationIndex);n(()=>t.offset,e=>{e!==void 0&&(g.value=e)}),n(()=>t.notificationIndex,e=>{e!==void 0&&(_.value=e)});let y=e=>{var n,r,i,a;s.value=!0,((n=t.pauseOnHover)==null||n)&&h(),(r=t.onMouseEnter)==null||r.call(t,e),(i=t.props)==null||(a=i.onMouseenter)==null||a.call(i,e)},x=e=>{var n,r,i,a;s.value=!1,((n=t.pauseOnHover)==null||n)&&!t.hovering&&m(),(r=t.onMouseLeave)==null||r.call(t,e),(i=t.props)==null||(a=i.onMouseleave)==null||a.call(i,e)},S=e=>{e.preventDefault(),e.stopPropagation(),p()};return()=>{var n,i,s,f;let{prefixCls:p,className:m,style:h,classNames:v,styles:b,components:w,title:T,description:E,icon:D,actions:O,role:k,stackInThreshold:A,props:j,showProgress:M,duration:N}=t,P=`${p}-notice`,F=T==null?null:e(`div`,{class:z(`${P}-title`,v==null?void 0:v.title),style:b==null?void 0:b.title},[T]),I=E==null?null:e(`div`,{class:z(`${P}-description`,v==null?void 0:v.description),style:b==null?void 0:b.description},[E]),L=F!==null,ee=I!==null,R=null;R=L&&ee?e(`div`,{class:z(`${P}-section`,v==null?void 0:v.section),style:b==null?void 0:b.section},[F,I]):F||I,D!=null&&(R=e(`div`,{class:z(`${P}-wrapper`,v==null?void 0:v.wrapper),style:b==null?void 0:b.wrapper},[e(`div`,{class:z(`${P}-icon`,v==null?void 0:v.icon),style:b==null?void 0:b.icon},[D]),R]));let B=O?e(`div`,{class:z(`${P}-actions`,v==null?void 0:v.actions),style:b==null?void 0:b.actions},[O]):null,V=(n=t.offset)==null?g.value:n,H=(i=(s=t.notificationIndex)==null?_.value:s)==null?0:i,U=100-Math.min(Math.max(o.value*100,
10),100),te=(w==null?void 0:w.progress)||We,W=C(C({"--notification-index":H},b==null?void 0:b.root),h);V!==void 0&&(W[`--notification-y`]=`${V}px`);let ne=(f=k==null?j==null?void 0:j.role:k)==null?`alert`:f;return e(`div`,d(j,{ref:a,role:ne,"data-notification-index":H,class:z(P,m,r.class,v==null?void 0:v.root,{[`${P}-closable`]:c.value,[`${P}-stack-in-threshold`]:A}),style:C(C({},W),r.style),onClick:t.onClick,onMouseenter:y,onMouseleave:x}),[R,B,c.value&&e(`button`,d({class:z(`${P}-close`,v==null?void 0:v.close),"aria-label":`Close`},u.value,{style:b==null?void 0:b.close,onClick:S}),[l.value.closeIcon]),M&&typeof N==`number`&&N>0&&e(te,{className:z(`${P}-progress`,v==null?void 0:v.progress),percent:U,style:b==null?void 0:b.progress},null)])}},{props:{prefixCls:{type:String,required:!0},className:{type:String,required:!1,default:void 0},style:{type:Object,required:!1,default:void 0},classNames:{type:Object,required:!1,default:void 0},styles:{type:Object,required:!1,default:void 0},components:{type:Object,required:!1,default:void 0},title:{type:[Object,Function,String,Number,null,Boolean,Array],required:!1,default:void 0},description:{type:[Object,Function,String,Number,null,Boolean,Array],required:!1,default:void 0},icon:{type:[Object,Function,String,Number,null,Boolean,Array],required:!1,default:void 0},actions:{type:[Object,Function,String,Number,null,Boolean,Array],required:!1,default:void 0},role:{type:String,required:!1,default:void 0},closable:{type:[Boolean,Object,null],required:!1,default:void 0},offset:{type:Number,required:!1,default:void 0},notificationIndex:{type:Number,required:!1,default:void 0},stackInThreshold:{type:Boolean,required:!1,default:void 0},props:{type:Object,required:!1,default:void 0},duration:{type:[Number,Boolean,null],required:!1,default:void 0},showProgress:{type:Boolean,required:!1,default:void 0},times:{type:Number,required:!1,default:void 0},hovering:{type:Boolean,required:!1,default:void 0},pauseOnHover:{type:Boolean,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},onMouseEnter:{type:Function,required:!1,default:void 0},onMouseLeave:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0}},name:`Notification`,inheritAttrs:!1}),Je=Symbol(`NotificationContext`);function Ye(e){return m(Je,e),e}function Xe(){return r(Je,v({}))}function Ze(){let e=b({});return[e,(t,n)=>{if(!n){if(!(t in e.value))return;let n=C({},e.value);delete n[t],e.value=n;return}let r={width:n.offsetWidth,height:n.offsetHeight},i=e.value[t];i&&i.width===r.width&&i.height===r.height||(e.value=C(C({},e.value),{},{[t]:r}))}]}function Qe(e,t,n){let[r,i]=Ze();return[f(()=>{var i,a;let o=0,s=0,c=t.value,l=(i=c==null?void 0:c.threshold)==null?0:i,u=(a=c==null?void 0:c.offset)==null?0:a,d=new Map,f,p;return e.value.slice().reverse().forEach((e,t)=>{var i,a;let m=String(e.key),h=(i=(a=r.value[m])==null?void 0:a.height)==null?0:i,g=c&&t>0?o+u-h:o;if(d.set(m,g),t===0){var _,v;f=h,p=(_=(v=r.value[m])==null?void 0:v.width)==null?0:_}(!c||t<l)&&(s=Math.max(s,g+h)),c?o=g+h:o+=h+n.value}),{notificationPosition:d,totalHeight:s,topNoticeHeight:f,topNoticeWidth:p}}),i]}var $e=8,et=3,tt=e=>{let t=p({offset:$e,threshold:et});return c(()=>{let n=a(e);if(n&&typeof n==`object`){var r,i;t.offset=(r=n.offset)==null?$e:r,t.threshold=(i=n.threshold)==null?et:i}}),[f(()=>!!a(e)),s(t)]},nt=h((t,{slots:n,expose:r})=>{let i=v(null),a=t.height;return r({nativeElement:i}),()=>{var r;let{listPrefixCls:o,height:s,topNoticeHeight:c=0,topNoticeWidth:l=0,className:u,style:d}=t,f=s<a?`decrease`:`increase`;a=s;let p=`${o}-content`,m=C(C({},d),{},{height:`${s}px`,"--top-notificiation-height":`${c}px`,"--top-notificiation-width":`${l}px`});return e(`div`,{ref:i,class:z(p,`${p}-${f}`,u),style:m},[(r=n.default)==null?void 0:r.call(n)])}},{name:`NotificationListContent`,inheritAttrs:!1,props:[`listPrefixCls`,`height`,`topNoticeHeight`,`topNoticeWidth`,`className`,`style`]});function rt(e){var n;let r=t(e);return(n=r==null?void 0:r.$el)==null?r:n}var it=[`key`,`placement`,`classNames`,`styles`,`className`,`style`,`onClose`];function at(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!l(e)}function ot(e,t){return C({name:e,appear:!0,enterFromClass:`${e} ${e}-enter ${e}-appear ${e}-enter-start ${e}
1-appear-start`,enterActiveClass:`${e} ${e}-enter ${e}-appear`,enterToClass:`${e} ${e}-enter ${e}-appear ${e}-enter-active ${e}-appear-active`,leaveFromClass:`${e} ${e}-leave ${e}-leave-start`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e} ${e}-leave ${e}-leave-active`,moveClass:`${e} ${e}-move`},t)}var st=[`wrapper`,`root`,`icon`,`section`,`title`,`description`,`actions`,`close`,`progress`];function ct(e){return st.reduce((t,n)=>(t[n]=z(...e.map(e=>e==null?void 0:e[n])),t),{})}function lt(e){return st.reduce((t,n)=>(t[n]=Object.assign({},...e.map(e=>e==null?void 0:e[n])),t),{})}function ut(e,t){let n=String(t),r=e.findIndex(e=>String(e.key)===n);if(r!==-1)return e.length-r-1}var dt=h((t,{attrs:r})=>{let i=Xe(),a=f(()=>{var e;return(e=t.configList)==null?[]:e}),o=f(()=>a.value.map(e=>C(C({},e),{},{key:String(e.key)}))),[s,l]=tt(y(t,`stack`)),u=b(!1),p=f(()=>{var e,t;return s.value&&(u.value||o.value.length<=((e=(t=l.threshold)==null?void 0:t.value)==null?0:e))}),m=f(()=>{var e,t;if(s.value&&!p.value)return{offset:(e=l.offset)==null?void 0:e.value,threshold:(t=l.threshold)==null?void 0:t.value}}),h=v(0),g=v(null),[_,x]=Qe(o,m,h),T=f(()=>!!a.value.length);c(()=>{var e;if(!T.value)return;let t=rt((e=g.value)==null?void 0:e.nativeElement);if(!t)return;let{gap:n,rowGap:r}=window.getComputedStyle(t),i=Number.parseFloat(r||n)||0;h.value!==i&&(h.value=i)},{flush:`post`});let E=()=>{var e;a.value.length===0&&((e=t.onAllRemoved)==null||e.call(t,t.placement))},D=f(()=>typeof t.motion==`function`?t.placement?t.motion(t.placement):void 0:t.motion);return n(o,(e,t)=>{if(!t)return;let n=new Set(e.map(e=>String(e.key)));t.forEach(e=>{let t=String(e.key);n.has(t)||x(t,null)})}),()=>{var n,a,c;let f,{prefixCls:m=`vc-notification`,pauseOnHover:h,classNames:v,styles:y,components:b,placement:T,className:O,style:k,onNoticeClose:A}=t,j=`${m}-list`,M=_.value,N={};(n=D.value)!=null&&n.name&&(N=ot(D.value.name,D.value));let P=()=>o.value.map(t=>{var n,r,a,c;let{key:f,placement:p,classNames:g,styles:_,className:S,style:T,onClose:E}=t,D=w(t,it),O=String(f),k=ut(o.value,f),j=s.value&&k!==void 0&&k<((n=(r=l.threshold)==null?void 0:r.value)==null?0:n);return e(qe,d({key:O},D,{ref:re(e=>{x(O,e==null?null:e)},e=>{var t;return(t=rt(e==null?void 0:e.nativeElement))==null?null:t}),prefixCls:m,class:z((a=i.value)==null||(a=a.classNames)==null?void 0:a.notice,S),style:T,classNames:ct([v,g]),styles:lt([y,_]),components:C(C({},b),t.components),hovering:s.value&&u.value,pauseOnHover:(c=t.pauseOnHover)==null?h:c,offset:M.notificationPosition.get(O),notificationIndex:k,stackInThreshold:j,onClose:()=>{E==null||E(),A==null||A(f)}}),null)});return e(`div`,{class:z(m,j,`${m}-${T}`,(a=i.value)==null||(a=a.classNames)==null?void 0:a.list,O,v==null?void 0:v.list,r.class,{[`${m}-stack`]:s.value,[`${m}-stack-expanded`]:p.value,[`${j}-hovered`]:u.value}),onMouseenter:()=>{u.value=!0},onMouseleave:()=>{u.value=!1},style:C(C(C({}
1,y==null?void 0:y.list),k),(c=r.style)==null?{}:c)},[e(nt,{ref:g,listPrefixCls:j,height:M.totalHeight,topNoticeHeight:M.topNoticeHeight,topNoticeWidth:M.topNoticeWidth,className:v==null?void 0:v.listContent,style:y==null?void 0:y.listContent},{default:()=>[e(S,d({appear:!0},N,{onAfterLeave:E}),at(f=P())?f:{default:()=>[f]})]})])}},{props:{configList:{type:Array,required:!1,default:void 0},prefixCls:{type:String,required:!1,default:void 0},placement:{type:String,required:!0},pauseOnHover:{type:Boolean,required:!1,default:void 0},classNames:{type:Object,required:!1,default:void 0},styles:{type:Object,required:!1,default:void 0},components:{type:Object,required:!1,default:void 0},stack:{type:[Boolean,Object],required:!1,default:void 0},motion:{type:[Object,Function],required:!1,default:void 0},className:{type:String,required:!1,default:void 0},style:{type:Object,required:!1,default:void 0},onNoticeClose:{type:Function,required:!1,default:void 0},onAllRemoved:{type:Function,required:!1,default:void 0}},name:`NotificationList`,inheritAttrs:!1});function ft(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!l(e)}var pt={prefixCls:`vc-notification`},mt=h((t,{expose:r})=>{let i=b([]),a=e=>{i.value=i.value.filter(t=>t.key!==e)};r({open:e=>{var n;let r=i.value,a=[...r],o=a.findIndex(t=>t.key===e.key),s=C({},e);if(o>=0){var c,l;s.times=((c=(l=r[o])==null?void 0:l.times)==null?0:c)+1,a[o]=s}else s.times=0,a.push(s);let u=(n=t.maxCount)==null?0:n;u>0&&a.length>u&&(a=a.slice(-u)),i.value=a},close:a,destroy:()=>{i.value=[]}});let o=b({});n(i,()=>{let e={};i.value.forEach(t=>{var n;let r=(n=t.placement)==null?`topRight`:n;e[r]=e[r]||[],e[r].push(t)}),Object.keys(o.value).forEach(t=>{e[t]=e[t]||[]}),o.value=e});let s=e=>{let t=C({},o.value);(t[e]||[]).length||delete t[e],o.value=t},c=b(!1);return n(o,()=>{if(Object.keys(o.value).length>0)c.value=!0;else if(c.value){var e;t==null||(e=t.onAllRemoved)==null||e.call(t),c.value=!1}}),()=>{var n;let r,{container:i}=t,c=(n=t.prefixCls)==null?pt.prefixCls:n;return i?e(_,{to:i},ft(r=Object.keys(o.value).map(n=>{var r,i;let l=n,u=o.value[l],d=e(dt,{key:l,configList:u,placement:l,prefixCls:c,pauseOnHover:t.pauseOnHover,classNames:t.classNames,styles:t.styles,components:t.components,className:(r=t.className)==null?void 0:r.call(t,l),style:(i=t.style)==null?void 0:i.call(t,l),motion:t.motion,stack:t.stack,onAllRemoved:s,onNoticeClose:a},null);return t.renderNotifications?t.renderNotifications(d,{prefixCls:c,key:l}):d}))?r:{default:()=>[r]}):null}},{props:o({prefixCls:{type:String,required:!1,default:void 0},motion:{type:[Object,Function],required:!1,default:void 0},container:{required:!1,default:void 0},maxCount:{type:Number,required:!1,default:void 0},pauseOnHover:{type:Boolean,required:!1,default:void 0},classNames:{type:Object,required:!1,default:void 0},styles:{type:Object,required:!1,default:void 0},components:{type:Object,required:!1,default:void 0},className:{type:Function,required:!1,default:void 0},style:{type:Function,required:!1,default:void 0},onAllRemoved:{required:!1,default:void 0},stack:{type:[Boolean,Object],required:!1,default:void 0},renderNotifications:{type:Function,required:!1,default:void 0}},pt),name:`Notifications`}),ht=[`getContainer`,`motion`,`prefixCls`,`maxCount`,`className`,`style`,`onAllRemoved`,`stack`,`renderNotifications`,`pauseOnHover`,`classNames`,`styles`,`components`],gt=()=>document.body,_t=0;function vt(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{let r=e[n];r!==void 0&&(t[n]=r)})}),t}function yt(t={}){let r=f(()=>a(t)||{}),i=b(),o=b(),s=f(()=>{let e=r.value,{getContainer:t,motion:n,prefixCls:i,maxCount:a,className:o,style:s,onAllRemoved:c,stack:l,renderNotifications:u,pauseOnHover:d,classNames:f,styles:p,components:m}=e;return w(e,ht)}),c=()=>(r.value.getContainer||gt)(),l=()=>e(mt,{container:i.value,ref:o,prefixCls:r.value.prefixCls,motion:r.value.motion,maxCount:r.value.maxCount,pauseOnHover:r.value.pauseOnHover,classNames:r.value.classNames,styles:r.value.styles,components:r.value.components,className:r.value.className,style:r.value.style,onAllRemoved:r.value.onAllRemoved,stack:r.value.stack,renderNotifications:r.value.renderNotifications},null),d=b([]);return u(()=>{i.value=c()}),n(()=>r.value.getContainer,()=>{i.value=c()}),n(d,()=>
1{o.value&&d.value.length&&(d.value.forEach(e=>{switch(e.type){case`open`:var t;(t=o.value)==null||t.open(e.config);break;case`close`:var n;(n=o.value)==null||n.close(e.key);break;case`destroy`:var r;(r=o.value)==null||r.destroy()}}),d.value=[])}),[{open(e){let t=vt(s.value,e);(t.key===null||t.key===void 0)&&(t.key=`vc-notification-${_t}`,_t+=1),d.value=[...d.value,{type:`open`,config:t}]},close(e){d.value=[...d.value,{type:`close`,key:e}]},destroy(){d.value=[...d.value,{type:`destroy`}]}},l]}var bt={info:se,success:ie,error:ae,warning:oe,loading:ce};function xt(t,n,r){if(n!=null)return n;let i=r?bt[r]:null;return i?e(i,null,null):null}var St=[`prefixCls`,`type`,`icon`,`content`,`classes`,`styles`,`class`],Ct=h((t,{attrs:n})=>{let{classes:r,styles:i}=T(t,`classes`,`styles`),{getPrefixCls:a,class:o,style:s,classes:c,styles:l}=U(`message`,t),u=f(()=>{var e;return(e=t.prefixCls)==null?a(`message`):e}),p=f(()=>t),m=G(u),[h,g]=J(u,m),[_,v]=D(B(c,r),B(l,i),I(p));return()=>{var r,i,a,c,l,f,p;let y=ee(t,St),b=`${u.value}-notice`,x=xt(u.value,t.icon,t.type),S=t.type?`${b}-icon-${t.type}`:void 0;return e(qe,d(O(n),y,{prefixCls:u.value,duration:null,classNames:{wrapper:z(t.type&&`${u.value}-${t.type}`,(r=_.value)==null?void 0:r.wrapper),icon:z(S,(i=_.value)==null?void 0:i.icon),title:(a=_.value)==null?void 0:a.title},styles:{wrapper:(c=v.value)==null?void 0:c.wrapper,icon:(l=v.value)==null?void 0:l.icon,title:(f=v.value)==null?void 0:f.title},class:z(o.value,(p=_.value)==null?void 0:p.root,t.class,h.value,g.value,m.value,`${u.value}-notice-pure-panel`,t.type&&`${b}-${t.type}`),style:C(C(C({},v.value.root),s.value),n.style),icon:x,title:t.content}),null)}},{props:{content:{type:[Function,String,Number,null,Object,Boolean],required:!1,default:void 0},duration:{type:[Number,Boolean,null],required:!1,default:void 0},showProgress:{type:Boolean,required:!1,default:void 0},pauseOnHover:{type:Boolean,required:!1,default:void 0},closable:{type:[Boolean,Object],required:!1,default:void 0},closeIcon:{type:[Function,String,Number,null,Object,Boolean],required:!1,default:void 0},props:{type:Object,required:!1},onClose:{required:!1},onClick:{type:Function,required:!1},prefixCls:{type:String,required:!1},class:{type:String,required:!1},classes:{type:[Object,Function],required:!1},styles:{type:[Object,Function],required:!1},type:{type:String,required:!1},icon:{type:[Function,String,Number,null,Object,Boolean],required:!1,default:void 0}},name:`MessagePurePanel`,inheritAttrs:!1});function wt(e,t){let n={};return e!=null&&(n[`--notification-top`]=typeof e==`number`?`${e}px`:e),t!=null&&(n[`--notification-bottom`]=typeof t==`number`?`${t}px`:t),n}function Tt(e,t,n){return wt(t,n)}function Et(e){return{name:`${e}-fade`}}function Dt(e,t,n){return e===void 0?(t==null?void 0:t.closeIcon)===void 0?n==null?void 0:n.closeIcon:t.closeIcon:e}function Ot(e,t){return{name:t==null?`${e}-fade`:t}}function kt(e){let t,n=new Promise(n=>{t=e(()=>{n(!0)})}),r=()=>{t==null||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var At=[`content`,`icon`,`type`,`key`,`class`,`style`,`onClose`,`classes`,`styles`];function jt(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!l(e)}var Mt=8,Nt=3,Pt=h((e,{slots:t})=>{let n=f(()=>e.prefixCls),r=G(n),[i,a]=J(n,r);return Ye(f(()=>({classNames:{list:z(i.value,a.value,r.value)}}))),()=>{var e;return(e=t.default)==null?void 0:e.call(t)}},{props:{prefixCls:{type:String,required:!0}}}),Ft=(t,{prefixCls:n,key:r})=>e(Pt,{prefixCls:n,key:r},jt(t)?t:{default:()=>[t]}),It=h((e,{expose:t})=>{let{getPrefixCls:n,direction:r,getPopupContainer:i}=j(`message`),{class:a,style:o,classes:s,styles:c}=U(`message`,e),{classes:l,styles:u}=T(e,`classes`,`styles`),d=f(()=>{var t;return(t=e.prefixCls)==null?n(`message`):t}),p=f(()=>typeof e.top==`number`?`${e.top}px`:typeof e.top==`string`?e.top:`${Mt}px`),m=f(()=>{var t;return(t=e.duration)==null?Nt:t}),h=f(()=>e.pauseOnHover===void 0||e.pauseOnHover),[g,_]=yt({prefixCls:d.value,style:()=>wt(p.value),className:()=>{var t;return z({[`${d.value}-rtl`]:(t=e.rtl)==null?r.value===`rtl`:t})},motion:()=>Ot(d.value,e.transitionName),closable:!1,duration:m.value,getContainer:()=>{var t;return((t=e.getContainer)==null?void 0:t.call(e))||(i==null?void 0:i())||document.body},maxCount:e.maxCount,onAllRemoved:e.onAllRemoved,renderNotifications:Ft,pauseOnHover:h.value}),v=f(()=>e),y=M(o),[b,x]=D(B(s,l),B(c,y,u),I(v));return t(C(C({},g),{},{prefixCls:d,contextClassName:a,contextStyle:o,contextClasses:s,contextStyles:c,classNames:b,styles:x}
1)),()=>_==null?void 0:_()},{props:{top:{type:[String,Number],required:!1},duration:{type:Number,required:!1},prefixCls:{type:String,required:!1},getContainer:{type:Function,required:!1},transitionName:{type:String,required:!1},maxCount:{type:Number,required:!1},rtl:{type:Boolean,required:!1,default:void 0},pauseOnHover:{type:Boolean,required:!1,default:void 0},classes:{type:[Object,Function],required:!1},styles:{type:[Object,Function],required:!1},appContext:{type:Object,required:!1},onAllRemoved:{required:!1}},name:`MessageHolder`,inheritAttrs:!1}),Lt=0;function Rt(t){let n=b(),r=te(`Message`);return[(()=>{let e=e=>{var t;(t=n.value)==null||t.close(e)},i=i=>{if(!n.value){r(!1,`usage`,`You are calling notice in render which will break in concurrent mode. Please trigger in effect instead.`);let e=()=>{};return e.then=()=>{},e}let{open:a,prefixCls:o,contextClassName:s,contextClasses:c,contextStyles:l,classNames:u,styles:d}=n.value,f=`${o}-notice`,{content:p,icon:m,type:h,key:g,class:_,style:v,onClose:y,classes:b={},styles:x={}}=i,S=w(i,At),T=g;T==null&&(Lt+=1,T=`antd-message-${Lt}`);let D=C(C({},t),i),O=A(c,{props:D}),j=A(b,{props:D}),M=A(l,{props:D}),N=A(x,{props:D}),P=E(void 0,O,j,u),F=k(M,N,d),I=xt(o,m,h),L=h?`${f}-icon-${h}`:void 0;return kt(t=>(a(C(C({},S),{},{key:T,placement:`top`,icon:I,title:p,classNames:{wrapper:z(h&&`${o}-${h}`,P.wrapper),icon:z(L,P.icon),title:P.title},styles:{wrapper:F.wrapper,icon:F.icon,title:F.title},class:z({[`${f}-${h}`]:!!h},_,s,P.root),style:C(C({},F.root),v),onClose:()=>{y==null||y(),t()}})),()=>{e(T)}))},a={open:i,destroy:t=>{var r;t===void 0?(r=n.value)==null||r.destroy():e(t)}};return[`info`,`success`,`warning`,`error`,`loading`].forEach(e=>{a[e]=(t,n,r)=>{let a;a=t&&typeof t==`object`&&`content`in t?t:{content:t};let o,s;return typeof n==`function`?s=n:(o=n,s=r),i(C(C({onClose:s,duration:o},a),{},{type:e}))}}),a})(),()=>e(It,d({key:`message-holder`},a(t),{ref:n}),null)]}function zt(e){return Rt(e)}var Bt=Symbol(`AppConfigContext`),Vt=h((e,{slots:t})=>(m(Bt,e),()=>{var e;return t==null||(e=t.default)==null?void 0:e.call(t)}),{props:[`message`,`notification`],inheritAttrs:!1});function Ht(){return r(Bt,{})}var Ut=Symbol(`AppContext`);function Wt(){return r(Ut,{message:{},notification:{},modal:{}})}function Gt(e){m(Ut,e)}var Kt=h(t=>{let{getPrefixCls:n}=U(`message`,t),r=f(()=>n(`message`)),i=G(r),[a,o]=J(r,i);return()=>{var n;let s=`${r.value}-notice`,c=(n=t.classes)==null?{}:n,l=t.items.map(e=>{let{content:t,duration:n,key:i,type:a}=e,o=a?`${s}-icon-${a}`:void 0;return{key:i,duration:n,icon:xt(r.value,void 0,a),title:t,class:`${s}-${a}`,classNames:{wrapper:`${r.value}-${a}`,icon:o}}});return e(dt,{prefixCls:r.value,placement:`top`,configList:l,class:z(a.value,o.value,i.value),
1classNames:{list:c.list,listContent:c.listContent,wrapper:c.wrapper,title:c.title,icon:c.icon,root:c.root},style:t.style,stack:!1},null)}},{props:{prefixCls:{type:String,required:!1},items:{type:Array,required:!0},classes:{type:[Object,Function],required:!1},style:{type:Object,required:!1}},name:`MessagePureList`,inheritAttrs:!1});function qt(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!l(e)}var Y=null,X=[],Z={},Q=e=>e();function Jt(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:a,pauseOnHover:o}=Z,s=(e==null?void 0:e())||document.body,c=Z.appContext,l=i();return l&&!c?c=l.appContext:c||(c=W().appContext),{getContainer:()=>s,duration:t,rtl:n,maxCount:r,top:a,pauseOnHover:o,appContext:c}}var Yt=h((e,{expose:t})=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=j(),a=Z.prefixCls||i(`message`),o=Ht(),[s,c]=Rt(C(C({},n),{},{prefixCls:a},o.message||{}));u(()=>{r==null||r()});let l=C({},s);return Object.keys(l).forEach(e=>{l[e]=(...t)=>(r(),s[e](...t))}),t({instance:l,sync:r}),()=>typeof c==`function`?c==null?void 0:c():c},{props:{messageConfig:{required:!0},sync:{type:Function,required:!0}}}),Xt=h(t=>{let r=b(Jt()),i=b(),a=()=>{r.value=Jt()};u(a);let o=!1;n(()=>i.value,e=>{if(e&&!o){var n;o=!0,(n=t.onReady)==null||n.call(t,{instance:e.instance,sync:a})}},{immediate:!0});let s=W();return()=>{let t=e(Yt,{ref:i,sync:a,messageConfig:r.value},null),n=e(ne,{prefixCls:s.getRootPrefixCls(),iconPrefixCls:s.getIconPrefixCls(),theme:s.theme.value},qt(t)?t:{default:()=>[t]});return s.holderRender?s.holderRender(n):n}},{props:{onReady:{type:Function,required:!1}}});function $(){if(!Y){let t=document.createDocumentFragment(),n={fragment:t};Y=n,Q(()=>{let r=e(Xt,{onReady:e=>{Promise.resolve().then(()=>{!n.instance&&e!=null&&e.instance&&(n.instance=e.instance,n.sync=e.sync,$())})}}),i=Jt();i.appContext&&(r.appContext=i.appContext),x(r,t)});return}Y.instance&&(X.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case`open`:Q(()=>{let t=Y.instance.open(C(C({},Z),e.config));t==null||t.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:Q(()=>{Y==null||Y.instance.destroy(e.key)});break;default:Q(()=>{let n=Y.instance[t](...e.args);n==null||n.then(e.resolve),e.setCloseFn(n)})}}),X=[])}function Zt(e){Z=C(C({},Z),e),Q(()=>{var e;Y==null||(e=Y.sync)==null||e.call(Y)})}function Qt(e){let t=kt(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return X.push(r),()=>{n?Q(()=>{n==null||n()}):r.skipped=!0}});return $(),t}function $t(e,t){let n=kt(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return X.push(i),()=>{r?Q(()=>{r==null||r()}):i.skipped=!0}});return $(),n}function en(e){X.push({type:`destroy`,key:e}),$()}var tn=[`success`,`info`,`warning`,`error`,`loading`],nn={open:Qt,destroy:en,config:Zt,useMessage:zt,_InternalPanelDoNotUseOrYouWillBeFired:Ct,_InternalListDoNotUseOrYouWillBeFired:Kt};tn.forEach(e=>{nn[e]=(...t)=>$t(e,t)});export{Gt as a,Et as c,dt as d,Ye as f,Le as h,Wt as i,Tt as l,Fe as m,Vt as n,zt as o,qe as p,Ht as r,Dt as s,nn as t,yt as u};

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.