@weppy/roblox-mcp 2.7.17 → 2.8.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dashboard/dist/assets/AssetsPage-B1-IkNLs.js +56 -0
  3. package/dashboard/dist/assets/AssetsPage-BQGliX7Q.css +1 -0
  4. package/dashboard/dist/assets/{ChangelogDetailPage-Cado4LDZ.js → ChangelogDetailPage-BQu8E3gB.js} +1 -1
  5. package/dashboard/dist/assets/ChangelogPage-BYIOvsqN.js +1 -0
  6. package/dashboard/dist/assets/ConfirmModal-DSKr5eS9.js +1 -0
  7. package/dashboard/dist/assets/ConnectionPage-OvC9gL_W.js +1 -0
  8. package/dashboard/dist/assets/{GameChangeDetail-BvLY7yg8.js → GameChangeDetail-BmXlRT3i.js} +1 -1
  9. package/dashboard/dist/assets/{InfoLabel-LyMkHb1i.js → InfoLabel-CldY9uOT.js} +1 -1
  10. package/dashboard/dist/assets/OverviewPage-Cdw1CYe4.js +1 -0
  11. package/dashboard/dist/assets/PageHeader-2-fusgsY.css +1 -0
  12. package/dashboard/dist/assets/PageHeader-ueZvp6K9.js +11 -0
  13. package/dashboard/dist/assets/PlaytestPage-azdyKqSE.js +11 -0
  14. package/dashboard/dist/assets/SettingsPage-BLPo-MfN.js +1 -0
  15. package/dashboard/dist/assets/SettingsPage-d0wOFs8U.css +1 -0
  16. package/dashboard/dist/assets/{StatusBadge-CLJmMG0w.js → StatusBadge-DxlagIzF.js} +1 -1
  17. package/dashboard/dist/assets/SyncPage-DtqIcJ5z.js +4 -0
  18. package/dashboard/dist/assets/{Tabs-C9KNjyNX.js → Tabs-BgJY0tsU.js} +1 -1
  19. package/dashboard/dist/assets/ToolsPage-BEq7XLqc.js +1 -0
  20. package/dashboard/dist/assets/{TooltipText-BPEldl3x.js → TooltipText-DazmfUnr.js} +1 -1
  21. package/dashboard/dist/assets/UiStudioPage-BR3NgjBs.js +11 -0
  22. package/dashboard/dist/assets/WhatsNewPage-BGAIXqWd.js +1 -0
  23. package/dashboard/dist/assets/WhatsNewPage-BIYOEZg3.css +1 -0
  24. package/dashboard/dist/assets/index-1ZlHj3-1.js +523 -0
  25. package/dashboard/dist/assets/index-BdS5zBaA.css +1 -0
  26. package/dashboard/dist/assets/{sample-requests-Bttgc133.js → sample-requests-Cq6wCxhD.js} +1 -1
  27. package/dashboard/dist/assets/{useLiveUptime-CksXMBr9.js → useLiveUptime-Dg607eVr.js} +1 -1
  28. package/dashboard/dist/index.html +2 -2
  29. package/dist/index.js +76 -75
  30. package/package.json +1 -1
  31. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  32. package/dashboard/dist/assets/ChangelogPage-DyS8_4IL.js +0 -1
  33. package/dashboard/dist/assets/ConfirmModal-C66ZwIur.js +0 -1
  34. package/dashboard/dist/assets/ConnectionPage-DsGgzpmn.js +0 -1
  35. package/dashboard/dist/assets/OverviewPage-BDkw5pqk.js +0 -1
  36. package/dashboard/dist/assets/PlaytestPage-Chwh5KSd.js +0 -11
  37. package/dashboard/dist/assets/SettingsPage-7nNA3k5H.js +0 -1
  38. package/dashboard/dist/assets/SettingsPage-Du8-FZAO.css +0 -1
  39. package/dashboard/dist/assets/SyncPage-CUP2s1T6.js +0 -4
  40. package/dashboard/dist/assets/ToolsPage-QacrKG2A.js +0 -1
  41. package/dashboard/dist/assets/UiStudioPage-RUjTAi4h.js +0 -16
  42. package/dashboard/dist/assets/WhatsNewPage-CKNhbHAQ.js +0 -1
  43. package/dashboard/dist/assets/WhatsNewPage-D5OncQnl.css +0 -1
  44. package/dashboard/dist/assets/index-CZ4Jn6CC.css +0 -1
  45. package/dashboard/dist/assets/index-VNIYQxwF.js +0 -481
package/CHANGELOG.md CHANGED
@@ -6,6 +6,23 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
 
8
8
 
9
+
10
+
11
+ ## [2.8.0] - 2026-06-14
12
+
13
+ ### Features
14
+
15
+ - **Experimental Dashboard Assets page** — The WEPPY Dashboard now includes an experimental Assets page for local Images, Decals, and RBXM files, so you can review saved assets, upload supported files, and insert saved RBXM files into the connected Studio place.
16
+ - **AI-generated image upload support** — When using image-capable AI agents such as Codex Desktop or Antigravity, you can generate an image, save it into the local Asset Library, upload it to Roblox with Open Cloud, and use the returned Roblox Asset ID or `rbxassetid://` URI in your game.
17
+ - **RBXM export and insert from Studio** — You can export selected Roblox Studio objects as RBXM files from the WEPPY Plugin Assets tab, review the saved files in the Dashboard, and insert them back into the connected Studio place.
18
+ - **Local Open Cloud credential storage** — Roblox uploads use API key and Creator ID profiles stored locally with encryption. WEPPY does not store API keys in an external service or send them to a separate WEPPY server; the local MCP server uses them only for Roblox Open Cloud upload requests.
19
+
20
+ ## [2.7.18] - 2026-06-08
21
+
22
+ ### Stability
23
+
24
+ - **Clearer sync disk-error troubleshooting** — When Project Sync cannot start because the local sync folder cannot be written, WEPPY now keeps the underlying disk or permission message in the Studio error details and server logs instead of only showing `Disk error`. This makes support logs more actionable without changing the sync workflow.
25
+
9
26
  ## [2.7.17] - 2026-06-07
10
27
 
11
28
  ### Bug Fixes
