1import{r as e,j as n}from"./vendor-react-DejgYtBM.js";import{M as a,B as t,T as i,a as s,S as o,E as r,I as l,b as m,c as d}from"./vendor-semi-D8d7bTtM.js";import{u as c,S as p,g,A as x,s as b}from"./index-BeIIFw6E.js";import{p as h}from"./i18nField-BKdpiJH6.js";import{r as u}from"./noticeI18n-CXa-dBKj.js";import{m as y}from"./marked.esm-B28mcIGu.js";import{B as k,M as f}from"./vendor-icons-EJvJ5X-w.js";import{m as j}from"./vendor-motion-Chfy_MiU.js";import"./i18nFieldCore-CS3IirKt.js";const v=({visible:v,onClose:w,isMobile:N,defaultTab:C="inApp",unreadKeys:z=[]})=>{const{t:M,i18n:S}=c(),[I,E]=e.useState(""),[_,T]=e.useState(!1),[A,D]=e.useState(C),[K]=e.useContext(p),L=K?.status?.announcements||[],B=e.useMemo(()=>new Set(z),[z]),H=e=>`${e?.publishDate||""}-${(e?.content||"").slice(0,30)}`,U=e.useMemo(()=>(L||[]).slice(0,20).map(e=>{const n=h(e,["content","extra"]);return{key:H(e),type:e.type||"default",time:g(e.publishDate),content:n.content??e.content,extra:n.extra??e.extra,isUnread:B.has(H(e))}}),[L,B,S.language]);return e.useEffect(()=>(window.dispatchEvent(new CustomEvent("systemNoticeChange",{detail:{visible:v}})),()=>{window.dispatchEvent(new CustomEvent("systemNoticeChange",{detail:{visible:!1}}))}),[v]),e.useEffect(()=>{v&&(async()=>{T(!0);try{const[e,n]=await Promise.all([x.get("/api/notice"),x.get("/api/notice/i18n").catch(()=>null)]),{success:a,message:t,data:i}=e.data;if(!a)return void b(t);const s=S.language?.split("-")[0]||"zh",o=n?.data?.success?n.data.data:"";if(o){const e=u(o,s);E(e)}else E(i?y.parse(i):"")}catch(e){b(e.message)}finally{T(!1)}})()},[v,S.language]),e.useEffect(()=>{v&&D(C)},[C,v]),n.jsxs(a,{title:n.jsxs("div",{className:"flex items-center justify-between w-full",children:[n.jsx("span",{children:M("ç³»ç»å
¬å")}),n.jsxs(i,{activeKey:A,onChange:D,type:"card",size:"small",children:[n.jsx(s,{tab:n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx(k,{size:14})," ",M("éç¥")]}),itemKey:"inApp"}),n.jsx(s,{tab:n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx(f,{size:14})," ",M("ç³»ç»å
¬å")]}),itemKey:"system"})]})]}),visible:v,onCancel:w,footer:n.jsxs("div",{className:"flex justify-end",children:[n.jsx(t,{type:"secondary",onClick:()=>{const e=(new Date).toDateString();localStorage.setItem("notice_close_date",e),w()},children:M("仿¥å
³é")}),n.jsx(t,{type:"primary",onClick:w,children:M("å
³éå
¬å")})]}),size:N?"full-width":"large",className:"notice-modal-glass",maskClassName:"notice-modal-mask",children:[n.jsx("style",{children:'\n /* ========== NoticeModal Liquid Glass · å¼¹çªå¤å£³ ========== */\n .notice-modal-glass.semi-modal,\n .notice-modal-glass .semi-modal-content {\n background:\n linear-gradient(180deg, rgba(248, 251, 255, 0.92) 0%, rgba(235, 242, 252, 0.85) 100%) !important;\n backdrop-filter: saturate(180%) blur(40px) !important;\n -webkit-backdrop-filter: saturate(180%) blur(40px) !important;\n border: 1px solid rgba(255, 255, 255, 0.50) !important;\n border-top: 1px solid rgba(255, 255, 255, 0.78) !important;\n border-radius: 22px !important;\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.78),\n inset 0 -1px 0 rgba(15, 23, 42, 0.04),\n 0 1px 2px rgba(15, 23, 42, 0.04),\n 0 16px 36px -8px rgba(15, 23, 42, 0.18),\n 0 36px 72px -16px rgba(15, 23, 42, 0.24) !important;\n overflow: hidden !important;\n position: relative;\n /* å¼¹ç°§å¼¹åº */\n animation: notice-modal-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;\n }\n\n /* é¡¶é¨åå
æ¡ */\n .notice-modal-glass.semi-modal::before,\n .notice-modal-glass .semi-modal-content::before {\n content: \'\';\n position: absolute;\n top: 0;\n left: 12%;\n right: 12%;\n height: 1px;\n pointer-events: none;\n background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.85), transparent);\n z-index: 2;\n }\n\n /* æè²å
æ */\n .notice-modal-glass.semi-modal::after,\n .notice-modal-glass .semi-modal-content::after {\n content: \'\';\n position: absolute;\n inset: 0;\n z-index: 0;\n pointer-events: none;\n border-radius: inherit;\n background:\n radial-gradient(ellipse 70% 50% at 0% 0%, rgba(96, 165, 250, 0.10) 0%, transparent 70%),\n radial-gradient(ellipse 70% 50% at 100% 100%, rgba(167, 139, 250, 0.10) 0%, transparent 70%);\n }\n\n .notice-modal-glass .semi-modal-header,\n .notice-modal-glass .semi-modal-body,\n .notice-modal-glass .semi-modal-footer {\n background: transparent !important;\n position: relative;\n z-index: 1;\n }\n\n /* é®ç½©å±å æ·± + æ¨¡ç³ */\n .notice-modal-mask {\n backdrop-filter: blur(8px) saturate(140%) !important;\n -webkit-backdrop-filter: blur(8px) saturate(140%) !important;\n background: rgba(15, 23, 42, 0.32) !important;\n animation: notice-modal-mask-fade 0.4s ease-out both;\n }
1\n\n @keyframes notice-modal-pop {\n 0% { opacity: 0; transform: scale(0.86) translateY(28px); filter: blur(8px); }\n 55% { opacity: 1; filter: blur(0); }\n 75% { transform: scale(1.018) translateY(-3px); }\n 100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }\n }\n\n @keyframes notice-modal-mask-fade {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n /* 骨æ¶å ä½è¡çå¼å¸é«å
*/\n .notice-modal-skeleton .semi-skeleton-title,\n .notice-modal-skeleton .semi-skeleton-paragraph > li {\n background: linear-gradient(\n 90deg,\n rgba(226, 232, 240, 0.55) 0%,\n rgba(248, 250, 252, 0.95) 50%,\n rgba(226, 232, 240, 0.55) 100%\n ) !important;\n background-size: 200% 100% !important;\n animation: notice-skeleton-shimmer 1.4s ease-in-out infinite;\n border-radius: 6px !important;\n }\n @keyframes notice-skeleton-shimmer {\n 0% { background-position: 100% 0; }\n 100% { background-position: -100% 0; }\n }\n\n /* æè²éé
*/\n body[theme-mode="dark"] .notice-modal-glass.semi-modal,\n body[theme-mode="dark"] .notice-modal-glass .semi-modal-content,\n [theme-mode="dark"] .notice-modal-glass.semi-modal,\n [theme-mode="dark"] .notice-modal-glass .semi-modal-content {\n background:\n linear-gradient(180deg, rgba(20, 24, 38, 0.86) 0%, rgba(11, 15, 26, 0.78) 100%) !important;\n border: 1px solid rgba(255, 255, 255, 0.10) !important;\n border-top: 1px solid rgba(255, 255, 255, 0.18) !important;\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.10),\n 0 16px 36px -8px rgba(0, 0, 0, 0.55),\n 0 36px 72px -16px rgba(0, 0, 0, 0.65) !important;\n }\n body[theme-mode="dark"] .notice-modal-skeleton .semi-skeleton-title,\n body[theme-mode="dark"] .notice-modal-skeleton .semi-skeleton-paragraph > li,\n [theme-mode="dark"] .notice-modal-skeleton .semi-skeleton-title,\n [theme-mode="dark"] .notice-modal-skeleton .semi-skeleton-paragraph > li {\n background: linear-gradient(\n 90deg,\n rgba(30, 41, 59,
10.55) 0%,\n rgba(51, 65, 85, 0.95) 50%,\n rgba(30, 41, 59, 0.55) 100%\n ) !important;\n background-size: 200% 100% !important;\n }\n\n /* åå¼±å¨ç»å好 */\n @media (prefers-reduced-motion: reduce) {\n .notice-modal-glass.semi-modal,\n .notice-modal-glass .semi-modal-content {\n animation: none !important;\n }\n .notice-modal-skeleton .semi-skeleton-title,\n .notice-modal-skeleton .semi-skeleton-paragraph > li {\n animation: none !important;\n }\n }\n '}),"inApp"===A?_?n.jsx("div",{className:"notice-modal-skeleton py-4 px-1 space-y-4",children:[0,1,2,3].map(e=>n.jsxs(j.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.08*e,duration:.35,ease:[.2,.8,.2,1]},className:"notice-skeleton-row",children:[n.jsx(o.Title,{style:{width:e%2==0?"36%":"52%",marginBottom:10}}),n.jsx(o.Paragraph,{rows:2,style:{width:"100%"}})]},e))}):I?n.jsx(j.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.2,.8,.2,1]},dangerouslySetInnerHTML:{__html:I},className:"notice-content-scroll max-h-[55vh] overflow-y-auto pr-2"}):n.jsx(j.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},transition:{duration:.4,ease:[.2,.8,.2,1]},className:"py-12",children:n.jsx(r,{image:n.jsx(m,{style:{width:150,height:150}}),darkModeImage:n.jsx(l,{style:{width:150,height:150}}),description:M("ææ å
¬å")})}):0===U.length?n.jsx(j.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},transition:{duration:.4,ease:[.2,.8,.2,1]},className:"py-12",children:n.jsx(r,{image:n.jsx(m,{style:{width:150,height:150}}),darkModeImage:n.jsx(l,{style:{width:150,height:150}}),description:M("ææ ç³»ç»å
Œ")})}):n.jsx(j.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.2,.8,.2,1]},className:"max-h-[55vh] overflow-y-auto pr-2 card-content-scroll",children:n.jsx(d,{mode:"alternate",children:U.map((e,a)=>{const t=y.parse(e.content||""),i=e.extra?y.parse(e.extra):"";return n.jsx(d.Item,{type:e.type,time:e.time,className:(e.isUnread,""),children:n.jsxs(j.div,{initial:{opacity:0,x:a%2==0?-16:16},animate:{opacity:1,x:0},transition:{delay:.05+.06*a,type:"spring",stiffness:180,damping:22},children:[n.jsx("div",{className:e.isUnread?"shine-text":"",dangerouslySetInnerHTML:{__html:t}}),e.extra&&n.jsx("div",{className:"text-xs text-gray-500",dangerouslySetInnerHTML:{__html:i}})]})},a)})})})]})};export{v as default};
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.