@weppy/roblox-mcp 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +25 -0
- package/README.md +4 -7
- package/docs/en/installation/README.md +3 -4
- package/docs/es/README.md +2 -5
- package/docs/es/installation/README.md +3 -4
- package/docs/id/README.md +1 -4
- package/docs/id/installation/README.md +3 -4
- package/docs/installer/assets/index-B4Gp7BPj.js +63 -0
- package/docs/installer/assets/index-B7mvmOPt.css +1 -0
- package/docs/installer/index.html +14 -0
- package/docs/installer/manifest.webmanifest +15 -0
- package/docs/installer/sw.js +7 -0
- package/docs/installer/wrox-icon.png +0 -0
- package/docs/ja/README.md +1 -4
- package/docs/ja/installation/README.md +2 -3
- package/docs/ko/README.md +4 -7
- package/docs/ko/installation/README.md +3 -4
- package/docs/pt-br/README.md +2 -5
- package/docs/pt-br/installation/README.md +3 -4
- package/install.ps1 +495 -8
- package/install.sh +499 -9
- package/llms-full.txt +14 -2
- package/llms.txt +9 -3
- package/package.json +1 -1
- package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-D7eMrarv.js → ChangelogDetailPage-CGK59Jsx.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogPage-DFCCRyyK.js → ChangelogPage-oNm6ratx.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-BmRJ2JXZ.js → ConfirmModal-Dtak3Vnq.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConnectionPage-CiaCY026.js → ConnectionPage-CjLtImxr.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-CCDWZLC9.js → InfoLabel-CLvjiyTG.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-BHpt3LI2.js → OverviewPage-BdF0Ve7h.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PlaytestPage-CNwwI5Ro.js → PlaytestPage-cQMWlAOS.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{PropertyDiff-DIplDn-J.js → PropertyDiff-BnOZxkTS.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SettingsPage-CPqQYZPN.js → SettingsPage-C-QX0AY-.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-C8VKAPpk.js → StatusBadge-A9U9m2LQ.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{SyncPage-DTSKbpio.js → SyncPage-BAS0cXRM.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierComparison-7ofkPwj3.js → TierComparison-BA_L4c9p.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierPromoProgress-SnRUjAPh.js → TierPromoProgress-Dq6ofjr2.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ToolsPage-CrdNh3D9.js → ToolsPage-C_tMIyix.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{index-DGGmfli1.js → index-OH9mpHwW.js} +2 -2
- package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-BnXeLpOw.js → useLiveUptime-Df1ECedb.js} +1 -1
- package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +1 -1
- package/plugins/weppy-roblox-mcp/dist/index.js +63 -65
- package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as h,r as x,k as j,l as g,j as s}from"./index-
|
|
1
|
+
import{u as h,r as x,k as j,l as g,j as s}from"./index-OH9mpHwW.js";import{D as v,a as u}from"./TierComparison-BA_L4c9p.js";import{t as e}from"./TierPromo.module-CAoUYgIx.js";function f({basicCalls:n,proCalls:a,totalCalls:c,proUsagePercent:l,upgradeHref:d}){const{t:r}=h(),[p,o]=x.useState(!1),{trackEvent:i}=j(),{pathname:m}=g(),t=m.replace(/^\//,"").split("/")[0]||"overview";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:e.progressPromoWrap,children:[s.jsxs("div",{className:e.progressPromo,children:[s.jsxs("div",{className:e.progressMain,children:[s.jsxs("div",{className:e.progressLabel,children:[s.jsx("span",{children:r("tier.progress.label","Pro / Total")}),s.jsxs("span",{children:[a," / ",c]})]}),s.jsx("div",{className:e.progressBar,children:s.jsx("div",{className:e.progressFill,style:{width:`${Math.min(l,100)}%`}})}),s.jsxs("div",{className:e.progressLabel,children:[s.jsxs("span",{children:[r("tier.basic")," ",n]}),s.jsxs("span",{children:[r("tier.pro")," ",a]})]})]}),s.jsx("span",{className:e.progressText,children:r("tier.banner.save","Save AI tokens with Pro!")}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:`${e.btn} ${e.btnOutline}`,onClick:()=>{i("dashboard_tier_toggle",{page:t}),o(!0)},children:r("tier.compare","Basic vs Pro")}),s.jsx("a",{className:`${e.btn} ${e.btnPrimary}`,href:d,target:"_blank",rel:"noreferrer",onClick:()=>i("dashboard_upgrade_click",{page:t}),children:r("tier.upgrade","Upgrade to Pro")})]})]}),s.jsx(v,{variant:"centered"})]}),p&&s.jsx(u,{onClose:()=>o(!1)})]})}export{f as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,r as l,a as R,D as Z,u as q,i as z,T as w}from"./index-DGGmfli1.js";import{C as Q}from"./ConfirmModal-BmRJ2JXZ.js";import{u as X,T as Y}from"./TierComparison-7ofkPwj3.js";import{T as tt}from"./TierPromoProgress-SnRUjAPh.js";import"./TierPromo.module-CAoUYgIx.js";const st="_wrapper_1s3lp_2",et="_table_1s3lp_7",at="_sortable_1s3lp_32",ot="_sortArrow_1s3lp_41",rt="_clickable_1s3lp_52",lt="_empty_1s3lp_57",M={wrapper:st,table:et,sortable:at,sortArrow:ot,clickable:rt,empty:lt};function it({columns:e,data:o,sortBy:T,sortDir:f="asc",onSort:g,onRowClick:S,rowKey:C,emptyMessage:v}){return s.jsx("div",{className:M.wrapper,children:s.jsxs("table",{className:M.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(n=>s.jsxs("th",{style:n.width?{width:n.width}:void 0,className:n.sortable?M.sortable:void 0,onClick:n.sortable&&g?()=>g(n.key):void 0,children:[s.jsx("span",{children:n.label}),n.sortable&&T===n.key&&s.jsx("span",{className:M.sortArrow,children:f==="asc"?"▴":"▾"})]},n.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:M.empty,children:v||"No data"})}):o.map((n,k)=>s.jsx("tr",{className:S?M.clickable:void 0,onClick:S?()=>S(n):void 0,children:e.map(p=>s.jsx("td",{children:p.render?p.render(n):String(n[p.key]??"")},p.key))},C?C(n):k))})]})})}const V=50;function nt(){const[e,o]=l.useState(null),[T,f]=l.useState(!0),[g,S]=l.useState([]),[C,v]=l.useState(0),[n,k]=l.useState(!1),[p,N]=l.useState(!0),[x,H]=l.useState(0),[u,D]=l.useState(""),[B,E]=l.useState([]),[U,A]=l.useState(0),[O,d]=l.useState(!1),[$,F]=l.useState(!0),[b,j]=l.useState(0),L=l.useRef(null),y=l.useCallback(async()=>{f(!0);try{const m=await R.get("/api/dashboard/tool-stats");o(m)}catch{}finally{f(!1)}},[]),t=l.useCallback(async(m,_)=>{N(!0);try{const K={limit:String(V),offset:String(m)};_&&(K.tool=_);const W=await R.get("/api/dashboard/history",K);S(W.entries),v(W.total),k(W.hasMore)}catch{S([]),v(0),k(!1)}finally{N(!1)}},[]),r=l.useCallback(async m=>{F(!0);try{const _=await R.get("/api/dashboard/failures",{limit:String(V),offset:String(m)});E(_.entries),A(_.total),d(_.hasMore)}catch{E([]),A(0),d(!1)}finally{F(!1)}},[]),i=l.useCallback(()=>{y(),t(x,u),r(b)},[y,t,r,x,u,b]),h=l.useCallback(async()=>{await R.post("/api/dashboard/tools/history/clear"),t(x,u),r(b)},[t,r,x,u,b]),c=l.useCallback(async()=>{await R.post("/api/dashboard/tools/statistics/clear"),y()},[y]);return l.useEffect(()=>{y()},[y]),l.useEffect(()=>{t(x,u)},[t,x,u]),l.useEffect(()=>{r(b)},[r,b]),l.useEffect(()=>{const m=new Z;L.current=m,m.connect();const _=m.on("command",()=>{y(),t(x,u),r(b)});return()=>{_(),m.disconnect(),L.current=null}},[y,t,r,x,u,b]),{statistics:e,statsLoading:T,history:g,historyTotal:C,historyHasMore:n,historyLoading:p,historyOffset:x,historyToolFilter:u,setHistoryOffset:H,setHistoryToolFilter:D,failures:B,failuresTotal:U,failuresHasMore:O,failuresLoading:$,failuresOffset:b,setFailuresOffset:j,refresh:i,clearHistory:h,clearStatistics:c}}const ct="_page_184r6_2",dt="_tabs_184r6_10",ut="_tab_184r6_10",pt="_tabActive_184r6_34",ht="_card_184r6_40",mt="_cardToolbar_184r6_47",xt="_sectionTitle_184r6_55",bt="_dangerButton_184r6_61",ft="_proBadge_184r6_71",_t="_statusOk_184r6_85",yt="_tierBasic_184r6_91",jt="_tierPro_184r6_95",gt="_tierMixed_184r6_100",St="_filterRow_184r6_111",Tt="_filterLabel_184r6_118",Ct="_filterSelect_184r6_127",Nt="_expandedRow_184r6_138",wt="_expandedSection_184r6_146",vt="_pre_184r6_156",kt="_pagination_184r6_173",Bt="_pageInfo_184r6_181",Mt="_btn_184r6_187",Pt="_tierDistribution_184r6_210",Et="_tierBarWrap_184r6_214",Lt="_tierBarBasic_184r6_222",Rt="_tierBarPro_184r6_227",Ht="_tierLabels_184r6_232",At="_statsTableWrap_184r6_241",Ot="_statsTable_184r6_241",$t="_sortableHeader_184r6_272",Ft="_sortArrow_184r6_277",It="_statsToolRow_184r6_281",Dt="_statsActionRow_184r6_289",Ut="_expandButton_184r6_293",Wt="_expandIcon_184r6_305",Gt="_actionLabel_184r6_310",Jt="_emptyStats_184r6_317",Kt="_summaryLine_184r6_323",a={page:ct,tabs:dt,tab:ut,tabActive:pt,card:ht,cardToolbar:mt,sectionTitle:xt,dangerButton:bt,proBadge:ft,statusOk:_t,tierBasic:yt,tierPro:jt,tierMixed:gt,filterRow:St,filterLabel:Tt,filterSelect:Ct,expandedRow:Nt,expandedSection:wt,pre:vt,pagination:kt,pageInfo:Bt,btn:Mt,tierDistribution:Pt,tierBarWrap:Et,tierBarBasic:Lt,tierBarPro:Rt,tierLabels:Ht,statsTableWrap:At,statsTable:Ot,sortableHeader:$t,sortArrow:Ft,statsToolRow:It,statsActionRow:Dt,expandButton:Ut,expandIcon:Wt,actionLabel:Gt,emptyStats:Jt,summaryLine:Kt},G=50;function Vt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function I(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function J(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Yt(){const{t:e}=q(),o=nt(),{show:T}=z(),f=X(),[g,S]=l.useState("history"),[C,v]=l.useState(null),[n,k]=l.useState(null),[p,N]=l.useState(null),[x,H]=l.useState(!1),[u,D]=l.useState("totalCalls"),[B,E]=l.useState("desc"),U=l.useCallback(t=>{D(r=>r===t?(E(i=>i==="asc"?"desc":"asc"),t):(E("desc"),t))},[]),A=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),O=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const i=Object.entries(r.actions??{}).map(([h,c])=>({toolName:r.toolName,actionName:c.action??h,tier:c.tier,totalCalls:c.totalCalls,successCount:c.successCount,failureCount:c.failureCount,totalExecutionTimeMs:c.totalExecutionTimeMs,avgExecutionTimeMs:c.avgExecutionTimeMs,firstUsed:c.firstUsed,lastUsed:c.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:i,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=l.useCallback((t,r,i,h)=>s.jsx(w,{text:e(i,h),children:e(t,r)}),[e]),$=l.useMemo(()=>[...O].sort((r,i)=>{const h=r[u],c=i[u];if(typeof h=="number"&&typeof c=="number")return B==="asc"?h-c:c-h;const m=String(h??""),_=String(c??"");return B==="asc"?m.localeCompare(_):_.localeCompare(m)}),[O,u,B]),F=l.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Vt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var i;const r=((i=t.parameters)==null?void 0:i.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(w,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.proBadge,children:e("tools.badge.pro","PRO")})})]})}},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>I(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(w,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),b=l.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>J(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>I(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"60px",render:t=>s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),j=l.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,i=t+r;if(i===0)return null;const h=Math.round(t/i*100),c=100-h;return{basic:t,pro:r,total:i,basicPct:h,proPct:c}},[o.statistics]),L=l.useCallback(t=>{k(r=>r===t?null:t)},[]),y=l.useCallback(async()=>{if(p){H(!0);try{p==="history"?await o.clearHistory():await o.clearStatistics(),T(e("toast.clearSuccess","Cleared successfully"),"success"),N(null)}catch{T(e("toast.clearFailed","Failed to clear data"),"error")}finally{H(!1)}}},[p,T,e,o]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${g===t?a.tabActive:""}`,onClick:()=>S(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),g==="history"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("history"),children:e("common.clear","Clear")})]}),s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),A.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(it,{columns:F,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),C&&(()=>{const t=o.history.find(r=>r.id===C);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-G)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+G,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+G),children:e("tools.page.next","Next")})]})]}),g==="statistics"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("statistics"),children:e("common.clear","Clear")})]}),j&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${j.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${j.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",j.basicPct,"% (",j.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",j.proPct,"% (",j.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:b.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>U(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&u===t.key&&s.jsx("span",{className:a.sortArrow,children:B==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:b.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const r=n===t.toolName;return s.jsxs(l.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>L(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),L(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:J(t.successCount,t.totalCalls)}),s.jsx("td",{children:I(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(i=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:i.actionName})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:J(i.successCount,i.totalCalls)}),s.jsx("td",{children:I(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,i.tier)})})]},`${t.toolName}:${i.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!f.loading&&f.tier==="basic"&&s.jsx(tt,{basicCalls:f.basicCalls,proCalls:f.proCalls,totalCalls:f.totalCalls,proUsagePercent:f.proUsagePercent,upgradeHref:Y.tools}),s.jsx(Q,{open:p!==null,title:p==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:p==="history"?e("tools.clear.history.message","This permanently removes the current place tool history and failures."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:x,onCancel:()=>!x&&N(null),onConfirm:y})]})}export{Yt as Component};
|
|
1
|
+
import{j as s,r as l,a as R,D as Z,u as q,i as z,T as w}from"./index-OH9mpHwW.js";import{C as Q}from"./ConfirmModal-Dtak3Vnq.js";import{u as X,T as Y}from"./TierComparison-BA_L4c9p.js";import{T as tt}from"./TierPromoProgress-Dq6ofjr2.js";import"./TierPromo.module-CAoUYgIx.js";const st="_wrapper_1s3lp_2",et="_table_1s3lp_7",at="_sortable_1s3lp_32",ot="_sortArrow_1s3lp_41",rt="_clickable_1s3lp_52",lt="_empty_1s3lp_57",M={wrapper:st,table:et,sortable:at,sortArrow:ot,clickable:rt,empty:lt};function it({columns:e,data:o,sortBy:T,sortDir:f="asc",onSort:g,onRowClick:S,rowKey:C,emptyMessage:v}){return s.jsx("div",{className:M.wrapper,children:s.jsxs("table",{className:M.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(n=>s.jsxs("th",{style:n.width?{width:n.width}:void 0,className:n.sortable?M.sortable:void 0,onClick:n.sortable&&g?()=>g(n.key):void 0,children:[s.jsx("span",{children:n.label}),n.sortable&&T===n.key&&s.jsx("span",{className:M.sortArrow,children:f==="asc"?"▴":"▾"})]},n.key))})}),s.jsx("tbody",{children:o.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:M.empty,children:v||"No data"})}):o.map((n,k)=>s.jsx("tr",{className:S?M.clickable:void 0,onClick:S?()=>S(n):void 0,children:e.map(p=>s.jsx("td",{children:p.render?p.render(n):String(n[p.key]??"")},p.key))},C?C(n):k))})]})})}const V=50;function nt(){const[e,o]=l.useState(null),[T,f]=l.useState(!0),[g,S]=l.useState([]),[C,v]=l.useState(0),[n,k]=l.useState(!1),[p,N]=l.useState(!0),[x,H]=l.useState(0),[u,D]=l.useState(""),[B,E]=l.useState([]),[U,A]=l.useState(0),[O,d]=l.useState(!1),[$,F]=l.useState(!0),[b,j]=l.useState(0),L=l.useRef(null),y=l.useCallback(async()=>{f(!0);try{const m=await R.get("/api/dashboard/tool-stats");o(m)}catch{}finally{f(!1)}},[]),t=l.useCallback(async(m,_)=>{N(!0);try{const K={limit:String(V),offset:String(m)};_&&(K.tool=_);const W=await R.get("/api/dashboard/history",K);S(W.entries),v(W.total),k(W.hasMore)}catch{S([]),v(0),k(!1)}finally{N(!1)}},[]),r=l.useCallback(async m=>{F(!0);try{const _=await R.get("/api/dashboard/failures",{limit:String(V),offset:String(m)});E(_.entries),A(_.total),d(_.hasMore)}catch{E([]),A(0),d(!1)}finally{F(!1)}},[]),i=l.useCallback(()=>{y(),t(x,u),r(b)},[y,t,r,x,u,b]),h=l.useCallback(async()=>{await R.post("/api/dashboard/tools/history/clear"),t(x,u),r(b)},[t,r,x,u,b]),c=l.useCallback(async()=>{await R.post("/api/dashboard/tools/statistics/clear"),y()},[y]);return l.useEffect(()=>{y()},[y]),l.useEffect(()=>{t(x,u)},[t,x,u]),l.useEffect(()=>{r(b)},[r,b]),l.useEffect(()=>{const m=new Z;L.current=m,m.connect();const _=m.on("command",()=>{y(),t(x,u),r(b)});return()=>{_(),m.disconnect(),L.current=null}},[y,t,r,x,u,b]),{statistics:e,statsLoading:T,history:g,historyTotal:C,historyHasMore:n,historyLoading:p,historyOffset:x,historyToolFilter:u,setHistoryOffset:H,setHistoryToolFilter:D,failures:B,failuresTotal:U,failuresHasMore:O,failuresLoading:$,failuresOffset:b,setFailuresOffset:j,refresh:i,clearHistory:h,clearStatistics:c}}const ct="_page_184r6_2",dt="_tabs_184r6_10",ut="_tab_184r6_10",pt="_tabActive_184r6_34",ht="_card_184r6_40",mt="_cardToolbar_184r6_47",xt="_sectionTitle_184r6_55",bt="_dangerButton_184r6_61",ft="_proBadge_184r6_71",_t="_statusOk_184r6_85",yt="_tierBasic_184r6_91",jt="_tierPro_184r6_95",gt="_tierMixed_184r6_100",St="_filterRow_184r6_111",Tt="_filterLabel_184r6_118",Ct="_filterSelect_184r6_127",Nt="_expandedRow_184r6_138",wt="_expandedSection_184r6_146",vt="_pre_184r6_156",kt="_pagination_184r6_173",Bt="_pageInfo_184r6_181",Mt="_btn_184r6_187",Pt="_tierDistribution_184r6_210",Et="_tierBarWrap_184r6_214",Lt="_tierBarBasic_184r6_222",Rt="_tierBarPro_184r6_227",Ht="_tierLabels_184r6_232",At="_statsTableWrap_184r6_241",Ot="_statsTable_184r6_241",$t="_sortableHeader_184r6_272",Ft="_sortArrow_184r6_277",It="_statsToolRow_184r6_281",Dt="_statsActionRow_184r6_289",Ut="_expandButton_184r6_293",Wt="_expandIcon_184r6_305",Gt="_actionLabel_184r6_310",Jt="_emptyStats_184r6_317",Kt="_summaryLine_184r6_323",a={page:ct,tabs:dt,tab:ut,tabActive:pt,card:ht,cardToolbar:mt,sectionTitle:xt,dangerButton:bt,proBadge:ft,statusOk:_t,tierBasic:yt,tierPro:jt,tierMixed:gt,filterRow:St,filterLabel:Tt,filterSelect:Ct,expandedRow:Nt,expandedSection:wt,pre:vt,pagination:kt,pageInfo:Bt,btn:Mt,tierDistribution:Pt,tierBarWrap:Et,tierBarBasic:Lt,tierBarPro:Rt,tierLabels:Ht,statsTableWrap:At,statsTable:Ot,sortableHeader:$t,sortArrow:Ft,statsToolRow:It,statsActionRow:Dt,expandButton:Ut,expandIcon:Wt,actionLabel:Gt,emptyStats:Jt,summaryLine:Kt},G=50;function Vt(e){const o=new Date(e);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function I(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function J(e,o){return o===0?"-":`${Math.round(e/o*100)}%`}function P(e,o){return o==="pro"?e("tier.pro","Pro"):o==="mixed"?e("tier.mixed","Mixed"):e("tier.basic","Basic")}function Yt(){const{t:e}=q(),o=nt(),{show:T}=z(),f=X(),[g,S]=l.useState("history"),[C,v]=l.useState(null),[n,k]=l.useState(null),[p,N]=l.useState(null),[x,H]=l.useState(!1),[u,D]=l.useState("totalCalls"),[B,E]=l.useState("desc"),U=l.useCallback(t=>{D(r=>r===t?(E(i=>i==="asc"?"desc":"asc"),t):(E("desc"),t))},[]),A=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.keys(o.statistics.tools).sort():[]},[o.statistics]),O=l.useMemo(()=>{var t;return(t=o.statistics)!=null&&t.tools?Object.values(o.statistics.tools).map(r=>{const i=Object.entries(r.actions??{}).map(([h,c])=>({toolName:r.toolName,actionName:c.action??h,tier:c.tier,totalCalls:c.totalCalls,successCount:c.successCount,failureCount:c.failureCount,totalExecutionTimeMs:c.totalExecutionTimeMs,avgExecutionTimeMs:c.avgExecutionTimeMs,firstUsed:c.firstUsed,lastUsed:c.lastUsed}));return{toolName:r.toolName,tier:r.tier,actions:i,totalCalls:r.totalCalls,successCount:r.successCount,failureCount:r.failureCount,totalExecutionTimeMs:r.totalExecutionTimeMs,avgExecutionTimeMs:r.avgExecutionTimeMs,firstUsed:r.firstUsed,lastUsed:r.lastUsed}}):[]},[o.statistics]),d=l.useCallback((t,r,i,h)=>s.jsx(w,{text:e(i,h),children:e(t,r)}),[e]),$=l.useMemo(()=>[...O].sort((r,i)=>{const h=r[u],c=i[u];if(typeof h=="number"&&typeof c=="number")return B==="asc"?h-c:c-h;const m=String(h??""),_=String(c??"");return B==="asc"?m.localeCompare(_):_.localeCompare(m)}),[O,u,B]),F=l.useMemo(()=>[{key:"timestamp",label:d("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:t=>Vt(t.timestamp)},{key:"toolName",label:d("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:t=>{var i;const r=((i=t.parameters)==null?void 0:i.action)??"";return s.jsxs("span",{children:[t.toolName,r?`.${r}`:"",t.tier==="pro"&&s.jsx(w,{text:e("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:a.proBadge,children:e("tools.badge.pro","PRO")})})]})}},{key:"executionTimeMs",label:d("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:t=>I(t.executionTimeMs)},{key:"status",label:d("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"60px",render:()=>s.jsx(w,{text:e("tools.status.ok.tooltip","The tool run completed successfully."),children:s.jsx("span",{className:a.statusOk,children:e("tools.status.ok","OK")})})},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:t=>s.jsx("span",{className:t.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,t.tier)})}],[e,d]),b=l.useMemo(()=>[{key:"toolName",label:d("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:d("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successRate",label:d("tools.col.okRate","OK%","tools.col.okRate.tooltip","Percentage of calls that finished successfully."),sortable:!1,width:"60px",render:t=>J(t.successCount,t.totalCalls)},{key:"avgExecutionTimeMs",label:d("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"80px",render:t=>I(t.avgExecutionTimeMs)},{key:"tier",label:d("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"60px",render:t=>s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})}],[e,d]),j=l.useMemo(()=>{if(!o.statistics)return null;const t=o.statistics.tierSummary.basic.totalCalls,r=o.statistics.tierSummary.pro.totalCalls,i=t+r;if(i===0)return null;const h=Math.round(t/i*100),c=100-h;return{basic:t,pro:r,total:i,basicPct:h,proPct:c}},[o.statistics]),L=l.useCallback(t=>{k(r=>r===t?null:t)},[]),y=l.useCallback(async()=>{if(p){H(!0);try{p==="history"?await o.clearHistory():await o.clearStatistics(),T(e("toast.clearSuccess","Cleared successfully"),"success"),N(null)}catch{T(e("toast.clearFailed","Failed to clear data"),"error")}finally{H(!1)}}},[p,T,e,o]);return s.jsxs("div",{className:a.page,children:[s.jsx("div",{className:a.tabs,children:["history","statistics"].map(t=>s.jsx("button",{className:`${a.tab} ${g===t?a.tabActive:""}`,onClick:()=>S(t),children:e(`tools.tab.${t}`,t.charAt(0).toUpperCase()+t.slice(1))},t))}),g==="history"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.history","History")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("history"),children:e("common.clear","Clear")})]}),s.jsx("div",{className:a.filterRow,children:s.jsxs("label",{className:a.filterLabel,children:[e("tools.filter.tool","Tool"),":",s.jsxs("select",{className:a.filterSelect,value:o.historyToolFilter,onChange:t=>{o.setHistoryToolFilter(t.target.value),o.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:e("tools.filter.all","All")}),A.map(t=>s.jsx("option",{value:t,children:t},t))]})]})}),s.jsx(it,{columns:F,data:o.history,rowKey:t=>t.id,onRowClick:t=>v(r=>r===t.id?null:t.id),emptyMessage:e("tools.empty.history","No history entries")}),C&&(()=>{const t=o.history.find(r=>r.id===C);return t?s.jsxs("div",{className:a.expandedRow,children:[s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:e("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&s.jsxs("div",{className:a.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(w,{text:e("tools.detail.result.tooltip","Returned result payload for this tool run."),children:e("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]})]}):null})(),s.jsxs("div",{className:a.pagination,children:[s.jsx("button",{className:a.btn,disabled:o.historyOffset===0,title:e("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>o.setHistoryOffset(Math.max(0,o.historyOffset-G)),children:e("tools.page.prev","Prev")}),s.jsxs("span",{className:a.pageInfo,children:[o.historyOffset+1,"–",Math.min(o.historyOffset+G,o.historyTotal)," / ",o.historyTotal]}),s.jsx("button",{className:a.btn,disabled:!o.historyHasMore,title:e("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>o.setHistoryOffset(o.historyOffset+G),children:e("tools.page.next","Next")})]})]}),g==="statistics"&&s.jsxs("div",{className:a.card,children:[s.jsxs("div",{className:a.cardToolbar,children:[s.jsx("div",{className:a.sectionTitle,children:e("tools.tab.statistics","Statistics")}),s.jsx("button",{className:a.dangerButton,onClick:()=>N("statistics"),children:e("common.clear","Clear")})]}),j&&s.jsxs("div",{className:a.tierDistribution,children:[s.jsxs("div",{className:a.tierBarWrap,children:[s.jsx("div",{className:a.tierBarBasic,style:{width:`${j.basicPct}%`}}),s.jsx("div",{className:a.tierBarPro,style:{width:`${j.proPct}%`}})]}),s.jsxs("div",{className:a.tierLabels,children:[s.jsxs("span",{children:[P(e,"basic")," ",j.basicPct,"% (",j.basic,")"]}),s.jsxs("span",{children:[P(e,"pro")," ",j.proPct,"% (",j.pro,")"]})]})]}),s.jsx("div",{className:a.statsTableWrap,children:s.jsxs("table",{className:a.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:b.map(t=>s.jsxs("th",{style:t.width?{width:t.width}:void 0,className:t.sortable?a.sortableHeader:void 0,onClick:t.sortable?()=>U(t.key):void 0,children:[s.jsx("span",{children:t.label}),t.sortable&&u===t.key&&s.jsx("span",{className:a.sortArrow,children:B==="asc"?"▴":"▾"})]},t.key))})}),s.jsx("tbody",{children:$.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:b.length,className:a.emptyStats,children:e("tools.empty.stats","No tool statistics")})}):$.map(t=>{const r=n===t.toolName;return s.jsxs(l.Fragment,{children:[s.jsxs("tr",{className:a.statsToolRow,onClick:()=>L(t.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":r,"aria-label":`${t.toolName} ${r?e("common.collapse","Collapse"):e("common.expand","Expand")}`,onClick:i=>{i.stopPropagation(),L(t.toolName)},children:[s.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:t.toolName})]})}),s.jsx("td",{children:t.totalCalls}),s.jsx("td",{children:J(t.successCount,t.totalCalls)}),s.jsx("td",{children:I(t.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(w,{text:t.tier==="mixed"?e("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:t.tier==="pro"?a.tierPro:t.tier==="mixed"?a.tierMixed:a.tierBasic,children:P(e,t.tier)})})})]}),r&&t.actions.map(i=>s.jsxs("tr",{className:a.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:a.actionLabel,children:i.actionName})}),s.jsx("td",{children:i.totalCalls}),s.jsx("td",{children:J(i.successCount,i.totalCalls)}),s.jsx("td",{children:I(i.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:i.tier==="pro"?a.tierPro:a.tierBasic,children:P(e,i.tier)})})]},`${t.toolName}:${i.actionName}`))]},t.toolName)})})]})}),o.statistics&&s.jsxs("div",{className:a.summaryLine,children:[e("tools.summary.total","Total"),": ",o.statistics.totalCalls," ",e("tools.summary.calls","calls")," | ",e("tools.summary.sessions","Sessions"),": ",o.statistics.totalSessions]})]}),!f.loading&&f.tier==="basic"&&s.jsx(tt,{basicCalls:f.basicCalls,proCalls:f.proCalls,totalCalls:f.totalCalls,proUsagePercent:f.proUsagePercent,upgradeHref:Y.tools}),s.jsx(Q,{open:p!==null,title:p==="history"?e("tools.clear.history.title","Clear history?"):e("tools.clear.statistics.title","Clear statistics?"),message:p==="history"?e("tools.clear.history.message","This permanently removes the current place tool history and failures."):e("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:x,onCancel:()=>!x&&N(null),onConfirm:y})]})}export{Yt as Component};
|
package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{index-DGGmfli1.js → index-OH9mpHwW.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OverviewPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OverviewPage-BdF0Ve7h.js","assets/InfoLabel-CLvjiyTG.js","assets/StatusBadge-A9U9m2LQ.js","assets/StatusBadge-C2zYt5iE.css","assets/PropertyDiff-BnOZxkTS.js","assets/PropertyDiff-Cbx8P1zh.css","assets/TierComparison-BA_L4c9p.js","assets/TierComparison-DGh9vLz0.css","assets/useLiveUptime-Df1ECedb.js","assets/TierPromoProgress-Dq6ofjr2.js","assets/TierPromo.module-CAoUYgIx.js","assets/TierPromo-D5n9OoEm.css","assets/OverviewPage-Dsfl-NRT.css","assets/ConnectionPage-CjLtImxr.js","assets/ConfirmModal-Dtak3Vnq.js","assets/ConnectionPage-CN3LYLAT.css","assets/SyncPage-BAS0cXRM.js","assets/SyncPage-CLt9jxd8.css","assets/ChangelogPage-oNm6ratx.js","assets/ChangelogPage-BH87M2hn.css","assets/PlaytestPage-cQMWlAOS.js","assets/PlaytestPage-CYSu0pfO.css","assets/ToolsPage-C_tMIyix.js","assets/ToolsPage-BZZZ3FXe.css","assets/ChangelogDetailPage-CGK59Jsx.js","assets/ChangelogDetailPage-D6Tqz7ut.css","assets/SettingsPage-C-QX0AY-.js","assets/SettingsPage-DTv0NbEY.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Zf=Object.defineProperty;var eg=(a,i,s)=>i in a?Zf(a,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[i]=s;var xn=(a,i,s)=>eg(a,typeof i!="symbol"?i+"":i,s);function Wd(a,i){for(var s=0;s<i.length;s++){const c=i[s];if(typeof c!="string"&&!Array.isArray(c)){for(const d in c)if(d!=="default"&&!(d in a)){const p=Object.getOwnPropertyDescriptor(c,d);p&&Object.defineProperty(a,d,p.get?p:{enumerable:!0,get:()=>c[d]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const f of p.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&c(f)}).observe(document,{childList:!0,subtree:!0});function s(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function c(d){if(d.ep)return;d.ep=!0;const p=s(d);fetch(d.href,p)}})();function Hd(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ss={exports:{}},$a={},cs={exports:{}},Pe={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -126,4 +126,4 @@ Ini adalah pratinjau sampel. Upgrade ke Pro untuk menjalankan playtest langsung
|
|
|
126
126
|
[sample] proteksi spawn aktif
|
|
127
127
|
[sample] hitung mundur hud dirender
|
|
128
128
|
[sample] wave pertama selesai
|
|
129
|
-
[sample] laporan pratinjau selesai`},hm=["en","ko","es","pt-br","ja","id"],Mo="auto",ys={en:cm,ko:um,es:dm,"pt-br":pm,ja:fm,id:gm},vi="dashboard-locale";function bs(a){return hm.includes(a)}function mm(){const i=((typeof navigator<"u"?navigator.language:"en")??"en").toLowerCase();return i==="ko"||i.startsWith("ko-")?"ko":i==="pt-br"?"pt-br":i==="ja"||i.startsWith("ja-")?"ja":i==="es"||i.startsWith("es-")?"es":i==="id"||i.startsWith("id-")?"id":"en"}function zd(){if(typeof localStorage<"u"){const a=localStorage.getItem(vi);if(a===Mo)return Mo;if(a&&bs(a))return a}return Mo}function Ad(a){return a===Mo?mm():a}const up=T.createContext(null);function ym({children:a}){const[i,s]=T.useState(zd),[c,d]=T.useState(()=>Ad(zd())),p=T.useCallback((m,h)=>{const S=ys[c]??ys.en??{};if(m in S)return S[m];const b=ys.en;return b&&m in b?b[m]:h!==void 0?h:m},[c]),f=T.useCallback(m=>{typeof localStorage<"u"&&(m===Mo?localStorage.removeItem(vi):bs(m)?localStorage.setItem(vi,m):localStorage.setItem(vi,"en"));const h=m===Mo?Mo:bs(m)?m:"en";s(h),d(Ad(h))},[]);return T.createElement(up.Provider,{value:{locale:c,selectedLocale:i,t:p,setLocale:f}},a)}function Ci(){const a=T.useContext(up);if(!a)throw new Error("useLocale must be used within a LocaleProvider");return a}const vm="_container_10isu_2",Sm="_toast_10isu_14",wm="_slideIn_10isu_1",km="_success_10isu_39",Pm="_info_10isu_44",Rm="_warning_10isu_49",bm="_error_10isu_54",vs={container:vm,toast:Sm,slideIn:wm,success:km,info:Pm,warning:Rm,error:bm},dp=T.createContext(null),xm=3e3;function Cm({children:a}){const[i,s]=T.useState([]),c=T.useRef(0),d=T.useCallback((p,f="info")=>{const m=c.current++;s(h=>[...h,{id:m,message:p,type:f}]),setTimeout(()=>{s(h=>h.filter(S=>S.id!==m))},xm)},[]);return A.jsxs(dp.Provider,{value:{show:d},children:[a,A.jsx("div",{className:vs.container,children:i.map(p=>A.jsx("div",{className:`${vs.toast} ${vs[p.type]}`,children:p.message},p.id))})]})}function pp(){const a=T.useContext(dp);return a||{show:()=>{}}}function jm(){const{level:a}=Ds(),{show:i}=pp(),{t:s}=Ci(),c=T.useRef(null);return T.useEffect(()=>{const d=c.current;c.current=a,d!==null&&d!==a&&(d==="disconnected"&&a==="serverOnly"?i(s("toast.serverConnected","MCP 서버 연결됨"),"success"):d==="serverOnly"&&a==="studioConnected"?i(s("toast.pluginConnected","플러그인 연결됨"),"success"):(d==="serverOnly"||d==="studioConnected")&&a==="disconnected"?i(s("toast.serverDisconnected","MCP 서버 연결 끊김"),"error"):d==="studioConnected"&&a==="serverOnly"&&i(s("toast.pluginDisconnected","플러그인 연결 끊김"),"warning"))},[a,i,s]),null}const _m="_wrapper_1uzud_2",Em="_tooltip_1uzud_8",Tm="_tooltipLeft_1uzud_30",Mm="_tooltipRight_1uzud_35",gi={wrapper:_m,tooltip:Em,tooltipLeft:Tm,tooltipRight:Mm};function Ri({text:a,children:i}){const s=T.useRef(null),[c,d]=T.useState("center"),p=a.trim();if(!p)return A.jsx(A.Fragment,{children:i});const f=T.useCallback(()=>{d("center"),window.requestAnimationFrame(()=>{const m=s.current;if(!m)return;const h=m.getBoundingClientRect(),S=8;if(h.left<S){d("left");return}h.right>window.innerWidth-S&&d("right")})},[]);return A.jsxs("span",{className:gi.wrapper,title:p,onMouseEnter:f,children:[i,A.jsx("span",{ref:s,className:[gi.tooltip,c==="left"?gi.tooltipLeft:"",c==="right"?gi.tooltipRight:""].filter(Boolean).join(" "),"data-placement":c,children:p})]})}function Lm(a){return a==="gumroad"?"gumroad":void 0}function Dm(a){if(!a||typeof a!="object")return!1;const i=a.status;return(a.tier==="basic"||a.tier==="pro")&&(i==="active"||i==="grace"||i==="invalid"||i==="revoked"||i==="unlicensed"||i==="unknown")}function fp(a){return a&&typeof a=="object"&&"data"in a&&a.data?a.data:a}function gp(a){if(!a||typeof a!="object")return null;if(Dm(a))return a;const i=a;if(typeof i.canUsePro!="boolean"||typeof i.status!="string"||i.status!=="active"&&i.status!=="grace"&&i.status!=="invalid"&&i.status!=="revoked"&&i.status!=="unlicensed"&&i.status!=="unknown")return null;const s=Lm(i.provider);return{tier:i.canUsePro?"pro":"basic",status:i.status,...typeof i.statusDetail=="string"?{statusDetail:i.statusDetail}:{},...typeof i.maskedKey=="string"?{maskedKey:i.maskedKey}:{},...s?{provider:s}:{},refreshRequired:i.refreshRequired===!0,...typeof i.refreshBlockedReason=="string"?{refreshBlockedReason:i.refreshBlockedReason}:{}}}async function Om(a="gumroad"){const i=await fn.get("/api/dashboard/license/status",{provider:a});return gp(fp(i))}function Os(a){const i=fp(a),s=i,c=gp(i),d=typeof(s==null?void 0:s.reasonCode)=="string"?s.reasonCode:void 0;return{ok:(s==null?void 0:s.ok)===!0,license:c?{...c,refreshRequired:c.refreshRequired||d==="missing_session_token",refreshBlockedReason:c.refreshBlockedReason??(d==="missing_session_token"?"missing_session_token":void 0)}:null,message:typeof(s==null?void 0:s.message)=="string"?s.message:null,reasonCode:d,recoverable:(s==null?void 0:s.recoverable)===!0}}async function iv(a){const i=a.provider??"gumroad",s=await fn.post("/api/dashboard/license/activate",{provider:i,licenseKey:a.licenseKey,clientType:"dashboard"});return Os(s)}async function lv(a={}){const i=a.provider??"gumroad",s=await fn.post("/api/dashboard/license/refresh",{provider:i,clientType:"dashboard"});return Os(s)}async function sv(a={}){const i=a.provider??"gumroad",s=await fn.post("/api/dashboard/license/reset",{provider:i,clientType:"dashboard"});return Os(s)}class zm{constructor(i){xn(this,"source",null);xn(this,"handlers",new Map);xn(this,"reconnectTimer",null);xn(this,"url");this.url=i??`${xi}/api/dashboard/events`}connect(){this.disconnect(),this.source=new EventSource(this.url),this.source.onopen=()=>{this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)},this.source.onerror=()=>{var s;(s=this.source)==null||s.close(),this.source=null,this.scheduleReconnect()};const i=["connection","sync","command","game_change","mcp_status","license"];for(const s of i)this.source.addEventListener(s,c=>{var p;const d=JSON.parse(c.data);(p=this.handlers.get(s))==null||p.forEach(f=>f(d))})}on(i,s){return this.handlers.has(i)||this.handlers.set(i,new Set),this.handlers.get(i).add(s),()=>{var c;return(c=this.handlers.get(i))==null?void 0:c.delete(s)}}disconnect(){var i;(i=this.source)==null||i.close(),this.source=null,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}get connected(){var i;return((i=this.source)==null?void 0:i.readyState)===EventSource.OPEN}scheduleReconnect(){this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},tm))}}const hp=[{labelKey:"sidebar.overview",route:"/",icon:"📊",minLevel:"disconnected",lazy:()=>oo(()=>import("./OverviewPage-BHpt3LI2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))},{labelKey:"sidebar.connection",route:"/connection",icon:"🔗",minLevel:"disconnected",lazy:()=>oo(()=>import("./ConnectionPage-CiaCY026.js"),__vite__mapDeps([13,1,2,3,14,8,15]))},{labelKey:"sidebar.sync",route:"/sync",icon:"🔄",minLevel:"serverOnly",lazy:()=>oo(()=>import("./SyncPage-DTSKbpio.js"),__vite__mapDeps([16,1,14,2,3,6,7,10,11,17]))},{labelKey:"sidebar.changelog",route:"/changelog",icon:"📋",minLevel:"serverOnly",lazy:()=>oo(()=>import("./ChangelogPage-DFCCRyyK.js"),__vite__mapDeps([18,14,6,7,10,11,19]))},{labelKey:"sidebar.playtest",route:"/playtest",icon:"🎮",minLevel:"serverOnly",lazy:()=>oo(()=>import("./PlaytestPage-CNwwI5Ro.js"),__vite__mapDeps([20,6,7,1,14,21]))},{labelKey:"sidebar.tools",route:"/tools",icon:"🔧",minLevel:"serverOnly",lazy:()=>oo(()=>import("./ToolsPage-CrdNh3D9.js"),__vite__mapDeps([22,14,6,7,9,10,11,23]))}],Am="_sidebar_1p82f_2",Nm="_brand_1p82f_17",Im="_brandIcon_1p82f_26",Fm="_brandText_1p82f_32",Bm="_brandTextPro_1p82f_43",Um="_nav_1p82f_49",Wm="_navLink_1p82f_57",Hm="_active_1p82f_78",Vm="_disabled_1p82f_85",qm="_icon_1p82f_96",Xm="_label_1p82f_107",en={sidebar:Am,brand:Nm,brandIcon:Im,brandText:Fm,brandTextPro:Bm,nav:Um,navLink:Wm,active:Hm,disabled:Vm,icon:qm,label:Xm},Nd={disconnected:0,serverOnly:1,studioConnected:2};function Km(a,i){return Nd[a]>=Nd[i]}function $m(a,i){return a==="serverOnly"?i("sidebar.gate.l1","MCP server connection required"):a==="studioConnected"?i("sidebar.gate.l2","Roblox Studio plugin connection required"):""}function Qm({item:a}){const{level:i}=Ds(),{t:s}=Ci(),c=Km(i,a.minLevel),d=A.jsxs(Qh,{to:a.route,end:a.route==="/",className:({isActive:p})=>[en.navLink,p?en.active:"",c?"":en.disabled].filter(Boolean).join(" "),onClick:p=>{c||p.preventDefault()},children:[A.jsx("span",{className:en.icon,children:a.icon}),A.jsx("span",{className:en.label,children:s(a.labelKey)})]});return c?d:A.jsx(Ri,{text:$m(a.minLevel,s),children:d})}function Gm(){const[a,i]=T.useState("basic");return T.useEffect(()=>{let s=!1;async function c(){try{const f=await Om("gumroad");!s&&(f!=null&&f.tier)&&i(f.tier)}catch{s||i("basic")}}c();const d=new zm;d.connect();const p=d.on("license",()=>{c()});return()=>{s=!0,p(),d.disconnect()}},[]),A.jsxs("aside",{className:en.sidebar,children:[A.jsxs("div",{className:en.brand,children:[A.jsx("span",{className:en.brandIcon,children:"◈"}),A.jsx("span",{"data-testid":"sidebar-brand-text",className:[en.brandText,a==="pro"?en.brandTextPro:""].filter(Boolean).join(" "),children:"WROX"})]}),A.jsx("nav",{className:en.nav,children:hp.map(s=>A.jsx(Qm,{item:s},s.route))})]})}async function Ym(){return fn.get("/api/dashboard/place-summary")}async function Jm(){return fn.get("/api/dashboard/sync-root")}async function Zm(){return fn.post("/api/dashboard/sync-root/pick")}async function ey(a){return fn.patch("/api/dashboard/sync-root",{projectRoot:a})}const ty="_backdrop_1ct9h_1",ny="_modal_1ct9h_11",oy="_title_1ct9h_20",ay="_message_1ct9h_26",ry="_actions_1ct9h_32",iy="_cancelButton_1ct9h_39",ly="_confirmButton_1ct9h_40",pn={backdrop:ty,modal:ny,title:oy,message:ay,actions:ry,cancelButton:iy,confirmButton:ly};function Ss(a,i){return A.jsxs("div",{style:{display:"grid",gap:6},children:[A.jsx("span",{style:{fontSize:12,fontWeight:700,color:"#9fb0cb"},children:a}),A.jsx("code",{style:{display:"block",overflowWrap:"anywhere",padding:"10px 12px",borderRadius:12,border:"1px solid rgba(162, 179, 207, 0.2)",background:"rgba(10, 15, 25, 0.72)",color:"#f4f7fb",fontSize:12,lineHeight:1.5},children:i})]})}function sy(a){const s=/^[A-Z]:\\/i.test(a)||a.includes("\\")?"\\":"/";return`${a.replace(/[\\/]+$/,"")}${s}wrox-project-sync`}function cy({open:a,step:i,selectedProjectRoot:s,studioConnected:c,loading:d=!1,errorMessage:p=null,onClose:f,onPick:m,onApply:h}){const{t:S}=Ci();if(!a)return null;const b=s?sy(s):"";return A.jsx("div",{className:pn.backdrop,onClick:d?void 0:f,role:"presentation",children:A.jsxs("div",{className:pn.modal,onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"project-root-change-modal-title",children:[A.jsx("h2",{id:"project-root-change-modal-title",className:pn.title,children:i==="initial"?S("header.projectRootModal.initial.title","Change project root"):S("header.projectRootModal.confirm.title","Confirm new project root")}),A.jsx("p",{className:pn.message,children:i==="initial"?c?S("header.projectRootModal.initial.body.connected","MCP will switch to the new project root and resync current Studio contents into the new target."):S("header.projectRootModal.initial.body.disconnected","MCP will switch to the new project root and use the new folder as the next sync target."):S("header.projectRootModal.confirm.body","Review the selected project folder before applying.")}),A.jsxs("div",{style:{display:"grid",gap:14,marginTop:18},children:[i==="initial"?A.jsxs(A.Fragment,{children:[Ss(S("header.projectRootModal.initial.nextSyncRoot","New sync target after selection"),S("header.projectRootModal.initial.nextSyncRoot.placeholder","<selected project folder>/wrox-project-sync")),A.jsxs("ul",{style:{margin:0,paddingLeft:18,color:"#c8d2e3",lineHeight:1.6},children:[c?A.jsxs(A.Fragment,{children:[A.jsx("li",{children:S("header.projectRootModal.initial.warningStop","Current sync stops immediately.")}),A.jsx("li",{children:S("header.projectRootModal.initial.warningFreshSync","The current Studio contents will be used to build a fresh full sync in the new target.")})]}):A.jsx("li",{children:S("header.projectRootModal.initial.warningDeferredSync","If Studio is not connected, full resync starts the next time the plugin connects.")}),A.jsx("li",{children:S("header.projectRootModal.initial.warningNoMove","Old sync folders are not moved automatically.")})]})]}):A.jsxs(A.Fragment,{children:[Ss(S("header.projectRootModal.confirm.projectRoot","Selected project folder"),s??""),Ss(S("header.projectRootModal.confirm.syncRoot","New sync target"),b),A.jsx("p",{className:pn.message,children:S("header.projectRootModal.confirm.warningNoMove","Existing sync folders are not moved automatically.")})]}),p?A.jsx("p",{className:pn.message,style:{marginTop:0,color:"#ffb3b3"},children:p}):null]}),A.jsxs("div",{className:pn.actions,children:[A.jsx("button",{className:pn.cancelButton,onClick:f,disabled:d,children:S("header.projectRootModal.cancel","Cancel")}),i==="initial"?A.jsx("button",{className:pn.confirmButton,onClick:m,disabled:d,children:d?"...":S("header.projectRootModal.pick","Choose folder")}):A.jsx("button",{className:pn.confirmButton,onClick:h,disabled:d||!s,children:d?"...":S("header.projectRootModal.apply","Apply change")})]})]})})}function hi({text:a,children:i}){return A.jsx(Ri,{text:a,children:i})}const uy="_header_ebyz6_2",dy="_projectBlock_ebyz6_14",py="_projectTitleRow_ebyz6_21",fy="_label_ebyz6_28",gy="_projectName_ebyz6_37",hy="_projectActions_ebyz6_45",my="_projectMetaRow_ebyz6_62",yy="_projectMetaLabel_ebyz6_70",vy="_projectMetaValue_ebyz6_78",Sy="_placeBadge_ebyz6_87",wy="_placeBadgeMuted_ebyz6_102",ky="_placeIcon_ebyz6_106",Py="_placeSection_ebyz6_110",Ry="_placeSectionHeader_ebyz6_116",by="_placeNotice_ebyz6_123",xy="_routeNotice_ebyz6_124",Cy="_placeList_ebyz6_137",jy="_placeCard_ebyz6_143",_y="_placeCardCurrent_ebyz6_151",Ey="_placeCardTop_ebyz6_156",Ty="_placeCardName_ebyz6_163",My="_placeCardBadge_ebyz6_169",Ly="_placeCardBadgeActive_ebyz6_179",Dy="_placeCardBadgeInactive_ebyz6_184",Oy="_placeCardMeta_ebyz6_189",zy="_actions_ebyz6_196",Ay="_iconButton_ebyz6_202",Ny="_changeButton_ebyz6_235",ze={header:uy,projectBlock:dy,projectTitleRow:py,label:fy,projectName:gy,projectActions:hy,projectMetaRow:my,projectMetaLabel:yy,projectMetaValue:vy,placeBadge:Sy,placeBadgeMuted:wy,placeIcon:ky,placeSection:Py,placeSectionHeader:Ry,placeNotice:by,routeNotice:xy,placeList:Cy,placeCard:jy,placeCardCurrent:_y,placeCardTop:Ey,placeCardName:Ty,placeCardBadge:My,placeCardBadgeActive:Ly,placeCardBadgeInactive:Dy,placeCardMeta:Oy,actions:zy,iconButton:Ay,changeButton:Ny};function Id(a){if(!a)return"";const i=a.split(/[\\/]/).filter(Boolean);return i[i.length-1]??""}function Iy(a){var c,d;const i=((c=a==null?void 0:a.mcpInstances)==null?void 0:c.filter(p=>!p.isServer&&p.aiClientName))??[];if(i.length===0){const p=((d=a==null?void 0:a.mcpInstances)==null?void 0:d.find(f=>!!f.aiClientName))??null;return(p==null?void 0:p.projectRoot)??(p==null?void 0:p.cwd)??null}i.sort((p,f)=>(f.lastCommandAt??f.connectedAt)-(p.lastCommandAt??p.connectedAt));const s=i[0];return s.projectRoot??s.cwd??null}function Fy(a,i,s){return a??i??s}function By(a){const i=a.replace(/^\//,"").split("/")[0];return i===""||i==="overview"}function Uy(a){return a.replace(/^\//,"").split("/")[0]==="sync"}function Wy(a){return a.replace(/^\//,"").split("/")[0]==="playtest"}function Hy(a){return a.replace(/^\//,"").split("/")[0]==="changelog"}function Fd(a,i){if(a&&typeof a=="object"&&"message"in a&&typeof a.message=="string"){const s=a.message.trim();if(s.length>0)return s}return i}function Vy(){var lo,Mt,Mn,so;const{pathname:a}=Do(),{level:i,status:s}=Ds(),{t:c}=Ci(),{show:d}=pp(),[p,f]=T.useState(null),[m,h]=T.useState(null),[S,b]=T.useState(null),[x,M]=T.useState(!1),[I,H]=T.useState(null),[F,W]=T.useState(null),[ge,X]=T.useState(!1),[ue,re]=T.useState(!1),[be,_e]=T.useState(null),_=c("header.placeNotConnected","Place not connected"),Y=By(a),ke=Uy(a),ie=Wy(a),Ue=Hy(a);T.useEffect(()=>{let me=!1;async function Ze(){if(i==="disconnected"){f(null);return}try{const at=await fn.get("/connection-info");me||f(at)}catch{me||f(null)}}return Ze(),()=>{me=!0}},[i,s==null?void 0:s.sessionId,s==null?void 0:s.connectedClients]),T.useEffect(()=>{let me=!1;async function Ze(){if(i==="disconnected"){h(null),M(!1);return}h(null),M(!1);try{const at=await Jm();me||(h(at),M(!1))}catch{me||(h(null),M(!0))}}return Ze(),()=>{me=!0}},[Y,i,s==null?void 0:s.sessionId,s==null?void 0:s.connectedClients]),T.useEffect(()=>{let me=!1;async function Ze(){if(i==="disconnected"){b(null);return}try{const at=await Ym();me||b(at)}catch{me||b(null)}}return Ze(),()=>{me=!0}},[i,s==null?void 0:s.sessionId,s==null?void 0:s.connectedClients]);const Te=Iy(p)??"",pe=i==="disconnected"?"blocked":m?"ready":x?"error":"loading",We=pe==="ready"?(m==null?void 0:m.projectRoot)??"":pe==="loading"?c("header.currentProject.loading","Loading project root..."):c("header.currentProject.unavailable","Project root unavailable"),Ge=pe==="ready"?(m==null?void 0:m.projectRoot)??"":Y?"":Te,tt=Y||pe==="ready"?pe==="ready"?Id(Ge)||c("header.unknownProject","Unknown project"):pe==="loading"?c("header.currentProject.loading","Loading project root..."):c("header.currentProject.unavailable","Project root unavailable"):Id(Ge)||c("header.unknownProject","Unknown project"),Ae=Fy((Mt=(lo=s==null?void 0:s.pluginClients)==null?void 0:lo[0])==null?void 0:Mt.placeName,(so=(Mn=s==null?void 0:s.pluginClients)==null?void 0:Mn[0])==null?void 0:so.projectName,_),B=Ae===_?c("header.placeNotConnected.tooltip","Place not connected"):c("header.place.tooltip","Connected Roblox place"),oe=S!=null&&S.pluginConnected?S.activePlaceId:(S==null?void 0:S.lastActivePlaceId)??null,q=[...(S==null?void 0:S.places)??[]].sort((me,Ze)=>{const at=me.placeId===oe,co=Ze.placeId===oe;return at!==co?at?-1:1:me.isConnected!==Ze.isConnected?me.isConnected?-1:1:me.placeName.localeCompare(Ze.placeName)}),k=q.find(me=>me.placeId===oe)??null,L=Y?pe==="loading"?c("header.currentProject.loading.tooltip","Project root information is still loading"):pe==="error"?c("header.currentProject.unavailable.tooltip","Current project root information is unavailable"):c("header.currentProject.tooltip","Currently selected project folder"):c("header.currentProject.tooltip","Currently selected project folder"),de=pe==="ready"?(m==null?void 0:m.projectSyncRoot)??"":pe==="loading"?c("header.currentProjectSyncRoot.loading","Loading sync root..."):c("header.currentProjectSyncRoot.unavailable","Sync root unavailable"),ye=pe==="loading"?c("header.currentProjectSyncRoot.loading.tooltip","Sync root information is still loading"):pe==="error"?c("header.currentProjectSyncRoot.unavailable.tooltip","Current sync root information is unavailable"):c("header.currentProjectSyncRoot.tooltip","Current sync root folder for the selected project"),he=pe==="ready"?(k==null?void 0:k.testsPath)??c("header.testFiles.unavailable","Test files unavailable"):pe==="loading"?c("header.currentProjectSyncRoot.loading","Loading sync root..."):c("header.testFiles.unavailable","Test files unavailable"),Se=pe==="ready"?c("header.testFiles.tooltip","Current playtest files directory for the selected place"):pe==="loading"?c("header.currentProjectSyncRoot.loading.tooltip","Sync root information is still loading"):c("header.currentProjectSyncRoot.unavailable.tooltip","Current sync root information is unavailable"),we=ke?{label:c("header.currentProjectSyncRoot.label","Sync Root"),value:de,tooltip:ye}:ie?{label:c("header.testFiles.label","Test Files"),value:he,tooltip:Se}:null,Ce=(ke||ie||Ue)&&(S==null?void 0:S.pluginConnected)===!1,Ne=i==="disconnected"||pe!=="ready",ft=i==="disconnected"?c("header.changeProjectRoot.disabledTooltip.l0","MCP server connection required before project root can be changed"):pe==="loading"?c("header.changeProjectRoot.disabledTooltip.loading","Project root information is still loading"):pe==="error"?c("header.changeProjectRoot.disabledTooltip.unavailable","Current project root information is unavailable"):c("header.changeProjectRoot.tooltip","Change the current project root"),tn=(me=!1)=>{!me&&(ge||ue)||(H(null),W(null),_e(null))},ot=()=>{Ne||(_e(null),W(null),H("initial"))},Tt=async()=>{X(!0),_e(null);try{const me=await Zm();if(me.cancelled||!me.projectRoot){tn(!0);return}W(me.projectRoot),H("confirm")}catch(me){_e(Fd(me,c("header.projectRootModal.error","Failed to change project root")))}finally{X(!1)}},Tn=async()=>{if(F){re(!0),_e(null);try{const me=await ey(F);h(me),M(!1),tn(!0)}catch(me){const Ze=Fd(me,c("header.projectRootModal.error","Failed to change project root"));_e(Ze),d(Ze,"error")}finally{re(!1)}}};return A.jsxs(A.Fragment,{children:[A.jsxs("header",{className:ze.header,children:[A.jsxs("div",{className:ze.projectBlock,children:[A.jsx("span",{className:ze.label,children:c("header.currentProject","Current Project")}),A.jsxs("div",{className:ze.projectTitleRow,children:[A.jsx("strong",{className:ze.projectName,children:A.jsx(hi,{text:L,children:tt})}),A.jsx("div",{className:ze.projectActions,children:A.jsx(Ri,{text:ft,children:A.jsx("span",{children:A.jsx("button",{type:"button",className:ze.changeButton,onClick:ot,disabled:Ne,children:c("header.changeProjectRoot","Change Project Root")})})})})]}),A.jsxs("span",{className:ze.projectMetaRow,children:[A.jsx(hi,{text:c("header.currentProject.tooltip","Currently selected project folder"),children:A.jsx("span",{className:ze.projectMetaLabel,children:c("header.projectRoot.label","Project Root")})}),A.jsx("span",{className:ze.projectMetaValue,children:We})]}),we?A.jsxs("span",{className:ze.projectMetaRow,children:[A.jsx(hi,{text:we.tooltip,children:A.jsx("span",{className:ze.projectMetaLabel,children:we.label})}),A.jsx("span",{className:ze.projectMetaValue,children:we.value})]}):null,A.jsxs("div",{className:ze.placeSection,children:[A.jsxs("div",{className:ze.placeSectionHeader,children:[A.jsx("span",{className:ze.projectMetaLabel,children:c("header.places.title","Places")}),S!=null&&S.pluginConnected?null:A.jsx("span",{className:ze.placeNotice,children:c("header.places.pluginRequired","Plugin connection required")})]}),A.jsx("div",{className:ze.placeList,children:q.length>0?q.map(me=>{const Ze=me.placeId===oe,at=S!=null&&S.pluginConnected&&me.isConnected?c("header.places.active","Active"):c("header.places.inactive","Inactive");return A.jsxs("div",{className:[ze.placeCard,Ze?ze.placeCardCurrent:""].filter(Boolean).join(" "),title:`${me.placeName} (${at})`,children:[A.jsxs("div",{className:ze.placeCardTop,children:[A.jsx("span",{className:ze.placeCardName,children:me.placeName}),A.jsx("span",{className:[ze.placeCardBadge,S!=null&&S.pluginConnected&&me.isConnected?ze.placeCardBadgeActive:ze.placeCardBadgeInactive].join(" "),children:at})]}),A.jsx("div",{className:ze.placeCardMeta,children:`place_${me.placeId}`})]},`${me.placeId}:${me.placeDirName}`)}):A.jsx(hi,{text:B,children:A.jsxs("span",{className:[ze.placeBadge,Ae===_?ze.placeBadgeMuted:""].filter(Boolean).join(" "),children:[A.jsx("span",{className:ze.placeIcon,children:"🎮"}),A.jsx("span",{children:Ae})]})})}),Ce?A.jsx("div",{className:ze.routeNotice,children:c("header.places.liveRequired","Plugin connection required for live active place")}):null]})]}),A.jsx("div",{className:ze.actions,children:A.jsx(Ri,{text:c("sidebar.settings","Settings"),children:A.jsx(sp,{to:"/settings","aria-label":c("sidebar.settings","Settings"),className:ze.iconButton,children:"⚙️"})})})]}),A.jsx(cy,{open:I!==null,step:I??"initial",selectedProjectRoot:F,studioConnected:i==="studioConnected",loading:ge||ue,errorMessage:be,onClose:tn,onPick:Tt,onApply:Tn})]})}const qy=5e3,Xy=5;let sa=[],Bd=null;function mp(){if(sa.length===0)return;const a=sa.splice(0),i=`${xi}/api/dashboard/analytics`,s=JSON.stringify({events:a});fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).catch(()=>{})}function Ky(){Bd||(Bd=setInterval(mp,qy))}function Ud(a){sa.push(a),Ky(),sa.length>=Xy&&mp()}typeof window<"u"&&window.addEventListener("beforeunload",()=>{if(sa.length===0)return;const a=`${xi}/api/dashboard/analytics`,i=JSON.stringify({events:sa.splice(0)});navigator.sendBeacon(a,new Blob([i],{type:"application/json"}))});function $y(){const a=T.useCallback((s,c)=>{Ud({name:s,params:c})},[]),i=T.useCallback(s=>{Ud({name:"dashboard_page_view",params:{page:s}})},[]);return{trackEvent:a,trackPageView:i}}const Qy="_layout_ya8ln_2",Gy="_mainShell_ya8ln_8",Yy="_content_ya8ln_17",Jy="_loading_ya8ln_25",mi={layout:Qy,mainShell:Gy,content:Yy,loading:Jy};function Zy(a){return a.replace(/^\//,"").split("/")[0]||"overview"}function ev(){const{pathname:a}=Do(),{trackPageView:i}=$y();return T.useEffect(()=>{i(Zy(a))},[a,i]),null}function tv(){return A.jsx(ym,{children:A.jsx(Cm,{children:A.jsxs(sm,{children:[A.jsx(jm,{}),A.jsx(ev,{}),A.jsxs("div",{className:mi.layout,children:[A.jsx(Gm,{}),A.jsxs("div",{className:mi.mainShell,children:[A.jsx(Vy,{}),A.jsx("main",{className:mi.content,children:A.jsx(T.Suspense,{fallback:A.jsx("div",{className:mi.loading,children:"Loading..."}),children:A.jsx(_h,{})})})]})]})]})})})}function nv(a){return a.route==="/"?{index:!0,lazy:a.lazy}:{path:a.route.slice(1),lazy:a.lazy}}const ov=Ah([{path:"/",element:A.jsx(tv,{}),children:[...hp.map(nv),{path:"changelog/:id",lazy:()=>oo(()=>import("./ChangelogDetailPage-D7eMrarv.js"),__vite__mapDeps([24,1,4,5,25]))},{path:"settings",lazy:()=>oo(()=>import("./SettingsPage-CPqQYZPN.js"),__vite__mapDeps([26,1,27]))}]}]);sg.createRoot(document.getElementById("root")).render(A.jsx(Vh,{router:ov}));export{Mo as A,zm as D,hm as S,hi as T,fn as a,rv as b,dh as c,Ds as d,iv as e,Om as f,lv as g,sv as h,pp as i,A as j,$y as k,Do as l,Ri as m,T as r,pn as s,Ci as u};
|
|
129
|
+
[sample] laporan pratinjau selesai`},hm=["en","ko","es","pt-br","ja","id"],Mo="auto",ys={en:cm,ko:um,es:dm,"pt-br":pm,ja:fm,id:gm},vi="dashboard-locale";function bs(a){return hm.includes(a)}function mm(){const i=((typeof navigator<"u"?navigator.language:"en")??"en").toLowerCase();return i==="ko"||i.startsWith("ko-")?"ko":i==="pt-br"?"pt-br":i==="ja"||i.startsWith("ja-")?"ja":i==="es"||i.startsWith("es-")?"es":i==="id"||i.startsWith("id-")?"id":"en"}function zd(){if(typeof localStorage<"u"){const a=localStorage.getItem(vi);if(a===Mo)return Mo;if(a&&bs(a))return a}return Mo}function Ad(a){return a===Mo?mm():a}const up=T.createContext(null);function ym({children:a}){const[i,s]=T.useState(zd),[c,d]=T.useState(()=>Ad(zd())),p=T.useCallback((m,h)=>{const S=ys[c]??ys.en??{};if(m in S)return S[m];const b=ys.en;return b&&m in b?b[m]:h!==void 0?h:m},[c]),f=T.useCallback(m=>{typeof localStorage<"u"&&(m===Mo?localStorage.removeItem(vi):bs(m)?localStorage.setItem(vi,m):localStorage.setItem(vi,"en"));const h=m===Mo?Mo:bs(m)?m:"en";s(h),d(Ad(h))},[]);return T.createElement(up.Provider,{value:{locale:c,selectedLocale:i,t:p,setLocale:f}},a)}function Ci(){const a=T.useContext(up);if(!a)throw new Error("useLocale must be used within a LocaleProvider");return a}const vm="_container_10isu_2",Sm="_toast_10isu_14",wm="_slideIn_10isu_1",km="_success_10isu_39",Pm="_info_10isu_44",Rm="_warning_10isu_49",bm="_error_10isu_54",vs={container:vm,toast:Sm,slideIn:wm,success:km,info:Pm,warning:Rm,error:bm},dp=T.createContext(null),xm=3e3;function Cm({children:a}){const[i,s]=T.useState([]),c=T.useRef(0),d=T.useCallback((p,f="info")=>{const m=c.current++;s(h=>[...h,{id:m,message:p,type:f}]),setTimeout(()=>{s(h=>h.filter(S=>S.id!==m))},xm)},[]);return A.jsxs(dp.Provider,{value:{show:d},children:[a,A.jsx("div",{className:vs.container,children:i.map(p=>A.jsx("div",{className:`${vs.toast} ${vs[p.type]}`,children:p.message},p.id))})]})}function pp(){const a=T.useContext(dp);return a||{show:()=>{}}}function jm(){const{level:a}=Ds(),{show:i}=pp(),{t:s}=Ci(),c=T.useRef(null);return T.useEffect(()=>{const d=c.current;c.current=a,d!==null&&d!==a&&(d==="disconnected"&&a==="serverOnly"?i(s("toast.serverConnected","MCP 서버 연결됨"),"success"):d==="serverOnly"&&a==="studioConnected"?i(s("toast.pluginConnected","플러그인 연결됨"),"success"):(d==="serverOnly"||d==="studioConnected")&&a==="disconnected"?i(s("toast.serverDisconnected","MCP 서버 연결 끊김"),"error"):d==="studioConnected"&&a==="serverOnly"&&i(s("toast.pluginDisconnected","플러그인 연결 끊김"),"warning"))},[a,i,s]),null}const _m="_wrapper_1uzud_2",Em="_tooltip_1uzud_8",Tm="_tooltipLeft_1uzud_30",Mm="_tooltipRight_1uzud_35",gi={wrapper:_m,tooltip:Em,tooltipLeft:Tm,tooltipRight:Mm};function Ri({text:a,children:i}){const s=T.useRef(null),[c,d]=T.useState("center"),p=a.trim();if(!p)return A.jsx(A.Fragment,{children:i});const f=T.useCallback(()=>{d("center"),window.requestAnimationFrame(()=>{const m=s.current;if(!m)return;const h=m.getBoundingClientRect(),S=8;if(h.left<S){d("left");return}h.right>window.innerWidth-S&&d("right")})},[]);return A.jsxs("span",{className:gi.wrapper,title:p,onMouseEnter:f,children:[i,A.jsx("span",{ref:s,className:[gi.tooltip,c==="left"?gi.tooltipLeft:"",c==="right"?gi.tooltipRight:""].filter(Boolean).join(" "),"data-placement":c,children:p})]})}function Lm(a){return a==="gumroad"?"gumroad":void 0}function Dm(a){if(!a||typeof a!="object")return!1;const i=a.status;return(a.tier==="basic"||a.tier==="pro")&&(i==="active"||i==="grace"||i==="invalid"||i==="revoked"||i==="unlicensed"||i==="unknown")}function fp(a){return a&&typeof a=="object"&&"data"in a&&a.data?a.data:a}function gp(a){if(!a||typeof a!="object")return null;if(Dm(a))return a;const i=a;if(typeof i.canUsePro!="boolean"||typeof i.status!="string"||i.status!=="active"&&i.status!=="grace"&&i.status!=="invalid"&&i.status!=="revoked"&&i.status!=="unlicensed"&&i.status!=="unknown")return null;const s=Lm(i.provider);return{tier:i.canUsePro?"pro":"basic",status:i.status,...typeof i.statusDetail=="string"?{statusDetail:i.statusDetail}:{},...typeof i.maskedKey=="string"?{maskedKey:i.maskedKey}:{},...s?{provider:s}:{},refreshRequired:i.refreshRequired===!0,...typeof i.refreshBlockedReason=="string"?{refreshBlockedReason:i.refreshBlockedReason}:{}}}async function Om(a="gumroad"){const i=await fn.get("/api/dashboard/license/status",{provider:a});return gp(fp(i))}function Os(a){const i=fp(a),s=i,c=gp(i),d=typeof(s==null?void 0:s.reasonCode)=="string"?s.reasonCode:void 0;return{ok:(s==null?void 0:s.ok)===!0,license:c?{...c,refreshRequired:c.refreshRequired||d==="missing_session_token",refreshBlockedReason:c.refreshBlockedReason??(d==="missing_session_token"?"missing_session_token":void 0)}:null,message:typeof(s==null?void 0:s.message)=="string"?s.message:null,reasonCode:d,recoverable:(s==null?void 0:s.recoverable)===!0}}async function iv(a){const i=a.provider??"gumroad",s=await fn.post("/api/dashboard/license/activate",{provider:i,licenseKey:a.licenseKey,clientType:"dashboard"});return Os(s)}async function lv(a={}){const i=a.provider??"gumroad",s=await fn.post("/api/dashboard/license/refresh",{provider:i,clientType:"dashboard"});return Os(s)}async function sv(a={}){const i=a.provider??"gumroad",s=await fn.post("/api/dashboard/license/reset",{provider:i,clientType:"dashboard"});return Os(s)}class zm{constructor(i){xn(this,"source",null);xn(this,"handlers",new Map);xn(this,"reconnectTimer",null);xn(this,"url");this.url=i??`${xi}/api/dashboard/events`}connect(){this.disconnect(),this.source=new EventSource(this.url),this.source.onopen=()=>{this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)},this.source.onerror=()=>{var s;(s=this.source)==null||s.close(),this.source=null,this.scheduleReconnect()};const i=["connection","sync","command","game_change","mcp_status","license"];for(const s of i)this.source.addEventListener(s,c=>{var p;const d=JSON.parse(c.data);(p=this.handlers.get(s))==null||p.forEach(f=>f(d))})}on(i,s){return this.handlers.has(i)||this.handlers.set(i,new Set),this.handlers.get(i).add(s),()=>{var c;return(c=this.handlers.get(i))==null?void 0:c.delete(s)}}disconnect(){var i;(i=this.source)==null||i.close(),this.source=null,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}get connected(){var i;return((i=this.source)==null?void 0:i.readyState)===EventSource.OPEN}scheduleReconnect(){this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},tm))}}const hp=[{labelKey:"sidebar.overview",route:"/",icon:"📊",minLevel:"disconnected",lazy:()=>oo(()=>import("./OverviewPage-BdF0Ve7h.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))},{labelKey:"sidebar.connection",route:"/connection",icon:"🔗",minLevel:"disconnected",lazy:()=>oo(()=>import("./ConnectionPage-CjLtImxr.js"),__vite__mapDeps([13,1,2,3,14,8,15]))},{labelKey:"sidebar.sync",route:"/sync",icon:"🔄",minLevel:"serverOnly",lazy:()=>oo(()=>import("./SyncPage-BAS0cXRM.js"),__vite__mapDeps([16,1,14,2,3,6,7,10,11,17]))},{labelKey:"sidebar.changelog",route:"/changelog",icon:"📋",minLevel:"serverOnly",lazy:()=>oo(()=>import("./ChangelogPage-oNm6ratx.js"),__vite__mapDeps([18,14,6,7,10,11,19]))},{labelKey:"sidebar.playtest",route:"/playtest",icon:"🎮",minLevel:"serverOnly",lazy:()=>oo(()=>import("./PlaytestPage-cQMWlAOS.js"),__vite__mapDeps([20,6,7,1,14,21]))},{labelKey:"sidebar.tools",route:"/tools",icon:"🔧",minLevel:"serverOnly",lazy:()=>oo(()=>import("./ToolsPage-C_tMIyix.js"),__vite__mapDeps([22,14,6,7,9,10,11,23]))}],Am="_sidebar_1p82f_2",Nm="_brand_1p82f_17",Im="_brandIcon_1p82f_26",Fm="_brandText_1p82f_32",Bm="_brandTextPro_1p82f_43",Um="_nav_1p82f_49",Wm="_navLink_1p82f_57",Hm="_active_1p82f_78",Vm="_disabled_1p82f_85",qm="_icon_1p82f_96",Xm="_label_1p82f_107",en={sidebar:Am,brand:Nm,brandIcon:Im,brandText:Fm,brandTextPro:Bm,nav:Um,navLink:Wm,active:Hm,disabled:Vm,icon:qm,label:Xm},Nd={disconnected:0,serverOnly:1,studioConnected:2};function Km(a,i){return Nd[a]>=Nd[i]}function $m(a,i){return a==="serverOnly"?i("sidebar.gate.l1","MCP server connection required"):a==="studioConnected"?i("sidebar.gate.l2","Roblox Studio plugin connection required"):""}function Qm({item:a}){const{level:i}=Ds(),{t:s}=Ci(),c=Km(i,a.minLevel),d=A.jsxs(Qh,{to:a.route,end:a.route==="/",className:({isActive:p})=>[en.navLink,p?en.active:"",c?"":en.disabled].filter(Boolean).join(" "),onClick:p=>{c||p.preventDefault()},children:[A.jsx("span",{className:en.icon,children:a.icon}),A.jsx("span",{className:en.label,children:s(a.labelKey)})]});return c?d:A.jsx(Ri,{text:$m(a.minLevel,s),children:d})}function Gm(){const[a,i]=T.useState("basic");return T.useEffect(()=>{let s=!1;async function c(){try{const f=await Om("gumroad");!s&&(f!=null&&f.tier)&&i(f.tier)}catch{s||i("basic")}}c();const d=new zm;d.connect();const p=d.on("license",()=>{c()});return()=>{s=!0,p(),d.disconnect()}},[]),A.jsxs("aside",{className:en.sidebar,children:[A.jsxs("div",{className:en.brand,children:[A.jsx("span",{className:en.brandIcon,children:"◈"}),A.jsx("span",{"data-testid":"sidebar-brand-text",className:[en.brandText,a==="pro"?en.brandTextPro:""].filter(Boolean).join(" "),children:"WROX"})]}),A.jsx("nav",{className:en.nav,children:hp.map(s=>A.jsx(Qm,{item:s},s.route))})]})}async function Ym(){return fn.get("/api/dashboard/place-summary")}async function Jm(){return fn.get("/api/dashboard/sync-root")}async function Zm(){return fn.post("/api/dashboard/sync-root/pick")}async function ey(a){return fn.patch("/api/dashboard/sync-root",{projectRoot:a})}const ty="_backdrop_1ct9h_1",ny="_modal_1ct9h_11",oy="_title_1ct9h_20",ay="_message_1ct9h_26",ry="_actions_1ct9h_32",iy="_cancelButton_1ct9h_39",ly="_confirmButton_1ct9h_40",pn={backdrop:ty,modal:ny,title:oy,message:ay,actions:ry,cancelButton:iy,confirmButton:ly};function Ss(a,i){return A.jsxs("div",{style:{display:"grid",gap:6},children:[A.jsx("span",{style:{fontSize:12,fontWeight:700,color:"#9fb0cb"},children:a}),A.jsx("code",{style:{display:"block",overflowWrap:"anywhere",padding:"10px 12px",borderRadius:12,border:"1px solid rgba(162, 179, 207, 0.2)",background:"rgba(10, 15, 25, 0.72)",color:"#f4f7fb",fontSize:12,lineHeight:1.5},children:i})]})}function sy(a){const s=/^[A-Z]:\\/i.test(a)||a.includes("\\")?"\\":"/";return`${a.replace(/[\\/]+$/,"")}${s}wrox-project-sync`}function cy({open:a,step:i,selectedProjectRoot:s,studioConnected:c,loading:d=!1,errorMessage:p=null,onClose:f,onPick:m,onApply:h}){const{t:S}=Ci();if(!a)return null;const b=s?sy(s):"";return A.jsx("div",{className:pn.backdrop,onClick:d?void 0:f,role:"presentation",children:A.jsxs("div",{className:pn.modal,onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"project-root-change-modal-title",children:[A.jsx("h2",{id:"project-root-change-modal-title",className:pn.title,children:i==="initial"?S("header.projectRootModal.initial.title","Change project root"):S("header.projectRootModal.confirm.title","Confirm new project root")}),A.jsx("p",{className:pn.message,children:i==="initial"?c?S("header.projectRootModal.initial.body.connected","MCP will switch to the new project root and resync current Studio contents into the new target."):S("header.projectRootModal.initial.body.disconnected","MCP will switch to the new project root and use the new folder as the next sync target."):S("header.projectRootModal.confirm.body","Review the selected project folder before applying.")}),A.jsxs("div",{style:{display:"grid",gap:14,marginTop:18},children:[i==="initial"?A.jsxs(A.Fragment,{children:[Ss(S("header.projectRootModal.initial.nextSyncRoot","New sync target after selection"),S("header.projectRootModal.initial.nextSyncRoot.placeholder","<selected project folder>/wrox-project-sync")),A.jsxs("ul",{style:{margin:0,paddingLeft:18,color:"#c8d2e3",lineHeight:1.6},children:[c?A.jsxs(A.Fragment,{children:[A.jsx("li",{children:S("header.projectRootModal.initial.warningStop","Current sync stops immediately.")}),A.jsx("li",{children:S("header.projectRootModal.initial.warningFreshSync","The current Studio contents will be used to build a fresh full sync in the new target.")})]}):A.jsx("li",{children:S("header.projectRootModal.initial.warningDeferredSync","If Studio is not connected, full resync starts the next time the plugin connects.")}),A.jsx("li",{children:S("header.projectRootModal.initial.warningNoMove","Old sync folders are not moved automatically.")})]})]}):A.jsxs(A.Fragment,{children:[Ss(S("header.projectRootModal.confirm.projectRoot","Selected project folder"),s??""),Ss(S("header.projectRootModal.confirm.syncRoot","New sync target"),b),A.jsx("p",{className:pn.message,children:S("header.projectRootModal.confirm.warningNoMove","Existing sync folders are not moved automatically.")})]}),p?A.jsx("p",{className:pn.message,style:{marginTop:0,color:"#ffb3b3"},children:p}):null]}),A.jsxs("div",{className:pn.actions,children:[A.jsx("button",{className:pn.cancelButton,onClick:f,disabled:d,children:S("header.projectRootModal.cancel","Cancel")}),i==="initial"?A.jsx("button",{className:pn.confirmButton,onClick:m,disabled:d,children:d?"...":S("header.projectRootModal.pick","Choose folder")}):A.jsx("button",{className:pn.confirmButton,onClick:h,disabled:d||!s,children:d?"...":S("header.projectRootModal.apply","Apply change")})]})]})})}function hi({text:a,children:i}){return A.jsx(Ri,{text:a,children:i})}const uy="_header_ebyz6_2",dy="_projectBlock_ebyz6_14",py="_projectTitleRow_ebyz6_21",fy="_label_ebyz6_28",gy="_projectName_ebyz6_37",hy="_projectActions_ebyz6_45",my="_projectMetaRow_ebyz6_62",yy="_projectMetaLabel_ebyz6_70",vy="_projectMetaValue_ebyz6_78",Sy="_placeBadge_ebyz6_87",wy="_placeBadgeMuted_ebyz6_102",ky="_placeIcon_ebyz6_106",Py="_placeSection_ebyz6_110",Ry="_placeSectionHeader_ebyz6_116",by="_placeNotice_ebyz6_123",xy="_routeNotice_ebyz6_124",Cy="_placeList_ebyz6_137",jy="_placeCard_ebyz6_143",_y="_placeCardCurrent_ebyz6_151",Ey="_placeCardTop_ebyz6_156",Ty="_placeCardName_ebyz6_163",My="_placeCardBadge_ebyz6_169",Ly="_placeCardBadgeActive_ebyz6_179",Dy="_placeCardBadgeInactive_ebyz6_184",Oy="_placeCardMeta_ebyz6_189",zy="_actions_ebyz6_196",Ay="_iconButton_ebyz6_202",Ny="_changeButton_ebyz6_235",ze={header:uy,projectBlock:dy,projectTitleRow:py,label:fy,projectName:gy,projectActions:hy,projectMetaRow:my,projectMetaLabel:yy,projectMetaValue:vy,placeBadge:Sy,placeBadgeMuted:wy,placeIcon:ky,placeSection:Py,placeSectionHeader:Ry,placeNotice:by,routeNotice:xy,placeList:Cy,placeCard:jy,placeCardCurrent:_y,placeCardTop:Ey,placeCardName:Ty,placeCardBadge:My,placeCardBadgeActive:Ly,placeCardBadgeInactive:Dy,placeCardMeta:Oy,actions:zy,iconButton:Ay,changeButton:Ny};function Id(a){if(!a)return"";const i=a.split(/[\\/]/).filter(Boolean);return i[i.length-1]??""}function Iy(a){var c,d;const i=((c=a==null?void 0:a.mcpInstances)==null?void 0:c.filter(p=>!p.isServer&&p.aiClientName))??[];if(i.length===0){const p=((d=a==null?void 0:a.mcpInstances)==null?void 0:d.find(f=>!!f.aiClientName))??null;return(p==null?void 0:p.projectRoot)??(p==null?void 0:p.cwd)??null}i.sort((p,f)=>(f.lastCommandAt??f.connectedAt)-(p.lastCommandAt??p.connectedAt));const s=i[0];return s.projectRoot??s.cwd??null}function Fy(a,i,s){return a??i??s}function By(a){const i=a.replace(/^\//,"").split("/")[0];return i===""||i==="overview"}function Uy(a){return a.replace(/^\//,"").split("/")[0]==="sync"}function Wy(a){return a.replace(/^\//,"").split("/")[0]==="playtest"}function Hy(a){return a.replace(/^\//,"").split("/")[0]==="changelog"}function Fd(a,i){if(a&&typeof a=="object"&&"message"in a&&typeof a.message=="string"){const s=a.message.trim();if(s.length>0)return s}return i}function Vy(){var lo,Mt,Mn,so;const{pathname:a}=Do(),{level:i,status:s}=Ds(),{t:c}=Ci(),{show:d}=pp(),[p,f]=T.useState(null),[m,h]=T.useState(null),[S,b]=T.useState(null),[x,M]=T.useState(!1),[I,H]=T.useState(null),[F,W]=T.useState(null),[ge,X]=T.useState(!1),[ue,re]=T.useState(!1),[be,_e]=T.useState(null),_=c("header.placeNotConnected","Place not connected"),Y=By(a),ke=Uy(a),ie=Wy(a),Ue=Hy(a);T.useEffect(()=>{let me=!1;async function Ze(){if(i==="disconnected"){f(null);return}try{const at=await fn.get("/connection-info");me||f(at)}catch{me||f(null)}}return Ze(),()=>{me=!0}},[i,s==null?void 0:s.sessionId,s==null?void 0:s.connectedClients]),T.useEffect(()=>{let me=!1;async function Ze(){if(i==="disconnected"){h(null),M(!1);return}h(null),M(!1);try{const at=await Jm();me||(h(at),M(!1))}catch{me||(h(null),M(!0))}}return Ze(),()=>{me=!0}},[Y,i,s==null?void 0:s.sessionId,s==null?void 0:s.connectedClients]),T.useEffect(()=>{let me=!1;async function Ze(){if(i==="disconnected"){b(null);return}try{const at=await Ym();me||b(at)}catch{me||b(null)}}return Ze(),()=>{me=!0}},[i,s==null?void 0:s.sessionId,s==null?void 0:s.connectedClients]);const Te=Iy(p)??"",pe=i==="disconnected"?"blocked":m?"ready":x?"error":"loading",We=pe==="ready"?(m==null?void 0:m.projectRoot)??"":pe==="loading"?c("header.currentProject.loading","Loading project root..."):c("header.currentProject.unavailable","Project root unavailable"),Ge=pe==="ready"?(m==null?void 0:m.projectRoot)??"":Y?"":Te,tt=Y||pe==="ready"?pe==="ready"?Id(Ge)||c("header.unknownProject","Unknown project"):pe==="loading"?c("header.currentProject.loading","Loading project root..."):c("header.currentProject.unavailable","Project root unavailable"):Id(Ge)||c("header.unknownProject","Unknown project"),Ae=Fy((Mt=(lo=s==null?void 0:s.pluginClients)==null?void 0:lo[0])==null?void 0:Mt.placeName,(so=(Mn=s==null?void 0:s.pluginClients)==null?void 0:Mn[0])==null?void 0:so.projectName,_),B=Ae===_?c("header.placeNotConnected.tooltip","Place not connected"):c("header.place.tooltip","Connected Roblox place"),oe=S!=null&&S.pluginConnected?S.activePlaceId:(S==null?void 0:S.lastActivePlaceId)??null,q=[...(S==null?void 0:S.places)??[]].sort((me,Ze)=>{const at=me.placeId===oe,co=Ze.placeId===oe;return at!==co?at?-1:1:me.isConnected!==Ze.isConnected?me.isConnected?-1:1:me.placeName.localeCompare(Ze.placeName)}),k=q.find(me=>me.placeId===oe)??null,L=Y?pe==="loading"?c("header.currentProject.loading.tooltip","Project root information is still loading"):pe==="error"?c("header.currentProject.unavailable.tooltip","Current project root information is unavailable"):c("header.currentProject.tooltip","Currently selected project folder"):c("header.currentProject.tooltip","Currently selected project folder"),de=pe==="ready"?(m==null?void 0:m.projectSyncRoot)??"":pe==="loading"?c("header.currentProjectSyncRoot.loading","Loading sync root..."):c("header.currentProjectSyncRoot.unavailable","Sync root unavailable"),ye=pe==="loading"?c("header.currentProjectSyncRoot.loading.tooltip","Sync root information is still loading"):pe==="error"?c("header.currentProjectSyncRoot.unavailable.tooltip","Current sync root information is unavailable"):c("header.currentProjectSyncRoot.tooltip","Current sync root folder for the selected project"),he=pe==="ready"?(k==null?void 0:k.testsPath)??c("header.testFiles.unavailable","Test files unavailable"):pe==="loading"?c("header.currentProjectSyncRoot.loading","Loading sync root..."):c("header.testFiles.unavailable","Test files unavailable"),Se=pe==="ready"?c("header.testFiles.tooltip","Current playtest files directory for the selected place"):pe==="loading"?c("header.currentProjectSyncRoot.loading.tooltip","Sync root information is still loading"):c("header.currentProjectSyncRoot.unavailable.tooltip","Current sync root information is unavailable"),we=ke?{label:c("header.currentProjectSyncRoot.label","Sync Root"),value:de,tooltip:ye}:ie?{label:c("header.testFiles.label","Test Files"),value:he,tooltip:Se}:null,Ce=(ke||ie||Ue)&&(S==null?void 0:S.pluginConnected)===!1,Ne=i==="disconnected"||pe!=="ready",ft=i==="disconnected"?c("header.changeProjectRoot.disabledTooltip.l0","MCP server connection required before project root can be changed"):pe==="loading"?c("header.changeProjectRoot.disabledTooltip.loading","Project root information is still loading"):pe==="error"?c("header.changeProjectRoot.disabledTooltip.unavailable","Current project root information is unavailable"):c("header.changeProjectRoot.tooltip","Change the current project root"),tn=(me=!1)=>{!me&&(ge||ue)||(H(null),W(null),_e(null))},ot=()=>{Ne||(_e(null),W(null),H("initial"))},Tt=async()=>{X(!0),_e(null);try{const me=await Zm();if(me.cancelled||!me.projectRoot){tn(!0);return}W(me.projectRoot),H("confirm")}catch(me){_e(Fd(me,c("header.projectRootModal.error","Failed to change project root")))}finally{X(!1)}},Tn=async()=>{if(F){re(!0),_e(null);try{const me=await ey(F);h(me),M(!1),tn(!0)}catch(me){const Ze=Fd(me,c("header.projectRootModal.error","Failed to change project root"));_e(Ze),d(Ze,"error")}finally{re(!1)}}};return A.jsxs(A.Fragment,{children:[A.jsxs("header",{className:ze.header,children:[A.jsxs("div",{className:ze.projectBlock,children:[A.jsx("span",{className:ze.label,children:c("header.currentProject","Current Project")}),A.jsxs("div",{className:ze.projectTitleRow,children:[A.jsx("strong",{className:ze.projectName,children:A.jsx(hi,{text:L,children:tt})}),A.jsx("div",{className:ze.projectActions,children:A.jsx(Ri,{text:ft,children:A.jsx("span",{children:A.jsx("button",{type:"button",className:ze.changeButton,onClick:ot,disabled:Ne,children:c("header.changeProjectRoot","Change Project Root")})})})})]}),A.jsxs("span",{className:ze.projectMetaRow,children:[A.jsx(hi,{text:c("header.currentProject.tooltip","Currently selected project folder"),children:A.jsx("span",{className:ze.projectMetaLabel,children:c("header.projectRoot.label","Project Root")})}),A.jsx("span",{className:ze.projectMetaValue,children:We})]}),we?A.jsxs("span",{className:ze.projectMetaRow,children:[A.jsx(hi,{text:we.tooltip,children:A.jsx("span",{className:ze.projectMetaLabel,children:we.label})}),A.jsx("span",{className:ze.projectMetaValue,children:we.value})]}):null,A.jsxs("div",{className:ze.placeSection,children:[A.jsxs("div",{className:ze.placeSectionHeader,children:[A.jsx("span",{className:ze.projectMetaLabel,children:c("header.places.title","Places")}),S!=null&&S.pluginConnected?null:A.jsx("span",{className:ze.placeNotice,children:c("header.places.pluginRequired","Plugin connection required")})]}),A.jsx("div",{className:ze.placeList,children:q.length>0?q.map(me=>{const Ze=me.placeId===oe,at=S!=null&&S.pluginConnected&&me.isConnected?c("header.places.active","Active"):c("header.places.inactive","Inactive");return A.jsxs("div",{className:[ze.placeCard,Ze?ze.placeCardCurrent:""].filter(Boolean).join(" "),title:`${me.placeName} (${at})`,children:[A.jsxs("div",{className:ze.placeCardTop,children:[A.jsx("span",{className:ze.placeCardName,children:me.placeName}),A.jsx("span",{className:[ze.placeCardBadge,S!=null&&S.pluginConnected&&me.isConnected?ze.placeCardBadgeActive:ze.placeCardBadgeInactive].join(" "),children:at})]}),A.jsx("div",{className:ze.placeCardMeta,children:`place_${me.placeId}`})]},`${me.placeId}:${me.placeDirName}`)}):A.jsx(hi,{text:B,children:A.jsxs("span",{className:[ze.placeBadge,Ae===_?ze.placeBadgeMuted:""].filter(Boolean).join(" "),children:[A.jsx("span",{className:ze.placeIcon,children:"🎮"}),A.jsx("span",{children:Ae})]})})}),Ce?A.jsx("div",{className:ze.routeNotice,children:c("header.places.liveRequired","Plugin connection required for live active place")}):null]})]}),A.jsx("div",{className:ze.actions,children:A.jsx(Ri,{text:c("sidebar.settings","Settings"),children:A.jsx(sp,{to:"/settings","aria-label":c("sidebar.settings","Settings"),className:ze.iconButton,children:"⚙️"})})})]}),A.jsx(cy,{open:I!==null,step:I??"initial",selectedProjectRoot:F,studioConnected:i==="studioConnected",loading:ge||ue,errorMessage:be,onClose:tn,onPick:Tt,onApply:Tn})]})}const qy=5e3,Xy=5;let sa=[],Bd=null;function mp(){if(sa.length===0)return;const a=sa.splice(0),i=`${xi}/api/dashboard/analytics`,s=JSON.stringify({events:a});fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).catch(()=>{})}function Ky(){Bd||(Bd=setInterval(mp,qy))}function Ud(a){sa.push(a),Ky(),sa.length>=Xy&&mp()}typeof window<"u"&&window.addEventListener("beforeunload",()=>{if(sa.length===0)return;const a=`${xi}/api/dashboard/analytics`,i=JSON.stringify({events:sa.splice(0)});navigator.sendBeacon(a,new Blob([i],{type:"application/json"}))});function $y(){const a=T.useCallback((s,c)=>{Ud({name:s,params:c})},[]),i=T.useCallback(s=>{Ud({name:"dashboard_page_view",params:{page:s}})},[]);return{trackEvent:a,trackPageView:i}}const Qy="_layout_ya8ln_2",Gy="_mainShell_ya8ln_8",Yy="_content_ya8ln_17",Jy="_loading_ya8ln_25",mi={layout:Qy,mainShell:Gy,content:Yy,loading:Jy};function Zy(a){return a.replace(/^\//,"").split("/")[0]||"overview"}function ev(){const{pathname:a}=Do(),{trackPageView:i}=$y();return T.useEffect(()=>{i(Zy(a))},[a,i]),null}function tv(){return A.jsx(ym,{children:A.jsx(Cm,{children:A.jsxs(sm,{children:[A.jsx(jm,{}),A.jsx(ev,{}),A.jsxs("div",{className:mi.layout,children:[A.jsx(Gm,{}),A.jsxs("div",{className:mi.mainShell,children:[A.jsx(Vy,{}),A.jsx("main",{className:mi.content,children:A.jsx(T.Suspense,{fallback:A.jsx("div",{className:mi.loading,children:"Loading..."}),children:A.jsx(_h,{})})})]})]})]})})})}function nv(a){return a.route==="/"?{index:!0,lazy:a.lazy}:{path:a.route.slice(1),lazy:a.lazy}}const ov=Ah([{path:"/",element:A.jsx(tv,{}),children:[...hp.map(nv),{path:"changelog/:id",lazy:()=>oo(()=>import("./ChangelogDetailPage-CGK59Jsx.js"),__vite__mapDeps([24,1,4,5,25]))},{path:"settings",lazy:()=>oo(()=>import("./SettingsPage-C-QX0AY-.js"),__vite__mapDeps([26,1,27]))}]}]);sg.createRoot(document.getElementById("root")).render(A.jsx(Vh,{router:ov}));export{Mo as A,zm as D,hm as S,hi as T,fn as a,rv as b,dh as c,Ds as d,iv as e,Om as f,lv as g,sv as h,pp as i,A as j,$y as k,Do as l,Ri as m,T as r,pn as s,Ci as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-OH9mpHwW.js";function c(t){const r=Math.max(0,Math.floor(t/1e3)),n=Math.floor(r/3600),o=Math.floor(r%3600/60),e=Math.floor(r%60);return`${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}:${String(e).padStart(2,"0")}`}const s=1e3;function i(t){const[r,n]=a.useState(t??null);return a.useEffect(()=>{if(t==null){n(null);return}const o=Date.now();n(t);const e=window.setInterval(()=>{n(t+(Date.now()-o))},s);return()=>{window.clearInterval(e)}},[t]),r}export{c as f,i as u};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" href="/dashboard/wrox-icon.png" />
|
|
7
7
|
<title>WROX Dashboard</title>
|
|
8
|
-
<script type="module" crossorigin src="/dashboard/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/dashboard/assets/index-OH9mpHwW.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/dashboard/assets/index-DYnjsp-e.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|