PageSourceSearch

https://www.0876ww.com/assets/theme-0/toast.impl.DaOyXc1l.js

js 0876ww.com collected 2026-10-09 04:37:12 UTC 5,550 bytes, 1 lines download raw bytes

1import{l as N,u as O,c as B,aE as F,a9 as P,bB as I,ae as k,I as L,ko as V,sv as E,tw as U,ad as x,tx as _}from"./commonChunk.CbHrP2ip.js";import{C as $}from"./2_EventOthersChunk.DHtxoXi4.js";import{c5 as A,e1 as H}from"./0_EntryLoginRegisterChunk.DMUz1wnE.js";import{a as z}from"./vendorChunk.96TTY5fG.js";import{d as W,w as C,h as q,t as Q,e as m,m as M,r as Z,s as D,Q as R,n as T}from"../vendors/vendor-stable.CbjAnMzp.js";import"./1_PromotionChunk.DiibOkmm.js";import"./1_AgentCenterChunk.qBSEz8xL.js";import"./0_WithdrawChunk.B8tEuVYo.js";import"./0_RechargeCommonChunk.DDWWiKeW.js";import"../vendors/vendor-swiper.Bq2sw0Pq.js";import"./1_MineChunk.CPGTMigo.js";import"./1_PromoteChunk.PKn1eerk.js";import"./1_ClubRebateChunk.DdJFd5ov.js";import"./2_EventDialogsChunk.Chwoa1q4.js";import"./1_SearchGameChunk.DPxG-dhI.js";const Y={show:{type:Boolean,default:!1},icon:{type:[Object,Function],default:void 0},loadingColor:{type:String,required:!1},message:{type:[String,Object,Function],default:""},className:{type:O,default:null},type:{type:String,default:"info"},overlay:{type:Boolean,default:!1},overlayClass:{type:O,default:""},overlayStyle:{type:Object,default:null},duration:{type:Number,default:2e3},zIndex:{type:[Number,String]},closeOnClickOverlay:{type:Boolean,default:!1},transition:{type:String,default:N.Zoom},teleport:{type:[String,Element,Boolean],default:!1}};z('<symbol aria-hidden="true" viewBox="64 64 896 896" id="ui-exclamation-circle-a39166"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" /></symbol>',"ui-exclamation-circle-a39166");const G="ui-exclamation-circle-a39166";z('<symbol aria-hidden="true" viewBox="64 64 896 896" id="ui-info-circle-18d58c"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" /></symbol>',"ui-info-circle-18d58c");const J="ui-info-circle-18d58c",[K,d]=B("toast");var f=function(e){return e.Success="success",e.Info="info",e.Error="error",e.Warn="warn",e.Loading="loading",e}(f||{});let g=0;const X={[f.Success]:$,[f.Info]:J,[f.Warn]:G,[f.Error]:A};function ee(e){e?(g||document.body.classList.add("unclickable"),g++):g&&(g--,g||document.body.classList.remove("unclickable"))}const te=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],ne=W({name:K,props:Y,emits:["update:show"],setup(e,{emit:n}){let s;const c=F();let i=!1;const o=()=>{const t=e.show&&e.overlay;i!==t&&(i=t,ee(i))},r=t=>n("update:show",t),y=()=>clearTimeout(s),h=()=>{const{type:t,icon:a}=e;if(!I(a))return k(a)?a==null?void 0:a():a;if(t===f.Success||t===f.Info||t===f.Warn||t===f.Error)return m("div",{class:[d("toast--icon"),d(`toast--${t}`)]},[m(L,{name:X[t]},null)]);if(t===f.Loading)return m("div",{class:[d("toast--icon"),d("toast--loading")]},[m(V,{color:e.loadingColor},null)])},S=()=>{const{message:t}=e;if(t!==""&&!I(t)){const a=k(t)?t==null?void 0:t():t;return m("div",{class:[d("toast-message"),c.rtlClass]},[a])}};return C(()=>[e.show,e.overlay],o),C(()=>[e.show,e.type,e.message,e.duration],()=>{y(),e.show&&e.duration>0&&(s=setTimeout(()=>{r(!1)},e.duration))}),q(o),Q(o),()=>{var t;return m(H,M({lockScroll:!1,class:[d("toast"),d("toast--container"),d(`toast--${(t=e.type)!=null?t:""}`),e.className],onClosed:y,"onUpdate:show":r},P(e,te)),{default:()=>[m("div",{class:d("toast--instance")},[h(),S()])]})}}}),oe={icon:void 0,type:"info",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:!1,transition:N.Zoom,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,zIndex:5e3,closeOnClickOverlay:!1};let u=[];function w(e){return _(e)?e:{message:e}}function se(){const{instance:e,unmount:n}=U({setup(){const s=Z(""),c=D({show:!1});let i=x;const o=a=>{c.show=a},r=a=>{Object.assign(c,a),o(!0)},y=()=>{o(!1),h(x)},h=a=>{i=a},S=()=>{i(),u=u.filter(a=>a!==e),j(),n()},t=()=>m(ne,M(c,{onClosed:S,"onUpdate:show":o}),null);return C(s,a=>{c.message=a}),R().render=t,{open:r,close:y,message:s,setNext:h}}});return e}function ae(){const e=se();return u.push(e),e}function j(){const e=[];let n=0;const s=u.reduce((i,o)=>{var h;const r=(h=o.$el.parentNode)==null?void 0:h.querySelector(".ui-toast__toast--instance");e.push(r);const y=r?r.clientHeight+10:0;return n+=y,[...i,y]},[]);let c=-n/2;e.forEach((i,o)=>{o>0&&(c=c+s[o-1]),i&&(i.style.transform=`translateY(${c+s[o]/2}px)`)})}function b(e){const n=E();if(n.value==="visible"){e();return}const s=C(n,c=>{c==="visible"&&(s(),e())})}function l(e={},n="flush"){n==="flush"&&ce(!0);const s=u[u.length-1],c=ae(),i=w(e),o=()=>{u.includes(c)&&(c.open(Object.assign({},oe,i)),T(j))};return n==="overlay"||n==="flush"?b(o):n==="push"&&(s?s.setNext(()=>b(o)):b(o)),c}const p=e=>(n,s="flush")=>l(Object.assign({type:e},w(n)),s),v=e=>(n,s="flush")=>new Promise(c=>{const i=w(n),o=i.onClosed;let r;i.onClosed=()=>{o==null||o(),c(r)},r=l(Object.assign({type:e},i),s)});l.info=p("info");l.loading=p("loading");l.success=p("success");l.warn=p("warn");l.error=p("error");l.infoSync=v("info");l.loadingSync=v("loading");l.successSync=v("success");l.warnSync=v("warn");l.errorSync=v("error");const ce=e=>{var n;u.length&&(e?(u.forEach(s=>{s.close()}),u=[]):(n=u.shift())==null||n.close())};export{ce as closeToast,l as showToast};

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.