PageSourceSearch

https://www.frandroid.com/wp-content/mu-plugins/optimus/build/js/chunks/Alert-BcWMlyxg.js

js frandroid.com collected 2026-09-24 08:27:50 UTC 2,592 bytes, 1 lines download raw bytes

1import{r as e,j as r}from"./react-Bs4hDxVO.js";import{P as E,r as k}from"./hydrateServerComponents-CgeGZCoY.js";const A="alert___0SNeE",L="success___TAfie",T="error___Ll8BK",y="warning___mSmu-",P="info___clW1P",$="floating___oN912",C="inline___XqcCL",D="content___EROHF",S="icon___Q4onc",G="body___kZJHk",M="title___3Gpxz",z="description___Z21QL",F="action___bNKPp",H="closeButton___3tcGi",I="progressBar___d4SG1",K="shrink___hhmv4",s={alert:A,success:L,error:T,warning:y,info:P,floating:$,inline:C,content:D,icon:S,body:G,title:M,description:z,action:F,closeButton:H,progressBar:I,shrink:K},O={success:"check-circle",error:"x-circle",warning:"warning",info:"info"},J=({children:o,className:t})=>r.jsx("p",{className:`${s.title} ${t??""}`.trim(),children:o}),V=({children:o,className:t})=>r.jsx("div",{className:`${s.description} ${t??""}`,children:o}),Q=({children:o,className:t})=>r.jsx("div",{className:`${s.action} ${t??""}`,children:o}),W=({type:o="info",ephemeral:t=!1,closable:N=!0,duration:d=5e3,onClose:i,glass:b,children:w,className:B})=>{const[R,m]=e.useState(!1),v=e.useRef(null),a=e.useRef(null),u=e.useRef(d),x=e.useRef(Date.now()),c=e.useCallback(()=>{a.current!==null&&(clearTimeout(a.current),a.current=null)},[]),_=e.useCallback(()=>{!t||!i||(c(),x.current=Date.now(),a.current=setTimeout(()=>{i()},u.current))},[c,t,i]);e.useEffect(()=>{if(t)return _(),c},[t,_,c]),e.useEffect(()=>{const n=v.current;if(!(!t||!n))return n.contains(document.activeElement)&&l(),n.addEventListener("focusin",l),n.addEventListener("focusout",f),()=>{n.removeEventListener("focusin",l),n.removeEventListener("focusout",f)}},[t]);const l=()=>{if(!t)return;m(!0);const n=Date.now()-x.current;u.current=Math.max(u.current-n,0),c()},f=()=>{t&&(m(!1),_())},g=o==="error"||o==="warning",h=t?s.floating:s.inline,p=[];let j=null;return e.Children.forEach(w,n=>{e.isValidElement(n)&&n.type===Q?j=n:p.push(n)}),r.jsxs("div",{className:[s.alert,s[o],h,k(b),B].filter(Boolean).join(" "),role:g?"alert":"status","aria-live":g?"assertive":"polite",ref:v,onMouseEnter:l,onMouseLeave:f,children:[r.jsxs("div",{className:s.content,children:[r.jsx("span",{className:s.icon,children:r.jsx(E,{name:O[o],size:20,color:"inherit",weight:"fill"})}),r.jsx("div",{className:s.body,children:p}),j,N&&i&&r.jsx("button",{type:"button",className:s.closeButton,onClick:i,"aria-label":"Fermer la notification",children:r.jsx(E,{name:"x",size:16,color:"inherit"})})]}),t&&r.jsx("div",{className:s.progressBar,style:{animationDuration:`${d}ms`,animationPlayState:R?"paused":"running"}})]})};export{W as A,V as a,J as b,Q as c};

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.