1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8179],{19582:(e,t,a)=>{a.d(t,{AA:()=>u,BN:()=>l,Bj:()=>x,Ev:()=>o,Fb:()=>c,MB:()=>i,cs:()=>g,kK:()=>m,mQ:()=>n,r5:()=>s,vF:()=>d});var r=a(42004);async function s(){let{cursor:e,limit:t=50}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a={};e&&(a.cursor=e),t&&(a.limit=t);let{data:s}=await r.default.get("/api/community/requests",{params:a});return s}async function n(){let{data:e}=await r.default.get("/api/community/eligibility");return e}async function l(){let{limit:e=12}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:t}=await r.default.get("/api/community/changelog",{params:{limit:e}});return t}async function i(e){let{title:t,body:a,tiktokUsername:s}=e,{data:n}=await r.default.post("/api/community/requests",{title:t,body:a,tiktokUsername:s});return n}async function c(e){let{data:t}=await r.default.delete("/api/community/requests/".concat(encodeURIComponent(e)));return t}async function d(e){let{data:t}=await r.default.post("/api/community/requests/".concat(encodeURIComponent(e),"/vote"));return t}async function o(e){let{data:t}=await r.default.post("/api/community/requests/".concat(encodeURIComponent(e),"/report"));return t}async function x(){let{data:e}=await r.default.get("/api/admin/community/commits");return e}async function u(e){let{title:t,body:a,pinned:s,linkRequestIds:n,commitShas:l}=e,{data:i}=await r.default.post("/api/admin/community/changelog",{title:t,body:a,pinned:s,linkRequestIds:n,commitShas:l});return i}async function m(e,t){let{status:a,ownerReply:s}=t,{data:n}=await r.default.patch("/api/admin/community/requests/".concat(encodeURIComponent(e),"/status"),{status:a,ownerReply:s});return n}async function g(){let{data:e}=await r.default.get("/api/admin/community/requests/reported");return e}},48179:(e,t,a)=>{a.r(t),a.d(t,{default:()=>f});var r=a(37876),s=a(14232),n=a(69241),l=a(40482),i=a(19582);let c=/[âª-â®â¦-â©]/g;function d(e){let{text:t}=e,a=String(t||"").replace(c,"").split("\n"),s=[],n=null;return a.forEach((e,t)=>{e.startsWith("- ")?(n||(n=[],s.push({type:"ul",items:n,key:t})),n.push({key:t,text:e.slice(2)})):(n=null,s.push({type:"p",key:t,text:e}))}),(0,r.jsx)("div",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:s.map(e=>"ul"===e.type?(0,r.jsx)("ul",{className:"list-disc list-inside ml-2",children:e.items.map(e=>(0,r.jsx)("li",{children:e.text},e.key))},e.key):(0,r.jsx)("p",{className:e.text?"":"h-3",children:e.text||"\xa0"},e.key))})}var o=a(97685);let x={open:{bg:"#1e3a8a",text:"#bfdbfe",label:"à¹à¸à¸´à¸à¸à¸¢à¸¹à¹"},planned:{bg:"#854d0e",text:"#fef08a",label:"à¸à¸°à¸à¸³"},done:{bg:"#14532d",text:"#bbf7d0",label:"à¹à¸ªà¸£à¹à¸à¹à¸¥à¹à¸§"},rejected:{bg:"#4b5563",text:"#d1d5db",label:"à¹à¸¡à¹à¸à¸³"}};function u(e){let{request:t,currentUid:a,onChange:n,theme:l,isAdmin:c}
1=e,u="dark"===l,[m,g]=(0,s.useState)(!1),[y,h]=(0,s.useState)(!1),[b,p]=(0,s.useState)(!1),[f,v]=(0,s.useState)(!1),[j,k]=(0,s.useState)(""),[w,N]=(0,s.useState)(!1),C=t.statusRank>=2,D=x[t.status]||x.open;async function A(){if(m||C)return;g(!0);let e={voted:t.viewerHasVoted,count:t.voteCount};n({...t,viewerHasVoted:!t.viewerHasVoted,voteCount:t.voteCount+(t.viewerHasVoted?-1:1)});try{let{voted:e,voteCount:a}=await (0,i.vF)(t.id);n({...t,viewerHasVoted:e,voteCount:a})}catch(a){n({...t,viewerHasVoted:e.voted,voteCount:e.count}),o.Ay.error("Vote à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸")}finally{g(!1)}}async function S(){if(!y&&confirm("Report request à¸à¸µà¹?")){h(!0);try{await (0,i.Ev)(t.id),o.Ay.success("สà¹à¸ report à¹à¸¥à¹à¸§")}catch(e){o.Ay.error("Report à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸")}finally{h(!1)}}}async function R(){if(!w){N(!0);try{await (0,i.kK)(t.id,{status:t.status,ownerReply:j.trim()}),n({...t,ownerReply:j.trim()}),v(!1),o.Ay.success("à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§")}catch(e){o.Ay.error("à¸à¸±à¸à¸à¸¶à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸")}finally{N(!1)}}}return a&&t.tiktokUsername,(0,r.jsx)("div",{className:"rounded-xl p-4 border",style:{background:u?"#111827":"#ffffff",borderColor:u?"#374151":"#e5e7eb",opacity:C?.55:1},children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsxs)("button",{onClick:A,disabled:m||C,className:"flex flex-col items-center justify-center rounded-lg px-3 py-2 transition border ".concat(t.viewerHasVoted?"bg-pink-500 border-pink-500 text-white":u?"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700":"bg-pink-50 border-pink-200 text-pink-700 hover:bg-pink-100"," ").concat(C?"cursor-not-allowed opacity-60":""),title:C?"request à¸à¸µà¹à¸à¸´à¸à¹à¸¥à¹à¸§":t.viewerHasVoted?"ยà¸à¹à¸¥à¸´à¸ vote":"vote",children:[(0,r.jsx)("span",{className:"text-lg leading-none",children:"â²"}),(0,r.jsx)("span",{className:"text-sm font-bold leading-none mt-1",children:t.voteCount})]}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2 mb-1",children:[(0,r.jsx)("h3",{className:"text-base font-bold flex-1 break-words ".concat(u?"text-white":"text-gray-900"),children:t.title}),(0,r.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full flex-shrink-0",style:{background:D.bg,color:D.text},children:D.label})]}),(0,r.jsxs)("div",{className:"text-xs mb-2 ".concat(u?"text-gray-400":"text-gray-500"),children:["à¹à¸ªà¸à¸à¹à¸à¸¢ @",t.tiktokUsername,t.createdAt&&(0,r.jsxs)(r.Fragment,{children:[" \xb7 ",new Date(t.createdAt).toLocaleDateString("th-TH",{day:"numeric",month:"short"})]})]}),(0,r.jsx)("div",{className:u?"text-gray-200":"text-gray-800",children:(0,r.jsx)(d,{text:t.body})}),t.ownerReply&&(0,r.jsxs)("div",{className:"mt-3 p-3 rounded-lg border-l-4 border-pink-400 ".concat(u?"bg-gray-800":"bg-pink-50"),children:[(0,r.jsx)("div",{className:"text-xs font-bold mb-1 ".concat(u?"text-pink-300":"text-pink-700"),children:"\uD83D\uDCAC à¸à¸à¸à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸¹à¹à¸à¸±à¸à¸à¸²"}),(0,r.jsx)("div",{className:"text-sm ".concat(u?"text-gray-200":"text-gray-800"),children:(0,r.jsx)(d,{text:t.ownerReply})})]}),t.linkedChangelogId&&2===t.statusRank&&(0,r.jsx)("div",{className:"mt-2 text-xs ".concat(u?"text-green-300":"text-green-700"),children:"â shipped â à¸à¸¹ changelog"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-3 text-xs",children:[(0,r.jsx)("button",{onClick:S,disabled:y,className:"px-2 py-1 rounded transition ".concat(u?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),children:"â report"}),t.viewerHasVoted&&!C&&(0,r.jsx)("span",{className:u?"text-pink-400":"text-pink-600",children:"â à¸à¸¸à¸ vote à¹à¸¥à¹à¸§"})]}),c&&(0,r.jsx)("div",{className:"mt-3 pt-3 border-t ".concat(u?"border-gray-700":"border-gray-200"),children:f?(0,r.jsxs)("div",{children:[(0,r.jsx)("textarea",{value:j,onChange:e=>k(e.target.value),maxLength:300,rows:3,placeholder:"à¸à¸à¸à¸à¸¥à¸±à¸ / à¸à¸±à¸à¹à¸à¸à¸ªà¸à¸²à¸à¸°â¦",className:"w-full rounded-lg px-3 py-2 text-sm border resize-none ".concat(u?"bg-gray-900 border-gray-700 text-white placeholder-gray-500":"bg-white border-gray-300 text-gray-900 placeholder-gray-400")}),(0,r.jsxs)("div",{className:"text-right text-xs mt-1 ".concat(u?"text-gray-500":"text-gray-400"),children:[j.length,"/300"]}),(0,r.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,r.jsx)("button",{onClick:R,disabled:w,className:"text-xs px-3 py-1 rounded bg-pink-500 text-white hover:bg-pink-600 disabled:opacity-50",children:w?"à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸±à¸à¸à¸¶à¸"}),(0,r.jsx)("button",{onClick:()=>v(!1),className:"text-xs px-3 py-1 rounded transition ".concat(u?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),children:"ยà¸à¹à¸¥à¸´à¸"})]})]}):(0,r.jsxs)("button",{onClick:()=>{v(!0),k(t.ownerReply||"")},className:"text-xs px-2 py-1 rounded transition ".concat(u?"text-pink-400 hover:text-pink-300":"text-pink-600 hover:text-pink-800"),children:["\uD83D\uDCDD ",t.ownerReply?"à¹à¸à¹ reply":"à¸à¸à¸ request à¸à¸µà¹"]})})]})]})})}function m(e){let{user:t,theme:a,isAdmin:n}
1=e,[l,c]=(0,s.useState)([]),[d,o]=(0,s.useState)(null),[x,m]=(0,s.useState)(!1),[g,y]=(0,s.useState)(null),h=(0,s.useCallback)(async e=>{m(!0),y(null);try{let t=await (0,i.r5)({cursor:void 0===e?d:e});c(t=>void 0===e?t:[]),c(e=>[...e,...t.items||[]]),o(t.nextCursor||null)}catch(e){var t,a;y((null==e||null==(a=e.response)||null==(t=a.data)?void 0:t.error)||(null==e?void 0:e.message)||"load_failed")}finally{m(!1)}},[d]);(0,s.useEffect)(()=>{h(null)},[]);let b=l.filter(e=>e.statusRank<2),p=l.filter(e=>e.statusRank>=2),f="dark"===a;function v(e,t){if(t)return void c(e=>e.filter(e=>e.id!==t));c(t=>t.map(t=>t.id===e.id?e:t))}return(0,r.jsxs)("div",{className:"space-y-3",children:[b.map(e=>(0,r.jsx)(u,{request:e,currentUid:null==t?void 0:t.uid,onChange:v,theme:a,isAdmin:n},e.id)),p.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide pt-3 ".concat(f?"text-gray-500":"text-gray-400"),children:"à¹à¸ªà¸£à¹à¸à¹à¸¥à¹à¸§ / à¸à¸´à¸à¹à¸à¹à¸¥à¹à¸§"}),p.map(e=>(0,r.jsx)(u,{request:e,currentUid:null==t?void 0:t.uid,onChange:v,theme:a,isAdmin:n},e.id))]}),d&&(0,r.jsx)("button",{onClick:()=>h(d),disabled:x,className:"w-full py-2 rounded-lg text-sm font-medium ".concat(f?"bg-gray-800 text-gray-300 hover:bg-gray-700":"bg-pink-50 text-pink-700 hover:bg-pink-100"),children:x?"à¹à¸«à¸¥à¸â¦":"à¹à¸«à¸¥à¸à¹à¸à¸´à¹à¸¡"}),g&&(0,r.jsxs)("div",{className:"text-sm text-red-500",children:["à¹à¸«à¸¥à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: ",g]}),0===l.length&&!x&&(0,r.jsx)("div",{className:"text-center py-8 ".concat(f?"text-gray-500":"text-gray-400"),children:"ยัà¸à¹à¸¡à¹à¸¡à¸µ request â à¹à¸à¹à¸à¸à¸à¹à¸£à¸à¸à¸µà¹à¹à¸ªà¸à¸à¹à¸«à¸¡?"})]})}function g(e){let{user:t,theme:a,onPosted:n}=e,l="dark"===a,[c,d]=(0,s.useState)(null),[x,u]=(0,s.useState)(!1),[m,g]=(0,s.useState)(""),[h,b]=(0,s.useState)(""),[p,f]=(0,s.useState)(""),[v,j]=(0,s.useState)(!1),k=async()=>{if(t){u(!0);try{var e;let t=await (0,i.mQ)();d(t),(null==(e=t.tiktokUsernames)?void 0:e.length)&&!p&&f(t.tiktokUsernames[0])}catch(e){}finally{u(!1)}}};if((0,s.useEffect)(()=>{k()},[t]),!t)return(0,r.jsx)("button",{onClick:()=>{try{window.dispatchEvent(new CustomEvent("ttplus-request-login"))}catch(e){}},className:"w-full py-3 rounded-xl bg-pink-500 hover:bg-pink-600 text-white font-semibold",children:"\uD83D\uDD10 Login Google à¹à¸à¸·à¹à¸à¹à¸ªà¸à¸à¸à¸µà¹à¸à¸à¸£à¹"});if(x||!c)return(0,r.jsx)("div",{className:"p-4 text-center ".concat(l?"text-gray-500":"text-gray-400"),children:"à¹à¸«à¸¥à¸â¦"});if(c.isOwner)return(0,r.jsx)("div",{className:"rounded-xl p-4 border ".concat(l?"bg-gray-800 border-gray-700 text-gray-200":"bg-pink-50 border-pink-200 text-gray-800"),children:"à¸à¸¸à¸à¹à¸à¹à¸ owner â à¸à¸±à¸à¸à¸²à¸£à¸à¹à¸²à¸ Admin > Community Chat"});if(c.daysSinceCreate<7||c.loginDays<5){let e=c.daysSinceCreate>=7,t=Math.min(7,c.daysSinceCreate),a=Math.min(5,c.loginDays);return(0,r.jsxs)("div",{className:"rounded-xl p-4 border ".concat(l?"bg-gray-800 border-gray-700":"bg-amber-50 border-amber-200"),children:[(0,r.jsx)("div",{className:"text-sm font-bold mb-3 ".concat(l?"text-amber-300":"text-amber-800"),children:"â³ à¹à¸à¹à¹à¸§à¹à¸à¸à¸µà¸à¸«à¸à¹à¸à¸¢à¸à¸¶à¸à¸à¸°à¹à¸ªà¸à¸à¹à¸à¹"}),(0,r.jsx)(y,{label:"à¸à¸²à¸¢à¸¸à¸à¸±à¸à¸à¸µ",value:t,max:7,unit:"วัà¸",dark:l,done:e}),(0,r.jsx)(y,{label:"à¹à¸à¹à¸²à¹à¸à¹à¸à¹à¸²à¸à¸§à¸±à¸",value:a,max:5,unit:"วัà¸",dark:l,done:c.loginDays>=5}),(0,r.jsx)("div",{className:"text-xs mt-3 ".concat(l?"text-gray-400":"text-gray-600"),children:"à¹à¸à¸à¸à¹à¸à¸µà¹à¸à¹à¸§à¸¢à¹à¸«à¹à¸à¸à¸à¸µà¹à¹à¸à¹à¸à¸£à¸´à¸à¹à¸ªà¸à¸ feature à¹à¸¡à¹à¹à¸à¹à¹à¸à¸£à¸à¹à¹à¸à¹à¸à¸µà¹à¹à¸à¸´à¹à¸à¸ªà¸¡à¸±à¸à¸£à¸¡à¸²"})]})}if(0===c.tiktokUsernames.length)return(0,r.jsxs)("div",{className:"rounded-xl p-4 border ".concat(l?"bg-gray-800 border-gray-700 text-gray-200":"bg-amber-50 border-amber-200 text-gray-800"),children:[(0,r.jsx)("div",{className:"font-bold mb-2",children:"\uD83D\uDCE1 à¸à¹à¸à¸à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸ TikTok à¸à¹à¸à¸"}),(0,r.jsx)("div",{className:"text-sm mb-3",children:"à¹à¸ªà¸à¸à¸à¸µà¹à¸à¸à¸£à¹à¹à¸à¹à¹à¸à¸à¸²à¸°à¸à¸à¸à¸µà¹à¹à¸à¸¢ live สà¸à¸à¹à¸²à¸ ttsam.app â à¹à¸ªà¹ username à¸à¸µà¹ TikTok connect bar à¸à¹à¸²à¸à¸à¸"})]});if(c.hasOpenRequest)return(0,r.jsxs)("div",{className:"rounded-xl p-4 border ".concat(l?"bg-gray-800 border-gray-700 text-gray-200":"bg-amber-50 border-amber-200 text-gray-800"),children:[(0,r.jsx)("div",{className:"font-bold mb-1",children:"\uD83D\uDCCC มี request à¸à¸à¸à¸à¸¸à¸à¸à¹à¸²à¸à¸à¸¢à¸¹à¹ 1 à¸à¸±à¸"}),(0,r.jsx)("div",{className:"text-sm",children:"ลà¸à¸à¸à¸à¹à¸à¸´à¸¡ (หาà¸à¹à¸¡à¹à¸à¹à¸à¸à¸à¸²à¸£à¹à¸¥à¹à¸§) à¸à¹à¸à¸à¹à¸ªà¸à¸à¹à¸«à¸¡à¹ â รายà¸à¸²à¸£à¸à¸¢à¸¹à¹à¹à¸à¸¥à¸´à¸ªà¸à¹à¸à¹à¸²à¸à¸¥à¹à¸²à¸"})]});async function w(e){if(e.preventDefault(),!v){if(!m.trim()||!h.trim()||!p)return void o.Ay.error("à¸à¸£à¸à¸à¸«à¸±à¸§à¸à¹à¸ + รายละà¹à¸à¸µà¸¢à¸ + à¹à¸¥à¸·à¸à¸ @username");j(!0);try{await (0,i.MB)({title:m.trim(),body:h.trim(),tiktokUsername:p}),o.Ay.success("à¹à¸ªà¸à¸à¹à¸¥à¹à¸§ \uD83C\uDF89"),g(""),b(""),await k(),null==n||n()}catch(r){var t,a;let e=(null==r||null==(a=r.response)||null==(t=a.data)?void 0:t.error)||"post_failed";o.Ay.error("à¹à¸ªà¸à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: ".concat(e))}finally{j(!1)}}}let N=60-m.length,C=300-h.length;return(0,r.jsxs)("form",{onSubmit:w,className:"rounded-xl p-4 border ".concat(l?"bg-gray-900 border-gray-700":"bg-white border-pink-200"),children:[(0,r.jsx)("div",{className:"text-sm font-bold mb-3 ".concat(l?"text-pink-300":"text-pink-700"),children:"\uD83D\uDCA1 à¹à¸ªà¸à¸à¸à¸µà¹à¸à¸à¸£à¹à¹à¸«à¸¡à¹"}),(0,r.jsx)("input",{type:"text",value:m,onChange:e=>g(e.target.value.slice(0,60)),placeholder:"หัวà¸à¹à¸à¸ªà¸±à¹à¸à¹ (à¹à¸à¹à¸ à¹à¸à¸´à¹à¸¡à¹à¸à¸à¹à¸à¸à¸à¹à¸à¸¥à¸¸à¸à¹à¸³à¹à¸à¸´à¸)",maxLength:60,className:"w-full px-3 py-2 mb-2 rounded-lg border ".concat(l?"bg-gray-800 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900")}),(0,r.jsxs)("div",{className:"text-xs mb-2 text-right ".concat(l?"text-gray-500":"text-gray-400"),children:[N," à¸à¸±à¸§à¸à¸±à¸à¸©à¸£"]}
1),(0,r.jsx)("textarea",{value:h,onChange:e=>b(e.target.value.slice(0,300)),placeholder:"à¸à¸à¸´à¸à¸²à¸¢à¸§à¹à¸²à¸à¸¢à¸²à¸à¹à¸à¹à¸à¸°à¹à¸£ à¸à¸³à¸à¸²à¸à¸¢à¸±à¸à¹à¸ à¸à¸³à¹à¸¡à¸à¸¶à¸à¸à¸§à¸£à¸¡à¸µ",maxLength:300,rows:4,className:"w-full px-3 py-2 mb-1 rounded-lg border ".concat(l?"bg-gray-800 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900")}),(0,r.jsxs)("div",{className:"text-xs mb-3 text-right ".concat(l?"text-gray-500":"text-gray-400"),children:[C," à¸à¸±à¸§à¸à¸±à¸à¸©à¸£"]}),(0,r.jsx)("label",{className:"text-xs block mb-1 ".concat(l?"text-gray-400":"text-gray-600"),children:"à¹à¸ªà¸à¸à¹à¸à¸à¸²à¸¡ TikTok username"}),(0,r.jsx)("select",{value:p,onChange:e=>f(e.target.value),className:"w-full px-3 py-2 mb-3 rounded-lg border ".concat(l?"bg-gray-800 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:c.tiktokUsernames.map(e=>(0,r.jsxs)("option",{value:e,children:["@",e]},e))}),(0,r.jsx)("button",{type:"submit",disabled:v||!m.trim()||!h.trim(),className:"w-full py-2.5 rounded-lg bg-pink-500 hover:bg-pink-600 disabled:opacity-50 text-white font-semibold",children:v?"à¸à¸³à¸¥à¸±à¸à¸ªà¹à¸â¦":"à¹à¸ªà¸à¸à¹à¸¥à¸¢"})]})}function y(e){let{label:t,value:a,max:s,unit:n,dark:l,done:i}=e,c=Math.min(100,a/s*100);return(0,r.jsxs)("div",{className:"mb-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-xs mb-1 ".concat(l?"text-gray-300":"text-gray-700"),children:[(0,r.jsx)("span",{children:t}),(0,r.jsxs)("span",{className:"font-mono",children:[a,"/",s," ",n," ",i&&"â"]})]}),(0,r.jsx)("div",{className:"h-2 rounded-full overflow-hidden ".concat(l?"bg-gray-700":"bg-amber-100"),children:(0,r.jsx)("div",{className:"h-full rounded-full transition-all ".concat(i?"bg-green-500":"bg-amber-500"),style:{width:"".concat(c,"%")}})})]})}function h(e){let{theme:t}=e,a="dark"===t,[n,l]=(0,s.useState)([]),[c,o]=(0,s.useState)(!0),[x,u]=(0,s.useState)(null);return((0,s.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await (0,i.BN)({limit:12});if(!e)return;l(t.entries||[]);let a=t.latestId;if(a)try{localStorage.getItem("tt_community_lastseen")!==a&&(localStorage.setItem("tt_community_lastseen",a),window.dispatchEvent(new CustomEvent("ttplus-community-seen")))}catch(e){}}catch(r){var t,a;e&&u((null==r||null==(a=r.response)||null==(t=a.data)?void 0:t.error)||"load_failed")}finally{e&&o(!1)}})(),()=>{e=!1}},[]),c)?(0,r.jsx)("div",{className:"text-center py-8 ".concat(a?"text-gray-500":"text-gray-400"),children:"à¹à¸«à¸¥à¸â¦"}):x?(0,r.jsxs)("div",{className:"text-sm text-red-500",children:["à¹à¸«à¸¥à¸ changelog à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: ",x]}):0===n.length?(0,r.jsx)("div",{className:"text-center py-8 ".concat(a?"text-gray-500":"text-gray-400"),children:"ยัà¸à¹à¸¡à¹à¸¡à¸µ update â à¹à¸£à¹à¸§à¹ à¸à¸µà¹"}):(0,r.jsx)("div",{className:"space-y-4",children:n.map(e=>(0,r.jsxs)("article",{className:"rounded-xl p-4 border ".concat(a?e.pinned?"bg-gray-800 border-pink-700":"bg-gray-900 border-gray-700":e.pinned?"bg-pink-50 border-pink-300":"bg-white border-gray-200"),children:[(0,r.jsxs)("header",{className:"flex items-center gap-2 mb-2",children:[e.pinned&&(0,r.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full font-bold ".concat(a?"bg-pink-900 text-pink-200":"bg-pink-200 text-pink-800"),children:"\uD83D\uDCCC à¸à¸±à¸à¸«à¸¡à¸¸à¸"}),(0,r.jsx)("h2",{className:"text-lg font-bold flex-1 ".concat(a?"text-white":"text-gray-900"),children:e.title}),e.publishedAt&&(0,r.jsx)("time",{className:"text-xs ".concat(a?"text-gray-400":"text-gray-500"),children:new Date(e.publishedAt).toLocaleDateString("th-TH",{day:"numeric",month:"short",year:"numeric"})})]}),(0,r.jsx)("div",{className:a?"text-gray-200":"text-gray-800",children:(0,r.jsx)(d,{text:e.body})})]},e.id))})}var b=a(84420);let p=(0,s.lazy)(()=>a.e(3219).then(a.bind(a,53219)));function f(e){let{theme:t,user:a,activePage:i,setActivePage:c,sidebarCollapsed:d,toggleSidebar:o}=e,x="dark"===t,[u,y]=(0,s.useState)(0),[f,v]=(0,s.useState)(!0),j=(0,b.u)(a);return(0,r.jsxs)("div",{className:(0,n.A)("min-h-screen overflow-x-hidden",x?"bg-gray-950 text-white":"bg-[#fdf6f9] text-gray-900"),children:[(0,r.jsx)(l.A,{theme:t,user:a,activePage:i,setActivePage:c,collapsed:d,onToggleCollapse:o}),(0,r.jsxs)("main",{className:(0,n.A)("px-2 py-3 sm:p-4 md:p-6 overflow-x-hidden max-w-full lg:max-w-7xl",d?"ml-14":"ml-14 md:ml-48"),children:[(0,r.jsxs)("header",{className:"mb-6",children:[(0,r.jsx)("h1",{className:(0,n.A)("text-2xl md:text-3xl font-bold",x?"text-white":"text-gray-900"),children:"\uD83D\uDCAC à¸à¸¸à¸¡à¸à¸"}),(0,r.jsx)("p",{className:(0,n.A)("text-sm mt-1",x?"text-gray-400":"text-gray-600"),children:"à¹à¸ªà¸à¸à¸à¸µà¹à¸à¸à¸£à¹à¹à¸«à¸¡à¹ + à¸à¹à¸²à¸à¸à¸±à¸à¹à¸à¸à¸¥à¹à¸²à¸ªà¸¸à¸à¸à¸à¸à¹à¸§à¹à¸"})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0",alignItems:"flex-start"},children:[(0,r.jsxs)("div",{style:{flex:1,minWidth:0}
1,className:(0,n.A)("rounded-xl p-4 mr-3",x?"bg-gray-900":"bg-white border border-gray-200"),children:[(0,r.jsx)("div",{className:(0,n.A)("text-sm font-bold mb-3",x?"text-gray-300":"text-gray-700"),children:"\uD83C\uDD95 à¸à¸±à¸à¹à¸à¸"}),j&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("button",{onClick:()=>v(e=>!e),className:(0,n.A)("w-full text-left px-3 py-2 rounded-lg text-sm font-semibold transition",x?"bg-gray-800 text-pink-300 hover:bg-gray-700":"bg-pink-50 text-pink-700 hover:bg-pink-100"),children:f?"â¶ à¹à¸à¸¢à¹à¸à¸£à¹à¸à¸±à¸à¹à¸à¸":"â¼ à¸à¹à¸à¸ Admin Panel"}),!f&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)("div",{className:(0,n.A)("text-sm",x?"text-gray-500":"text-gray-400"),children:"loading adminâ¦"}),children:(0,r.jsx)(p,{theme:t})})})]}),(0,r.jsx)(h,{theme:t})]}),(0,r.jsx)("div",{style:{width:"1px",alignSelf:"stretch",flexShrink:0},className:x?"bg-gray-700":"bg-gray-200"}),(0,r.jsxs)("div",{style:{flex:1,minWidth:0},className:(0,n.A)("rounded-xl p-4 ml-3",x?"bg-gray-900":"bg-white border border-gray-200"),children:[(0,r.jsx)("div",{className:(0,n.A)("text-sm font-bold mb-3",x?"text-gray-300":"text-gray-700"),children:"\uD83D\uDCA1 à¹à¸ªà¸à¸à¸à¸µà¹à¸à¸à¸£à¹"}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(g,{user:a,theme:t,onPosted:()=>y(e=>e+1)},u),(0,r.jsx)(m,{user:a,theme:t,isAdmin:j},"list-".concat(u))]})]})]})]})]})}}}]);
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.