PageSourceSearch

https://augmentin.skin/assets/syllabus-DxcZvfvi.js

js augmentin.skin collected 2026-10-05 06:06:35 UTC 13,558 bytes, 1 lines download raw bytes

1import{j as e,A as X,m as I}from"./kinematics-Di5PXsRQ.js";import{a,a6 as Z,y as se,aa as w,ae as ne,$ as ee,j as D,n as re}from"./glyphs-myXpDwvS.js";import{A as ae}from"./periodic-table-QDa7g7Xi.js";import{u as le}from"./bulletin-BVylogk2.js";import{O as de}from"./algebra-CcXhFBFE.js";import"./meteorology-7juZoOw8.js";import"./earth-science-52cTImor.js";function ce(o){const n=Date.now()-o,p=Math.floor(n/6e4);if(p<1)return"just now";if(p<60)return`${p}m ago`;const u=Math.floor(p/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function pe(o){return new Date(o).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function ue(o){const n=new Date(o);return{day:n.getDate().toString().padStart(2,"0"),mon:n.toLocaleDateString("en-US",{month:"short"}).toUpperCase(),year:n.getFullYear()}}const xe={fontFamily:"Montserrat, ui-sans-serif, system-ui, sans-serif",letterSpacing:"-0.02em"};function Se({onNavigate:o}){const n=le(),[p,u]=a.useState([]),[z,S]=a.useState(!0),[b,h]=a.useState(null),[g,k]=a.useState(new Set),[c,F]=a.useState({}),[x,N]=a.useState(null),[B,C]=a.useState([]),[L,A]=a.useState(!1),[j,T]=a.useState(""),[E,O]=a.useState(!1),[m,ie]=a.useState(!1),[f,H]=a.useState(""),[y,U]=a.useState(""),[$,_]=a.useState(!1),[v,R]=a.useState(!1);a.useEffect(()=>{fetch("/api/changelog",{credentials:"include"}).then(t=>t.json()).then(t=>{var s;const i=t.entries||[];u(i),(s=i[0])!=null&&s.id&&h(i[0].id),i.forEach(l=>{fetch(`/api/likes?type=changelog&targetId=${encodeURIComponent(l.id)}`,{credentials:"include"}).then(d=>d.json()).then(d=>{F(W=>({...W,[l.id]:d.count||0})),d.userLiked&&k(W=>{const V=new Set(W);return V.add(l.id),V})})})}).finally(()=>S(!1)),fetch("/api/me",{credentials:"include"}).then(t=>t.json()).then(t=>{t.user&&ie((t.user.is_admin??0)>=1||!!t.user.is_owner)})},[]);
1async function oe(){if(!(!f.trim()||!y.trim())){_(!0);try{const t=await fetch("/api/changelog",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({title:f,content:y})});if(t.ok){const s={id:(await t.json()).id,title:f,content:y,created_at:Date.now()};u(l=>[s,...l]),h(s.id),H(""),U(""),R(!1)}}finally{_(!1)}}}async function J(t){await fetch(`/api/changelog/${t}`,{method:"DELETE",credentials:"include"}),u(i=>i.filter(s=>s.id!==t)),b===t&&h(null)}async function P(t){const i=await fetch("/api/likes",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({type:"changelog",targetId:t})});if(!i.ok)return;const s=await i.json();k(l=>{const d=new Set(l);return s.liked?d.add(t):d.delete(t),d}),F(l=>({...l,[t]:typeof s.count=="number"?s.count:l[t]||0}))}async function K(t){if(x===t){N(null);return}N(t),A(!0),C([]),fetch(`/api/comments?type=changelog&targetId=${encodeURIComponent(t)}`,{credentials:"include"}).then(i=>i.json()).then(i=>C(i.comments||[])).finally(()=>A(!1))}async function Y(t){await fetch("/api/comment/delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({commentId:t})}),C(i=>i.filter(s=>s.id!==t))}async function q(){if(!(!j.trim()||!x)){O(!0);try{const t=await fetch("/api/comment",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({type:"changelog",targetId:x,content:j})});if(t.ok){const i=await t.json();C(s=>[...s,i.comment||{id:i.id,content:j,created_at:Date.now(),username:"You"}]),T("")}}finally{O(!1)}}}function M(t){!t||t==="User"||t==="Team"||o(`rosin://user/@${t}`)}function G(t){h(i=>i===t?null:t)}const r=p[0],Q=p.slice(1);return e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",style:{background:"#050505",color:n.text,...xe},children:[e.jsxs("header",{style:{flexShrink:0,padding:"18px 24px",borderBottom:`1px solid ${n.border}`,background:"linear-gradient(90deg, hsla(0,0%,6%,1) 0%, hsla(0,0%,2%,1) 55%, hsla(0,0%,8%,0.6) 100%)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14},children:[e.jsx("div",{style:{width:36,height:36,borderRadius:10,background:"hsla(0,0%,100%,0.06)",border:`1px solid ${n.border}`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Z,{size:16,style:{color:n.accent}})}),e.jsx("div",{children:e.jsx("h1",{className:"pz-cursive",style:{margin:0,fontSize:34,lineHeight:1,color:n.text},children:e.jsx(de,{as:"span",force:!0,cursive:!0,children:"Releases"})})})]}),m&&e.jsxs("button",{type:"button",onClick:()=>R(t=>!t),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",borderRadius:8,border:`1px solid ${v?n.borderFocus:n.border}`,background:v?n.accentDim:"transparent",color:v?n.accent:n.textSub,fontSize:11,fontWeight:700,cursor:"pointer",fontFamily:"inherit"},children:[e.jsx(se,{size:12}),"Ship update"]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto hub-scroll",style:{scrollbarWidth:"thin",scrollbarColor:`${n.scrollbar} transparent`},children:[e.jsx(X,{children:m&&v&&e.jsx(I.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},style:{overflow:"hidden",borderBottom:`1px solid ${n.border}`},children:e.jsxs("div",{style:{maxWidth:860,margin:"0 auto",padding:"20px 24px",display:"grid",gap:10},children:[e.jsx("input",{value:f,onChange:t=>H(t.target.value),placeholder:"Release title",style:{width:"100%",padding:"12px 14px",borderRadius:8,border:`1px solid ${n.border}`,background:n.inputBg,color:n.text,fontSize:15,fontWeight:700,outline:"none",fontFamily:"inherit"}}),e.jsx("textarea",{value:y,onChange:t=>U(t.target.value),placeholder:"What shipped in this release?",rows:5,style:{width:"100%",padding:"12px 14px",borderRadius:8,border:`1px solid ${n.border}`,background:n.inputBg,color:n.textSub,fontSize:13,lineHeight:1.6,resize:"vertical",outline:"none",fontFamily:"inherit"}}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("button",{type:"button",onClick:oe,disabled:$||!f.trim()||!y.trim(),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"9px 16px",borderRadius:8,border:"none",background:"hsla(0,0%,92%,0.95)",color:"#0a0a0a",fontWeight:700,fontSize:11,opacity:$||!f.trim()||!y.trim()?.45:1,cursor:"pointer",fontFamily:"inherit"},children:[$?e.jsx(w,{size:12,className:"animate-spin"}):e.jsx(ne,{size:12}),"Publish"]}),e.jsx("button",{type:"button",onClick:()=>R(!1),style:{padding:"9px 14px",background:"none",border:"none",color:n.textMuted,cursor:"pointer",fontFamily:"inherit",fontSize:11},children:"Cancel"})]})]})})}),z?e.jsx("div",{style:{display:"flex",justifyContent:"center",padding:80},children:e.jsx(w,{size:24,className:"animate-spin",style:{color:n.accent}})}):p.length===0?e.jsxs("div",{style:{textAlign:"center",padding:80,color:n.textMuted},children:[e.jsx(Z,{size:28,style:{opacity:.25,marginBottom:12}}),e.jsx("p",{style:{fontSize:14},children:"No releases yet"})]}):e.jsxs(e.Fragment,{children:[r&&e.jsx("section",{style:{borderBottom:`1px solid ${n.border}`,background:"radial-gradient(ellipse 80% 60% at 20% 0%, hsla(0,0%,100%,0.06), transparent 60%)"},children:e.jsxs("div",{style:{maxWidth:860,margin:"0 auto",padding:"28px 24px 32px"},children:[e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:10,marginBottom:14},children:[e.jsx("span",{style:{fontSize:10,fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase",padding:"4px 10px",borderRadius:6,background:"hsla(0,0%,100%,0.08)",color:n.accent},children:"Latest"}),e.jsx("span",{style:{fontSize:12,color:n.textMuted},children:pe(r.created_at)}),e.jsx("button",{type:"button",onClick:()=>M(r.username),style:{background:"none",border:"none",padding:0,cursor:r.username?"pointer":"default",color:n.textMuted,fontSize:12,fontFamily:"inherit"},children:r.username||"Team"})]}),e.jsx("h2",{style:{margin:"0 0 16px",fontSize:28,fontWeight:800,lineHeight:1.15,maxWidth:640},children:r.title}),e.jsx("p",{style:{margin:0,fontSize:14,lineHeight:1.7,color:n.textSub,whiteSpace:"pre-wrap",maxWidth:720},children:r.content}),e.jsxs("div",{style:{display:"flex",gap:10,marginTop:18,alignItems:"center"},children:[e.jsxs("button",{type:"button",onClick:()=>P(r.id),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 10px",borderRadius:6,border:`1px solid ${n.border}`,background:"transparent",color:g.has(r.id)?n.danger:n.textMuted,cursor:"pointer",fontSize:11,fontFamily:"inherit"},children:[e.jsx(ee,{size:12,fill:g.has(r.id)?"currentColor":"none"}),(c[r.id]||0)>0?c[r.id]:"Like"]}),e.jsx("button",{type:"button",onClick:()=>K(r.id),style:{padding:"6px 10px",borderRadius:6,border:`1px solid ${n.border}`,background:"transparent",color:x===r.id?n.accent:n.textMuted,cursor:"pointer",fontSize:11,fontFamily:"inherit"},children:"Discuss"}),m&&e.jsx("button",{type:"button",onClick:()=>J(r.id),style:{padding:6,background:"none",border:"none",color:n.textMuted,cursor:"pointer"},children:e.jsx(D,{size:13})})]}),x===r.id&&e.jsx(te,{P:n,comments:B,commentsLoading:L,newComment:j,setNewComment:T,postComment:q,commentPosting:E,deleteComment:Y,goUser:M,isAdmin:m})]})}),Q.length>0&&e.jsxs("section",{style:{maxWidth:860,margin:"0 auto",padding:"8px 24px 32px"},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"72px 1fr auto",gap:12,padding:"10px 0",borderBottom:`1px solid ${n.border}`,fontSize:10,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase",color:n.textMuted},children:[e.jsx("span",{children:"Date"}),e.jsx("span",{children:"Release"}),e.jsx("span",{style:{textAlign:"right"},children:"Actions"})]}),Q.map((t,i)=>
1{const s=ue(t.created_at),l=b===t.id;return e.jsxs(I.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:i*.03},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"72px 1fr auto",gap:12,alignItems:"center",padding:"14px 0",borderBottom:`1px solid ${n.border}`,cursor:"pointer"},onClick:()=>G(t.id),role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&G(t.id)},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:20,fontWeight:800,lineHeight:1},children:s.day}),e.jsxs("div",{style:{fontSize:9,color:n.textMuted,letterSpacing:"0.08em"},children:[s.mon," ",s.year]})]}),e.jsxs("div",{style:{minWidth:0},children:[e.jsx("p",{style:{margin:0,fontSize:14,fontWeight:650,color:n.text},children:t.title}),e.jsxs("p",{style:{margin:"4px 0 0",fontSize:11,color:n.textMuted},children:[t.username||"Team"," · ",ce(t.created_at)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,justifyContent:"flex-end"},onClick:d=>d.stopPropagation(),children:[e.jsx("button",{type:"button",onClick:()=>P(t.id),style:{background:"none",border:"none",padding:4,cursor:"pointer",color:g.has(t.id)?n.danger:n.textMuted},children:e.jsx(ee,{size:12,fill:g.has(t.id)?"currentColor":"none"})}),e.jsx("button",{type:"button",onClick:()=>K(t.id),style:{background:"none",border:"none",padding:4,cursor:"pointer",color:x===t.id?n.accent:n.textMuted,fontSize:10},children:"chat"}),m&&e.jsx("button",{type:"button",onClick:()=>J(t.id),style:{background:"none",border:"none",padding:4,cursor:"pointer",color:n.textMuted},children:e.jsx(D,{size:11})}),e.jsx(re,{size:12,style:{color:n.textMuted,transform:l?"rotate(90deg)":"none",transition:"transform 0.2s"}})]})]}),e.jsx(X,{initial:!1,children:l&&e.jsx(I.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},style:{overflow:"hidden"},children:e.jsx("div",{style:{padding:"0 0 16px 84px",fontSize:13,lineHeight:1.65,color:n.textSub,whiteSpace:"pre-wrap"},children:t.content})})}),x===t.id&&e.jsx("div",{style:{paddingLeft:84,paddingBottom:12},children:e.jsx(te,{P:n,comments:B,commentsLoading:L,newComment:j,setNewComment:T,postComment:q,commentPosting:E,deleteComment:Y,goUser:M,isAdmin:m})})]},t.id)})]})]})]}),e.jsx(ae,{})]})}function te({P:o,comments:n,commentsLoading:p,newComment:u,setNewComment:z,postComment:S,commentPosting:b,deleteComment:h,goUser:g,isAdmin:k}){return e.jsxs("div",{style:{marginTop:16,padding:"12px 14px",borderRadius:10,border:`1px solid ${o.border}`,background:o.surface},children:[p?e.jsx(w,{size:14,className:"animate-spin",style:{color:o.accent}}):n.length===0?e.jsx("p",{style:{fontSize:11,color:o.textMuted,margin:"0 0 10px"},children:"No discussion yet"}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8,marginBottom:10},children:n.map(c=>e.jsxs("div",{style:{fontSize:12,color:o.textSub},children:[e.jsx("button",{type:"button",onClick:()=>g(c.username),style:{background:"none",border:"none",padding:0,marginRight:6,cursor:"pointer",color:o.accentHot,fontWeight:700,fontSize:11,fontFamily:"inherit"},children:c.username||"User"}),c.content,k&&e.jsx("button",{type:"button",onClick:()=>h(c.id),style:{marginLeft:8,background:"none",border:"none",color:o.textMuted,cursor:"pointer",verticalAlign:"middle"},children:e.jsx(D,{size:9})})]},c.id))}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx("input",{value:u,onChange:c=>z(c.target.value),onKeyDown:c=>{c.key==="Enter"&&S()},placeholder:"Add to the thread…",style:{flex:1,padding:"8px 10px",borderRadius:8,border:`1px solid ${o.border}`,background:o.inputBg,color:o.text,fontSize:11,outline:"none",fontFamily:"inherit"}}),e.jsx("button",{type:"button",onClick:S,disabled:b||!u.trim(),style:{padding:"8px 12px",borderRadius:8,border:`1px solid ${o.border}`,background:o.elevated,cursor:"pointer"},children:b?e.jsx(w,{size:12,className:"animate-spin"}):e.jsx(ne,{size:12})})]})]})}export{Se 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.