PageSourceSearch

https://eipl9.com/assets/theme-0/toast.impl.BuTFyQPn.js

js eipl9.com collected 2026-10-10 00:29:11 UTC 5,473 bytes, 1 lines download raw bytes

1import{Y as x,al as O,W as F,ah as P,nY as B,S as L,aA as I,a4 as k,$ as V,lo as $,tT as A,uX as E,a2 as N,uY as U}from"./commonChunk.BIjOjUCX.js";import{C as W}from"./2_EventOthersChunk.B_9cm1s_.js";import{bk as Y}from"./0_EntryLoginRegisterChunk.DEYBGXQ-.js";import{a as z}from"./vendorChunk.B6ure_9S.js";import{b as _,w as C,o as H,e as q,f as m,h as M,r as T,a as Z,y as D,n as Q}from"../vendors/vendor-stable.BZTOV27i.js";import"./1_PromotionChunk.CM3PAnSm.js";import"./1_AgentCenterChunk.C1eo237I.js";import"./0_WithdrawChunk.BZmRfyng.js";import"./0_RechargeCommonChunk.CfvjGnyg.js";import"../vendors/vendor-swiper.ByVZYtOX.js";import"./1_MineChunk.D4xSacn5.js";import"./2_EventDialogsChunk.CEghybjG.js";import"./1_SearchGameChunk.DPI3iJMb.js";const R={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:x.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 X="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 G="ui-info-circle-18d58c",[J,d]=F("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 K={[f.Success]:W,[f.Info]:G,[f.Warn]:X,[f.Error]:Y};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=_({name:J,props:R,emits:["update:show"],setup(e,{emit:n}){let s;const c=P();let l=!1;const o=()=>{const t=e.show&&e.overlay;l!==t&&(l=t,ee(l))},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(V,{name:K[t]},null)]);if(t===f.Loading)return m("div",{class:[d("toast--icon"),d("toast--loading")]},[m($,{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))}),H(o),q(o),()=>{var t;return m(B,M({lockScroll:!1,class:[d("toast"),d("toast--container"),d(`toast--${(t=e.type)!=null?t:""}`),e.className],onClosed:y,"onUpdate:show":r},L(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:x.Zoom,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,zIndex:5e3,closeOnClickOverlay:!1};let u=[];function w(e){return U(e)?e:{message:e}}function se(){const{instance:e,unmount:n}=E({setup(){const s=T(""),c=Z({show:!1});let l=N;const o=a=>{c.show=a},r=a=>{Object.assign(c,a),o(!0)},y=()=>{o(!1),h(N)},h=a=>{l=a},S=()=>{l(),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}),D().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((l,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,[...l,y]},[]);let c=-n/2;e.forEach((l,o)=>{o>0&&(c=c+s[o-1]),l&&(l.style.transform=`translateY(${c+s[o]/2}px)`)})}function b(e){const n=A();if(n.value==="visible"){e();return}const s=C(n,c=>{c==="visible"&&(s(),e())})}function i(e={},n="flush"){n==="flush"&&ce(!0);const s=u[u.length-1],c=ae(),l=w(e),o=()=>{u.includes(c)&&(c.open(Object.assign({},oe,l)),Q(j))};return n==="overlay"||n==="flush"?b(o):n==="push"&&(s?s.setNext(()=>b(o)):b(o)),c}const p=e=>(n,s="flush")=>i(Object.assign({type:e},w(n)),s),v=e=>(n,s="flush")=>new Promise(c=>{const l=w(n),o=l.onClosed;let r;l.onClosed=()=>{o==null||o(),c(r)},r=i(Object.assign({type:e},l),s)});i.info=p("info");i.loading=p("loading");i.success=p("success");i.warn=p("warn");i.error=p("error");i.infoSync=v("info");i.loadingSync=v("loading");i.successSync=v("success");i.warnSync=v("warn");i.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,i 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.