@@ -0,0 +1,56 @@
1
+ import{q as Q,a as w,s as be,u as he,j as t,P as dt,I as ut,r as i,R as He,E as pt,t as Ke,k as ht,i as mt,m as gt}from"./index-1ZlHj3-1.js";import{C as Ge}from"./ConfirmModal-DSKr5eS9.js";import{X as ke,D as Pe,P as xt}from"./PageHeader-ueZvp6K9.js";import{T as H}from"./TooltipText-DazmfUnr.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const bt=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],yt=Q("arrow-left",bt);/**
7
+ * @license lucide-react v1.8.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ft=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],jt=Q("audio-lines",ft);/**
12
+ * @license lucide-react v1.8.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const vt=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}]],Ct=Q("badge",vt);/**
17
+ * @license lucide-react v1.8.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const _t=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],St=Q("box",_t);/**
22
+ * @license lucide-react v1.8.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const At=[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]],Nt=Q("clapperboard",At);/**
27
+ * @license lucide-react v1.8.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const kt=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],We=Q("copy",kt);/**
32
+ * @license lucide-react v1.8.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const It=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Pt=Q("download",It);/**
37
+ * @license lucide-react v1.8.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Rt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],wt=Q("film",Rt);/**
42
+ * @license lucide-react v1.8.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const $t=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Lt=Q("search",$t);/**
47
+ * @license lucide-react v1.8.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const Bt=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Dt=Q("trash-2",Bt);/**
52
+ * @license lucide-react v1.8.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const Et=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ut=Q("upload",Et);function ze(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function ee(e){const a=ze(e);return a?`?placeId=${encodeURIComponent(a.placeId)}`:""}function ye(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function ce(e,a){return`${ye(e)}/${encodeURIComponent(a)}`}async function Tt(e){return w.get(ye(e),ze(e))}async function Ot(e){return w.post(`${ye(e)}/rescan${ee(e)}`,{})}async function Ft(e,a,u){return(await w.patch(`${ce(e,a)}${ee(e)}`,u)).asset}async function Mt(e,a){return w.delete(`${ce(e,a)}${ee(e)}`)}async function Ht(e,a,u){return(await w.post(`${ce(e,a)}/upload${ee(e)}`,u)).asset}async function Re(e,a){return(await w.post(`${ce(e,a)}/status-refresh${ee(e)}`,{})).asset}async function Kt(e,a,u){const o={...e,placeId:u??e.placeId};return w.post(`${ce(e,a)}/usage-scan${ee(o)}`,{})}async function Gt(e,a){return w.post(`${ye(e)}/export-selection-rbxm${ee(e)}`,a)}async function Wt(e,a,u){return w.post(`${ce(e,a)}/import-rbxm${ee(e)}`,u)}async function zt(e,a){return(await w.post(`${ce(e,a)}/thumbnail-generate${ee(e)}`,{})).asset}function Ve(e){return e.fileUrl?`${be}${e.fileUrl}`:`${be}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/file${ee({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}function Ye(e){return e.previewUrl?`${be}${e.previewUrl}`:`${be}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/preview${ee({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}const Xe=["all","image","decal","rbxm"],Vt=new Set(Xe),we=["model","animation"];function ge(e){return/\.(rbxm|rbxmx)$/i.test(e.file.original)}function Yt(e){return Vt.has(e)}function Ae(e,a){return e==="all"?a("assets.category.all","All"):a(`assets.category.${e}`,e==="rbxm"?"RBXM":e)}function ie(e,a){return Ae(ge(e)?"rbxm":e.category,a)}function $e(e){return e==="all"?["image","decal",...we]:e==="rbxm"?we:[e]}function Xt(e,a){return a==="all"?e.category==="image"||e.category==="decal"||ge(e):a==="rbxm"?ge(e):(a==="model"||a==="animation")&&ge(e)?!1:e.category===a}function qt(e){return[...e].sort((a,u)=>u.createdAt.localeCompare(a.createdAt)||u.id.localeCompare(a.id))}const Zt="_page_8op6c_1",Jt="_experimentalBadge_8op6c_9",Qt="_toolbarShell_8op6c_23",es="_toolbar_8op6c_23",ts="_segmented_8op6c_39",ss="_listContextSummary_8op6c_43",as="_toolbarActions_8op6c_49",os="_categoryControl_8op6c_54",ns="_contextDivider_8op6c_76",rs="_categoryControlLabel_8op6c_80",ls="_categoryRail_8op6c_86",is="_categoryButton_8op6c_94",cs="_categoryButtonActive_8op6c_123",ds="_actionRow_8op6c_130",us="_copyRow_8op6c_131",ps="_buttonRow_8op6c_132",hs="_segmentedActive_8op6c_163",ms="_filterLabel_8op6c_168",gs="_commandButton_8op6c_186",xs="_primaryButton_8op6c_187",bs="_iconButton_8op6c_188",ys="_dangerButton_8op6c_228",fs="_iconButtonActive_8op6c_238",js="_grid_8op6c_251",vs="_assetCard_8op6c_257",Cs="_assetCardSelected_8op6c_271",_s="_thumbnailWrap_8op6c_276",Ss="_thumbnail_8op6c_276",As="_thumbnailFallback_8op6c_292",Ns="_assetCardBody_8op6c_303",ks="_assetName_8op6c_310",Is="_assetMeta_8op6c_318",Ps="_statusChip_8op6c_325",Rs="_categoryPill_8op6c_326",ws="_status_uploaded_8op6c_339",$s="_status_failed_8op6c_344",Ls="_status_processing_8op6c_349",Bs="_status_uploading_8op6c_350",Ds="_assetId_8op6c_355",Es="_scopeText_8op6c_356",Us="_muted_8op6c_357",Ts="_emptyState_8op6c_362",Os="_notice_8op6c_363",Fs="_errorState_8op6c_364",Ms="_messageState_8op6c_365",Hs="_proNotice_8op6c_395",Ks="_rbxmGuide_8op6c_411",Gs="_drawer_8op6c_437",Ws="_settingsInlinePanel_8op6c_451",zs="_settingsPopoverIn_8op6c_1",Vs="_settingsDrawer_8op6c_471",Ys="_detailPopupLayer_8op6c_487",Xs="_detailDialog_8op6c_503",qs="_detailDialogHeader_8op6c_520",Zs="_detailTitleBlock_8op6c_531",Js="_detailEyebrow_8op6c_553",Qs="_detailHeaderActions_8op6c_562",ea="_detailDialogBody_8op6c_570",ta="_detailPreviewPane_8op6c_579",sa="_detailPreview_8op6c_579",aa="_detailPreviewFallback_8op6c_591",oa="_detailContentPane_8op6c_627",na="_formStack_8op6c_633",ra="_drawerHeader_8op6c_637",la="_preview_8op6c_660",ia="_previewFallback_8op6c_661",ca="_detailSection_8op6c_688",da="_noticeList_8op6c_689",ua="_settingsPanel_8op6c_690",pa="_setupNotice_8op6c_707",ha="_field_8op6c_732",ma="_fieldLabelRow_8op6c_740",ga="_fieldHelp_8op6c_764",xa="_twoColumn_8op6c_769",ba="_technicalDetails_8op6c_780",ya="_detailGrid_8op6c_797",fa="_metadataList_8op6c_798",ja="_compactMeta_8op6c_809",va="_copyableValue_8op6c_836",Ca="_inlineCopyButton_8op6c_847",_a="_hashText_8op6c_868",Sa="_usageList_8op6c_872",Aa="_usageItem_8op6c_878",Na="_metadataItem_8op6c_879",ka="_settingsSubsection_8op6c_927",Ia="_settingsSectionHeader_8op6c_932",Pa="_settingsDefinitionList_8op6c_945",Ra="_toggleRow_8op6c_967",wa="_inlineHelp_8op6c_981",$a="_headerRow_8op6c_1058",La="_headerMeta_8op6c_1064",s={page:Zt,experimentalBadge:Jt,toolbarShell:Qt,toolbar:es,segmented:ts,listContextSummary:ss,toolbarActions:as,categoryControl:os,contextDivider:ns,categoryControlLabel:rs,categoryRail:ls,categoryButton:is,categoryButtonActive:cs,actionRow:ds,copyRow:us,buttonRow:ps,segmentedActive:hs,filterLabel:ms,commandButton:gs,primaryButton:xs,iconButton:bs,dangerButton:ys,iconButtonActive:fs,grid:js,assetCard:vs,assetCardSelected:Cs,thumbnailWrap:_s,thumbnail:Ss,thumbnailFallback:As,assetCardBody:Ns,assetName:ks,assetMeta:Is,statusChip:Ps,categoryPill:Rs,status_uploaded:ws,status_failed:$s,status_processing:Ls,status_uploading:Bs,assetId:Ds,scopeText:Es,muted:Us,emptyState:Ts,notice:Os,errorState:Fs,messageState:Ms,proNotice:Hs,rbxmGuide:Ks,drawer:Gs,settingsInlinePanel:Ws,settingsPopoverIn:zs,settingsDrawer:Vs,detailPopupLayer:Ys,detailDialog:Xs,detailDialogHeader:qs,detailTitleBlock:Zs,detailEyebrow:Js,detailHeaderActions:Qs,detailDialogBody:ea,detailPreviewPane:ta,detailPreview:sa,detailPreviewFallback:aa,detailContentPane:oa,formStack:na,drawerHeader:ra,preview:la,previewFallback:ia,detailSection:ca,noticeList:da,settingsPanel:ua,setupNotice:pa,field:ha,fieldLabelRow:ma,fieldHelp:ga,twoColumn:xa,technicalDetails:ba,detailGrid:ya,metadataList:fa,compactMeta:ja,copyableValue:va,inlineCopyButton:Ca,hashText:_a,usageList:Sa,usageItem:Aa,metadataItem:Na,settingsSubsection:ka,settingsSectionHeader:Ia,settingsDefinitionList:Pa,toggleRow:Ra,inlineHelp:wa,headerRow:$a,headerMeta:La},Ba={image:ut,decal:Ct,audio:jt,mesh:St,model:dt,video:wt,animation:Nt};function Ne(e,a){return a(`assets.status.${e}`,e)}function Da(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Ea(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId:e.roblox.assetId}function Ua({assets:e,selectedAssetId:a,onSelect:u}){const{t:o}=he();return e.length===0?t.jsxs("div",{className:s.emptyState,children:[t.jsx("p",{children:o("assets.empty.title","No assets yet")}),t.jsx("span",{children:o("assets.empty.body","Choose a scope and category, then rescan that inbox folder.")})]}):t.jsx("div",{className:s.grid,children:e.map(l=>{const $=Ba[l.category],C=Ea(l);return t.jsxs("button",{type:"button",className:[s.assetCard,a===l.id?s.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>u(l.id),children:[t.jsx("span",{className:s.thumbnailWrap,children:Da(l)?t.jsx("img",{className:s.thumbnail,src:Ye(l),alt:l.displayName,loading:"lazy"}):t.jsx("span",{className:s.thumbnailFallback,"aria-hidden":"true",children:t.jsx($,{size:30})})}),t.jsxs("span",{className:s.assetCardBody,children:[t.jsx("span",{className:s.assetName,children:l.displayName}),t.jsxs("span",{className:s.assetMeta,children:[t.jsx("span",{className:s.categoryPill,children:ie(l,o)}),t.jsx("span",{className:`${s.statusChip} ${s[`status_${l.status}`]??""}`,children:Ne(l.status,o)})]}),t.jsxs("span",{className:s.assetMeta,children:[t.jsx("span",{className:s.scopeText,children:l.scope.kind==="shared"?o("assets.scope.shared","Shared"):o("assets.scope.place","Current Place")}),t.jsx("span",{className:s.assetId,children:C?`#${C}`:o("assets.status.localOnly","Local only")})]})]})]},l.id)})})}const Ta="https://create.roblox.com/dashboard/creations/store",Oa=/^https:\/\/create\.roblox\.com\/store\/asset\/\d+(?:\/.*)?$/;function Fa(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function xe(e){const a=new Date(e);if(Number.isNaN(a.getTime()))return e;const u=a.getFullYear(),o=String(a.getMonth()+1).padStart(2,"0"),l=String(a.getDate()).padStart(2,"0"),$=String(a.getHours()).padStart(2,"0"),C=String(a.getMinutes()).padStart(2,"0");return`${u}-${o}-${l} ${$}:${C}`}function Ma(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Ha(e){return e.file.preview?Ye(e):Ve(e)}function Ka(e){var u;const a=Object.entries(((u=e.rbxm)==null?void 0:u.classCounts)??{}).sort((o,l)=>l[1]-o[1]).slice(0,8);return a.length===0?"-":a.map(([o,l])=>`${o} ${l}`).join(", ")}function Le(e){var l;const a=(l=e.rbxm)==null?void 0:l.thumbnail;if(!a)return"-";const u=a.source?` via ${a.source}`:"",o=a.message?` · ${a.message}`:"";return`${a.status}${u}${o}`}function Be(e){const{width:a,height:u}=e.file;return a===null||u===null?null:`${a} x ${u}px`}function De(e){const{durationMs:a}=e.file;return a===null?null:a<1e3?`${a} ms`:`${(a/1e3).toFixed(1)} s`}function Ga(e){return`${Ta}/${e}/configure`}function Wa(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId??null:e.roblox.assetId??null}function za(e){const a=Wa(e),u=a?Ga(a):null,o=e.category==="decal"?e.roblox.creatorAssetWebUrl??e.roblox.assetWebUrl:e.roblox.assetWebUrl;return!o||u&&Oa.test(o)?u:o}function Va(e){return`${xe(e.startedAt)} -> ${e.status}`}function Ee(e){return!e.creatorType||!e.creatorId?null:`${e.creatorType} ${e.creatorId}`}function Ue(e){return e.assetRole?`Asset role: ${e.assetRole}`:null}function me({label:e,value:a}){return a?t.jsx("button",{type:"button",className:s.inlineCopyButton,"aria-label":e,title:e,onClick:()=>{var u;return void((u=navigator.clipboard)==null?void 0:u.writeText(a))},children:t.jsx(We,{size:13})}):null}function Ya({asset:e,busyAction:a,canUpload:u,canImportRbxm:o,importRbxmTooltip:l,importRbxmTargetParent:$,onClose:C,onSave:D,onUpload:p,onDelete:G,onImportRbxm:O,onRefreshStatus:U,onScanUsage:m}){var L,A;const{t:n}=he(),W=i.useRef(null),[K,V]=i.useState(""),[F,X]=i.useState("");if(i.useEffect(()=>{V((e==null?void 0:e.displayName)??""),X((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{var g;if(!e)return;(g=W.current)==null||g.focus();const r=Z=>{Z.key==="Escape"&&C()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,C]),!e)return null;const I=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),q=!!e.roblox.assetUri,f=za(e),P=e.roblox.uploadAttempts??[],S=e.category==="decal"&&!!(e.roblox.creatorAssetId||e.roblox.backingImageAssetId||e.roblox.assetId),z=e.roblox.creatorAssetId??e.roblox.assetId,j=e.roblox.backingImageAssetId??e.roblox.assetId,v=e.roblox.assetId?e.usage.lastScannedAt?n("assets.detail.noUsageAfterScan","No references were found in local Sync files during the last check."):n("assets.detail.noUsageUnscanned","Run Scan usage to search local Sync files for this Roblox Asset ID."):n("assets.detail.noUsageNoRobloxId","This asset does not have a Roblox Asset ID yet, so usage cannot be checked. Upload it before scanning usage.");return t.jsx("div",{className:s.detailPopupLayer,onClick:C,role:"presentation",children:t.jsxs("section",{ref:W,className:s.detailDialog,role:"dialog","aria-modal":"true","aria-label":n("assets.detail.title","Asset details"),tabIndex:-1,onClick:r=>r.stopPropagation(),children:[t.jsxs("div",{className:s.detailDialogHeader,children:[t.jsxs("div",{className:s.detailTitleBlock,children:[t.jsxs("span",{className:s.detailEyebrow,children:[ie(e,n)," · ",Ne(e.status,n)]}),t.jsx("h2",{children:e.displayName}),t.jsx("span",{children:e.id})]}),t.jsxs("div",{className:s.detailHeaderActions,children:[t.jsx(H,{text:u?n("assets.upload.open.tooltip","Upload this local file to Roblox through Open Cloud."):n("assets.proOnly.tooltip","Roblox upload is available on Pro."),children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:!u,onClick:p,children:[t.jsx(Ut,{size:15}),n("assets.upload.open","Upload")]})}),o&&t.jsx(H,{text:l,children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:a==="import-rbxm",onClick:()=>void O(),children:[t.jsx(Pt,{size:15}),n("assets.detail.importRbxm","Insert into Studio")]})}),t.jsxs("button",{type:"button",className:s.commandButton,disabled:!I||a==="status-refresh",onClick:()=>void U(),children:[t.jsx(He,{size:15}),n("assets.detail.refreshStatus","Refresh")]}),t.jsxs("button",{type:"button",className:s.commandButton,disabled:!e.roblox.assetId||a==="usage-scan",onClick:()=>void m(),children:[t.jsx(Lt,{size:15}),n("assets.detail.scanUsage","Scan usage")]}),t.jsx(H,{text:n("assets.delete.tooltip","Delete this local Asset Library item."),children:t.jsxs("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:a==="delete",onClick:G,children:[t.jsx(Dt,{size:15}),n("common.delete","Delete")]})}),t.jsx(H,{text:n("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:C,"aria-label":n("common.close","Close"),children:t.jsx(ke,{size:16})})})]})]}),t.jsxs("div",{className:s.detailDialogBody,children:[t.jsx("div",{className:s.detailPreviewPane,children:Ma(e)?t.jsx("img",{className:s.detailPreview,src:Ha(e),alt:e.displayName}):t.jsxs("div",{className:s.detailPreviewFallback,children:[t.jsx("span",{children:ie(e,n)}),t.jsx("code",{children:e.file.original}),((L=e.rbxm)==null?void 0:L.thumbnail)&&t.jsx("small",{children:Le(e)})]})}),t.jsxs("div",{className:s.detailContentPane,children:[t.jsxs("div",{className:s.formStack,children:[t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:n("assets.detail.displayName","Display name")}),t.jsx("input",{value:K,onChange:r=>V(r.target.value)})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:n("assets.detail.description","Description")}),t.jsx("textarea",{value:F,rows:3,onChange:r=>X(r.target.value)})]}),t.jsx("button",{type:"button",className:s.primaryButton,disabled:a==="update",onClick:()=>void D(K,F),children:n("assets.detail.save","Save metadata")})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.localFile","Local file")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.fileName","File")}),t.jsx("dd",{children:e.file.original}),t.jsx("dt",{children:n("assets.detail.source","Source path")}),t.jsx("dd",{children:e.source.originalPath}),t.jsx("dt",{children:n("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,n)}),t.jsx("dt",{children:n("assets.detail.scope","Scope")}),t.jsx("dd",{children:e.scope.kind==="shared"?n("assets.scope.shared","Shared"):n("assets.scope.place","Current Place")}),t.jsx("dt",{children:n("assets.detail.mimeType","Type")}),t.jsx("dd",{children:e.file.mimeType}),t.jsx("dt",{children:n("assets.detail.size","Size")}),t.jsx("dd",{children:Fa(e.file.sizeBytes)}),Be(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.dimensions","Dimensions")}),t.jsx("dd",{children:Be(e)})]}),De(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.duration","Duration")}),t.jsx("dd",{children:De(e)})]})]})]}),e.rbxm&&t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.rbxm","RBXM contents")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.rbxmExportedCount","Exported roots")}),t.jsx("dd",{children:e.rbxm.exportedCount}),t.jsx("dt",{children:n("assets.detail.rbxmClasses","Classes")}),t.jsx("dd",{children:Ka(e)}),t.jsx("dt",{children:n("assets.detail.rbxmThumbnail","Thumbnail")}),t.jsx("dd",{children:Le(e)}),o&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.studioInsertTarget","Studio insert target")}),t.jsx("dd",{children:$})]})]}),e.rbxm.roots.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.rbxmRoots","Root tree")}),e.rbxm.roots.map(r=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[r.name," (",r.className,")"]}),t.jsx("code",{children:r.path})]},`${r.path}-${r.className}`))]}),e.rbxm.resourceReferences.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.rbxmReferences","Asset references")}),e.rbxm.resourceReferences.map((r,g)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[r.path," · ",r.property]}),t.jsx("code",{children:r.assetId?`${r.value} (#${r.assetId})`:r.value})]},`${r.path}-${r.property}-${g}`))]})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.roblox","Roblox upload status")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.status","Status")}),t.jsx("dd",{children:Ne(e.status,n)}),S?t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.decalAssetId","Roblox Decal ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:z??n("assets.status.localOnly","Local only")}),t.jsx(me,{label:n("assets.detail.copyDecalAssetId","Copy Roblox Decal ID"),value:z})]}),t.jsx("dt",{children:n("assets.detail.studioTextureImageId","Studio Texture Image ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:j??"-"}),t.jsx(me,{label:n("assets.detail.copyStudioTextureImageId","Copy Studio Texture Image ID"),value:j})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.assetId","Asset ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:e.roblox.assetId??n("assets.status.localOnly","Local only")}),t.jsx(me,{label:n("assets.detail.copyAssetId","Copy Asset ID"),value:e.roblox.assetId})]})]}),t.jsx("dt",{children:n("assets.detail.studioUri","Studio URI")}),t.jsx("dd",{children:e.roblox.assetUri??"-"}),t.jsx("dt",{children:n("assets.detail.robloxWebUrl","Creator Dashboard URL")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:f??"-"}),t.jsx(me,{label:n("assets.detail.copyWebUrl","Copy configure URL"),value:f})]}),e.roblox.errorMessage&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.error","Error")}),t.jsx("dd",{children:e.roblox.errorMessage})]})]}),t.jsxs("div",{className:s.copyRow,children:[t.jsxs("button",{type:"button",className:s.commandButton,disabled:!q,onClick:()=>{var r;return e.roblox.assetUri&&void((r=navigator.clipboard)==null?void 0:r.writeText(e.roblox.assetUri))},children:[t.jsx(We,{size:15}),n("assets.detail.copyStudioUri","Copy Studio URI")]}),f&&t.jsxs("a",{className:s.commandButton,href:f,target:"_blank",rel:"noreferrer",children:[t.jsx(pt,{size:15}),n("assets.detail.openRobloxPage","Open configure page")]})]}),e.roblox.assetId&&t.jsx("p",{className:s.muted,children:n("assets.detail.robloxWebUrlNotice","Opening this page requires the Roblox account that owns or can manage the uploaded asset.")}),P.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.uploadHistory","Upload history")}),P.slice().reverse().map((r,g)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsx("span",{children:Va(r)}),Ee(r)&&t.jsx("code",{children:Ee(r)}),Ue(r)&&t.jsx("code",{children:Ue(r)}),r.operationPath&&t.jsx("code",{children:r.operationPath}),r.assetId&&t.jsxs("code",{children:[n("assets.detail.assetId","Asset ID"),": ",r.assetId]}),r.remotePath&&t.jsx("code",{children:r.remotePath}),r.message&&t.jsx("code",{children:r.message}),r.errorMessage&&t.jsx("code",{children:r.errorMessage})]},`${r.startedAt}-${r.operationPath??g}`))]})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.usedInPlace","Where this asset is used in this Place")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.usageSource","Checked against")}),t.jsx("dd",{children:e.usage.scanSource==="localSync"?n("assets.detail.usageSource.localSync","Local Sync files"):n("assets.detail.usageSource.notScanned","Not checked yet")}),t.jsx("dt",{children:n("assets.detail.lastScanned","Last checked")}),t.jsx("dd",{children:e.usage.lastScannedAt?n("assets.detail.lastScannedAt","Last checked: {time}").replace("{time}",xe(e.usage.lastScannedAt)):n("assets.detail.lastScanned.never","No check yet")})]}),e.usage.references.length===0?t.jsx("p",{className:s.muted,children:v}):t.jsx("div",{className:s.usageList,children:e.usage.references.map((r,g)=>t.jsxs("div",{className:s.usageItem,children:[t.jsx("strong",{children:r.kind==="property"?r.instancePath:r.filePath}),t.jsx("span",{children:r.property??n("assets.detail.line","line {line}").replace("{line}",String(r.line??"-"))}),t.jsx("code",{children:r.value})]},`${r.kind}-${g}`))})]}),t.jsxs("details",{className:s.technicalDetails,children:[t.jsx("summary",{children:n("assets.detail.technicalDetails","Technical details")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.stableId","Stable ID")}),t.jsx("dd",{className:s.hashText,children:e.id}),t.jsx("dt",{children:n("assets.detail.sourceKind","Source kind")}),t.jsx("dd",{children:e.source.kind}),t.jsx("dt",{children:n("assets.detail.sha256","SHA-256")}),t.jsx("dd",{className:s.hashText,children:e.file.sha256}),t.jsx("dt",{children:n("assets.detail.createdAt","Created")}),t.jsx("dd",{children:xe(e.createdAt)}),t.jsx("dt",{children:n("assets.detail.updatedAt","Updated")}),t.jsx("dd",{children:xe(e.updatedAt)}),e.roblox.operationId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.operationId","Operation ID")}),t.jsx("dd",{className:s.hashText,children:e.roblox.operationId})]}),e.roblox.operationPath&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.operationPath","Operation path")}),t.jsx("dd",{className:s.hashText,children:e.roblox.operationPath})]}),e.roblox.versionId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.versionId","Version ID")}),t.jsx("dd",{className:s.hashText,children:e.roblox.versionId})]}),e.roblox.remotePath&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.remotePath","Remote path")}),t.jsx("dd",{className:s.hashText,children:e.roblox.remotePath})]}),e.roblox.moderationState&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.moderationState","Moderation")}),t.jsx("dd",{children:e.roblox.moderationState})]})]}),((A=e.rbxm)==null?void 0:A.thumbnail.attempts)&&e.rbxm.thumbnail.attempts.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.rbxmThumbnailAttempts","Thumbnail attempts")}),e.rbxm.thumbnail.attempts.map((r,g)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[r.method," · ",r.status]}),r.message&&t.jsx("code",{children:r.message})]},`${r.method}-${g}`))]})]})]})]})]})})}function qe(e){return{assetUploadByOpenCloudEnabled:e.hot.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD===!0}}function Xa(e){const a={};return typeof e.assetUploadByOpenCloudEnabled=="boolean"&&(a.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD=e.assetUploadByOpenCloudEnabled),a}async function Ze(){const e=await w.get("/api/dashboard/settings");return qe(e)}async function qa(e){const a=await w.patch("/api/dashboard/settings",Xa(e));return qe(a)}async function Je(){return w.get("/api/dashboard/open-cloud/credential-profiles")}async function Za(e){return w.post("/api/dashboard/open-cloud/credential-profiles",e)}async function Ja(e){return w.patch("/api/dashboard/open-cloud/credential-profiles/active",{profileId:e})}async function Qa(e,a){return w.put(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/api-key`,a)}async function eo(e){return w.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}`)}async function to(e,a){return w.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators`,a)}async function so(e,a){return w.patch(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(a)}/default`,{})}async function ao(e,a){return w.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(a)}`)}async function oo(e,a){return w.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/test`,a?{creatorPresetId:a}:{})}async function no(e){return w.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}function ro(e){return e.category==="image"||e.category==="decal"}function lo(e,a){return e==="group"?a("assets.creator.group","Group"):a("assets.creator.user","User")}function io(e,a){return`${e.label} · ${lo(e.creatorType,a)} ${e.creatorId}`}function Te(e){if(!e)return null;if(e.defaultCreatorId){const a=e.creators.find(u=>u.id===e.defaultCreatorId);if(a)return a}return e.creators[0]??null}function co({asset:e,open:a,canUpload:u,busyAction:o,onClose:l,onBack:$,onOpenSettings:C,onUpload:D}){const{t:p}=he(),G=i.useRef(null),[O,U]=i.useState(null),[m,n]=i.useState(null),[W,K]=i.useState(!1),[V,F]=i.useState(null),[X,I]=i.useState(""),[q,f]=i.useState(""),[P,S]=i.useState(""),[z,j]=i.useState("user"),[v,L]=i.useState("");if(i.useEffect(()=>{I((e==null?void 0:e.displayName)??""),f((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{if(!a)return;let x=!1;return K(!0),F(null),(async()=>{try{const[B,T]=await Promise.all([Ze(),Je()]);if(x)return;U(B);const oe=T.profiles.find(de=>de.id===T.activeProfileId)??T.profiles[0]??null;n(oe);const Y=Te(oe);S((Y==null?void 0:Y.id)??""),j((Y==null?void 0:Y.creatorType)??"user"),L((Y==null?void 0:Y.creatorId)??"")}catch(B){if(x)return;F(B instanceof Error?B.message:p("assets.upload.settingsLoadFailed","Failed to load upload settings.")),U(null),n(null)}finally{x||K(!1)}})(),()=>{x=!0}},[a,p]),i.useEffect(()=>{var B;if(!a||!e)return;(B=G.current)==null||B.focus();const x=T=>{T.key==="Escape"&&l()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,l,a]),!a||!e)return null;const A=(O==null?void 0:O.assetUploadByOpenCloudEnabled)===!0,r=!!m,g=Te(m),Z=(m==null?void 0:m.creators.find(x=>x.id===P))??null,te=!!g,J=(m==null?void 0:m.storageProvider)==="env"&&r&&!te,ae=J&&v.trim().length>0,h=u&&!W&&!V&&(!A||!r||!te&&!J),se=u&&!W&&!V&&A&&r&&(te||ae)&&o!=="upload";return t.jsx("div",{className:s.detailPopupLayer,onClick:l,role:"presentation",children:t.jsxs("section",{ref:G,className:s.detailDialog,role:"dialog","aria-modal":"true","aria-label":p("assets.upload.title","Upload asset"),tabIndex:-1,onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{className:s.detailDialogHeader,children:[t.jsxs("div",{className:s.detailTitleBlock,children:[t.jsxs("span",{className:s.detailEyebrow,children:[ie(e,p)," · ",p("assets.upload.intent","Upload to Roblox")]}),t.jsx("h2",{children:p("assets.upload.title","Upload asset")}),t.jsx("span",{children:e.displayName})]}),t.jsxs("div",{className:s.detailHeaderActions,children:[t.jsxs("button",{type:"button",className:s.commandButton,onClick:$,children:[t.jsx(yt,{size:15}),p("assets.upload.backToDetails","Back to details")]}),t.jsx(H,{text:p("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:l,"aria-label":p("common.close","Close"),children:t.jsx(ke,{size:16})})})]})]}),t.jsxs("div",{className:s.detailDialogBody,children:[t.jsx("div",{className:s.detailPreviewPane,children:ro(e)?t.jsx("img",{className:s.detailPreview,src:Ve(e),alt:e.displayName}):t.jsxs("div",{className:s.detailPreviewFallback,children:[t.jsx("span",{children:ie(e,p)}),t.jsx("code",{children:e.file.original})]})}),t.jsxs("div",{className:s.detailContentPane,children:[!u&&t.jsx("div",{className:s.notice,children:p("assets.proOnly.upload","Roblox upload is available on Pro.")}),W&&t.jsx("div",{className:s.notice,children:p("assets.upload.checkingSettings","Checking upload settings...")}),V&&t.jsx("div",{className:s.errorState,children:V}),t.jsxs("dl",{className:s.compactMeta,children:[t.jsx("dt",{children:p("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,p)}),t.jsx("dt",{children:p("assets.detail.source","Source")}),t.jsx("dd",{children:e.source.originalPath})]}),h&&t.jsxs("div",{className:s.setupNotice,children:[t.jsx("strong",{children:p("assets.upload.settingsRequired","Upload settings required")}),t.jsx("p",{children:r?A?p("assets.upload.settingsRequired.creator","Save a default Creator before uploading."):p("assets.upload.settingsRequired.toggle","Enable Open Cloud upload before uploading."):p("assets.upload.settingsRequired.apiKey","Save an Open Cloud API key before uploading.")}),t.jsxs("button",{type:"button",className:s.commandButton,onClick:C,children:[t.jsx(Ke,{size:15}),p("assets.upload.openSettings","Open Asset Library settings")]})]}),t.jsxs("div",{className:s.formStack,children:[t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.detail.displayName","Display name")}),t.jsx("input",{value:X,disabled:!u,onChange:x=>I(x.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.displayNameHelp","Saved to Roblox as the asset display name.")})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.detail.description","Description")}),t.jsx("textarea",{value:q,rows:3,disabled:!u,onChange:x=>f(x.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.descriptionHelp","Saved to Roblox as the asset description.")})]}),te&&t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.upload.creator","Creator")}),t.jsx("select",{"aria-label":p("assets.upload.creator","Creator"),value:P,disabled:!u||W,onChange:x=>S(x.target.value),children:m==null?void 0:m.creators.map(x=>t.jsx("option",{value:x.id,children:io(x,p)},x.id))}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorHelp","Used by Open Cloud as the owner of the uploaded asset.")})]}),J&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:s.inlineHelp,children:p("assets.upload.envCreatorHelp","Environment API keys cannot save a default Creator here. Enter the Creator for this upload.")}),t.jsxs("div",{className:s.twoColumn,children:[t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.upload.creatorType","Creator type")}),t.jsxs("select",{value:z,disabled:!u,onChange:x=>j(x.target.value),children:[t.jsx("option",{value:"user",children:p("assets.creator.user","User")}),t.jsx("option",{value:"group",children:p("assets.creator.group","Group")})]}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorTypeHelp","Sent to Open Cloud as the Creator type.")})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.upload.creatorId","Creator ID")}),t.jsx("input",{value:v,disabled:!u,onChange:x=>L(x.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorIdHelp","Sent to Open Cloud as the User or Group ID that owns the uploaded asset.")})]})]})]}),t.jsx("button",{type:"button",className:s.primaryButton,disabled:!se,onClick:()=>{const x=v.trim(),B=J&&x?{creatorType:z,creatorId:x}:{},T=!J&&Z&&g&&Z.id!==g.id?{creatorType:Z.creatorType,creatorId:Z.creatorId}:{};D({displayName:X,description:q,...B,...T})},children:o==="upload"?p("assets.upload.uploading","Uploading..."):p("assets.upload.submit","Upload with Roblox Open Cloud")})]}),t.jsxs("div",{className:s.noticeList,children:[t.jsx("p",{children:p("assets.upload.noDelete","WEPPY does not provide Roblox asset deletion.")}),t.jsx("p",{children:p("assets.upload.delay","Roblox processing and moderation can delay visibility in Studio or Creator Dashboard.")})]})]})]})]})})}function Oe(e,a){return e==="env"?a("assets.settings.credential.env","Environment variable"):a("assets.settings.credential.local","Local encrypted file")}function ve(e,a){return e==="valid"?a("assets.settings.validation.valid","Connected"):e==="invalid"?a("assets.settings.validation.invalid","Needs attention"):a("assets.settings.validation.unknown","Not tested")}function uo(e,a){return(e==null?void 0:e.status)==="valid"?a("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??a("assets.settings.tested","Connection tested.")}function po(e,a){return(e==null?void 0:e.status)==="valid"?a("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??a("assets.settings.tested","Connection tested.")}function ho(e,a){return e==="group"?a("assets.creator.group","Group"):a("assets.creator.user","User")}function mo(e,a){return`${ho(e.creatorType,a)} ${e.creatorId}`}function go({open:e,tier:a,onClose:u}){const{t:o}=he(),[l,$]=i.useState(null),[C,D]=i.useState(null),[p,G]=i.useState(""),[O,U]=i.useState(!1),[m,n]=i.useState(""),[W,K]=i.useState(""),[V,F]=i.useState("user"),[X,I]=i.useState(""),[q,f]=i.useState(""),[P,S]=i.useState(!0),[z,j]=i.useState(null),[v,L]=i.useState(null),[A,r]=i.useState(!1),g=a==="basic",Z=i.useCallback(async()=>{r(!0),j(null);try{const[d,N]=await Promise.all([Ze(),Je()]);$(d),D(N);const R=N.profiles.find(re=>re.id===N.activeProfileId)??N.profiles[0]??null;G((R==null?void 0:R.id)??""),U(!R),S(!R||R.creators.length===0),F("user"),I(""),f("")}catch(d){j(d instanceof Error?d.message:o("assets.settings.loadFailed","Failed to load upload settings."))}finally{r(!1)}},[o]);if(i.useEffect(()=>{e&&Z()},[Z,e]),!e)return null;const te=(l==null?void 0:l.assetUploadByOpenCloudEnabled)===!0,E=W.trim(),J=X.trim(),ae=(C==null?void 0:C.profiles)??[],h=ae.find(d=>d.id===p)??ae[0]??null,se=!!h,x=se&&(h==null?void 0:h.storageProvider)==="localFile",B=se&&(h==null?void 0:h.storageProvider)==="env",T=h!=null&&h.defaultCreatorId?h.creators.find(d=>d.id===h.defaultCreatorId):h==null?void 0:h.creators[0],oe=!!(h!=null&&h.creators.length),Y=!oe||P,de=ae.length>1,ne=g?o("assets.settings.action.proRequired","Asset upload settings are available on Pro."):A?o("assets.settings.action.busy","Wait for the current settings action to finish."):null,c=g||A||!E,y=ne??(E?o("assets.settings.saveApiKey.tooltip.ready","Save this API key to local encrypted storage."):o("assets.settings.saveApiKey.tooltip.enter","Enter an Open Cloud API key to save it locally.")),b=g||A||!E&&!se,_=ne??(E?o("assets.settings.testConnection.tooltip.entered","Test the entered API key before saving it."):se?o("assets.settings.testConnection.tooltip.saved","Test the saved Open Cloud API key."):o("assets.settings.testConnection.tooltip.enterOrSaved","Enter an API key or save one before testing the connection.")),k=g||A||!x,M=ne??(x?o("assets.settings.removeApiKey.tooltip.ready","Remove the locally saved Open Cloud API key."):B?o("assets.settings.removeApiKey.tooltip.env","Environment API keys cannot be removed from Dashboard. Remove ROBLOX_OPEN_CLOUD_API_KEY outside WEPPY."):o("assets.settings.removeApiKey.tooltip.none","No local Open Cloud API key is saved.")),ue=g||A||!x||!J,Qe=ne??(B?o("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):x?J?o("assets.settings.saveCreator.tooltip.ready","Save this Creator as the default owner for uploads."):o("assets.settings.saveCreator.tooltip.enterId","Enter a user or group ID before saving the default Creator."):o("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),et=ne??(x?o("assets.settings.addCreator.tooltip.ready","Add another User or Group Creator preset to this profile."):o("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),tt=g||A||B||!x,st=ne??(x?o("assets.settings.unregisterCreator.tooltip.ready","Unregister this Creator from the selected profile."):B?o("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):o("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),at=T?o("assets.settings.saveCreatorPreset","Save Creator"):o("assets.settings.saveCreator","Save default Creator"),ot=(h==null?void 0:h.label)??o("assets.settings.credential.none","No API key saved"),fe=d=>{const N=d.profiles.find(R=>R.id===d.activeProfileId)??d.profiles[0]??null;D(d),G((N==null?void 0:N.id)??""),S(!N||N.creators.length===0),U(d.profiles.length===0)},nt=async()=>{if(h){r(!0);try{const d=await oo(h.id,T==null?void 0:T.id);fe(d),j(po(d.validation,o))}catch(d){j(d instanceof Error?d.message:o("assets.settings.testFailed","Connection test failed."))}finally{r(!1)}}},rt=async()=>{if(v){r(!0);try{if(v.kind==="apiKey"){const d=await eo(v.profileId);fe(d),j(o("assets.settings.apiKeyRemoved","Open Cloud API key unregistered from local storage."))}else{const d=await ao(v.profileId,v.creatorPresetId);fe(d),j(o("assets.settings.creatorUnregistered","Creator unregistered from this profile."))}L(null)}catch(d){j(d instanceof Error?d.message:v.kind==="apiKey"?o("assets.settings.removeFailed","Failed to unregister API key."):o("assets.settings.creatorUnregisterFailed","Failed to unregister Creator."))}finally{r(!1)}}},lt=(v==null?void 0:v.kind)==="apiKey"?o("assets.settings.unregisterApiKey.title","Unregister API Key?"):o("assets.settings.unregisterCreator.title","Unregister Creator?"),it=(v==null?void 0:v.kind)==="apiKey"?o("assets.settings.unregisterApiKey.message","Roblox API key is not revoked. WEPPY only removes the local Credential Profile registration on this device."):o("assets.settings.unregisterCreator.message","Roblox user or group is not deleted. WEPPY only removes this Creator from the selected API Key profile."),ct=(v==null?void 0:v.kind)==="apiKey"?o("assets.settings.removeApiKey","Unregister API Key"):o("assets.settings.unregisterCreator","Unregister Creator");return t.jsxs("section",{id:"asset-library-settings-panel",className:`${s.settingsInlinePanel} ${s.settingsDrawer}`,role:"region","aria-label":o("assets.settings.title","Asset Library settings"),"data-panel-placement":"toolbar-popover",children:[t.jsxs("div",{className:s.drawerHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:o("assets.settings.title","Asset Library settings")}),t.jsx("span",{children:ot})]}),t.jsx(H,{text:o("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:u,"aria-label":o("common.close","Close"),children:t.jsx(ke,{size:16})})})]}),g&&t.jsx("div",{className:`${s.notice} ${s.proNotice}`,children:o("assets.settings.proOnly","Roblox upload settings and Open Cloud credential controls are available on Pro.")}),t.jsxs("section",{className:s.settingsPanel,children:[t.jsxs("label",{className:s.toggleRow,children:[t.jsxs("span",{children:[t.jsx("strong",{children:o("assets.settings.openCloudToggle","Open Cloud upload")}),t.jsx("small",{children:o("assets.settings.openCloudToggle.help","Controls whether server-side Open Cloud upload mutations can run.")})]}),t.jsx("input",{type:"checkbox",checked:te,disabled:g||A,onChange:d=>{(async()=>{r(!0);try{const N=await qa({assetUploadByOpenCloudEnabled:d.target.checked});$(N),j(o("assets.settings.saved","Upload settings saved."))}catch(N){j(N instanceof Error?N.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}})()}})]}),de&&t.jsx("div",{className:s.metadataList,children:ae.map(d=>{const N=d.id===(h==null?void 0:h.id);return t.jsxs("div",{className:s.metadataItem,children:[t.jsx("strong",{children:d.label}),t.jsxs("span",{children:[o("assets.settings.field.storage","Storage"),": ",Oe(d.storageProvider,o)]}),t.jsxs("span",{children:[o("assets.settings.field.validationStatus","Validation status"),": ",ve(d.validationStatus,o)]}),N&&t.jsx("code",{children:o("assets.settings.activeProfileBadge","Active")}),!N&&d.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>{(async()=>{r(!0);try{const R=await Ja(d.id),re=R.profiles.find(je=>je.id===(R.activeProfileId??d.id))??d;D(R),G(re.id),S(re.creators.length===0),F("user"),I(""),f(""),j(o("assets.settings.profileSelected","Open Cloud credential profile selected."))}catch(R){j(R instanceof Error?R.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}})()},children:o("assets.settings.useProfile","Use profile")})]},d.id)})}),h&&t.jsxs("div",{className:s.settingsSubsection,children:[t.jsx("div",{className:s.settingsSectionHeader,children:t.jsx("h3",{children:o("assets.settings.credentialProfile","Credential Profile")})}),t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("dl",{className:s.settingsDefinitionList,children:[t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.profile","Profile")}),t.jsx("dd",{children:h.label})]}),h.maskedKey&&t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.apiKey","API Key")}),t.jsx("dd",{children:h.maskedKey})]}),t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.storage","Storage")}),t.jsx("dd",{children:Oe(h.storageProvider,o)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.validationStatus","Validation status")}),t.jsx("dd",{children:ve(h.validationStatus,o)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.creators","Creators")}),t.jsx("dd",{children:h.creators.length})]})]}),!O&&t.jsxs("div",{className:s.buttonRow,children:[t.jsx(H,{text:_,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:b,onClick:()=>{nt()},children:o("assets.settings.testConnection","Test Connection")})}),x&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>U(!0),children:o("assets.settings.replaceApiKey","Replace API Key")}),t.jsx(H,{text:M,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:k,onClick:()=>L({kind:"apiKey",profileId:h.id}),children:o("assets.settings.removeApiKey","Unregister API Key")})})]})]})]}),O&&t.jsxs("div",{className:s.formStack,children:[t.jsxs("div",{className:s.field,children:[t.jsx("div",{className:s.fieldLabelRow,children:t.jsx("label",{htmlFor:"asset-settings-open-cloud-profile-label",children:o("assets.settings.profileLabel","Profile name")})}),t.jsx("input",{id:"asset-settings-open-cloud-profile-label",value:m,disabled:g||A,onChange:d=>n(d.target.value),placeholder:o("assets.settings.profileLabel.placeholder","Studio automation key")}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.profileLabel.help","Optional. If left blank, WEPPY saves this profile as Open Cloud key automatically.")})]}),t.jsxs("div",{className:s.field,children:[t.jsxs("div",{className:s.fieldLabelRow,children:[t.jsx("label",{htmlFor:"asset-settings-open-cloud-api-key",children:o("assets.settings.apiKey","Open Cloud API Key")}),t.jsx(Pe,{topicId:"openCloudApiKey",variant:"field",state:{hasOpenCloudCredential:se}})]}),t.jsx("input",{id:"asset-settings-open-cloud-api-key",value:W,type:"password",disabled:g||A,onChange:d=>K(d.target.value)}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.apiKey.inlineHelp","WEPPY uses this key only for Roblox Open Cloud requests. The key is encrypted on this device and is not sent to WEPPY servers or stored in any other external storage.")})]}),!se&&t.jsx("p",{className:s.inlineHelp,children:t.jsx("a",{href:"https://create.roblox.com/docs/cloud/auth/api-keys",target:"_blank",rel:"noreferrer",children:o("assets.settings.apiKeyGuide","Create a Roblox API key with Assets Read and Write permissions.")})}),t.jsxs("div",{className:s.buttonRow,children:[t.jsx(H,{text:y,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:c,onClick:()=>{(async()=>{var d;r(!0);try{const N={apiKey:E,...m.trim()?{label:m.trim()}:{}},R=(h==null?void 0:h.storageProvider)==="localFile"?await Qa(h.id,N):await Za(N),re=R.profiles.find(je=>{var Ie;return je.id===(R.activeProfileId??((Ie=R.profile)==null?void 0:Ie.id))});D(R),G(R.activeProfileId??((d=R.profile)==null?void 0:d.id)??""),S(!re||re.creators.length===0),U(!1),K(""),n(""),j(o("assets.settings.apiKeySaved","Open Cloud API key saved locally."))}catch(N){j(N instanceof Error?N.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}})()},children:o("assets.settings.saveApiKey","Save API Key")})}),t.jsx(H,{text:_,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:b,onClick:()=>{(async()=>{r(!0);try{const d=await no(E||void 0);j(uo(d.validation,o))}catch(d){j(d instanceof Error?d.message:o("assets.settings.testFailed","Connection test failed."))}finally{r(!1)}})()},children:o("assets.settings.testConnection","Test Connection")})}),t.jsx(H,{text:M,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:k,onClick:()=>{h&&L({kind:"apiKey",profileId:h.id})},children:o("assets.settings.removeApiKey","Unregister API Key")})})]})]}),t.jsx("div",{className:s.metadataList,children:h==null?void 0:h.creators.map(d=>t.jsxs("div",{className:s.metadataItem,children:[t.jsx("strong",{children:d.label}),t.jsx("span",{children:mo(d,o)}),d.id===h.defaultCreatorId&&t.jsx("code",{children:o("assets.settings.defaultCreatorBadge","Default")}),t.jsxs("span",{children:[o("assets.settings.field.validationStatus","Validation status"),": ",ve(d.validationStatus,o)]}),t.jsxs("div",{className:s.buttonRow,children:[d.id!==h.defaultCreatorId&&h.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>{(async()=>{if(h){r(!0);try{const N=await so(h.id,d.id);D(N),j(o("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(N){j(N instanceof Error?N.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}}})()},children:o("assets.settings.makeDefaultCreator","Make default")}),t.jsx(H,{text:st,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:tt,onClick:()=>L({kind:"creator",profileId:h.id,creatorPresetId:d.id}),children:o("assets.settings.unregisterCreator","Unregister Creator")})})]})]},d.id))}),oe&&!P&&t.jsx(H,{text:et,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A||B||!x,onClick:()=>{F("user"),I(""),f(""),S(!0)},children:o("assets.settings.addCreator","Add Creator")})}),Y&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:s.twoColumn,children:[t.jsxs("div",{className:s.field,children:[t.jsx("div",{className:s.fieldLabelRow,children:t.jsx("label",{htmlFor:"asset-settings-creator-type",children:o("assets.upload.creatorType","Creator type")})}),t.jsxs("select",{id:"asset-settings-creator-type",value:V,disabled:g||A||B||!x,onChange:d=>F(d.target.value),children:[t.jsx("option",{value:"user",children:o("assets.creator.user","User")}),t.jsx("option",{value:"group",children:o("assets.creator.group","Group")})]})]}),t.jsxs("div",{className:s.field,children:[t.jsxs("div",{className:s.fieldLabelRow,children:[t.jsx("label",{htmlFor:"asset-settings-creator-id",children:o("assets.upload.creatorId","Creator ID")}),t.jsx(Pe,{topicId:"openCloudCreatorId",variant:"field",state:{hasDefaultCreator:!!T}})]}),t.jsx("input",{id:"asset-settings-creator-id",value:X,disabled:g||A||B||!x,onChange:d=>I(d.target.value)}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.creatorId.inlineHelp","Default owner for new Roblox assets: your User ID or a Group ID.")})]})]}),t.jsxs("div",{className:s.field,children:[t.jsx("div",{className:s.fieldLabelRow,children:t.jsx("label",{htmlFor:"asset-settings-creator-label",children:o("assets.settings.creatorLabel","Creator label")})}),t.jsx("input",{id:"asset-settings-creator-label",value:q,disabled:g||A||B||!x,onChange:d=>f(d.target.value),placeholder:o("assets.settings.creatorLabel.placeholder","Main studio group")}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.creatorLabel.help","Optional. If left blank, WEPPY automatically saves a label like User 123 or Group 456.")})]}),!T&&t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.creatorHelp","Use the numeric user ID from a profile URL or group ID from a group URL.")}),t.jsxs("div",{className:s.buttonRow,children:[t.jsx(H,{text:Qe,children:t.jsx("button",{type:"button",className:s.primaryButton,disabled:ue,onClick:()=>{(async()=>{if(h){r(!0);try{const d=await to(h.id,{creatorType:V,creatorId:J,makeDefault:!T,...q.trim()?{label:q.trim()}:{}});D(d),I(""),f(""),S(!1),j(o("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(d){j(d instanceof Error?d.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}}})()},children:at})}),oe&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>{F("user"),I(""),f(""),S(!1)},children:o("assets.settings.cancelCreator","Cancel")})]})]})]}),z&&t.jsx("div",{className:s.messageState,children:z}),t.jsx(Ge,{open:v!==null,title:lt,message:it,cancelLabel:o("common.cancel","Cancel"),confirmLabel:ct,loading:A,onCancel:()=>L(null),onConfirm:()=>{rt()}})]})}const xo=12,bo=5e3;function le(e,a){return e instanceof Error&&e.message.trim().length>0?e.message:a}function Ce(e,a){return e.some(o=>o.id===a.id)?e.map(o=>o.id===a.id?a:o):[a,...e]}function _e(e,a){return qt(e.filter(u=>Xt(u,a)))}function pe(e,a){return e?`${e.displayName} (${e.id})`:a??"unknown asset"}function yo(e){return e.length===0?"none":e.map(a=>pe(a)).join(", ")}function Fe(e){const a=`status ${e.status}`;return e.roblox.assetId?`Roblox asset ${e.roblox.assetId}; ${a}`:a}function fo(e,a){const u=pe(a);return e==="update"?`Updated metadata for asset: ${u}.`:e==="upload"?`Uploaded asset: ${u} -> ${Fe(a)}.`:e==="thumbnail-generate"?`Generated thumbnail for asset: ${u}.`:e==="status-refresh"?`Refreshed Roblox status for asset: ${u} -> ${Fe(a)}.`:e==="usage-scan"?`Scanned usage for asset: ${u} -> ${a.usage.references.length} reference(s).`:`Updated asset: ${u}.`}function jo(e){return e!=="upload"&&e!=="status-refresh"}function Se(e,a){if((a==null?void 0:a.id)===e)return a.category;const u=/^asset_(image|decal|audio|mesh|model|video|animation)_/.exec(e);return u!=null&&u[1]?u[1]:null}function Me(e){return e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath)}function vo(e){return{scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0,category:e.category}}function Co(e){if(e.pluginConnected&&e.activePlaceId!==null)return{placeId:e.activePlaceId,placeName:e.activePlaceName,studioConnected:!0};if(e.lastActivePlaceId!==null)return{placeId:e.lastActivePlaceId,placeName:e.lastActivePlaceName,studioConnected:!1};const a=e.places[0];return{placeId:(a==null?void 0:a.placeId)??null,placeName:(a==null?void 0:a.placeName)??null,studioConnected:!1}}function _o(){const[e,a]=i.useState([]),[u,o]=i.useState(0),[l,$]=i.useState(null),[C,D]=i.useState("place"),[p,G]=i.useState("all"),[O,U]=i.useState(null),[m,n]=i.useState(null),[W,K]=i.useState(!1),[V,F]=i.useState(!0),[X,I]=i.useState(null),[q,f]=i.useState(null),[P,S]=i.useState(null),z=i.useRef(!0),j=i.useRef(new Map),v=i.useMemo(()=>e.find(c=>c.id===l)??null,[e,l]),L=i.useCallback(c=>{const y=j.current.get(c);y!==void 0&&(clearTimeout(y),j.current.delete(c))},[]),A=i.useCallback((c,y=xo)=>{if(!Me(c)||y<=0){L(c.id);return}L(c.id),(async()=>{try{const b=await Re(vo(c),c.id);if(!z.current)return;if(a(_=>Ce(_,b)),Me(b)&&y>1){const _=setTimeout(()=>{j.current.delete(b.id),A(b,y-1)},bo);j.current.set(b.id,_);return}L(b.id)}catch(b){if(!z.current)return;L(c.id),f(le(b,"Asset Library status refresh failed."))}})()},[L]);i.useEffect(()=>()=>{z.current=!1;for(const c of j.current.values())clearTimeout(c);j.current.clear()},[]);const r=i.useCallback(()=>({scope:C,placeId:C==="place"?O:void 0}),[O,C]),g=i.useCallback(c=>({...r(),category:c}),[r]),Z=i.useCallback(async()=>{try{const c=await ht(),y=Co(c);return U(y.placeId),n(y.placeName),K(y.studioConnected),y.placeId}catch{return U(null),n(null),K(!1),null}},[]),te=i.useCallback(async()=>{f(null);try{const c=await Z(),y={scope:C,placeId:C==="place"?c:void 0};if(C==="place"&&c===null){a([]),o(0),F(!1),f("No active place is connected for place-scoped assets.");return}const b=await Promise.all($e(p).map(k=>Tt({...y,category:k}))),_=_e(b.flatMap(k=>k.assets),p);a(_),o(_.length)}catch(c){f(le(c,"Failed to load Asset Library."))}finally{F(!1)}},[p,Z,C]);i.useEffect(()=>{te()},[te]);const E=i.useCallback(async(c,y,b)=>{const _=Se(y,v);if(!_)return f("Asset category is unavailable."),null;I(c),f(null),S(null);try{const k=await b(g(_));return a(M=>Ce(M,k)),$(k.id),jo(c)&&S(fo(c,k)),k}catch(k){return f(le(k,"Asset Library action failed.")),null}finally{I(null)}},[g,v]),J=i.useCallback(async()=>{I("rescan"),f(null),S(null);try{const c=await Promise.all($e(p).map(M=>Ot(g(M)))),y=_e(c.flatMap(M=>M.assets),p),b=c.reduce((M,ue)=>M+ue.adoptedCount,0),_=c.reduce((M,ue)=>M+ue.skippedCount,0),k=_e(c.flatMap(M=>M.adopted),p);a(y),o(y.length),S(`Rescan complete for ${p}: ${b} asset(s) added, ${_} skipped. Added: ${yo(k)}.`)}catch(c){f(le(c,"Asset Library rescan failed."))}finally{I(null)}},[p,g]),ae=i.useCallback(async(c,y)=>{I("export-selection-rbxm"),f(null),S(null);try{const b=await Gt(g(c),y);return a(_=>Ce(_,b.asset)),$(b.asset.id),S(`Exported Studio selection as RBXM asset: ${pe(b.asset)}${b.deduplicated?" (reused existing local asset)":""}.`),b}catch(b){return f(le(b,"Asset Library .rbxm export failed.")),null}finally{I(null)}},[g]),h=i.useCallback((c,y)=>E("update",c,b=>Ft(b,c,y)),[E]),se=i.useCallback(async(c,y)=>{const b=await E("upload",c,_=>Ht(_,c,y));return b&&A(b),b},[E,A]),x=i.useCallback(async c=>{const y=Se(c,v);if(!y)return f("Asset category is unavailable."),!1;L(c);const b=e.find(_=>_.id===c)??v;I("delete"),f(null),S(null);try{return await Mt(g(y),c),a(_=>{const k=_.filter(M=>M.id!==c);return o(k.length),k}),$(_=>_===c?null:_),S(`Deleted asset: ${pe(b,c)}. Local files removed; uploaded Roblox assets were not deleted.`),!0}catch(_){return f(le(_,"Asset Library delete failed.")),!1}finally{I(null)}},[e,L,g,v]),B=i.useCallback(async(c,y)=>{const b=Se(c,v);if(!b)return f("Asset category is unavailable."),null;const _=e.find(k=>k.id===c)??v;I("import-rbxm"),f(null),S(null);try{const k=await Wt(g(b),c,y);return $(c),S(`Imported RBXM asset: ${pe(_,c)} -> ${k.importedCount} instance(s) to ${k.targetParent}.`),k}catch(k){return f(le(k,"Asset Library .rbxm import failed.")),null}finally{I(null)}},[e,g,v]),T=i.useCallback(c=>E("thumbnail-generate",c,y=>zt(y,c)),[E]),oe=i.useCallback(c=>(L(c),E("status-refresh",c,y=>Re(y,c))),[L,E]),Y=i.useCallback((c,y)=>E("usage-scan",c,async b=>(await Kt(b,c,y)).asset),[E]),de=i.useCallback(c=>{D(c),$(null)},[]),ne=i.useCallback(c=>{Yt(c)&&(G(c),$(null))},[]);return{assets:e,totalCount:u,selectedAsset:v,selectedAssetId:l,scope:C,categoryFilter:p,activePlaceId:O,activePlaceName:m,studioConnected:W,loading:V,busyAction:X,error:q,lastMessage:P,setScope:de,setCategoryFilter:ne,selectAsset:$,refresh:te,rescan:J,exportSelectionRbxm:ae,updateMetadata:h,uploadAsset:se,deleteAsset:x,importRbxm:B,generateThumbnail:T,refreshStatus:oe,scanUsage:Y}}function So(e,a){return a("assets.count.shown","Shown assets: {count}").replace("{count}",String(e))}function Po(){const{t:e}=he(),{trackEvent:a}=mt(),{tier:u,loading:o}=gt(),l=_o(),[$,C]=i.useState(!1),[D,p]=i.useState(!1),[G,O]=i.useState(!1),U=!o&&u==="pro",m=l.selectedAsset,n=(m==null?void 0:m.file.original.toLowerCase().endsWith(".rbxm"))??!1,W=(m==null?void 0:m.category)==="model"||(m==null?void 0:m.category)==="animation",K="game.Workspace",F=!!(U&&l.studioConnected&&m&&n&&W),X=i.useMemo(()=>l.scope==="place"?l.activePlaceName??e("assets.scope.place","Current Place"):e("assets.scope.shared","Shared"),[l.activePlaceName,l.scope,e]),I=i.useMemo(()=>Ae(l.categoryFilter,e),[l.categoryFilter,e]),q=So(l.totalCount,e),f=e("assets.detail.importRbxm.tooltip","Insert this local RBXM asset into {target} in the connected Studio place.").replace("{target}",K);return t.jsxs("div",{className:s.page,children:[t.jsx(xt,{title:e("assets.title","Assets"),description:e("assets.subtitle","Browse local originals, upload to Roblox, and inspect synced usage by place."),badge:t.jsx("span",{className:s.experimentalBadge,children:e("assets.experimental","Experimental")}),helpTopicId:"assets",helpState:{tier:u}}),t.jsxs("div",{className:s.toolbarShell,children:[t.jsxs("div",{className:s.toolbar,children:[t.jsxs("div",{className:s.segmented,role:"group","aria-label":e("assets.scope.label","Asset scope"),children:[t.jsx("button",{type:"button",className:l.scope==="place"?s.segmentedActive:"",onClick:()=>l.setScope("place"),children:e("assets.scope.place","Current Place")}),t.jsx("button",{type:"button",className:l.scope==="shared"?s.segmentedActive:"",onClick:()=>l.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),t.jsxs("div",{className:s.listContextSummary,children:[t.jsx("span",{children:X}),t.jsx("span",{className:s.contextDivider,children:" · "}),t.jsx("span",{children:I}),t.jsx("span",{className:s.contextDivider,children:" · "}),t.jsx("strong",{children:q})]}),t.jsxs("div",{className:s.toolbarActions,children:[t.jsx(H,{text:e("assets.rescan.tooltip","Scan inbox folders for the current filter."),children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:l.busyAction==="rescan",onClick:()=>{a("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),l.rescan()},children:[t.jsx(He,{size:15}),e("assets.rescan","Rescan")]})}),t.jsx(H,{text:D?"":e("assets.settings.open.tooltip","Open Roblox upload settings."),children:t.jsx("button",{type:"button",className:[s.iconButton,D?s.iconButtonActive:""].filter(Boolean).join(" "),onClick:()=>{a("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),p(P=>!P)},"aria-label":e("assets.settings.open","Open settings"),"aria-controls":"asset-library-settings-panel","aria-expanded":D,children:t.jsx(Ke,{size:16})})})]}),t.jsxs("div",{className:s.categoryControl,children:[t.jsx("span",{id:"assets-category-filter-label",className:s.categoryControlLabel,children:e("assets.category.filter","Category")}),t.jsx("div",{className:s.categoryRail,role:"radiogroup","aria-labelledby":"assets-category-filter-label",children:Xe.map(P=>{const S=l.categoryFilter===P,z=Ae(P,e);return t.jsx("button",{type:"button",role:"radio","aria-checked":S,className:[s.categoryButton,S?s.categoryButtonActive:""].filter(Boolean).join(" "),onClick:()=>{l.setCategoryFilter(P)},children:z},P)})})]})]}),t.jsx(go,{open:D,tier:u,onClose:()=>p(!1)})]}),l.error&&t.jsx("div",{className:s.errorState,children:l.error}),l.lastMessage&&t.jsx("div",{className:s.messageState,children:l.lastMessage}),l.categoryFilter==="rbxm"&&t.jsxs("section",{className:s.rbxmGuide,"aria-label":e("assets.rbxmGuide.title","Save RBXM from Studio"),children:[t.jsx("h2",{children:e("assets.rbxmGuide.title","Save RBXM from Studio")}),t.jsx("p",{children:e("assets.rbxmGuide.body","Select objects in Roblox Studio, then use WEPPY Plugin > Assets to save the selection as a local RBXM asset.")}),t.jsx("p",{children:e("assets.rbxmGuide.thumbnail","The plugin save flow includes a thumbnail option, and saved RBXM assets appear here for management, upload, and insertion.")})]}),!U&&!o&&t.jsx("div",{className:`${s.notice} ${s.proNotice}`,children:e("assets.basic.notice","Browse, preview, edit metadata, and scan usage on Basic. Roblox upload controls are available on Pro.")}),l.loading?t.jsx("div",{className:s.emptyState,children:e("common.loading","Loading...")}):t.jsx(Ua,{assets:l.assets,selectedAssetId:l.selectedAssetId,onSelect:l.selectAsset}),t.jsx(Ya,{asset:$||D||G?null:m,busyAction:l.busyAction,canUpload:U,canImportRbxm:F,importRbxmTooltip:f,importRbxmTargetParent:K,onClose:()=>l.selectAsset(null),onSave:async(P,S)=>{m&&await l.updateMetadata(m.id,{displayName:P,description:S})},onUpload:()=>C(!0),onDelete:()=>O(!0),onImportRbxm:async()=>{m&&(a("dashboard_click_event",{click_target:"assets_import_rbxm",page:"assets"}),await l.importRbxm(m.id,{targetParent:K}))},onRefreshStatus:async()=>{m&&await l.refreshStatus(m.id)},onScanUsage:async()=>{m&&(a("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await l.scanUsage(m.id,l.activePlaceId??void 0))}}),t.jsx(Ge,{open:G&&!!m,title:e("assets.delete.title","Delete asset"),message:e("assets.delete.message","This removes the local Asset Library files only. Uploaded Roblox assets are not deleted."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.delete","Delete"),loading:l.busyAction==="delete",onCancel:()=>O(!1),onConfirm:()=>{m&&(a("dashboard_click_event",{click_target:"assets_delete",page:"assets"}),l.deleteAsset(m.id).then(P=>{P&&O(!1)}))}}),t.jsx(co,{asset:m,open:$,canUpload:U,busyAction:l.busyAction,onClose:()=>{C(!1),l.selectAsset(null)},onBack:()=>C(!1),onOpenSettings:()=>{C(!1),p(!0)},onUpload:async P=>{if(!m)return;a("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await l.uploadAsset(m.id,P)&&C(!1)}})]})}export{Po as Component};
@@ -0,0 +1 @@
1
+ ._page_8op6c_1{display:flex;flex-direction:column;gap:14px;min-height:100%;max-width:var(--content-max)}._experimentalBadge_8op6c_9{display:inline-flex;align-items:center;min-height:20px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border));border-radius:4px;background:color-mix(in srgb,var(--accent) 14%,var(--bg-card));color:var(--accent);padding:0 7px;font-family:var(--font-label);font-size:11px;line-height:1}._toolbarShell_8op6c_23{position:relative;z-index:30;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px 0}._toolbar_8op6c_23{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._toolbar_8op6c_23>._segmented_8op6c_39{order:1}._toolbar_8op6c_23>._listContextSummary_8op6c_43{order:2;flex:1 1 auto;min-width:220px}._toolbar_8op6c_23>._toolbarActions_8op6c_49{order:3;margin-left:auto}._categoryControl_8op6c_54{order:4;display:inline-flex;align-items:center;gap:8px;width:100%;min-width:0;flex:1 0 100%}._listContextSummary_8op6c_43{color:var(--text-secondary);font-size:12px;line-height:1.4}._listContextSummary_8op6c_43 strong{color:var(--text-primary);font-family:var(--font-label);font-weight:600}._contextDivider_8op6c_76{color:var(--text-muted)}._categoryControlLabel_8op6c_80{flex:0 0 auto;color:var(--text-secondary);font-size:12px}._categoryRail_8op6c_86{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}._categoryButton_8op6c_94{min-height:32px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);padding:0 10px;font-family:var(--font-label);font-size:12px;line-height:1;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition)}._categoryButton_8op6c_94:hover{border-color:var(--accent);color:var(--text-primary)}._categoryButton_8op6c_94:disabled{cursor:not-allowed;opacity:.48}._categoryButton_8op6c_94:disabled:hover{border-color:var(--border);color:var(--text-secondary)}._categoryButtonActive_8op6c_123{border-color:color-mix(in srgb,var(--accent) 76%,var(--border));background:var(--accent-dim);color:var(--accent)}._toolbarActions_8op6c_49,._actionRow_8op6c_130,._copyRow_8op6c_131,._buttonRow_8op6c_132{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_8op6c_39{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--bg-card)}._segmented_8op6c_39 button{border:0;border-right:1px solid var(--border);background:transparent;color:var(--text-secondary);padding:0 10px;font-family:var(--font-label);font-size:12px;cursor:pointer}._segmented_8op6c_39 button:last-child{border-right:0}._segmented_8op6c_39 ._segmentedActive_8op6c_163{background:var(--accent-dim);color:var(--accent)}._filterLabel_8op6c_168{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_8op6c_168 select{min-height:32px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._commandButton_8op6c_186,._primaryButton_8op6c_187,._iconButton_8op6c_188{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition),opacity var(--transition)}._commandButton_8op6c_186{min-height:32px;padding:6px 10px;text-decoration:none}._primaryButton_8op6c_187{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_8op6c_188{width:32px;height:32px;padding:0}._commandButton_8op6c_186:hover,._primaryButton_8op6c_187:hover,._iconButton_8op6c_188:hover{border-color:var(--accent)}._dangerButton_8op6c_228{color:var(--error-text)}._dangerButton_8op6c_228:hover{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}._iconButtonActive_8op6c_238{border-color:var(--accent);background:var(--accent-dim);color:var(--accent)}._commandButton_8op6c_186:disabled,._primaryButton_8op6c_187:disabled,._iconButton_8op6c_188:disabled{cursor:not-allowed;opacity:.5}._grid_8op6c_251{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}._assetCard_8op6c_257{display:flex;flex-direction:column;gap:8px;min-width:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:8px;color:var(--text-primary);text-align:left;cursor:pointer}._assetCardSelected_8op6c_271{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_8op6c_276{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_8op6c_276{width:100%;height:100%;object-fit:contain}._thumbnailFallback_8op6c_292{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--border);border-radius:8px;color:var(--text-secondary);background:var(--bg-card)}._assetCardBody_8op6c_303{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_8op6c_310{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_8op6c_318{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_8op6c_325,._categoryPill_8op6c_326{border:1px solid var(--border);border-radius:4px;padding:2px 6px;font-size:11px;color:var(--text-secondary)}._categoryPill_8op6c_326{color:var(--text-primary);background:var(--bg-secondary)}._status_uploaded_8op6c_339{color:var(--success);border-color:var(--success)}._status_failed_8op6c_344{color:var(--error);border-color:var(--error)}._status_processing_8op6c_349,._status_uploading_8op6c_350{color:var(--warning);border-color:var(--warning)}._assetId_8op6c_355,._scopeText_8op6c_356,._muted_8op6c_357{color:var(--text-muted);font-size:12px}._emptyState_8op6c_362,._notice_8op6c_363,._errorState_8op6c_364,._messageState_8op6c_365{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_8op6c_362{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_8op6c_362 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_8op6c_363{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_8op6c_395{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_8op6c_364{color:var(--error);border-color:var(--error)}._messageState_8op6c_365{color:var(--success);border-color:var(--success)}._rbxmGuide_8op6c_411{display:flex;flex-direction:column;gap:6px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border));border-radius:var(--radius);background:color-mix(in srgb,var(--accent) 8%,var(--bg-card));padding:14px}._rbxmGuide_8op6c_411 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;letter-spacing:0}._rbxmGuide_8op6c_411 p{margin:0;max-width:760px;color:var(--text-secondary);font-size:12px;line-height:1.5}._drawer_8op6c_437{position:fixed;top:0;right:0;z-index:40;width:min(460px,100vw);height:100vh;overflow-y:auto;border-left:1px solid var(--border);background:var(--bg-primary);padding:18px;box-shadow:-12px 0 24px #00000047}._settingsInlinePanel_8op6c_451{position:absolute;top:calc(100% + 8px);right:0;z-index:35;display:flex;flex-direction:column;gap:12px;width:min(560px,100%);max-height:min(680px,calc(100vh - var(--header-height) - 112px));overflow-y:auto;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);padding:14px;box-shadow:0 18px 44px #00000057;animation:_settingsPopoverIn_8op6c_1 .12s ease-out;transform-origin:top right}._settingsDrawer_8op6c_471{width:min(560px,100%)}@keyframes _settingsPopoverIn_8op6c_1{0%{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}._detailPopupLayer_8op6c_487{position:fixed;top:calc(var(--header-height) + 16px);right:24px;bottom:24px;left:calc(var(--sidebar-width) + 24px);z-index:900;display:flex;align-items:stretch;justify-content:center;padding:clamp(12px,2vw,24px);background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-sizing:border-box}._detailDialog_8op6c_503{width:min(1120px,100%);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);box-shadow:0 24px 60px #0000006b}._detailDialog_8op6c_503:focus{outline:none}._detailDialogHeader_8op6c_520{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg-card) 92%,var(--bg-secondary))}._detailTitleBlock_8op6c_531{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_8op6c_531 h2{margin:0;font-size:18px;letter-spacing:0}._detailTitleBlock_8op6c_531 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_8op6c_553{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_8op6c_562{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_8op6c_570{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_8op6c_579{min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:24px;border-right:1px solid var(--border);background:var(--bg-secondary)}._detailPreview_8op6c_579,._detailPreviewFallback_8op6c_591{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_8op6c_579{display:block;object-fit:contain}._detailPreviewFallback_8op6c_591{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_8op6c_591 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailPreviewFallback_8op6c_591 small{max-width:88%;color:var(--text-muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere;text-align:center}._detailContentPane_8op6c_627{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_8op6c_627 ._formStack_8op6c_633{margin-top:0}._drawerHeader_8op6c_637{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._settingsInlinePanel_8op6c_451 ._drawerHeader_8op6c_637{margin-bottom:0}._drawerHeader_8op6c_637 h2{margin:0;font-size:18px;letter-spacing:0}._drawerHeader_8op6c_637 span{color:var(--text-muted);font-size:12px}._preview_8op6c_660,._previewFallback_8op6c_661{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_8op6c_660{object-fit:contain}._previewFallback_8op6c_661{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_8op6c_661 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_8op6c_633,._detailSection_8op6c_688,._noticeList_8op6c_689,._settingsPanel_8op6c_690{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_8op6c_689{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_8op6c_689 p{margin:0}._setupNotice_8op6c_707{display:grid;gap:8px;margin-top:14px;border:1px solid var(--warning-border);border-radius:6px;background:var(--warning-bg);color:var(--warning-text);padding:12px;font-size:12px}._setupNotice_8op6c_707 strong{color:var(--text-primary);font-size:13px}._setupNotice_8op6c_707 p{margin:0}._setupNotice_8op6c_707 ._commandButton_8op6c_186{justify-self:start}._field_8op6c_732{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._fieldLabelRow_8op6c_740{display:flex;align-items:center;gap:4px;min-height:24px}._fieldLabelRow_8op6c_740 label,._fieldLabelRow_8op6c_740 span{min-width:0}._field_8op6c_732 input,._field_8op6c_732 textarea,._field_8op6c_732 select{width:100%;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);padding:8px;font:inherit}._fieldHelp_8op6c_764{color:var(--text-muted);line-height:1.35}._twoColumn_8op6c_769{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_8op6c_688{padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_8op6c_780{margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_8op6c_780 summary{cursor:pointer;color:var(--text-secondary);font-size:13px;font-weight:600}._technicalDetails_8op6c_780 summary:hover{color:var(--text-primary)}._technicalDetails_8op6c_780 ._detailGrid_8op6c_797,._technicalDetails_8op6c_780 ._metadataList_8op6c_798{margin-top:10px}._detailSection_8op6c_688 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_8op6c_797,._compactMeta_8op6c_809{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_8op6c_809{border:1px solid var(--border);border-radius:6px;padding:10px;background:var(--bg-card)}._detailGrid_8op6c_797 dt,._compactMeta_8op6c_809 dt{color:var(--text-muted)}._detailGrid_8op6c_797 dd,._compactMeta_8op6c_809 dd{margin:0;min-width:0;overflow-wrap:anywhere}._copyableValue_8op6c_836{display:inline-flex;align-items:center;gap:6px}._copyableValue_8op6c_836 span{min-width:0;overflow-wrap:anywhere}._inlineCopyButton_8op6c_847{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text-muted);cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition)}._inlineCopyButton_8op6c_847:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._hashText_8op6c_868{font-family:var(--font-code)}._usageList_8op6c_872{display:flex;flex-direction:column;gap:8px}._usageItem_8op6c_878,._metadataItem_8op6c_879{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._metadataList_8op6c_798{display:flex;flex-direction:column;gap:8px}._metadataList_8op6c_798 strong,._usageItem_8op6c_878 strong{color:var(--text-primary);overflow-wrap:anywhere}._metadataItem_8op6c_879 span{color:var(--text-secondary);overflow-wrap:anywhere}._metadataItem_8op6c_879 code,._usageItem_8op6c_878 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_8op6c_690{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._settingsInlinePanel_8op6c_451 ._settingsPanel_8op6c_690{border:0;border-radius:0;background:transparent;padding:0;margin-top:0}._settingsSubsection_8op6c_927{display:grid;gap:8px}._settingsSectionHeader_8op6c_932{display:flex;align-items:center;justify-content:space-between;gap:10px}._settingsSectionHeader_8op6c_932 h3{margin:0;color:var(--text-primary);font-size:13px}._settingsDefinitionList_8op6c_945{display:grid;gap:6px;margin:0}._settingsDefinitionList_8op6c_945 div{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:10px}._settingsDefinitionList_8op6c_945 dt{color:var(--text-muted)}._settingsDefinitionList_8op6c_945 dd{margin:0;color:var(--text-primary);overflow-wrap:anywhere}._toggleRow_8op6c_967{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_8op6c_967 span{display:grid;gap:3px}._toggleRow_8op6c_967 small,._inlineHelp_8op6c_981{color:var(--text-muted);font-size:12px}._toggleRow_8op6c_967 input{width:18px;height:18px}._inlineHelp_8op6c_981{margin:0}._inlineHelp_8op6c_981 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_8op6c_487{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_8op6c_570{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_8op6c_487{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_8op6c_520{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_8op6c_562{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_8op6c_570{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_8op6c_579{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_8op6c_579,._detailPreviewFallback_8op6c_591{max-width:340px}._detailContentPane_8op6c_627{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_8op6c_1058,._toolbar_8op6c_23{align-items:stretch;flex-direction:column}._headerMeta_8op6c_1064{justify-items:start}._toolbarActions_8op6c_49{justify-content:flex-start}._settingsInlinePanel_8op6c_451{right:auto;left:0;width:100%;transform-origin:top left}._twoColumn_8op6c_769{grid-template-columns:1fr}}
@@ -1 +1 @@
1
- import{r,a as R,u as M,b as B,c as V,j as e}from"./index-VNIYQxwF.js";import{I as G}from"./InfoLabel-LyMkHb1i.js";import{G as D}from"./GameChangeDetail-BvLY7yg8.js";import{T as m}from"./TooltipText-BPEldl3x.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
1
+ import{r,a as R,u as M,b as B,c as V,j as e}from"./index-1ZlHj3-1.js";import{I as G}from"./InfoLabel-CldY9uOT.js";import{G as D}from"./GameChangeDetail-BmXlRT3i.js";import{T as m}from"./TooltipText-DazmfUnr.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
@@ -0,0 +1 @@
1
+ import{r,a as M,D as P,u as D,j as e,i as V,c as O,m as K,n as G,T as H}from"./index-1ZlHj3-1.js";import{P as U}from"./PageHeader-ueZvp6K9.js";import{C as Z}from"./ConfirmModal-DSKr5eS9.js";import{T as $}from"./TooltipText-DazmfUnr.js";import{T as q}from"./Tabs-BgJY0tsU.js";const z=10;function J(){const[s,d]=r.useState([]),[t,n]=r.useState(0),[a,m]=r.useState(!1),[g,f]=r.useState(!0),[i,v]=r.useState(0),[h,x]=r.useState("all"),N=r.useRef(null),_=r.useCallback(async(p,y)=>{f(!0);try{const j={limit:String(z),offset:String(p)};y!=="all"&&(j.status=y);const b=await M.get("/api/dashboard/changelog",j);d(b.entries),n(b.total),m(b.hasMore)}catch{d([]),n(0),m(!1)}finally{f(!1)}},[]),C=r.useCallback(()=>{_(i,h)},[_,i,h]),c=r.useCallback(async()=>{await M.post("/api/dashboard/changelog/clear"),d([]),n(0),m(!1)},[]);return r.useEffect(()=>{_(i,h)},[_,i,h]),r.useEffect(()=>{const p=new P;N.current=p,p.connect();const y=p.on("command",()=>{_(i,h)});return()=>{y(),p.disconnect(),N.current=null}},[_,i,h]),{entries:s,total:t,hasMore:a,loading:g,offset:i,statusFilter:h,setOffset:v,setStatusFilter:x,refresh:C,clear:c}}const Q="_card_1n89u_2",W="_header_1n89u_17",X="_statusBadge_1n89u_24",Y="_statusDot_1n89u_35",ee="_active_1n89u_41",te="_completed_1n89u_50",se="_timeRange_1n89u_58",ae="_summaryList_1n89u_65",ne="_summaryItem_1n89u_71",oe="_summaryIcon_1n89u_80",ce="_summaryText_1n89u_86",ie="_progressBar_1n89u_91",le="_progressFill_1n89u_99",re="_emptySummary_1n89u_112",ge="_contextBlock_1n89u_120",de="_contextLabel_1n89u_129",me="_contextValue_1n89u_137",o={card:Q,header:W,statusBadge:X,statusDot:Y,active:ee,completed:te,timeRange:se,summaryList:ae,summaryItem:ne,summaryIcon:oe,summaryText:ce,progressBar:ie,progressFill:le,emptySummary:re,contextBlock:ge,contextLabel:de,contextValue:me};function R(s){if(!s)return"--:--";const d=new Date(s);return`${String(d.getHours()).padStart(2,"0")}:${String(d.getMinutes()).padStart(2,"0")}`}function he({entry:s,onClick:d}){var j,b,I,k,B,L,A,w,E,F;const{t}=D(),n=s.changeSummary,a=s.status==="active",m=s.isBootstrapOnly===!0,g=[],f=n.scriptsModified+n.scriptsCreated;if(f>0){const u=[];n.scriptsModified>0&&u.push(`${n.scriptsModified} ${t("changelog.card.modified","modified")}`),n.scriptsCreated>0&&u.push(`${n.scriptsCreated} ${t("changelog.card.created","created")}`);const S=`${f} ${t("changelog.card.scripts","scripts")} ${u.join(", ")}`;g.push({icon:"📝",text:S,tooltip:t("changelog.card.scripts.tooltip","Script changes made in this session.")})}const i=n.instancesCreated+n.instancesDeleted+n.instancesMoved;if(i>0){const u=[];n.instancesCreated>0&&u.push(`${n.instancesCreated} ${t("changelog.card.created","created")}`),n.instancesDeleted>0&&u.push(`${n.instancesDeleted} ${t("changelog.card.deleted","deleted")}`),n.instancesMoved>0&&u.push(`${n.instancesMoved} ${t("changelog.card.moved","moved")}`);const S=`${i} ${t("changelog.card.instances","instances")} ${u.join(", ")}`;g.push({icon:"🧱",text:S,tooltip:t("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}n.propertiesChanged>0&&g.push({icon:"🎨",text:`${n.propertiesChanged} ${t("changelog.card.propertiesChanged","properties changed")}`,tooltip:t("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),n.lightingChanged&&g.push({icon:"🌅",text:t("changelog.card.lightingConfigured","Lighting configured"),tooltip:t("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),n.terrainChanged&&g.push({icon:"⛰️",text:t("changelog.card.terrainConfigured","Terrain configured"),tooltip:t("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),n.assetsInserted>0&&g.push({icon:"📦",text:`${n.assetsInserted} ${t("changelog.card.assetsInserted","assets inserted")}`,tooltip:t("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const v=R(s.startTime),h=a?t("changelog.card.inProgress","in progress"):s.endTime?R(s.endTime):"--:--",x=m?t("changelog.card.bootstrapStatus","Bootstrap"):a?t("changelog.card.active","Active"):t("changelog.card.completed","Completed"),N=m?t("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):a?t("changelog.card.active.tooltip","This session is still receiving new game changes."):t("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),_=m?t("changelog.card.bootstrapSummary","Initial sync snapshot"):t("changelog.card.noChanges","No changes yet"),C=m?t("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):t("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet."),c=(b=(j=s.contextSummary)==null?void 0:j.intent)==null?void 0:b.trim(),p=((L=(B=(k=(I=s.contextSummary)==null?void 0:I.affectedAreas)==null?void 0:k[0])==null?void 0:B.label)==null?void 0:L.trim())||((w=(A=s.contextSummary)==null?void 0:A.testScenario)==null?void 0:w.trim()),y=(F=(E=s.verificationSummary)==null?void 0:E.label)==null?void 0:F.trim();return e.jsxs("div",{className:o.card,onClick:d,children:[e.jsxs("div",{className:o.header,children:[e.jsx($,{text:N,children:e.jsxs("span",{className:`${o.statusBadge} ${a?o.active:o.completed}`,children:[e.jsx("span",{className:o.statusDot}),x]})}),e.jsxs("span",{className:o.timeRange,children:[v,"~",h]})]}),e.jsx("div",{className:o.summaryList,children:g.length>0?g.map((u,S)=>e.jsxs("div",{className:o.summaryItem,children:[e.jsx("span",{className:o.summaryIcon,children:u.icon}),e.jsx($,{text:u.tooltip,children:e.jsx("span",{className:o.summaryText,children:u.text})})]},S)):e.jsx($,{text:C,children:e.jsx("span",{className:o.emptySummary,style:{display:"block"},children:_})})}),c&&e.jsxs("div",{className:o.contextBlock,children:[e.jsx("span",{className:o.contextLabel,children:t("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:o.contextValue,children:c})]}),!c&&p&&e.jsxs("div",{className:o.contextBlock,children:[e.jsx("span",{className:o.contextLabel,children:t("changelog.card.representativeArea","Representative area")}),e.jsx("span",{className:o.contextValue,children:p})]}),y&&e.jsxs("div",{className:o.contextBlock,children:[e.jsx("span",{className:o.contextLabel,children:t("changelog.card.verification","Verification")}),e.jsx("span",{className:o.contextValue,children:y})]}),a&&e.jsx("div",{className:o.progressBar,children:e.jsx("div",{className:o.progressFill})})]})}const pe="_page_1tggr_2",ue="_limitNotice_1tggr_9",_e="_limitNoticeContent_1tggr_23",fe="_limitNoticeTitle_1tggr_28",xe="_limitNoticeText_1tggr_35",ye="_primaryAction_1tggr_41",ve="_clearButton_1tggr_67",Ne="_list_1tggr_88",be="_empty_1tggr_95",Ce="_loading_1tggr_104",je="_pagination_1tggr_113",Se="_pageInfo_1tggr_121",Te="_btn_1tggr_127",l={page:pe,limitNotice:ue,limitNoticeContent:_e,limitNoticeTitle:fe,limitNoticeText:xe,primaryAction:ye,clearButton:ve,list:Ne,empty:be,loading:Ce,pagination:je,pageInfo:Se,btn:Te},T=10,$e=[{key:"all",labelKey:"changelog.filter.all"},{key:"active",labelKey:"changelog.filter.active"},{key:"completed",labelKey:"changelog.filter.completed"}];function we(){const{t:s}=D(),{trackEvent:d,trackPageView:t}=V(),n=O(),a=J(),m=K(),{show:g}=G(),[f,i]=r.useState(!1),[v,h]=r.useState(!1),x=!m.loading&&m.tier==="basic",N=x?a.entries.slice(0,3):a.entries,_=!x&&a.total>T,C=async()=>{h(!0);try{await a.clear(),g(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{g(s("toast.clearFailed","Failed to clear data"),"error")}finally{h(!1)}};return e.jsxs("div",{className:l.page,children:[e.jsx(U,{title:s("page.changelog.title","Changelog"),description:s("page.changelog.description","Review game-change sessions captured from AI actions and sync events."),helpTopicId:"changelog",helpState:{tier:m.tier}}),e.jsx(q,{items:$e.map(c=>({key:c.key,label:s(c.labelKey,c.key.charAt(0).toUpperCase()+c.key.slice(1))})),value:a.statusFilter,onChange:c=>{const p=`changelog_${c}`;d("dashboard_click_event",{click_target:`changelog_tab_${c}`,page:"changelog",tab:p}),t({page:"changelog",tab:p}),a.setStatusFilter(c),a.setOffset(0)},rightActions:e.jsx("button",{className:l.clearButton,onClick:()=>{d("dashboard_click_event",{click_target:"changelog_clear",page:"changelog",tab:`changelog_${a.statusFilter}`}),i(!0)},children:s("common.clear","Clear")})}),a.loading&&a.entries.length===0&&e.jsx("div",{className:l.loading,children:s("common.loading","Loading...")}),!a.loading&&a.entries.length===0?e.jsx("div",{className:l.empty,children:s("changelog.empty","No changelog entries yet")}):e.jsx("div",{className:l.list,children:N.map(c=>e.jsx(he,{entry:c,onClick:()=>n(`/changelog/${c.entryId}`)},c.entryId))}),_&&e.jsxs("div",{className:l.pagination,children:[e.jsx("button",{className:l.btn,disabled:a.offset===0,onClick:()=>a.setOffset(Math.max(0,a.offset-T)),children:s("tools.page.prev","Prev")}),e.jsxs("span",{className:l.pageInfo,children:[a.offset+1,"–",Math.min(a.offset+T,a.total)," / ",a.total]}),e.jsx("button",{className:l.btn,disabled:!a.hasMore,onClick:()=>a.setOffset(a.offset+T),children:s("tools.page.next","Next")})]}),x&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:l.limitNotice,children:[e.jsxs("div",{className:l.limitNoticeContent,children:[e.jsx("div",{className:l.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),e.jsx("div",{className:l.limitNoticeText,children:s("changelog.basic.limit.body","Full changelog timeline browsing is available with Pro.")})]}),e.jsx("a",{className:l.primaryAction,href:H.changelog,target:"_blank",rel:"noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"changelog_limit_notice",page:"changelog",tab:`changelog_${a.statusFilter}`}),children:s("tier.upgrade","View Pro")})]})}),e.jsx(Z,{open:f,title:s("changelog.clear.title","Clear changelog?"),message:s("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:v,onCancel:()=>!v&&i(!1),onConfirm:C})]})}export{we as Component};
@@ -0,0 +1 @@
1
+ import{r as x,j as s,x as a}from"./index-1ZlHj3-1.js";function j({open:t,title:r,message:c,cancelLabel:o,confirmLabel:n,loading:e=!1,onCancel:l,onConfirm:d}){const i=x.useId();return t?s.jsx("div",{className:a.backdrop,onClick:e?void 0:l,children:s.jsxs("div",{className:a.modal,role:"dialog","aria-modal":"true","aria-labelledby":i,onClick:m=>m.stopPropagation(),children:[s.jsx("h2",{id:i,className:a.title,children:r}),s.jsx("p",{className:a.message,children:c}),s.jsxs("div",{className:a.actions,children:[s.jsx("button",{className:a.cancelButton,onClick:l,disabled:e,children:o}),s.jsx("button",{className:a.confirmButton,onClick:d,disabled:e,children:e?"...":n})]})]})}):null}export{j as C};
@@ -0,0 +1 @@
1
+ import{u as L,r as a,j as e,d as B,a as w,D as T,i as H,n as D}from"./index-1ZlHj3-1.js";import{I as r}from"./InfoLabel-CldY9uOT.js";import{P as F}from"./PageHeader-ueZvp6K9.js";import{S as U}from"./StatusBadge-DxlagIzF.js";import{T as K}from"./TooltipText-DazmfUnr.js";import{C as $}from"./ConfirmModal-DSKr5eS9.js";import{u as G,f as O}from"./useLiveUptime-Dg607eVr.js";const V="_container_1h084_2",q="_entry_1h084_14",X="_timestamp_1h084_21",z="_message_1h084_27",J="_warn_1h084_34",Q="_error_1h084_39",W="_empty_1h084_44",v={container:V,entry:q,timestamp:X,message:z,warn:J,error:Q,empty:W};function Y(n){const i=new Date(n);return Number.isNaN(i.getTime())?n:`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Z({entries:n}){const{t:i}=L(),t=a.useRef(null);return a.useEffect(()=>{const o=t.current;o&&(o.scrollTop=o.scrollHeight)},[n.length]),e.jsx("div",{ref:t,className:v.container,children:n.length===0?e.jsx("div",{className:v.empty,children:i("connection.log.empty","No events yet")}):n.map((o,u)=>e.jsxs("div",{className:`${v.entry} ${o.type?v[o.type]:""}`,children:[e.jsx("span",{className:v.timestamp,children:Y(o.timestamp)}),e.jsx("span",{className:v.message,children:o.message})]},u))})}const A=50;function ee(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function ne(){const{level:n,status:i,error:t}=B(),[o,u]=a.useState(null),[C,j]=a.useState([]),y=a.useRef(null),g=a.useCallback((l,x)=>{j(p=>{const d=[...p,{timestamp:ee(),message:l,type:x}];return d.length>A?d.slice(-A):d})},[]),m=a.useCallback(async()=>{try{const l=await w.get("/connection-info");u(l)}catch{u(null)}},[]),S=a.useCallback(async()=>{try{const l=await w.get("/api/dashboard/connection-log");j(l.entries??[])}catch{j([])}},[]),k=a.useCallback(async()=>{await w.post("/api/dashboard/connection-log/clear"),j([])},[]),f=a.useCallback(async l=>{await w.post("/api/dashboard/kill-agent",{instanceId:l}),await m()},[m]);return a.useEffect(()=>{n!=="disconnected"&&i&&m(),S()},[n,i,m,S]),a.useEffect(()=>{const l=new T;y.current=l,l.connect();const x=l.on("connection",d=>{const h=d,_=h.status==="connected"?"connected":"disconnected";g(`Plugin ${_} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),p=l.on("mcp_status",d=>{const h=d,_=h.status==="registered"?"registered":"unregistered";g(`MCP ${_} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),m()});return()=>{x(),p(),l.disconnect(),y.current=null}},[g,m]),{status:i,connectionInfo:o,connectionLog:C,level:n,error:t,clearConnectionLog:k,killAgent:f}}const te="_page_15jrd_2",se="_card_15jrd_10",ce="_disabled_15jrd_18",oe="_cardHeader_15jrd_24",ie="_clearButton_15jrd_37",ae="_serverGrid_15jrd_47",le="_statusRow_15jrd_65",re="_metaItem_15jrd_72",de="_table_15jrd_79",me="_toggleBtn_15jrd_104",pe="_disconnected_15jrd_119",he="_disconnectedActions_15jrd_136",ge="_btn_15jrd_143",ue="_activity_active_15jrd_161",je="_activity_stale_15jrd_162",xe="_activity_unknown_15jrd_163",_e="_killBtn_15jrd_187",ve="_emptyRow_15jrd_207",s={page:te,card:se,disabled:ce,cardHeader:oe,clearButton:ie,serverGrid:ae,statusRow:le,metaItem:re,table:de,toggleBtn:me,disconnected:pe,disconnectedActions:he,btn:ge,activity_active:ue,activity_stale:je,activity_unknown:xe,killBtn:_e,emptyRow:ve};function N(n,i){const t=Math.max(0,Math.floor((Date.now()-n)/1e3));return t<60?`${t}${i("connection.time.secondsAgo","s ago")}`:t<3600?`${Math.floor(t/60)}${i("connection.time.minutesAgo","m ago")}`:`${Math.floor(t/3600)}${i("connection.time.hoursAgo","h ago")}`}function fe(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Ie(){var I;const{t:n}=L(),{trackEvent:i}=H(),{status:t,connectionInfo:o,connectionLog:u,level:C,clearConnectionLog:j,killAgent:y}=ne(),{show:g}=D(),[m,S]=a.useState(!0),[k,f]=a.useState(!1),[l,x]=a.useState(!1),[p,d]=a.useState(null),[h,_]=a.useState(!1),R=G(t==null?void 0:t.uptime),b=C==="disconnected",M=b?"offline":"online",E=async()=>{if(p){_(!0);try{await y(p.instanceId),g(n("connection.agents.killed","Agent killed"),"success"),d(null)}catch{g(n("connection.agents.killFailed","Failed to kill agent"),"error")}finally{_(!1)}}},P=async()=>{x(!0);try{await j(),g(n("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{g(n("toast.clearFailed","Failed to clear data"),"error")}finally{x(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsx(F,{title:n("page.connection.title","Connection"),description:n("page.connection.description","Inspect MCP server, AI agent, Studio plugin, and connection log status."),helpTopicId:"connection",helpState:{connectionLevel:C}}),e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:n("connection.server.title","Server Status")}),b?e.jsxs("div",{className:s.disconnected,children:[e.jsx("h3",{children:n("level.l0.title")}),e.jsx("p",{children:n("level.l0.message")}),e.jsx("p",{children:n("common.reconnecting")}),e.jsxs("div",{className:s.disconnectedActions,children:[e.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:s.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.statusRow,children:e.jsx(U,{status:M})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(K,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:O(R??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(o==null?void 0:o.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:o.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(o==null?void 0:o.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>S(c=>!c),"aria-label":m?n("common.collapse","Collapse"):n("common.expand","Expand"),children:m?"▾":"▸"})]}),m&&e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastSeen","Last Seen"),tooltip:n("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastCommand","Last Command"),tooltip:n("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:o!=null&&o.mcpInstances&&o.mcpInstances.length>0?o.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:s[`activity_${fe(c.lastSeen)}`]}),c.aiClientName??n("connection.agents.unknown","Unknown")]}),e.jsx("td",{children:c.pid}),e.jsx("td",{children:c.projectRoot??c.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:N(c.connectedAt,n)}),e.jsx("td",{children:c.lastSeen?N(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?N(c.lastCommandAt,n):"-"}),e.jsx("td",{children:!c.isServer&&e.jsx("button",{className:s.killBtn,onClick:()=>{i("dashboard_click_event",{click_target:"connection_kill_agent",page:"connection"}),d({instanceId:c.instanceId,name:c.aiClientName??c.instanceId.slice(0,8)})},children:n("connection.agents.kill","Kill")})})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((I=t==null?void 0:t.pluginClients)==null?void 0:I.length)??0,")"]}),e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(c=>e.jsxs("tr",{children:[e.jsx("td",{children:c.placeName??c.projectName??"-"}),e.jsx("td",{children:c.clientId.slice(0,10)}),e.jsx("td",{children:N(c.lastSeen,n)}),e.jsx("td",{children:c.pluginVersion??"-"})]},c.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx("span",{children:n("connection.log.title","Connection Log")}),e.jsx("button",{className:s.clearButton,onClick:()=>{i("dashboard_click_event",{click_target:"connection_clear_log",page:"connection"}),f(!0)},children:n("common.clear","Clear")})]}),e.jsx(Z,{entries:u})]}),e.jsx($,{open:k,title:n("connection.clear.title","Clear connection log?"),message:n("connection.clear.message","This permanently removes the stored connection log for the current project."),cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("common.clear","Clear"),loading:l,onCancel:()=>!l&&f(!1),onConfirm:P}),e.jsx($,{open:!!p,title:n("connection.agents.kill.title","Kill agent?"),message:`"${p==null?void 0:p.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("connection.agents.kill","Kill"),loading:h,onCancel:()=>!h&&d(null),onConfirm:E})]})}export{Ie as Component};
@@ -1,4 +1,4 @@
1
- import{u as _,r as x,j as e}from"./index-VNIYQxwF.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",w="_unifiedView_uv8oc_40",L="_diffLine_uv8oc_46",b="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:w,diffLine:L,lineNum:b,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const l=n.split(`
1
+ import{u as _,r as x,j as e}from"./index-1ZlHj3-1.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",w="_unifiedView_uv8oc_40",L="_diffLine_uv8oc_46",b="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:w,diffLine:L,lineNum:b,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const l=n.split(`
2
2
  `),d=i.split(`
3
3
  `),a=[],f=Math.max(l.length,d.length);let t=0,r=0;for(;(t<l.length||r<d.length)&&(t<l.length&&r<d.length?l[t]===d[r]?(a.push({type:"context",content:l[t],lineNum:r+1}),t++,r++):(a.push({type:"removed",content:l[t],lineNum:t+1}),t++,t<l.length&&l[t]===d[r]?(a.push({type:"added",content:d[r],lineNum:r+1}),r++):r<d.length&&(a.push({type:"added",content:d[r],lineNum:r+1}),r++)):t<l.length?(a.push({type:"removed",content:l[t],lineNum:t+1}),t++):r<d.length&&(a.push({type:"added",content:d[r],lineNum:r+1}),r++),!(a.length>f*3)););return a}function O({before:n,after:i}){const{t:l}=_(),[d,a]=x.useState("unified"),f=typeof n=="string"?n:n!=null?JSON.stringify(n,null,2):"",t=typeof i=="string"?i:i!=null?JSON.stringify(i,null,2):"",r=x.useMemo(()=>k(f,t),[f,t]);if(!f&&!t)return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.empty,children:l("changelog.diff.empty","No diff available")})});if(!f&&t){const c=t.split(`
4
4
  `);return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.unifiedView,children:c.map((u,m)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineAdded}`,children:[e.jsx("span",{className:s.lineNum,children:m+1}),e.jsxs("span",{className:s.lineContent,children:["+ ",u]})]},m))})})}return e.jsxs("div",{className:s.container,children:[e.jsxs("div",{className:s.header,children:[e.jsx("button",{className:`${s.modeBtn} ${d==="unified"?s.modeBtnActive:""}`,onClick:()=>a("unified"),children:l("changelog.diff.unified","Unified")}),e.jsx("button",{className:`${s.modeBtn} ${d==="side-by-side"?s.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:l("changelog.diff.sideBySide","Side by Side")})]}),d==="unified"?e.jsx("div",{className:s.unifiedView,children:r.map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${c.type==="added"?s.lineAdded:c.type==="removed"?s.lineRemoved:s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:c.lineNum??""}),e.jsxs("span",{className:s.lineContent,children:[c.type==="added"?"+ ":c.type==="removed"?"- ":" ",c.content]})]},u))}):e.jsxs("div",{className:s.sideBySide,children:[e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:l("changelog.diff.before","Before")}),e.jsx("div",{className:s.sideContent,children:f.split(`
@@ -1 +1 @@
1
- import{j as r,p as e}from"./index-VNIYQxwF.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
1
+ import{j as r,p as e}from"./index-1ZlHj3-1.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
@@ -0,0 +1 @@
1
+ import{j as t,u as R,r as v,d as L,m as F,a as M,D as V}from"./index-1ZlHj3-1.js";import{I as A}from"./InfoLabel-CldY9uOT.js";import{P as U}from"./PageHeader-ueZvp6K9.js";import{S as z}from"./StatusBadge-DxlagIzF.js";import{T as O}from"./TooltipText-DazmfUnr.js";import{G as X}from"./GameChangeDetail-BmXlRT3i.js";import{u as q,f as J}from"./useLiveUptime-Dg607eVr.js";const K="_page_1xgxh_2",Q="_card_1xgxh_10",W="_cardHeader_1xgxh_17",Y="_disconnectCard_1xgxh_28",Z="_disconnectIcon_1xgxh_36",ee="_disconnectTitle_1xgxh_41",te="_disconnectMessage_1xgxh_48",se="_reconnectGuide_1xgxh_55",ne="_guideStep_1xgxh_64",ie="_stepNumber_1xgxh_72",ce="_reconnectIndicator_1xgxh_88",re="_reconnectDot_1xgxh_98",ae="_pulse_1xgxh_1",oe="_disconnectActions_1xgxh_112",le="_btn_1xgxh_118",de="_btnSecondary_1xgxh_134",me="_metricRow_1xgxh_152",ge="_metricGrid_1xgxh_158",he="_metricCard_1xgxh_164",xe="_metric_ok_1xgxh_174",ue="_metric_warn_1xgxh_179",ve="_metric_error_1xgxh_184",_e="_metricHeader_1xgxh_189",pe="_metricIcon_1xgxh_200",fe="_metricTitle_1xgxh_204",Ce="_metricValue_1xgxh_208",je="_metricSubtitle_1xgxh_215",we="_guideCard_1xgxh_225",Ne="_guideTitle_1xgxh_232",ye="_checklist_1xgxh_239",Te="_feedEmpty_1xgxh_263",Se="_feedList_1xgxh_270",Ie="_feedItem_1xgxh_278",be="_feedTime_1xgxh_291",ke="_feedIcon_1xgxh_298",Me="_feedSummary_1xgxh_304",De="_feedText_1xgxh_313",Be="_feedContext_1xgxh_321",He="_feedItemClickable_1xgxh_330",Ee="_feedChevron_1xgxh_338",Pe="_feedDetail_1xgxh_347",$e="_feedDetailPre_1xgxh_356",Re="_feedDetailText_1xgxh_365",Ge="_changelogSummary_1xgxh_372",Le="_changeTag_1xgxh_381",Fe="_tierBar_1xgxh_393",Ve="_tierBarTrack_1xgxh_399",Ae="_tierBarFillBasic_1xgxh_407",Ue="_tierBarFillPro_1xgxh_412",ze="_tierLabels_1xgxh_417",s={page:K,card:Q,cardHeader:W,disconnectCard:Y,disconnectIcon:Z,disconnectTitle:ee,disconnectMessage:te,reconnectGuide:se,guideStep:ne,stepNumber:ie,reconnectIndicator:ce,reconnectDot:re,pulse:ae,disconnectActions:oe,btn:le,btnSecondary:de,metricRow:me,metricGrid:ge,metricCard:he,metric_ok:xe,metric_warn:ue,metric_error:ve,metricHeader:_e,metricIcon:pe,metricTitle:fe,metricValue:Ce,metricSubtitle:je,guideCard:we,guideTitle:Ne,checklist:ye,feedEmpty:Te,feedList:Se,feedItem:Ie,feedTime:be,feedIcon:ke,feedSummary:Me,feedText:De,feedContext:Be,feedItemClickable:He,feedChevron:Ee,feedDetail:Pe,feedDetailPre:$e,feedDetailText:Re,changelogSummary:Ge,changeTag:Le,tierBar:Fe,tierBarTrack:Ve,tierBarFillBasic:Ae,tierBarFillPro:Ue,tierLabels:ze};function N({title:e,value:i,icon:c,subtitle:r,status:a,children:n}){const l=a?s[`metric_${a}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Oe(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function H({changes:e}){const{t:i}=R(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((a,n)=>{const l=c===n,g=a.raw,h=g&&(g.before!=null||g.after!=null||g.details!=null),_=Oe(g);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${h?s.feedItemClickable:""}`,onClick:()=>h&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:a.timestamp}),t.jsx("span",{className:s.feedIcon,children:a.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:a.summary}),_&&t.jsx("span",{className:s.feedContext,children:_})]}),h&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&g&&t.jsx("div",{className:s.feedDetail,children:t.jsx(X,{change:g})})]},n)})})}const E=20;function G(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function P(){return G(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function Xe(){const{level:e,status:i}=L(),c=F(),[r,a]=v.useState(null),[n,l]=v.useState(null),[g,h]=v.useState(null),[_,x]=v.useState([]),y=v.useRef(null),T=v.useCallback(async()=>{try{const o=await M.get("/connection-info");a(o)}catch{a(null)}},[]),S=v.useCallback(async()=>{try{const o=await M.get("/api/dashboard/changelog/active");if(h(o),o.recentChanges&&o.recentChanges.length>0){const p=o.recentChanges.map(u=>({timestamp:u.timestamp?G(new Date(u.timestamp)):P(),icon:$(u.category),summary:u.summary,category:u.category,raw:u}));x(p)}}catch{h(null)}},[]),f=v.useCallback(async()=>{try{const o=await M.get("/sync/status");l(o)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(T(),S(),f()):(a(null),l(null),h(null));const o=new V;y.current=o,o.connect();const p=o.on("game_change",C=>{const d=C,j={timestamp:P(),icon:$(d.category),summary:d.summary,category:d.category};x(k=>{const w=[j,...k];return w.length>E?w.slice(0,E):w}),S()}),u=o.on("sync",C=>{const d=C;l(j=>({...j,state:d.status,...d.placeId?{placeId:d.placeId}:{}}))});return()=>{p(),u(),o.disconnect(),y.current=null}},[e,T,S,f]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:g,recentChanges:_,tier:c}}function D(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function qe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Je(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function b(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(A,{label:i,tooltip:c}),": ",r]},i)}function m(e,i){return t.jsx(O,{text:i,children:e})}function st(){var w,B;const{t:e}=R(),{level:i,status:c,connectionInfo:r,syncStatus:a,changeSummary:n,recentChanges:l}=Xe(),g=q(c==null?void 0:c.uptime),h=t.jsx(U,{title:e("page.overview.title","Overview"),description:e("page.overview.description","Check server, plugin, agent, sync, and recent game-change status in one place."),helpTopicId:"overview",helpState:{connectionLevel:i}});if(i==="disconnected")return t.jsxs("div",{className:s.page,children:[h,t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})]});const _=(r==null?void 0:r.mcpInstanceCount)??0,x=((w=r==null?void 0:r.mcpInstances)==null?void 0:w.find(I=>!I.isServer&&I.aiClientName))??((B=r==null?void 0:r.mcpInstances)==null?void 0:B.find(I=>!!I.aiClientName))??null,y=(c==null?void 0:c.pluginClients)??[],T=y.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),p=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),u=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),C=c?[b(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),b(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),b(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),b(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),J(g??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[h,t.jsxs("div",{className:s.metricRow,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[C,t.jsx(z,{status:"online"})]})}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((x==null?void 0:x.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:_>1?`${_} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:x?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(H,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",D(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const d=y[0],j=n?D(n):0,k=!!n&&j>0;return t.jsxs("div",{className:s.page,children:[h,t.jsxs("div",{className:s.metricGrid,children:[t.jsx(N,{title:m(e("overview.metric.server"),f),value:m(e("status.online"),f),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:C})}),t.jsx(N,{title:m(e("overview.metric.plugin"),o),value:m(e(T?"status.online":"status.offline"),o),icon:"🔌",subtitle:d?`${d.placeName??d.projectName??"-"} / v${d.pluginVersion??"-"}`:void 0,status:T?"ok":"error"}),t.jsx(N,{title:m(e("overview.metric.agent"),p),value:m((x==null?void 0:x.aiClientName)??e("overview.metric.noAgent"),p),icon:"🤖",subtitle:_>1?`${_} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:x?"ok":"warn"}),t.jsx(N,{title:m(e("overview.metric.sync"),u),value:m(qe(a==null?void 0:a.state,e),u),icon:"🔄",status:Je(a==null?void 0:a.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(H,{changes:l})]}),k&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",j]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]})}export{st as Component};
@@ -0,0 +1 @@
1
+ ._root_rxppj_1{position:relative;display:inline-flex;align-items:center}._rootPage_rxppj_7{margin-left:4px}._rootField_rxppj_11{margin-left:2px}._button_rxppj_15{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:28px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card);color:var(--text-secondary);padding:0 8px;font:inherit;font-size:12px;line-height:1;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._rootField_rxppj_11 ._button_rxppj_15{width:22px;min-height:22px;padding:0}._button_rxppj_15:hover,._button_rxppj_15:focus-visible{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--text-primary);outline:none}._panel_rxppj_50{position:fixed;z-index:1200;box-sizing:border-box;width:min(360px,calc(100vw - 24px));max-height:min(560px,calc(100vh - 24px));overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);box-shadow:0 18px 46px #00000047;padding:14px;text-align:left}._panelField_rxppj_65{width:min(340px,calc(100vw - 24px))}._panelPage_rxppj_69{width:min(360px,calc(100vw - 24px))}._panelHeader_rxppj_73{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}._panelHeader_rxppj_73 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;line-height:1.3;letter-spacing:0;text-transform:none}._closeButton_rxppj_91{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:24px;height:24px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-secondary);cursor:pointer}._closeButton_rxppj_91:hover,._closeButton_rxppj_91:focus-visible{background:var(--bg-secondary);color:var(--text-primary);outline:none}._sectionStack_rxppj_112{display:grid;gap:12px}._helpSection_rxppj_117 h3,._linkList_rxppj_118 h3{margin:0 0 6px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;letter-spacing:0;text-transform:none}._helpSection_rxppj_117 ul{margin:0;padding-left:18px;color:var(--text-secondary);font-size:12px;line-height:1.45}._helpSection_rxppj_117 li+li{margin-top:4px}._linkList_rxppj_118{display:grid;gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}._linkList_rxppj_118 a{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-size:12px;text-decoration:none}._linkList_rxppj_118 a:hover,._linkList_rxppj_118 a:focus-visible{text-decoration:underline;outline:none}._pageHeader_qym7v_1{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;min-width:0}._copy_qym7v_9{display:flex;flex-direction:column;gap:5px;min-width:0}._titleLine_qym7v_16{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}._titleLine_qym7v_16 h1{margin:0;color:var(--text-primary);font-size:22px;font-weight:700;letter-spacing:0}._copy_qym7v_9 p{margin:0;color:var(--text-secondary);font-size:13px;line-height:1.45}._actions_qym7v_39{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}@media(max-width:640px){._pageHeader_qym7v_1{gap:12px}._copy_qym7v_9 p{font-size:12px}}
@@ -0,0 +1,11 @@
1
+ import{q as K,u as Q,i as V,r as p,j as t,E as J,B as Z}from"./index-1ZlHj3-1.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],te=K("circle-question-mark",ee);/**
7
+ * @license lucide-react v1.8.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ne=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oe=K("x",ne),a={canDo:{key:"dashboardHelp.section.canDo",fallback:"What you can do here"},needs:{key:"dashboardHelp.section.needs",fallback:"What you need to use it"},currentState:{key:"dashboardHelp.section.currentState",fallback:"Check based on current status"}},se="https://create.roblox.com/docs/cloud/auth/api-keys",ae="https://create.roblox.com/docs/cloud/guides/usage-assets",re="https://create.roblox.com/docs/cloud/reference/features/assets",le="https://create.roblox.com/docs/reference/engine/classes/DataModel#CreatorId",ie="https://create.roblox.com/docs/reference/engine/classes/Player#UserId",ce="https://create.roblox.com/docs/projects/groups",de="https://create.roblox.com/docs/cloud/reference/features/groups";function y(e,s,o,h){return{id:e,title:{key:`dashboardHelp.${e}.title`,fallback:s},sections:o,links:h}}function l(e,s,o,h){return{heading:e,items:h.map((i,v)=>({key:`dashboardHelp.${s}.${o}.${v+1}`,fallback:i}))}}function r(e,s,o){return{heading:a.currentState,items:[{key:`dashboardHelp.${e}.currentState.${s}`,fallback:o}]}}function _(e,s,o,h,i,v){return y(e,s,[l(a.canDo,e,"canDo",o),l(a.needs,e,"needs",h),l(a.currentState,e,"currentState",i)],v)}function ue(e){return e.tier==="basic"?r("assets","basic","Activate Pro before uploading to Roblox."):e.uploadEnabled===!1?r("assets","uploadDisabled","Turn on API Key local upload in Assets settings."):e.hasOpenCloudCredential===!1?r("assets","noCredential","Save and test an Open Cloud API Key."):e.hasDefaultCreator===!1?r("assets","noCreator","Save a default Creator ID or enter Creator details during upload."):r("assets","default","Open an asset detail dialog to start upload or usage scan.")}function pe(e){return e.connectionLevel!==void 0&&e.connectionLevel!=="studioConnected"?r("sync","pluginMissing","Connect WEPPY Plugin in Studio before using live sync details."):e.tier==="basic"?r("sync","basic","Activate Pro to use bidirectional or reverse sync."):r("sync","default","Use the sync log to diagnose stuck or failed sync activity.")}function he(e,s={}){return e==="openCloudApiKey"?y(e,"Open Cloud API Key help",[l(a.canDo,e,"canDo",["WEPPY uses this key only for Roblox Open Cloud requests."]),l(a.needs,e,"needs",["Create a Roblox API key in Creator Hub. Add Assets under Access Permissions, then enable both Read and Write operations.","Set the key target to the same User or Group that you use as the upload Creator.","The raw key is encrypted on this device. It is not sent to WEPPY servers, and it is not stored in any other external storage, browser storage, telemetry, logs, tool history, or Asset Library metadata."]),s.hasOpenCloudCredential?r(e,"saved","Use Test Connection to confirm the saved key still works."):r(e,"empty","Create an API key in Roblox Creator Hub, paste it here, then save and test it.")],[{label:{key:"dashboardHelp.openCloudApiKey.link.apiKeys",fallback:"Roblox API keys"},href:se},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsGuide",fallback:"Assets API usage guide"},href:ae},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsReference",fallback:"Assets API reference"},href:re}]):e==="openCloudCreatorId"?y(e,"Creator ID help",[l(a.canDo,e,"canDo",["The default Creator decides which User or Group owns newly uploaded Roblox assets."]),l(a.needs,e,"needs",["For User, sign in to roblox.com, open your profile from your avatar or username, then copy only the number between /users/ and /profile in the browser URL.","For Group, open the Roblox group or community page, then copy only the number after /groups/ or /communities/ in the browser URL.","Paste only the numeric ID in Creator ID. Do not paste the full URL, rbxassetid://, User, or Group text."]),s.hasDefaultCreator?r(e,"saved","Keep this value if new assets should continue using the same owner."):r(e,"empty","Choose User or Group, paste the numeric ID, then save the default Creator.")],[{label:{key:"dashboardHelp.openCloudCreatorId.link.creatorId",fallback:"Creator ID reference"},href:le},{label:{key:"dashboardHelp.openCloudCreatorId.link.userId",fallback:"User ID reference"},href:ie},{label:{key:"dashboardHelp.openCloudCreatorId.link.groups",fallback:"Roblox groups"},href:ce},{label:{key:"dashboardHelp.openCloudCreatorId.link.groupsApi",fallback:"Groups Cloud API"},href:de}]):{overview:y("overview","Overview help",[l(a.canDo,"overview","canDo",["Check MCP server, WEPPY Plugin, AI Agent, Sync, and recent game changes in one place."]),l(a.needs,"overview","needs",["Useful status requires the MCP server. Live Studio status also needs WEPPY Plugin connected to the active place."]),s.connectionLevel==="serverOnly"?r("overview","serverOnly","Open Roblox Studio and start WEPPY Plugin so live place data can appear."):r("overview","default","If the server disconnects, restart MCP or wait for the automatic reconnect.")]),connection:_("connection","Connection help",["Inspect server process details, connected AI agents, Studio plugin clients, and connection log events."],["The MCP server must be reachable. Plugin rows appear after Studio sends heartbeats."],["If Plugin is missing, open Roblox Studio and run WEPPY Plugin. If AI Agent is missing, reconnect the MCP server from your AI tool."]),sync:y("sync","Sync help",[l(a.canDo,"sync","canDo",["Review Studio to local sync status, direction, apply mode, and sync logs."]),l(a.needs,"sync","needs",["Sync needs an active place and connected WEPPY Plugin. Two-way and reverse workflows depend on Pro."]),pe(s)]),assets:y("assets","Assets help",[l(a.canDo,"assets","canDo",["Browse local Asset Library files, switch place/shared scope, filter categories, scan usage, insert RBXM into Studio, and upload local assets to Roblox."]),l(a.needs,"assets","needs",["Upload needs Pro, the Open Cloud upload toggle, a valid API Key, and a Creator. Browse and preview work on Basic."]),ue(s)]),changelog:_("changelog","Changelog help",["Review real game-change sessions extracted from AI actions and sync events."],["Entries are scoped to the active place. Basic shows only the latest preview entries."],["If the list is empty, ask the AI Agent to make a game change. Clear only deletes saved history records, not Studio objects."]),playtest:y("playtest","Playtest help",[l(a.canDo,"playtest","canDo",["Review Playtest results and reports saved by the AI Agent."]),l(a.needs,"playtest","needs",["Pro shows real stored reports. Basic shows sample preview data. Live active-place confidence needs WEPPY Plugin connected."]),s.tier==="basic"?r("playtest","basic","Activate Pro to use real Playtest history."):r("playtest","default","Ask the AI Agent to run a Playtest when no report is available.")]),uiStudio:y("uiStudio","UI Studio help",[l(a.canDo,"uiStudio","canDo",["Review AI-created UI analysis, improvement suggestions, captures, and before/after history."]),l(a.needs,"uiStudio","needs",["Pro shows real UI Studio data. Basic shows a bundled sample. New capture/check actions need WEPPY Plugin connected."]),s.tier==="basic"?r("uiStudio","basic","Activate Pro to use live UI Studio previews."):r("uiStudio","default","Ask the AI Agent to capture the UI or recheck improvement suggestions, then copy follow-up requests back to the AI chat.")]),tools:_("tools","Tools help",["Inspect tool history, status classification, fallback/unsupported/warn/error details, and usage statistics."],["History and statistics depend on local recording settings and the active place bucket."],["If no records appear, check Settings > General and confirm history/statistics are enabled. Expand failed rows to inspect input, permission, or connection causes."]),settings:_("settings","Settings help",["Manage License, hot settings, saved data cleanup, server environment display, and language."],["License actions need MCP server connection. Server environment values are read-only here. Asset upload controls live in Assets settings."],["Activate a license for Pro features. Change environment values outside WEPPY Dashboard, then restart MCP. Review delete confirmations before clearing saved data."]),whatsNew:_("whatsNew","What's New help",["Review WEPPY Dashboard, MCP, and Plugin announcements, releases, and change notes."],["Announcements are bundled locally. Unread state is stored in this browser."],["After you visit this page, unread announcements from this visit are marked read when you leave. The top header does not show a duplicate What's New button on this page."])}[e]}const fe="_root_rxppj_1",ye="_rootPage_rxppj_7",be="_rootField_rxppj_11",ge="_button_rxppj_15",me="_panel_rxppj_50",ve="_panelField_rxppj_65",Pe="_panelPage_rxppj_69",ke="_panelHeader_rxppj_73",_e="_closeButton_rxppj_91",we="_sectionStack_rxppj_112",xe="_helpSection_rxppj_117",Ce="_linkList_rxppj_118",c={root:fe,rootPage:ye,rootField:be,button:ge,panel:me,panelField:ve,panelPage:Pe,panelHeader:ke,closeButton:_e,sectionStack:we,helpSection:xe,linkList:Ce},b=12,A=8,Ae=120,Ee=360,Ie=340,Y=560;function Re({topicId:e,state:s,variant:o="page",className:h}){const{t:i}=Q(),{trackEvent:v}=V(),[f,w]=p.useState(!1),[x,D]=p.useState(null),j=p.useId(),N=p.useRef(null),O=p.useRef(null),I=p.useRef(null),g=he(e,s),R=i(g.title.key,g.title.fallback),C=p.useCallback(()=>{const n=O.current,d=I.current;if(!n||!d||typeof window>"u")return;const u=n.getBoundingClientRect(),m=d.getBoundingClientRect(),P=window.innerWidth,k=window.innerHeight,q=o==="field"?Ie:Ee,M=m.width||Math.min(q,P-b*2),B=m.height||Y;let S=o==="field"?u.left:u.right-M;S=Math.max(b,Math.min(S,P-M-b));const L=k-u.bottom-A-b,W=u.top-A-b,T=L<Math.min(B,220)&&W>L,z=Math.max(Ae,T?W:L),G=Math.min(Y,z),F=Math.min(B,G);let H=T?u.top-A-F:u.bottom+A;H=Math.max(b,Math.min(H,k-F-b)),D({top:Math.round(H),left:Math.round(S),maxHeight:Math.round(G)})},[o]);p.useLayoutEffect(()=>{f?C():D(null)},[f,C]),p.useEffect(()=>{if(!f)return;const n=u=>{var P,k;const m=u.target;m&&!((P=N.current)!=null&&P.contains(m))&&!((k=I.current)!=null&&k.contains(m))&&w(!1)},d=u=>{u.key==="Escape"&&w(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",d)}},[f]),p.useEffect(()=>{if(!f)return;const n=()=>C();return window.addEventListener("scroll",n,!0),window.addEventListener("resize",n),()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}},[f,C]);const X=o==="field"?i("dashboardHelp.fieldButton.ariaLabel","Open field help"):i("dashboardHelp.pageButton.ariaLabel","Open page help"),$=x?{top:x.top,left:x.left,maxHeight:x.maxHeight}:{top:-9999,left:-9999,visibility:"hidden"},U=f?t.jsxs("section",{ref:I,id:j,className:[c.panel,o==="field"?c.panelField:c.panelPage].filter(Boolean).join(" "),style:$,role:"dialog","aria-label":R,"data-panel-placement":"help-portal",children:[t.jsxs("div",{className:c.panelHeader,children:[t.jsx("h2",{children:R}),t.jsx("button",{type:"button",className:c.closeButton,"aria-label":i("common.close","Close"),onClick:()=>w(!1),children:t.jsx(oe,{size:15,"aria-hidden":"true"})})]}),t.jsx("div",{className:c.sectionStack,children:g.sections.map(n=>t.jsxs("section",{className:c.helpSection,children:[t.jsx("h3",{children:i(n.heading.key,n.heading.fallback)}),t.jsx("ul",{children:n.items.map(d=>t.jsx("li",{children:i(d.key,d.fallback)},d.key))})]},n.heading.key))}),g.links&&g.links.length>0&&t.jsxs("div",{className:c.linkList,children:[t.jsx("h3",{children:i("dashboardHelp.section.links","Related links")}),g.links.map(n=>t.jsxs("a",{href:n.href,target:"_blank",rel:"noreferrer",children:[i(n.label.key,n.label.fallback),t.jsx(J,{size:12,"aria-hidden":"true"})]},n.href))]})]}):null;return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:N,className:[c.root,o==="field"?c.rootField:c.rootPage,h??""].filter(Boolean).join(" "),children:t.jsxs("button",{ref:O,type:"button",className:c.button,"aria-label":`${X}: ${R}`,"aria-expanded":f,"aria-controls":j,onClick:()=>{w(n=>{const d=!n;return n||v("dashboard_click_event",{click_target:"dashboard_help_open",help_topic:e,placement:o}),d})},children:[t.jsx(te,{size:o==="field"?14:16,"aria-hidden":"true"}),o==="page"&&t.jsx("span",{children:i("dashboardHelp.button","Help")})]})}),U&&typeof document<"u"?Z.createPortal(U,document.body):null]})}const Se="_pageHeader_qym7v_1",Le="_copy_qym7v_9",He="_titleLine_qym7v_16",De="_actions_qym7v_39",E={pageHeader:Se,copy:Le,titleLine:He,actions:De};function Ne({title:e,description:s,badge:o,helpTopicId:h,helpState:i}){return t.jsxs("div",{className:E.pageHeader,children:[t.jsxs("div",{className:E.copy,children:[t.jsxs("div",{className:E.titleLine,children:[t.jsx("h1",{children:e}),o]}),t.jsx("p",{children:s})]}),t.jsx("div",{className:E.actions,children:t.jsx(Re,{topicId:h,state:i})})]})}export{Re as D,Ne as P,oe as X};